diff --git a/desktop/frontend/src/mobile/MobileTerminal.vue b/desktop/frontend/src/mobile/MobileTerminal.vue index a3e4cc48..496c65f5 100644 --- a/desktop/frontend/src/mobile/MobileTerminal.vue +++ b/desktop/frontend/src/mobile/MobileTerminal.vue @@ -561,7 +561,7 @@ onMounted(() => { if (term.cols > 0 && term.rows > 0) conn?.sendResize(term.cols, term.rows) } }, - }) + }, { remote: true }) conn.attach() refreshInputMode() reloadBars() diff --git a/internal/relay/admin_http.go b/internal/relay/admin_http.go index 60e8ba08..6db6d1ec 100644 --- a/internal/relay/admin_http.go +++ b/internal/relay/admin_http.go @@ -341,6 +341,11 @@ type adminConfigResponse struct { Debug bool `json:"debug"` DebugPayload bool `json:"debug_payload"` + // AllowedOrigins is the current HTTP/WS Origin allow-list. Editable via + // PUT with allowed_origins in the body. An empty list means "any origin" + // (dev mode). Mobile Capacitor clients need "capacitor://localhost" here. + AllowedOrigins []string `json:"allowed_origins"` + Version string `json:"version"` } @@ -422,6 +427,7 @@ func (s *Server) adminConfigResponse() adminConfigResponse { DefaultMaxConnectionsPerKey: defaultMaxConnections, Debug: s.debugOn(), DebugPayload: s.debugPayloadOn(), + AllowedOrigins: append([]string(nil), cfg.AllowedOrigins...), Version: s.cfg.Version, } } diff --git a/internal/relay/version_test.go b/internal/relay/version_test.go index 083405e2..6bba001a 100644 --- a/internal/relay/version_test.go +++ b/internal/relay/version_test.go @@ -195,6 +195,96 @@ func TestAdminConfigPersistsRuntimeLimits(t *testing.T) { } } +// TestAdminConfigRoundtripsAllowedOrigins verifies the admin UI can read the +// current allow-list and PUT a new one. The hot-apply path (SetAllowedOrigins +// + OriginPatterns) is exercised implicitly: after the PUT, the server's +// accept options carry the normalized patterns (host-only) so that a mobile +// WS from Origin capacitor://localhost survives nhooyr's origin check. +func TestAdminConfigRoundtripsAllowedOrigins(t *testing.T) { + ctx := context.Background() + store, err := userstore.Open(ctx, ":memory:") + if err != nil { + t.Fatal(err) + } + t.Cleanup(func() { store.Close() }) + + u, err := store.CreateOpaqueUser(ctx, "admin@example.com") + if err != nil { + t.Fatal(err) + } + if err := store.SetUserAdmin(ctx, u.ID, true); err != nil { + t.Fatal(err) + } + tok, _, err := store.CreateSession(ctx, u.ID, "ua", "1.2.3.0/24", 24*time.Hour) + if err != nil { + t.Fatal(err) + } + + cfgStore := NewAdminConfigStore(store, AdminConfig{ + AllowedOrigins: []string{"https://relay.example.com"}, + }) + resolver := NewIdentityResolver(store) + srv := NewServer(Config{ + Resolver: resolver, + Store: store, + AdminConfigStore: cfgStore, + AllowedOrigins: []string{"relay.example.com"}, + }) + + // GET returns the stored list verbatim (not the normalized host patterns). + getReq := httptest.NewRequest(http.MethodGet, "/admin/api/config", nil) + getReq.Header.Set("Authorization", "Bearer "+tok) + getRec := httptest.NewRecorder() + srv.ServeHTTP(getRec, getReq) + if getRec.Code != http.StatusOK { + t.Fatalf("GET status=%d body=%s; want 200", getRec.Code, getRec.Body.String()) + } + var got struct { + AllowedOrigins []string `json:"allowed_origins"` + } + if err := json.NewDecoder(getRec.Body).Decode(&got); err != nil { + t.Fatalf("decode GET: %v", err) + } + if len(got.AllowedOrigins) != 1 || got.AllowedOrigins[0] != "https://relay.example.com" { + t.Fatalf("GET allowed_origins=%#v; want [https://relay.example.com]", got.AllowedOrigins) + } + + // PUT with a mobile-inclusive list must persist AND hot-apply so that + // WS from capacitor://localhost (host=localhost) survives the origin check. + putBody := strings.NewReader(`{ + "rate_limit_per_minute": 0, + "max_connections_per_key": 0, + "allowed_origins": ["https://relay.example.com", "capacitor://localhost"] + }`) + putReq := httptest.NewRequest(http.MethodPut, "/admin/api/config", putBody) + putReq.Header.Set("Authorization", "Bearer "+tok) + putReq.Header.Set("Content-Type", "application/json") + putRec := httptest.NewRecorder() + srv.ServeHTTP(putRec, putReq) + if putRec.Code != http.StatusOK { + t.Fatalf("PUT status=%d body=%s; want 200", putRec.Code, putRec.Body.String()) + } + + snap := cfgStore.Snapshot() + if len(snap.AllowedOrigins) != 2 || snap.AllowedOrigins[1] != "capacitor://localhost" { + t.Fatalf("persisted allowed_origins=%#v; want [https://relay.example.com capacitor://localhost]", snap.AllowedOrigins) + } + + // Hot-apply: acceptOptions must now use host-only patterns so nhooyr's + // authenticateOrigin can match Origin capacitor://localhost (host=localhost). + patterns := srv.currentAllowedOrigins() + sawLocalhost := false + for _, p := range patterns { + if p == "localhost" { + sawLocalhost = true + break + } + } + if !sawLocalhost { + t.Fatalf("after PUT, allowedOrigins patterns=%#v; want to include host-only 'localhost'", patterns) + } +} + func TestRateLimitRejectsExcessRequests(t *testing.T) { srv := NewServer(Config{Version: "v1.2.3", RateLimitPerMinute: 1}) diff --git a/internal/relay/web-dist/admin/index.html b/internal/relay/web-dist/admin/index.html index a68b16dd..c8aee1a4 100644 --- a/internal/relay/web-dist/admin/index.html +++ b/internal/relay/web-dist/admin/index.html @@ -7,18 +7,18 @@ AT Term · admin - - - - - - - - - + + + + + + + + + - +
diff --git a/internal/relay/web-dist/assets/Alert-CTGJYwHC.js b/internal/relay/web-dist/assets/Alert-Dj-XqAz8.js similarity index 98% rename from internal/relay/web-dist/assets/Alert-CTGJYwHC.js rename to internal/relay/web-dist/assets/Alert-Dj-XqAz8.js index 3c47dbdb..9f3a0dc6 100644 --- a/internal/relay/web-dist/assets/Alert-CTGJYwHC.js +++ b/internal/relay/web-dist/assets/Alert-Dj-XqAz8.js @@ -1,4 +1,4 @@ -import{ak as M,Y as N,Z as v,H as u,w as I,y as i,z as S,as as O,v as V,ai as Y,aC as l,b4 as D,N as K,by as Z,c as q,E as G,W as J,I as Q,i as U,bA as X,f as oo,bT as eo,b$ as H,bY as ro,$ as E,az as no,a8 as c,c0 as so,bs as lo}from"./mobile-guard-CHHXRZ12.js";function to(r){const{lineHeight:o,borderRadius:d,fontWeightStrong:f,baseColor:t,dividerColor:b,actionColor:T,textColor1:g,textColor2:s,closeColorHover:h,closeColorPressed:C,closeIconColor:m,closeIconColorHover:p,closeIconColorPressed:n,infoColor:e,successColor:x,warningColor:z,errorColor:y,fontSize:P}=r;return Object.assign(Object.assign({},N),{fontSize:P,lineHeight:o,titleFontWeight:f,borderRadius:d,border:`1px solid ${b}`,color:T,titleTextColor:g,iconColor:s,contentTextColor:s,closeBorderRadius:d,closeColorHover:h,closeColorPressed:C,closeIconColor:m,closeIconColorHover:p,closeIconColorPressed:n,borderInfo:`1px solid ${v(t,u(e,{alpha:.25}))}`,colorInfo:v(t,u(e,{alpha:.08})),titleTextColorInfo:g,iconColorInfo:e,contentTextColorInfo:s,closeColorHoverInfo:h,closeColorPressedInfo:C,closeIconColorInfo:m,closeIconColorHoverInfo:p,closeIconColorPressedInfo:n,borderSuccess:`1px solid ${v(t,u(x,{alpha:.25}))}`,colorSuccess:v(t,u(x,{alpha:.08})),titleTextColorSuccess:g,iconColorSuccess:x,contentTextColorSuccess:s,closeColorHoverSuccess:h,closeColorPressedSuccess:C,closeIconColorSuccess:m,closeIconColorHoverSuccess:p,closeIconColorPressedSuccess:n,borderWarning:`1px solid ${v(t,u(z,{alpha:.33}))}`,colorWarning:v(t,u(z,{alpha:.08})),titleTextColorWarning:g,iconColorWarning:z,contentTextColorWarning:s,closeColorHoverWarning:h,closeColorPressedWarning:C,closeIconColorWarning:m,closeIconColorHoverWarning:p,closeIconColorPressedWarning:n,borderError:`1px solid ${v(t,u(y,{alpha:.25}))}`,colorError:v(t,u(y,{alpha:.08})),titleTextColorError:g,iconColorError:y,contentTextColorError:s,closeColorHoverError:h,closeColorPressedError:C,closeIconColorError:m,closeIconColorHoverError:p,closeIconColorPressedError:n})}const io={common:M,self:to},ao=I("alert",` +import{ak as M,Y as N,Z as v,H as u,w as I,y as i,z as S,as as O,v as V,ai as Y,aC as l,b4 as D,N as K,by as Z,c as q,E as G,W as J,I as Q,i as U,bA as X,f as oo,bT as eo,b$ as H,bY as ro,$ as E,az as no,a8 as c,c0 as so,bs as lo}from"./mobile-guard-BvFpjCXb.js";function to(r){const{lineHeight:o,borderRadius:d,fontWeightStrong:f,baseColor:t,dividerColor:b,actionColor:T,textColor1:g,textColor2:s,closeColorHover:h,closeColorPressed:C,closeIconColor:m,closeIconColorHover:p,closeIconColorPressed:n,infoColor:e,successColor:x,warningColor:z,errorColor:y,fontSize:P}=r;return Object.assign(Object.assign({},N),{fontSize:P,lineHeight:o,titleFontWeight:f,borderRadius:d,border:`1px solid ${b}`,color:T,titleTextColor:g,iconColor:s,contentTextColor:s,closeBorderRadius:d,closeColorHover:h,closeColorPressed:C,closeIconColor:m,closeIconColorHover:p,closeIconColorPressed:n,borderInfo:`1px solid ${v(t,u(e,{alpha:.25}))}`,colorInfo:v(t,u(e,{alpha:.08})),titleTextColorInfo:g,iconColorInfo:e,contentTextColorInfo:s,closeColorHoverInfo:h,closeColorPressedInfo:C,closeIconColorInfo:m,closeIconColorHoverInfo:p,closeIconColorPressedInfo:n,borderSuccess:`1px solid ${v(t,u(x,{alpha:.25}))}`,colorSuccess:v(t,u(x,{alpha:.08})),titleTextColorSuccess:g,iconColorSuccess:x,contentTextColorSuccess:s,closeColorHoverSuccess:h,closeColorPressedSuccess:C,closeIconColorSuccess:m,closeIconColorHoverSuccess:p,closeIconColorPressedSuccess:n,borderWarning:`1px solid ${v(t,u(z,{alpha:.33}))}`,colorWarning:v(t,u(z,{alpha:.08})),titleTextColorWarning:g,iconColorWarning:z,contentTextColorWarning:s,closeColorHoverWarning:h,closeColorPressedWarning:C,closeIconColorWarning:m,closeIconColorHoverWarning:p,closeIconColorPressedWarning:n,borderError:`1px solid ${v(t,u(y,{alpha:.25}))}`,colorError:v(t,u(y,{alpha:.08})),titleTextColorError:g,iconColorError:y,contentTextColorError:s,closeColorHoverError:h,closeColorPressedError:C,closeIconColorError:m,closeIconColorHoverError:p,closeIconColorPressedError:n})}const io={common:M,self:to},ao=I("alert",` line-height: var(--n-line-height); border-radius: var(--n-border-radius); position: relative; diff --git a/internal/relay/web-dist/assets/FormItem-KX1KLzyv.js b/internal/relay/web-dist/assets/FormItem-Biv8w1Bg.js similarity index 99% rename from internal/relay/web-dist/assets/FormItem-KX1KLzyv.js rename to internal/relay/web-dist/assets/FormItem-Biv8w1Bg.js index 8ec136bb..bc2d55b7 100644 --- a/internal/relay/web-dist/assets/FormItem-KX1KLzyv.js +++ b/internal/relay/web-dist/assets/FormItem-Biv8w1Bg.js @@ -1,4 +1,4 @@ -import{c5 as Ze,$ as O,aH as je,aw as nr,bd as or,bb as Nn,be as Xn,ai as me,bv as Un,bf as $t,az as Le,aO as Hr,b0 as Vr,b as qr,bQ as Yn,a0 as Kn,ap as Gn,ag as Zn,aC as v,bx as Jn,w as I,v as P,y as z,aE as Qn,g as eo,by as lt,b_ as Dr,bO as We,c as Pt,P as jr,z as A,F as Nr,bT as ft,bY as ir,bs as L,b$ as ze,bE as to,aj as cr,c6 as Ut,c0 as Bt,l as Yt,b4 as ro,d as no,a7 as ar,A as it,bz as oo,bA as we,aZ as io,bU as ao,bW as ur,bn as Tt,a8 as ge,aI as lo,b7 as fr,D as de,r as so,aJ as co,aK as uo,G as fo,aq as Ye,N as ho,au as Xr,a6 as hr,at as vo,c4 as vr}from"./mobile-guard-CHHXRZ12.js";function go(t){return t.composedPath()[0]||null}function Ct(t){return t.composedPath()[0]}const po={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function bo(t,e,r){if(t==="mousemoveoutside"){const n=o=>{e.contains(Ct(o))||r(o)};return{mousemove:n,touchstart:n}}else if(t==="clickoutside"){let n=!1;const o=a=>{n=!e.contains(Ct(a))},i=a=>{n&&(e.contains(Ct(a))||r(a))};return{mousedown:o,mouseup:i,touchstart:o,touchend:i}}return console.error(`[evtd/create-trap-handler]: name \`${t}\` is invalid. This could be a bug of evtd.`),{}}function Ur(t,e,r){const n=po[t];let o=n.get(e);o===void 0&&n.set(e,o=new WeakMap);let i=o.get(r);return i===void 0&&o.set(r,i=bo(t,e,r)),i}function mo(t,e,r,n){if(t==="mousemoveoutside"||t==="clickoutside"){const o=Ur(t,e,r);return Object.keys(o).forEach(i=>{He(i,document,o[i],n)}),!0}return!1}function yo(t,e,r,n){if(t==="mousemoveoutside"||t==="clickoutside"){const o=Ur(t,e,r);return Object.keys(o).forEach(i=>{Oe(i,document,o[i],n)}),!0}return!1}function wo(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const t=new WeakMap,e=new WeakMap;function r(){t.set(this,!0)}function n(){t.set(this,!0),e.set(this,!0)}function o(b,p,C){const M=b[p];return b[p]=function(){return C.apply(b,arguments),M.apply(b,arguments)},b}function i(b,p){b[p]=Event.prototype[p]}const a=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function u(){var b;return(b=a.get(this))!==null&&b!==void 0?b:null}function c(b,p){s!==void 0&&Object.defineProperty(b,"currentTarget",{configurable:!0,enumerable:!0,get:p??s.get})}const d={bubble:{},capture:{}},h={};function w(){const b=function(p){const{type:C,eventPhase:M,bubbles:D}=p,H=Ct(p);if(M===2)return;const U=M===1?"capture":"bubble";let $=H;const j=[];for(;$===null&&($=window),j.push($),$!==window;)$=$.parentNode||null;const Q=d.capture[C],N=d.bubble[C];if(o(p,"stopPropagation",r),o(p,"stopImmediatePropagation",n),c(p,u),U==="capture"){if(Q===void 0)return;for(let K=j.length-1;K>=0&&!t.has(p);--K){const ie=j[K],ae=Q.get(ie);if(ae!==void 0){a.set(p,ie);for(const le of ae){if(e.has(p))break;le(p)}}if(K===0&&!D&&N!==void 0){const le=N.get(ie);if(le!==void 0)for(const fe of le){if(e.has(p))break;fe(p)}}}}else if(U==="bubble"){if(N===void 0)return;for(let K=0;KH(p))};return b.displayName="evtdUnifiedWindowEventHandler",b}const m=w(),x=T();function k(b,p){const C=d[b];return C[p]===void 0&&(C[p]=new Map,window.addEventListener(p,m,b==="capture")),C[p]}function y(b){return h[b]===void 0&&(h[b]=new Set,window.addEventListener(b,x)),h[b]}function _(b,p){let C=b.get(p);return C===void 0&&b.set(p,C=new Set),C}function R(b,p,C,M){const D=d[p][C];if(D!==void 0){const H=D.get(b);if(H!==void 0&&H.has(M))return!0}return!1}function F(b,p){const C=h[b];return!!(C!==void 0&&C.has(p))}function q(b,p,C,M){let D;if(typeof M=="object"&&M.once===!0?D=Q=>{W(b,p,D,M),C(Q)}:D=C,mo(b,p,D,M))return;const U=M===!0||typeof M=="object"&&M.capture===!0?"capture":"bubble",$=k(U,b),j=_($,p);if(j.has(D)||j.add(D),p===window){const Q=y(b);Q.has(D)||Q.add(D)}}function W(b,p,C,M){if(yo(b,p,C,M))return;const H=M===!0||typeof M=="object"&&M.capture===!0,U=H?"capture":"bubble",$=k(U,b),j=_($,p);if(p===window&&!R(p,H?"bubble":"capture",b,C)&&F(b,C)){const N=h[b];N.delete(C),N.size===0&&(window.removeEventListener(b,x),h[b]=void 0)}j.has(C)&&j.delete(C),j.size===0&&$.delete(p),$.size===0&&(window.removeEventListener(b,m,U==="capture"),d[U][b]=void 0)}return{on:q,off:W}}const{on:He,off:Oe}=wo();function xo(t,e){return Ze(t,r=>{r!==void 0&&(e.value=r)}),O(()=>t.value===void 0?e.value:t.value)}const Ro=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function So(){return Ro}function zo(t,e,r){var n;const o=je(t,null);if(o===null)return;const i=(n=nr())===null||n===void 0?void 0:n.proxy;Ze(r,a),a(r.value),or(()=>{a(void 0,r.value)});function a(c,d){if(!o)return;const h=o[e];d!==void 0&&s(h,d),c!==void 0&&u(h,c)}function s(c,d){c[d]||(c[d]=[]),c[d].splice(c[d].findIndex(h=>h===i),1)}function u(c,d){c[d]||(c[d]=[]),~c[d].findIndex(h=>h===i)||c[d].push(i)}}function Co(t){const e={isDeactivated:!1};let r=!1;return Nn(()=>{if(e.isDeactivated=!1,!r){r=!0;return}t()}),Xn(()=>{e.isDeactivated=!0,r||(r=!0)}),e}function gr(t,e){console.error(`[vueuc/${t}]: ${e}`)}var qe=[],Eo=function(){return qe.some(function(t){return t.activeTargets.length>0})},ko=function(){return qe.some(function(t){return t.skippedTargets.length>0})},pr="ResizeObserver loop completed with undelivered notifications.",Po=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:pr}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=pr),window.dispatchEvent(t)},ct;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ct||(ct={}));var De=function(t){return Object.freeze(t)},To=function(){function t(e,r){this.inlineSize=e,this.blockSize=r,De(this)}return t}(),Yr=function(){function t(e,r,n,o){return this.x=e,this.y=r,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,De(this)}return t.prototype.toJSON=function(){var e=this,r=e.x,n=e.y,o=e.top,i=e.right,a=e.bottom,s=e.left,u=e.width,c=e.height;return{x:r,y:n,top:o,right:i,bottom:a,left:s,width:u,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),lr=function(t){return t instanceof SVGElement&&"getBBox"in t},Kr=function(t){if(lr(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var o=t,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||t.getClientRects().length)},br=function(t){var e;if(t instanceof Element)return!0;var r=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},$o=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},st=typeof window<"u"?window:{},wt=new WeakMap,mr=/auto|scroll/,Bo=/^tb|vertical/,Oo=/msie|trident/i.test(st.navigator&&st.navigator.userAgent),Se=function(t){return parseFloat(t||"0")},Ge=function(t,e,r){return t===void 0&&(t=0),e===void 0&&(e=0),r===void 0&&(r=!1),new To((r?e:t)||0,(r?t:e)||0)},yr=De({devicePixelContentBoxSize:Ge(),borderBoxSize:Ge(),contentBoxSize:Ge(),contentRect:new Yr(0,0,0,0)}),Gr=function(t,e){if(e===void 0&&(e=!1),wt.has(t)&&!e)return wt.get(t);if(Kr(t))return wt.set(t,yr),yr;var r=getComputedStyle(t),n=lr(t)&&t.ownerSVGElement&&t.getBBox(),o=!Oo&&r.boxSizing==="border-box",i=Bo.test(r.writingMode||""),a=!n&&mr.test(r.overflowY||""),s=!n&&mr.test(r.overflowX||""),u=n?0:Se(r.paddingTop),c=n?0:Se(r.paddingRight),d=n?0:Se(r.paddingBottom),h=n?0:Se(r.paddingLeft),w=n?0:Se(r.borderTopWidth),T=n?0:Se(r.borderRightWidth),m=n?0:Se(r.borderBottomWidth),x=n?0:Se(r.borderLeftWidth),k=h+c,y=u+d,_=x+T,R=w+m,F=s?t.offsetHeight-R-t.clientHeight:0,q=a?t.offsetWidth-_-t.clientWidth:0,W=o?k+_:0,b=o?y+R:0,p=n?n.width:Se(r.width)-W-q,C=n?n.height:Se(r.height)-b-F,M=p+k+q+_,D=C+y+F+R,H=De({devicePixelContentBoxSize:Ge(Math.round(p*devicePixelRatio),Math.round(C*devicePixelRatio),i),borderBoxSize:Ge(M,D,i),contentBoxSize:Ge(p,C,i),contentRect:new Yr(h,u,p,C)});return wt.set(t,H),H},Zr=function(t,e,r){var n=Gr(t,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(e){case ct.DEVICE_PIXEL_CONTENT_BOX:return a;case ct.BORDER_BOX:return o;default:return i}},_o=function(){function t(e){var r=Gr(e);this.target=e,this.contentRect=r.contentRect,this.borderBoxSize=De([r.borderBoxSize]),this.contentBoxSize=De([r.contentBoxSize]),this.devicePixelContentBoxSize=De([r.devicePixelContentBoxSize])}return t}(),Jr=function(t){if(Kr(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},Fo=function(){var t=1/0,e=[];qe.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(c){var d=new _o(c.target),h=Jr(c.target);s.push(d),c.lastReportedSize=Zr(c.target,c.observedBox),ht?r.activeTargets.push(o):r.skippedTargets.push(o))})})},Mo=function(){var t=0;for(wr(t);Eo();)t=Fo(),wr(t);return ko()&&Po(),t>0},Dt,Qr=[],Ao=function(){return Qr.splice(0).forEach(function(t){return t()})},Io=function(t){if(!Dt){var e=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Ao()}).observe(r,n),Dt=function(){r.textContent="".concat(e?e--:e++)}}Qr.push(t),Dt()},Lo=function(t){Io(function(){requestAnimationFrame(t)})},Et=0,Wo=function(){return!!Et},Ho=250,Vo={attributes:!0,characterData:!0,childList:!0,subtree:!0},xr=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Rr=function(t){return t===void 0&&(t=0),Date.now()+t},jt=!1,qo=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var r=this;if(e===void 0&&(e=Ho),!jt){jt=!0;var n=Rr(e);Lo(function(){var o=!1;try{o=Mo()}finally{if(jt=!1,e=n-Rr(),!Wo())return;o?r.run(1e3):e>0?r.run(e):r.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,r=function(){return e.observer&&e.observer.observe(document.body,Vo)};document.body?r():st.addEventListener("DOMContentLoaded",r)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),xr.forEach(function(r){return st.addEventListener(r,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),xr.forEach(function(r){return st.removeEventListener(r,e.listener,!0)}),this.stopped=!0)},t}(),Kt=new qo,Sr=function(t){!Et&&t>0&&Kt.start(),Et+=t,!Et&&Kt.stop()},Do=function(t){return!lr(t)&&!$o(t)&&getComputedStyle(t).display==="inline"},jo=function(){function t(e,r){this.target=e,this.observedBox=r||ct.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Zr(this.target,this.observedBox,!0);return Do(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),No=function(){function t(e,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=r}return t}(),xt=new WeakMap,zr=function(t,e){for(var r=0;r=0&&(i&&qe.splice(qe.indexOf(n),1),n.observationTargets.splice(o,1),Sr(-1))},t.disconnect=function(e){var r=this,n=xt.get(e);n.observationTargets.slice().forEach(function(o){return r.unobserve(e,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},t}(),Xo=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Rt.connect(this,e)}return t.prototype.observe=function(e,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!br(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Rt.observe(this,e,r)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!br(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Rt.unobserve(this,e)},t.prototype.disconnect=function(){Rt.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();class Uo{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||Xo)(this.handleResize),this.elHandlersMap=new Map}handleResize(e){for(const r of e){const n=this.elHandlersMap.get(r.target);n!==void 0&&n(r)}}registerHandler(e,r){this.elHandlersMap.set(e,r),this.observer.observe(e)}unregisterHandler(e){this.elHandlersMap.has(e)&&(this.elHandlersMap.delete(e),this.observer.unobserve(e))}}const Cr=new Uo,Gt=me({name:"ResizeObserver",props:{onResize:Function},setup(t){let e=!1;const r=nr().proxy;function n(o){const{onResize:i}=t;i!==void 0&&i(o)}$t(()=>{const o=r.$el;if(o===void 0){gr("resize-observer","$el does not exist.");return}if(o.nextElementSibling!==o.nextSibling&&o.nodeType===3&&o.nodeValue!==""){gr("resize-observer","$el can not be observed (it may be a text node).");return}o.nextElementSibling!==null&&(Cr.registerHandler(o.nextElementSibling,n),e=!0)}),or(()=>{e&&Cr.unregisterHandler(r.$el.nextElementSibling)})},render(){return Un(this.$slots,"default")}}),Yo=/^(\d|\.)+$/,Er=/(\d|\.)+/;function Nt(t,{c:e=1,offset:r=0,attachPx:n=!0}={}){if(typeof t=="number"){const o=(t+r)*e;return o===0?"0":`${o}px`}else if(typeof t=="string")if(Yo.test(t)){const o=(Number(t)+r)*e;return n?o===0?"0":`${o}px`:`${o}`}else{const o=Er.exec(t);return o?t.replace(Er,String((Number(o[0])+r)*e)):t}return t}function kr(t){const{left:e,right:r,top:n,bottom:o}=Le(t);return`${n} ${e} ${o} ${r}`}function Pr(t){return Object.keys(t)}const Tr=me({render(){var t,e;return(e=(t=this.$slots).default)===null||e===void 0?void 0:e.call(t)}});var Ko=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Go=/^\w*$/;function Zo(t,e){if(Hr(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Vr(t)?!0:Go.test(t)||!Ko.test(t)||e!=null&&t in Object(e)}var Jo="Expected a function";function sr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Jo);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(sr.Cache||qr),r}sr.Cache=qr;var Qo=500;function ei(t){var e=sr(t,function(n){return r.size===Qo&&r.clear(),n}),r=e.cache;return e}var ti=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ri=/\\(\\)?/g,ni=ei(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ti,function(r,n,o,i){e.push(o?i.replace(ri,"$1"):n||r)}),e});function oi(t,e){return Hr(t)?t:Zo(t,e)?[t]:ni(Yn(t))}function ii(t){if(typeof t=="string"||Vr(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ai(t,e){e=oi(e,t);for(var r=0,n=e.length;t!=null&&r{var i,a;return(a=(i=e==null?void 0:e.value)===null||i===void 0?void 0:i[t])!==null&&a!==void 0?a:Gn[t]});return{dateLocaleRef:O(()=>{var i;return(i=r==null?void 0:r.value)!==null&&i!==void 0?i:Zn}),localeRef:n}}const si=me({name:"ChevronDown",render(){return v("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}}),di=Jn("clear",()=>v("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},v("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},v("g",{fill:"currentColor","fill-rule":"nonzero"},v("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),ci=me({name:"Eye",render(){return v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},v("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),v("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),ui=me({name:"EyeOff",render(){return v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},v("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),v("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),v("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),v("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),v("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),fi=I("base-clear",` +import{c5 as Ze,$ as O,aH as je,aw as nr,bd as or,bb as Nn,be as Xn,ai as me,bv as Un,bf as $t,az as Le,aO as Hr,b0 as Vr,b as qr,bQ as Yn,a0 as Kn,ap as Gn,ag as Zn,aC as v,bx as Jn,w as I,v as P,y as z,aE as Qn,g as eo,by as lt,b_ as Dr,bO as We,c as Pt,P as jr,z as A,F as Nr,bT as ft,bY as ir,bs as L,b$ as ze,bE as to,aj as cr,c6 as Ut,c0 as Bt,l as Yt,b4 as ro,d as no,a7 as ar,A as it,bz as oo,bA as we,aZ as io,bU as ao,bW as ur,bn as Tt,a8 as ge,aI as lo,b7 as fr,D as de,r as so,aJ as co,aK as uo,G as fo,aq as Ye,N as ho,au as Xr,a6 as hr,at as vo,c4 as vr}from"./mobile-guard-BvFpjCXb.js";function go(t){return t.composedPath()[0]||null}function Ct(t){return t.composedPath()[0]}const po={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function bo(t,e,r){if(t==="mousemoveoutside"){const n=o=>{e.contains(Ct(o))||r(o)};return{mousemove:n,touchstart:n}}else if(t==="clickoutside"){let n=!1;const o=a=>{n=!e.contains(Ct(a))},i=a=>{n&&(e.contains(Ct(a))||r(a))};return{mousedown:o,mouseup:i,touchstart:o,touchend:i}}return console.error(`[evtd/create-trap-handler]: name \`${t}\` is invalid. This could be a bug of evtd.`),{}}function Ur(t,e,r){const n=po[t];let o=n.get(e);o===void 0&&n.set(e,o=new WeakMap);let i=o.get(r);return i===void 0&&o.set(r,i=bo(t,e,r)),i}function mo(t,e,r,n){if(t==="mousemoveoutside"||t==="clickoutside"){const o=Ur(t,e,r);return Object.keys(o).forEach(i=>{He(i,document,o[i],n)}),!0}return!1}function yo(t,e,r,n){if(t==="mousemoveoutside"||t==="clickoutside"){const o=Ur(t,e,r);return Object.keys(o).forEach(i=>{Oe(i,document,o[i],n)}),!0}return!1}function wo(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const t=new WeakMap,e=new WeakMap;function r(){t.set(this,!0)}function n(){t.set(this,!0),e.set(this,!0)}function o(b,p,C){const M=b[p];return b[p]=function(){return C.apply(b,arguments),M.apply(b,arguments)},b}function i(b,p){b[p]=Event.prototype[p]}const a=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function u(){var b;return(b=a.get(this))!==null&&b!==void 0?b:null}function c(b,p){s!==void 0&&Object.defineProperty(b,"currentTarget",{configurable:!0,enumerable:!0,get:p??s.get})}const d={bubble:{},capture:{}},h={};function w(){const b=function(p){const{type:C,eventPhase:M,bubbles:D}=p,H=Ct(p);if(M===2)return;const U=M===1?"capture":"bubble";let $=H;const j=[];for(;$===null&&($=window),j.push($),$!==window;)$=$.parentNode||null;const Q=d.capture[C],N=d.bubble[C];if(o(p,"stopPropagation",r),o(p,"stopImmediatePropagation",n),c(p,u),U==="capture"){if(Q===void 0)return;for(let K=j.length-1;K>=0&&!t.has(p);--K){const ie=j[K],ae=Q.get(ie);if(ae!==void 0){a.set(p,ie);for(const le of ae){if(e.has(p))break;le(p)}}if(K===0&&!D&&N!==void 0){const le=N.get(ie);if(le!==void 0)for(const fe of le){if(e.has(p))break;fe(p)}}}}else if(U==="bubble"){if(N===void 0)return;for(let K=0;KH(p))};return b.displayName="evtdUnifiedWindowEventHandler",b}const m=w(),x=T();function k(b,p){const C=d[b];return C[p]===void 0&&(C[p]=new Map,window.addEventListener(p,m,b==="capture")),C[p]}function y(b){return h[b]===void 0&&(h[b]=new Set,window.addEventListener(b,x)),h[b]}function _(b,p){let C=b.get(p);return C===void 0&&b.set(p,C=new Set),C}function R(b,p,C,M){const D=d[p][C];if(D!==void 0){const H=D.get(b);if(H!==void 0&&H.has(M))return!0}return!1}function F(b,p){const C=h[b];return!!(C!==void 0&&C.has(p))}function q(b,p,C,M){let D;if(typeof M=="object"&&M.once===!0?D=Q=>{W(b,p,D,M),C(Q)}:D=C,mo(b,p,D,M))return;const U=M===!0||typeof M=="object"&&M.capture===!0?"capture":"bubble",$=k(U,b),j=_($,p);if(j.has(D)||j.add(D),p===window){const Q=y(b);Q.has(D)||Q.add(D)}}function W(b,p,C,M){if(yo(b,p,C,M))return;const H=M===!0||typeof M=="object"&&M.capture===!0,U=H?"capture":"bubble",$=k(U,b),j=_($,p);if(p===window&&!R(p,H?"bubble":"capture",b,C)&&F(b,C)){const N=h[b];N.delete(C),N.size===0&&(window.removeEventListener(b,x),h[b]=void 0)}j.has(C)&&j.delete(C),j.size===0&&$.delete(p),$.size===0&&(window.removeEventListener(b,m,U==="capture"),d[U][b]=void 0)}return{on:q,off:W}}const{on:He,off:Oe}=wo();function xo(t,e){return Ze(t,r=>{r!==void 0&&(e.value=r)}),O(()=>t.value===void 0?e.value:t.value)}const Ro=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function So(){return Ro}function zo(t,e,r){var n;const o=je(t,null);if(o===null)return;const i=(n=nr())===null||n===void 0?void 0:n.proxy;Ze(r,a),a(r.value),or(()=>{a(void 0,r.value)});function a(c,d){if(!o)return;const h=o[e];d!==void 0&&s(h,d),c!==void 0&&u(h,c)}function s(c,d){c[d]||(c[d]=[]),c[d].splice(c[d].findIndex(h=>h===i),1)}function u(c,d){c[d]||(c[d]=[]),~c[d].findIndex(h=>h===i)||c[d].push(i)}}function Co(t){const e={isDeactivated:!1};let r=!1;return Nn(()=>{if(e.isDeactivated=!1,!r){r=!0;return}t()}),Xn(()=>{e.isDeactivated=!0,r||(r=!0)}),e}function gr(t,e){console.error(`[vueuc/${t}]: ${e}`)}var qe=[],Eo=function(){return qe.some(function(t){return t.activeTargets.length>0})},ko=function(){return qe.some(function(t){return t.skippedTargets.length>0})},pr="ResizeObserver loop completed with undelivered notifications.",Po=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:pr}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=pr),window.dispatchEvent(t)},ct;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ct||(ct={}));var De=function(t){return Object.freeze(t)},To=function(){function t(e,r){this.inlineSize=e,this.blockSize=r,De(this)}return t}(),Yr=function(){function t(e,r,n,o){return this.x=e,this.y=r,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,De(this)}return t.prototype.toJSON=function(){var e=this,r=e.x,n=e.y,o=e.top,i=e.right,a=e.bottom,s=e.left,u=e.width,c=e.height;return{x:r,y:n,top:o,right:i,bottom:a,left:s,width:u,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),lr=function(t){return t instanceof SVGElement&&"getBBox"in t},Kr=function(t){if(lr(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var o=t,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||t.getClientRects().length)},br=function(t){var e;if(t instanceof Element)return!0;var r=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},$o=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},st=typeof window<"u"?window:{},wt=new WeakMap,mr=/auto|scroll/,Bo=/^tb|vertical/,Oo=/msie|trident/i.test(st.navigator&&st.navigator.userAgent),Se=function(t){return parseFloat(t||"0")},Ge=function(t,e,r){return t===void 0&&(t=0),e===void 0&&(e=0),r===void 0&&(r=!1),new To((r?e:t)||0,(r?t:e)||0)},yr=De({devicePixelContentBoxSize:Ge(),borderBoxSize:Ge(),contentBoxSize:Ge(),contentRect:new Yr(0,0,0,0)}),Gr=function(t,e){if(e===void 0&&(e=!1),wt.has(t)&&!e)return wt.get(t);if(Kr(t))return wt.set(t,yr),yr;var r=getComputedStyle(t),n=lr(t)&&t.ownerSVGElement&&t.getBBox(),o=!Oo&&r.boxSizing==="border-box",i=Bo.test(r.writingMode||""),a=!n&&mr.test(r.overflowY||""),s=!n&&mr.test(r.overflowX||""),u=n?0:Se(r.paddingTop),c=n?0:Se(r.paddingRight),d=n?0:Se(r.paddingBottom),h=n?0:Se(r.paddingLeft),w=n?0:Se(r.borderTopWidth),T=n?0:Se(r.borderRightWidth),m=n?0:Se(r.borderBottomWidth),x=n?0:Se(r.borderLeftWidth),k=h+c,y=u+d,_=x+T,R=w+m,F=s?t.offsetHeight-R-t.clientHeight:0,q=a?t.offsetWidth-_-t.clientWidth:0,W=o?k+_:0,b=o?y+R:0,p=n?n.width:Se(r.width)-W-q,C=n?n.height:Se(r.height)-b-F,M=p+k+q+_,D=C+y+F+R,H=De({devicePixelContentBoxSize:Ge(Math.round(p*devicePixelRatio),Math.round(C*devicePixelRatio),i),borderBoxSize:Ge(M,D,i),contentBoxSize:Ge(p,C,i),contentRect:new Yr(h,u,p,C)});return wt.set(t,H),H},Zr=function(t,e,r){var n=Gr(t,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(e){case ct.DEVICE_PIXEL_CONTENT_BOX:return a;case ct.BORDER_BOX:return o;default:return i}},_o=function(){function t(e){var r=Gr(e);this.target=e,this.contentRect=r.contentRect,this.borderBoxSize=De([r.borderBoxSize]),this.contentBoxSize=De([r.contentBoxSize]),this.devicePixelContentBoxSize=De([r.devicePixelContentBoxSize])}return t}(),Jr=function(t){if(Kr(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},Fo=function(){var t=1/0,e=[];qe.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(c){var d=new _o(c.target),h=Jr(c.target);s.push(d),c.lastReportedSize=Zr(c.target,c.observedBox),ht?r.activeTargets.push(o):r.skippedTargets.push(o))})})},Mo=function(){var t=0;for(wr(t);Eo();)t=Fo(),wr(t);return ko()&&Po(),t>0},Dt,Qr=[],Ao=function(){return Qr.splice(0).forEach(function(t){return t()})},Io=function(t){if(!Dt){var e=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Ao()}).observe(r,n),Dt=function(){r.textContent="".concat(e?e--:e++)}}Qr.push(t),Dt()},Lo=function(t){Io(function(){requestAnimationFrame(t)})},Et=0,Wo=function(){return!!Et},Ho=250,Vo={attributes:!0,characterData:!0,childList:!0,subtree:!0},xr=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Rr=function(t){return t===void 0&&(t=0),Date.now()+t},jt=!1,qo=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var r=this;if(e===void 0&&(e=Ho),!jt){jt=!0;var n=Rr(e);Lo(function(){var o=!1;try{o=Mo()}finally{if(jt=!1,e=n-Rr(),!Wo())return;o?r.run(1e3):e>0?r.run(e):r.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,r=function(){return e.observer&&e.observer.observe(document.body,Vo)};document.body?r():st.addEventListener("DOMContentLoaded",r)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),xr.forEach(function(r){return st.addEventListener(r,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),xr.forEach(function(r){return st.removeEventListener(r,e.listener,!0)}),this.stopped=!0)},t}(),Kt=new qo,Sr=function(t){!Et&&t>0&&Kt.start(),Et+=t,!Et&&Kt.stop()},Do=function(t){return!lr(t)&&!$o(t)&&getComputedStyle(t).display==="inline"},jo=function(){function t(e,r){this.target=e,this.observedBox=r||ct.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Zr(this.target,this.observedBox,!0);return Do(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),No=function(){function t(e,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=r}return t}(),xt=new WeakMap,zr=function(t,e){for(var r=0;r=0&&(i&&qe.splice(qe.indexOf(n),1),n.observationTargets.splice(o,1),Sr(-1))},t.disconnect=function(e){var r=this,n=xt.get(e);n.observationTargets.slice().forEach(function(o){return r.unobserve(e,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},t}(),Xo=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Rt.connect(this,e)}return t.prototype.observe=function(e,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!br(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Rt.observe(this,e,r)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!br(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Rt.unobserve(this,e)},t.prototype.disconnect=function(){Rt.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();class Uo{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||Xo)(this.handleResize),this.elHandlersMap=new Map}handleResize(e){for(const r of e){const n=this.elHandlersMap.get(r.target);n!==void 0&&n(r)}}registerHandler(e,r){this.elHandlersMap.set(e,r),this.observer.observe(e)}unregisterHandler(e){this.elHandlersMap.has(e)&&(this.elHandlersMap.delete(e),this.observer.unobserve(e))}}const Cr=new Uo,Gt=me({name:"ResizeObserver",props:{onResize:Function},setup(t){let e=!1;const r=nr().proxy;function n(o){const{onResize:i}=t;i!==void 0&&i(o)}$t(()=>{const o=r.$el;if(o===void 0){gr("resize-observer","$el does not exist.");return}if(o.nextElementSibling!==o.nextSibling&&o.nodeType===3&&o.nodeValue!==""){gr("resize-observer","$el can not be observed (it may be a text node).");return}o.nextElementSibling!==null&&(Cr.registerHandler(o.nextElementSibling,n),e=!0)}),or(()=>{e&&Cr.unregisterHandler(r.$el.nextElementSibling)})},render(){return Un(this.$slots,"default")}}),Yo=/^(\d|\.)+$/,Er=/(\d|\.)+/;function Nt(t,{c:e=1,offset:r=0,attachPx:n=!0}={}){if(typeof t=="number"){const o=(t+r)*e;return o===0?"0":`${o}px`}else if(typeof t=="string")if(Yo.test(t)){const o=(Number(t)+r)*e;return n?o===0?"0":`${o}px`:`${o}`}else{const o=Er.exec(t);return o?t.replace(Er,String((Number(o[0])+r)*e)):t}return t}function kr(t){const{left:e,right:r,top:n,bottom:o}=Le(t);return`${n} ${e} ${o} ${r}`}function Pr(t){return Object.keys(t)}const Tr=me({render(){var t,e;return(e=(t=this.$slots).default)===null||e===void 0?void 0:e.call(t)}});var Ko=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Go=/^\w*$/;function Zo(t,e){if(Hr(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Vr(t)?!0:Go.test(t)||!Ko.test(t)||e!=null&&t in Object(e)}var Jo="Expected a function";function sr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Jo);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(sr.Cache||qr),r}sr.Cache=qr;var Qo=500;function ei(t){var e=sr(t,function(n){return r.size===Qo&&r.clear(),n}),r=e.cache;return e}var ti=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ri=/\\(\\)?/g,ni=ei(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ti,function(r,n,o,i){e.push(o?i.replace(ri,"$1"):n||r)}),e});function oi(t,e){return Hr(t)?t:Zo(t,e)?[t]:ni(Yn(t))}function ii(t){if(typeof t=="string"||Vr(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ai(t,e){e=oi(e,t);for(var r=0,n=e.length;t!=null&&r{var i,a;return(a=(i=e==null?void 0:e.value)===null||i===void 0?void 0:i[t])!==null&&a!==void 0?a:Gn[t]});return{dateLocaleRef:O(()=>{var i;return(i=r==null?void 0:r.value)!==null&&i!==void 0?i:Zn}),localeRef:n}}const si=me({name:"ChevronDown",render(){return v("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}}),di=Jn("clear",()=>v("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},v("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},v("g",{fill:"currentColor","fill-rule":"nonzero"},v("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),ci=me({name:"Eye",render(){return v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},v("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),v("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),ui=me({name:"EyeOff",render(){return v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},v("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),v("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),v("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),v("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),v("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),fi=I("base-clear",` flex-shrink: 0; height: 1em; width: 1em; diff --git a/internal/relay/web-dist/assets/LanguageSelect-DQdfalDe.js b/internal/relay/web-dist/assets/LanguageSelect-CXI-71aS.js similarity index 89% rename from internal/relay/web-dist/assets/LanguageSelect-DQdfalDe.js rename to internal/relay/web-dist/assets/LanguageSelect-CXI-71aS.js index 32a8ca05..142a005b 100644 --- a/internal/relay/web-dist/assets/LanguageSelect-DQdfalDe.js +++ b/internal/relay/web-dist/assets/LanguageSelect-CXI-71aS.js @@ -1 +1 @@ -import{ai as i,bh as a,a5 as t,a2 as l,bN as c,bS as n,F as d,bu as p,bV as m,n as b}from"./mobile-guard-CHHXRZ12.js";const f={class:"language-select"},v=["value"],h=["value"],L=i({__name:"LanguageSelect",setup(S){const{t:o,languageOptions:r,localePreference:u,setLocalePreference:_}=m();async function g(s){await _(s.target.value)}return(s,k)=>(a(),t("label",f,[l("span",null,c(n(o)("common.language")),1),l("select",{"data-testid":"language-select",value:n(u),onChange:g},[(a(!0),t(d,null,p(n(r),e=>(a(),t("option",{key:e.value,value:e.value},c(e.label),9,h))),128))],40,v)]))}}),y=b(L,[["__scopeId","data-v-abd76a8e"]]);export{y as L}; +import{ai as i,bh as a,a5 as t,a2 as l,bN as c,bS as n,F as d,bu as p,bV as m,n as b}from"./mobile-guard-BvFpjCXb.js";const f={class:"language-select"},v=["value"],h=["value"],L=i({__name:"LanguageSelect",setup(S){const{t:o,languageOptions:r,localePreference:u,setLocalePreference:_}=m();async function g(s){await _(s.target.value)}return(s,k)=>(a(),t("label",f,[l("span",null,c(n(o)("common.language")),1),l("select",{"data-testid":"language-select",value:n(u),onChange:g},[(a(!0),t(d,null,p(n(r),e=>(a(),t("option",{key:e.value,value:e.value},c(e.label),9,h))),128))],40,v)]))}}),y=b(L,[["__scopeId","data-v-abd76a8e"]]);export{y as L}; diff --git a/internal/relay/web-dist/assets/Switch-_UDIVDNp.js b/internal/relay/web-dist/assets/Switch-CX4ypJCN.js similarity index 98% rename from internal/relay/web-dist/assets/Switch-_UDIVDNp.js rename to internal/relay/web-dist/assets/Switch-CX4ypJCN.js index beed4d48..3ba1c0f8 100644 --- a/internal/relay/web-dist/assets/Switch-_UDIVDNp.js +++ b/internal/relay/web-dist/assets/Switch-CX4ypJCN.js @@ -1,4 +1,4 @@ -import{aa as fe,F as be,C as te,R as ge,aQ as pe,ai as ae,aC as s,bT as ne,b$ as O,bY as me,$ as T,a8 as C,ay as ve,aj as b,ak as we,V as ye,H as xe,w as Z,y as a,aE as N,v as K,z as v,A as ee,a$ as L,bA as B,g as Se,d as ke,bU as Ce,bs as Y,bO as $e,bo as X,c0 as Be,D as J}from"./mobile-guard-CHHXRZ12.js";import{m as Re}from"./FormItem-KX1KLzyv.js";function q(e,n=!0,o=[]){return e.forEach(t=>{if(t!==null){if(typeof t!="object"){(typeof t=="string"||typeof t=="number")&&o.push(fe(String(t)));return}if(Array.isArray(t)){q(t,n,o);return}if(t.type===be){if(t.children===null)return;Array.isArray(t.children)&&q(t.children,n,o)}else{if(t.type===te&&n)return;o.push(t)}}}),o}function ze(e,n="default",o=[]){const r=e.$slots[n];return r===void 0?o:r()}function Ve(){return ge}const Fe={self:Ve};let Q;function _e(){if(!pe)return!0;if(Q===void 0){const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e);const n=e.scrollHeight===1;return document.body.removeChild(e),Q=n}return Q}const je=Object.assign(Object.assign({},O.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}}),Pe=ae({name:"Space",props:je,setup(e){const{mergedClsPrefixRef:n,mergedRtlRef:o}=ne(e),t=O("Space","-space",void 0,Fe,e,n),r=me("Space",o,n);return{useGap:_e(),rtlEnabled:r,mergedClsPrefix:n,margin:T(()=>{const{size:c}=e;if(Array.isArray(c))return{horizontal:c[0],vertical:c[1]};if(typeof c=="number")return{horizontal:c,vertical:c};const{self:{[C("gap",c)]:f}}=t.value,{row:d,col:w}=ve(f);return{horizontal:b(w),vertical:b(d)}})}},render(){const{vertical:e,reverse:n,align:o,inline:t,justify:r,itemClass:c,itemStyle:f,margin:d,wrap:w,mergedClsPrefix:g,rtlEnabled:y,useGap:h,wrapItem:l,internalUseGap:p}=this,u=q(ze(this),!1);if(!u.length)return null;const A=`${d.horizontal}px`,R=`${d.horizontal/2}px`,P=`${d.vertical}px`,x=`${d.vertical/2}px`,$=u.length-1,z=r.startsWith("space-");return s("div",{role:"none",class:[`${g}-space`,y&&`${g}-space--rtl`],style:{display:t?"inline-flex":"flex",flexDirection:e&&!n?"column":e&&n?"column-reverse":!e&&n?"row-reverse":"row",justifyContent:["start","end"].includes(r)?`flex-${r}`:r,flexWrap:!w||e?"nowrap":"wrap",marginTop:h||e?"":`-${x}`,marginBottom:h||e?"":`-${x}`,alignItems:o,gap:h?`${d.vertical}px ${d.horizontal}px`:""}},!l&&(h||p)?u:u.map((F,m)=>F.type===te?F:s("div",{role:"none",class:c,style:[f,{maxWidth:"100%"},h?"":e?{marginBottom:m!==$?P:""}:y?{marginLeft:z?r==="space-between"&&m===$?"":R:m!==$?A:"",marginRight:z?r==="space-between"&&m===0?"":R:"",paddingTop:x,paddingBottom:x}:{marginRight:z?r==="space-between"&&m===$?"":R:m!==$?A:"",marginLeft:z?r==="space-between"&&m===0?"":R:"",paddingTop:x,paddingBottom:x}]},F)))}});function Te(e){const{primaryColor:n,opacityDisabled:o,borderRadius:t,textColor3:r}=e;return Object.assign(Object.assign({},ye),{iconColor:r,textColor:"white",loadingColor:n,opacityDisabled:o,railColor:"rgba(0, 0, 0, .14)",railColorActive:n,buttonBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",buttonColor:"#FFF",railBorderRadiusSmall:t,railBorderRadiusMedium:t,railBorderRadiusLarge:t,buttonBorderRadiusSmall:t,buttonBorderRadiusMedium:t,buttonBorderRadiusLarge:t,boxShadowFocus:`0 0 0 2px ${xe(n,{alpha:.2})}`})}const Ae={common:we,self:Te},De=Z("switch",` +import{aa as fe,F as be,C as te,R as ge,aQ as pe,ai as ae,aC as s,bT as ne,b$ as O,bY as me,$ as T,a8 as C,ay as ve,aj as b,ak as we,V as ye,H as xe,w as Z,y as a,aE as N,v as K,z as v,A as ee,a$ as L,bA as B,g as Se,d as ke,bU as Ce,bs as Y,bO as $e,bo as X,c0 as Be,D as J}from"./mobile-guard-BvFpjCXb.js";import{m as Re}from"./FormItem-Biv8w1Bg.js";function q(e,n=!0,o=[]){return e.forEach(t=>{if(t!==null){if(typeof t!="object"){(typeof t=="string"||typeof t=="number")&&o.push(fe(String(t)));return}if(Array.isArray(t)){q(t,n,o);return}if(t.type===be){if(t.children===null)return;Array.isArray(t.children)&&q(t.children,n,o)}else{if(t.type===te&&n)return;o.push(t)}}}),o}function ze(e,n="default",o=[]){const r=e.$slots[n];return r===void 0?o:r()}function Ve(){return ge}const Fe={self:Ve};let Q;function _e(){if(!pe)return!0;if(Q===void 0){const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e);const n=e.scrollHeight===1;return document.body.removeChild(e),Q=n}return Q}const je=Object.assign(Object.assign({},O.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}}),Pe=ae({name:"Space",props:je,setup(e){const{mergedClsPrefixRef:n,mergedRtlRef:o}=ne(e),t=O("Space","-space",void 0,Fe,e,n),r=me("Space",o,n);return{useGap:_e(),rtlEnabled:r,mergedClsPrefix:n,margin:T(()=>{const{size:c}=e;if(Array.isArray(c))return{horizontal:c[0],vertical:c[1]};if(typeof c=="number")return{horizontal:c,vertical:c};const{self:{[C("gap",c)]:f}}=t.value,{row:d,col:w}=ve(f);return{horizontal:b(w),vertical:b(d)}})}},render(){const{vertical:e,reverse:n,align:o,inline:t,justify:r,itemClass:c,itemStyle:f,margin:d,wrap:w,mergedClsPrefix:g,rtlEnabled:y,useGap:h,wrapItem:l,internalUseGap:p}=this,u=q(ze(this),!1);if(!u.length)return null;const A=`${d.horizontal}px`,R=`${d.horizontal/2}px`,P=`${d.vertical}px`,x=`${d.vertical/2}px`,$=u.length-1,z=r.startsWith("space-");return s("div",{role:"none",class:[`${g}-space`,y&&`${g}-space--rtl`],style:{display:t?"inline-flex":"flex",flexDirection:e&&!n?"column":e&&n?"column-reverse":!e&&n?"row-reverse":"row",justifyContent:["start","end"].includes(r)?`flex-${r}`:r,flexWrap:!w||e?"nowrap":"wrap",marginTop:h||e?"":`-${x}`,marginBottom:h||e?"":`-${x}`,alignItems:o,gap:h?`${d.vertical}px ${d.horizontal}px`:""}},!l&&(h||p)?u:u.map((F,m)=>F.type===te?F:s("div",{role:"none",class:c,style:[f,{maxWidth:"100%"},h?"":e?{marginBottom:m!==$?P:""}:y?{marginLeft:z?r==="space-between"&&m===$?"":R:m!==$?A:"",marginRight:z?r==="space-between"&&m===0?"":R:"",paddingTop:x,paddingBottom:x}:{marginRight:z?r==="space-between"&&m===$?"":R:m!==$?A:"",marginLeft:z?r==="space-between"&&m===0?"":R:"",paddingTop:x,paddingBottom:x}]},F)))}});function Te(e){const{primaryColor:n,opacityDisabled:o,borderRadius:t,textColor3:r}=e;return Object.assign(Object.assign({},ye),{iconColor:r,textColor:"white",loadingColor:n,opacityDisabled:o,railColor:"rgba(0, 0, 0, .14)",railColorActive:n,buttonBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",buttonColor:"#FFF",railBorderRadiusSmall:t,railBorderRadiusMedium:t,railBorderRadiusLarge:t,buttonBorderRadiusSmall:t,buttonBorderRadiusMedium:t,buttonBorderRadiusLarge:t,boxShadowFocus:`0 0 0 2px ${xe(n,{alpha:.2})}`})}const Ae={common:we,self:Te},De=Z("switch",` height: var(--n-height); min-width: var(--n-width); vertical-align: middle; diff --git a/internal/relay/web-dist/assets/Tabs-BHw_WMcN.js b/internal/relay/web-dist/assets/Tabs-BsN_G19n.js similarity index 99% rename from internal/relay/web-dist/assets/Tabs-BHw_WMcN.js rename to internal/relay/web-dist/assets/Tabs-BsN_G19n.js index 7e293c00..749c7af8 100644 --- a/internal/relay/web-dist/assets/Tabs-BHw_WMcN.js +++ b/internal/relay/web-dist/assets/Tabs-BsN_G19n.js @@ -1,4 +1,4 @@ -import{bs as O,br as At,c5 as ne,aw as dn,bf as Oe,bd as Te,$ as X,a7 as ce,aH as G,bW as _e,aa as $r,F as Ue,C as Cr,ai as U,bn as ue,c8 as Be,a as Tr,aC as y,T as Pr,bO as j,bZ as un,b7 as De,aV as cn,a6 as zr,c4 as Et,b0 as Ar,aW as Me,aB as Ve,bC as Ie,bi as Er,aY as _r,aP as mt,p as Mr,aO as $e,t as fn,bP as Pe,M as lt,b as Or,j as _t,ar as Br,U as Mt,aR as Ot,S as je,b1 as Ir,aX as Bt,aT as Lr,aS as Fr,aN as kr,aF as Wr,s as Dr,q as jr,v as M,w as h,A as Ne,y as F,z as P,x as Nr,l as Rr,bT as Ke,b$ as fe,bl as Hr,c6 as yt,c2 as pn,c0 as xt,a$ as It,b4 as hn,bA as we,L as bn,k as Xr,D as re,b5 as Ur,bK as vn,by as Lt,B as Ft,c as gn,W as Vr,ba as mn,bk as Kr,bt as Yr,N as Zr,bI as Gr,a8 as te,az as Fe,aj as qr,m as Jr}from"./mobile-guard-CHHXRZ12.js";import{l as oe,o as q,i as dt,f as Qr,t as wt,j as yn,h as eo,e as to,g as qe,X as no,m as xn,u as kt,k as ro,V as Je}from"./FormItem-KX1KLzyv.js";import{f as Re}from"./Switch-_UDIVDNp.js";let He=[];const wn=new WeakMap;function oo(){He.forEach(e=>e(...wn.get(e))),He=[]}function ao(e,...t){wn.set(e,t),!He.includes(e)&&He.push(e)===1&&requestAnimationFrame(oo)}function io(e){const t=O(!!e.value);if(t.value)return At(t);const n=ne(e,r=>{r&&(t.value=!0,n())});return At(t)}function Si(){return dn()!==null}const so=typeof window<"u";let Se,Ee;const lo=()=>{var e,t;Se=so?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,Ee=!1,Se!==void 0?Se.then(()=>{Ee=!0}):Ee=!0};lo();function Sn(e){if(Ee)return;let t=!1;Oe(()=>{Ee||Se==null||Se.then(()=>{t||e()})}),Te(()=>{t=!0})}function ut(e,t){return X(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const $i=ce("n-internal-select-menu"),uo=ce("n-internal-select-menu-body"),$n=ce("n-drawer-body"),Cn=ce("n-modal-body"),Tn=ce("n-popover-body"),Pn="__disabled__";function Ce(e){const t=G(Cn,null),n=G($n,null),r=G(Tn,null),o=G(uo,null),a=O();if(typeof document<"u"){a.value=document.fullscreenElement;const l=()=>{a.value=document.fullscreenElement};Oe(()=>{oe("fullscreenchange",document,l)}),Te(()=>{q("fullscreenchange",document,l)})}return _e(()=>{var l;const{to:s}=e;return s!==void 0?s===!1?Pn:s===!0?a.value||"body":s:t!=null&&t.value?(l=t.value.$el)!==null&&l!==void 0?l:t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:o!=null&&o.value?o.value:s??(a.value||"body")})}Ce.tdkey=Pn;Ce.propTo={type:[String,Object,Boolean],default:void 0};function ct(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function ft(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push($r(String(r)));return}if(Array.isArray(r)){ft(r,t,n);return}if(r.type===Ue){if(r.children===null)return;Array.isArray(r.children)&&ft(r.children,t,n)}else r.type!==Cr&&n.push(r)}}),n}function Wt(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const o=ft(r());if(o.length===1)return o[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let le=null;function zn(){if(le===null&&(le=document.getElementById("v-binder-view-measurer"),le===null)){le=document.createElement("div"),le.id="v-binder-view-measurer";const{style:e}=le;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(le)}return le.getBoundingClientRect()}function co(e,t){const n=zn();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function Qe(e){const t=e.getBoundingClientRect(),n=zn();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function fo(e){return e.nodeType===9?null:e.parentNode}function An(e){if(e===null)return null;const t=fo(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:r,overflowY:o}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+o+r))return t}return An(t)}const po=U({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;ue("VBinder",(t=dn())===null||t===void 0?void 0:t.proxy);const n=G("VBinder",null),r=O(null),o=d=>{r.value=d,n&&e.syncTargetWithParent&&n.setTargetRef(d)};let a=[];const l=()=>{let d=r.value;for(;d=An(d),d!==null;)a.push(d);for(const T of a)oe("scroll",T,x,!0)},s=()=>{for(const d of a)q("scroll",d,x,!0);a=[]},i=new Set,p=d=>{i.size===0&&l(),i.has(d)||i.add(d)},g=d=>{i.has(d)&&i.delete(d),i.size===0&&s()},x=()=>{ao(u)},u=()=>{i.forEach(d=>d())},b=new Set,w=d=>{b.size===0&&oe("resize",window,m),b.has(d)||b.add(d)},v=d=>{b.has(d)&&b.delete(d),b.size===0&&q("resize",window,m)},m=()=>{b.forEach(d=>d())};return Te(()=>{q("resize",window,m),s()}),{targetRef:r,setTargetRef:o,addScrollListener:p,removeScrollListener:g,addResizeListener:w,removeResizeListener:v}},render(){return ct("binder",this.$slots)}}),ho=U({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=G("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?Be(Wt("follower",this.$slots),[[t]]):Wt("follower",this.$slots)}}),ge="@@mmoContext",bo={mounted(e,{value:t}){e[ge]={handler:void 0},typeof t=="function"&&(e[ge].handler=t,oe("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[ge];typeof t=="function"?n.handler?n.handler!==t&&(q("mousemoveoutside",e,n.handler),n.handler=t,oe("mousemoveoutside",e,t)):(e[ge].handler=t,oe("mousemoveoutside",e,t)):n.handler&&(q("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[ge];t&&q("mousemoveoutside",e,t),e[ge].handler=void 0}},me="@@coContext",Dt={mounted(e,{value:t,modifiers:n}){e[me]={handler:void 0},typeof t=="function"&&(e[me].handler=t,oe("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[me];typeof t=="function"?r.handler?r.handler!==t&&(q("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,oe("clickoutside",e,t,{capture:n.capture})):(e[me].handler=t,oe("clickoutside",e,t,{capture:n.capture})):r.handler&&(q("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[me];n&&q("clickoutside",e,n,{capture:t.capture}),e[me].handler=void 0}};function vo(e,t){console.error(`[vdirs/${e}]: ${t}`)}class go{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:o}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${o}`,r.set(t,o),this.nextZIndex=o+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&vo("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],o=this.nextZIndex++;`${o}`!==r.style.zIndex&&(r.style.zIndex=`${o}`)})}}const et=new go,ye="@@ziContext",En={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:o}=n;e[ye]={enabled:!!o,initialized:!1},o&&(et.ensureZIndex(e,r),e[ye].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:o}=n,a=e[ye].enabled;o&&!a&&(et.ensureZIndex(e,r),e[ye].initialized=!0),e[ye].enabled=!!o},unmounted(e,t){if(!e[ye].initialized)return;const{value:n={}}=t,{zIndex:r}=n;et.unregister(e,r)}},{c:xe}=Tr(),_n="vueuc-style";function jt(e){return typeof e=="string"?document.querySelector(e):e()||null}const mo=U({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:io(j(e,"show")),mergedTo:X(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?ct("lazy-teleport",this.$slots):y(Pr,{disabled:this.disabled,to:this.mergedTo},ct("lazy-teleport",this.$slots)):null}}),ke={top:"bottom",bottom:"top",left:"right",right:"left"},Nt={start:"end",center:"center",end:"start"},tt={top:"height",bottom:"height",left:"width",right:"width"},yo={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},xo={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},wo={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Rt={top:!0,bottom:!1,left:!0,right:!1},Ht={top:"end",bottom:"start",left:"end",right:"start"};function So(e,t,n,r,o,a){if(!o||a)return{placement:e,top:0,left:0};const[l,s]=e.split("-");let i=s??"center",p={top:0,left:0};const g=(b,w,v)=>{let m=0,d=0;const T=n[b]-t[w]-t[b];return T>0&&r&&(v?d=Rt[w]?T:-T:m=Rt[w]?T:-T),{left:m,top:d}},x=l==="left"||l==="right";if(i!=="center"){const b=wo[e],w=ke[b],v=tt[b];if(n[v]>t[v]){if(t[b]+t[v]t[w]&&(i=Nt[s])}else{const b=l==="bottom"||l==="top"?"left":"top",w=ke[b],v=tt[b],m=(n[v]-t[v])/2;(t[b]t[w]?(i=Ht[b],p=g(v,b,x)):(i=Ht[w],p=g(v,w,x)))}let u=l;return t[l] *",{pointerEvents:"all"})])]),Po=U({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=G("VBinder"),n=_e(()=>e.enabled!==void 0?e.enabled:e.show),r=O(null),o=O(null),a=()=>{const{syncTrigger:u}=e;u.includes("scroll")&&t.addScrollListener(i),u.includes("resize")&&t.addResizeListener(i)},l=()=>{t.removeScrollListener(i),t.removeResizeListener(i)};Oe(()=>{n.value&&(i(),a())});const s=un();To.mount({id:"vueuc/binder",head:!0,anchorMetaName:_n,ssr:s}),Te(()=>{l()}),Sn(()=>{n.value&&i()});const i=()=>{if(!n.value)return;const u=r.value;if(u===null)return;const b=t.targetRef,{x:w,y:v,overlap:m}=e,d=w!==void 0&&v!==void 0?co(w,v):Qe(b);u.style.setProperty("--v-target-width",`${Math.round(d.width)}px`),u.style.setProperty("--v-target-height",`${Math.round(d.height)}px`);const{width:T,minWidth:L,placement:B,internalShift:A,flip:z}=e;u.setAttribute("v-placement",B),m?u.setAttribute("v-overlap",""):u.removeAttribute("v-overlap");const{style:$}=u;T==="target"?$.width=`${d.width}px`:T!==void 0?$.width=T:$.width="",L==="target"?$.minWidth=`${d.width}px`:L!==void 0?$.minWidth=L:$.minWidth="";const I=Qe(u),k=Qe(o.value),{left:_,top:V,placement:K}=So(B,d,I,A,z,m),R=$o(K,m),{left:J,top:S,transform:W}=Co(K,k,d,V,_,m);u.setAttribute("v-placement",K),u.style.setProperty("--v-offset-left",`${Math.round(_)}px`),u.style.setProperty("--v-offset-top",`${Math.round(V)}px`),u.style.transform=`translateX(${J}) translateY(${S}) ${W}`,u.style.setProperty("--v-transform-origin",R),u.style.transformOrigin=R};ne(n,u=>{u?(a(),p()):l()});const p=()=>{De().then(i).catch(u=>console.error(u))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(u=>{ne(j(e,u),i)}),["teleportDisabled"].forEach(u=>{ne(j(e,u),p)}),ne(j(e,"syncTrigger"),u=>{u.includes("resize")?t.addResizeListener(i):t.removeResizeListener(i),u.includes("scroll")?t.addScrollListener(i):t.removeScrollListener(i)});const g=cn(),x=_e(()=>{const{to:u}=e;if(u!==void 0)return u;g.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:o,followerRef:r,mergedTo:x,syncPosition:i}},render(){return y(mo,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=y("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[y("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?Be(n,[[En,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}}),zo=xe(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[xe("&::-webkit-scrollbar",{width:0,height:0})]),Ao=U({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=O(null);function t(o){!(o.currentTarget.offsetWidth=0;t--){const n=e.childNodes[t];if(Mn(n)&&(In(n)||Bn(n)))return!0}return!1}function In(e){if(!Eo(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function Eo(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Ae=[];const _o=U({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:[String,Function],finalFocusTo:[String,Function],returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=zr(),n=O(null),r=O(null);let o=!1,a=!1;const l=typeof document>"u"?null:document.activeElement;function s(){return Ae[Ae.length-1]===t}function i(m){var d;m.code==="Escape"&&s()&&((d=e.onEsc)===null||d===void 0||d.call(e,m))}Oe(()=>{ne(()=>e.active,m=>{m?(x(),oe("keydown",document,i)):(q("keydown",document,i),o&&u())},{immediate:!0})}),Te(()=>{q("keydown",document,i),o&&u()});function p(m){if(!a&&s()){const d=g();if(d===null||d.contains(dt(m)))return;b("first")}}function g(){const m=n.value;if(m===null)return null;let d=m;for(;d=d.nextSibling,!(d===null||d instanceof Element&&d.tagName==="DIV"););return d}function x(){var m;if(!e.disabled){if(Ae.push(t),e.autoFocus){const{initialFocusTo:d}=e;d===void 0?b("first"):(m=jt(d))===null||m===void 0||m.focus({preventScroll:!0})}o=!0,document.addEventListener("focus",p,!0)}}function u(){var m;if(e.disabled||(document.removeEventListener("focus",p,!0),Ae=Ae.filter(T=>T!==t),s()))return;const{finalFocusTo:d}=e;d!==void 0?(m=jt(d))===null||m===void 0||m.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&l instanceof HTMLElement&&(a=!0,l.focus({preventScroll:!0}),a=!1)}function b(m){if(s()&&e.active){const d=n.value,T=r.value;if(d!==null&&T!==null){const L=g();if(L==null||L===T){a=!0,d.focus({preventScroll:!0}),a=!1;return}a=!0;const B=m==="first"?On(L):Bn(L);a=!1,B||(a=!0,d.focus({preventScroll:!0}),a=!1)}}}function w(m){if(a)return;const d=g();d!==null&&(m.relatedTarget!==null&&d.contains(m.relatedTarget)?b("last"):b("first"))}function v(m){a||(m.relatedTarget!==null&&m.relatedTarget===n.value?b("last"):b("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:w,handleEndFocus:v}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return y(Ue,null,[y("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),y("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});let nt;function Mo(){return nt===void 0&&(nt=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),nt}function Xt(e,t="default",n=void 0){const r=e[t];if(!r)return Et("getFirstSlotVNode",`slot[${t}] is empty`),null;const o=Re(r(n));return o.length===1?o[0]:(Et("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function Ln(e,t=[],n){const r={};return t.forEach(o=>{r[o]=e[o]}),Object.assign(r,n)}var Oo=/\s/;function Bo(e){for(var t=e.length;t--&&Oo.test(e.charAt(t)););return t}var Io=/^\s+/;function Lo(e){return e&&e.slice(0,Bo(e)+1).replace(Io,"")}var Ut=NaN,Fo=/^[-+]0x[0-9a-f]+$/i,ko=/^0b[01]+$/i,Wo=/^0o[0-7]+$/i,Do=parseInt;function Vt(e){if(typeof e=="number")return e;if(Ar(e))return Ut;if(Me(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Me(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Lo(e);var n=ko.test(e);return n||Wo.test(e)?Do(e.slice(2),n?2:8):Fo.test(e)?Ut:+e}var pt=Ve(Ie,"WeakMap"),jo=Er(Object.keys,Object),No=Object.prototype,Ro=No.hasOwnProperty;function Ho(e){if(!_r(e))return jo(e);var t=[];for(var n in Object(e))Ro.call(e,n)&&n!="constructor"&&t.push(n);return t}function St(e){return mt(e)?Mr(e):Ho(e)}function Xo(e,t){for(var n=-1,r=t.length,o=e.length;++ns))return!1;var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var x=-1,u=!0,b=n&da?new Xe:void 0;for(a.set(e,t),a.set(t,e);++x=t||$<0||x&&I>=a}function d(){var z=ot();if(m(z))return T(z);s=setTimeout(d,v(z))}function T(z){return s=void 0,u&&r?b(z):(r=o=void 0,l)}function L(){s!==void 0&&clearTimeout(s),p=0,r=i=o=s=void 0}function B(){return s===void 0?l:T(ot())}function A(){var z=ot(),$=m(z);if(r=arguments,o=this,i=z,$){if(s===void 0)return w(i);if(x)return clearTimeout(s),s=setTimeout(d,t),b(i)}return s===void 0&&(s=setTimeout(d,t)),l}return A.cancel=L,A.flush=B,A}function ti(e,t){var n=-1,r=mt(e)?Array(e.length):[];return Ga(e,function(o,a,l){r[++n]=t(o,a,l)}),r}function ni(e,t){var n=$e(e)?jr:ti;return n(e,Ka(t))}var ri="Expected a function";function at(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(ri);return Me(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ei(e,t,{leading:r,maxWait:t,trailing:o})}const oi=U({name:"Add",render(){return y("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}}),it={top:"bottom",bottom:"top",left:"right",right:"left"},N="var(--n-arrow-height) * 1.414",ai=M([h("popover",` +import{bs as O,br as At,c5 as ne,aw as dn,bf as Oe,bd as Te,$ as X,a7 as ce,aH as G,bW as _e,aa as $r,F as Ue,C as Cr,ai as U,bn as ue,c8 as Be,a as Tr,aC as y,T as Pr,bO as j,bZ as un,b7 as De,aV as cn,a6 as zr,c4 as Et,b0 as Ar,aW as Me,aB as Ve,bC as Ie,bi as Er,aY as _r,aP as mt,p as Mr,aO as $e,t as fn,bP as Pe,M as lt,b as Or,j as _t,ar as Br,U as Mt,aR as Ot,S as je,b1 as Ir,aX as Bt,aT as Lr,aS as Fr,aN as kr,aF as Wr,s as Dr,q as jr,v as M,w as h,A as Ne,y as F,z as P,x as Nr,l as Rr,bT as Ke,b$ as fe,bl as Hr,c6 as yt,c2 as pn,c0 as xt,a$ as It,b4 as hn,bA as we,L as bn,k as Xr,D as re,b5 as Ur,bK as vn,by as Lt,B as Ft,c as gn,W as Vr,ba as mn,bk as Kr,bt as Yr,N as Zr,bI as Gr,a8 as te,az as Fe,aj as qr,m as Jr}from"./mobile-guard-BvFpjCXb.js";import{l as oe,o as q,i as dt,f as Qr,t as wt,j as yn,h as eo,e as to,g as qe,X as no,m as xn,u as kt,k as ro,V as Je}from"./FormItem-Biv8w1Bg.js";import{f as Re}from"./Switch-CX4ypJCN.js";let He=[];const wn=new WeakMap;function oo(){He.forEach(e=>e(...wn.get(e))),He=[]}function ao(e,...t){wn.set(e,t),!He.includes(e)&&He.push(e)===1&&requestAnimationFrame(oo)}function io(e){const t=O(!!e.value);if(t.value)return At(t);const n=ne(e,r=>{r&&(t.value=!0,n())});return At(t)}function Si(){return dn()!==null}const so=typeof window<"u";let Se,Ee;const lo=()=>{var e,t;Se=so?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,Ee=!1,Se!==void 0?Se.then(()=>{Ee=!0}):Ee=!0};lo();function Sn(e){if(Ee)return;let t=!1;Oe(()=>{Ee||Se==null||Se.then(()=>{t||e()})}),Te(()=>{t=!0})}function ut(e,t){return X(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const $i=ce("n-internal-select-menu"),uo=ce("n-internal-select-menu-body"),$n=ce("n-drawer-body"),Cn=ce("n-modal-body"),Tn=ce("n-popover-body"),Pn="__disabled__";function Ce(e){const t=G(Cn,null),n=G($n,null),r=G(Tn,null),o=G(uo,null),a=O();if(typeof document<"u"){a.value=document.fullscreenElement;const l=()=>{a.value=document.fullscreenElement};Oe(()=>{oe("fullscreenchange",document,l)}),Te(()=>{q("fullscreenchange",document,l)})}return _e(()=>{var l;const{to:s}=e;return s!==void 0?s===!1?Pn:s===!0?a.value||"body":s:t!=null&&t.value?(l=t.value.$el)!==null&&l!==void 0?l:t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:o!=null&&o.value?o.value:s??(a.value||"body")})}Ce.tdkey=Pn;Ce.propTo={type:[String,Object,Boolean],default:void 0};function ct(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function ft(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push($r(String(r)));return}if(Array.isArray(r)){ft(r,t,n);return}if(r.type===Ue){if(r.children===null)return;Array.isArray(r.children)&&ft(r.children,t,n)}else r.type!==Cr&&n.push(r)}}),n}function Wt(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const o=ft(r());if(o.length===1)return o[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let le=null;function zn(){if(le===null&&(le=document.getElementById("v-binder-view-measurer"),le===null)){le=document.createElement("div"),le.id="v-binder-view-measurer";const{style:e}=le;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(le)}return le.getBoundingClientRect()}function co(e,t){const n=zn();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function Qe(e){const t=e.getBoundingClientRect(),n=zn();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function fo(e){return e.nodeType===9?null:e.parentNode}function An(e){if(e===null)return null;const t=fo(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:r,overflowY:o}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+o+r))return t}return An(t)}const po=U({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;ue("VBinder",(t=dn())===null||t===void 0?void 0:t.proxy);const n=G("VBinder",null),r=O(null),o=d=>{r.value=d,n&&e.syncTargetWithParent&&n.setTargetRef(d)};let a=[];const l=()=>{let d=r.value;for(;d=An(d),d!==null;)a.push(d);for(const T of a)oe("scroll",T,x,!0)},s=()=>{for(const d of a)q("scroll",d,x,!0);a=[]},i=new Set,p=d=>{i.size===0&&l(),i.has(d)||i.add(d)},g=d=>{i.has(d)&&i.delete(d),i.size===0&&s()},x=()=>{ao(u)},u=()=>{i.forEach(d=>d())},b=new Set,w=d=>{b.size===0&&oe("resize",window,m),b.has(d)||b.add(d)},v=d=>{b.has(d)&&b.delete(d),b.size===0&&q("resize",window,m)},m=()=>{b.forEach(d=>d())};return Te(()=>{q("resize",window,m),s()}),{targetRef:r,setTargetRef:o,addScrollListener:p,removeScrollListener:g,addResizeListener:w,removeResizeListener:v}},render(){return ct("binder",this.$slots)}}),ho=U({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=G("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?Be(Wt("follower",this.$slots),[[t]]):Wt("follower",this.$slots)}}),ge="@@mmoContext",bo={mounted(e,{value:t}){e[ge]={handler:void 0},typeof t=="function"&&(e[ge].handler=t,oe("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[ge];typeof t=="function"?n.handler?n.handler!==t&&(q("mousemoveoutside",e,n.handler),n.handler=t,oe("mousemoveoutside",e,t)):(e[ge].handler=t,oe("mousemoveoutside",e,t)):n.handler&&(q("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[ge];t&&q("mousemoveoutside",e,t),e[ge].handler=void 0}},me="@@coContext",Dt={mounted(e,{value:t,modifiers:n}){e[me]={handler:void 0},typeof t=="function"&&(e[me].handler=t,oe("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[me];typeof t=="function"?r.handler?r.handler!==t&&(q("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,oe("clickoutside",e,t,{capture:n.capture})):(e[me].handler=t,oe("clickoutside",e,t,{capture:n.capture})):r.handler&&(q("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[me];n&&q("clickoutside",e,n,{capture:t.capture}),e[me].handler=void 0}};function vo(e,t){console.error(`[vdirs/${e}]: ${t}`)}class go{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:o}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${o}`,r.set(t,o),this.nextZIndex=o+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&vo("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],o=this.nextZIndex++;`${o}`!==r.style.zIndex&&(r.style.zIndex=`${o}`)})}}const et=new go,ye="@@ziContext",En={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:o}=n;e[ye]={enabled:!!o,initialized:!1},o&&(et.ensureZIndex(e,r),e[ye].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:o}=n,a=e[ye].enabled;o&&!a&&(et.ensureZIndex(e,r),e[ye].initialized=!0),e[ye].enabled=!!o},unmounted(e,t){if(!e[ye].initialized)return;const{value:n={}}=t,{zIndex:r}=n;et.unregister(e,r)}},{c:xe}=Tr(),_n="vueuc-style";function jt(e){return typeof e=="string"?document.querySelector(e):e()||null}const mo=U({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:io(j(e,"show")),mergedTo:X(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?ct("lazy-teleport",this.$slots):y(Pr,{disabled:this.disabled,to:this.mergedTo},ct("lazy-teleport",this.$slots)):null}}),ke={top:"bottom",bottom:"top",left:"right",right:"left"},Nt={start:"end",center:"center",end:"start"},tt={top:"height",bottom:"height",left:"width",right:"width"},yo={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},xo={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},wo={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Rt={top:!0,bottom:!1,left:!0,right:!1},Ht={top:"end",bottom:"start",left:"end",right:"start"};function So(e,t,n,r,o,a){if(!o||a)return{placement:e,top:0,left:0};const[l,s]=e.split("-");let i=s??"center",p={top:0,left:0};const g=(b,w,v)=>{let m=0,d=0;const T=n[b]-t[w]-t[b];return T>0&&r&&(v?d=Rt[w]?T:-T:m=Rt[w]?T:-T),{left:m,top:d}},x=l==="left"||l==="right";if(i!=="center"){const b=wo[e],w=ke[b],v=tt[b];if(n[v]>t[v]){if(t[b]+t[v]t[w]&&(i=Nt[s])}else{const b=l==="bottom"||l==="top"?"left":"top",w=ke[b],v=tt[b],m=(n[v]-t[v])/2;(t[b]t[w]?(i=Ht[b],p=g(v,b,x)):(i=Ht[w],p=g(v,w,x)))}let u=l;return t[l] *",{pointerEvents:"all"})])]),Po=U({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=G("VBinder"),n=_e(()=>e.enabled!==void 0?e.enabled:e.show),r=O(null),o=O(null),a=()=>{const{syncTrigger:u}=e;u.includes("scroll")&&t.addScrollListener(i),u.includes("resize")&&t.addResizeListener(i)},l=()=>{t.removeScrollListener(i),t.removeResizeListener(i)};Oe(()=>{n.value&&(i(),a())});const s=un();To.mount({id:"vueuc/binder",head:!0,anchorMetaName:_n,ssr:s}),Te(()=>{l()}),Sn(()=>{n.value&&i()});const i=()=>{if(!n.value)return;const u=r.value;if(u===null)return;const b=t.targetRef,{x:w,y:v,overlap:m}=e,d=w!==void 0&&v!==void 0?co(w,v):Qe(b);u.style.setProperty("--v-target-width",`${Math.round(d.width)}px`),u.style.setProperty("--v-target-height",`${Math.round(d.height)}px`);const{width:T,minWidth:L,placement:B,internalShift:A,flip:z}=e;u.setAttribute("v-placement",B),m?u.setAttribute("v-overlap",""):u.removeAttribute("v-overlap");const{style:$}=u;T==="target"?$.width=`${d.width}px`:T!==void 0?$.width=T:$.width="",L==="target"?$.minWidth=`${d.width}px`:L!==void 0?$.minWidth=L:$.minWidth="";const I=Qe(u),k=Qe(o.value),{left:_,top:V,placement:K}=So(B,d,I,A,z,m),R=$o(K,m),{left:J,top:S,transform:W}=Co(K,k,d,V,_,m);u.setAttribute("v-placement",K),u.style.setProperty("--v-offset-left",`${Math.round(_)}px`),u.style.setProperty("--v-offset-top",`${Math.round(V)}px`),u.style.transform=`translateX(${J}) translateY(${S}) ${W}`,u.style.setProperty("--v-transform-origin",R),u.style.transformOrigin=R};ne(n,u=>{u?(a(),p()):l()});const p=()=>{De().then(i).catch(u=>console.error(u))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(u=>{ne(j(e,u),i)}),["teleportDisabled"].forEach(u=>{ne(j(e,u),p)}),ne(j(e,"syncTrigger"),u=>{u.includes("resize")?t.addResizeListener(i):t.removeResizeListener(i),u.includes("scroll")?t.addScrollListener(i):t.removeScrollListener(i)});const g=cn(),x=_e(()=>{const{to:u}=e;if(u!==void 0)return u;g.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:o,followerRef:r,mergedTo:x,syncPosition:i}},render(){return y(mo,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=y("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[y("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?Be(n,[[En,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}}),zo=xe(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[xe("&::-webkit-scrollbar",{width:0,height:0})]),Ao=U({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=O(null);function t(o){!(o.currentTarget.offsetWidth=0;t--){const n=e.childNodes[t];if(Mn(n)&&(In(n)||Bn(n)))return!0}return!1}function In(e){if(!Eo(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function Eo(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Ae=[];const _o=U({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:[String,Function],finalFocusTo:[String,Function],returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=zr(),n=O(null),r=O(null);let o=!1,a=!1;const l=typeof document>"u"?null:document.activeElement;function s(){return Ae[Ae.length-1]===t}function i(m){var d;m.code==="Escape"&&s()&&((d=e.onEsc)===null||d===void 0||d.call(e,m))}Oe(()=>{ne(()=>e.active,m=>{m?(x(),oe("keydown",document,i)):(q("keydown",document,i),o&&u())},{immediate:!0})}),Te(()=>{q("keydown",document,i),o&&u()});function p(m){if(!a&&s()){const d=g();if(d===null||d.contains(dt(m)))return;b("first")}}function g(){const m=n.value;if(m===null)return null;let d=m;for(;d=d.nextSibling,!(d===null||d instanceof Element&&d.tagName==="DIV"););return d}function x(){var m;if(!e.disabled){if(Ae.push(t),e.autoFocus){const{initialFocusTo:d}=e;d===void 0?b("first"):(m=jt(d))===null||m===void 0||m.focus({preventScroll:!0})}o=!0,document.addEventListener("focus",p,!0)}}function u(){var m;if(e.disabled||(document.removeEventListener("focus",p,!0),Ae=Ae.filter(T=>T!==t),s()))return;const{finalFocusTo:d}=e;d!==void 0?(m=jt(d))===null||m===void 0||m.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&l instanceof HTMLElement&&(a=!0,l.focus({preventScroll:!0}),a=!1)}function b(m){if(s()&&e.active){const d=n.value,T=r.value;if(d!==null&&T!==null){const L=g();if(L==null||L===T){a=!0,d.focus({preventScroll:!0}),a=!1;return}a=!0;const B=m==="first"?On(L):Bn(L);a=!1,B||(a=!0,d.focus({preventScroll:!0}),a=!1)}}}function w(m){if(a)return;const d=g();d!==null&&(m.relatedTarget!==null&&d.contains(m.relatedTarget)?b("last"):b("first"))}function v(m){a||(m.relatedTarget!==null&&m.relatedTarget===n.value?b("last"):b("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:w,handleEndFocus:v}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return y(Ue,null,[y("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),y("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});let nt;function Mo(){return nt===void 0&&(nt=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),nt}function Xt(e,t="default",n=void 0){const r=e[t];if(!r)return Et("getFirstSlotVNode",`slot[${t}] is empty`),null;const o=Re(r(n));return o.length===1?o[0]:(Et("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function Ln(e,t=[],n){const r={};return t.forEach(o=>{r[o]=e[o]}),Object.assign(r,n)}var Oo=/\s/;function Bo(e){for(var t=e.length;t--&&Oo.test(e.charAt(t)););return t}var Io=/^\s+/;function Lo(e){return e&&e.slice(0,Bo(e)+1).replace(Io,"")}var Ut=NaN,Fo=/^[-+]0x[0-9a-f]+$/i,ko=/^0b[01]+$/i,Wo=/^0o[0-7]+$/i,Do=parseInt;function Vt(e){if(typeof e=="number")return e;if(Ar(e))return Ut;if(Me(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Me(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Lo(e);var n=ko.test(e);return n||Wo.test(e)?Do(e.slice(2),n?2:8):Fo.test(e)?Ut:+e}var pt=Ve(Ie,"WeakMap"),jo=Er(Object.keys,Object),No=Object.prototype,Ro=No.hasOwnProperty;function Ho(e){if(!_r(e))return jo(e);var t=[];for(var n in Object(e))Ro.call(e,n)&&n!="constructor"&&t.push(n);return t}function St(e){return mt(e)?Mr(e):Ho(e)}function Xo(e,t){for(var n=-1,r=t.length,o=e.length;++ns))return!1;var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var x=-1,u=!0,b=n&da?new Xe:void 0;for(a.set(e,t),a.set(t,e);++x=t||$<0||x&&I>=a}function d(){var z=ot();if(m(z))return T(z);s=setTimeout(d,v(z))}function T(z){return s=void 0,u&&r?b(z):(r=o=void 0,l)}function L(){s!==void 0&&clearTimeout(s),p=0,r=i=o=s=void 0}function B(){return s===void 0?l:T(ot())}function A(){var z=ot(),$=m(z);if(r=arguments,o=this,i=z,$){if(s===void 0)return w(i);if(x)return clearTimeout(s),s=setTimeout(d,t),b(i)}return s===void 0&&(s=setTimeout(d,t)),l}return A.cancel=L,A.flush=B,A}function ti(e,t){var n=-1,r=mt(e)?Array(e.length):[];return Ga(e,function(o,a,l){r[++n]=t(o,a,l)}),r}function ni(e,t){var n=$e(e)?jr:ti;return n(e,Ka(t))}var ri="Expected a function";function at(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(ri);return Me(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ei(e,t,{leading:r,maxWait:t,trailing:o})}const oi=U({name:"Add",render(){return y("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}}),it={top:"bottom",bottom:"top",left:"right",right:"left"},N="var(--n-arrow-height) * 1.414",ai=M([h("popover",` transition: box-shadow .3s var(--n-bezier), background-color .3s var(--n-bezier), diff --git a/internal/relay/web-dist/assets/Topbar-qQtT5o6t.js b/internal/relay/web-dist/assets/Topbar-Cz_j_mBL.js similarity index 98% rename from internal/relay/web-dist/assets/Topbar-qQtT5o6t.js rename to internal/relay/web-dist/assets/Topbar-Cz_j_mBL.js index 48c11a69..e9c669f7 100644 --- a/internal/relay/web-dist/assets/Topbar-qQtT5o6t.js +++ b/internal/relay/web-dist/assets/Topbar-Cz_j_mBL.js @@ -1,4 +1,4 @@ -import{ak as po,Q as Co,H as a,w as fo,z as C,y as S,A as B,v as w,ai as G,bA as A,aC as I,N as mo,bs as D,bT as ko,b$ as Z,bn as yo,bO as xo,bY as So,$ as U,a8 as g,az as Io,c0 as Po,O as K,D as _o,a7 as zo,bf as Bo,bh as Y,a5 as Q,a2 as f,bN as P,bS as _,b8 as V,a4 as wo,bV as To,n as $o}from"./mobile-guard-CHHXRZ12.js";import{a as m}from"./client-Bd6vJHn4.js";import{d as Ho,o as Eo,S as Oo,a as Ro,f as Mo,c as No}from"./pwa-DV81pmUS.js";function Wo(o){const{textColor2:s,primaryColorHover:e,primaryColorPressed:l,primaryColor:c,infoColor:t,successColor:n,warningColor:h,errorColor:i,baseColor:k,borderColor:y,opacityDisabled:b,tagColor:v,closeIconColor:r,closeIconColorHover:d,closeIconColorPressed:p,borderRadiusSmall:u,fontSizeMini:x,fontSizeTiny:T,fontSizeSmall:$,fontSizeMedium:H,heightMini:E,heightTiny:O,heightSmall:R,heightMedium:M,closeColorHover:N,closeColorPressed:W,buttonColor2Hover:j,buttonColor2Pressed:F,fontWeightStrong:L}=o;return Object.assign(Object.assign({},Co),{closeBorderRadius:u,heightTiny:E,heightSmall:O,heightMedium:R,heightLarge:M,borderRadius:u,opacityDisabled:b,fontSizeTiny:x,fontSizeSmall:T,fontSizeMedium:$,fontSizeLarge:H,fontWeightStrong:L,textColorCheckable:s,textColorHoverCheckable:s,textColorPressedCheckable:s,textColorChecked:k,colorCheckable:"#0000",colorHoverCheckable:j,colorPressedCheckable:F,colorChecked:c,colorCheckedHover:e,colorCheckedPressed:l,border:`1px solid ${y}`,textColor:s,color:v,colorBordered:"rgb(250, 250, 252)",closeIconColor:r,closeIconColorHover:d,closeIconColorPressed:p,closeColorHover:N,closeColorPressed:W,borderPrimary:`1px solid ${a(c,{alpha:.3})}`,textColorPrimary:c,colorPrimary:a(c,{alpha:.12}),colorBorderedPrimary:a(c,{alpha:.1}),closeIconColorPrimary:c,closeIconColorHoverPrimary:c,closeIconColorPressedPrimary:c,closeColorHoverPrimary:a(c,{alpha:.12}),closeColorPressedPrimary:a(c,{alpha:.18}),borderInfo:`1px solid ${a(t,{alpha:.3})}`,textColorInfo:t,colorInfo:a(t,{alpha:.12}),colorBorderedInfo:a(t,{alpha:.1}),closeIconColorInfo:t,closeIconColorHoverInfo:t,closeIconColorPressedInfo:t,closeColorHoverInfo:a(t,{alpha:.12}),closeColorPressedInfo:a(t,{alpha:.18}),borderSuccess:`1px solid ${a(n,{alpha:.3})}`,textColorSuccess:n,colorSuccess:a(n,{alpha:.12}),colorBorderedSuccess:a(n,{alpha:.1}),closeIconColorSuccess:n,closeIconColorHoverSuccess:n,closeIconColorPressedSuccess:n,closeColorHoverSuccess:a(n,{alpha:.12}),closeColorPressedSuccess:a(n,{alpha:.18}),borderWarning:`1px solid ${a(h,{alpha:.35})}`,textColorWarning:h,colorWarning:a(h,{alpha:.15}),colorBorderedWarning:a(h,{alpha:.12}),closeIconColorWarning:h,closeIconColorHoverWarning:h,closeIconColorPressedWarning:h,closeColorHoverWarning:a(h,{alpha:.12}),closeColorPressedWarning:a(h,{alpha:.18}),borderError:`1px solid ${a(i,{alpha:.23})}`,textColorError:i,colorError:a(i,{alpha:.1}),colorBorderedError:a(i,{alpha:.08}),closeIconColorError:i,closeIconColorHoverError:i,closeIconColorPressedError:i,closeColorHoverError:a(i,{alpha:.12}),closeColorPressedError:a(i,{alpha:.18})})}const jo={common:po,self:Wo},Fo={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},Lo=fo("tag",` +import{ak as po,Q as Co,H as a,w as fo,z as C,y as S,A as B,v as w,ai as G,bA as A,aC as I,N as mo,bs as D,bT as ko,b$ as Z,bn as yo,bO as xo,bY as So,$ as U,a8 as g,az as Io,c0 as Po,O as K,D as _o,a7 as zo,bf as Bo,bh as Y,a5 as Q,a2 as f,bN as P,bS as _,b8 as V,a4 as wo,bV as To,n as $o}from"./mobile-guard-BvFpjCXb.js";import{a as m}from"./client-BRiQMdFT.js";import{d as Ho,o as Eo,S as Oo,a as Ro,f as Mo,c as No}from"./pwa-BRtGQKIK.js";function Wo(o){const{textColor2:s,primaryColorHover:e,primaryColorPressed:l,primaryColor:c,infoColor:t,successColor:n,warningColor:h,errorColor:i,baseColor:k,borderColor:y,opacityDisabled:b,tagColor:v,closeIconColor:r,closeIconColorHover:d,closeIconColorPressed:p,borderRadiusSmall:u,fontSizeMini:x,fontSizeTiny:T,fontSizeSmall:$,fontSizeMedium:H,heightMini:E,heightTiny:O,heightSmall:R,heightMedium:M,closeColorHover:N,closeColorPressed:W,buttonColor2Hover:j,buttonColor2Pressed:F,fontWeightStrong:L}=o;return Object.assign(Object.assign({},Co),{closeBorderRadius:u,heightTiny:E,heightSmall:O,heightMedium:R,heightLarge:M,borderRadius:u,opacityDisabled:b,fontSizeTiny:x,fontSizeSmall:T,fontSizeMedium:$,fontSizeLarge:H,fontWeightStrong:L,textColorCheckable:s,textColorHoverCheckable:s,textColorPressedCheckable:s,textColorChecked:k,colorCheckable:"#0000",colorHoverCheckable:j,colorPressedCheckable:F,colorChecked:c,colorCheckedHover:e,colorCheckedPressed:l,border:`1px solid ${y}`,textColor:s,color:v,colorBordered:"rgb(250, 250, 252)",closeIconColor:r,closeIconColorHover:d,closeIconColorPressed:p,closeColorHover:N,closeColorPressed:W,borderPrimary:`1px solid ${a(c,{alpha:.3})}`,textColorPrimary:c,colorPrimary:a(c,{alpha:.12}),colorBorderedPrimary:a(c,{alpha:.1}),closeIconColorPrimary:c,closeIconColorHoverPrimary:c,closeIconColorPressedPrimary:c,closeColorHoverPrimary:a(c,{alpha:.12}),closeColorPressedPrimary:a(c,{alpha:.18}),borderInfo:`1px solid ${a(t,{alpha:.3})}`,textColorInfo:t,colorInfo:a(t,{alpha:.12}),colorBorderedInfo:a(t,{alpha:.1}),closeIconColorInfo:t,closeIconColorHoverInfo:t,closeIconColorPressedInfo:t,closeColorHoverInfo:a(t,{alpha:.12}),closeColorPressedInfo:a(t,{alpha:.18}),borderSuccess:`1px solid ${a(n,{alpha:.3})}`,textColorSuccess:n,colorSuccess:a(n,{alpha:.12}),colorBorderedSuccess:a(n,{alpha:.1}),closeIconColorSuccess:n,closeIconColorHoverSuccess:n,closeIconColorPressedSuccess:n,closeColorHoverSuccess:a(n,{alpha:.12}),closeColorPressedSuccess:a(n,{alpha:.18}),borderWarning:`1px solid ${a(h,{alpha:.35})}`,textColorWarning:h,colorWarning:a(h,{alpha:.15}),colorBorderedWarning:a(h,{alpha:.12}),closeIconColorWarning:h,closeIconColorHoverWarning:h,closeIconColorPressedWarning:h,closeColorHoverWarning:a(h,{alpha:.12}),closeColorPressedWarning:a(h,{alpha:.18}),borderError:`1px solid ${a(i,{alpha:.23})}`,textColorError:i,colorError:a(i,{alpha:.1}),colorBorderedError:a(i,{alpha:.08}),closeIconColorError:i,closeIconColorHoverError:i,closeIconColorPressedError:i,closeColorHoverError:a(i,{alpha:.12}),closeColorPressedError:a(i,{alpha:.18})})}const jo={common:po,self:Wo},Fo={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},Lo=fo("tag",` --n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left); white-space: nowrap; position: relative; diff --git a/internal/relay/web-dist/assets/admin-C5VBGqPU.css b/internal/relay/web-dist/assets/admin-BHn3CSbt.css similarity index 82% rename from internal/relay/web-dist/assets/admin-C5VBGqPU.css rename to internal/relay/web-dist/assets/admin-BHn3CSbt.css index b50a0aa8..7e324907 100644 --- a/internal/relay/web-dist/assets/admin-C5VBGqPU.css +++ b/internal/relay/web-dist/assets/admin-BHn3CSbt.css @@ -1 +1 @@ -.create-form[data-v-9794d932]{margin-bottom:1rem}.field[data-v-9794d932]{display:flex;flex-direction:column;gap:.25rem}.field-label[data-v-9794d932]{font-size:.75rem;color:var(--fg-dim);text-transform:uppercase;letter-spacing:.06em}.secret-alert[data-v-9794d932]{margin:.5rem 0}.secret-msg[data-v-9794d932]{color:var(--fg-dim);font-size:.85rem;margin-bottom:.5rem}.secret-display[data-v-9794d932]{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.85rem;color:var(--good);word-break:break-all;display:block;padding:.25rem 0}.empty[data-v-9794d932]{color:var(--fg-dim);font-size:.875rem;margin:.5rem 0 0}.secret-alert[data-v-e0bdfd90]{margin-bottom:.5rem}.secret-msg[data-v-e0bdfd90]{color:var(--fg-dim);font-size:.85rem;margin-bottom:.5rem}.secret-display[data-v-e0bdfd90]{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.85rem;color:var(--good);word-break:break-all;display:block;padding:.25rem 0}.form-error[data-v-e0bdfd90]{color:var(--bad);font-size:.875rem;margin:.5rem 0 0}.hint[data-v-0b657ff9]{color:var(--fg-dim);font-size:.875rem;margin:0 0 1rem}.muted[data-v-0b657ff9]{color:var(--fg-dim);font-size:.875rem}.warn[data-v-0b657ff9]{color:var(--warn, #d89614);font-size:.8125rem}.actions[data-v-0b657ff9]{margin-top:1rem}.version code[data-v-0b657ff9]{color:var(--fg)}.form-error[data-v-0b657ff9]{color:var(--bad);font-size:.875rem;margin:.5rem 0 0}.hint[data-v-040f66db]{color:var(--fg-dim);font-size:.875rem;margin:0 0 1rem}.muted[data-v-040f66db]{color:var(--fg-dim);font-size:.875rem}.warn[data-v-040f66db]{color:var(--warn, #d89614);font-size:.8125rem}.actions[data-v-040f66db]{margin-top:1rem}.form-error[data-v-040f66db]{color:var(--bad);font-size:.875rem;margin:.5rem 0 0}.admin-page[data-v-66a48cc2]{max-width:980px;margin:0 auto;padding:2rem 1rem;color:var(--fg);min-height:calc(100vh - 80px)} +.create-form[data-v-9794d932]{margin-bottom:1rem}.field[data-v-9794d932]{display:flex;flex-direction:column;gap:.25rem}.field-label[data-v-9794d932]{font-size:.75rem;color:var(--fg-dim);text-transform:uppercase;letter-spacing:.06em}.secret-alert[data-v-9794d932]{margin:.5rem 0}.secret-msg[data-v-9794d932]{color:var(--fg-dim);font-size:.85rem;margin-bottom:.5rem}.secret-display[data-v-9794d932]{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.85rem;color:var(--good);word-break:break-all;display:block;padding:.25rem 0}.empty[data-v-9794d932]{color:var(--fg-dim);font-size:.875rem;margin:.5rem 0 0}.secret-alert[data-v-e0bdfd90]{margin-bottom:.5rem}.secret-msg[data-v-e0bdfd90]{color:var(--fg-dim);font-size:.85rem;margin-bottom:.5rem}.secret-display[data-v-e0bdfd90]{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.85rem;color:var(--good);word-break:break-all;display:block;padding:.25rem 0}.form-error[data-v-e0bdfd90]{color:var(--bad);font-size:.875rem;margin:.5rem 0 0}.hint[data-v-7aad855f]{color:var(--fg-dim);font-size:.875rem;margin:0 0 1rem}.muted[data-v-7aad855f]{color:var(--fg-dim);font-size:.875rem}.warn[data-v-7aad855f]{color:var(--warn, #d89614);font-size:.8125rem}.actions[data-v-7aad855f]{margin-top:1rem}.version code[data-v-7aad855f]{color:var(--fg)}.form-error[data-v-7aad855f]{color:var(--bad);font-size:.875rem;margin:.5rem 0 0}.hint[data-v-040f66db]{color:var(--fg-dim);font-size:.875rem;margin:0 0 1rem}.muted[data-v-040f66db]{color:var(--fg-dim);font-size:.875rem}.warn[data-v-040f66db]{color:var(--warn, #d89614);font-size:.8125rem}.actions[data-v-040f66db]{margin-top:1rem}.form-error[data-v-040f66db]{color:var(--bad);font-size:.875rem;margin:.5rem 0 0}.admin-page[data-v-66a48cc2]{max-width:980px;margin:0 auto;padding:2rem 1rem;color:var(--fg);min-height:calc(100vh - 80px)} diff --git a/internal/relay/web-dist/assets/admin--XP86shj.js b/internal/relay/web-dist/assets/admin-YJxcuJKk.js similarity index 71% rename from internal/relay/web-dist/assets/admin--XP86shj.js rename to internal/relay/web-dist/assets/admin-YJxcuJKk.js index 80cd0404..a3e38b68 100644 --- a/internal/relay/web-dist/assets/admin--XP86shj.js +++ b/internal/relay/web-dist/assets/admin-YJxcuJKk.js @@ -1,10 +1,10 @@ -var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var Ce=(e,r,t)=>yl(e,typeof r!="symbol"?r+"":r,t);import{bq as wl,bc as xl,bd as Lr,br as Cl,c5 as gt,bs as F,$ as b,bW as at,bn as At,ai as ge,aH as it,aC as i,b4 as Un,bZ as Qo,bf as Qt,bb as kl,be as Zo,bO as me,aj as Jn,bo as Dt,b7 as nn,bv as Jo,bx as Ea,w as O,y as le,v as W,c as Pt,bT as xt,b$ as Ye,an as Rl,a8 as Ve,c0 as Mt,bt as ln,l as Kn,P as Sl,z as K,A as Ft,bA as er,d as Va,by as qe,bY as gn,aL as Pl,az as sr,F as mn,aM as Fl,c6 as Ln,bM as Ae,bG as pn,ax as pr,ao as ei,a_ as Tl,bU as Tn,a7 as bn,D as oe,aE as Xn,aJ as ti,aK as ni,g as ri,J as _l,a6 as ai,bm as oi,ba as ii,c8 as Hr,c2 as Dl,bF as Ol,aV as La,bj as Ml,bp as li,bR as zl,bX as si,am as Il,b_ as $l,B as ft,c4 as ur,aD as Al,al as Nl,a0 as Bl,ad as El,bg as di,bw as Vl,af as Ll,X as sn,bz as Vt,bK as Hl,bL as Ul,ah as jl,ab as Yl,aI as Kl,u as Wl,ak as ql,bB as Gl,bh as Ot,a3 as dn,bS as ie,c7 as je,a2 as yt,ac as Be,bN as dt,aa as cr,a5 as jn,bu as ui,a4 as Cn,bV as gr,av as ci,n as br,aA as Xl,h as Ql,b6 as oo,ae as Zl,e as Jl,o as es,aG as ts,a1 as ns}from"./mobile-guard-CHHXRZ12.js";import{N as Hn,T as rs}from"./Topbar-qQtT5o6t.js";import{a as Zt,A as vn}from"./client-Bd6vJHn4.js";import{o as kn,l as hn,V as Ca,r as ta,u as yn,S as Ut,W as as,N as os,m as zt,k as is,i as Ur,d as Xt,g as jt,h as io,X as ls,C as ss,a as jr,b as fi,c as Vn}from"./FormItem-KX1KLzyv.js";import{j as ds,h as hi,e as ka,f as Or,l as Ha,k as us,a as yr,m as vi,p as fr,B as wr,d as xr,V as Cr,u as un,g as hr,q as cs,o as mi,r as fs,n as hs,i as vs,A as ms,s as Yr,N as Sr,c as ps,b as Pr}from"./Tabs-BHw_WMcN.js";import{f as gs,g as bs,N as tn,a as zr}from"./Switch-_UDIVDNp.js";import{N as pi}from"./Alert-CTGJYwHC.js";import"./pwa-DV81pmUS.js";function Lt(e,r){let{target:t}=e;for(;t;){if(t.dataset&&t.dataset[r]!==void 0)return!0;t=t.parentElement}return!1}function Ua(e={},r){const t=wl({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:n,keyup:a}=e,o=d=>{switch(d.key){case"Control":t.ctrl=!0;break;case"Meta":t.command=!0,t.win=!0;break;case"Shift":t.shift=!0;break;case"Tab":t.tab=!0;break}n!==void 0&&Object.keys(n).forEach(u=>{if(u!==d.key)return;const c=n[u];if(typeof c=="function")c(d);else{const{stop:f=!1,prevent:v=!1}=c;f&&d.stopPropagation(),v&&d.preventDefault(),c.handler(d)}})},l=d=>{switch(d.key){case"Control":t.ctrl=!1;break;case"Meta":t.command=!1,t.win=!1;break;case"Shift":t.shift=!1;break;case"Tab":t.tab=!1;break}a!==void 0&&Object.keys(a).forEach(u=>{if(u!==d.key)return;const c=a[u];if(typeof c=="function")c(d);else{const{stop:f=!1,prevent:v=!1}=c;f&&d.stopPropagation(),v&&d.preventDefault(),c.handler(d)}})},s=()=>{(r===void 0||r.value)&&(hn("keydown",document,o),hn("keyup",document,l)),r!==void 0&>(r,d=>{d?(hn("keydown",document,o),hn("keyup",document,l)):(kn("keydown",document,o),kn("keyup",document,l))})};return ds()?(xl(s),Lr(()=>{(r===void 0||r.value)&&(kn("keydown",document,o),kn("keyup",document,l))})):s(),Cl(t)}function ys(e,r,t){const n=F(e.value);let a=null;return gt(e,o=>{a!==null&&window.clearTimeout(a),o===!0?t&&!t.value?n.value=!0:a=window.setTimeout(()=>{n.value=!0},r):n.value=!1}),n}function lo(e){return e&-e}class gi{constructor(r,t){this.l=r,this.min=t;const n=new Array(r+1);for(let a=0;aa)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let o=r*n;for(;r>0;)o+=t[r],r-=lo(r);return o}getBound(r){let t=0,n=this.l;for(;n>t;){const a=Math.floor((t+n)/2),o=this.sum(a);if(o>r){n=a;continue}else if(o"u"?!1:(Fr===void 0&&("matchMedia"in window?Fr=window.matchMedia("(pointer:coarse)").matches:Fr=!1),Fr)}let na;function so(){return typeof document>"u"?1:(na===void 0&&(na="chrome"in window?window.devicePixelRatio:1),na)}const bi="VVirtualListXScroll";function xs({columnsRef:e,renderColRef:r,renderItemWithColsRef:t}){const n=F(0),a=F(0),o=b(()=>{const u=e.value;if(u.length===0)return null;const c=new gi(u.length,0);return u.forEach((f,v)=>{c.add(v,f.width)}),c}),l=at(()=>{const u=o.value;return u!==null?Math.max(u.getBound(a.value)-1,0):0}),s=u=>{const c=o.value;return c!==null?c.sum(u):0},d=at(()=>{const u=o.value;return u!==null?Math.min(u.getBound(a.value+n.value)+1,e.value.length-1):0});return At(bi,{startIndexRef:l,endIndexRef:d,columnsRef:e,renderColRef:r,renderItemWithColsRef:t,getLeft:s}),{listWidthRef:n,scrollLeftRef:a}}const uo=ge({name:"VirtualListRow",props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){const{startIndexRef:e,endIndexRef:r,columnsRef:t,getLeft:n,renderColRef:a,renderItemWithColsRef:o}=it(bi);return{startIndex:e,endIndex:r,columns:t,renderCol:a,renderItemWithCols:o,getLeft:n}},render(){const{startIndex:e,endIndex:r,columns:t,renderCol:n,renderItemWithCols:a,getLeft:o,item:l}=this;if(a!=null)return a({itemIndex:this.index,startColIndex:e,endColIndex:r,allColumns:t,item:l,getLeft:o});if(n!=null){const s=[];for(let d=e;d<=r;++d){const u=t[d];s.push(n({column:u,left:o(d),item:l}))}return s}return null}}),Cs=Or(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[Or("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[Or("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),tr=ge({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const r=Qo();Cs.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:hi,ssr:r}),Qt(()=>{const{defaultScrollIndex:C,defaultScrollKey:B}=e;C!=null?h({index:C}):B!=null&&h({key:B})});let t=!1,n=!1;kl(()=>{if(t=!1,!n){n=!0;return}h({top:m.value,left:l.value})}),Zo(()=>{t=!0,n||(n=!0)});const a=at(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let C=0;return e.columns.forEach(B=>{C+=B.width}),C}),o=b(()=>{const C=new Map,{keyField:B}=e;return e.items.forEach((L,Q)=>{C.set(L[B],Q)}),C}),{scrollLeftRef:l,listWidthRef:s}=xs({columnsRef:me(e,"columns"),renderColRef:me(e,"renderCol"),renderItemWithColsRef:me(e,"renderItemWithCols")}),d=F(null),u=F(void 0),c=new Map,f=b(()=>{const{items:C,itemSize:B,keyField:L}=e,Q=new gi(C.length,B);return C.forEach((q,ee)=>{const ue=q[L],te=c.get(ue);te!==void 0&&Q.add(ee,te)}),Q}),v=F(0),m=F(0),p=at(()=>Math.max(f.value.getBound(m.value-Jn(e.paddingTop))-1,0)),y=b(()=>{const{value:C}=u;if(C===void 0)return[];const{items:B,itemSize:L}=e,Q=p.value,q=Math.min(Q+Math.ceil(C/L+1),B.length-1),ee=[];for(let ue=Q;ue<=q;++ue)ee.push(B[ue]);return ee}),h=(C,B)=>{if(typeof C=="number"){x(C,B,"auto");return}const{left:L,top:Q,index:q,key:ee,position:ue,behavior:te,debounce:V=!0}=C;if(L!==void 0||Q!==void 0)x(L,Q,te);else if(q!==void 0)k(q,te,V);else if(ee!==void 0){const _=o.value.get(ee);_!==void 0&&k(_,te,V)}else ue==="bottom"?x(0,Number.MAX_SAFE_INTEGER,te):ue==="top"&&x(0,0,te)};let w,g=null;function k(C,B,L){const{value:Q}=f,q=Q.sum(C)+Jn(e.paddingTop);if(!L)d.value.scrollTo({left:0,top:q,behavior:B});else{w=C,g!==null&&window.clearTimeout(g),g=window.setTimeout(()=>{w=void 0,g=null},16);const{scrollTop:ee,offsetHeight:ue}=d.value;if(q>ee){const te=Q.get(C);q+te<=ee+ue||d.value.scrollTo({left:0,top:q+te-ue,behavior:B})}else d.value.scrollTo({left:0,top:q,behavior:B})}}function x(C,B,L){d.value.scrollTo({left:C,top:B,behavior:L})}function P(C,B){var L,Q,q;if(t||e.ignoreItemResize||D(B.target))return;const{value:ee}=f,ue=o.value.get(C),te=ee.get(ue),V=(q=(Q=(L=B.borderBoxSize)===null||L===void 0?void 0:L[0])===null||Q===void 0?void 0:Q.blockSize)!==null&&q!==void 0?q:B.contentRect.height;if(V===te)return;V-e.itemSize===0?c.delete(C):c.set(C,V-e.itemSize);const E=V-te;if(E===0)return;ee.add(ue,E);const U=d.value;if(U!=null){if(w===void 0){const ne=ee.sum(ue);U.scrollTop>ne&&U.scrollBy(0,E)}else if(ueU.scrollTop+U.offsetHeight&&U.scrollBy(0,E)}J()}v.value++}const $=!ws();let T=!1;function Y(C){var B;(B=e.onScroll)===null||B===void 0||B.call(e,C),(!$||!T)&&J()}function z(C){var B;if((B=e.onWheel)===null||B===void 0||B.call(e,C),$){const L=d.value;if(L!=null){if(C.deltaX===0&&(L.scrollTop===0&&C.deltaY<=0||L.scrollTop+L.offsetHeight>=L.scrollHeight&&C.deltaY>=0))return;C.preventDefault(),L.scrollTop+=C.deltaY/so(),L.scrollLeft+=C.deltaX/so(),J(),T=!0,ka(()=>{T=!1})}}}function N(C){if(t||D(C.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(C.contentRect.height===u.value)return}else if(C.contentRect.height===u.value&&C.contentRect.width===s.value)return;u.value=C.contentRect.height,s.value=C.contentRect.width;const{onResize:B}=e;B!==void 0&&B(C)}function J(){const{value:C}=d;C!=null&&(m.value=C.scrollTop,l.value=C.scrollLeft)}function D(C){let B=C;for(;B!==null;){if(B.style.display==="none")return!0;B=B.parentElement}return!1}return{listHeight:u,listStyle:{overflow:"auto"},keyToIndex:o,itemsStyle:b(()=>{const{itemResizable:C}=e,B=Dt(f.value.sum());return v.value,[e.itemsStyle,{boxSizing:"content-box",width:Dt(a.value),height:C?"":B,minHeight:C?B:"",paddingTop:Dt(e.paddingTop),paddingBottom:Dt(e.paddingBottom)}]}),visibleItemsStyle:b(()=>(v.value,{transform:`translateY(${Dt(f.value.sum(p.value))})`})),viewportItems:y,listElRef:d,itemsElRef:F(null),scrollTo:h,handleListResize:N,handleListScroll:Y,handleListWheel:z,handleItemResize:P}},render(){const{itemResizable:e,keyField:r,keyToIndex:t,visibleItemsTag:n}=this;return i(Ca,{onResize:this.handleListResize},{default:()=>{var a,o;return i("div",Un(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?i("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[i(n,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{const{renderCol:l,renderItemWithCols:s}=this;return this.viewportItems.map(d=>{const u=d[r],c=t.get(u),f=l!=null?i(uo,{index:c,item:d}):void 0,v=s!=null?i(uo,{index:c,item:d}):void 0,m=this.$slots.default({item:d,renderedCols:f,renderedItemWithCols:v,index:c})[0];return e?i(Ca,{key:u,onResize:p=>this.handleItemResize(u,p)},{default:()=>m}):(m.key=u,m)})}})]):(o=(a=this.$slots).empty)===null||o===void 0?void 0:o.call(a)])}})}}),cn="v-hidden",ks=Or("[v-hidden]",{display:"none!important"}),co=ge({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:r}){const t=F(null),n=F(null);function a(l){const{value:s}=t,{getCounter:d,getTail:u}=e;let c;if(d!==void 0?c=d():c=n.value,!s||!c)return;c.hasAttribute(cn)&&c.removeAttribute(cn);const{children:f}=s;if(l.showAllItemsBeforeCalculate)for(const k of f)k.hasAttribute(cn)&&k.removeAttribute(cn);const v=s.offsetWidth,m=[],p=r.tail?u==null?void 0:u():null;let y=p?p.offsetWidth:0,h=!1;const w=s.children.length-(r.tail?1:0);for(let k=0;kv){const{updateCounter:$}=e;for(let T=k;T>=0;--T){const Y=w-1-T;$!==void 0?$(Y):c.textContent=`${Y}`;const z=c.offsetWidth;if(y-=m[T],y+z<=v||T===0){h=!0,k=T-1,p&&(k===-1?(p.style.maxWidth=`${v-z}px`,p.style.boxSizing="border-box"):p.style.maxWidth="");const{onUpdateCount:N}=e;N&&N(Y);break}}}}const{onUpdateOverflow:g}=e;h?g!==void 0&&g(!0):(g!==void 0&&g(!1),c.setAttribute(cn,""))}const o=Qo();return ks.mount({id:"vueuc/overflow",head:!0,anchorMetaName:hi,ssr:o}),Qt(()=>a({showAllItemsBeforeCalculate:!1})),{selfRef:t,counterRef:n,sync:a}},render(){const{$slots:e}=this;return nn(()=>this.sync({showAllItemsBeforeCalculate:!1})),i("div",{class:"v-overflow",ref:"selfRef"},[Jo(e,"default"),e.counter?e.counter():i("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function yi(e,r){r&&(Qt(()=>{const{value:t}=e;t&&ta.registerHandler(t,r)}),gt(e,(t,n)=>{n&&ta.unregisterHandler(n)},{deep:!1}),Lr(()=>{const{value:t}=e;t&&ta.unregisterHandler(t)}))}function Rs(e,r){if(!e)return;const t=document.createElement("a");t.href=e,r!==void 0&&(t.download=r),document.body.appendChild(t),t.click(),document.body.removeChild(t)}const Ss=new WeakSet;function vr(e){Ss.add(e)}function fo(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function ho(e){switch(e){case"tiny":return"mini";case"small":return"tiny";case"medium":return"small";case"large":return"medium";case"huge":return"large"}throw new Error(`${e} has no smaller size.`)}function wi(e){return r=>{r?e.value=r.$el:e.value=null}}function dr(e){const r=e.filter(t=>t!==void 0);if(r.length!==0)return r.length===1?r[0]:t=>{e.forEach(n=>{n&&n(t)})}}const Ps=ge({name:"ArrowDown",render(){return i("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},i("g",{"fill-rule":"nonzero"},i("path",{d:"M23.7916,15.2664 C24.0788,14.9679 24.0696,14.4931 23.7711,14.206 C23.4726,13.9188 22.9978,13.928 22.7106,14.2265 L14.7511,22.5007 L14.7511,3.74792 C14.7511,3.33371 14.4153,2.99792 14.0011,2.99792 C13.5869,2.99792 13.2511,3.33371 13.2511,3.74793 L13.2511,22.4998 L5.29259,14.2265 C5.00543,13.928 4.53064,13.9188 4.23213,14.206 C3.93361,14.4931 3.9244,14.9679 4.21157,15.2664 L13.2809,24.6944 C13.6743,25.1034 14.3289,25.1034 14.7223,24.6944 L23.7916,15.2664 Z"}))))}}),Rn=ge({name:"Backward",render(){return i("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M12.2674 15.793C11.9675 16.0787 11.4927 16.0672 11.2071 15.7673L6.20572 10.5168C5.9298 10.2271 5.9298 9.7719 6.20572 9.48223L11.2071 4.23177C11.4927 3.93184 11.9675 3.92031 12.2674 4.206C12.5673 4.49169 12.5789 4.96642 12.2932 5.26634L7.78458 9.99952L12.2932 14.7327C12.5789 15.0326 12.5673 15.5074 12.2674 15.793Z",fill:"currentColor"}))}}),Fs=ge({name:"Checkmark",render(){return i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},i("g",{fill:"none"},i("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),xi=ge({name:"ChevronRight",render(){return i("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z",fill:"currentColor"}))}}),vo=Ea("date",()=>i("svg",{width:"28px",height:"28px",viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},i("g",{"fill-rule":"nonzero"},i("path",{d:"M21.75,3 C23.5449254,3 25,4.45507456 25,6.25 L25,21.75 C25,23.5449254 23.5449254,25 21.75,25 L6.25,25 C4.45507456,25 3,23.5449254 3,21.75 L3,6.25 C3,4.45507456 4.45507456,3 6.25,3 L21.75,3 Z M23.5,9.503 L4.5,9.503 L4.5,21.75 C4.5,22.7164983 5.28350169,23.5 6.25,23.5 L21.75,23.5 C22.7164983,23.5 23.5,22.7164983 23.5,21.75 L23.5,9.503 Z M21.75,4.5 L6.25,4.5 C5.28350169,4.5 4.5,5.28350169 4.5,6.25 L4.5,8.003 L23.5,8.003 L23.5,6.25 C23.5,5.28350169 22.7164983,4.5 21.75,4.5 Z"}))))),Ts=ge({name:"Empty",render(){return i("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),i("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),Sn=ge({name:"FastBackward",render(){return i("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M8.73171,16.7949 C9.03264,17.0795 9.50733,17.0663 9.79196,16.7654 C10.0766,16.4644 10.0634,15.9897 9.76243,15.7051 L4.52339,10.75 L17.2471,10.75 C17.6613,10.75 17.9971,10.4142 17.9971,10 C17.9971,9.58579 17.6613,9.25 17.2471,9.25 L4.52112,9.25 L9.76243,4.29275 C10.0634,4.00812 10.0766,3.53343 9.79196,3.2325 C9.50733,2.93156 9.03264,2.91834 8.73171,3.20297 L2.31449,9.27241 C2.14819,9.4297 2.04819,9.62981 2.01448,9.8386 C2.00308,9.89058 1.99707,9.94459 1.99707,10 C1.99707,10.0576 2.00356,10.1137 2.01585,10.1675 C2.05084,10.3733 2.15039,10.5702 2.31449,10.7254 L8.73171,16.7949 Z"}))))}}),Pn=ge({name:"FastForward",render(){return i("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z"}))))}}),_s=ge({name:"Filter",render(){return i("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},i("g",{"fill-rule":"nonzero"},i("path",{d:"M17,19 C17.5522847,19 18,19.4477153 18,20 C18,20.5522847 17.5522847,21 17,21 L11,21 C10.4477153,21 10,20.5522847 10,20 C10,19.4477153 10.4477153,19 11,19 L17,19 Z M21,13 C21.5522847,13 22,13.4477153 22,14 C22,14.5522847 21.5522847,15 21,15 L7,15 C6.44771525,15 6,14.5522847 6,14 C6,13.4477153 6.44771525,13 7,13 L21,13 Z M24,7 C24.5522847,7 25,7.44771525 25,8 C25,8.55228475 24.5522847,9 24,9 L4,9 C3.44771525,9 3,8.55228475 3,8 C3,7.44771525 3.44771525,7 4,7 L24,7 Z"}))))}}),Fn=ge({name:"Forward",render(){return i("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M7.73271 4.20694C8.03263 3.92125 8.50737 3.93279 8.79306 4.23271L13.7944 9.48318C14.0703 9.77285 14.0703 10.2281 13.7944 10.5178L8.79306 15.7682C8.50737 16.0681 8.03263 16.0797 7.73271 15.794C7.43279 15.5083 7.42125 15.0336 7.70694 14.7336L12.2155 10.0005L7.70694 5.26729C7.42125 4.96737 7.43279 4.49264 7.73271 4.20694Z",fill:"currentColor"}))}}),mo=ge({name:"More",render(){return i("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M4,7 C4.55228,7 5,7.44772 5,8 C5,8.55229 4.55228,9 4,9 C3.44772,9 3,8.55229 3,8 C3,7.44772 3.44772,7 4,7 Z M8,7 C8.55229,7 9,7.44772 9,8 C9,8.55229 8.55229,9 8,9 C7.44772,9 7,8.55229 7,8 C7,7.44772 7.44772,7 8,7 Z M12,7 C12.5523,7 13,7.44772 13,8 C13,8.55229 12.5523,9 12,9 C11.4477,9 11,8.55229 11,8 C11,7.44772 11.4477,7 12,7 Z"}))))}}),Ds=ge({name:"Remove",render(){return i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},i("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:` +var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var Ce=(e,r,t)=>yl(e,typeof r!="symbol"?r+"":r,t);import{bq as wl,bc as xl,bd as Lr,br as Cl,c5 as bt,bs as F,$ as g,bW as at,bn as At,ai as ge,aH as it,aC as i,b4 as Un,bZ as Qo,bf as Zt,bb as kl,be as Zo,bO as me,aj as Jn,bo as Ot,b7 as nn,bv as Jo,bx as Ea,w as M,y as le,v as W,c as Pt,bT as xt,b$ as Ye,an as Rl,a8 as Ve,c0 as Mt,bt as ln,l as Kn,P as Sl,z as K,A as Ft,bA as er,d as Va,by as qe,bY as gn,aL as Pl,az as sr,F as mn,aM as Fl,c6 as Ln,bM as Ne,bG as pn,ax as pr,ao as ei,a_ as Tl,bU as _n,a7 as bn,D as ie,aE as Xn,aJ as ti,aK as ni,g as ri,J as _l,a6 as ai,bm as oi,ba as ii,c8 as Hr,c2 as Ol,bF as Dl,aV as La,bj as Ml,bp as li,bR as zl,bX as si,am as Il,b_ as $l,B as ft,c4 as ur,aD as Al,al as Nl,a0 as Bl,ad as El,bg as di,bw as Vl,af as Ll,X as sn,bz as Vt,bK as Hl,bL as Ul,ah as jl,ab as Yl,aI as Kl,u as Wl,ak as ql,bB as Gl,bh as Dt,a3 as dn,bS as oe,c7 as Ue,a2 as pt,ac as Ae,bN as st,aa as cr,a5 as jn,bu as ui,a4 as kn,bV as gr,av as ci,n as br,aA as Xl,h as Ql,b6 as oo,ae as Zl,e as Jl,o as es,aG as ts,a1 as ns}from"./mobile-guard-BvFpjCXb.js";import{N as Hn,T as rs}from"./Topbar-Cz_j_mBL.js";import{a as Jt,A as vn}from"./client-BRiQMdFT.js";import{o as Rn,l as hn,V as Ca,r as ta,u as yn,S as Ut,W as as,N as os,m as zt,k as is,i as Ur,d as Yt,g as jt,h as io,X as ls,C as ss,a as jr,b as fi,c as xn}from"./FormItem-Biv8w1Bg.js";import{j as ds,h as hi,e as ka,f as Dr,l as Ha,k as us,a as yr,m as vi,p as fr,B as wr,d as xr,V as Cr,u as un,g as hr,q as cs,o as mi,r as fs,n as hs,i as vs,A as ms,s as Yr,N as Sr,c as ps,b as Pr}from"./Tabs-BsN_G19n.js";import{f as gs,g as bs,N as Xt,a as zr}from"./Switch-CX4ypJCN.js";import{N as pi}from"./Alert-Dj-XqAz8.js";import"./pwa-BRtGQKIK.js";function Lt(e,r){let{target:t}=e;for(;t;){if(t.dataset&&t.dataset[r]!==void 0)return!0;t=t.parentElement}return!1}function Ua(e={},r){const t=wl({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:n,keyup:a}=e,o=d=>{switch(d.key){case"Control":t.ctrl=!0;break;case"Meta":t.command=!0,t.win=!0;break;case"Shift":t.shift=!0;break;case"Tab":t.tab=!0;break}n!==void 0&&Object.keys(n).forEach(u=>{if(u!==d.key)return;const c=n[u];if(typeof c=="function")c(d);else{const{stop:f=!1,prevent:v=!1}=c;f&&d.stopPropagation(),v&&d.preventDefault(),c.handler(d)}})},l=d=>{switch(d.key){case"Control":t.ctrl=!1;break;case"Meta":t.command=!1,t.win=!1;break;case"Shift":t.shift=!1;break;case"Tab":t.tab=!1;break}a!==void 0&&Object.keys(a).forEach(u=>{if(u!==d.key)return;const c=a[u];if(typeof c=="function")c(d);else{const{stop:f=!1,prevent:v=!1}=c;f&&d.stopPropagation(),v&&d.preventDefault(),c.handler(d)}})},s=()=>{(r===void 0||r.value)&&(hn("keydown",document,o),hn("keyup",document,l)),r!==void 0&&bt(r,d=>{d?(hn("keydown",document,o),hn("keyup",document,l)):(Rn("keydown",document,o),Rn("keyup",document,l))})};return ds()?(xl(s),Lr(()=>{(r===void 0||r.value)&&(Rn("keydown",document,o),Rn("keyup",document,l))})):s(),Cl(t)}function ys(e,r,t){const n=F(e.value);let a=null;return bt(e,o=>{a!==null&&window.clearTimeout(a),o===!0?t&&!t.value?n.value=!0:a=window.setTimeout(()=>{n.value=!0},r):n.value=!1}),n}function lo(e){return e&-e}class gi{constructor(r,t){this.l=r,this.min=t;const n=new Array(r+1);for(let a=0;aa)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let o=r*n;for(;r>0;)o+=t[r],r-=lo(r);return o}getBound(r){let t=0,n=this.l;for(;n>t;){const a=Math.floor((t+n)/2),o=this.sum(a);if(o>r){n=a;continue}else if(o"u"?!1:(Fr===void 0&&("matchMedia"in window?Fr=window.matchMedia("(pointer:coarse)").matches:Fr=!1),Fr)}let na;function so(){return typeof document>"u"?1:(na===void 0&&(na="chrome"in window?window.devicePixelRatio:1),na)}const bi="VVirtualListXScroll";function xs({columnsRef:e,renderColRef:r,renderItemWithColsRef:t}){const n=F(0),a=F(0),o=g(()=>{const u=e.value;if(u.length===0)return null;const c=new gi(u.length,0);return u.forEach((f,v)=>{c.add(v,f.width)}),c}),l=at(()=>{const u=o.value;return u!==null?Math.max(u.getBound(a.value)-1,0):0}),s=u=>{const c=o.value;return c!==null?c.sum(u):0},d=at(()=>{const u=o.value;return u!==null?Math.min(u.getBound(a.value+n.value)+1,e.value.length-1):0});return At(bi,{startIndexRef:l,endIndexRef:d,columnsRef:e,renderColRef:r,renderItemWithColsRef:t,getLeft:s}),{listWidthRef:n,scrollLeftRef:a}}const uo=ge({name:"VirtualListRow",props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){const{startIndexRef:e,endIndexRef:r,columnsRef:t,getLeft:n,renderColRef:a,renderItemWithColsRef:o}=it(bi);return{startIndex:e,endIndex:r,columns:t,renderCol:a,renderItemWithCols:o,getLeft:n}},render(){const{startIndex:e,endIndex:r,columns:t,renderCol:n,renderItemWithCols:a,getLeft:o,item:l}=this;if(a!=null)return a({itemIndex:this.index,startColIndex:e,endColIndex:r,allColumns:t,item:l,getLeft:o});if(n!=null){const s=[];for(let d=e;d<=r;++d){const u=t[d];s.push(n({column:u,left:o(d),item:l}))}return s}return null}}),Cs=Dr(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[Dr("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[Dr("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),tr=ge({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const r=Qo();Cs.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:hi,ssr:r}),Zt(()=>{const{defaultScrollIndex:C,defaultScrollKey:B}=e;C!=null?h({index:C}):B!=null&&h({key:B})});let t=!1,n=!1;kl(()=>{if(t=!1,!n){n=!0;return}h({top:m.value,left:l.value})}),Zo(()=>{t=!0,n||(n=!0)});const a=at(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let C=0;return e.columns.forEach(B=>{C+=B.width}),C}),o=g(()=>{const C=new Map,{keyField:B}=e;return e.items.forEach((L,Q)=>{C.set(L[B],Q)}),C}),{scrollLeftRef:l,listWidthRef:s}=xs({columnsRef:me(e,"columns"),renderColRef:me(e,"renderCol"),renderItemWithColsRef:me(e,"renderItemWithCols")}),d=F(null),u=F(void 0),c=new Map,f=g(()=>{const{items:C,itemSize:B,keyField:L}=e,Q=new gi(C.length,B);return C.forEach((q,ee)=>{const ue=q[L],te=c.get(ue);te!==void 0&&Q.add(ee,te)}),Q}),v=F(0),m=F(0),p=at(()=>Math.max(f.value.getBound(m.value-Jn(e.paddingTop))-1,0)),y=g(()=>{const{value:C}=u;if(C===void 0)return[];const{items:B,itemSize:L}=e,Q=p.value,q=Math.min(Q+Math.ceil(C/L+1),B.length-1),ee=[];for(let ue=Q;ue<=q;++ue)ee.push(B[ue]);return ee}),h=(C,B)=>{if(typeof C=="number"){b(C,B,"auto");return}const{left:L,top:Q,index:q,key:ee,position:ue,behavior:te,debounce:V=!0}=C;if(L!==void 0||Q!==void 0)b(L,Q,te);else if(q!==void 0)k(q,te,V);else if(ee!==void 0){const _=o.value.get(ee);_!==void 0&&k(_,te,V)}else ue==="bottom"?b(0,Number.MAX_SAFE_INTEGER,te):ue==="top"&&b(0,0,te)};let x,w=null;function k(C,B,L){const{value:Q}=f,q=Q.sum(C)+Jn(e.paddingTop);if(!L)d.value.scrollTo({left:0,top:q,behavior:B});else{x=C,w!==null&&window.clearTimeout(w),w=window.setTimeout(()=>{x=void 0,w=null},16);const{scrollTop:ee,offsetHeight:ue}=d.value;if(q>ee){const te=Q.get(C);q+te<=ee+ue||d.value.scrollTo({left:0,top:q+te-ue,behavior:B})}else d.value.scrollTo({left:0,top:q,behavior:B})}}function b(C,B,L){d.value.scrollTo({left:C,top:B,behavior:L})}function R(C,B){var L,Q,q;if(t||e.ignoreItemResize||O(B.target))return;const{value:ee}=f,ue=o.value.get(C),te=ee.get(ue),V=(q=(Q=(L=B.borderBoxSize)===null||L===void 0?void 0:L[0])===null||Q===void 0?void 0:Q.blockSize)!==null&&q!==void 0?q:B.contentRect.height;if(V===te)return;V-e.itemSize===0?c.delete(C):c.set(C,V-e.itemSize);const E=V-te;if(E===0)return;ee.add(ue,E);const U=d.value;if(U!=null){if(x===void 0){const ne=ee.sum(ue);U.scrollTop>ne&&U.scrollBy(0,E)}else if(ueU.scrollTop+U.offsetHeight&&U.scrollBy(0,E)}J()}v.value++}const D=!ws();let T=!1;function Y(C){var B;(B=e.onScroll)===null||B===void 0||B.call(e,C),(!D||!T)&&J()}function I(C){var B;if((B=e.onWheel)===null||B===void 0||B.call(e,C),D){const L=d.value;if(L!=null){if(C.deltaX===0&&(L.scrollTop===0&&C.deltaY<=0||L.scrollTop+L.offsetHeight>=L.scrollHeight&&C.deltaY>=0))return;C.preventDefault(),L.scrollTop+=C.deltaY/so(),L.scrollLeft+=C.deltaX/so(),J(),T=!0,ka(()=>{T=!1})}}}function N(C){if(t||O(C.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(C.contentRect.height===u.value)return}else if(C.contentRect.height===u.value&&C.contentRect.width===s.value)return;u.value=C.contentRect.height,s.value=C.contentRect.width;const{onResize:B}=e;B!==void 0&&B(C)}function J(){const{value:C}=d;C!=null&&(m.value=C.scrollTop,l.value=C.scrollLeft)}function O(C){let B=C;for(;B!==null;){if(B.style.display==="none")return!0;B=B.parentElement}return!1}return{listHeight:u,listStyle:{overflow:"auto"},keyToIndex:o,itemsStyle:g(()=>{const{itemResizable:C}=e,B=Ot(f.value.sum());return v.value,[e.itemsStyle,{boxSizing:"content-box",width:Ot(a.value),height:C?"":B,minHeight:C?B:"",paddingTop:Ot(e.paddingTop),paddingBottom:Ot(e.paddingBottom)}]}),visibleItemsStyle:g(()=>(v.value,{transform:`translateY(${Ot(f.value.sum(p.value))})`})),viewportItems:y,listElRef:d,itemsElRef:F(null),scrollTo:h,handleListResize:N,handleListScroll:Y,handleListWheel:I,handleItemResize:R}},render(){const{itemResizable:e,keyField:r,keyToIndex:t,visibleItemsTag:n}=this;return i(Ca,{onResize:this.handleListResize},{default:()=>{var a,o;return i("div",Un(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?i("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[i(n,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{const{renderCol:l,renderItemWithCols:s}=this;return this.viewportItems.map(d=>{const u=d[r],c=t.get(u),f=l!=null?i(uo,{index:c,item:d}):void 0,v=s!=null?i(uo,{index:c,item:d}):void 0,m=this.$slots.default({item:d,renderedCols:f,renderedItemWithCols:v,index:c})[0];return e?i(Ca,{key:u,onResize:p=>this.handleItemResize(u,p)},{default:()=>m}):(m.key=u,m)})}})]):(o=(a=this.$slots).empty)===null||o===void 0?void 0:o.call(a)])}})}}),cn="v-hidden",ks=Dr("[v-hidden]",{display:"none!important"}),co=ge({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:r}){const t=F(null),n=F(null);function a(l){const{value:s}=t,{getCounter:d,getTail:u}=e;let c;if(d!==void 0?c=d():c=n.value,!s||!c)return;c.hasAttribute(cn)&&c.removeAttribute(cn);const{children:f}=s;if(l.showAllItemsBeforeCalculate)for(const k of f)k.hasAttribute(cn)&&k.removeAttribute(cn);const v=s.offsetWidth,m=[],p=r.tail?u==null?void 0:u():null;let y=p?p.offsetWidth:0,h=!1;const x=s.children.length-(r.tail?1:0);for(let k=0;kv){const{updateCounter:D}=e;for(let T=k;T>=0;--T){const Y=x-1-T;D!==void 0?D(Y):c.textContent=`${Y}`;const I=c.offsetWidth;if(y-=m[T],y+I<=v||T===0){h=!0,k=T-1,p&&(k===-1?(p.style.maxWidth=`${v-I}px`,p.style.boxSizing="border-box"):p.style.maxWidth="");const{onUpdateCount:N}=e;N&&N(Y);break}}}}const{onUpdateOverflow:w}=e;h?w!==void 0&&w(!0):(w!==void 0&&w(!1),c.setAttribute(cn,""))}const o=Qo();return ks.mount({id:"vueuc/overflow",head:!0,anchorMetaName:hi,ssr:o}),Zt(()=>a({showAllItemsBeforeCalculate:!1})),{selfRef:t,counterRef:n,sync:a}},render(){const{$slots:e}=this;return nn(()=>this.sync({showAllItemsBeforeCalculate:!1})),i("div",{class:"v-overflow",ref:"selfRef"},[Jo(e,"default"),e.counter?e.counter():i("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function yi(e,r){r&&(Zt(()=>{const{value:t}=e;t&&ta.registerHandler(t,r)}),bt(e,(t,n)=>{n&&ta.unregisterHandler(n)},{deep:!1}),Lr(()=>{const{value:t}=e;t&&ta.unregisterHandler(t)}))}function Rs(e,r){if(!e)return;const t=document.createElement("a");t.href=e,r!==void 0&&(t.download=r),document.body.appendChild(t),t.click(),document.body.removeChild(t)}const Ss=new WeakSet;function vr(e){Ss.add(e)}function fo(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function ho(e){switch(e){case"tiny":return"mini";case"small":return"tiny";case"medium":return"small";case"large":return"medium";case"huge":return"large"}throw new Error(`${e} has no smaller size.`)}function wi(e){return r=>{r?e.value=r.$el:e.value=null}}function dr(e){const r=e.filter(t=>t!==void 0);if(r.length!==0)return r.length===1?r[0]:t=>{e.forEach(n=>{n&&n(t)})}}const Ps=ge({name:"ArrowDown",render(){return i("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},i("g",{"fill-rule":"nonzero"},i("path",{d:"M23.7916,15.2664 C24.0788,14.9679 24.0696,14.4931 23.7711,14.206 C23.4726,13.9188 22.9978,13.928 22.7106,14.2265 L14.7511,22.5007 L14.7511,3.74792 C14.7511,3.33371 14.4153,2.99792 14.0011,2.99792 C13.5869,2.99792 13.2511,3.33371 13.2511,3.74793 L13.2511,22.4998 L5.29259,14.2265 C5.00543,13.928 4.53064,13.9188 4.23213,14.206 C3.93361,14.4931 3.9244,14.9679 4.21157,15.2664 L13.2809,24.6944 C13.6743,25.1034 14.3289,25.1034 14.7223,24.6944 L23.7916,15.2664 Z"}))))}}),Sn=ge({name:"Backward",render(){return i("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M12.2674 15.793C11.9675 16.0787 11.4927 16.0672 11.2071 15.7673L6.20572 10.5168C5.9298 10.2271 5.9298 9.7719 6.20572 9.48223L11.2071 4.23177C11.4927 3.93184 11.9675 3.92031 12.2674 4.206C12.5673 4.49169 12.5789 4.96642 12.2932 5.26634L7.78458 9.99952L12.2932 14.7327C12.5789 15.0326 12.5673 15.5074 12.2674 15.793Z",fill:"currentColor"}))}}),Fs=ge({name:"Checkmark",render(){return i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},i("g",{fill:"none"},i("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),xi=ge({name:"ChevronRight",render(){return i("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z",fill:"currentColor"}))}}),vo=Ea("date",()=>i("svg",{width:"28px",height:"28px",viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},i("g",{"fill-rule":"nonzero"},i("path",{d:"M21.75,3 C23.5449254,3 25,4.45507456 25,6.25 L25,21.75 C25,23.5449254 23.5449254,25 21.75,25 L6.25,25 C4.45507456,25 3,23.5449254 3,21.75 L3,6.25 C3,4.45507456 4.45507456,3 6.25,3 L21.75,3 Z M23.5,9.503 L4.5,9.503 L4.5,21.75 C4.5,22.7164983 5.28350169,23.5 6.25,23.5 L21.75,23.5 C22.7164983,23.5 23.5,22.7164983 23.5,21.75 L23.5,9.503 Z M21.75,4.5 L6.25,4.5 C5.28350169,4.5 4.5,5.28350169 4.5,6.25 L4.5,8.003 L23.5,8.003 L23.5,6.25 C23.5,5.28350169 22.7164983,4.5 21.75,4.5 Z"}))))),Ts=ge({name:"Empty",render(){return i("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),i("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),Pn=ge({name:"FastBackward",render(){return i("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M8.73171,16.7949 C9.03264,17.0795 9.50733,17.0663 9.79196,16.7654 C10.0766,16.4644 10.0634,15.9897 9.76243,15.7051 L4.52339,10.75 L17.2471,10.75 C17.6613,10.75 17.9971,10.4142 17.9971,10 C17.9971,9.58579 17.6613,9.25 17.2471,9.25 L4.52112,9.25 L9.76243,4.29275 C10.0634,4.00812 10.0766,3.53343 9.79196,3.2325 C9.50733,2.93156 9.03264,2.91834 8.73171,3.20297 L2.31449,9.27241 C2.14819,9.4297 2.04819,9.62981 2.01448,9.8386 C2.00308,9.89058 1.99707,9.94459 1.99707,10 C1.99707,10.0576 2.00356,10.1137 2.01585,10.1675 C2.05084,10.3733 2.15039,10.5702 2.31449,10.7254 L8.73171,16.7949 Z"}))))}}),Fn=ge({name:"FastForward",render(){return i("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z"}))))}}),_s=ge({name:"Filter",render(){return i("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},i("g",{"fill-rule":"nonzero"},i("path",{d:"M17,19 C17.5522847,19 18,19.4477153 18,20 C18,20.5522847 17.5522847,21 17,21 L11,21 C10.4477153,21 10,20.5522847 10,20 C10,19.4477153 10.4477153,19 11,19 L17,19 Z M21,13 C21.5522847,13 22,13.4477153 22,14 C22,14.5522847 21.5522847,15 21,15 L7,15 C6.44771525,15 6,14.5522847 6,14 C6,13.4477153 6.44771525,13 7,13 L21,13 Z M24,7 C24.5522847,7 25,7.44771525 25,8 C25,8.55228475 24.5522847,9 24,9 L4,9 C3.44771525,9 3,8.55228475 3,8 C3,7.44771525 3.44771525,7 4,7 L24,7 Z"}))))}}),Tn=ge({name:"Forward",render(){return i("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M7.73271 4.20694C8.03263 3.92125 8.50737 3.93279 8.79306 4.23271L13.7944 9.48318C14.0703 9.77285 14.0703 10.2281 13.7944 10.5178L8.79306 15.7682C8.50737 16.0681 8.03263 16.0797 7.73271 15.794C7.43279 15.5083 7.42125 15.0336 7.70694 14.7336L12.2155 10.0005L7.70694 5.26729C7.42125 4.96737 7.43279 4.49264 7.73271 4.20694Z",fill:"currentColor"}))}}),mo=ge({name:"More",render(){return i("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M4,7 C4.55228,7 5,7.44772 5,8 C5,8.55229 4.55228,9 4,9 C3.44772,9 3,8.55229 3,8 C3,7.44772 3.44772,7 4,7 Z M8,7 C8.55229,7 9,7.44772 9,8 C9,8.55229 8.55229,9 8,9 C7.44772,9 7,8.55229 7,8 C7,7.44772 7.44772,7 8,7 Z M12,7 C12.5523,7 13,7.44772 13,8 C13,8.55229 12.5523,9 12,9 C11.4477,9 11,8.55229 11,8 C11,7.44772 11.4477,7 12,7 Z"}))))}}),Os=ge({name:"Remove",render(){return i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},i("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:` fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px; - `}))}}),Os=Ea("time",()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},i("path",{d:"M256,64C150,64,64,150,64,256s86,192,192,192,192-86,192-192S362,64,256,64Z",style:` + `}))}}),Ds=Ea("time",()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},i("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; @@ -15,7 +15,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px; - `}))),Ms=Ea("to",()=>i("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z"}))))),_n=ge({props:{onFocus:Function,onBlur:Function},setup(e){return()=>i("div",{style:"width: 0; height: 0",tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}});function po(e){return Array.isArray(e)?e:[e]}const Ra={STOP:"STOP"};function Ci(e,r){const t=r(e);e.children!==void 0&&t!==Ra.STOP&&e.children.forEach(n=>Ci(n,r))}function zs(e,r={}){const{preserveGroup:t=!1}=r,n=[],a=t?l=>{l.isLeaf||(n.push(l.key),o(l.children))}:l=>{l.isLeaf||(l.isGroup||n.push(l.key),o(l.children))};function o(l){l.forEach(a)}return o(e),n}function Is(e,r){const{isLeaf:t}=e;return t!==void 0?t:!r(e)}function $s(e){return e.children}function As(e){return e.key}function Ns(){return!1}function Bs(e,r){const{isLeaf:t}=e;return!(t===!1&&!Array.isArray(r(e)))}function Es(e){return e.disabled===!0}function Vs(e,r){return e.isLeaf===!1&&!Array.isArray(r(e))}function ra(e){var r;return e==null?[]:Array.isArray(e)?e:(r=e.checkedKeys)!==null&&r!==void 0?r:[]}function aa(e){var r;return e==null||Array.isArray(e)?[]:(r=e.indeterminateKeys)!==null&&r!==void 0?r:[]}function Ls(e,r){const t=new Set(e);return r.forEach(n=>{t.has(n)||t.add(n)}),Array.from(t)}function Hs(e,r){const t=new Set(e);return r.forEach(n=>{t.has(n)&&t.delete(n)}),Array.from(t)}function Us(e){return(e==null?void 0:e.type)==="group"}function js(e){const r=new Map;return e.forEach((t,n)=>{r.set(t.key,n)}),t=>{var n;return(n=r.get(t))!==null&&n!==void 0?n:null}}class Ys extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function Ks(e,r,t,n){return Ir(r.concat(e),t,n,!1)}function Ws(e,r){const t=new Set;return e.forEach(n=>{const a=r.treeNodeMap.get(n);if(a!==void 0){let o=a.parent;for(;o!==null&&!(o.disabled||t.has(o.key));)t.add(o.key),o=o.parent}}),t}function qs(e,r,t,n){const a=Ir(r,t,n,!1),o=Ir(e,t,n,!0),l=Ws(e,t),s=[];return a.forEach(d=>{(o.has(d)||l.has(d))&&s.push(d)}),s.forEach(d=>a.delete(d)),a}function oa(e,r){const{checkedKeys:t,keysToCheck:n,keysToUncheck:a,indeterminateKeys:o,cascade:l,leafOnly:s,checkStrategy:d,allowNotLoaded:u}=e;if(!l)return n!==void 0?{checkedKeys:Ls(t,n),indeterminateKeys:Array.from(o)}:a!==void 0?{checkedKeys:Hs(t,a),indeterminateKeys:Array.from(o)}:{checkedKeys:Array.from(t),indeterminateKeys:Array.from(o)};const{levelTreeNodeMap:c}=r;let f;a!==void 0?f=qs(a,t,r,u):n!==void 0?f=Ks(n,t,r,u):f=Ir(t,r,u,!1);const v=d==="parent",m=d==="child"||s,p=f,y=new Set,h=Math.max.apply(null,Array.from(c.keys()));for(let w=h;w>=0;w-=1){const g=w===0,k=c.get(w);for(const x of k){if(x.isLeaf)continue;const{key:P,shallowLoaded:$}=x;if(m&&$&&x.children.forEach(N=>{!N.disabled&&!N.isLeaf&&N.shallowLoaded&&p.has(N.key)&&p.delete(N.key)}),x.disabled||!$)continue;let T=!0,Y=!1,z=!0;for(const N of x.children){const J=N.key;if(!N.disabled){if(z&&(z=!1),p.has(J))Y=!0;else if(y.has(J)){Y=!0,T=!1;break}else if(T=!1,Y)break}}T&&!z?(v&&x.children.forEach(N=>{!N.disabled&&p.has(N.key)&&p.delete(N.key)}),p.add(P)):Y&&y.add(P),g&&m&&p.has(P)&&p.delete(P)}}return{checkedKeys:Array.from(p),indeterminateKeys:Array.from(y)}}function Ir(e,r,t,n){const{treeNodeMap:a,getChildren:o}=r,l=new Set,s=new Set(e);return e.forEach(d=>{const u=a.get(d);u!==void 0&&Ci(u,c=>{if(c.disabled)return Ra.STOP;const{key:f}=c;if(!l.has(f)&&(l.add(f),s.add(f),Vs(c.rawNode,o))){if(n)return Ra.STOP;if(!t)throw new Ys}})}),s}function Gs(e,{includeGroup:r=!1,includeSelf:t=!0},n){var a;const o=n.treeNodeMap;let l=e==null?null:(a=o.get(e))!==null&&a!==void 0?a:null;const s={keyPath:[],treeNodePath:[],treeNode:l};if(l!=null&&l.ignored)return s.treeNode=null,s;for(;l;)!l.ignored&&(r||!l.isGroup)&&s.treeNodePath.push(l),l=l.parent;return s.treeNodePath.reverse(),t||s.treeNodePath.pop(),s.keyPath=s.treeNodePath.map(d=>d.key),s}function Xs(e){if(e.length===0)return null;const r=e[0];return r.isGroup||r.ignored||r.disabled?r.getNext():r}function Qs(e,r){const t=e.siblings,n=t.length,{index:a}=e;return r?t[(a+1)%n]:a===t.length-1?null:t[a+1]}function go(e,r,{loop:t=!1,includeDisabled:n=!1}={}){const a=r==="prev"?Zs:Qs,o={reverse:r==="prev"};let l=!1,s=null;function d(u){if(u!==null){if(u===e){if(!l)l=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!u.disabled||n)&&!u.ignored&&!u.isGroup){s=u;return}if(u.isGroup){const c=ja(u,o);c!==null?s=c:d(a(u,t))}else{const c=a(u,!1);if(c!==null)d(c);else{const f=Js(u);f!=null&&f.isGroup?d(a(f,t)):t&&d(a(u,!0))}}}}return d(e),s}function Zs(e,r){const t=e.siblings,n=t.length,{index:a}=e;return r?t[(a-1+n)%n]:a===0?null:t[a-1]}function Js(e){return e.parent}function ja(e,r={}){const{reverse:t=!1}=r,{children:n}=e;if(n){const{length:a}=n,o=t?a-1:0,l=t?-1:a,s=t?-1:1;for(let d=o;d!==l;d+=s){const u=n[d];if(!u.disabled&&!u.ignored)if(u.isGroup){const c=ja(u,r);if(c!==null)return c}else return u}}return null}const ed={getChild(){return this.ignored?null:ja(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return go(this,"next",e)},getPrev(e={}){return go(this,"prev",e)}};function td(e,r){const t=r?new Set(r):void 0,n=[];function a(o){o.forEach(l=>{n.push(l),!(l.isLeaf||!l.children||l.ignored)&&(l.isGroup||t===void 0||t.has(l.key))&&a(l.children)})}return a(e),n}function nd(e,r){const t=e.key;for(;r;){if(r.key===t)return!0;r=r.parent}return!1}function ki(e,r,t,n,a,o=null,l=0){const s=[];return e.forEach((d,u)=>{var c;const f=Object.create(n);if(f.rawNode=d,f.siblings=s,f.level=l,f.index=u,f.isFirstChild=u===0,f.isLastChild=u+1===e.length,f.parent=o,!f.ignored){const v=a(d);Array.isArray(v)&&(f.children=ki(v,r,t,n,a,f,l+1))}s.push(f),r.set(f.key,f),t.has(l)||t.set(l,[]),(c=t.get(l))===null||c===void 0||c.push(f)}),s}function Kr(e,r={}){var t;const n=new Map,a=new Map,{getDisabled:o=Es,getIgnored:l=Ns,getIsGroup:s=Us,getKey:d=As}=r,u=(t=r.getChildren)!==null&&t!==void 0?t:$s,c=r.ignoreEmptyChildren?x=>{const P=u(x);return Array.isArray(P)?P.length?P:null:P}:u,f=Object.assign({get key(){return d(this.rawNode)},get disabled(){return o(this.rawNode)},get isGroup(){return s(this.rawNode)},get isLeaf(){return Is(this.rawNode,c)},get shallowLoaded(){return Bs(this.rawNode,c)},get ignored(){return l(this.rawNode)},contains(x){return nd(this,x)}},ed),v=ki(e,n,a,f,c);function m(x){if(x==null)return null;const P=n.get(x);return P&&!P.isGroup&&!P.ignored?P:null}function p(x){if(x==null)return null;const P=n.get(x);return P&&!P.ignored?P:null}function y(x,P){const $=p(x);return $?$.getPrev(P):null}function h(x,P){const $=p(x);return $?$.getNext(P):null}function w(x){const P=p(x);return P?P.getParent():null}function g(x){const P=p(x);return P?P.getChild():null}const k={treeNodes:v,treeNodeMap:n,levelTreeNodeMap:a,maxLevel:Math.max(...a.keys()),getChildren:c,getFlattenedNodes(x){return td(v,x)},getNode:m,getPrev:y,getNext:h,getParent:w,getChild:g,getFirstAvailableNode(){return Xs(v)},getPath(x,P={}){return Gs(x,P,k)},getCheckedKeys(x,P={}){const{cascade:$=!0,leafOnly:T=!1,checkStrategy:Y="all",allowNotLoaded:z=!1}=P;return oa({checkedKeys:ra(x),indeterminateKeys:aa(x),cascade:$,leafOnly:T,checkStrategy:Y,allowNotLoaded:z},k)},check(x,P,$={}){const{cascade:T=!0,leafOnly:Y=!1,checkStrategy:z="all",allowNotLoaded:N=!1}=$;return oa({checkedKeys:ra(P),indeterminateKeys:aa(P),keysToCheck:x==null?[]:po(x),cascade:T,leafOnly:Y,checkStrategy:z,allowNotLoaded:N},k)},uncheck(x,P,$={}){const{cascade:T=!0,leafOnly:Y=!1,checkStrategy:z="all",allowNotLoaded:N=!1}=$;return oa({checkedKeys:ra(P),indeterminateKeys:aa(P),keysToUncheck:x==null?[]:po(x),cascade:T,leafOnly:Y,checkStrategy:z,allowNotLoaded:N},k)},getNonLeafKeys(x={}){return zs(v,x)}};return k}const rd=O("empty",` + `}))),Ms=Ea("to",()=>i("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z"}))))),On=ge({props:{onFocus:Function,onBlur:Function},setup(e){return()=>i("div",{style:"width: 0; height: 0",tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}});function po(e){return Array.isArray(e)?e:[e]}const Ra={STOP:"STOP"};function Ci(e,r){const t=r(e);e.children!==void 0&&t!==Ra.STOP&&e.children.forEach(n=>Ci(n,r))}function zs(e,r={}){const{preserveGroup:t=!1}=r,n=[],a=t?l=>{l.isLeaf||(n.push(l.key),o(l.children))}:l=>{l.isLeaf||(l.isGroup||n.push(l.key),o(l.children))};function o(l){l.forEach(a)}return o(e),n}function Is(e,r){const{isLeaf:t}=e;return t!==void 0?t:!r(e)}function $s(e){return e.children}function As(e){return e.key}function Ns(){return!1}function Bs(e,r){const{isLeaf:t}=e;return!(t===!1&&!Array.isArray(r(e)))}function Es(e){return e.disabled===!0}function Vs(e,r){return e.isLeaf===!1&&!Array.isArray(r(e))}function ra(e){var r;return e==null?[]:Array.isArray(e)?e:(r=e.checkedKeys)!==null&&r!==void 0?r:[]}function aa(e){var r;return e==null||Array.isArray(e)?[]:(r=e.indeterminateKeys)!==null&&r!==void 0?r:[]}function Ls(e,r){const t=new Set(e);return r.forEach(n=>{t.has(n)||t.add(n)}),Array.from(t)}function Hs(e,r){const t=new Set(e);return r.forEach(n=>{t.has(n)&&t.delete(n)}),Array.from(t)}function Us(e){return(e==null?void 0:e.type)==="group"}function js(e){const r=new Map;return e.forEach((t,n)=>{r.set(t.key,n)}),t=>{var n;return(n=r.get(t))!==null&&n!==void 0?n:null}}class Ys extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function Ks(e,r,t,n){return Ir(r.concat(e),t,n,!1)}function Ws(e,r){const t=new Set;return e.forEach(n=>{const a=r.treeNodeMap.get(n);if(a!==void 0){let o=a.parent;for(;o!==null&&!(o.disabled||t.has(o.key));)t.add(o.key),o=o.parent}}),t}function qs(e,r,t,n){const a=Ir(r,t,n,!1),o=Ir(e,t,n,!0),l=Ws(e,t),s=[];return a.forEach(d=>{(o.has(d)||l.has(d))&&s.push(d)}),s.forEach(d=>a.delete(d)),a}function oa(e,r){const{checkedKeys:t,keysToCheck:n,keysToUncheck:a,indeterminateKeys:o,cascade:l,leafOnly:s,checkStrategy:d,allowNotLoaded:u}=e;if(!l)return n!==void 0?{checkedKeys:Ls(t,n),indeterminateKeys:Array.from(o)}:a!==void 0?{checkedKeys:Hs(t,a),indeterminateKeys:Array.from(o)}:{checkedKeys:Array.from(t),indeterminateKeys:Array.from(o)};const{levelTreeNodeMap:c}=r;let f;a!==void 0?f=qs(a,t,r,u):n!==void 0?f=Ks(n,t,r,u):f=Ir(t,r,u,!1);const v=d==="parent",m=d==="child"||s,p=f,y=new Set,h=Math.max.apply(null,Array.from(c.keys()));for(let x=h;x>=0;x-=1){const w=x===0,k=c.get(x);for(const b of k){if(b.isLeaf)continue;const{key:R,shallowLoaded:D}=b;if(m&&D&&b.children.forEach(N=>{!N.disabled&&!N.isLeaf&&N.shallowLoaded&&p.has(N.key)&&p.delete(N.key)}),b.disabled||!D)continue;let T=!0,Y=!1,I=!0;for(const N of b.children){const J=N.key;if(!N.disabled){if(I&&(I=!1),p.has(J))Y=!0;else if(y.has(J)){Y=!0,T=!1;break}else if(T=!1,Y)break}}T&&!I?(v&&b.children.forEach(N=>{!N.disabled&&p.has(N.key)&&p.delete(N.key)}),p.add(R)):Y&&y.add(R),w&&m&&p.has(R)&&p.delete(R)}}return{checkedKeys:Array.from(p),indeterminateKeys:Array.from(y)}}function Ir(e,r,t,n){const{treeNodeMap:a,getChildren:o}=r,l=new Set,s=new Set(e);return e.forEach(d=>{const u=a.get(d);u!==void 0&&Ci(u,c=>{if(c.disabled)return Ra.STOP;const{key:f}=c;if(!l.has(f)&&(l.add(f),s.add(f),Vs(c.rawNode,o))){if(n)return Ra.STOP;if(!t)throw new Ys}})}),s}function Gs(e,{includeGroup:r=!1,includeSelf:t=!0},n){var a;const o=n.treeNodeMap;let l=e==null?null:(a=o.get(e))!==null&&a!==void 0?a:null;const s={keyPath:[],treeNodePath:[],treeNode:l};if(l!=null&&l.ignored)return s.treeNode=null,s;for(;l;)!l.ignored&&(r||!l.isGroup)&&s.treeNodePath.push(l),l=l.parent;return s.treeNodePath.reverse(),t||s.treeNodePath.pop(),s.keyPath=s.treeNodePath.map(d=>d.key),s}function Xs(e){if(e.length===0)return null;const r=e[0];return r.isGroup||r.ignored||r.disabled?r.getNext():r}function Qs(e,r){const t=e.siblings,n=t.length,{index:a}=e;return r?t[(a+1)%n]:a===t.length-1?null:t[a+1]}function go(e,r,{loop:t=!1,includeDisabled:n=!1}={}){const a=r==="prev"?Zs:Qs,o={reverse:r==="prev"};let l=!1,s=null;function d(u){if(u!==null){if(u===e){if(!l)l=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!u.disabled||n)&&!u.ignored&&!u.isGroup){s=u;return}if(u.isGroup){const c=ja(u,o);c!==null?s=c:d(a(u,t))}else{const c=a(u,!1);if(c!==null)d(c);else{const f=Js(u);f!=null&&f.isGroup?d(a(f,t)):t&&d(a(u,!0))}}}}return d(e),s}function Zs(e,r){const t=e.siblings,n=t.length,{index:a}=e;return r?t[(a-1+n)%n]:a===0?null:t[a-1]}function Js(e){return e.parent}function ja(e,r={}){const{reverse:t=!1}=r,{children:n}=e;if(n){const{length:a}=n,o=t?a-1:0,l=t?-1:a,s=t?-1:1;for(let d=o;d!==l;d+=s){const u=n[d];if(!u.disabled&&!u.ignored)if(u.isGroup){const c=ja(u,r);if(c!==null)return c}else return u}}return null}const ed={getChild(){return this.ignored?null:ja(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return go(this,"next",e)},getPrev(e={}){return go(this,"prev",e)}};function td(e,r){const t=r?new Set(r):void 0,n=[];function a(o){o.forEach(l=>{n.push(l),!(l.isLeaf||!l.children||l.ignored)&&(l.isGroup||t===void 0||t.has(l.key))&&a(l.children)})}return a(e),n}function nd(e,r){const t=e.key;for(;r;){if(r.key===t)return!0;r=r.parent}return!1}function ki(e,r,t,n,a,o=null,l=0){const s=[];return e.forEach((d,u)=>{var c;const f=Object.create(n);if(f.rawNode=d,f.siblings=s,f.level=l,f.index=u,f.isFirstChild=u===0,f.isLastChild=u+1===e.length,f.parent=o,!f.ignored){const v=a(d);Array.isArray(v)&&(f.children=ki(v,r,t,n,a,f,l+1))}s.push(f),r.set(f.key,f),t.has(l)||t.set(l,[]),(c=t.get(l))===null||c===void 0||c.push(f)}),s}function Kr(e,r={}){var t;const n=new Map,a=new Map,{getDisabled:o=Es,getIgnored:l=Ns,getIsGroup:s=Us,getKey:d=As}=r,u=(t=r.getChildren)!==null&&t!==void 0?t:$s,c=r.ignoreEmptyChildren?b=>{const R=u(b);return Array.isArray(R)?R.length?R:null:R}:u,f=Object.assign({get key(){return d(this.rawNode)},get disabled(){return o(this.rawNode)},get isGroup(){return s(this.rawNode)},get isLeaf(){return Is(this.rawNode,c)},get shallowLoaded(){return Bs(this.rawNode,c)},get ignored(){return l(this.rawNode)},contains(b){return nd(this,b)}},ed),v=ki(e,n,a,f,c);function m(b){if(b==null)return null;const R=n.get(b);return R&&!R.isGroup&&!R.ignored?R:null}function p(b){if(b==null)return null;const R=n.get(b);return R&&!R.ignored?R:null}function y(b,R){const D=p(b);return D?D.getPrev(R):null}function h(b,R){const D=p(b);return D?D.getNext(R):null}function x(b){const R=p(b);return R?R.getParent():null}function w(b){const R=p(b);return R?R.getChild():null}const k={treeNodes:v,treeNodeMap:n,levelTreeNodeMap:a,maxLevel:Math.max(...a.keys()),getChildren:c,getFlattenedNodes(b){return td(v,b)},getNode:m,getPrev:y,getNext:h,getParent:x,getChild:w,getFirstAvailableNode(){return Xs(v)},getPath(b,R={}){return Gs(b,R,k)},getCheckedKeys(b,R={}){const{cascade:D=!0,leafOnly:T=!1,checkStrategy:Y="all",allowNotLoaded:I=!1}=R;return oa({checkedKeys:ra(b),indeterminateKeys:aa(b),cascade:D,leafOnly:T,checkStrategy:Y,allowNotLoaded:I},k)},check(b,R,D={}){const{cascade:T=!0,leafOnly:Y=!1,checkStrategy:I="all",allowNotLoaded:N=!1}=D;return oa({checkedKeys:ra(R),indeterminateKeys:aa(R),keysToCheck:b==null?[]:po(b),cascade:T,leafOnly:Y,checkStrategy:I,allowNotLoaded:N},k)},uncheck(b,R,D={}){const{cascade:T=!0,leafOnly:Y=!1,checkStrategy:I="all",allowNotLoaded:N=!1}=D;return oa({checkedKeys:ra(R),indeterminateKeys:aa(R),keysToUncheck:b==null?[]:po(b),cascade:T,leafOnly:Y,checkStrategy:I,allowNotLoaded:N},k)},getNonLeafKeys(b={}){return zs(v,b)}};return k}const rd=M("empty",` display: flex; flex-direction: column; align-items: center; @@ -38,7 +38,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config transition: color .3s var(--n-bezier); margin-top: 12px; color: var(--n-extra-text-color); - `)]),ad=Object.assign(Object.assign({},Ye.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),Ri=ge({name:"Empty",props:ad,setup(e){const{mergedClsPrefixRef:r,inlineThemeDisabled:t,mergedComponentPropsRef:n}=xt(e),a=Ye("Empty","-empty",rd,Rl,e,r),{localeRef:o}=yn("Empty"),l=b(()=>{var c,f,v;return(c=e.description)!==null&&c!==void 0?c:(v=(f=n==null?void 0:n.value)===null||f===void 0?void 0:f.Empty)===null||v===void 0?void 0:v.description}),s=b(()=>{var c,f;return((f=(c=n==null?void 0:n.value)===null||c===void 0?void 0:c.Empty)===null||f===void 0?void 0:f.renderIcon)||(()=>i(Ts,null))}),d=b(()=>{const{size:c}=e,{common:{cubicBezierEaseInOut:f},self:{[Ve("iconSize",c)]:v,[Ve("fontSize",c)]:m,textColor:p,iconColor:y,extraTextColor:h}}=a.value;return{"--n-icon-size":v,"--n-font-size":m,"--n-bezier":f,"--n-text-color":p,"--n-icon-color":y,"--n-extra-text-color":h}}),u=t?Mt("empty",b(()=>{let c="";const{size:f}=e;return c+=f[0],c}),d,e):void 0;return{mergedClsPrefix:r,mergedRenderIcon:s,localizedDescription:b(()=>l.value||o.value.description),cssVars:t?void 0:d,themeClass:u==null?void 0:u.themeClass,onRender:u==null?void 0:u.onRender}},render(){const{$slots:e,mergedClsPrefix:r,onRender:t}=this;return t==null||t(),i("div",{class:[`${r}-empty`,this.themeClass],style:this.cssVars},this.showIcon?i("div",{class:`${r}-empty__icon`},e.icon?e.icon():i(Pt,{clsPrefix:r},{default:this.mergedRenderIcon})):null,this.showDescription?i("div",{class:`${r}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?i("div",{class:`${r}-empty__extra`},e.extra()):null)}}),bo=ge({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:r,labelFieldRef:t,nodePropsRef:n}=it(Ha);return{labelField:t,nodeProps:n,renderLabel:e,renderOption:r}},render(){const{clsPrefix:e,renderLabel:r,renderOption:t,nodeProps:n,tmNode:{rawNode:a}}=this,o=n==null?void 0:n(a),l=r?r(a,!1):ln(a[this.labelField],a,!1),s=i("div",Object.assign({},o,{class:[`${e}-base-select-group-header`,o==null?void 0:o.class]}),l);return a.render?a.render({node:s,option:a}):t?t({node:s,option:a,selected:!1}):s}});function od(e,r){return i(Kn,{name:"fade-in-scale-up-transition"},{default:()=>e?i(Pt,{clsPrefix:r,class:`${r}-base-select-option__check`},{default:()=>i(Fs)}):null})}const yo=ge({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:r,pendingTmNodeRef:t,multipleRef:n,valueSetRef:a,renderLabelRef:o,renderOptionRef:l,labelFieldRef:s,valueFieldRef:d,showCheckmarkRef:u,nodePropsRef:c,handleOptionClick:f,handleOptionMouseEnter:v}=it(Ha),m=at(()=>{const{value:w}=t;return w?e.tmNode.key===w.key:!1});function p(w){const{tmNode:g}=e;g.disabled||f(w,g)}function y(w){const{tmNode:g}=e;g.disabled||v(w,g)}function h(w){const{tmNode:g}=e,{value:k}=m;g.disabled||k||v(w,g)}return{multiple:n,isGrouped:at(()=>{const{tmNode:w}=e,{parent:g}=w;return g&&g.rawNode.type==="group"}),showCheckmark:u,nodeProps:c,isPending:m,isSelected:at(()=>{const{value:w}=r,{value:g}=n;if(w===null)return!1;const k=e.tmNode.rawNode[d.value];if(g){const{value:x}=a;return x.has(k)}else return w===k}),labelField:s,renderLabel:o,renderOption:l,handleMouseMove:h,handleMouseEnter:y,handleClick:p}},render(){const{clsPrefix:e,tmNode:{rawNode:r},isSelected:t,isPending:n,isGrouped:a,showCheckmark:o,nodeProps:l,renderOption:s,renderLabel:d,handleClick:u,handleMouseEnter:c,handleMouseMove:f}=this,v=od(t,e),m=d?[d(r,t),o&&v]:[ln(r[this.labelField],r,t),o&&v],p=l==null?void 0:l(r),y=i("div",Object.assign({},p,{class:[`${e}-base-select-option`,r.class,p==null?void 0:p.class,{[`${e}-base-select-option--disabled`]:r.disabled,[`${e}-base-select-option--selected`]:t,[`${e}-base-select-option--grouped`]:a,[`${e}-base-select-option--pending`]:n,[`${e}-base-select-option--show-checkmark`]:o}],style:[(p==null?void 0:p.style)||"",r.style||""],onClick:dr([u,p==null?void 0:p.onClick]),onMouseenter:dr([c,p==null?void 0:p.onMouseenter]),onMousemove:dr([f,p==null?void 0:p.onMousemove])}),i("div",{class:`${e}-base-select-option__content`},m));return r.render?r.render({node:y,option:r,selected:t}):s?s({node:y,option:r,selected:t}):y}}),{cubicBezierEaseIn:wo,cubicBezierEaseOut:xo}=Sl;function or({transformOrigin:e="inherit",duration:r=".2s",enterScale:t=".9",originalTransform:n="",originalTransition:a=""}={}){return[W("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${r} ${wo}, transform ${r} ${wo} ${a&&`,${a}`}`}),W("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${r} ${xo}, transform ${r} ${xo} ${a&&`,${a}`}`}),W("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${n} scale(${t})`}),W("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${n} scale(1)`})]}const id=O("base-select-menu",` + `)]),ad=Object.assign(Object.assign({},Ye.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),Ri=ge({name:"Empty",props:ad,setup(e){const{mergedClsPrefixRef:r,inlineThemeDisabled:t,mergedComponentPropsRef:n}=xt(e),a=Ye("Empty","-empty",rd,Rl,e,r),{localeRef:o}=yn("Empty"),l=g(()=>{var c,f,v;return(c=e.description)!==null&&c!==void 0?c:(v=(f=n==null?void 0:n.value)===null||f===void 0?void 0:f.Empty)===null||v===void 0?void 0:v.description}),s=g(()=>{var c,f;return((f=(c=n==null?void 0:n.value)===null||c===void 0?void 0:c.Empty)===null||f===void 0?void 0:f.renderIcon)||(()=>i(Ts,null))}),d=g(()=>{const{size:c}=e,{common:{cubicBezierEaseInOut:f},self:{[Ve("iconSize",c)]:v,[Ve("fontSize",c)]:m,textColor:p,iconColor:y,extraTextColor:h}}=a.value;return{"--n-icon-size":v,"--n-font-size":m,"--n-bezier":f,"--n-text-color":p,"--n-icon-color":y,"--n-extra-text-color":h}}),u=t?Mt("empty",g(()=>{let c="";const{size:f}=e;return c+=f[0],c}),d,e):void 0;return{mergedClsPrefix:r,mergedRenderIcon:s,localizedDescription:g(()=>l.value||o.value.description),cssVars:t?void 0:d,themeClass:u==null?void 0:u.themeClass,onRender:u==null?void 0:u.onRender}},render(){const{$slots:e,mergedClsPrefix:r,onRender:t}=this;return t==null||t(),i("div",{class:[`${r}-empty`,this.themeClass],style:this.cssVars},this.showIcon?i("div",{class:`${r}-empty__icon`},e.icon?e.icon():i(Pt,{clsPrefix:r},{default:this.mergedRenderIcon})):null,this.showDescription?i("div",{class:`${r}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?i("div",{class:`${r}-empty__extra`},e.extra()):null)}}),bo=ge({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:r,labelFieldRef:t,nodePropsRef:n}=it(Ha);return{labelField:t,nodeProps:n,renderLabel:e,renderOption:r}},render(){const{clsPrefix:e,renderLabel:r,renderOption:t,nodeProps:n,tmNode:{rawNode:a}}=this,o=n==null?void 0:n(a),l=r?r(a,!1):ln(a[this.labelField],a,!1),s=i("div",Object.assign({},o,{class:[`${e}-base-select-group-header`,o==null?void 0:o.class]}),l);return a.render?a.render({node:s,option:a}):t?t({node:s,option:a,selected:!1}):s}});function od(e,r){return i(Kn,{name:"fade-in-scale-up-transition"},{default:()=>e?i(Pt,{clsPrefix:r,class:`${r}-base-select-option__check`},{default:()=>i(Fs)}):null})}const yo=ge({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:r,pendingTmNodeRef:t,multipleRef:n,valueSetRef:a,renderLabelRef:o,renderOptionRef:l,labelFieldRef:s,valueFieldRef:d,showCheckmarkRef:u,nodePropsRef:c,handleOptionClick:f,handleOptionMouseEnter:v}=it(Ha),m=at(()=>{const{value:x}=t;return x?e.tmNode.key===x.key:!1});function p(x){const{tmNode:w}=e;w.disabled||f(x,w)}function y(x){const{tmNode:w}=e;w.disabled||v(x,w)}function h(x){const{tmNode:w}=e,{value:k}=m;w.disabled||k||v(x,w)}return{multiple:n,isGrouped:at(()=>{const{tmNode:x}=e,{parent:w}=x;return w&&w.rawNode.type==="group"}),showCheckmark:u,nodeProps:c,isPending:m,isSelected:at(()=>{const{value:x}=r,{value:w}=n;if(x===null)return!1;const k=e.tmNode.rawNode[d.value];if(w){const{value:b}=a;return b.has(k)}else return x===k}),labelField:s,renderLabel:o,renderOption:l,handleMouseMove:h,handleMouseEnter:y,handleClick:p}},render(){const{clsPrefix:e,tmNode:{rawNode:r},isSelected:t,isPending:n,isGrouped:a,showCheckmark:o,nodeProps:l,renderOption:s,renderLabel:d,handleClick:u,handleMouseEnter:c,handleMouseMove:f}=this,v=od(t,e),m=d?[d(r,t),o&&v]:[ln(r[this.labelField],r,t),o&&v],p=l==null?void 0:l(r),y=i("div",Object.assign({},p,{class:[`${e}-base-select-option`,r.class,p==null?void 0:p.class,{[`${e}-base-select-option--disabled`]:r.disabled,[`${e}-base-select-option--selected`]:t,[`${e}-base-select-option--grouped`]:a,[`${e}-base-select-option--pending`]:n,[`${e}-base-select-option--show-checkmark`]:o}],style:[(p==null?void 0:p.style)||"",r.style||""],onClick:dr([u,p==null?void 0:p.onClick]),onMouseenter:dr([c,p==null?void 0:p.onMouseenter]),onMousemove:dr([f,p==null?void 0:p.onMousemove])}),i("div",{class:`${e}-base-select-option__content`},m));return r.render?r.render({node:y,option:r,selected:t}):s?s({node:y,option:r,selected:t}):y}}),{cubicBezierEaseIn:wo,cubicBezierEaseOut:xo}=Sl;function or({transformOrigin:e="inherit",duration:r=".2s",enterScale:t=".9",originalTransform:n="",originalTransition:a=""}={}){return[W("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${r} ${wo}, transform ${r} ${wo} ${a&&`,${a}`}`}),W("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${r} ${xo}, transform ${r} ${xo} ${a&&`,${a}`}`}),W("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${n} scale(${t})`}),W("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${n} scale(1)`})]}const id=M("base-select-menu",` line-height: 1.5; outline: none; z-index: 0; @@ -48,11 +48,11 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier); background-color: var(--n-color); -`,[O("scrollbar",` +`,[M("scrollbar",` max-height: var(--n-height); - `),O("virtual-list",` + `),M("virtual-list",` max-height: var(--n-height); - `),O("base-select-option",` + `),M("base-select-option",` min-height: var(--n-option-height); font-size: var(--n-option-font-size); display: flex; @@ -62,12 +62,12 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config white-space: nowrap; text-overflow: ellipsis; overflow: hidden; - `)]),O("base-select-group-header",` + `)]),M("base-select-group-header",` min-height: var(--n-option-height); font-size: .93em; display: flex; align-items: center; - `),O("base-select-menu-option-wrapper",` + `),M("base-select-menu-option-wrapper",` position: relative; width: 100%; `),le("loading, empty",` @@ -94,12 +94,12 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config border-color .3s var(--n-bezier); border-top: 1px solid var(--n-action-divider-color); color: var(--n-action-text-color); - `),O("base-select-group-header",` + `),M("base-select-group-header",` position: relative; cursor: default; padding: var(--n-option-padding); color: var(--n-group-header-text-color); - `),O("base-select-option",` + `),M("base-select-option",` cursor: pointer; position: relative; padding: var(--n-option-padding); @@ -145,7 +145,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config top: calc(50% - 7px); color: var(--n-option-check-color); transition: color .3s var(--n-bezier); - `,[or({enterScale:"0.5"})])])]),Si=ge({name:"InternalSelectMenu",props:Object.assign(Object.assign({},Ye.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:"medium"},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,onToggle:Function}),setup(e){const{mergedClsPrefixRef:r,mergedRtlRef:t}=xt(e),n=gn("InternalSelectMenu",t,r),a=Ye("InternalSelectMenu","-internal-select-menu",id,Pl,e,me(e,"clsPrefix")),o=F(null),l=F(null),s=F(null),d=b(()=>e.treeMate.getFlattenedNodes()),u=b(()=>js(d.value)),c=F(null);function f(){const{treeMate:_}=e;let E=null;const{value:U}=e;U===null?E=_.getFirstAvailableNode():(e.multiple?E=_.getNode((U||[])[(U||[]).length-1]):E=_.getNode(U),(!E||E.disabled)&&(E=_.getFirstAvailableNode())),B(E||null)}function v(){const{value:_}=c;_&&!e.treeMate.getNode(_.key)&&(c.value=null)}let m;gt(()=>e.show,_=>{_?m=gt(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?f():v(),nn(L)):v()},{immediate:!0}):m==null||m()},{immediate:!0}),Lr(()=>{m==null||m()});const p=b(()=>Jn(a.value.self[Ve("optionHeight",e.size)])),y=b(()=>sr(a.value.self[Ve("padding",e.size)])),h=b(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),w=b(()=>{const _=d.value;return _&&_.length===0});function g(_){const{onToggle:E}=e;E&&E(_)}function k(_){const{onScroll:E}=e;E&&E(_)}function x(_){var E;(E=s.value)===null||E===void 0||E.sync(),k(_)}function P(){var _;(_=s.value)===null||_===void 0||_.sync()}function $(){const{value:_}=c;return _||null}function T(_,E){E.disabled||B(E,!1)}function Y(_,E){E.disabled||g(E)}function z(_){var E;Lt(_,"action")||(E=e.onKeyup)===null||E===void 0||E.call(e,_)}function N(_){var E;Lt(_,"action")||(E=e.onKeydown)===null||E===void 0||E.call(e,_)}function J(_){var E;(E=e.onMousedown)===null||E===void 0||E.call(e,_),!e.focusable&&_.preventDefault()}function D(){const{value:_}=c;_&&B(_.getNext({loop:!0}),!0)}function C(){const{value:_}=c;_&&B(_.getPrev({loop:!0}),!0)}function B(_,E=!1){c.value=_,E&&L()}function L(){var _,E;const U=c.value;if(!U)return;const ne=u.value(U.key);ne!==null&&(e.virtualScroll?(_=l.value)===null||_===void 0||_.scrollTo({index:ne}):(E=s.value)===null||E===void 0||E.scrollTo({index:ne,elSize:p.value}))}function Q(_){var E,U;!((E=o.value)===null||E===void 0)&&E.contains(_.target)&&((U=e.onFocus)===null||U===void 0||U.call(e,_))}function q(_){var E,U;!((E=o.value)===null||E===void 0)&&E.contains(_.relatedTarget)||(U=e.onBlur)===null||U===void 0||U.call(e,_)}At(Ha,{handleOptionMouseEnter:T,handleOptionClick:Y,valueSetRef:h,pendingTmNodeRef:c,nodePropsRef:me(e,"nodeProps"),showCheckmarkRef:me(e,"showCheckmark"),multipleRef:me(e,"multiple"),valueRef:me(e,"value"),renderLabelRef:me(e,"renderLabel"),renderOptionRef:me(e,"renderOption"),labelFieldRef:me(e,"labelField"),valueFieldRef:me(e,"valueField")}),At(us,o),Qt(()=>{const{value:_}=s;_&&_.sync()});const ee=b(()=>{const{size:_}=e,{common:{cubicBezierEaseInOut:E},self:{height:U,borderRadius:ne,color:De,groupHeaderTextColor:he,actionDividerColor:Te,optionTextColorPressed:j,optionTextColor:be,optionTextColorDisabled:Se,optionTextColorActive:$e,optionOpacityDisabled:Ke,optionCheckColor:lt,actionTextColor:ht,optionColorPending:Qe,optionColorActive:X,loadingColor:we,loadingSize:re,optionColorActivePending:Re,[Ve("optionFontSize",_)]:Ee,[Ve("optionHeight",_)]:ze,[Ve("optionPadding",_)]:Le}}=a.value;return{"--n-height":U,"--n-action-divider-color":Te,"--n-action-text-color":ht,"--n-bezier":E,"--n-border-radius":ne,"--n-color":De,"--n-option-font-size":Ee,"--n-group-header-text-color":he,"--n-option-check-color":lt,"--n-option-color-pending":Qe,"--n-option-color-active":X,"--n-option-color-active-pending":Re,"--n-option-height":ze,"--n-option-opacity-disabled":Ke,"--n-option-text-color":be,"--n-option-text-color-active":$e,"--n-option-text-color-disabled":Se,"--n-option-text-color-pressed":j,"--n-option-padding":Le,"--n-option-padding-left":sr(Le,"left"),"--n-option-padding-right":sr(Le,"right"),"--n-loading-color":we,"--n-loading-size":re}}),{inlineThemeDisabled:ue}=e,te=ue?Mt("internal-select-menu",b(()=>e.size[0]),ee,e):void 0,V={selfRef:o,next:D,prev:C,getPendingTmNode:$};return yi(o,e.onResize),Object.assign({mergedTheme:a,mergedClsPrefix:r,rtlEnabled:n,virtualListRef:l,scrollbarRef:s,itemSize:p,padding:y,flattenedNodes:d,empty:w,virtualListContainer(){const{value:_}=l;return _==null?void 0:_.listElRef},virtualListContent(){const{value:_}=l;return _==null?void 0:_.itemsElRef},doScroll:k,handleFocusin:Q,handleFocusout:q,handleKeyUp:z,handleKeyDown:N,handleMouseDown:J,handleVirtualListResize:P,handleVirtualListScroll:x,cssVars:ue?void 0:ee,themeClass:te==null?void 0:te.themeClass,onRender:te==null?void 0:te.onRender},V)},render(){const{$slots:e,virtualScroll:r,clsPrefix:t,mergedTheme:n,themeClass:a,onRender:o}=this;return o==null||o(),i("div",{ref:"selfRef",tabindex:this.focusable?0:-1,class:[`${t}-base-select-menu`,this.rtlEnabled&&`${t}-base-select-menu--rtl`,a,this.multiple&&`${t}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},er(e.header,l=>l&&i("div",{class:`${t}-base-select-menu__header`,"data-header":!0,key:"header"},l)),this.loading?i("div",{class:`${t}-base-select-menu__loading`},i(Va,{clsPrefix:t,strokeWidth:20})):this.empty?i("div",{class:`${t}-base-select-menu__empty`,"data-empty":!0},qe(e.empty,()=>[i(Ri,{theme:n.peers.Empty,themeOverrides:n.peerOverrides.Empty,size:this.size})])):i(Ut,{ref:"scrollbarRef",theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,scrollable:this.scrollable,container:r?this.virtualListContainer:void 0,content:r?this.virtualListContent:void 0,onScroll:r?void 0:this.doScroll},{default:()=>r?i(tr,{ref:"virtualListRef",class:`${t}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:l})=>l.isGroup?i(bo,{key:l.key,clsPrefix:t,tmNode:l}):l.ignored?null:i(yo,{clsPrefix:t,key:l.key,tmNode:l})}):i("div",{class:`${t}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(l=>l.isGroup?i(bo,{key:l.key,clsPrefix:t,tmNode:l}):i(yo,{clsPrefix:t,key:l.key,tmNode:l})))}),er(e.action,l=>l&&[i("div",{class:`${t}-base-select-menu__action`,"data-action":!0,key:"action"},l),i(_n,{onFocus:this.onTabOut,key:"focus-detector"})]))}}),ld=W([O("base-selection",` + `,[or({enterScale:"0.5"})])])]),Si=ge({name:"InternalSelectMenu",props:Object.assign(Object.assign({},Ye.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:"medium"},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,onToggle:Function}),setup(e){const{mergedClsPrefixRef:r,mergedRtlRef:t}=xt(e),n=gn("InternalSelectMenu",t,r),a=Ye("InternalSelectMenu","-internal-select-menu",id,Pl,e,me(e,"clsPrefix")),o=F(null),l=F(null),s=F(null),d=g(()=>e.treeMate.getFlattenedNodes()),u=g(()=>js(d.value)),c=F(null);function f(){const{treeMate:_}=e;let E=null;const{value:U}=e;U===null?E=_.getFirstAvailableNode():(e.multiple?E=_.getNode((U||[])[(U||[]).length-1]):E=_.getNode(U),(!E||E.disabled)&&(E=_.getFirstAvailableNode())),B(E||null)}function v(){const{value:_}=c;_&&!e.treeMate.getNode(_.key)&&(c.value=null)}let m;bt(()=>e.show,_=>{_?m=bt(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?f():v(),nn(L)):v()},{immediate:!0}):m==null||m()},{immediate:!0}),Lr(()=>{m==null||m()});const p=g(()=>Jn(a.value.self[Ve("optionHeight",e.size)])),y=g(()=>sr(a.value.self[Ve("padding",e.size)])),h=g(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),x=g(()=>{const _=d.value;return _&&_.length===0});function w(_){const{onToggle:E}=e;E&&E(_)}function k(_){const{onScroll:E}=e;E&&E(_)}function b(_){var E;(E=s.value)===null||E===void 0||E.sync(),k(_)}function R(){var _;(_=s.value)===null||_===void 0||_.sync()}function D(){const{value:_}=c;return _||null}function T(_,E){E.disabled||B(E,!1)}function Y(_,E){E.disabled||w(E)}function I(_){var E;Lt(_,"action")||(E=e.onKeyup)===null||E===void 0||E.call(e,_)}function N(_){var E;Lt(_,"action")||(E=e.onKeydown)===null||E===void 0||E.call(e,_)}function J(_){var E;(E=e.onMousedown)===null||E===void 0||E.call(e,_),!e.focusable&&_.preventDefault()}function O(){const{value:_}=c;_&&B(_.getNext({loop:!0}),!0)}function C(){const{value:_}=c;_&&B(_.getPrev({loop:!0}),!0)}function B(_,E=!1){c.value=_,E&&L()}function L(){var _,E;const U=c.value;if(!U)return;const ne=u.value(U.key);ne!==null&&(e.virtualScroll?(_=l.value)===null||_===void 0||_.scrollTo({index:ne}):(E=s.value)===null||E===void 0||E.scrollTo({index:ne,elSize:p.value}))}function Q(_){var E,U;!((E=o.value)===null||E===void 0)&&E.contains(_.target)&&((U=e.onFocus)===null||U===void 0||U.call(e,_))}function q(_){var E,U;!((E=o.value)===null||E===void 0)&&E.contains(_.relatedTarget)||(U=e.onBlur)===null||U===void 0||U.call(e,_)}At(Ha,{handleOptionMouseEnter:T,handleOptionClick:Y,valueSetRef:h,pendingTmNodeRef:c,nodePropsRef:me(e,"nodeProps"),showCheckmarkRef:me(e,"showCheckmark"),multipleRef:me(e,"multiple"),valueRef:me(e,"value"),renderLabelRef:me(e,"renderLabel"),renderOptionRef:me(e,"renderOption"),labelFieldRef:me(e,"labelField"),valueFieldRef:me(e,"valueField")}),At(us,o),Zt(()=>{const{value:_}=s;_&&_.sync()});const ee=g(()=>{const{size:_}=e,{common:{cubicBezierEaseInOut:E},self:{height:U,borderRadius:ne,color:Oe,groupHeaderTextColor:he,actionDividerColor:Te,optionTextColorPressed:j,optionTextColor:be,optionTextColorDisabled:Se,optionTextColorActive:$e,optionOpacityDisabled:Ke,optionCheckColor:lt,actionTextColor:ht,optionColorPending:Qe,optionColorActive:X,loadingColor:we,loadingSize:re,optionColorActivePending:Re,[Ve("optionFontSize",_)]:Ee,[Ve("optionHeight",_)]:ze,[Ve("optionPadding",_)]:Le}}=a.value;return{"--n-height":U,"--n-action-divider-color":Te,"--n-action-text-color":ht,"--n-bezier":E,"--n-border-radius":ne,"--n-color":Oe,"--n-option-font-size":Ee,"--n-group-header-text-color":he,"--n-option-check-color":lt,"--n-option-color-pending":Qe,"--n-option-color-active":X,"--n-option-color-active-pending":Re,"--n-option-height":ze,"--n-option-opacity-disabled":Ke,"--n-option-text-color":be,"--n-option-text-color-active":$e,"--n-option-text-color-disabled":Se,"--n-option-text-color-pressed":j,"--n-option-padding":Le,"--n-option-padding-left":sr(Le,"left"),"--n-option-padding-right":sr(Le,"right"),"--n-loading-color":we,"--n-loading-size":re}}),{inlineThemeDisabled:ue}=e,te=ue?Mt("internal-select-menu",g(()=>e.size[0]),ee,e):void 0,V={selfRef:o,next:O,prev:C,getPendingTmNode:D};return yi(o,e.onResize),Object.assign({mergedTheme:a,mergedClsPrefix:r,rtlEnabled:n,virtualListRef:l,scrollbarRef:s,itemSize:p,padding:y,flattenedNodes:d,empty:x,virtualListContainer(){const{value:_}=l;return _==null?void 0:_.listElRef},virtualListContent(){const{value:_}=l;return _==null?void 0:_.itemsElRef},doScroll:k,handleFocusin:Q,handleFocusout:q,handleKeyUp:I,handleKeyDown:N,handleMouseDown:J,handleVirtualListResize:R,handleVirtualListScroll:b,cssVars:ue?void 0:ee,themeClass:te==null?void 0:te.themeClass,onRender:te==null?void 0:te.onRender},V)},render(){const{$slots:e,virtualScroll:r,clsPrefix:t,mergedTheme:n,themeClass:a,onRender:o}=this;return o==null||o(),i("div",{ref:"selfRef",tabindex:this.focusable?0:-1,class:[`${t}-base-select-menu`,this.rtlEnabled&&`${t}-base-select-menu--rtl`,a,this.multiple&&`${t}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},er(e.header,l=>l&&i("div",{class:`${t}-base-select-menu__header`,"data-header":!0,key:"header"},l)),this.loading?i("div",{class:`${t}-base-select-menu__loading`},i(Va,{clsPrefix:t,strokeWidth:20})):this.empty?i("div",{class:`${t}-base-select-menu__empty`,"data-empty":!0},qe(e.empty,()=>[i(Ri,{theme:n.peers.Empty,themeOverrides:n.peerOverrides.Empty,size:this.size})])):i(Ut,{ref:"scrollbarRef",theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,scrollable:this.scrollable,container:r?this.virtualListContainer:void 0,content:r?this.virtualListContent:void 0,onScroll:r?void 0:this.doScroll},{default:()=>r?i(tr,{ref:"virtualListRef",class:`${t}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:l})=>l.isGroup?i(bo,{key:l.key,clsPrefix:t,tmNode:l}):l.ignored?null:i(yo,{clsPrefix:t,key:l.key,tmNode:l})}):i("div",{class:`${t}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(l=>l.isGroup?i(bo,{key:l.key,clsPrefix:t,tmNode:l}):i(yo,{clsPrefix:t,key:l.key,tmNode:l})))}),er(e.action,l=>l&&[i("div",{class:`${t}-base-select-menu__action`,"data-action":!0,key:"action"},l),i(On,{onFocus:this.onTabOut,key:"focus-detector"})]))}}),ld=W([M("base-selection",` --n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left); --n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left); position: relative; @@ -159,9 +159,9 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config min-height: var(--n-height); line-height: 1.5; font-size: var(--n-font-size); - `,[O("base-loading",` + `,[M("base-loading",` color: var(--n-loading-color); - `),O("base-selection-tags","min-height: var(--n-height);"),le("border, state-border",` + `),M("base-selection-tags","min-height: var(--n-height);"),le("border, state-border",` position: absolute; left: 0; right: 0; @@ -176,7 +176,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config `),le("state-border",` z-index: 1; border-color: #0000; - `),O("base-suffix",` + `),M("base-suffix",` cursor: pointer; position: absolute; top: 50%; @@ -186,7 +186,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config font-size: var(--n-arrow-size); color: var(--n-arrow-color); transition: color .3s var(--n-bezier); - `)]),O("base-selection-overlay",` + `)]),M("base-selection-overlay",` display: flex; align-items: center; white-space: nowrap; @@ -203,12 +203,12 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config flex-grow: 1; overflow: hidden; text-overflow: ellipsis; - `)]),O("base-selection-placeholder",` + `)]),M("base-selection-placeholder",` color: var(--n-placeholder-color); `,[le("inner",` max-width: 100%; overflow: hidden; - `)]),O("base-selection-tags",` + `)]),M("base-selection-tags",` cursor: pointer; outline: none; box-sizing: border-box; @@ -226,7 +226,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config color .3s var(--n-bezier), box-shadow .3s var(--n-bezier), background-color .3s var(--n-bezier); - `),O("base-selection-label",` + `),M("base-selection-label",` height: var(--n-height); display: inline-flex; width: 100%; @@ -243,7 +243,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config border-radius: inherit; background-color: var(--n-color); align-items: center; - `,[O("base-selection-input",` + `,[M("base-selection-input",` font-size: inherit; line-height: inherit; outline: none; @@ -271,23 +271,23 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config `)]),K("active",[le("state-border",` box-shadow: var(--n-box-shadow-active); border: var(--n-border-active); - `),O("base-selection-label","background-color: var(--n-color-active);"),O("base-selection-tags","background-color: var(--n-color-active);")])]),K("disabled","cursor: not-allowed;",[le("arrow",` + `),M("base-selection-label","background-color: var(--n-color-active);"),M("base-selection-tags","background-color: var(--n-color-active);")])]),K("disabled","cursor: not-allowed;",[le("arrow",` color: var(--n-arrow-color-disabled); - `),O("base-selection-label",` + `),M("base-selection-label",` cursor: not-allowed; background-color: var(--n-color-disabled); - `,[O("base-selection-input",` + `,[M("base-selection-input",` cursor: not-allowed; color: var(--n-text-color-disabled); `),le("render-label",` color: var(--n-text-color-disabled); - `)]),O("base-selection-tags",` + `)]),M("base-selection-tags",` cursor: not-allowed; background-color: var(--n-color-disabled); - `),O("base-selection-placeholder",` + `),M("base-selection-placeholder",` cursor: not-allowed; color: var(--n-placeholder-color-disabled); - `)]),O("base-selection-input-tag",` + `)]),M("base-selection-input-tag",` height: calc(var(--n-height) - 6px); line-height: calc(var(--n-height) - 6px); outline: none; @@ -326,26 +326,26 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config `)]),K("active",[le("state-border",` box-shadow: var(--n-box-shadow-active-${e}); border: var(--n-border-active-${e}); - `),O("base-selection-label",`background-color: var(--n-color-active-${e});`),O("base-selection-tags",`background-color: var(--n-color-active-${e});`)]),K("focus",[le("state-border",` + `),M("base-selection-label",`background-color: var(--n-color-active-${e});`),M("base-selection-tags",`background-color: var(--n-color-active-${e});`)]),K("focus",[le("state-border",` box-shadow: var(--n-box-shadow-focus-${e}); border: var(--n-border-focus-${e}); - `)])])]))]),O("base-selection-popover",` + `)])])]))]),M("base-selection-popover",` margin-bottom: -3px; display: flex; flex-wrap: wrap; margin-right: -8px; - `),O("base-selection-tag-wrapper",` + `),M("base-selection-tag-wrapper",` max-width: 100%; display: inline-flex; padding: 0 7px 3px 0; - `,[W("&:last-child","padding-right: 0;"),O("tag",` + `,[W("&:last-child","padding-right: 0;"),M("tag",` font-size: 14px; max-width: 100%; `,[le("content",` line-height: 1.25; text-overflow: ellipsis; overflow: hidden; - `)])])]),sd=ge({name:"InternalSelection",props:Object.assign(Object.assign({},Ye.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const{mergedClsPrefixRef:r,mergedRtlRef:t}=xt(e),n=gn("InternalSelection",t,r),a=F(null),o=F(null),l=F(null),s=F(null),d=F(null),u=F(null),c=F(null),f=F(null),v=F(null),m=F(null),p=F(!1),y=F(!1),h=F(!1),w=Ye("InternalSelection","-internal-selection",ld,Fl,e,me(e,"clsPrefix")),g=b(()=>e.clearable&&!e.disabled&&(h.value||e.active)),k=b(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):ln(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),x=b(()=>{const Z=e.selectedOption;if(Z)return Z[e.labelField]}),P=b(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function $(){var Z;const{value:se}=a;if(se){const{value:Oe}=o;Oe&&(Oe.style.width=`${se.offsetWidth}px`,e.maxTagCount!=="responsive"&&((Z=v.value)===null||Z===void 0||Z.sync({showAllItemsBeforeCalculate:!1})))}}function T(){const{value:Z}=m;Z&&(Z.style.display="none")}function Y(){const{value:Z}=m;Z&&(Z.style.display="inline-block")}gt(me(e,"active"),Z=>{Z||T()}),gt(me(e,"pattern"),()=>{e.multiple&&nn($)});function z(Z){const{onFocus:se}=e;se&&se(Z)}function N(Z){const{onBlur:se}=e;se&&se(Z)}function J(Z){const{onDeleteOption:se}=e;se&&se(Z)}function D(Z){const{onClear:se}=e;se&&se(Z)}function C(Z){const{onPatternInput:se}=e;se&&se(Z)}function B(Z){var se;(!Z.relatedTarget||!(!((se=l.value)===null||se===void 0)&&se.contains(Z.relatedTarget)))&&z(Z)}function L(Z){var se;!((se=l.value)===null||se===void 0)&&se.contains(Z.relatedTarget)||N(Z)}function Q(Z){D(Z)}function q(){h.value=!0}function ee(){h.value=!1}function ue(Z){!e.active||!e.filterable||Z.target!==o.value&&Z.preventDefault()}function te(Z){J(Z)}const V=F(!1);function _(Z){if(Z.key==="Backspace"&&!V.value&&!e.pattern.length){const{selectedOptions:se}=e;se!=null&&se.length&&te(se[se.length-1])}}let E=null;function U(Z){const{value:se}=a;if(se){const Oe=Z.target.value;se.textContent=Oe,$()}e.ignoreComposition&&V.value?E=Z:C(Z)}function ne(){V.value=!0}function De(){V.value=!1,e.ignoreComposition&&C(E),E=null}function he(Z){var se;y.value=!0,(se=e.onPatternFocus)===null||se===void 0||se.call(e,Z)}function Te(Z){var se;y.value=!1,(se=e.onPatternBlur)===null||se===void 0||se.call(e,Z)}function j(){var Z,se;if(e.filterable)y.value=!1,(Z=u.value)===null||Z===void 0||Z.blur(),(se=o.value)===null||se===void 0||se.blur();else if(e.multiple){const{value:Oe}=s;Oe==null||Oe.blur()}else{const{value:Oe}=d;Oe==null||Oe.blur()}}function be(){var Z,se,Oe;e.filterable?(y.value=!1,(Z=u.value)===null||Z===void 0||Z.focus()):e.multiple?(se=s.value)===null||se===void 0||se.focus():(Oe=d.value)===null||Oe===void 0||Oe.focus()}function Se(){const{value:Z}=o;Z&&(Y(),Z.focus())}function $e(){const{value:Z}=o;Z&&Z.blur()}function Ke(Z){const{value:se}=c;se&&se.setTextContent(`+${Z}`)}function lt(){const{value:Z}=f;return Z}function ht(){return o.value}let Qe=null;function X(){Qe!==null&&window.clearTimeout(Qe)}function we(){e.active||(X(),Qe=window.setTimeout(()=>{P.value&&(p.value=!0)},100))}function re(){X()}function Re(Z){Z||(X(),p.value=!1)}gt(P,Z=>{Z||(p.value=!1)}),Qt(()=>{Ln(()=>{const Z=u.value;Z&&(e.disabled?Z.removeAttribute("tabindex"):Z.tabIndex=y.value?-1:0)})}),yi(l,e.onResize);const{inlineThemeDisabled:Ee}=e,ze=b(()=>{const{size:Z}=e,{common:{cubicBezierEaseInOut:se},self:{fontWeight:Oe,borderRadius:A,color:_e,placeholderColor:He,textColor:vt,paddingSingle:et,paddingMultiple:We,caretColor:Ue,colorDisabled:ve,textColorDisabled:Fe,placeholderColorDisabled:R,colorActive:H,boxShadowFocus:fe,boxShadowActive:ke,boxShadowHover:xe,border:S,borderFocus:G,borderHover:ye,borderActive:Me,arrowColor:Ze,arrowColorDisabled:Ne,loadingColor:I,colorActiveWarning:ae,boxShadowFocusWarning:pe,boxShadowActiveWarning:Ie,boxShadowHoverWarning:Je,borderWarning:Ge,borderFocusWarning:rt,borderHoverWarning:Nt,borderActiveWarning:Yt,colorActiveError:Ht,boxShadowFocusError:Rt,boxShadowActiveError:Kt,boxShadowHoverError:Jt,borderError:bt,borderFocusError:St,borderHoverError:Bt,borderActiveError:Dn,clearColor:On,clearColorHover:Mn,clearColorPressed:zn,clearSize:In,arrowSize:$n,[Ve("height",Z)]:M,[Ve("fontSize",Z)]:de}}=w.value,Pe=sr(et),ut=sr(We);return{"--n-bezier":se,"--n-border":S,"--n-border-active":Me,"--n-border-focus":G,"--n-border-hover":ye,"--n-border-radius":A,"--n-box-shadow-active":ke,"--n-box-shadow-focus":fe,"--n-box-shadow-hover":xe,"--n-caret-color":Ue,"--n-color":_e,"--n-color-active":H,"--n-color-disabled":ve,"--n-font-size":de,"--n-height":M,"--n-padding-single-top":Pe.top,"--n-padding-multiple-top":ut.top,"--n-padding-single-right":Pe.right,"--n-padding-multiple-right":ut.right,"--n-padding-single-left":Pe.left,"--n-padding-multiple-left":ut.left,"--n-padding-single-bottom":Pe.bottom,"--n-padding-multiple-bottom":ut.bottom,"--n-placeholder-color":He,"--n-placeholder-color-disabled":R,"--n-text-color":vt,"--n-text-color-disabled":Fe,"--n-arrow-color":Ze,"--n-arrow-color-disabled":Ne,"--n-loading-color":I,"--n-color-active-warning":ae,"--n-box-shadow-focus-warning":pe,"--n-box-shadow-active-warning":Ie,"--n-box-shadow-hover-warning":Je,"--n-border-warning":Ge,"--n-border-focus-warning":rt,"--n-border-hover-warning":Nt,"--n-border-active-warning":Yt,"--n-color-active-error":Ht,"--n-box-shadow-focus-error":Rt,"--n-box-shadow-active-error":Kt,"--n-box-shadow-hover-error":Jt,"--n-border-error":bt,"--n-border-focus-error":St,"--n-border-hover-error":Bt,"--n-border-active-error":Dn,"--n-clear-size":In,"--n-clear-color":On,"--n-clear-color-hover":Mn,"--n-clear-color-pressed":zn,"--n-arrow-size":$n,"--n-font-weight":Oe}}),Le=Ee?Mt("internal-selection",b(()=>e.size[0]),ze,e):void 0;return{mergedTheme:w,mergedClearable:g,mergedClsPrefix:r,rtlEnabled:n,patternInputFocused:y,filterablePlaceholder:k,label:x,selected:P,showTagsPanel:p,isComposing:V,counterRef:c,counterWrapperRef:f,patternInputMirrorRef:a,patternInputRef:o,selfRef:l,multipleElRef:s,singleElRef:d,patternInputWrapperRef:u,overflowRef:v,inputTagElRef:m,handleMouseDown:ue,handleFocusin:B,handleClear:Q,handleMouseEnter:q,handleMouseLeave:ee,handleDeleteOption:te,handlePatternKeyDown:_,handlePatternInputInput:U,handlePatternInputBlur:Te,handlePatternInputFocus:he,handleMouseEnterCounter:we,handleMouseLeaveCounter:re,handleFocusout:L,handleCompositionEnd:De,handleCompositionStart:ne,onPopoverUpdateShow:Re,focus:be,focusInput:Se,blur:j,blurInput:$e,updateCounter:Ke,getCounter:lt,getTail:ht,renderLabel:e.renderLabel,cssVars:Ee?void 0:ze,themeClass:Le==null?void 0:Le.themeClass,onRender:Le==null?void 0:Le.onRender}},render(){const{status:e,multiple:r,size:t,disabled:n,filterable:a,maxTagCount:o,bordered:l,clsPrefix:s,ellipsisTagPopoverProps:d,onRender:u,renderTag:c,renderLabel:f}=this;u==null||u();const v=o==="responsive",m=typeof o=="number",p=v||m,y=i(as,null,{default:()=>i(os,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var w,g;return(g=(w=this.$slots).arrow)===null||g===void 0?void 0:g.call(w)}})});let h;if(r){const{labelField:w}=this,g=C=>i("div",{class:`${s}-base-selection-tag-wrapper`,key:C.value},c?c({option:C,handleClose:()=>{this.handleDeleteOption(C)}}):i(Hn,{size:t,closable:!C.disabled,disabled:n,onClose:()=>{this.handleDeleteOption(C)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>f?f(C,!0):ln(C[w],C,!0)})),k=()=>(m?this.selectedOptions.slice(0,o):this.selectedOptions).map(g),x=a?i("div",{class:`${s}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},i("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:n,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),i("span",{ref:"patternInputMirrorRef",class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,P=v?()=>i("div",{class:`${s}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},i(Hn,{size:t,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:n})):void 0;let $;if(m){const C=this.selectedOptions.length-o;C>0&&($=i("div",{class:`${s}-base-selection-tag-wrapper`,key:"__counter__"},i(Hn,{size:t,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:n},{default:()=>`+${C}`})))}const T=v?a?i(co,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:k,counter:P,tail:()=>x}):i(co,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:k,counter:P}):m&&$?k().concat($):k(),Y=p?()=>i("div",{class:`${s}-base-selection-popover`},v?k():this.selectedOptions.map(g)):void 0,z=p?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},d):null,J=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?i("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},i("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,D=a?i("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-tags`},T,v?null:x,y):i("div",{ref:"multipleElRef",class:`${s}-base-selection-tags`,tabindex:n?void 0:0},T,y);h=i(mn,null,p?i(yr,Object.assign({},z,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>D,default:Y}):D,J)}else if(a){const w=this.pattern||this.isComposing,g=this.active?!w:!this.selected,k=this.active?!1:this.selected;h=i("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:fo(this.label)},i("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${s}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:n,disabled:n,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),k?i("div",{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:"input"},i("div",{class:`${s}-base-selection-overlay__wrapper`},c?c({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):ln(this.label,this.selectedOption,!0))):null,g?i("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},i("div",{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,y)}else h=i("div",{ref:"singleElRef",class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?i("div",{class:`${s}-base-selection-input`,title:fo(this.label),key:"input"},i("div",{class:`${s}-base-selection-input__content`},c?c({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):ln(this.label,this.selectedOption,!0))):i("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},i("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)),y);return i("div",{ref:"selfRef",class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},h,l?i("div",{class:`${s}-base-selection__border`}):null,l?i("div",{class:`${s}-base-selection__state-border`}):null)}});function $r(e){return e.type==="group"}function Pi(e){return e.type==="ignored"}function ia(e,r){try{return!!(1+r.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function Fi(e,r){return{getIsGroup:$r,getIgnored:Pi,getKey(n){return $r(n)?n.name||n.key||"key-required":n[e]},getChildren(n){return n[r]}}}function dd(e,r,t,n){if(!r)return e;function a(o){if(!Array.isArray(o))return[];const l=[];for(const s of o)if($r(s)){const d=a(s[n]);d.length&&l.push(Object.assign({},s,{[n]:d}))}else{if(Pi(s))continue;r(t,s)&&l.push(s)}return l}return a(e)}function ud(e,r,t){const n=new Map;return e.forEach(a=>{$r(a)?a[t].forEach(o=>{n.set(o[r],o)}):n.set(a[r],a)}),n}function ot(e,r){return e instanceof Date?new e.constructor(r):new Date(r)}function Zn(e,r){const t=Ae(e);return isNaN(r)?ot(e,NaN):(r&&t.setDate(t.getDate()+r),t)}function Tt(e,r){const t=Ae(e);if(isNaN(r))return ot(e,NaN);if(!r)return t;const n=t.getDate(),a=ot(e,t.getTime());a.setMonth(t.getMonth()+r+1,0);const o=a.getDate();return n>=o?a:(t.setFullYear(a.getFullYear(),a.getMonth(),n),t)}const Ti=6048e5,cd=864e5,fd=6e4,hd=36e5,vd=1e3;function nr(e){return pn(e,{weekStartsOn:1})}function _i(e){const r=Ae(e),t=r.getFullYear(),n=ot(e,0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);const a=nr(n),o=ot(e,0);o.setFullYear(t,0,4),o.setHours(0,0,0,0);const l=nr(o);return r.getTime()>=a.getTime()?t+1:r.getTime()>=l.getTime()?t:t-1}function rr(e){const r=Ae(e);return r.setHours(0,0,0,0),r}function Ar(e){const r=Ae(e),t=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return t.setUTCFullYear(r.getFullYear()),+e-+t}function md(e,r){const t=rr(e),n=rr(r),a=+t-Ar(t),o=+n-Ar(n);return Math.round((a-o)/cd)}function pd(e){const r=_i(e),t=ot(e,0);return t.setFullYear(r,0,4),t.setHours(0,0,0,0),nr(t)}function gd(e,r){const t=r*3;return Tt(e,t)}function Sa(e,r){return Tt(e,r*12)}function bd(e,r){const t=rr(e),n=rr(r);return+t==+n}function yd(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Gt(e){if(!yd(e)&&typeof e!="number")return!1;const r=Ae(e);return!isNaN(Number(r))}function wd(e){const r=Ae(e);return Math.trunc(r.getMonth()/3)+1}function xd(e){const r=Ae(e);return r.setSeconds(0,0),r}function mr(e){const r=Ae(e),t=r.getMonth(),n=t-t%3;return r.setMonth(n,1),r.setHours(0,0,0,0),r}function fn(e){const r=Ae(e);return r.setDate(1),r.setHours(0,0,0,0),r}function kr(e){const r=Ae(e),t=ot(e,0);return t.setFullYear(r.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Cd(e){const r=Ae(e);return md(r,kr(r))+1}function Di(e){const r=Ae(e),t=+nr(r)-+pd(r);return Math.round(t/Ti)+1}function Ya(e,r){var c,f,v,m;const t=Ae(e),n=t.getFullYear(),a=pr(),o=(r==null?void 0:r.firstWeekContainsDate)??((f=(c=r==null?void 0:r.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(v=a.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,l=ot(e,0);l.setFullYear(n+1,0,o),l.setHours(0,0,0,0);const s=pn(l,r),d=ot(e,0);d.setFullYear(n,0,o),d.setHours(0,0,0,0);const u=pn(d,r);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}function kd(e,r){var s,d,u,c;const t=pr(),n=(r==null?void 0:r.firstWeekContainsDate)??((d=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:d.firstWeekContainsDate)??t.firstWeekContainsDate??((c=(u=t.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,a=Ya(e,r),o=ot(e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),pn(o,r)}function Oi(e,r){const t=Ae(e),n=+pn(t,r)-+kd(t,r);return Math.round(n/Ti)+1}function tt(e,r){const t=e<0?"-":"",n=Math.abs(e).toString().padStart(r,"0");return t+n}const wn={y(e,r){const t=e.getFullYear(),n=t>0?t:1-t;return tt(r==="yy"?n%100:n,r.length)},M(e,r){const t=e.getMonth();return r==="M"?String(t+1):tt(t+1,2)},d(e,r){return tt(e.getDate(),r.length)},a(e,r){const t=e.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(e,r){return tt(e.getHours()%12||12,r.length)},H(e,r){return tt(e.getHours(),r.length)},m(e,r){return tt(e.getMinutes(),r.length)},s(e,r){return tt(e.getSeconds(),r.length)},S(e,r){const t=r.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,t-3));return tt(a,r.length)}},qn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Co={G:function(e,r,t){const n=e.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(e,r,t){if(r==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return t.ordinalNumber(a,{unit:"year"})}return wn.y(e,r)},Y:function(e,r,t,n){const a=Ya(e,n),o=a>0?a:1-a;if(r==="YY"){const l=o%100;return tt(l,2)}return r==="Yo"?t.ordinalNumber(o,{unit:"year"}):tt(o,r.length)},R:function(e,r){const t=_i(e);return tt(t,r.length)},u:function(e,r){const t=e.getFullYear();return tt(t,r.length)},Q:function(e,r,t){const n=Math.ceil((e.getMonth()+1)/3);switch(r){case"Q":return String(n);case"QQ":return tt(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,r,t){const n=Math.ceil((e.getMonth()+1)/3);switch(r){case"q":return String(n);case"qq":return tt(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,r,t){const n=e.getMonth();switch(r){case"M":case"MM":return wn.M(e,r);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(e,r,t){const n=e.getMonth();switch(r){case"L":return String(n+1);case"LL":return tt(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(e,r,t,n){const a=Oi(e,n);return r==="wo"?t.ordinalNumber(a,{unit:"week"}):tt(a,r.length)},I:function(e,r,t){const n=Di(e);return r==="Io"?t.ordinalNumber(n,{unit:"week"}):tt(n,r.length)},d:function(e,r,t){return r==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):wn.d(e,r)},D:function(e,r,t){const n=Cd(e);return r==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):tt(n,r.length)},E:function(e,r,t){const n=e.getDay();switch(r){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(e,r,t,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return tt(o,2);case"eo":return t.ordinalNumber(o,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(e,r,t,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return tt(o,r.length);case"co":return t.ordinalNumber(o,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(e,r,t){const n=e.getDay(),a=n===0?7:n;switch(r){case"i":return String(a);case"ii":return tt(a,r.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(e,r,t){const a=e.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,r,t){const n=e.getHours();let a;switch(n===12?a=qn.noon:n===0?a=qn.midnight:a=n/12>=1?"pm":"am",r){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,r,t){const n=e.getHours();let a;switch(n>=17?a=qn.evening:n>=12?a=qn.afternoon:n>=4?a=qn.morning:a=qn.night,r){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,r,t){if(r==="ho"){let n=e.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return wn.h(e,r)},H:function(e,r,t){return r==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):wn.H(e,r)},K:function(e,r,t){const n=e.getHours()%12;return r==="Ko"?t.ordinalNumber(n,{unit:"hour"}):tt(n,r.length)},k:function(e,r,t){let n=e.getHours();return n===0&&(n=24),r==="ko"?t.ordinalNumber(n,{unit:"hour"}):tt(n,r.length)},m:function(e,r,t){return r==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):wn.m(e,r)},s:function(e,r,t){return r==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):wn.s(e,r)},S:function(e,r){return wn.S(e,r)},X:function(e,r,t){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(r){case"X":return Ro(n);case"XXXX":case"XX":return En(n);case"XXXXX":case"XXX":default:return En(n,":")}},x:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"x":return Ro(n);case"xxxx":case"xx":return En(n);case"xxxxx":case"xxx":default:return En(n,":")}},O:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+ko(n,":");case"OOOO":default:return"GMT"+En(n,":")}},z:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+ko(n,":");case"zzzz":default:return"GMT"+En(n,":")}},t:function(e,r,t){const n=Math.trunc(e.getTime()/1e3);return tt(n,r.length)},T:function(e,r,t){const n=e.getTime();return tt(n,r.length)}};function ko(e,r=""){const t=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return o===0?t+String(a):t+String(a)+r+tt(o,2)}function Ro(e,r){return e%60===0?(e>0?"-":"+")+tt(Math.abs(e)/60,2):En(e,r)}function En(e,r=""){const t=e>0?"-":"+",n=Math.abs(e),a=tt(Math.trunc(n/60),2),o=tt(n%60,2);return t+a+r+o}const So=(e,r)=>{switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Mi=(e,r)=>{switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Rd=(e,r)=>{const t=e.match(/(P+)(p+)?/)||[],n=t[1],a=t[2];if(!a)return So(e,r);let o;switch(n){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",So(n,r)).replace("{{time}}",Mi(a,r))},Pa={p:Mi,P:Rd},Sd=/^D+$/,Pd=/^Y+$/,Fd=["D","DD","YY","YYYY"];function zi(e){return Sd.test(e)}function Ii(e){return Pd.test(e)}function Fa(e,r,t){const n=Td(e,r,t);if(console.warn(n),Fd.includes(e))throw new RangeError(n)}function Td(e,r,t){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${r}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const _d=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Od=/^'([^]*?)'?$/,Md=/''/g,zd=/[a-zA-Z]/;function nt(e,r,t){var c,f,v,m,p,y,h,w;const n=pr(),a=(t==null?void 0:t.locale)??n.locale??ei,o=(t==null?void 0:t.firstWeekContainsDate)??((f=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(v=n.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((y=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:y.weekStartsOn)??n.weekStartsOn??((w=(h=n.locale)==null?void 0:h.options)==null?void 0:w.weekStartsOn)??0,s=Ae(e);if(!Gt(s))throw new RangeError("Invalid time value");let d=r.match(Dd).map(g=>{const k=g[0];if(k==="p"||k==="P"){const x=Pa[k];return x(g,a.formatLong)}return g}).join("").match(_d).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const k=g[0];if(k==="'")return{isToken:!1,value:Id(g)};if(Co[k])return{isToken:!0,value:g};if(k.match(zd))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return{isToken:!1,value:g}});a.localize.preprocessor&&(d=a.localize.preprocessor(s,d));const u={firstWeekContainsDate:o,weekStartsOn:l,locale:a};return d.map(g=>{if(!g.isToken)return g.value;const k=g.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&Ii(k)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&zi(k))&&Fa(k,r,String(e));const x=Co[k[0]];return x(s,k,a.localize,u)}).join("")}function Id(e){const r=e.match(Od);return r?r[1].replace(Md,"'"):e}function qt(e){return Ae(e).getDate()}function $d(e){return Ae(e).getDay()}function Ad(e){const r=Ae(e),t=r.getFullYear(),n=r.getMonth(),a=ot(e,0);return a.setFullYear(t,n+1,0),a.setHours(0,0,0,0),a.getDate()}function $i(){return Object.assign({},pr())}function xn(e){return Ae(e).getHours()}function Nd(e){let t=Ae(e).getDay();return t===0&&(t=7),t}function Bd(e){return Ae(e).getMilliseconds()}function Nr(e){return Ae(e).getMinutes()}function st(e){return Ae(e).getMonth()}function Br(e){return Ae(e).getSeconds()}function ce(e){return Ae(e).getTime()}function mt(e){return Ae(e).getFullYear()}function Ed(e,r){const t=r instanceof Date?ot(r,0):new r(0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}const Vd=10;class Ai{constructor(){Ce(this,"subPriority",0)}validate(r,t){return!0}}class Ld extends Ai{constructor(r,t,n,a,o){super(),this.value=r,this.validateValue=t,this.setValue=n,this.priority=a,o&&(this.subPriority=o)}validate(r,t){return this.validateValue(r,this.value,t)}set(r,t,n){return this.setValue(r,t,this.value,n)}}class Hd extends Ai{constructor(){super(...arguments);Ce(this,"priority",Vd);Ce(this,"subPriority",-1)}set(t,n){return n.timestampIsSet?t:ot(t,Ed(t,Date))}}class Xe{run(r,t,n,a){const o=this.parse(r,t,n,a);return o?{setter:new Ld(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(r,t,n){return!0}}class Ud extends Xe{constructor(){super(...arguments);Ce(this,"priority",140);Ce(this,"incompatibleTokens",["R","u","t","T"])}parse(t,n,a){switch(n){case"G":case"GG":case"GGG":return a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"});case"GGGGG":return a.era(t,{width:"narrow"});case"GGGG":default:return a.era(t,{width:"wide"})||a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"})}}set(t,n,a){return n.era=a,t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}}const Ct={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}/},an={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 kt(e,r){return e&&{value:r(e.value),rest:e.rest}}function pt(e,r){const t=r.match(e);return t?{value:parseInt(t[0],10),rest:r.slice(t[0].length)}:null}function on(e,r){const t=r.match(e);if(!t)return null;if(t[0]==="Z")return{value:0,rest:r.slice(1)};const n=t[1]==="+"?1:-1,a=t[2]?parseInt(t[2],10):0,o=t[3]?parseInt(t[3],10):0,l=t[5]?parseInt(t[5],10):0;return{value:n*(a*hd+o*fd+l*vd),rest:r.slice(t[0].length)}}function Ni(e){return pt(Ct.anyDigitsSigned,e)}function wt(e,r){switch(e){case 1:return pt(Ct.singleDigit,r);case 2:return pt(Ct.twoDigits,r);case 3:return pt(Ct.threeDigits,r);case 4:return pt(Ct.fourDigits,r);default:return pt(new RegExp("^\\d{1,"+e+"}"),r)}}function Er(e,r){switch(e){case 1:return pt(Ct.singleDigitSigned,r);case 2:return pt(Ct.twoDigitsSigned,r);case 3:return pt(Ct.threeDigitsSigned,r);case 4:return pt(Ct.fourDigitsSigned,r);default:return pt(new RegExp("^-?\\d{1,"+e+"}"),r)}}function Ka(e){switch(e){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 Bi(e,r){const t=r>0,n=t?r:1-r;let a;if(n<=50)a=e||100;else{const o=n+50,l=Math.trunc(o/100)*100,s=e>=o%100;a=e+l-(s?100:0)}return t?a:1-a}function Ei(e){return e%400===0||e%4===0&&e%100!==0}class jd extends Xe{constructor(){super(...arguments);Ce(this,"priority",130);Ce(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,n,a){const o=l=>({year:l,isTwoDigitYear:n==="yy"});switch(n){case"y":return kt(wt(4,t),o);case"yo":return kt(a.ordinalNumber(t,{unit:"year"}),o);default:return kt(wt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,a){const o=t.getFullYear();if(a.isTwoDigitYear){const s=Bi(a.year,o);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const l=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(l,0,1),t.setHours(0,0,0,0),t}}class Yd extends Xe{constructor(){super(...arguments);Ce(this,"priority",130);Ce(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,n,a){const o=l=>({year:l,isTwoDigitYear:n==="YY"});switch(n){case"Y":return kt(wt(4,t),o);case"Yo":return kt(a.ordinalNumber(t,{unit:"year"}),o);default:return kt(wt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,a,o){const l=Ya(t,o);if(a.isTwoDigitYear){const d=Bi(a.year,l);return t.setFullYear(d,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),pn(t,o)}const s=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),pn(t,o)}}class Kd extends Xe{constructor(){super(...arguments);Ce(this,"priority",130);Ce(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,n){return Er(n==="R"?4:n.length,t)}set(t,n,a){const o=ot(t,0);return o.setFullYear(a,0,4),o.setHours(0,0,0,0),nr(o)}}class Wd extends Xe{constructor(){super(...arguments);Ce(this,"priority",130);Ce(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,n){return Er(n==="u"?4:n.length,t)}set(t,n,a){return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}}class qd extends Xe{constructor(){super(...arguments);Ce(this,"priority",120);Ce(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,a){switch(n){case"Q":case"QQ":return wt(n.length,t);case"Qo":return a.ordinalNumber(t,{unit:"quarter"});case"QQQ":return a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(t,{width:"wide",context:"formatting"})||a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}}class Gd extends Xe{constructor(){super(...arguments);Ce(this,"priority",120);Ce(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,a){switch(n){case"q":case"qq":return wt(n.length,t);case"qo":return a.ordinalNumber(t,{unit:"quarter"});case"qqq":return a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(t,{width:"wide",context:"standalone"})||a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}}class Xd extends Xe{constructor(){super(...arguments);Ce(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);Ce(this,"priority",110)}parse(t,n,a){const o=l=>l-1;switch(n){case"M":return kt(pt(Ct.month,t),o);case"MM":return kt(wt(2,t),o);case"Mo":return kt(a.ordinalNumber(t,{unit:"month"}),o);case"MMM":return a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(t,{width:"wide",context:"formatting"})||a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}}class Qd extends Xe{constructor(){super(...arguments);Ce(this,"priority",110);Ce(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,n,a){const o=l=>l-1;switch(n){case"L":return kt(pt(Ct.month,t),o);case"LL":return kt(wt(2,t),o);case"Lo":return kt(a.ordinalNumber(t,{unit:"month"}),o);case"LLL":return a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(t,{width:"wide",context:"standalone"})||a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}}function Zd(e,r,t){const n=Ae(e),a=Oi(n,t)-r;return n.setDate(n.getDate()-a*7),n}class Jd extends Xe{constructor(){super(...arguments);Ce(this,"priority",100);Ce(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,n,a){switch(n){case"w":return pt(Ct.week,t);case"wo":return a.ordinalNumber(t,{unit:"week"});default:return wt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a,o){return pn(Zd(t,a,o),o)}}function eu(e,r){const t=Ae(e),n=Di(t)-r;return t.setDate(t.getDate()-n*7),t}class tu extends Xe{constructor(){super(...arguments);Ce(this,"priority",100);Ce(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,n,a){switch(n){case"I":return pt(Ct.week,t);case"Io":return a.ordinalNumber(t,{unit:"week"});default:return wt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a){return nr(eu(t,a))}}const nu=[31,28,31,30,31,30,31,31,30,31,30,31],ru=[31,29,31,30,31,30,31,31,30,31,30,31];class au extends Xe{constructor(){super(...arguments);Ce(this,"priority",90);Ce(this,"subPriority",1);Ce(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,n,a){switch(n){case"d":return pt(Ct.date,t);case"do":return a.ordinalNumber(t,{unit:"date"});default:return wt(n.length,t)}}validate(t,n){const a=t.getFullYear(),o=Ei(a),l=t.getMonth();return o?n>=1&&n<=ru[l]:n>=1&&n<=nu[l]}set(t,n,a){return t.setDate(a),t.setHours(0,0,0,0),t}}class ou extends Xe{constructor(){super(...arguments);Ce(this,"priority",90);Ce(this,"subpriority",1);Ce(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,n,a){switch(n){case"D":case"DD":return pt(Ct.dayOfYear,t);case"Do":return a.ordinalNumber(t,{unit:"date"});default:return wt(n.length,t)}}validate(t,n){const a=t.getFullYear();return Ei(a)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,a){return t.setMonth(0,a),t.setHours(0,0,0,0),t}}function Wa(e,r,t){var f,v,m,p;const n=pr(),a=(t==null?void 0:t.weekStartsOn)??((v=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:v.weekStartsOn)??n.weekStartsOn??((p=(m=n.locale)==null?void 0:m.options)==null?void 0:p.weekStartsOn)??0,o=Ae(e),l=o.getDay(),d=(r%7+7)%7,u=7-a,c=r<0||r>6?r-(l+u)%7:(d+u)%7-(l+u)%7;return Zn(o,c)}class iu extends Xe{constructor(){super(...arguments);Ce(this,"priority",90);Ce(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,n,a){switch(n){case"E":case"EE":case"EEE":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,o){return t=Wa(t,a,o),t.setHours(0,0,0,0),t}}class lu extends Xe{constructor(){super(...arguments);Ce(this,"priority",90);Ce(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,n,a,o){const l=s=>{const d=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+d};switch(n){case"e":case"ee":return kt(wt(n.length,t),l);case"eo":return kt(a.ordinalNumber(t,{unit:"day"}),l);case"eee":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeeee":return a.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,o){return t=Wa(t,a,o),t.setHours(0,0,0,0),t}}class su extends Xe{constructor(){super(...arguments);Ce(this,"priority",90);Ce(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,n,a,o){const l=s=>{const d=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+d};switch(n){case"c":case"cc":return kt(wt(n.length,t),l);case"co":return kt(a.ordinalNumber(t,{unit:"day"}),l);case"ccc":return a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"ccccc":return a.day(t,{width:"narrow",context:"standalone"});case"cccccc":return a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(t,{width:"wide",context:"standalone"})||a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,o){return t=Wa(t,a,o),t.setHours(0,0,0,0),t}}function du(e,r){const t=Ae(e),n=Nd(t),a=r-n;return Zn(t,a)}class uu extends Xe{constructor(){super(...arguments);Ce(this,"priority",90);Ce(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,n,a){const o=l=>l===0?7:l;switch(n){case"i":case"ii":return wt(n.length,t);case"io":return a.ordinalNumber(t,{unit:"day"});case"iii":return kt(a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return kt(a.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return kt(a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return kt(a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,a){return t=du(t,a),t.setHours(0,0,0,0),t}}class cu extends Xe{constructor(){super(...arguments);Ce(this,"priority",80);Ce(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,n,a){switch(n){case"a":case"aa":case"aaa":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours(Ka(a),0,0,0),t}}class fu extends Xe{constructor(){super(...arguments);Ce(this,"priority",80);Ce(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,n,a){switch(n){case"b":case"bb":case"bbb":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours(Ka(a),0,0,0),t}}class hu extends Xe{constructor(){super(...arguments);Ce(this,"priority",80);Ce(this,"incompatibleTokens",["a","b","t","T"])}parse(t,n,a){switch(n){case"B":case"BB":case"BBB":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours(Ka(a),0,0,0),t}}class vu extends Xe{constructor(){super(...arguments);Ce(this,"priority",70);Ce(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,n,a){switch(n){case"h":return pt(Ct.hour12h,t);case"ho":return a.ordinalNumber(t,{unit:"hour"});default:return wt(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,a){const o=t.getHours()>=12;return o&&a<12?t.setHours(a+12,0,0,0):!o&&a===12?t.setHours(0,0,0,0):t.setHours(a,0,0,0),t}}class mu extends Xe{constructor(){super(...arguments);Ce(this,"priority",70);Ce(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,n,a){switch(n){case"H":return pt(Ct.hour23h,t);case"Ho":return a.ordinalNumber(t,{unit:"hour"});default:return wt(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,a){return t.setHours(a,0,0,0),t}}class pu extends Xe{constructor(){super(...arguments);Ce(this,"priority",70);Ce(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,n,a){switch(n){case"K":return pt(Ct.hour11h,t);case"Ko":return a.ordinalNumber(t,{unit:"hour"});default:return wt(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.getHours()>=12&&a<12?t.setHours(a+12,0,0,0):t.setHours(a,0,0,0),t}}class gu extends Xe{constructor(){super(...arguments);Ce(this,"priority",70);Ce(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,n,a){switch(n){case"k":return pt(Ct.hour24h,t);case"ko":return a.ordinalNumber(t,{unit:"hour"});default:return wt(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,a){const o=a<=24?a%24:a;return t.setHours(o,0,0,0),t}}class bu extends Xe{constructor(){super(...arguments);Ce(this,"priority",60);Ce(this,"incompatibleTokens",["t","T"])}parse(t,n,a){switch(n){case"m":return pt(Ct.minute,t);case"mo":return a.ordinalNumber(t,{unit:"minute"});default:return wt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,a){return t.setMinutes(a,0,0),t}}class yu extends Xe{constructor(){super(...arguments);Ce(this,"priority",50);Ce(this,"incompatibleTokens",["t","T"])}parse(t,n,a){switch(n){case"s":return pt(Ct.second,t);case"so":return a.ordinalNumber(t,{unit:"second"});default:return wt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,a){return t.setSeconds(a,0),t}}class wu extends Xe{constructor(){super(...arguments);Ce(this,"priority",30);Ce(this,"incompatibleTokens",["t","T"])}parse(t,n){const a=o=>Math.trunc(o*Math.pow(10,-n.length+3));return kt(wt(n.length,t),a)}set(t,n,a){return t.setMilliseconds(a),t}}class xu extends Xe{constructor(){super(...arguments);Ce(this,"priority",10);Ce(this,"incompatibleTokens",["t","T","x"])}parse(t,n){switch(n){case"X":return on(an.basicOptionalMinutes,t);case"XX":return on(an.basic,t);case"XXXX":return on(an.basicOptionalSeconds,t);case"XXXXX":return on(an.extendedOptionalSeconds,t);case"XXX":default:return on(an.extended,t)}}set(t,n,a){return n.timestampIsSet?t:ot(t,t.getTime()-Ar(t)-a)}}class Cu extends Xe{constructor(){super(...arguments);Ce(this,"priority",10);Ce(this,"incompatibleTokens",["t","T","X"])}parse(t,n){switch(n){case"x":return on(an.basicOptionalMinutes,t);case"xx":return on(an.basic,t);case"xxxx":return on(an.basicOptionalSeconds,t);case"xxxxx":return on(an.extendedOptionalSeconds,t);case"xxx":default:return on(an.extended,t)}}set(t,n,a){return n.timestampIsSet?t:ot(t,t.getTime()-Ar(t)-a)}}class ku extends Xe{constructor(){super(...arguments);Ce(this,"priority",40);Ce(this,"incompatibleTokens","*")}parse(t){return Ni(t)}set(t,n,a){return[ot(t,a*1e3),{timestampIsSet:!0}]}}class Ru extends Xe{constructor(){super(...arguments);Ce(this,"priority",20);Ce(this,"incompatibleTokens","*")}parse(t){return Ni(t)}set(t,n,a){return[ot(t,a),{timestampIsSet:!0}]}}const Su={G:new Ud,y:new jd,Y:new Yd,R:new Kd,u:new Wd,Q:new qd,q:new Gd,M:new Xd,L:new Qd,w:new Jd,I:new tu,d:new au,D:new ou,E:new iu,e:new lu,c:new su,i:new uu,a:new cu,b:new fu,B:new hu,h:new vu,H:new mu,K:new pu,k:new gu,m:new bu,s:new yu,S:new wu,X:new xu,x:new Cu,t:new ku,T:new Ru},Pu=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fu=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Tu=/^'([^]*?)'?$/,_u=/''/g,Du=/\S/,Ou=/[a-zA-Z]/;function Mu(e,r,t,n){var y,h,w,g,k,x,P,$;const a=$i(),o=(n==null?void 0:n.locale)??a.locale??ei,l=(n==null?void 0:n.firstWeekContainsDate)??((h=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:h.firstWeekContainsDate)??a.firstWeekContainsDate??((g=(w=a.locale)==null?void 0:w.options)==null?void 0:g.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((x=(k=n==null?void 0:n.locale)==null?void 0:k.options)==null?void 0:x.weekStartsOn)??a.weekStartsOn??(($=(P=a.locale)==null?void 0:P.options)==null?void 0:$.weekStartsOn)??0;if(r==="")return e===""?Ae(t):ot(t,NaN);const d={firstWeekContainsDate:l,weekStartsOn:s,locale:o},u=[new Hd],c=r.match(Fu).map(T=>{const Y=T[0];if(Y in Pa){const z=Pa[Y];return z(T,o.formatLong)}return T}).join("").match(Pu),f=[];for(let T of c){!(n!=null&&n.useAdditionalWeekYearTokens)&&Ii(T)&&Fa(T,r,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&zi(T)&&Fa(T,r,e);const Y=T[0],z=Su[Y];if(z){const{incompatibleTokens:N}=z;if(Array.isArray(N)){const D=f.find(C=>N.includes(C.token)||C.token===Y);if(D)throw new RangeError(`The format string mustn't contain \`${D.fullToken}\` and \`${T}\` at the same time`)}else if(z.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);f.push({token:Y,fullToken:T});const J=z.run(e,T,o.match,d);if(!J)return ot(t,NaN);u.push(J.setter),e=J.rest}else{if(Y.match(Ou))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");if(T==="''"?T="'":Y==="'"&&(T=zu(T)),e.indexOf(T)===0)e=e.slice(T.length);else return ot(t,NaN)}}if(e.length>0&&Du.test(e))return ot(t,NaN);const v=u.map(T=>T.priority).sort((T,Y)=>Y-T).filter((T,Y,z)=>z.indexOf(T)===Y).map(T=>u.filter(Y=>Y.priority===T).sort((Y,z)=>z.subPriority-Y.subPriority)).map(T=>T[0]);let m=Ae(t);if(isNaN(m.getTime()))return ot(t,NaN);const p={};for(const T of v){if(!T.validate(m,d))return ot(t,NaN);const Y=T.set(m,p,d);Array.isArray(Y)?(m=Y[0],Object.assign(p,Y[1])):m=Y}return ot(t,m)}function zu(e){return e.match(Tu)[1].replace(_u,"'")}function Iu(e){const r=Ae(e);return r.setMinutes(0,0,0),r}function Rr(e,r){const t=Ae(e),n=Ae(r);return t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()}function Vi(e,r){const t=mr(e),n=mr(r);return+t==+n}function qa(e){const r=Ae(e);return r.setMilliseconds(0),r}function Li(e,r){const t=Ae(e),n=Ae(r);return t.getFullYear()===n.getFullYear()}function Ga(e,r){const t=Ae(e),n=t.getFullYear(),a=t.getDate(),o=ot(e,0);o.setFullYear(n,r,15),o.setHours(0,0,0,0);const l=Ad(o);return t.setMonth(r,Math.min(a,l)),t}function _t(e,r){let t=Ae(e);return isNaN(+t)?ot(e,NaN):(r.year!=null&&t.setFullYear(r.year),r.month!=null&&(t=Ga(t,r.month)),r.date!=null&&t.setDate(r.date),r.hours!=null&&t.setHours(r.hours),r.minutes!=null&&t.setMinutes(r.minutes),r.seconds!=null&&t.setSeconds(r.seconds),r.milliseconds!=null&&t.setMilliseconds(r.milliseconds),t)}function Bn(e,r){const t=Ae(e);return t.setHours(r),t}function la(e,r){const t=Ae(e);return t.setMinutes(r),t}function $u(e,r){const t=Ae(e),n=Math.trunc(t.getMonth()/3)+1,a=r-n;return Ga(t,t.getMonth()+a*3)}function sa(e,r){const t=Ae(e);return t.setSeconds(r),t}function Ta(e,r){const t=Ae(e);return isNaN(+t)?ot(e,NaN):(t.setFullYear(r),t)}const Au={date:bd,month:Rr,year:Li,quarter:Vi};function Nu(e){return(r,t)=>{const n=(e+1)%7;return Tl(r,t,{weekStartsOn:n})}}function It(e,r,t,n=0){return(t==="week"?Nu(n):Au[t])(e,r)}function da(e,r,t,n,a,o){return a==="date"?Bu(e,r,t,n):Eu(e,r,t,n,o)}function Bu(e,r,t,n){let a=!1,o=!1,l=!1;Array.isArray(t)&&(t[0]e.value),s=zt(l,o),d=b(()=>{var f;return((f=s.value)===null||f===void 0?void 0:f.length)||0}),u=b(()=>Array.isArray(s.value)?new Set(s.value):new Set);function c(f,v){const{nTriggerFormInput:m,nTriggerFormChange:p}=t,{onChange:y,"onUpdate:value":h,onUpdateValue:w}=e;if(Array.isArray(s.value)){const g=Array.from(s.value),k=g.findIndex(x=>x===v);f?~k||(g.push(v),w&&oe(w,g,{actionType:"check",value:v}),h&&oe(h,g,{actionType:"check",value:v}),m(),p(),o.value=g,y&&oe(y,g)):~k&&(g.splice(k,1),w&&oe(w,g,{actionType:"uncheck",value:v}),h&&oe(h,g,{actionType:"uncheck",value:v}),y&&oe(y,g),o.value=g,m(),p())}else f?(w&&oe(w,[v],{actionType:"check",value:v}),h&&oe(h,[v],{actionType:"check",value:v}),y&&oe(y,[v]),o.value=[v],m(),p()):(w&&oe(w,[],{actionType:"uncheck",value:v}),h&&oe(h,[],{actionType:"uncheck",value:v}),y&&oe(y,[]),o.value=[],m(),p())}return At(Yi,{checkedCountRef:d,maxRef:me(e,"max"),minRef:me(e,"min"),valueSetRef:u,disabledRef:a,mergedSizeRef:n,toggleCheckbox:c}),{mergedClsPrefix:r}},render(){return i("div",{class:`${this.mergedClsPrefix}-checkbox-group`,role:"group"},this.$slots)}}),Yu=()=>i("svg",{viewBox:"0 0 64 64",class:"check-icon"},i("path",{d:"M50.42,16.76L22.34,39.45l-8.1-11.46c-1.12-1.58-3.3-1.96-4.88-0.84c-1.58,1.12-1.95,3.3-0.84,4.88l10.26,14.51 c0.56,0.79,1.42,1.31,2.38,1.45c0.16,0.02,0.32,0.03,0.48,0.03c0.8,0,1.57-0.27,2.2-0.78l30.99-25.03c1.5-1.21,1.74-3.42,0.52-4.92 C54.13,15.78,51.93,15.55,50.42,16.76z"})),Ku=()=>i("svg",{viewBox:"0 0 100 100",class:"line-icon"},i("path",{d:"M80.2,55.5H21.4c-2.8,0-5.1-2.5-5.1-5.5l0,0c0-3,2.3-5.5,5.1-5.5h58.7c2.8,0,5.1,2.5,5.1,5.5l0,0C85.2,53.1,82.9,55.5,80.2,55.5z"})),Wu=W([O("checkbox",` + `)])])]),sd=ge({name:"InternalSelection",props:Object.assign(Object.assign({},Ye.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const{mergedClsPrefixRef:r,mergedRtlRef:t}=xt(e),n=gn("InternalSelection",t,r),a=F(null),o=F(null),l=F(null),s=F(null),d=F(null),u=F(null),c=F(null),f=F(null),v=F(null),m=F(null),p=F(!1),y=F(!1),h=F(!1),x=Ye("InternalSelection","-internal-selection",ld,Fl,e,me(e,"clsPrefix")),w=g(()=>e.clearable&&!e.disabled&&(h.value||e.active)),k=g(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):ln(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),b=g(()=>{const Z=e.selectedOption;if(Z)return Z[e.labelField]}),R=g(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function D(){var Z;const{value:se}=a;if(se){const{value:De}=o;De&&(De.style.width=`${se.offsetWidth}px`,e.maxTagCount!=="responsive"&&((Z=v.value)===null||Z===void 0||Z.sync({showAllItemsBeforeCalculate:!1})))}}function T(){const{value:Z}=m;Z&&(Z.style.display="none")}function Y(){const{value:Z}=m;Z&&(Z.style.display="inline-block")}bt(me(e,"active"),Z=>{Z||T()}),bt(me(e,"pattern"),()=>{e.multiple&&nn(D)});function I(Z){const{onFocus:se}=e;se&&se(Z)}function N(Z){const{onBlur:se}=e;se&&se(Z)}function J(Z){const{onDeleteOption:se}=e;se&&se(Z)}function O(Z){const{onClear:se}=e;se&&se(Z)}function C(Z){const{onPatternInput:se}=e;se&&se(Z)}function B(Z){var se;(!Z.relatedTarget||!(!((se=l.value)===null||se===void 0)&&se.contains(Z.relatedTarget)))&&I(Z)}function L(Z){var se;!((se=l.value)===null||se===void 0)&&se.contains(Z.relatedTarget)||N(Z)}function Q(Z){O(Z)}function q(){h.value=!0}function ee(){h.value=!1}function ue(Z){!e.active||!e.filterable||Z.target!==o.value&&Z.preventDefault()}function te(Z){J(Z)}const V=F(!1);function _(Z){if(Z.key==="Backspace"&&!V.value&&!e.pattern.length){const{selectedOptions:se}=e;se!=null&&se.length&&te(se[se.length-1])}}let E=null;function U(Z){const{value:se}=a;if(se){const De=Z.target.value;se.textContent=De,D()}e.ignoreComposition&&V.value?E=Z:C(Z)}function ne(){V.value=!0}function Oe(){V.value=!1,e.ignoreComposition&&C(E),E=null}function he(Z){var se;y.value=!0,(se=e.onPatternFocus)===null||se===void 0||se.call(e,Z)}function Te(Z){var se;y.value=!1,(se=e.onPatternBlur)===null||se===void 0||se.call(e,Z)}function j(){var Z,se;if(e.filterable)y.value=!1,(Z=u.value)===null||Z===void 0||Z.blur(),(se=o.value)===null||se===void 0||se.blur();else if(e.multiple){const{value:De}=s;De==null||De.blur()}else{const{value:De}=d;De==null||De.blur()}}function be(){var Z,se,De;e.filterable?(y.value=!1,(Z=u.value)===null||Z===void 0||Z.focus()):e.multiple?(se=s.value)===null||se===void 0||se.focus():(De=d.value)===null||De===void 0||De.focus()}function Se(){const{value:Z}=o;Z&&(Y(),Z.focus())}function $e(){const{value:Z}=o;Z&&Z.blur()}function Ke(Z){const{value:se}=c;se&&se.setTextContent(`+${Z}`)}function lt(){const{value:Z}=f;return Z}function ht(){return o.value}let Qe=null;function X(){Qe!==null&&window.clearTimeout(Qe)}function we(){e.active||(X(),Qe=window.setTimeout(()=>{R.value&&(p.value=!0)},100))}function re(){X()}function Re(Z){Z||(X(),p.value=!1)}bt(R,Z=>{Z||(p.value=!1)}),Zt(()=>{Ln(()=>{const Z=u.value;Z&&(e.disabled?Z.removeAttribute("tabindex"):Z.tabIndex=y.value?-1:0)})}),yi(l,e.onResize);const{inlineThemeDisabled:Ee}=e,ze=g(()=>{const{size:Z}=e,{common:{cubicBezierEaseInOut:se},self:{fontWeight:De,borderRadius:A,color:_e,placeholderColor:He,textColor:vt,paddingSingle:et,paddingMultiple:We,caretColor:je,colorDisabled:ve,textColorDisabled:Fe,placeholderColorDisabled:S,colorActive:H,boxShadowFocus:fe,boxShadowActive:ke,boxShadowHover:xe,border:P,borderFocus:G,borderHover:ye,borderActive:Me,arrowColor:Ze,arrowColorDisabled:Be,loadingColor:$,colorActiveWarning:ae,boxShadowFocusWarning:pe,boxShadowActiveWarning:Ie,boxShadowHoverWarning:Je,borderWarning:Ge,borderFocusWarning:rt,borderHoverWarning:Nt,borderActiveWarning:Kt,colorActiveError:Ht,boxShadowFocusError:Rt,boxShadowActiveError:Wt,boxShadowHoverError:en,borderError:yt,borderFocusError:St,borderHoverError:Bt,borderActiveError:Dn,clearColor:Mn,clearColorHover:zn,clearColorPressed:In,clearSize:$n,arrowSize:An,[Ve("height",Z)]:z,[Ve("fontSize",Z)]:de}}=x.value,Pe=sr(et),ut=sr(We);return{"--n-bezier":se,"--n-border":P,"--n-border-active":Me,"--n-border-focus":G,"--n-border-hover":ye,"--n-border-radius":A,"--n-box-shadow-active":ke,"--n-box-shadow-focus":fe,"--n-box-shadow-hover":xe,"--n-caret-color":je,"--n-color":_e,"--n-color-active":H,"--n-color-disabled":ve,"--n-font-size":de,"--n-height":z,"--n-padding-single-top":Pe.top,"--n-padding-multiple-top":ut.top,"--n-padding-single-right":Pe.right,"--n-padding-multiple-right":ut.right,"--n-padding-single-left":Pe.left,"--n-padding-multiple-left":ut.left,"--n-padding-single-bottom":Pe.bottom,"--n-padding-multiple-bottom":ut.bottom,"--n-placeholder-color":He,"--n-placeholder-color-disabled":S,"--n-text-color":vt,"--n-text-color-disabled":Fe,"--n-arrow-color":Ze,"--n-arrow-color-disabled":Be,"--n-loading-color":$,"--n-color-active-warning":ae,"--n-box-shadow-focus-warning":pe,"--n-box-shadow-active-warning":Ie,"--n-box-shadow-hover-warning":Je,"--n-border-warning":Ge,"--n-border-focus-warning":rt,"--n-border-hover-warning":Nt,"--n-border-active-warning":Kt,"--n-color-active-error":Ht,"--n-box-shadow-focus-error":Rt,"--n-box-shadow-active-error":Wt,"--n-box-shadow-hover-error":en,"--n-border-error":yt,"--n-border-focus-error":St,"--n-border-hover-error":Bt,"--n-border-active-error":Dn,"--n-clear-size":$n,"--n-clear-color":Mn,"--n-clear-color-hover":zn,"--n-clear-color-pressed":In,"--n-arrow-size":An,"--n-font-weight":De}}),Le=Ee?Mt("internal-selection",g(()=>e.size[0]),ze,e):void 0;return{mergedTheme:x,mergedClearable:w,mergedClsPrefix:r,rtlEnabled:n,patternInputFocused:y,filterablePlaceholder:k,label:b,selected:R,showTagsPanel:p,isComposing:V,counterRef:c,counterWrapperRef:f,patternInputMirrorRef:a,patternInputRef:o,selfRef:l,multipleElRef:s,singleElRef:d,patternInputWrapperRef:u,overflowRef:v,inputTagElRef:m,handleMouseDown:ue,handleFocusin:B,handleClear:Q,handleMouseEnter:q,handleMouseLeave:ee,handleDeleteOption:te,handlePatternKeyDown:_,handlePatternInputInput:U,handlePatternInputBlur:Te,handlePatternInputFocus:he,handleMouseEnterCounter:we,handleMouseLeaveCounter:re,handleFocusout:L,handleCompositionEnd:Oe,handleCompositionStart:ne,onPopoverUpdateShow:Re,focus:be,focusInput:Se,blur:j,blurInput:$e,updateCounter:Ke,getCounter:lt,getTail:ht,renderLabel:e.renderLabel,cssVars:Ee?void 0:ze,themeClass:Le==null?void 0:Le.themeClass,onRender:Le==null?void 0:Le.onRender}},render(){const{status:e,multiple:r,size:t,disabled:n,filterable:a,maxTagCount:o,bordered:l,clsPrefix:s,ellipsisTagPopoverProps:d,onRender:u,renderTag:c,renderLabel:f}=this;u==null||u();const v=o==="responsive",m=typeof o=="number",p=v||m,y=i(as,null,{default:()=>i(os,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var x,w;return(w=(x=this.$slots).arrow)===null||w===void 0?void 0:w.call(x)}})});let h;if(r){const{labelField:x}=this,w=C=>i("div",{class:`${s}-base-selection-tag-wrapper`,key:C.value},c?c({option:C,handleClose:()=>{this.handleDeleteOption(C)}}):i(Hn,{size:t,closable:!C.disabled,disabled:n,onClose:()=>{this.handleDeleteOption(C)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>f?f(C,!0):ln(C[x],C,!0)})),k=()=>(m?this.selectedOptions.slice(0,o):this.selectedOptions).map(w),b=a?i("div",{class:`${s}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},i("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:n,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),i("span",{ref:"patternInputMirrorRef",class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,R=v?()=>i("div",{class:`${s}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},i(Hn,{size:t,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:n})):void 0;let D;if(m){const C=this.selectedOptions.length-o;C>0&&(D=i("div",{class:`${s}-base-selection-tag-wrapper`,key:"__counter__"},i(Hn,{size:t,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:n},{default:()=>`+${C}`})))}const T=v?a?i(co,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:k,counter:R,tail:()=>b}):i(co,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:k,counter:R}):m&&D?k().concat(D):k(),Y=p?()=>i("div",{class:`${s}-base-selection-popover`},v?k():this.selectedOptions.map(w)):void 0,I=p?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},d):null,J=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?i("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},i("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,O=a?i("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-tags`},T,v?null:b,y):i("div",{ref:"multipleElRef",class:`${s}-base-selection-tags`,tabindex:n?void 0:0},T,y);h=i(mn,null,p?i(yr,Object.assign({},I,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>O,default:Y}):O,J)}else if(a){const x=this.pattern||this.isComposing,w=this.active?!x:!this.selected,k=this.active?!1:this.selected;h=i("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:fo(this.label)},i("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${s}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:n,disabled:n,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),k?i("div",{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:"input"},i("div",{class:`${s}-base-selection-overlay__wrapper`},c?c({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):ln(this.label,this.selectedOption,!0))):null,w?i("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},i("div",{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,y)}else h=i("div",{ref:"singleElRef",class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?i("div",{class:`${s}-base-selection-input`,title:fo(this.label),key:"input"},i("div",{class:`${s}-base-selection-input__content`},c?c({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):ln(this.label,this.selectedOption,!0))):i("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},i("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)),y);return i("div",{ref:"selfRef",class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},h,l?i("div",{class:`${s}-base-selection__border`}):null,l?i("div",{class:`${s}-base-selection__state-border`}):null)}});function $r(e){return e.type==="group"}function Pi(e){return e.type==="ignored"}function ia(e,r){try{return!!(1+r.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function Fi(e,r){return{getIsGroup:$r,getIgnored:Pi,getKey(n){return $r(n)?n.name||n.key||"key-required":n[e]},getChildren(n){return n[r]}}}function dd(e,r,t,n){if(!r)return e;function a(o){if(!Array.isArray(o))return[];const l=[];for(const s of o)if($r(s)){const d=a(s[n]);d.length&&l.push(Object.assign({},s,{[n]:d}))}else{if(Pi(s))continue;r(t,s)&&l.push(s)}return l}return a(e)}function ud(e,r,t){const n=new Map;return e.forEach(a=>{$r(a)?a[t].forEach(o=>{n.set(o[r],o)}):n.set(a[r],a)}),n}function ot(e,r){return e instanceof Date?new e.constructor(r):new Date(r)}function Zn(e,r){const t=Ne(e);return isNaN(r)?ot(e,NaN):(r&&t.setDate(t.getDate()+r),t)}function Tt(e,r){const t=Ne(e);if(isNaN(r))return ot(e,NaN);if(!r)return t;const n=t.getDate(),a=ot(e,t.getTime());a.setMonth(t.getMonth()+r+1,0);const o=a.getDate();return n>=o?a:(t.setFullYear(a.getFullYear(),a.getMonth(),n),t)}const Ti=6048e5,cd=864e5,fd=6e4,hd=36e5,vd=1e3;function nr(e){return pn(e,{weekStartsOn:1})}function _i(e){const r=Ne(e),t=r.getFullYear(),n=ot(e,0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);const a=nr(n),o=ot(e,0);o.setFullYear(t,0,4),o.setHours(0,0,0,0);const l=nr(o);return r.getTime()>=a.getTime()?t+1:r.getTime()>=l.getTime()?t:t-1}function rr(e){const r=Ne(e);return r.setHours(0,0,0,0),r}function Ar(e){const r=Ne(e),t=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return t.setUTCFullYear(r.getFullYear()),+e-+t}function md(e,r){const t=rr(e),n=rr(r),a=+t-Ar(t),o=+n-Ar(n);return Math.round((a-o)/cd)}function pd(e){const r=_i(e),t=ot(e,0);return t.setFullYear(r,0,4),t.setHours(0,0,0,0),nr(t)}function gd(e,r){const t=r*3;return Tt(e,t)}function Sa(e,r){return Tt(e,r*12)}function bd(e,r){const t=rr(e),n=rr(r);return+t==+n}function yd(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Qt(e){if(!yd(e)&&typeof e!="number")return!1;const r=Ne(e);return!isNaN(Number(r))}function wd(e){const r=Ne(e);return Math.trunc(r.getMonth()/3)+1}function xd(e){const r=Ne(e);return r.setSeconds(0,0),r}function mr(e){const r=Ne(e),t=r.getMonth(),n=t-t%3;return r.setMonth(n,1),r.setHours(0,0,0,0),r}function fn(e){const r=Ne(e);return r.setDate(1),r.setHours(0,0,0,0),r}function kr(e){const r=Ne(e),t=ot(e,0);return t.setFullYear(r.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Cd(e){const r=Ne(e);return md(r,kr(r))+1}function Oi(e){const r=Ne(e),t=+nr(r)-+pd(r);return Math.round(t/Ti)+1}function Ya(e,r){var c,f,v,m;const t=Ne(e),n=t.getFullYear(),a=pr(),o=(r==null?void 0:r.firstWeekContainsDate)??((f=(c=r==null?void 0:r.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(v=a.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,l=ot(e,0);l.setFullYear(n+1,0,o),l.setHours(0,0,0,0);const s=pn(l,r),d=ot(e,0);d.setFullYear(n,0,o),d.setHours(0,0,0,0);const u=pn(d,r);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}function kd(e,r){var s,d,u,c;const t=pr(),n=(r==null?void 0:r.firstWeekContainsDate)??((d=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:d.firstWeekContainsDate)??t.firstWeekContainsDate??((c=(u=t.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,a=Ya(e,r),o=ot(e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),pn(o,r)}function Di(e,r){const t=Ne(e),n=+pn(t,r)-+kd(t,r);return Math.round(n/Ti)+1}function tt(e,r){const t=e<0?"-":"",n=Math.abs(e).toString().padStart(r,"0");return t+n}const wn={y(e,r){const t=e.getFullYear(),n=t>0?t:1-t;return tt(r==="yy"?n%100:n,r.length)},M(e,r){const t=e.getMonth();return r==="M"?String(t+1):tt(t+1,2)},d(e,r){return tt(e.getDate(),r.length)},a(e,r){const t=e.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(e,r){return tt(e.getHours()%12||12,r.length)},H(e,r){return tt(e.getHours(),r.length)},m(e,r){return tt(e.getMinutes(),r.length)},s(e,r){return tt(e.getSeconds(),r.length)},S(e,r){const t=r.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,t-3));return tt(a,r.length)}},qn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Co={G:function(e,r,t){const n=e.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(e,r,t){if(r==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return t.ordinalNumber(a,{unit:"year"})}return wn.y(e,r)},Y:function(e,r,t,n){const a=Ya(e,n),o=a>0?a:1-a;if(r==="YY"){const l=o%100;return tt(l,2)}return r==="Yo"?t.ordinalNumber(o,{unit:"year"}):tt(o,r.length)},R:function(e,r){const t=_i(e);return tt(t,r.length)},u:function(e,r){const t=e.getFullYear();return tt(t,r.length)},Q:function(e,r,t){const n=Math.ceil((e.getMonth()+1)/3);switch(r){case"Q":return String(n);case"QQ":return tt(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,r,t){const n=Math.ceil((e.getMonth()+1)/3);switch(r){case"q":return String(n);case"qq":return tt(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,r,t){const n=e.getMonth();switch(r){case"M":case"MM":return wn.M(e,r);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(e,r,t){const n=e.getMonth();switch(r){case"L":return String(n+1);case"LL":return tt(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(e,r,t,n){const a=Di(e,n);return r==="wo"?t.ordinalNumber(a,{unit:"week"}):tt(a,r.length)},I:function(e,r,t){const n=Oi(e);return r==="Io"?t.ordinalNumber(n,{unit:"week"}):tt(n,r.length)},d:function(e,r,t){return r==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):wn.d(e,r)},D:function(e,r,t){const n=Cd(e);return r==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):tt(n,r.length)},E:function(e,r,t){const n=e.getDay();switch(r){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(e,r,t,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return tt(o,2);case"eo":return t.ordinalNumber(o,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(e,r,t,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return tt(o,r.length);case"co":return t.ordinalNumber(o,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(e,r,t){const n=e.getDay(),a=n===0?7:n;switch(r){case"i":return String(a);case"ii":return tt(a,r.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(e,r,t){const a=e.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,r,t){const n=e.getHours();let a;switch(n===12?a=qn.noon:n===0?a=qn.midnight:a=n/12>=1?"pm":"am",r){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,r,t){const n=e.getHours();let a;switch(n>=17?a=qn.evening:n>=12?a=qn.afternoon:n>=4?a=qn.morning:a=qn.night,r){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,r,t){if(r==="ho"){let n=e.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return wn.h(e,r)},H:function(e,r,t){return r==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):wn.H(e,r)},K:function(e,r,t){const n=e.getHours()%12;return r==="Ko"?t.ordinalNumber(n,{unit:"hour"}):tt(n,r.length)},k:function(e,r,t){let n=e.getHours();return n===0&&(n=24),r==="ko"?t.ordinalNumber(n,{unit:"hour"}):tt(n,r.length)},m:function(e,r,t){return r==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):wn.m(e,r)},s:function(e,r,t){return r==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):wn.s(e,r)},S:function(e,r){return wn.S(e,r)},X:function(e,r,t){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(r){case"X":return Ro(n);case"XXXX":case"XX":return Vn(n);case"XXXXX":case"XXX":default:return Vn(n,":")}},x:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"x":return Ro(n);case"xxxx":case"xx":return Vn(n);case"xxxxx":case"xxx":default:return Vn(n,":")}},O:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+ko(n,":");case"OOOO":default:return"GMT"+Vn(n,":")}},z:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+ko(n,":");case"zzzz":default:return"GMT"+Vn(n,":")}},t:function(e,r,t){const n=Math.trunc(e.getTime()/1e3);return tt(n,r.length)},T:function(e,r,t){const n=e.getTime();return tt(n,r.length)}};function ko(e,r=""){const t=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return o===0?t+String(a):t+String(a)+r+tt(o,2)}function Ro(e,r){return e%60===0?(e>0?"-":"+")+tt(Math.abs(e)/60,2):Vn(e,r)}function Vn(e,r=""){const t=e>0?"-":"+",n=Math.abs(e),a=tt(Math.trunc(n/60),2),o=tt(n%60,2);return t+a+r+o}const So=(e,r)=>{switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Mi=(e,r)=>{switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Rd=(e,r)=>{const t=e.match(/(P+)(p+)?/)||[],n=t[1],a=t[2];if(!a)return So(e,r);let o;switch(n){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",So(n,r)).replace("{{time}}",Mi(a,r))},Pa={p:Mi,P:Rd},Sd=/^D+$/,Pd=/^Y+$/,Fd=["D","DD","YY","YYYY"];function zi(e){return Sd.test(e)}function Ii(e){return Pd.test(e)}function Fa(e,r,t){const n=Td(e,r,t);if(console.warn(n),Fd.includes(e))throw new RangeError(n)}function Td(e,r,t){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${r}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const _d=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Od=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Dd=/^'([^]*?)'?$/,Md=/''/g,zd=/[a-zA-Z]/;function nt(e,r,t){var c,f,v,m,p,y,h,x;const n=pr(),a=(t==null?void 0:t.locale)??n.locale??ei,o=(t==null?void 0:t.firstWeekContainsDate)??((f=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(v=n.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((y=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:y.weekStartsOn)??n.weekStartsOn??((x=(h=n.locale)==null?void 0:h.options)==null?void 0:x.weekStartsOn)??0,s=Ne(e);if(!Qt(s))throw new RangeError("Invalid time value");let d=r.match(Od).map(w=>{const k=w[0];if(k==="p"||k==="P"){const b=Pa[k];return b(w,a.formatLong)}return w}).join("").match(_d).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const k=w[0];if(k==="'")return{isToken:!1,value:Id(w)};if(Co[k])return{isToken:!0,value:w};if(k.match(zd))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return{isToken:!1,value:w}});a.localize.preprocessor&&(d=a.localize.preprocessor(s,d));const u={firstWeekContainsDate:o,weekStartsOn:l,locale:a};return d.map(w=>{if(!w.isToken)return w.value;const k=w.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&Ii(k)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&zi(k))&&Fa(k,r,String(e));const b=Co[k[0]];return b(s,k,a.localize,u)}).join("")}function Id(e){const r=e.match(Dd);return r?r[1].replace(Md,"'"):e}function Gt(e){return Ne(e).getDate()}function $d(e){return Ne(e).getDay()}function Ad(e){const r=Ne(e),t=r.getFullYear(),n=r.getMonth(),a=ot(e,0);return a.setFullYear(t,n+1,0),a.setHours(0,0,0,0),a.getDate()}function $i(){return Object.assign({},pr())}function Cn(e){return Ne(e).getHours()}function Nd(e){let t=Ne(e).getDay();return t===0&&(t=7),t}function Bd(e){return Ne(e).getMilliseconds()}function Nr(e){return Ne(e).getMinutes()}function dt(e){return Ne(e).getMonth()}function Br(e){return Ne(e).getSeconds()}function ce(e){return Ne(e).getTime()}function mt(e){return Ne(e).getFullYear()}function Ed(e,r){const t=r instanceof Date?ot(r,0):new r(0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}const Vd=10;class Ai{constructor(){Ce(this,"subPriority",0)}validate(r,t){return!0}}class Ld extends Ai{constructor(r,t,n,a,o){super(),this.value=r,this.validateValue=t,this.setValue=n,this.priority=a,o&&(this.subPriority=o)}validate(r,t){return this.validateValue(r,this.value,t)}set(r,t,n){return this.setValue(r,t,this.value,n)}}class Hd extends Ai{constructor(){super(...arguments);Ce(this,"priority",Vd);Ce(this,"subPriority",-1)}set(t,n){return n.timestampIsSet?t:ot(t,Ed(t,Date))}}class Xe{run(r,t,n,a){const o=this.parse(r,t,n,a);return o?{setter:new Ld(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(r,t,n){return!0}}class Ud extends Xe{constructor(){super(...arguments);Ce(this,"priority",140);Ce(this,"incompatibleTokens",["R","u","t","T"])}parse(t,n,a){switch(n){case"G":case"GG":case"GGG":return a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"});case"GGGGG":return a.era(t,{width:"narrow"});case"GGGG":default:return a.era(t,{width:"wide"})||a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"})}}set(t,n,a){return n.era=a,t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}}const Ct={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}/},an={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 kt(e,r){return e&&{value:r(e.value),rest:e.rest}}function gt(e,r){const t=r.match(e);return t?{value:parseInt(t[0],10),rest:r.slice(t[0].length)}:null}function on(e,r){const t=r.match(e);if(!t)return null;if(t[0]==="Z")return{value:0,rest:r.slice(1)};const n=t[1]==="+"?1:-1,a=t[2]?parseInt(t[2],10):0,o=t[3]?parseInt(t[3],10):0,l=t[5]?parseInt(t[5],10):0;return{value:n*(a*hd+o*fd+l*vd),rest:r.slice(t[0].length)}}function Ni(e){return gt(Ct.anyDigitsSigned,e)}function wt(e,r){switch(e){case 1:return gt(Ct.singleDigit,r);case 2:return gt(Ct.twoDigits,r);case 3:return gt(Ct.threeDigits,r);case 4:return gt(Ct.fourDigits,r);default:return gt(new RegExp("^\\d{1,"+e+"}"),r)}}function Er(e,r){switch(e){case 1:return gt(Ct.singleDigitSigned,r);case 2:return gt(Ct.twoDigitsSigned,r);case 3:return gt(Ct.threeDigitsSigned,r);case 4:return gt(Ct.fourDigitsSigned,r);default:return gt(new RegExp("^-?\\d{1,"+e+"}"),r)}}function Ka(e){switch(e){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 Bi(e,r){const t=r>0,n=t?r:1-r;let a;if(n<=50)a=e||100;else{const o=n+50,l=Math.trunc(o/100)*100,s=e>=o%100;a=e+l-(s?100:0)}return t?a:1-a}function Ei(e){return e%400===0||e%4===0&&e%100!==0}class jd extends Xe{constructor(){super(...arguments);Ce(this,"priority",130);Ce(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,n,a){const o=l=>({year:l,isTwoDigitYear:n==="yy"});switch(n){case"y":return kt(wt(4,t),o);case"yo":return kt(a.ordinalNumber(t,{unit:"year"}),o);default:return kt(wt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,a){const o=t.getFullYear();if(a.isTwoDigitYear){const s=Bi(a.year,o);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const l=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(l,0,1),t.setHours(0,0,0,0),t}}class Yd extends Xe{constructor(){super(...arguments);Ce(this,"priority",130);Ce(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,n,a){const o=l=>({year:l,isTwoDigitYear:n==="YY"});switch(n){case"Y":return kt(wt(4,t),o);case"Yo":return kt(a.ordinalNumber(t,{unit:"year"}),o);default:return kt(wt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,a,o){const l=Ya(t,o);if(a.isTwoDigitYear){const d=Bi(a.year,l);return t.setFullYear(d,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),pn(t,o)}const s=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),pn(t,o)}}class Kd extends Xe{constructor(){super(...arguments);Ce(this,"priority",130);Ce(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,n){return Er(n==="R"?4:n.length,t)}set(t,n,a){const o=ot(t,0);return o.setFullYear(a,0,4),o.setHours(0,0,0,0),nr(o)}}class Wd extends Xe{constructor(){super(...arguments);Ce(this,"priority",130);Ce(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,n){return Er(n==="u"?4:n.length,t)}set(t,n,a){return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}}class qd extends Xe{constructor(){super(...arguments);Ce(this,"priority",120);Ce(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,a){switch(n){case"Q":case"QQ":return wt(n.length,t);case"Qo":return a.ordinalNumber(t,{unit:"quarter"});case"QQQ":return a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(t,{width:"wide",context:"formatting"})||a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}}class Gd extends Xe{constructor(){super(...arguments);Ce(this,"priority",120);Ce(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,a){switch(n){case"q":case"qq":return wt(n.length,t);case"qo":return a.ordinalNumber(t,{unit:"quarter"});case"qqq":return a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(t,{width:"wide",context:"standalone"})||a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}}class Xd extends Xe{constructor(){super(...arguments);Ce(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);Ce(this,"priority",110)}parse(t,n,a){const o=l=>l-1;switch(n){case"M":return kt(gt(Ct.month,t),o);case"MM":return kt(wt(2,t),o);case"Mo":return kt(a.ordinalNumber(t,{unit:"month"}),o);case"MMM":return a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(t,{width:"wide",context:"formatting"})||a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}}class Qd extends Xe{constructor(){super(...arguments);Ce(this,"priority",110);Ce(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,n,a){const o=l=>l-1;switch(n){case"L":return kt(gt(Ct.month,t),o);case"LL":return kt(wt(2,t),o);case"Lo":return kt(a.ordinalNumber(t,{unit:"month"}),o);case"LLL":return a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(t,{width:"wide",context:"standalone"})||a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}}function Zd(e,r,t){const n=Ne(e),a=Di(n,t)-r;return n.setDate(n.getDate()-a*7),n}class Jd extends Xe{constructor(){super(...arguments);Ce(this,"priority",100);Ce(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,n,a){switch(n){case"w":return gt(Ct.week,t);case"wo":return a.ordinalNumber(t,{unit:"week"});default:return wt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a,o){return pn(Zd(t,a,o),o)}}function eu(e,r){const t=Ne(e),n=Oi(t)-r;return t.setDate(t.getDate()-n*7),t}class tu extends Xe{constructor(){super(...arguments);Ce(this,"priority",100);Ce(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,n,a){switch(n){case"I":return gt(Ct.week,t);case"Io":return a.ordinalNumber(t,{unit:"week"});default:return wt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a){return nr(eu(t,a))}}const nu=[31,28,31,30,31,30,31,31,30,31,30,31],ru=[31,29,31,30,31,30,31,31,30,31,30,31];class au extends Xe{constructor(){super(...arguments);Ce(this,"priority",90);Ce(this,"subPriority",1);Ce(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,n,a){switch(n){case"d":return gt(Ct.date,t);case"do":return a.ordinalNumber(t,{unit:"date"});default:return wt(n.length,t)}}validate(t,n){const a=t.getFullYear(),o=Ei(a),l=t.getMonth();return o?n>=1&&n<=ru[l]:n>=1&&n<=nu[l]}set(t,n,a){return t.setDate(a),t.setHours(0,0,0,0),t}}class ou extends Xe{constructor(){super(...arguments);Ce(this,"priority",90);Ce(this,"subpriority",1);Ce(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,n,a){switch(n){case"D":case"DD":return gt(Ct.dayOfYear,t);case"Do":return a.ordinalNumber(t,{unit:"date"});default:return wt(n.length,t)}}validate(t,n){const a=t.getFullYear();return Ei(a)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,a){return t.setMonth(0,a),t.setHours(0,0,0,0),t}}function Wa(e,r,t){var f,v,m,p;const n=pr(),a=(t==null?void 0:t.weekStartsOn)??((v=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:v.weekStartsOn)??n.weekStartsOn??((p=(m=n.locale)==null?void 0:m.options)==null?void 0:p.weekStartsOn)??0,o=Ne(e),l=o.getDay(),d=(r%7+7)%7,u=7-a,c=r<0||r>6?r-(l+u)%7:(d+u)%7-(l+u)%7;return Zn(o,c)}class iu extends Xe{constructor(){super(...arguments);Ce(this,"priority",90);Ce(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,n,a){switch(n){case"E":case"EE":case"EEE":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,o){return t=Wa(t,a,o),t.setHours(0,0,0,0),t}}class lu extends Xe{constructor(){super(...arguments);Ce(this,"priority",90);Ce(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,n,a,o){const l=s=>{const d=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+d};switch(n){case"e":case"ee":return kt(wt(n.length,t),l);case"eo":return kt(a.ordinalNumber(t,{unit:"day"}),l);case"eee":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeeee":return a.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,o){return t=Wa(t,a,o),t.setHours(0,0,0,0),t}}class su extends Xe{constructor(){super(...arguments);Ce(this,"priority",90);Ce(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,n,a,o){const l=s=>{const d=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+d};switch(n){case"c":case"cc":return kt(wt(n.length,t),l);case"co":return kt(a.ordinalNumber(t,{unit:"day"}),l);case"ccc":return a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"ccccc":return a.day(t,{width:"narrow",context:"standalone"});case"cccccc":return a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(t,{width:"wide",context:"standalone"})||a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,o){return t=Wa(t,a,o),t.setHours(0,0,0,0),t}}function du(e,r){const t=Ne(e),n=Nd(t),a=r-n;return Zn(t,a)}class uu extends Xe{constructor(){super(...arguments);Ce(this,"priority",90);Ce(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,n,a){const o=l=>l===0?7:l;switch(n){case"i":case"ii":return wt(n.length,t);case"io":return a.ordinalNumber(t,{unit:"day"});case"iii":return kt(a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return kt(a.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return kt(a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return kt(a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,a){return t=du(t,a),t.setHours(0,0,0,0),t}}class cu extends Xe{constructor(){super(...arguments);Ce(this,"priority",80);Ce(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,n,a){switch(n){case"a":case"aa":case"aaa":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours(Ka(a),0,0,0),t}}class fu extends Xe{constructor(){super(...arguments);Ce(this,"priority",80);Ce(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,n,a){switch(n){case"b":case"bb":case"bbb":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours(Ka(a),0,0,0),t}}class hu extends Xe{constructor(){super(...arguments);Ce(this,"priority",80);Ce(this,"incompatibleTokens",["a","b","t","T"])}parse(t,n,a){switch(n){case"B":case"BB":case"BBB":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours(Ka(a),0,0,0),t}}class vu extends Xe{constructor(){super(...arguments);Ce(this,"priority",70);Ce(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,n,a){switch(n){case"h":return gt(Ct.hour12h,t);case"ho":return a.ordinalNumber(t,{unit:"hour"});default:return wt(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,a){const o=t.getHours()>=12;return o&&a<12?t.setHours(a+12,0,0,0):!o&&a===12?t.setHours(0,0,0,0):t.setHours(a,0,0,0),t}}class mu extends Xe{constructor(){super(...arguments);Ce(this,"priority",70);Ce(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,n,a){switch(n){case"H":return gt(Ct.hour23h,t);case"Ho":return a.ordinalNumber(t,{unit:"hour"});default:return wt(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,a){return t.setHours(a,0,0,0),t}}class pu extends Xe{constructor(){super(...arguments);Ce(this,"priority",70);Ce(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,n,a){switch(n){case"K":return gt(Ct.hour11h,t);case"Ko":return a.ordinalNumber(t,{unit:"hour"});default:return wt(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.getHours()>=12&&a<12?t.setHours(a+12,0,0,0):t.setHours(a,0,0,0),t}}class gu extends Xe{constructor(){super(...arguments);Ce(this,"priority",70);Ce(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,n,a){switch(n){case"k":return gt(Ct.hour24h,t);case"ko":return a.ordinalNumber(t,{unit:"hour"});default:return wt(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,a){const o=a<=24?a%24:a;return t.setHours(o,0,0,0),t}}class bu extends Xe{constructor(){super(...arguments);Ce(this,"priority",60);Ce(this,"incompatibleTokens",["t","T"])}parse(t,n,a){switch(n){case"m":return gt(Ct.minute,t);case"mo":return a.ordinalNumber(t,{unit:"minute"});default:return wt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,a){return t.setMinutes(a,0,0),t}}class yu extends Xe{constructor(){super(...arguments);Ce(this,"priority",50);Ce(this,"incompatibleTokens",["t","T"])}parse(t,n,a){switch(n){case"s":return gt(Ct.second,t);case"so":return a.ordinalNumber(t,{unit:"second"});default:return wt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,a){return t.setSeconds(a,0),t}}class wu extends Xe{constructor(){super(...arguments);Ce(this,"priority",30);Ce(this,"incompatibleTokens",["t","T"])}parse(t,n){const a=o=>Math.trunc(o*Math.pow(10,-n.length+3));return kt(wt(n.length,t),a)}set(t,n,a){return t.setMilliseconds(a),t}}class xu extends Xe{constructor(){super(...arguments);Ce(this,"priority",10);Ce(this,"incompatibleTokens",["t","T","x"])}parse(t,n){switch(n){case"X":return on(an.basicOptionalMinutes,t);case"XX":return on(an.basic,t);case"XXXX":return on(an.basicOptionalSeconds,t);case"XXXXX":return on(an.extendedOptionalSeconds,t);case"XXX":default:return on(an.extended,t)}}set(t,n,a){return n.timestampIsSet?t:ot(t,t.getTime()-Ar(t)-a)}}class Cu extends Xe{constructor(){super(...arguments);Ce(this,"priority",10);Ce(this,"incompatibleTokens",["t","T","X"])}parse(t,n){switch(n){case"x":return on(an.basicOptionalMinutes,t);case"xx":return on(an.basic,t);case"xxxx":return on(an.basicOptionalSeconds,t);case"xxxxx":return on(an.extendedOptionalSeconds,t);case"xxx":default:return on(an.extended,t)}}set(t,n,a){return n.timestampIsSet?t:ot(t,t.getTime()-Ar(t)-a)}}class ku extends Xe{constructor(){super(...arguments);Ce(this,"priority",40);Ce(this,"incompatibleTokens","*")}parse(t){return Ni(t)}set(t,n,a){return[ot(t,a*1e3),{timestampIsSet:!0}]}}class Ru extends Xe{constructor(){super(...arguments);Ce(this,"priority",20);Ce(this,"incompatibleTokens","*")}parse(t){return Ni(t)}set(t,n,a){return[ot(t,a),{timestampIsSet:!0}]}}const Su={G:new Ud,y:new jd,Y:new Yd,R:new Kd,u:new Wd,Q:new qd,q:new Gd,M:new Xd,L:new Qd,w:new Jd,I:new tu,d:new au,D:new ou,E:new iu,e:new lu,c:new su,i:new uu,a:new cu,b:new fu,B:new hu,h:new vu,H:new mu,K:new pu,k:new gu,m:new bu,s:new yu,S:new wu,X:new xu,x:new Cu,t:new ku,T:new Ru},Pu=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fu=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Tu=/^'([^]*?)'?$/,_u=/''/g,Ou=/\S/,Du=/[a-zA-Z]/;function Mu(e,r,t,n){var y,h,x,w,k,b,R,D;const a=$i(),o=(n==null?void 0:n.locale)??a.locale??ei,l=(n==null?void 0:n.firstWeekContainsDate)??((h=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:h.firstWeekContainsDate)??a.firstWeekContainsDate??((w=(x=a.locale)==null?void 0:x.options)==null?void 0:w.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((b=(k=n==null?void 0:n.locale)==null?void 0:k.options)==null?void 0:b.weekStartsOn)??a.weekStartsOn??((D=(R=a.locale)==null?void 0:R.options)==null?void 0:D.weekStartsOn)??0;if(r==="")return e===""?Ne(t):ot(t,NaN);const d={firstWeekContainsDate:l,weekStartsOn:s,locale:o},u=[new Hd],c=r.match(Fu).map(T=>{const Y=T[0];if(Y in Pa){const I=Pa[Y];return I(T,o.formatLong)}return T}).join("").match(Pu),f=[];for(let T of c){!(n!=null&&n.useAdditionalWeekYearTokens)&&Ii(T)&&Fa(T,r,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&zi(T)&&Fa(T,r,e);const Y=T[0],I=Su[Y];if(I){const{incompatibleTokens:N}=I;if(Array.isArray(N)){const O=f.find(C=>N.includes(C.token)||C.token===Y);if(O)throw new RangeError(`The format string mustn't contain \`${O.fullToken}\` and \`${T}\` at the same time`)}else if(I.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);f.push({token:Y,fullToken:T});const J=I.run(e,T,o.match,d);if(!J)return ot(t,NaN);u.push(J.setter),e=J.rest}else{if(Y.match(Du))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");if(T==="''"?T="'":Y==="'"&&(T=zu(T)),e.indexOf(T)===0)e=e.slice(T.length);else return ot(t,NaN)}}if(e.length>0&&Ou.test(e))return ot(t,NaN);const v=u.map(T=>T.priority).sort((T,Y)=>Y-T).filter((T,Y,I)=>I.indexOf(T)===Y).map(T=>u.filter(Y=>Y.priority===T).sort((Y,I)=>I.subPriority-Y.subPriority)).map(T=>T[0]);let m=Ne(t);if(isNaN(m.getTime()))return ot(t,NaN);const p={};for(const T of v){if(!T.validate(m,d))return ot(t,NaN);const Y=T.set(m,p,d);Array.isArray(Y)?(m=Y[0],Object.assign(p,Y[1])):m=Y}return ot(t,m)}function zu(e){return e.match(Tu)[1].replace(_u,"'")}function Iu(e){const r=Ne(e);return r.setMinutes(0,0,0),r}function Rr(e,r){const t=Ne(e),n=Ne(r);return t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()}function Vi(e,r){const t=mr(e),n=mr(r);return+t==+n}function qa(e){const r=Ne(e);return r.setMilliseconds(0),r}function Li(e,r){const t=Ne(e),n=Ne(r);return t.getFullYear()===n.getFullYear()}function Ga(e,r){const t=Ne(e),n=t.getFullYear(),a=t.getDate(),o=ot(e,0);o.setFullYear(n,r,15),o.setHours(0,0,0,0);const l=Ad(o);return t.setMonth(r,Math.min(a,l)),t}function _t(e,r){let t=Ne(e);return isNaN(+t)?ot(e,NaN):(r.year!=null&&t.setFullYear(r.year),r.month!=null&&(t=Ga(t,r.month)),r.date!=null&&t.setDate(r.date),r.hours!=null&&t.setHours(r.hours),r.minutes!=null&&t.setMinutes(r.minutes),r.seconds!=null&&t.setSeconds(r.seconds),r.milliseconds!=null&&t.setMilliseconds(r.milliseconds),t)}function En(e,r){const t=Ne(e);return t.setHours(r),t}function la(e,r){const t=Ne(e);return t.setMinutes(r),t}function $u(e,r){const t=Ne(e),n=Math.trunc(t.getMonth()/3)+1,a=r-n;return Ga(t,t.getMonth()+a*3)}function sa(e,r){const t=Ne(e);return t.setSeconds(r),t}function Ta(e,r){const t=Ne(e);return isNaN(+t)?ot(e,NaN):(t.setFullYear(r),t)}const Au={date:bd,month:Rr,year:Li,quarter:Vi};function Nu(e){return(r,t)=>{const n=(e+1)%7;return Tl(r,t,{weekStartsOn:n})}}function It(e,r,t,n=0){return(t==="week"?Nu(n):Au[t])(e,r)}function da(e,r,t,n,a,o){return a==="date"?Bu(e,r,t,n):Eu(e,r,t,n,o)}function Bu(e,r,t,n){let a=!1,o=!1,l=!1;Array.isArray(t)&&(t[0]e.value),s=zt(l,o),d=g(()=>{var f;return((f=s.value)===null||f===void 0?void 0:f.length)||0}),u=g(()=>Array.isArray(s.value)?new Set(s.value):new Set);function c(f,v){const{nTriggerFormInput:m,nTriggerFormChange:p}=t,{onChange:y,"onUpdate:value":h,onUpdateValue:x}=e;if(Array.isArray(s.value)){const w=Array.from(s.value),k=w.findIndex(b=>b===v);f?~k||(w.push(v),x&&ie(x,w,{actionType:"check",value:v}),h&&ie(h,w,{actionType:"check",value:v}),m(),p(),o.value=w,y&&ie(y,w)):~k&&(w.splice(k,1),x&&ie(x,w,{actionType:"uncheck",value:v}),h&&ie(h,w,{actionType:"uncheck",value:v}),y&&ie(y,w),o.value=w,m(),p())}else f?(x&&ie(x,[v],{actionType:"check",value:v}),h&&ie(h,[v],{actionType:"check",value:v}),y&&ie(y,[v]),o.value=[v],m(),p()):(x&&ie(x,[],{actionType:"uncheck",value:v}),h&&ie(h,[],{actionType:"uncheck",value:v}),y&&ie(y,[]),o.value=[],m(),p())}return At(Yi,{checkedCountRef:d,maxRef:me(e,"max"),minRef:me(e,"min"),valueSetRef:u,disabledRef:a,mergedSizeRef:n,toggleCheckbox:c}),{mergedClsPrefix:r}},render(){return i("div",{class:`${this.mergedClsPrefix}-checkbox-group`,role:"group"},this.$slots)}}),Yu=()=>i("svg",{viewBox:"0 0 64 64",class:"check-icon"},i("path",{d:"M50.42,16.76L22.34,39.45l-8.1-11.46c-1.12-1.58-3.3-1.96-4.88-0.84c-1.58,1.12-1.95,3.3-0.84,4.88l10.26,14.51 c0.56,0.79,1.42,1.31,2.38,1.45c0.16,0.02,0.32,0.03,0.48,0.03c0.8,0,1.57-0.27,2.2-0.78l30.99-25.03c1.5-1.21,1.74-3.42,0.52-4.92 C54.13,15.78,51.93,15.55,50.42,16.76z"})),Ku=()=>i("svg",{viewBox:"0 0 100 100",class:"line-icon"},i("path",{d:"M80.2,55.5H21.4c-2.8,0-5.1-2.5-5.1-5.5l0,0c0-3,2.3-5.5,5.1-5.5h58.7c2.8,0,5.1,2.5,5.1,5.5l0,0C85.2,53.1,82.9,55.5,80.2,55.5z"})),Wu=W([M("checkbox",` font-size: var(--n-font-size); outline: none; cursor: pointer; @@ -355,47 +355,47 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config word-break: break-word; line-height: var(--n-size); --n-merged-color-table: var(--n-color-table); - `,[K("show-label","line-height: var(--n-label-line-height);"),W("&:hover",[O("checkbox-box",[le("border","border: var(--n-border-checked);")])]),W("&:focus:not(:active)",[O("checkbox-box",[le("border",` + `,[K("show-label","line-height: var(--n-label-line-height);"),W("&:hover",[M("checkbox-box",[le("border","border: var(--n-border-checked);")])]),W("&:focus:not(:active)",[M("checkbox-box",[le("border",` border: var(--n-border-focus); box-shadow: var(--n-box-shadow-focus); - `)])]),K("inside-table",[O("checkbox-box",` + `)])]),K("inside-table",[M("checkbox-box",` background-color: var(--n-merged-color-table); - `)]),K("checked",[O("checkbox-box",` + `)]),K("checked",[M("checkbox-box",` background-color: var(--n-color-checked); - `,[O("checkbox-icon",[W(".check-icon",` + `,[M("checkbox-icon",[W(".check-icon",` opacity: 1; transform: scale(1); - `)])])]),K("indeterminate",[O("checkbox-box",[O("checkbox-icon",[W(".check-icon",` + `)])])]),K("indeterminate",[M("checkbox-box",[M("checkbox-icon",[W(".check-icon",` opacity: 0; transform: scale(.5); `),W(".line-icon",` opacity: 1; transform: scale(1); - `)])])]),K("checked, indeterminate",[W("&:focus:not(:active)",[O("checkbox-box",[le("border",` + `)])])]),K("checked, indeterminate",[W("&:focus:not(:active)",[M("checkbox-box",[le("border",` border: var(--n-border-checked); box-shadow: var(--n-box-shadow-focus); - `)])]),O("checkbox-box",` + `)])]),M("checkbox-box",` background-color: var(--n-color-checked); border-left: 0; border-top: 0; - `,[le("border",{border:"var(--n-border-checked)"})])]),K("disabled",{cursor:"not-allowed"},[K("checked",[O("checkbox-box",` + `,[le("border",{border:"var(--n-border-checked)"})])]),K("disabled",{cursor:"not-allowed"},[K("checked",[M("checkbox-box",` background-color: var(--n-color-disabled-checked); - `,[le("border",{border:"var(--n-border-disabled-checked)"}),O("checkbox-icon",[W(".check-icon, .line-icon",{fill:"var(--n-check-mark-color-disabled-checked)"})])])]),O("checkbox-box",` + `,[le("border",{border:"var(--n-border-disabled-checked)"}),M("checkbox-icon",[W(".check-icon, .line-icon",{fill:"var(--n-check-mark-color-disabled-checked)"})])])]),M("checkbox-box",` background-color: var(--n-color-disabled); `,[le("border",` border: var(--n-border-disabled); - `),O("checkbox-icon",[W(".check-icon, .line-icon",` + `),M("checkbox-icon",[W(".check-icon, .line-icon",` fill: var(--n-check-mark-color-disabled); `)])]),le("label",` color: var(--n-text-color-disabled); - `)]),O("checkbox-box-wrapper",` + `)]),M("checkbox-box-wrapper",` position: relative; width: var(--n-size); flex-shrink: 0; flex-grow: 0; user-select: none; -webkit-user-select: none; - `),O("checkbox-box",` + `),M("checkbox-box",` position: absolute; left: 0; top: 50%; @@ -418,7 +418,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config top: 0; bottom: 0; border: var(--n-border); - `),O("checkbox-icon",` + `),M("checkbox-icon",` display: flex; align-items: center; justify-content: center; @@ -445,22 +445,22 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config -webkit-user-select: none; padding: var(--n-label-padding); font-weight: var(--n-label-font-weight); - `,[W("&:empty",{display:"none"})])]),ti(O("checkbox",` + `,[W("&:empty",{display:"none"})])]),ti(M("checkbox",` --n-merged-color-table: var(--n-color-table-modal); - `)),ni(O("checkbox",` + `)),ni(M("checkbox",` --n-merged-color-table: var(--n-color-table-popover); - `))]),qu=Object.assign(Object.assign({},Ye.props),{size:String,checked:{type:[Boolean,String,Number],default:void 0},defaultChecked:{type:[Boolean,String,Number],default:!1},value:[String,Number],disabled:{type:Boolean,default:void 0},indeterminate:Boolean,label:String,focusable:{type:Boolean,default:!0},checkedValue:{type:[Boolean,String,Number],default:!0},uncheckedValue:{type:[Boolean,String,Number],default:!1},"onUpdate:checked":[Function,Array],onUpdateChecked:[Function,Array],privateInsideTable:Boolean,onChange:[Function,Array]}),Xa=ge({name:"Checkbox",props:qu,setup(e){const r=it(Yi,null),t=F(null),{mergedClsPrefixRef:n,inlineThemeDisabled:a,mergedRtlRef:o}=xt(e),l=F(e.defaultChecked),s=me(e,"checked"),d=zt(s,l),u=at(()=>{if(r){const $=r.valueSetRef.value;return $&&e.value!==void 0?$.has(e.value):!1}else return d.value===e.checkedValue}),c=Tn(e,{mergedSize($){const{size:T}=e;if(T!==void 0)return T;if(r){const{value:Y}=r.mergedSizeRef;if(Y!==void 0)return Y}if($){const{mergedSize:Y}=$;if(Y!==void 0)return Y.value}return"medium"},mergedDisabled($){const{disabled:T}=e;if(T!==void 0)return T;if(r){if(r.disabledRef.value)return!0;const{maxRef:{value:Y},checkedCountRef:z}=r;if(Y!==void 0&&z.value>=Y&&!u.value)return!0;const{minRef:{value:N}}=r;if(N!==void 0&&z.value<=N&&u.value)return!0}return $?$.disabled.value:!1}}),{mergedDisabledRef:f,mergedSizeRef:v}=c,m=Ye("Checkbox","-checkbox",Wu,_l,e,n);function p($){if(r&&e.value!==void 0)r.toggleCheckbox(!u.value,e.value);else{const{onChange:T,"onUpdate:checked":Y,onUpdateChecked:z}=e,{nTriggerFormInput:N,nTriggerFormChange:J}=c,D=u.value?e.uncheckedValue:e.checkedValue;Y&&oe(Y,D,$),z&&oe(z,D,$),T&&oe(T,D,$),N(),J(),l.value=D}}function y($){f.value||p($)}function h($){if(!f.value)switch($.key){case" ":case"Enter":p($)}}function w($){switch($.key){case" ":$.preventDefault()}}const g={focus:()=>{var $;($=t.value)===null||$===void 0||$.focus()},blur:()=>{var $;($=t.value)===null||$===void 0||$.blur()}},k=gn("Checkbox",o,n),x=b(()=>{const{value:$}=v,{common:{cubicBezierEaseInOut:T},self:{borderRadius:Y,color:z,colorChecked:N,colorDisabled:J,colorTableHeader:D,colorTableHeaderModal:C,colorTableHeaderPopover:B,checkMarkColor:L,checkMarkColorDisabled:Q,border:q,borderFocus:ee,borderDisabled:ue,borderChecked:te,boxShadowFocus:V,textColor:_,textColorDisabled:E,checkMarkColorDisabledChecked:U,colorDisabledChecked:ne,borderDisabledChecked:De,labelPadding:he,labelLineHeight:Te,labelFontWeight:j,[Ve("fontSize",$)]:be,[Ve("size",$)]:Se}}=m.value;return{"--n-label-line-height":Te,"--n-label-font-weight":j,"--n-size":Se,"--n-bezier":T,"--n-border-radius":Y,"--n-border":q,"--n-border-checked":te,"--n-border-focus":ee,"--n-border-disabled":ue,"--n-border-disabled-checked":De,"--n-box-shadow-focus":V,"--n-color":z,"--n-color-checked":N,"--n-color-table":D,"--n-color-table-modal":C,"--n-color-table-popover":B,"--n-color-disabled":J,"--n-color-disabled-checked":ne,"--n-text-color":_,"--n-text-color-disabled":E,"--n-check-mark-color":L,"--n-check-mark-color-disabled":Q,"--n-check-mark-color-disabled-checked":U,"--n-font-size":be,"--n-label-padding":he}}),P=a?Mt("checkbox",b(()=>v.value[0]),x,e):void 0;return Object.assign(c,g,{rtlEnabled:k,selfRef:t,mergedClsPrefix:n,mergedDisabled:f,renderedChecked:u,mergedTheme:m,labelId:ai(),handleClick:y,handleKeyUp:h,handleKeyDown:w,cssVars:a?void 0:x,themeClass:P==null?void 0:P.themeClass,onRender:P==null?void 0:P.onRender})},render(){var e;const{$slots:r,renderedChecked:t,mergedDisabled:n,indeterminate:a,privateInsideTable:o,cssVars:l,labelId:s,label:d,mergedClsPrefix:u,focusable:c,handleKeyUp:f,handleKeyDown:v,handleClick:m}=this;(e=this.onRender)===null||e===void 0||e.call(this);const p=er(r.default,y=>d||y?i("span",{class:`${u}-checkbox__label`,id:s},d||y):null);return i("div",{ref:"selfRef",class:[`${u}-checkbox`,this.themeClass,this.rtlEnabled&&`${u}-checkbox--rtl`,t&&`${u}-checkbox--checked`,n&&`${u}-checkbox--disabled`,a&&`${u}-checkbox--indeterminate`,o&&`${u}-checkbox--inside-table`,p&&`${u}-checkbox--show-label`],tabindex:n||!c?void 0:0,role:"checkbox","aria-checked":a?"mixed":t,"aria-labelledby":s,style:l,onKeyup:f,onKeydown:v,onClick:m,onMousedown:()=>{hn("selectstart",window,y=>{y.preventDefault()},{once:!0})}},i("div",{class:`${u}-checkbox-box-wrapper`}," ",i("div",{class:`${u}-checkbox-box`},i(ri,null,{default:()=>this.indeterminate?i("div",{key:"indeterminate",class:`${u}-checkbox-icon`},Ku()):i("div",{key:"check",class:`${u}-checkbox-icon`},Yu())}),i("div",{class:`${u}-checkbox-box__border`}))),p)}}),Ki=bn("n-popselect"),Gu=O("popselect-menu",` + `))]),qu=Object.assign(Object.assign({},Ye.props),{size:String,checked:{type:[Boolean,String,Number],default:void 0},defaultChecked:{type:[Boolean,String,Number],default:!1},value:[String,Number],disabled:{type:Boolean,default:void 0},indeterminate:Boolean,label:String,focusable:{type:Boolean,default:!0},checkedValue:{type:[Boolean,String,Number],default:!0},uncheckedValue:{type:[Boolean,String,Number],default:!1},"onUpdate:checked":[Function,Array],onUpdateChecked:[Function,Array],privateInsideTable:Boolean,onChange:[Function,Array]}),Xa=ge({name:"Checkbox",props:qu,setup(e){const r=it(Yi,null),t=F(null),{mergedClsPrefixRef:n,inlineThemeDisabled:a,mergedRtlRef:o}=xt(e),l=F(e.defaultChecked),s=me(e,"checked"),d=zt(s,l),u=at(()=>{if(r){const D=r.valueSetRef.value;return D&&e.value!==void 0?D.has(e.value):!1}else return d.value===e.checkedValue}),c=_n(e,{mergedSize(D){const{size:T}=e;if(T!==void 0)return T;if(r){const{value:Y}=r.mergedSizeRef;if(Y!==void 0)return Y}if(D){const{mergedSize:Y}=D;if(Y!==void 0)return Y.value}return"medium"},mergedDisabled(D){const{disabled:T}=e;if(T!==void 0)return T;if(r){if(r.disabledRef.value)return!0;const{maxRef:{value:Y},checkedCountRef:I}=r;if(Y!==void 0&&I.value>=Y&&!u.value)return!0;const{minRef:{value:N}}=r;if(N!==void 0&&I.value<=N&&u.value)return!0}return D?D.disabled.value:!1}}),{mergedDisabledRef:f,mergedSizeRef:v}=c,m=Ye("Checkbox","-checkbox",Wu,_l,e,n);function p(D){if(r&&e.value!==void 0)r.toggleCheckbox(!u.value,e.value);else{const{onChange:T,"onUpdate:checked":Y,onUpdateChecked:I}=e,{nTriggerFormInput:N,nTriggerFormChange:J}=c,O=u.value?e.uncheckedValue:e.checkedValue;Y&&ie(Y,O,D),I&&ie(I,O,D),T&&ie(T,O,D),N(),J(),l.value=O}}function y(D){f.value||p(D)}function h(D){if(!f.value)switch(D.key){case" ":case"Enter":p(D)}}function x(D){switch(D.key){case" ":D.preventDefault()}}const w={focus:()=>{var D;(D=t.value)===null||D===void 0||D.focus()},blur:()=>{var D;(D=t.value)===null||D===void 0||D.blur()}},k=gn("Checkbox",o,n),b=g(()=>{const{value:D}=v,{common:{cubicBezierEaseInOut:T},self:{borderRadius:Y,color:I,colorChecked:N,colorDisabled:J,colorTableHeader:O,colorTableHeaderModal:C,colorTableHeaderPopover:B,checkMarkColor:L,checkMarkColorDisabled:Q,border:q,borderFocus:ee,borderDisabled:ue,borderChecked:te,boxShadowFocus:V,textColor:_,textColorDisabled:E,checkMarkColorDisabledChecked:U,colorDisabledChecked:ne,borderDisabledChecked:Oe,labelPadding:he,labelLineHeight:Te,labelFontWeight:j,[Ve("fontSize",D)]:be,[Ve("size",D)]:Se}}=m.value;return{"--n-label-line-height":Te,"--n-label-font-weight":j,"--n-size":Se,"--n-bezier":T,"--n-border-radius":Y,"--n-border":q,"--n-border-checked":te,"--n-border-focus":ee,"--n-border-disabled":ue,"--n-border-disabled-checked":Oe,"--n-box-shadow-focus":V,"--n-color":I,"--n-color-checked":N,"--n-color-table":O,"--n-color-table-modal":C,"--n-color-table-popover":B,"--n-color-disabled":J,"--n-color-disabled-checked":ne,"--n-text-color":_,"--n-text-color-disabled":E,"--n-check-mark-color":L,"--n-check-mark-color-disabled":Q,"--n-check-mark-color-disabled-checked":U,"--n-font-size":be,"--n-label-padding":he}}),R=a?Mt("checkbox",g(()=>v.value[0]),b,e):void 0;return Object.assign(c,w,{rtlEnabled:k,selfRef:t,mergedClsPrefix:n,mergedDisabled:f,renderedChecked:u,mergedTheme:m,labelId:ai(),handleClick:y,handleKeyUp:h,handleKeyDown:x,cssVars:a?void 0:b,themeClass:R==null?void 0:R.themeClass,onRender:R==null?void 0:R.onRender})},render(){var e;const{$slots:r,renderedChecked:t,mergedDisabled:n,indeterminate:a,privateInsideTable:o,cssVars:l,labelId:s,label:d,mergedClsPrefix:u,focusable:c,handleKeyUp:f,handleKeyDown:v,handleClick:m}=this;(e=this.onRender)===null||e===void 0||e.call(this);const p=er(r.default,y=>d||y?i("span",{class:`${u}-checkbox__label`,id:s},d||y):null);return i("div",{ref:"selfRef",class:[`${u}-checkbox`,this.themeClass,this.rtlEnabled&&`${u}-checkbox--rtl`,t&&`${u}-checkbox--checked`,n&&`${u}-checkbox--disabled`,a&&`${u}-checkbox--indeterminate`,o&&`${u}-checkbox--inside-table`,p&&`${u}-checkbox--show-label`],tabindex:n||!c?void 0:0,role:"checkbox","aria-checked":a?"mixed":t,"aria-labelledby":s,style:l,onKeyup:f,onKeydown:v,onClick:m,onMousedown:()=>{hn("selectstart",window,y=>{y.preventDefault()},{once:!0})}},i("div",{class:`${u}-checkbox-box-wrapper`}," ",i("div",{class:`${u}-checkbox-box`},i(ri,null,{default:()=>this.indeterminate?i("div",{key:"indeterminate",class:`${u}-checkbox-icon`},Ku()):i("div",{key:"check",class:`${u}-checkbox-icon`},Yu())}),i("div",{class:`${u}-checkbox-box__border`}))),p)}}),Ki=bn("n-popselect"),Gu=M("popselect-menu",` box-shadow: var(--n-menu-box-shadow); -`),Qa={multiple:Boolean,value:{type:[String,Number,Array],default:null},cancelable:Boolean,options:{type:Array,default:()=>[]},size:{type:String,default:"medium"},scrollable:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onMouseenter:Function,onMouseleave:Function,renderLabel:Function,showCheckmark:{type:Boolean,default:void 0},nodeProps:Function,virtualScroll:Boolean,onChange:[Function,Array]},Po=is(Qa),Xu=ge({name:"PopselectPanel",props:Qa,setup(e){const r=it(Ki),{mergedClsPrefixRef:t,inlineThemeDisabled:n}=xt(e),a=Ye("Popselect","-pop-select",Gu,oi,r.props,t),o=b(()=>Kr(e.options,Fi("value","children")));function l(v,m){const{onUpdateValue:p,"onUpdate:value":y,onChange:h}=e;p&&oe(p,v,m),y&&oe(y,v,m),h&&oe(h,v,m)}function s(v){u(v.key)}function d(v){!Lt(v,"action")&&!Lt(v,"empty")&&!Lt(v,"header")&&v.preventDefault()}function u(v){const{value:{getNode:m}}=o;if(e.multiple)if(Array.isArray(e.value)){const p=[],y=[];let h=!0;e.value.forEach(w=>{if(w===v){h=!1;return}const g=m(w);g&&(p.push(g.key),y.push(g.rawNode))}),h&&(p.push(v),y.push(m(v).rawNode)),l(p,y)}else{const p=m(v);p&&l([v],[p.rawNode])}else if(e.value===v&&e.cancelable)l(null,null);else{const p=m(v);p&&l(v,p.rawNode);const{"onUpdate:show":y,onUpdateShow:h}=r.props;y&&oe(y,!1),h&&oe(h,!1),r.setShow(!1)}nn(()=>{r.syncPosition()})}gt(me(e,"options"),()=>{nn(()=>{r.syncPosition()})});const c=b(()=>{const{self:{menuBoxShadow:v}}=a.value;return{"--n-menu-box-shadow":v}}),f=n?Mt("select",void 0,c,r.props):void 0;return{mergedTheme:r.mergedThemeRef,mergedClsPrefix:t,treeMate:o,handleToggle:s,handleMenuMousedown:d,cssVars:n?void 0:c,themeClass:f==null?void 0:f.themeClass,onRender:f==null?void 0:f.onRender}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),i(Si,{clsPrefix:this.mergedClsPrefix,focusable:!0,nodeProps:this.nodeProps,class:[`${this.mergedClsPrefix}-popselect-menu`,this.themeClass],style:this.cssVars,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,multiple:this.multiple,treeMate:this.treeMate,size:this.size,value:this.value,virtualScroll:this.virtualScroll,scrollable:this.scrollable,renderLabel:this.renderLabel,onToggle:this.handleToggle,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseenter,onMousedown:this.handleMenuMousedown,showCheckmark:this.showCheckmark},{header:()=>{var r,t;return((t=(r=this.$slots).header)===null||t===void 0?void 0:t.call(r))||[]},action:()=>{var r,t;return((t=(r=this.$slots).action)===null||t===void 0?void 0:t.call(r))||[]},empty:()=>{var r,t;return((t=(r=this.$slots).empty)===null||t===void 0?void 0:t.call(r))||[]}})}}),Qu=Object.assign(Object.assign(Object.assign(Object.assign({},Ye.props),ii(fr,["showArrow","arrow"])),{placement:Object.assign(Object.assign({},fr.placement),{default:"bottom"}),trigger:{type:String,default:"hover"}}),Qa),Zu=ge({name:"Popselect",props:Qu,inheritAttrs:!1,__popover__:!0,setup(e){const{mergedClsPrefixRef:r}=xt(e),t=Ye("Popselect","-popselect",void 0,oi,e,r),n=F(null);function a(){var s;(s=n.value)===null||s===void 0||s.syncPosition()}function o(s){var d;(d=n.value)===null||d===void 0||d.setShow(s)}return At(Ki,{props:e,mergedThemeRef:t,syncPosition:a,setShow:o}),Object.assign(Object.assign({},{syncPosition:a,setShow:o}),{popoverInstRef:n,mergedTheme:t})},render(){const{mergedTheme:e}=this,r={theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:{padding:"0"},ref:"popoverInstRef",internalRenderBody:(t,n,a,o,l)=>{const{$attrs:s}=this;return i(Xu,Object.assign({},s,{class:[s.class,t],style:[s.style,...a]},vi(this.$props,Po),{ref:wi(n),onMouseenter:dr([o,s.onMouseenter]),onMouseleave:dr([l,s.onMouseleave])}),{header:()=>{var d,u;return(u=(d=this.$slots).header)===null||u===void 0?void 0:u.call(d)},action:()=>{var d,u;return(u=(d=this.$slots).action)===null||u===void 0?void 0:u.call(d)},empty:()=>{var d,u;return(u=(d=this.$slots).empty)===null||u===void 0?void 0:u.call(d)}})}};return i(yr,Object.assign({},ii(this.$props,Po),r,{internalDeactivateImmediately:!0}),{trigger:()=>{var t,n;return(n=(t=this.$slots).default)===null||n===void 0?void 0:n.call(t)}})}}),Ju=W([O("select",` +`),Qa={multiple:Boolean,value:{type:[String,Number,Array],default:null},cancelable:Boolean,options:{type:Array,default:()=>[]},size:{type:String,default:"medium"},scrollable:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onMouseenter:Function,onMouseleave:Function,renderLabel:Function,showCheckmark:{type:Boolean,default:void 0},nodeProps:Function,virtualScroll:Boolean,onChange:[Function,Array]},Po=is(Qa),Xu=ge({name:"PopselectPanel",props:Qa,setup(e){const r=it(Ki),{mergedClsPrefixRef:t,inlineThemeDisabled:n}=xt(e),a=Ye("Popselect","-pop-select",Gu,oi,r.props,t),o=g(()=>Kr(e.options,Fi("value","children")));function l(v,m){const{onUpdateValue:p,"onUpdate:value":y,onChange:h}=e;p&&ie(p,v,m),y&&ie(y,v,m),h&&ie(h,v,m)}function s(v){u(v.key)}function d(v){!Lt(v,"action")&&!Lt(v,"empty")&&!Lt(v,"header")&&v.preventDefault()}function u(v){const{value:{getNode:m}}=o;if(e.multiple)if(Array.isArray(e.value)){const p=[],y=[];let h=!0;e.value.forEach(x=>{if(x===v){h=!1;return}const w=m(x);w&&(p.push(w.key),y.push(w.rawNode))}),h&&(p.push(v),y.push(m(v).rawNode)),l(p,y)}else{const p=m(v);p&&l([v],[p.rawNode])}else if(e.value===v&&e.cancelable)l(null,null);else{const p=m(v);p&&l(v,p.rawNode);const{"onUpdate:show":y,onUpdateShow:h}=r.props;y&&ie(y,!1),h&&ie(h,!1),r.setShow(!1)}nn(()=>{r.syncPosition()})}bt(me(e,"options"),()=>{nn(()=>{r.syncPosition()})});const c=g(()=>{const{self:{menuBoxShadow:v}}=a.value;return{"--n-menu-box-shadow":v}}),f=n?Mt("select",void 0,c,r.props):void 0;return{mergedTheme:r.mergedThemeRef,mergedClsPrefix:t,treeMate:o,handleToggle:s,handleMenuMousedown:d,cssVars:n?void 0:c,themeClass:f==null?void 0:f.themeClass,onRender:f==null?void 0:f.onRender}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),i(Si,{clsPrefix:this.mergedClsPrefix,focusable:!0,nodeProps:this.nodeProps,class:[`${this.mergedClsPrefix}-popselect-menu`,this.themeClass],style:this.cssVars,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,multiple:this.multiple,treeMate:this.treeMate,size:this.size,value:this.value,virtualScroll:this.virtualScroll,scrollable:this.scrollable,renderLabel:this.renderLabel,onToggle:this.handleToggle,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseenter,onMousedown:this.handleMenuMousedown,showCheckmark:this.showCheckmark},{header:()=>{var r,t;return((t=(r=this.$slots).header)===null||t===void 0?void 0:t.call(r))||[]},action:()=>{var r,t;return((t=(r=this.$slots).action)===null||t===void 0?void 0:t.call(r))||[]},empty:()=>{var r,t;return((t=(r=this.$slots).empty)===null||t===void 0?void 0:t.call(r))||[]}})}}),Qu=Object.assign(Object.assign(Object.assign(Object.assign({},Ye.props),ii(fr,["showArrow","arrow"])),{placement:Object.assign(Object.assign({},fr.placement),{default:"bottom"}),trigger:{type:String,default:"hover"}}),Qa),Zu=ge({name:"Popselect",props:Qu,inheritAttrs:!1,__popover__:!0,setup(e){const{mergedClsPrefixRef:r}=xt(e),t=Ye("Popselect","-popselect",void 0,oi,e,r),n=F(null);function a(){var s;(s=n.value)===null||s===void 0||s.syncPosition()}function o(s){var d;(d=n.value)===null||d===void 0||d.setShow(s)}return At(Ki,{props:e,mergedThemeRef:t,syncPosition:a,setShow:o}),Object.assign(Object.assign({},{syncPosition:a,setShow:o}),{popoverInstRef:n,mergedTheme:t})},render(){const{mergedTheme:e}=this,r={theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:{padding:"0"},ref:"popoverInstRef",internalRenderBody:(t,n,a,o,l)=>{const{$attrs:s}=this;return i(Xu,Object.assign({},s,{class:[s.class,t],style:[s.style,...a]},vi(this.$props,Po),{ref:wi(n),onMouseenter:dr([o,s.onMouseenter]),onMouseleave:dr([l,s.onMouseleave])}),{header:()=>{var d,u;return(u=(d=this.$slots).header)===null||u===void 0?void 0:u.call(d)},action:()=>{var d,u;return(u=(d=this.$slots).action)===null||u===void 0?void 0:u.call(d)},empty:()=>{var d,u;return(u=(d=this.$slots).empty)===null||u===void 0?void 0:u.call(d)}})}};return i(yr,Object.assign({},ii(this.$props,Po),r,{internalDeactivateImmediately:!0}),{trigger:()=>{var t,n;return(n=(t=this.$slots).default)===null||n===void 0?void 0:n.call(t)}})}}),Ju=W([M("select",` z-index: auto; outline: none; width: 100%; position: relative; font-weight: var(--n-font-weight); - `),O("select-menu",` + `),M("select-menu",` margin: 4px 0; box-shadow: var(--n-menu-box-shadow); - `,[or({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),ec=Object.assign(Object.assign({},Ye.props),{to:un.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),tc=ge({name:"Select",props:ec,setup(e){const{mergedClsPrefixRef:r,mergedBorderedRef:t,namespaceRef:n,inlineThemeDisabled:a}=xt(e),o=Ye("Select","-select",Ju,Ol,e,r),l=F(e.defaultValue),s=me(e,"value"),d=zt(s,l),u=F(!1),c=F(""),f=cs(e,["items","options"]),v=F([]),m=F([]),p=b(()=>m.value.concat(v.value).concat(f.value)),y=b(()=>{const{filter:R}=e;if(R)return R;const{labelField:H,valueField:fe}=e;return(ke,xe)=>{if(!xe)return!1;const S=xe[H];if(typeof S=="string")return ia(ke,S);const G=xe[fe];return typeof G=="string"?ia(ke,G):typeof G=="number"?ia(ke,String(G)):!1}}),h=b(()=>{if(e.remote)return f.value;{const{value:R}=p,{value:H}=c;return!H.length||!e.filterable?R:dd(R,y.value,H,e.childrenField)}}),w=b(()=>{const{valueField:R,childrenField:H}=e,fe=Fi(R,H);return Kr(h.value,fe)}),g=b(()=>ud(p.value,e.valueField,e.childrenField)),k=F(!1),x=zt(me(e,"show"),k),P=F(null),$=F(null),T=F(null),{localeRef:Y}=yn("Select"),z=b(()=>{var R;return(R=e.placeholder)!==null&&R!==void 0?R:Y.value.placeholder}),N=[],J=F(new Map),D=b(()=>{const{fallbackOption:R}=e;if(R===void 0){const{labelField:H,valueField:fe}=e;return ke=>({[H]:String(ke),[fe]:ke})}return R===!1?!1:H=>Object.assign(R(H),{value:H})});function C(R){const H=e.remote,{value:fe}=J,{value:ke}=g,{value:xe}=D,S=[];return R.forEach(G=>{if(ke.has(G))S.push(ke.get(G));else if(H&&fe.has(G))S.push(fe.get(G));else if(xe){const ye=xe(G);ye&&S.push(ye)}}),S}const B=b(()=>{if(e.multiple){const{value:R}=d;return Array.isArray(R)?C(R):[]}return null}),L=b(()=>{const{value:R}=d;return!e.multiple&&!Array.isArray(R)?R===null?null:C([R])[0]||null:null}),Q=Tn(e),{mergedSizeRef:q,mergedDisabledRef:ee,mergedStatusRef:ue}=Q;function te(R,H){const{onChange:fe,"onUpdate:value":ke,onUpdateValue:xe}=e,{nTriggerFormChange:S,nTriggerFormInput:G}=Q;fe&&oe(fe,R,H),xe&&oe(xe,R,H),ke&&oe(ke,R,H),l.value=R,S(),G()}function V(R){const{onBlur:H}=e,{nTriggerFormBlur:fe}=Q;H&&oe(H,R),fe()}function _(){const{onClear:R}=e;R&&oe(R)}function E(R){const{onFocus:H,showOnFocus:fe}=e,{nTriggerFormFocus:ke}=Q;H&&oe(H,R),ke(),fe&&Te()}function U(R){const{onSearch:H}=e;H&&oe(H,R)}function ne(R){const{onScroll:H}=e;H&&oe(H,R)}function De(){var R;const{remote:H,multiple:fe}=e;if(H){const{value:ke}=J;if(fe){const{valueField:xe}=e;(R=B.value)===null||R===void 0||R.forEach(S=>{ke.set(S[xe],S)})}else{const xe=L.value;xe&&ke.set(xe[e.valueField],xe)}}}function he(R){const{onUpdateShow:H,"onUpdate:show":fe}=e;H&&oe(H,R),fe&&oe(fe,R),k.value=R}function Te(){ee.value||(he(!0),k.value=!0,e.filterable&&et())}function j(){he(!1)}function be(){c.value="",m.value=N}const Se=F(!1);function $e(){e.filterable&&(Se.value=!0)}function Ke(){e.filterable&&(Se.value=!1,x.value||be())}function lt(){ee.value||(x.value?e.filterable?et():j():Te())}function ht(R){var H,fe;!((fe=(H=T.value)===null||H===void 0?void 0:H.selfRef)===null||fe===void 0)&&fe.contains(R.relatedTarget)||(u.value=!1,V(R),j())}function Qe(R){E(R),u.value=!0}function X(){u.value=!0}function we(R){var H;!((H=P.value)===null||H===void 0)&&H.$el.contains(R.relatedTarget)||(u.value=!1,V(R),j())}function re(){var R;(R=P.value)===null||R===void 0||R.focus(),j()}function Re(R){var H;x.value&&(!((H=P.value)===null||H===void 0)&&H.$el.contains(Ur(R))||j())}function Ee(R){if(!Array.isArray(R))return[];if(D.value)return Array.from(R);{const{remote:H}=e,{value:fe}=g;if(H){const{value:ke}=J;return R.filter(xe=>fe.has(xe)||ke.has(xe))}else return R.filter(ke=>fe.has(ke))}}function ze(R){Le(R.rawNode)}function Le(R){if(ee.value)return;const{tag:H,remote:fe,clearFilterAfterSelect:ke,valueField:xe}=e;if(H&&!fe){const{value:S}=m,G=S[0]||null;if(G){const ye=v.value;ye.length?ye.push(G):v.value=[G],m.value=N}}if(fe&&J.value.set(R[xe],R),e.multiple){const S=Ee(d.value),G=S.findIndex(ye=>ye===R[xe]);if(~G){if(S.splice(G,1),H&&!fe){const ye=Z(R[xe]);~ye&&(v.value.splice(ye,1),ke&&(c.value=""))}}else S.push(R[xe]),ke&&(c.value="");te(S,C(S))}else{if(H&&!fe){const S=Z(R[xe]);~S?v.value=[v.value[S]]:v.value=N}vt(),j(),te(R[xe],R)}}function Z(R){return v.value.findIndex(fe=>fe[e.valueField]===R)}function se(R){x.value||Te();const{value:H}=R.target;c.value=H;const{tag:fe,remote:ke}=e;if(U(H),fe&&!ke){if(!H){m.value=N;return}const{onCreate:xe}=e,S=xe?xe(H):{[e.labelField]:H,[e.valueField]:H},{valueField:G,labelField:ye}=e;f.value.some(Me=>Me[G]===S[G]||Me[ye]===S[ye])||v.value.some(Me=>Me[G]===S[G]||Me[ye]===S[ye])?m.value=N:m.value=[S]}}function Oe(R){R.stopPropagation();const{multiple:H}=e;!H&&e.filterable&&j(),_(),H?te([],[]):te(null,null)}function A(R){!Lt(R,"action")&&!Lt(R,"empty")&&!Lt(R,"header")&&R.preventDefault()}function _e(R){ne(R)}function He(R){var H,fe,ke,xe,S;if(!e.keyboard){R.preventDefault();return}switch(R.key){case" ":if(e.filterable)break;R.preventDefault();case"Enter":if(!(!((H=P.value)===null||H===void 0)&&H.isComposing)){if(x.value){const G=(fe=T.value)===null||fe===void 0?void 0:fe.getPendingTmNode();G?ze(G):e.filterable||(j(),vt())}else if(Te(),e.tag&&Se.value){const G=m.value[0];if(G){const ye=G[e.valueField],{value:Me}=d;e.multiple&&Array.isArray(Me)&&Me.includes(ye)||Le(G)}}}R.preventDefault();break;case"ArrowUp":if(R.preventDefault(),e.loading)return;x.value&&((ke=T.value)===null||ke===void 0||ke.prev());break;case"ArrowDown":if(R.preventDefault(),e.loading)return;x.value?(xe=T.value)===null||xe===void 0||xe.next():Te();break;case"Escape":x.value&&(vr(R),j()),(S=P.value)===null||S===void 0||S.focus();break}}function vt(){var R;(R=P.value)===null||R===void 0||R.focus()}function et(){var R;(R=P.value)===null||R===void 0||R.focusInput()}function We(){var R;x.value&&((R=$.value)===null||R===void 0||R.syncPosition())}De(),gt(me(e,"options"),De);const Ue={focus:()=>{var R;(R=P.value)===null||R===void 0||R.focus()},focusInput:()=>{var R;(R=P.value)===null||R===void 0||R.focusInput()},blur:()=>{var R;(R=P.value)===null||R===void 0||R.blur()},blurInput:()=>{var R;(R=P.value)===null||R===void 0||R.blurInput()}},ve=b(()=>{const{self:{menuBoxShadow:R}}=o.value;return{"--n-menu-box-shadow":R}}),Fe=a?Mt("select",void 0,ve,e):void 0;return Object.assign(Object.assign({},Ue),{mergedStatus:ue,mergedClsPrefix:r,mergedBordered:t,namespace:n,treeMate:w,isMounted:La(),triggerRef:P,menuRef:T,pattern:c,uncontrolledShow:k,mergedShow:x,adjustedTo:un(e),uncontrolledValue:l,mergedValue:d,followerRef:$,localizedPlaceholder:z,selectedOption:L,selectedOptions:B,mergedSize:q,mergedDisabled:ee,focused:u,activeWithoutMenuOpen:Se,inlineThemeDisabled:a,onTriggerInputFocus:$e,onTriggerInputBlur:Ke,handleTriggerOrMenuResize:We,handleMenuFocus:X,handleMenuBlur:we,handleMenuTabOut:re,handleTriggerClick:lt,handleToggle:ze,handleDeleteOption:Le,handlePatternInput:se,handleClear:Oe,handleTriggerBlur:ht,handleTriggerFocus:Qe,handleKeydown:He,handleMenuAfterLeave:be,handleMenuClickOutside:Re,handleMenuScroll:_e,handleMenuKeydown:He,handleMenuMousedown:A,mergedTheme:o,cssVars:a?void 0:ve,themeClass:Fe==null?void 0:Fe.themeClass,onRender:Fe==null?void 0:Fe.onRender})},render(){return i("div",{class:`${this.mergedClsPrefix}-select`},i(wr,null,{default:()=>[i(xr,null,{default:()=>i(sd,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,r;return[(r=(e=this.$slots).arrow)===null||r===void 0?void 0:r.call(e)]}})}),i(Cr,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===un.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>i(Kn,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,r,t;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),Hr(i(Si,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(r=this.menuProps)===null||r===void 0?void 0:r.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(t=this.menuProps)===null||t===void 0?void 0:t.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var n,a;return[(a=(n=this.$slots).empty)===null||a===void 0?void 0:a.call(n)]},header:()=>{var n,a;return[(a=(n=this.$slots).header)===null||a===void 0?void 0:a.call(n)]},action:()=>{var n,a;return[(a=(n=this.$slots).action)===null||a===void 0?void 0:a.call(n)]}}),this.displayDirective==="show"?[[Dl,this.mergedShow],[hr,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[hr,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),Fo=` + `,[or({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),ec=Object.assign(Object.assign({},Ye.props),{to:un.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),tc=ge({name:"Select",props:ec,setup(e){const{mergedClsPrefixRef:r,mergedBorderedRef:t,namespaceRef:n,inlineThemeDisabled:a}=xt(e),o=Ye("Select","-select",Ju,Dl,e,r),l=F(e.defaultValue),s=me(e,"value"),d=zt(s,l),u=F(!1),c=F(""),f=cs(e,["items","options"]),v=F([]),m=F([]),p=g(()=>m.value.concat(v.value).concat(f.value)),y=g(()=>{const{filter:S}=e;if(S)return S;const{labelField:H,valueField:fe}=e;return(ke,xe)=>{if(!xe)return!1;const P=xe[H];if(typeof P=="string")return ia(ke,P);const G=xe[fe];return typeof G=="string"?ia(ke,G):typeof G=="number"?ia(ke,String(G)):!1}}),h=g(()=>{if(e.remote)return f.value;{const{value:S}=p,{value:H}=c;return!H.length||!e.filterable?S:dd(S,y.value,H,e.childrenField)}}),x=g(()=>{const{valueField:S,childrenField:H}=e,fe=Fi(S,H);return Kr(h.value,fe)}),w=g(()=>ud(p.value,e.valueField,e.childrenField)),k=F(!1),b=zt(me(e,"show"),k),R=F(null),D=F(null),T=F(null),{localeRef:Y}=yn("Select"),I=g(()=>{var S;return(S=e.placeholder)!==null&&S!==void 0?S:Y.value.placeholder}),N=[],J=F(new Map),O=g(()=>{const{fallbackOption:S}=e;if(S===void 0){const{labelField:H,valueField:fe}=e;return ke=>({[H]:String(ke),[fe]:ke})}return S===!1?!1:H=>Object.assign(S(H),{value:H})});function C(S){const H=e.remote,{value:fe}=J,{value:ke}=w,{value:xe}=O,P=[];return S.forEach(G=>{if(ke.has(G))P.push(ke.get(G));else if(H&&fe.has(G))P.push(fe.get(G));else if(xe){const ye=xe(G);ye&&P.push(ye)}}),P}const B=g(()=>{if(e.multiple){const{value:S}=d;return Array.isArray(S)?C(S):[]}return null}),L=g(()=>{const{value:S}=d;return!e.multiple&&!Array.isArray(S)?S===null?null:C([S])[0]||null:null}),Q=_n(e),{mergedSizeRef:q,mergedDisabledRef:ee,mergedStatusRef:ue}=Q;function te(S,H){const{onChange:fe,"onUpdate:value":ke,onUpdateValue:xe}=e,{nTriggerFormChange:P,nTriggerFormInput:G}=Q;fe&&ie(fe,S,H),xe&&ie(xe,S,H),ke&&ie(ke,S,H),l.value=S,P(),G()}function V(S){const{onBlur:H}=e,{nTriggerFormBlur:fe}=Q;H&&ie(H,S),fe()}function _(){const{onClear:S}=e;S&&ie(S)}function E(S){const{onFocus:H,showOnFocus:fe}=e,{nTriggerFormFocus:ke}=Q;H&&ie(H,S),ke(),fe&&Te()}function U(S){const{onSearch:H}=e;H&&ie(H,S)}function ne(S){const{onScroll:H}=e;H&&ie(H,S)}function Oe(){var S;const{remote:H,multiple:fe}=e;if(H){const{value:ke}=J;if(fe){const{valueField:xe}=e;(S=B.value)===null||S===void 0||S.forEach(P=>{ke.set(P[xe],P)})}else{const xe=L.value;xe&&ke.set(xe[e.valueField],xe)}}}function he(S){const{onUpdateShow:H,"onUpdate:show":fe}=e;H&&ie(H,S),fe&&ie(fe,S),k.value=S}function Te(){ee.value||(he(!0),k.value=!0,e.filterable&&et())}function j(){he(!1)}function be(){c.value="",m.value=N}const Se=F(!1);function $e(){e.filterable&&(Se.value=!0)}function Ke(){e.filterable&&(Se.value=!1,b.value||be())}function lt(){ee.value||(b.value?e.filterable?et():j():Te())}function ht(S){var H,fe;!((fe=(H=T.value)===null||H===void 0?void 0:H.selfRef)===null||fe===void 0)&&fe.contains(S.relatedTarget)||(u.value=!1,V(S),j())}function Qe(S){E(S),u.value=!0}function X(){u.value=!0}function we(S){var H;!((H=R.value)===null||H===void 0)&&H.$el.contains(S.relatedTarget)||(u.value=!1,V(S),j())}function re(){var S;(S=R.value)===null||S===void 0||S.focus(),j()}function Re(S){var H;b.value&&(!((H=R.value)===null||H===void 0)&&H.$el.contains(Ur(S))||j())}function Ee(S){if(!Array.isArray(S))return[];if(O.value)return Array.from(S);{const{remote:H}=e,{value:fe}=w;if(H){const{value:ke}=J;return S.filter(xe=>fe.has(xe)||ke.has(xe))}else return S.filter(ke=>fe.has(ke))}}function ze(S){Le(S.rawNode)}function Le(S){if(ee.value)return;const{tag:H,remote:fe,clearFilterAfterSelect:ke,valueField:xe}=e;if(H&&!fe){const{value:P}=m,G=P[0]||null;if(G){const ye=v.value;ye.length?ye.push(G):v.value=[G],m.value=N}}if(fe&&J.value.set(S[xe],S),e.multiple){const P=Ee(d.value),G=P.findIndex(ye=>ye===S[xe]);if(~G){if(P.splice(G,1),H&&!fe){const ye=Z(S[xe]);~ye&&(v.value.splice(ye,1),ke&&(c.value=""))}}else P.push(S[xe]),ke&&(c.value="");te(P,C(P))}else{if(H&&!fe){const P=Z(S[xe]);~P?v.value=[v.value[P]]:v.value=N}vt(),j(),te(S[xe],S)}}function Z(S){return v.value.findIndex(fe=>fe[e.valueField]===S)}function se(S){b.value||Te();const{value:H}=S.target;c.value=H;const{tag:fe,remote:ke}=e;if(U(H),fe&&!ke){if(!H){m.value=N;return}const{onCreate:xe}=e,P=xe?xe(H):{[e.labelField]:H,[e.valueField]:H},{valueField:G,labelField:ye}=e;f.value.some(Me=>Me[G]===P[G]||Me[ye]===P[ye])||v.value.some(Me=>Me[G]===P[G]||Me[ye]===P[ye])?m.value=N:m.value=[P]}}function De(S){S.stopPropagation();const{multiple:H}=e;!H&&e.filterable&&j(),_(),H?te([],[]):te(null,null)}function A(S){!Lt(S,"action")&&!Lt(S,"empty")&&!Lt(S,"header")&&S.preventDefault()}function _e(S){ne(S)}function He(S){var H,fe,ke,xe,P;if(!e.keyboard){S.preventDefault();return}switch(S.key){case" ":if(e.filterable)break;S.preventDefault();case"Enter":if(!(!((H=R.value)===null||H===void 0)&&H.isComposing)){if(b.value){const G=(fe=T.value)===null||fe===void 0?void 0:fe.getPendingTmNode();G?ze(G):e.filterable||(j(),vt())}else if(Te(),e.tag&&Se.value){const G=m.value[0];if(G){const ye=G[e.valueField],{value:Me}=d;e.multiple&&Array.isArray(Me)&&Me.includes(ye)||Le(G)}}}S.preventDefault();break;case"ArrowUp":if(S.preventDefault(),e.loading)return;b.value&&((ke=T.value)===null||ke===void 0||ke.prev());break;case"ArrowDown":if(S.preventDefault(),e.loading)return;b.value?(xe=T.value)===null||xe===void 0||xe.next():Te();break;case"Escape":b.value&&(vr(S),j()),(P=R.value)===null||P===void 0||P.focus();break}}function vt(){var S;(S=R.value)===null||S===void 0||S.focus()}function et(){var S;(S=R.value)===null||S===void 0||S.focusInput()}function We(){var S;b.value&&((S=D.value)===null||S===void 0||S.syncPosition())}Oe(),bt(me(e,"options"),Oe);const je={focus:()=>{var S;(S=R.value)===null||S===void 0||S.focus()},focusInput:()=>{var S;(S=R.value)===null||S===void 0||S.focusInput()},blur:()=>{var S;(S=R.value)===null||S===void 0||S.blur()},blurInput:()=>{var S;(S=R.value)===null||S===void 0||S.blurInput()}},ve=g(()=>{const{self:{menuBoxShadow:S}}=o.value;return{"--n-menu-box-shadow":S}}),Fe=a?Mt("select",void 0,ve,e):void 0;return Object.assign(Object.assign({},je),{mergedStatus:ue,mergedClsPrefix:r,mergedBordered:t,namespace:n,treeMate:x,isMounted:La(),triggerRef:R,menuRef:T,pattern:c,uncontrolledShow:k,mergedShow:b,adjustedTo:un(e),uncontrolledValue:l,mergedValue:d,followerRef:D,localizedPlaceholder:I,selectedOption:L,selectedOptions:B,mergedSize:q,mergedDisabled:ee,focused:u,activeWithoutMenuOpen:Se,inlineThemeDisabled:a,onTriggerInputFocus:$e,onTriggerInputBlur:Ke,handleTriggerOrMenuResize:We,handleMenuFocus:X,handleMenuBlur:we,handleMenuTabOut:re,handleTriggerClick:lt,handleToggle:ze,handleDeleteOption:Le,handlePatternInput:se,handleClear:De,handleTriggerBlur:ht,handleTriggerFocus:Qe,handleKeydown:He,handleMenuAfterLeave:be,handleMenuClickOutside:Re,handleMenuScroll:_e,handleMenuKeydown:He,handleMenuMousedown:A,mergedTheme:o,cssVars:a?void 0:ve,themeClass:Fe==null?void 0:Fe.themeClass,onRender:Fe==null?void 0:Fe.onRender})},render(){return i("div",{class:`${this.mergedClsPrefix}-select`},i(wr,null,{default:()=>[i(xr,null,{default:()=>i(sd,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,r;return[(r=(e=this.$slots).arrow)===null||r===void 0?void 0:r.call(e)]}})}),i(Cr,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===un.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>i(Kn,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,r,t;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),Hr(i(Si,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(r=this.menuProps)===null||r===void 0?void 0:r.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(t=this.menuProps)===null||t===void 0?void 0:t.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var n,a;return[(a=(n=this.$slots).empty)===null||a===void 0?void 0:a.call(n)]},header:()=>{var n,a;return[(a=(n=this.$slots).header)===null||a===void 0?void 0:a.call(n)]},action:()=>{var n,a;return[(a=(n=this.$slots).action)===null||a===void 0?void 0:a.call(n)]}}),this.displayDirective==="show"?[[Ol,this.mergedShow],[hr,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[hr,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),Fo=` background: var(--n-item-color-hover); color: var(--n-item-text-color-hover); border: var(--n-item-border-hover); @@ -468,34 +468,34 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config background: var(--n-button-color-hover); border: var(--n-button-border-hover); color: var(--n-button-icon-color-hover); - `)],nc=O("pagination",` + `)],nc=M("pagination",` display: flex; vertical-align: middle; font-size: var(--n-item-font-size); flex-wrap: nowrap; -`,[O("pagination-prefix",` +`,[M("pagination-prefix",` display: flex; align-items: center; margin: var(--n-prefix-margin); - `),O("pagination-suffix",` + `),M("pagination-suffix",` display: flex; align-items: center; margin: var(--n-suffix-margin); `),W("> *:not(:first-child)",` margin: var(--n-item-margin); - `),O("select",` + `),M("select",` width: var(--n-select-width); - `),W("&.transition-disabled",[O("pagination-item","transition: none!important;")]),O("pagination-quick-jumper",` + `),W("&.transition-disabled",[M("pagination-item","transition: none!important;")]),M("pagination-quick-jumper",` white-space: nowrap; display: flex; color: var(--n-jumper-text-color); transition: color .3s var(--n-bezier); align-items: center; font-size: var(--n-jumper-font-size); - `,[O("input",` + `,[M("input",` margin: var(--n-input-margin); width: var(--n-input-width); - `)]),O("pagination-item",` + `)]),M("pagination-item",` position: relative; cursor: pointer; user-select: none; @@ -522,7 +522,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config color: var(--n-button-icon-color); border: var(--n-button-border); padding: 0; - `,[O("base-icon",` + `,[M("base-icon",` font-size: var(--n-button-icon-size); `)]),Ft("disabled",[K("hover",Fo,To),W("&:hover",Fo,To),W("&:active",` background: var(--n-item-color-pressed); @@ -546,16 +546,16 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config border: var(--n-item-border-disabled); `)])]),K("disabled",` cursor: not-allowed; - `,[O("pagination-quick-jumper",` + `,[M("pagination-quick-jumper",` color: var(--n-jumper-text-color-disabled); `)]),K("simple",` display: flex; align-items: center; flex-wrap: nowrap; - `,[O("pagination-quick-jumper",[O("input",` + `,[M("pagination-quick-jumper",[M("input",` margin: 0; - `)])])]);function Wi(e){var r;if(!e)return 10;const{defaultPageSize:t}=e;if(t!==void 0)return t;const n=(r=e.pageSizes)===null||r===void 0?void 0:r[0];return typeof n=="number"?n:(n==null?void 0:n.value)||10}function rc(e,r,t,n){let a=!1,o=!1,l=1,s=r;if(r===1)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:s,fastBackwardTo:l,items:[{type:"page",label:1,active:e===1,mayBeFastBackward:!1,mayBeFastForward:!1}]};if(r===2)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:s,fastBackwardTo:l,items:[{type:"page",label:1,active:e===1,mayBeFastBackward:!1,mayBeFastForward:!1},{type:"page",label:2,active:e===2,mayBeFastBackward:!0,mayBeFastForward:!1}]};const d=1,u=r;let c=e,f=e;const v=(t-5)/2;f+=Math.ceil(v),f=Math.min(Math.max(f,d+t-3),u-2),c-=Math.floor(v),c=Math.max(Math.min(c,u-t+3),d+2);let m=!1,p=!1;c>d+2&&(m=!0),f=d+1&&y.push({type:"page",label:d+1,mayBeFastBackward:!0,mayBeFastForward:!1,active:e===d+1});for(let h=c;h<=f;++h)y.push({type:"page",label:h,mayBeFastBackward:!1,mayBeFastForward:!1,active:e===h});return p?(o=!0,s=f+1,y.push({type:"fast-forward",active:!1,label:void 0,options:n?_o(f+1,u-1):null})):f===u-2&&y[y.length-1].label!==u-1&&y.push({type:"page",mayBeFastForward:!0,mayBeFastBackward:!1,label:u-1,active:e===u-1}),y[y.length-1].label!==u&&y.push({type:"page",mayBeFastForward:!1,mayBeFastBackward:!1,label:u,active:e===u}),{hasFastBackward:a,hasFastForward:o,fastBackwardTo:l,fastForwardTo:s,items:y}}function _o(e,r){const t=[];for(let n=e;n<=r;++n)t.push({label:`${n}`,value:n});return t}const ac=Object.assign(Object.assign({},Ye.props),{simple:Boolean,page:Number,defaultPage:{type:Number,default:1},itemCount:Number,pageCount:Number,defaultPageCount:{type:Number,default:1},showSizePicker:Boolean,pageSize:Number,defaultPageSize:Number,pageSizes:{type:Array,default(){return[10]}},showQuickJumper:Boolean,size:{type:String,default:"medium"},disabled:Boolean,pageSlot:{type:Number,default:9},selectProps:Object,prev:Function,next:Function,goto:Function,prefix:Function,suffix:Function,label:Function,displayOrder:{type:Array,default:["pages","size-picker","quick-jumper"]},to:un.propTo,showQuickJumpDropdown:{type:Boolean,default:!0},"onUpdate:page":[Function,Array],onUpdatePage:[Function,Array],"onUpdate:pageSize":[Function,Array],onUpdatePageSize:[Function,Array],onPageSizeChange:[Function,Array],onChange:[Function,Array]}),oc=ge({name:"Pagination",props:ac,setup(e){const{mergedComponentPropsRef:r,mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:a}=xt(e),o=Ye("Pagination","-pagination",nc,Ml,e,t),{localeRef:l}=yn("Pagination"),s=F(null),d=F(e.defaultPage),u=F(Wi(e)),c=zt(me(e,"page"),d),f=zt(me(e,"pageSize"),u),v=b(()=>{const{itemCount:j}=e;if(j!==void 0)return Math.max(1,Math.ceil(j/f.value));const{pageCount:be}=e;return be!==void 0?Math.max(be,1):1}),m=F("");Ln(()=>{e.simple,m.value=String(c.value)});const p=F(!1),y=F(!1),h=F(!1),w=F(!1),g=()=>{e.disabled||(p.value=!0,L())},k=()=>{e.disabled||(p.value=!1,L())},x=()=>{y.value=!0,L()},P=()=>{y.value=!1,L()},$=j=>{Q(j)},T=b(()=>rc(c.value,v.value,e.pageSlot,e.showQuickJumpDropdown));Ln(()=>{T.value.hasFastBackward?T.value.hasFastForward||(p.value=!1,h.value=!1):(y.value=!1,w.value=!1)});const Y=b(()=>{const j=l.value.selectionSuffix;return e.pageSizes.map(be=>typeof be=="number"?{label:`${be} / ${j}`,value:be}:be)}),z=b(()=>{var j,be;return((be=(j=r==null?void 0:r.value)===null||j===void 0?void 0:j.Pagination)===null||be===void 0?void 0:be.inputSize)||ho(e.size)}),N=b(()=>{var j,be;return((be=(j=r==null?void 0:r.value)===null||j===void 0?void 0:j.Pagination)===null||be===void 0?void 0:be.selectSize)||ho(e.size)}),J=b(()=>(c.value-1)*f.value),D=b(()=>{const j=c.value*f.value-1,{itemCount:be}=e;return be!==void 0&&j>be-1?be-1:j}),C=b(()=>{const{itemCount:j}=e;return j!==void 0?j:(e.pageCount||1)*f.value}),B=gn("Pagination",a,t);function L(){nn(()=>{var j;const{value:be}=s;be&&(be.classList.add("transition-disabled"),(j=s.value)===null||j===void 0||j.offsetWidth,be.classList.remove("transition-disabled"))})}function Q(j){if(j===c.value)return;const{"onUpdate:page":be,onUpdatePage:Se,onChange:$e,simple:Ke}=e;be&&oe(be,j),Se&&oe(Se,j),$e&&oe($e,j),d.value=j,Ke&&(m.value=String(j))}function q(j){if(j===f.value)return;const{"onUpdate:pageSize":be,onUpdatePageSize:Se,onPageSizeChange:$e}=e;be&&oe(be,j),Se&&oe(Se,j),$e&&oe($e,j),u.value=j,v.value{c.value,f.value,L()});const he=b(()=>{const{size:j}=e,{self:{buttonBorder:be,buttonBorderHover:Se,buttonBorderPressed:$e,buttonIconColor:Ke,buttonIconColorHover:lt,buttonIconColorPressed:ht,itemTextColor:Qe,itemTextColorHover:X,itemTextColorPressed:we,itemTextColorActive:re,itemTextColorDisabled:Re,itemColor:Ee,itemColorHover:ze,itemColorPressed:Le,itemColorActive:Z,itemColorActiveHover:se,itemColorDisabled:Oe,itemBorder:A,itemBorderHover:_e,itemBorderPressed:He,itemBorderActive:vt,itemBorderDisabled:et,itemBorderRadius:We,jumperTextColor:Ue,jumperTextColorDisabled:ve,buttonColor:Fe,buttonColorHover:R,buttonColorPressed:H,[Ve("itemPadding",j)]:fe,[Ve("itemMargin",j)]:ke,[Ve("inputWidth",j)]:xe,[Ve("selectWidth",j)]:S,[Ve("inputMargin",j)]:G,[Ve("selectMargin",j)]:ye,[Ve("jumperFontSize",j)]:Me,[Ve("prefixMargin",j)]:Ze,[Ve("suffixMargin",j)]:Ne,[Ve("itemSize",j)]:I,[Ve("buttonIconSize",j)]:ae,[Ve("itemFontSize",j)]:pe,[`${Ve("itemMargin",j)}Rtl`]:Ie,[`${Ve("inputMargin",j)}Rtl`]:Je},common:{cubicBezierEaseInOut:Ge}}=o.value;return{"--n-prefix-margin":Ze,"--n-suffix-margin":Ne,"--n-item-font-size":pe,"--n-select-width":S,"--n-select-margin":ye,"--n-input-width":xe,"--n-input-margin":G,"--n-input-margin-rtl":Je,"--n-item-size":I,"--n-item-text-color":Qe,"--n-item-text-color-disabled":Re,"--n-item-text-color-hover":X,"--n-item-text-color-active":re,"--n-item-text-color-pressed":we,"--n-item-color":Ee,"--n-item-color-hover":ze,"--n-item-color-disabled":Oe,"--n-item-color-active":Z,"--n-item-color-active-hover":se,"--n-item-color-pressed":Le,"--n-item-border":A,"--n-item-border-hover":_e,"--n-item-border-disabled":et,"--n-item-border-active":vt,"--n-item-border-pressed":He,"--n-item-padding":fe,"--n-item-border-radius":We,"--n-bezier":Ge,"--n-jumper-font-size":Me,"--n-jumper-text-color":Ue,"--n-jumper-text-color-disabled":ve,"--n-item-margin":ke,"--n-item-margin-rtl":Ie,"--n-button-icon-size":ae,"--n-button-icon-color":Ke,"--n-button-icon-color-hover":lt,"--n-button-icon-color-pressed":ht,"--n-button-color-hover":R,"--n-button-color":Fe,"--n-button-color-pressed":H,"--n-button-border":be,"--n-button-border-hover":Se,"--n-button-border-pressed":$e}}),Te=n?Mt("pagination",b(()=>{let j="";const{size:be}=e;return j+=be[0],j}),he,e):void 0;return{rtlEnabled:B,mergedClsPrefix:t,locale:l,selfRef:s,mergedPage:c,pageItems:b(()=>T.value.items),mergedItemCount:C,jumperValue:m,pageSizeOptions:Y,mergedPageSize:f,inputSize:z,selectSize:N,mergedTheme:o,mergedPageCount:v,startIndex:J,endIndex:D,showFastForwardMenu:h,showFastBackwardMenu:w,fastForwardActive:p,fastBackwardActive:y,handleMenuSelect:$,handleFastForwardMouseenter:g,handleFastForwardMouseleave:k,handleFastBackwardMouseenter:x,handleFastBackwardMouseleave:P,handleJumperInput:De,handleBackwardClick:ue,handleForwardClick:ee,handlePageItemClick:ne,handleSizePickerChange:_,handleQuickJumperChange:U,cssVars:n?void 0:he,themeClass:Te==null?void 0:Te.themeClass,onRender:Te==null?void 0:Te.onRender}},render(){const{$slots:e,mergedClsPrefix:r,disabled:t,cssVars:n,mergedPage:a,mergedPageCount:o,pageItems:l,showSizePicker:s,showQuickJumper:d,mergedTheme:u,locale:c,inputSize:f,selectSize:v,mergedPageSize:m,pageSizeOptions:p,jumperValue:y,simple:h,prev:w,next:g,prefix:k,suffix:x,label:P,goto:$,handleJumperInput:T,handleSizePickerChange:Y,handleBackwardClick:z,handlePageItemClick:N,handleForwardClick:J,handleQuickJumperChange:D,onRender:C}=this;C==null||C();const B=e.prefix||k,L=e.suffix||x,Q=w||e.prev,q=g||e.next,ee=P||e.label;return i("div",{ref:"selfRef",class:[`${r}-pagination`,this.themeClass,this.rtlEnabled&&`${r}-pagination--rtl`,t&&`${r}-pagination--disabled`,h&&`${r}-pagination--simple`],style:n},B?i("div",{class:`${r}-pagination-prefix`},B({page:a,pageSize:m,pageCount:o,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null,this.displayOrder.map(ue=>{switch(ue){case"pages":return i(mn,null,i("div",{class:[`${r}-pagination-item`,!Q&&`${r}-pagination-item--button`,(a<=1||a>o||t)&&`${r}-pagination-item--disabled`],onClick:z},Q?Q({page:a,pageSize:m,pageCount:o,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount}):i(Pt,{clsPrefix:r},{default:()=>this.rtlEnabled?i(Fn,null):i(Rn,null)})),h?i(mn,null,i("div",{class:`${r}-pagination-quick-jumper`},i(Xt,{value:y,onUpdateValue:T,size:f,placeholder:"",disabled:t,theme:u.peers.Input,themeOverrides:u.peerOverrides.Input,onChange:D}))," /"," ",o):l.map((te,V)=>{let _,E,U;const{type:ne}=te;switch(ne){case"page":const he=te.label;ee?_=ee({type:"page",node:he,active:te.active}):_=he;break;case"fast-forward":const Te=this.fastForwardActive?i(Pt,{clsPrefix:r},{default:()=>this.rtlEnabled?i(Sn,null):i(Pn,null)}):i(Pt,{clsPrefix:r},{default:()=>i(mo,null)});ee?_=ee({type:"fast-forward",node:Te,active:this.fastForwardActive||this.showFastForwardMenu}):_=Te,E=this.handleFastForwardMouseenter,U=this.handleFastForwardMouseleave;break;case"fast-backward":const j=this.fastBackwardActive?i(Pt,{clsPrefix:r},{default:()=>this.rtlEnabled?i(Pn,null):i(Sn,null)}):i(Pt,{clsPrefix:r},{default:()=>i(mo,null)});ee?_=ee({type:"fast-backward",node:j,active:this.fastBackwardActive||this.showFastBackwardMenu}):_=j,E=this.handleFastBackwardMouseenter,U=this.handleFastBackwardMouseleave;break}const De=i("div",{key:V,class:[`${r}-pagination-item`,te.active&&`${r}-pagination-item--active`,ne!=="page"&&(ne==="fast-backward"&&this.showFastBackwardMenu||ne==="fast-forward"&&this.showFastForwardMenu)&&`${r}-pagination-item--hover`,t&&`${r}-pagination-item--disabled`,ne==="page"&&`${r}-pagination-item--clickable`],onClick:()=>{N(te)},onMouseenter:E,onMouseleave:U},_);if(ne==="page"&&!te.mayBeFastBackward&&!te.mayBeFastForward)return De;{const he=te.type==="page"?te.mayBeFastBackward?"fast-backward":"fast-forward":te.type;return te.type!=="page"&&!te.options?De:i(Zu,{to:this.to,key:he,disabled:t,trigger:"hover",virtualScroll:!0,style:{width:"60px"},theme:u.peers.Popselect,themeOverrides:u.peerOverrides.Popselect,builtinThemeOverrides:{peers:{InternalSelectMenu:{height:"calc(var(--n-option-height) * 4.6)"}}},nodeProps:()=>({style:{justifyContent:"center"}}),show:ne==="page"?!1:ne==="fast-backward"?this.showFastBackwardMenu:this.showFastForwardMenu,onUpdateShow:Te=>{ne!=="page"&&(Te?ne==="fast-backward"?this.showFastBackwardMenu=Te:this.showFastForwardMenu=Te:(this.showFastBackwardMenu=!1,this.showFastForwardMenu=!1))},options:te.type!=="page"&&te.options?te.options:[],onUpdateValue:this.handleMenuSelect,scrollable:!0,showCheckmark:!1},{default:()=>De})}}),i("div",{class:[`${r}-pagination-item`,!q&&`${r}-pagination-item--button`,{[`${r}-pagination-item--disabled`]:a<1||a>=o||t}],onClick:J},q?q({page:a,pageSize:m,pageCount:o,itemCount:this.mergedItemCount,startIndex:this.startIndex,endIndex:this.endIndex}):i(Pt,{clsPrefix:r},{default:()=>this.rtlEnabled?i(Rn,null):i(Fn,null)})));case"size-picker":return!h&&s?i(tc,Object.assign({consistentMenuWidth:!1,placeholder:"",showCheckmark:!1,to:this.to},this.selectProps,{size:v,options:p,value:m,disabled:t,theme:u.peers.Select,themeOverrides:u.peerOverrides.Select,onUpdateValue:Y})):null;case"quick-jumper":return!h&&d?i("div",{class:`${r}-pagination-quick-jumper`},$?$():qe(this.$slots.goto,()=>[c.goto]),i(Xt,{value:y,onUpdateValue:T,size:f,placeholder:"",disabled:t,theme:u.peers.Input,themeOverrides:u.peerOverrides.Input,onChange:D})):null;default:return null}}),L?i("div",{class:`${r}-pagination-suffix`},L({page:a,pageSize:m,pageCount:o,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null)}}),ic=Object.assign(Object.assign({},Ye.props),{onUnstableColumnResize:Function,pagination:{type:[Object,Boolean],default:!1},paginateSinglePage:{type:Boolean,default:!0},minHeight:[Number,String],maxHeight:[Number,String],columns:{type:Array,default:()=>[]},rowClassName:[String,Function],rowProps:Function,rowKey:Function,summary:[Function],data:{type:Array,default:()=>[]},loading:Boolean,bordered:{type:Boolean,default:void 0},bottomBordered:{type:Boolean,default:void 0},striped:Boolean,scrollX:[Number,String],defaultCheckedRowKeys:{type:Array,default:()=>[]},checkedRowKeys:Array,singleLine:{type:Boolean,default:!0},singleColumn:Boolean,size:{type:String,default:"medium"},remote:Boolean,defaultExpandedRowKeys:{type:Array,default:[]},defaultExpandAll:Boolean,expandedRowKeys:Array,stickyExpandedRows:Boolean,virtualScroll:Boolean,virtualScrollX:Boolean,virtualScrollHeader:Boolean,headerHeight:{type:Number,default:28},heightForRow:Function,minRowHeight:{type:Number,default:28},tableLayout:{type:String,default:"auto"},allowCheckingNotLoaded:Boolean,cascade:{type:Boolean,default:!0},childrenKey:{type:String,default:"children"},indent:{type:Number,default:16},flexHeight:Boolean,summaryPlacement:{type:String,default:"bottom"},paginationBehaviorOnFilter:{type:String,default:"current"},filterIconPopoverProps:Object,scrollbarProps:Object,renderCell:Function,renderExpandIcon:Function,spinProps:{type:Object,default:{}},getCsvCell:Function,getCsvHeader:Function,onLoad:Function,"onUpdate:page":[Function,Array],onUpdatePage:[Function,Array],"onUpdate:pageSize":[Function,Array],onUpdatePageSize:[Function,Array],"onUpdate:sorter":[Function,Array],onUpdateSorter:[Function,Array],"onUpdate:filters":[Function,Array],onUpdateFilters:[Function,Array],"onUpdate:checkedRowKeys":[Function,Array],onUpdateCheckedRowKeys:[Function,Array],"onUpdate:expandedRowKeys":[Function,Array],onUpdateExpandedRowKeys:[Function,Array],onScroll:Function,onPageChange:[Function,Array],onPageSizeChange:[Function,Array],onSorterChange:[Function,Array],onFiltersChange:[Function,Array],onCheckedRowKeysChange:[Function,Array]}),rn=bn("n-data-table"),qi=40,Gi=40;function Do(e){if(e.type==="selection")return e.width===void 0?qi:Jn(e.width);if(e.type==="expand")return e.width===void 0?Gi:Jn(e.width);if(!("children"in e))return typeof e.width=="string"?Jn(e.width):e.width}function lc(e){var r,t;if(e.type==="selection")return jt((r=e.width)!==null&&r!==void 0?r:qi);if(e.type==="expand")return jt((t=e.width)!==null&&t!==void 0?t:Gi);if(!("children"in e))return jt(e.width)}function en(e){return e.type==="selection"?"__n_selection__":e.type==="expand"?"__n_expand__":e.key}function Oo(e){return e&&(typeof e=="object"?Object.assign({},e):e)}function sc(e){return e==="ascend"?1:e==="descend"?-1:0}function dc(e,r,t){return t!==void 0&&(e=Math.min(e,typeof t=="number"?t:Number.parseFloat(t))),r!==void 0&&(e=Math.max(e,typeof r=="number"?r:Number.parseFloat(r))),e}function uc(e,r){if(r!==void 0)return{width:r,minWidth:r,maxWidth:r};const t=lc(e),{minWidth:n,maxWidth:a}=e;return{width:t,minWidth:jt(n)||t,maxWidth:jt(a)}}function cc(e,r,t){return typeof t=="function"?t(e,r):t||""}function ua(e){return e.filterOptionValues!==void 0||e.filterOptionValue===void 0&&e.defaultFilterOptionValues!==void 0}function ca(e){return"children"in e?!1:!!e.sorter}function Xi(e){return"children"in e&&e.children.length?!1:!!e.resizable}function Mo(e){return"children"in e?!1:!!e.filter&&(!!e.filterOptions||!!e.renderFilterMenu)}function zo(e){if(e){if(e==="descend")return"ascend"}else return"descend";return!1}function fc(e,r){return e.sorter===void 0?null:r===null||r.columnKey!==e.key?{columnKey:e.key,sorter:e.sorter,order:zo(!1)}:Object.assign(Object.assign({},r),{order:zo(r.order)})}function Qi(e,r){return r.find(t=>t.columnKey===e.key&&t.order)!==void 0}function hc(e){return typeof e=="string"?e.replace(/,/g,"\\,"):e==null?"":`${e}`.replace(/,/g,"\\,")}function vc(e,r,t,n){const a=e.filter(s=>s.type!=="expand"&&s.type!=="selection"&&s.allowExport!==!1),o=a.map(s=>n?n(s):s.title).join(","),l=r.map(s=>a.map(d=>t?t(s[d.key],s,d):hc(s[d.key])).join(","));return[o,...l].join(` -`)}const mc=ge({name:"DataTableBodyCheckbox",props:{rowKey:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!0},onUpdateChecked:{type:Function,required:!0}},setup(e){const{mergedCheckedRowKeySetRef:r,mergedInderminateRowKeySetRef:t}=it(rn);return()=>{const{rowKey:n}=e;return i(Xa,{privateInsideTable:!0,disabled:e.disabled,indeterminate:t.value.has(n),checked:r.value.has(n),onUpdateChecked:e.onUpdateChecked})}}}),pc=O("radio",` + `)])])]);function Wi(e){var r;if(!e)return 10;const{defaultPageSize:t}=e;if(t!==void 0)return t;const n=(r=e.pageSizes)===null||r===void 0?void 0:r[0];return typeof n=="number"?n:(n==null?void 0:n.value)||10}function rc(e,r,t,n){let a=!1,o=!1,l=1,s=r;if(r===1)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:s,fastBackwardTo:l,items:[{type:"page",label:1,active:e===1,mayBeFastBackward:!1,mayBeFastForward:!1}]};if(r===2)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:s,fastBackwardTo:l,items:[{type:"page",label:1,active:e===1,mayBeFastBackward:!1,mayBeFastForward:!1},{type:"page",label:2,active:e===2,mayBeFastBackward:!0,mayBeFastForward:!1}]};const d=1,u=r;let c=e,f=e;const v=(t-5)/2;f+=Math.ceil(v),f=Math.min(Math.max(f,d+t-3),u-2),c-=Math.floor(v),c=Math.max(Math.min(c,u-t+3),d+2);let m=!1,p=!1;c>d+2&&(m=!0),f=d+1&&y.push({type:"page",label:d+1,mayBeFastBackward:!0,mayBeFastForward:!1,active:e===d+1});for(let h=c;h<=f;++h)y.push({type:"page",label:h,mayBeFastBackward:!1,mayBeFastForward:!1,active:e===h});return p?(o=!0,s=f+1,y.push({type:"fast-forward",active:!1,label:void 0,options:n?_o(f+1,u-1):null})):f===u-2&&y[y.length-1].label!==u-1&&y.push({type:"page",mayBeFastForward:!0,mayBeFastBackward:!1,label:u-1,active:e===u-1}),y[y.length-1].label!==u&&y.push({type:"page",mayBeFastForward:!1,mayBeFastBackward:!1,label:u,active:e===u}),{hasFastBackward:a,hasFastForward:o,fastBackwardTo:l,fastForwardTo:s,items:y}}function _o(e,r){const t=[];for(let n=e;n<=r;++n)t.push({label:`${n}`,value:n});return t}const ac=Object.assign(Object.assign({},Ye.props),{simple:Boolean,page:Number,defaultPage:{type:Number,default:1},itemCount:Number,pageCount:Number,defaultPageCount:{type:Number,default:1},showSizePicker:Boolean,pageSize:Number,defaultPageSize:Number,pageSizes:{type:Array,default(){return[10]}},showQuickJumper:Boolean,size:{type:String,default:"medium"},disabled:Boolean,pageSlot:{type:Number,default:9},selectProps:Object,prev:Function,next:Function,goto:Function,prefix:Function,suffix:Function,label:Function,displayOrder:{type:Array,default:["pages","size-picker","quick-jumper"]},to:un.propTo,showQuickJumpDropdown:{type:Boolean,default:!0},"onUpdate:page":[Function,Array],onUpdatePage:[Function,Array],"onUpdate:pageSize":[Function,Array],onUpdatePageSize:[Function,Array],onPageSizeChange:[Function,Array],onChange:[Function,Array]}),oc=ge({name:"Pagination",props:ac,setup(e){const{mergedComponentPropsRef:r,mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:a}=xt(e),o=Ye("Pagination","-pagination",nc,Ml,e,t),{localeRef:l}=yn("Pagination"),s=F(null),d=F(e.defaultPage),u=F(Wi(e)),c=zt(me(e,"page"),d),f=zt(me(e,"pageSize"),u),v=g(()=>{const{itemCount:j}=e;if(j!==void 0)return Math.max(1,Math.ceil(j/f.value));const{pageCount:be}=e;return be!==void 0?Math.max(be,1):1}),m=F("");Ln(()=>{e.simple,m.value=String(c.value)});const p=F(!1),y=F(!1),h=F(!1),x=F(!1),w=()=>{e.disabled||(p.value=!0,L())},k=()=>{e.disabled||(p.value=!1,L())},b=()=>{y.value=!0,L()},R=()=>{y.value=!1,L()},D=j=>{Q(j)},T=g(()=>rc(c.value,v.value,e.pageSlot,e.showQuickJumpDropdown));Ln(()=>{T.value.hasFastBackward?T.value.hasFastForward||(p.value=!1,h.value=!1):(y.value=!1,x.value=!1)});const Y=g(()=>{const j=l.value.selectionSuffix;return e.pageSizes.map(be=>typeof be=="number"?{label:`${be} / ${j}`,value:be}:be)}),I=g(()=>{var j,be;return((be=(j=r==null?void 0:r.value)===null||j===void 0?void 0:j.Pagination)===null||be===void 0?void 0:be.inputSize)||ho(e.size)}),N=g(()=>{var j,be;return((be=(j=r==null?void 0:r.value)===null||j===void 0?void 0:j.Pagination)===null||be===void 0?void 0:be.selectSize)||ho(e.size)}),J=g(()=>(c.value-1)*f.value),O=g(()=>{const j=c.value*f.value-1,{itemCount:be}=e;return be!==void 0&&j>be-1?be-1:j}),C=g(()=>{const{itemCount:j}=e;return j!==void 0?j:(e.pageCount||1)*f.value}),B=gn("Pagination",a,t);function L(){nn(()=>{var j;const{value:be}=s;be&&(be.classList.add("transition-disabled"),(j=s.value)===null||j===void 0||j.offsetWidth,be.classList.remove("transition-disabled"))})}function Q(j){if(j===c.value)return;const{"onUpdate:page":be,onUpdatePage:Se,onChange:$e,simple:Ke}=e;be&&ie(be,j),Se&&ie(Se,j),$e&&ie($e,j),d.value=j,Ke&&(m.value=String(j))}function q(j){if(j===f.value)return;const{"onUpdate:pageSize":be,onUpdatePageSize:Se,onPageSizeChange:$e}=e;be&&ie(be,j),Se&&ie(Se,j),$e&&ie($e,j),u.value=j,v.value{c.value,f.value,L()});const he=g(()=>{const{size:j}=e,{self:{buttonBorder:be,buttonBorderHover:Se,buttonBorderPressed:$e,buttonIconColor:Ke,buttonIconColorHover:lt,buttonIconColorPressed:ht,itemTextColor:Qe,itemTextColorHover:X,itemTextColorPressed:we,itemTextColorActive:re,itemTextColorDisabled:Re,itemColor:Ee,itemColorHover:ze,itemColorPressed:Le,itemColorActive:Z,itemColorActiveHover:se,itemColorDisabled:De,itemBorder:A,itemBorderHover:_e,itemBorderPressed:He,itemBorderActive:vt,itemBorderDisabled:et,itemBorderRadius:We,jumperTextColor:je,jumperTextColorDisabled:ve,buttonColor:Fe,buttonColorHover:S,buttonColorPressed:H,[Ve("itemPadding",j)]:fe,[Ve("itemMargin",j)]:ke,[Ve("inputWidth",j)]:xe,[Ve("selectWidth",j)]:P,[Ve("inputMargin",j)]:G,[Ve("selectMargin",j)]:ye,[Ve("jumperFontSize",j)]:Me,[Ve("prefixMargin",j)]:Ze,[Ve("suffixMargin",j)]:Be,[Ve("itemSize",j)]:$,[Ve("buttonIconSize",j)]:ae,[Ve("itemFontSize",j)]:pe,[`${Ve("itemMargin",j)}Rtl`]:Ie,[`${Ve("inputMargin",j)}Rtl`]:Je},common:{cubicBezierEaseInOut:Ge}}=o.value;return{"--n-prefix-margin":Ze,"--n-suffix-margin":Be,"--n-item-font-size":pe,"--n-select-width":P,"--n-select-margin":ye,"--n-input-width":xe,"--n-input-margin":G,"--n-input-margin-rtl":Je,"--n-item-size":$,"--n-item-text-color":Qe,"--n-item-text-color-disabled":Re,"--n-item-text-color-hover":X,"--n-item-text-color-active":re,"--n-item-text-color-pressed":we,"--n-item-color":Ee,"--n-item-color-hover":ze,"--n-item-color-disabled":De,"--n-item-color-active":Z,"--n-item-color-active-hover":se,"--n-item-color-pressed":Le,"--n-item-border":A,"--n-item-border-hover":_e,"--n-item-border-disabled":et,"--n-item-border-active":vt,"--n-item-border-pressed":He,"--n-item-padding":fe,"--n-item-border-radius":We,"--n-bezier":Ge,"--n-jumper-font-size":Me,"--n-jumper-text-color":je,"--n-jumper-text-color-disabled":ve,"--n-item-margin":ke,"--n-item-margin-rtl":Ie,"--n-button-icon-size":ae,"--n-button-icon-color":Ke,"--n-button-icon-color-hover":lt,"--n-button-icon-color-pressed":ht,"--n-button-color-hover":S,"--n-button-color":Fe,"--n-button-color-pressed":H,"--n-button-border":be,"--n-button-border-hover":Se,"--n-button-border-pressed":$e}}),Te=n?Mt("pagination",g(()=>{let j="";const{size:be}=e;return j+=be[0],j}),he,e):void 0;return{rtlEnabled:B,mergedClsPrefix:t,locale:l,selfRef:s,mergedPage:c,pageItems:g(()=>T.value.items),mergedItemCount:C,jumperValue:m,pageSizeOptions:Y,mergedPageSize:f,inputSize:I,selectSize:N,mergedTheme:o,mergedPageCount:v,startIndex:J,endIndex:O,showFastForwardMenu:h,showFastBackwardMenu:x,fastForwardActive:p,fastBackwardActive:y,handleMenuSelect:D,handleFastForwardMouseenter:w,handleFastForwardMouseleave:k,handleFastBackwardMouseenter:b,handleFastBackwardMouseleave:R,handleJumperInput:Oe,handleBackwardClick:ue,handleForwardClick:ee,handlePageItemClick:ne,handleSizePickerChange:_,handleQuickJumperChange:U,cssVars:n?void 0:he,themeClass:Te==null?void 0:Te.themeClass,onRender:Te==null?void 0:Te.onRender}},render(){const{$slots:e,mergedClsPrefix:r,disabled:t,cssVars:n,mergedPage:a,mergedPageCount:o,pageItems:l,showSizePicker:s,showQuickJumper:d,mergedTheme:u,locale:c,inputSize:f,selectSize:v,mergedPageSize:m,pageSizeOptions:p,jumperValue:y,simple:h,prev:x,next:w,prefix:k,suffix:b,label:R,goto:D,handleJumperInput:T,handleSizePickerChange:Y,handleBackwardClick:I,handlePageItemClick:N,handleForwardClick:J,handleQuickJumperChange:O,onRender:C}=this;C==null||C();const B=e.prefix||k,L=e.suffix||b,Q=x||e.prev,q=w||e.next,ee=R||e.label;return i("div",{ref:"selfRef",class:[`${r}-pagination`,this.themeClass,this.rtlEnabled&&`${r}-pagination--rtl`,t&&`${r}-pagination--disabled`,h&&`${r}-pagination--simple`],style:n},B?i("div",{class:`${r}-pagination-prefix`},B({page:a,pageSize:m,pageCount:o,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null,this.displayOrder.map(ue=>{switch(ue){case"pages":return i(mn,null,i("div",{class:[`${r}-pagination-item`,!Q&&`${r}-pagination-item--button`,(a<=1||a>o||t)&&`${r}-pagination-item--disabled`],onClick:I},Q?Q({page:a,pageSize:m,pageCount:o,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount}):i(Pt,{clsPrefix:r},{default:()=>this.rtlEnabled?i(Tn,null):i(Sn,null)})),h?i(mn,null,i("div",{class:`${r}-pagination-quick-jumper`},i(Yt,{value:y,onUpdateValue:T,size:f,placeholder:"",disabled:t,theme:u.peers.Input,themeOverrides:u.peerOverrides.Input,onChange:O}))," /"," ",o):l.map((te,V)=>{let _,E,U;const{type:ne}=te;switch(ne){case"page":const he=te.label;ee?_=ee({type:"page",node:he,active:te.active}):_=he;break;case"fast-forward":const Te=this.fastForwardActive?i(Pt,{clsPrefix:r},{default:()=>this.rtlEnabled?i(Pn,null):i(Fn,null)}):i(Pt,{clsPrefix:r},{default:()=>i(mo,null)});ee?_=ee({type:"fast-forward",node:Te,active:this.fastForwardActive||this.showFastForwardMenu}):_=Te,E=this.handleFastForwardMouseenter,U=this.handleFastForwardMouseleave;break;case"fast-backward":const j=this.fastBackwardActive?i(Pt,{clsPrefix:r},{default:()=>this.rtlEnabled?i(Fn,null):i(Pn,null)}):i(Pt,{clsPrefix:r},{default:()=>i(mo,null)});ee?_=ee({type:"fast-backward",node:j,active:this.fastBackwardActive||this.showFastBackwardMenu}):_=j,E=this.handleFastBackwardMouseenter,U=this.handleFastBackwardMouseleave;break}const Oe=i("div",{key:V,class:[`${r}-pagination-item`,te.active&&`${r}-pagination-item--active`,ne!=="page"&&(ne==="fast-backward"&&this.showFastBackwardMenu||ne==="fast-forward"&&this.showFastForwardMenu)&&`${r}-pagination-item--hover`,t&&`${r}-pagination-item--disabled`,ne==="page"&&`${r}-pagination-item--clickable`],onClick:()=>{N(te)},onMouseenter:E,onMouseleave:U},_);if(ne==="page"&&!te.mayBeFastBackward&&!te.mayBeFastForward)return Oe;{const he=te.type==="page"?te.mayBeFastBackward?"fast-backward":"fast-forward":te.type;return te.type!=="page"&&!te.options?Oe:i(Zu,{to:this.to,key:he,disabled:t,trigger:"hover",virtualScroll:!0,style:{width:"60px"},theme:u.peers.Popselect,themeOverrides:u.peerOverrides.Popselect,builtinThemeOverrides:{peers:{InternalSelectMenu:{height:"calc(var(--n-option-height) * 4.6)"}}},nodeProps:()=>({style:{justifyContent:"center"}}),show:ne==="page"?!1:ne==="fast-backward"?this.showFastBackwardMenu:this.showFastForwardMenu,onUpdateShow:Te=>{ne!=="page"&&(Te?ne==="fast-backward"?this.showFastBackwardMenu=Te:this.showFastForwardMenu=Te:(this.showFastBackwardMenu=!1,this.showFastForwardMenu=!1))},options:te.type!=="page"&&te.options?te.options:[],onUpdateValue:this.handleMenuSelect,scrollable:!0,showCheckmark:!1},{default:()=>Oe})}}),i("div",{class:[`${r}-pagination-item`,!q&&`${r}-pagination-item--button`,{[`${r}-pagination-item--disabled`]:a<1||a>=o||t}],onClick:J},q?q({page:a,pageSize:m,pageCount:o,itemCount:this.mergedItemCount,startIndex:this.startIndex,endIndex:this.endIndex}):i(Pt,{clsPrefix:r},{default:()=>this.rtlEnabled?i(Sn,null):i(Tn,null)})));case"size-picker":return!h&&s?i(tc,Object.assign({consistentMenuWidth:!1,placeholder:"",showCheckmark:!1,to:this.to},this.selectProps,{size:v,options:p,value:m,disabled:t,theme:u.peers.Select,themeOverrides:u.peerOverrides.Select,onUpdateValue:Y})):null;case"quick-jumper":return!h&&d?i("div",{class:`${r}-pagination-quick-jumper`},D?D():qe(this.$slots.goto,()=>[c.goto]),i(Yt,{value:y,onUpdateValue:T,size:f,placeholder:"",disabled:t,theme:u.peers.Input,themeOverrides:u.peerOverrides.Input,onChange:O})):null;default:return null}}),L?i("div",{class:`${r}-pagination-suffix`},L({page:a,pageSize:m,pageCount:o,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null)}}),ic=Object.assign(Object.assign({},Ye.props),{onUnstableColumnResize:Function,pagination:{type:[Object,Boolean],default:!1},paginateSinglePage:{type:Boolean,default:!0},minHeight:[Number,String],maxHeight:[Number,String],columns:{type:Array,default:()=>[]},rowClassName:[String,Function],rowProps:Function,rowKey:Function,summary:[Function],data:{type:Array,default:()=>[]},loading:Boolean,bordered:{type:Boolean,default:void 0},bottomBordered:{type:Boolean,default:void 0},striped:Boolean,scrollX:[Number,String],defaultCheckedRowKeys:{type:Array,default:()=>[]},checkedRowKeys:Array,singleLine:{type:Boolean,default:!0},singleColumn:Boolean,size:{type:String,default:"medium"},remote:Boolean,defaultExpandedRowKeys:{type:Array,default:[]},defaultExpandAll:Boolean,expandedRowKeys:Array,stickyExpandedRows:Boolean,virtualScroll:Boolean,virtualScrollX:Boolean,virtualScrollHeader:Boolean,headerHeight:{type:Number,default:28},heightForRow:Function,minRowHeight:{type:Number,default:28},tableLayout:{type:String,default:"auto"},allowCheckingNotLoaded:Boolean,cascade:{type:Boolean,default:!0},childrenKey:{type:String,default:"children"},indent:{type:Number,default:16},flexHeight:Boolean,summaryPlacement:{type:String,default:"bottom"},paginationBehaviorOnFilter:{type:String,default:"current"},filterIconPopoverProps:Object,scrollbarProps:Object,renderCell:Function,renderExpandIcon:Function,spinProps:{type:Object,default:{}},getCsvCell:Function,getCsvHeader:Function,onLoad:Function,"onUpdate:page":[Function,Array],onUpdatePage:[Function,Array],"onUpdate:pageSize":[Function,Array],onUpdatePageSize:[Function,Array],"onUpdate:sorter":[Function,Array],onUpdateSorter:[Function,Array],"onUpdate:filters":[Function,Array],onUpdateFilters:[Function,Array],"onUpdate:checkedRowKeys":[Function,Array],onUpdateCheckedRowKeys:[Function,Array],"onUpdate:expandedRowKeys":[Function,Array],onUpdateExpandedRowKeys:[Function,Array],onScroll:Function,onPageChange:[Function,Array],onPageSizeChange:[Function,Array],onSorterChange:[Function,Array],onFiltersChange:[Function,Array],onCheckedRowKeysChange:[Function,Array]}),rn=bn("n-data-table"),qi=40,Gi=40;function Oo(e){if(e.type==="selection")return e.width===void 0?qi:Jn(e.width);if(e.type==="expand")return e.width===void 0?Gi:Jn(e.width);if(!("children"in e))return typeof e.width=="string"?Jn(e.width):e.width}function lc(e){var r,t;if(e.type==="selection")return jt((r=e.width)!==null&&r!==void 0?r:qi);if(e.type==="expand")return jt((t=e.width)!==null&&t!==void 0?t:Gi);if(!("children"in e))return jt(e.width)}function tn(e){return e.type==="selection"?"__n_selection__":e.type==="expand"?"__n_expand__":e.key}function Do(e){return e&&(typeof e=="object"?Object.assign({},e):e)}function sc(e){return e==="ascend"?1:e==="descend"?-1:0}function dc(e,r,t){return t!==void 0&&(e=Math.min(e,typeof t=="number"?t:Number.parseFloat(t))),r!==void 0&&(e=Math.max(e,typeof r=="number"?r:Number.parseFloat(r))),e}function uc(e,r){if(r!==void 0)return{width:r,minWidth:r,maxWidth:r};const t=lc(e),{minWidth:n,maxWidth:a}=e;return{width:t,minWidth:jt(n)||t,maxWidth:jt(a)}}function cc(e,r,t){return typeof t=="function"?t(e,r):t||""}function ua(e){return e.filterOptionValues!==void 0||e.filterOptionValue===void 0&&e.defaultFilterOptionValues!==void 0}function ca(e){return"children"in e?!1:!!e.sorter}function Xi(e){return"children"in e&&e.children.length?!1:!!e.resizable}function Mo(e){return"children"in e?!1:!!e.filter&&(!!e.filterOptions||!!e.renderFilterMenu)}function zo(e){if(e){if(e==="descend")return"ascend"}else return"descend";return!1}function fc(e,r){return e.sorter===void 0?null:r===null||r.columnKey!==e.key?{columnKey:e.key,sorter:e.sorter,order:zo(!1)}:Object.assign(Object.assign({},r),{order:zo(r.order)})}function Qi(e,r){return r.find(t=>t.columnKey===e.key&&t.order)!==void 0}function hc(e){return typeof e=="string"?e.replace(/,/g,"\\,"):e==null?"":`${e}`.replace(/,/g,"\\,")}function vc(e,r,t,n){const a=e.filter(s=>s.type!=="expand"&&s.type!=="selection"&&s.allowExport!==!1),o=a.map(s=>n?n(s):s.title).join(","),l=r.map(s=>a.map(d=>t?t(s[d.key],s,d):hc(s[d.key])).join(","));return[o,...l].join(` +`)}const mc=ge({name:"DataTableBodyCheckbox",props:{rowKey:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!0},onUpdateChecked:{type:Function,required:!0}},setup(e){const{mergedCheckedRowKeySetRef:r,mergedInderminateRowKeySetRef:t}=it(rn);return()=>{const{rowKey:n}=e;return i(Xa,{privateInsideTable:!0,disabled:e.disabled,indeterminate:t.value.has(n),checked:r.value.has(n),onUpdateChecked:e.onUpdateChecked})}}}),pc=M("radio",` line-height: var(--n-label-line-height); outline: none; position: relative; @@ -573,7 +573,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config flex-shrink: 0; flex-grow: 0; width: var(--n-radio-size); - `),O("radio-input",` + `),M("radio-input",` position: absolute; border: 0; border-radius: inherit; @@ -627,9 +627,9 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config cursor: not-allowed; `,[le("dot",{boxShadow:"var(--n-box-shadow-disabled)",backgroundColor:"var(--n-color-disabled)"},[W("&::before",{backgroundColor:"var(--n-dot-color-disabled)"}),K("checked",` opacity: 1; - `)]),le("label",{color:"var(--n-text-color-disabled)"}),O("radio-input",` + `)]),le("label",{color:"var(--n-text-color-disabled)"}),M("radio-input",` cursor: not-allowed; - `)])]),gc={name:String,value:{type:[String,Number,Boolean],default:"on"},checked:{type:Boolean,default:void 0},defaultChecked:Boolean,disabled:{type:Boolean,default:void 0},label:String,size:String,onUpdateChecked:[Function,Array],"onUpdate:checked":[Function,Array],checkedValue:{type:Boolean,default:void 0}},Zi=bn("n-radio-group");function bc(e){const r=it(Zi,null),t=Tn(e,{mergedSize(g){const{size:k}=e;if(k!==void 0)return k;if(r){const{mergedSizeRef:{value:x}}=r;if(x!==void 0)return x}return g?g.mergedSize.value:"medium"},mergedDisabled(g){return!!(e.disabled||r!=null&&r.disabledRef.value||g!=null&&g.disabled.value)}}),{mergedSizeRef:n,mergedDisabledRef:a}=t,o=F(null),l=F(null),s=F(e.defaultChecked),d=me(e,"checked"),u=zt(d,s),c=at(()=>r?r.valueRef.value===e.value:u.value),f=at(()=>{const{name:g}=e;if(g!==void 0)return g;if(r)return r.nameRef.value}),v=F(!1);function m(){if(r){const{doUpdateValue:g}=r,{value:k}=e;oe(g,k)}else{const{onUpdateChecked:g,"onUpdate:checked":k}=e,{nTriggerFormInput:x,nTriggerFormChange:P}=t;g&&oe(g,!0),k&&oe(k,!0),x(),P(),s.value=!0}}function p(){a.value||c.value||m()}function y(){p(),o.value&&(o.value.checked=c.value)}function h(){v.value=!1}function w(){v.value=!0}return{mergedClsPrefix:r?r.mergedClsPrefixRef:xt(e).mergedClsPrefixRef,inputRef:o,labelRef:l,mergedName:f,mergedDisabled:a,renderSafeChecked:c,focus:v,mergedSize:n,handleRadioInputChange:y,handleRadioInputBlur:h,handleRadioInputFocus:w}}const yc=Object.assign(Object.assign({},Ye.props),gc),Ji=ge({name:"Radio",props:yc,setup(e){const r=bc(e),t=Ye("Radio","-radio",pc,li,e,r.mergedClsPrefix),n=b(()=>{const{mergedSize:{value:u}}=r,{common:{cubicBezierEaseInOut:c},self:{boxShadow:f,boxShadowActive:v,boxShadowDisabled:m,boxShadowFocus:p,boxShadowHover:y,color:h,colorDisabled:w,colorActive:g,textColor:k,textColorDisabled:x,dotColorActive:P,dotColorDisabled:$,labelPadding:T,labelLineHeight:Y,labelFontWeight:z,[Ve("fontSize",u)]:N,[Ve("radioSize",u)]:J}}=t.value;return{"--n-bezier":c,"--n-label-line-height":Y,"--n-label-font-weight":z,"--n-box-shadow":f,"--n-box-shadow-active":v,"--n-box-shadow-disabled":m,"--n-box-shadow-focus":p,"--n-box-shadow-hover":y,"--n-color":h,"--n-color-active":g,"--n-color-disabled":w,"--n-dot-color-active":P,"--n-dot-color-disabled":$,"--n-font-size":N,"--n-radio-size":J,"--n-text-color":k,"--n-text-color-disabled":x,"--n-label-padding":T}}),{inlineThemeDisabled:a,mergedClsPrefixRef:o,mergedRtlRef:l}=xt(e),s=gn("Radio",l,o),d=a?Mt("radio",b(()=>r.mergedSize.value[0]),n,e):void 0;return Object.assign(r,{rtlEnabled:s,cssVars:a?void 0:n,themeClass:d==null?void 0:d.themeClass,onRender:d==null?void 0:d.onRender})},render(){const{$slots:e,mergedClsPrefix:r,onRender:t,label:n}=this;return t==null||t(),i("label",{class:[`${r}-radio`,this.themeClass,this.rtlEnabled&&`${r}-radio--rtl`,this.mergedDisabled&&`${r}-radio--disabled`,this.renderSafeChecked&&`${r}-radio--checked`,this.focus&&`${r}-radio--focus`],style:this.cssVars},i("input",{ref:"inputRef",type:"radio",class:`${r}-radio-input`,value:this.value,name:this.mergedName,checked:this.renderSafeChecked,disabled:this.mergedDisabled,onChange:this.handleRadioInputChange,onFocus:this.handleRadioInputFocus,onBlur:this.handleRadioInputBlur}),i("div",{class:`${r}-radio__dot-wrapper`}," ",i("div",{class:[`${r}-radio__dot`,this.renderSafeChecked&&`${r}-radio__dot--checked`]})),er(e.default,a=>!a&&!n?null:i("div",{ref:"labelRef",class:`${r}-radio__label`},a||n)))}}),wc=O("radio-group",` + `)])]),gc={name:String,value:{type:[String,Number,Boolean],default:"on"},checked:{type:Boolean,default:void 0},defaultChecked:Boolean,disabled:{type:Boolean,default:void 0},label:String,size:String,onUpdateChecked:[Function,Array],"onUpdate:checked":[Function,Array],checkedValue:{type:Boolean,default:void 0}},Zi=bn("n-radio-group");function bc(e){const r=it(Zi,null),t=_n(e,{mergedSize(w){const{size:k}=e;if(k!==void 0)return k;if(r){const{mergedSizeRef:{value:b}}=r;if(b!==void 0)return b}return w?w.mergedSize.value:"medium"},mergedDisabled(w){return!!(e.disabled||r!=null&&r.disabledRef.value||w!=null&&w.disabled.value)}}),{mergedSizeRef:n,mergedDisabledRef:a}=t,o=F(null),l=F(null),s=F(e.defaultChecked),d=me(e,"checked"),u=zt(d,s),c=at(()=>r?r.valueRef.value===e.value:u.value),f=at(()=>{const{name:w}=e;if(w!==void 0)return w;if(r)return r.nameRef.value}),v=F(!1);function m(){if(r){const{doUpdateValue:w}=r,{value:k}=e;ie(w,k)}else{const{onUpdateChecked:w,"onUpdate:checked":k}=e,{nTriggerFormInput:b,nTriggerFormChange:R}=t;w&&ie(w,!0),k&&ie(k,!0),b(),R(),s.value=!0}}function p(){a.value||c.value||m()}function y(){p(),o.value&&(o.value.checked=c.value)}function h(){v.value=!1}function x(){v.value=!0}return{mergedClsPrefix:r?r.mergedClsPrefixRef:xt(e).mergedClsPrefixRef,inputRef:o,labelRef:l,mergedName:f,mergedDisabled:a,renderSafeChecked:c,focus:v,mergedSize:n,handleRadioInputChange:y,handleRadioInputBlur:h,handleRadioInputFocus:x}}const yc=Object.assign(Object.assign({},Ye.props),gc),Ji=ge({name:"Radio",props:yc,setup(e){const r=bc(e),t=Ye("Radio","-radio",pc,li,e,r.mergedClsPrefix),n=g(()=>{const{mergedSize:{value:u}}=r,{common:{cubicBezierEaseInOut:c},self:{boxShadow:f,boxShadowActive:v,boxShadowDisabled:m,boxShadowFocus:p,boxShadowHover:y,color:h,colorDisabled:x,colorActive:w,textColor:k,textColorDisabled:b,dotColorActive:R,dotColorDisabled:D,labelPadding:T,labelLineHeight:Y,labelFontWeight:I,[Ve("fontSize",u)]:N,[Ve("radioSize",u)]:J}}=t.value;return{"--n-bezier":c,"--n-label-line-height":Y,"--n-label-font-weight":I,"--n-box-shadow":f,"--n-box-shadow-active":v,"--n-box-shadow-disabled":m,"--n-box-shadow-focus":p,"--n-box-shadow-hover":y,"--n-color":h,"--n-color-active":w,"--n-color-disabled":x,"--n-dot-color-active":R,"--n-dot-color-disabled":D,"--n-font-size":N,"--n-radio-size":J,"--n-text-color":k,"--n-text-color-disabled":b,"--n-label-padding":T}}),{inlineThemeDisabled:a,mergedClsPrefixRef:o,mergedRtlRef:l}=xt(e),s=gn("Radio",l,o),d=a?Mt("radio",g(()=>r.mergedSize.value[0]),n,e):void 0;return Object.assign(r,{rtlEnabled:s,cssVars:a?void 0:n,themeClass:d==null?void 0:d.themeClass,onRender:d==null?void 0:d.onRender})},render(){const{$slots:e,mergedClsPrefix:r,onRender:t,label:n}=this;return t==null||t(),i("label",{class:[`${r}-radio`,this.themeClass,this.rtlEnabled&&`${r}-radio--rtl`,this.mergedDisabled&&`${r}-radio--disabled`,this.renderSafeChecked&&`${r}-radio--checked`,this.focus&&`${r}-radio--focus`],style:this.cssVars},i("input",{ref:"inputRef",type:"radio",class:`${r}-radio-input`,value:this.value,name:this.mergedName,checked:this.renderSafeChecked,disabled:this.mergedDisabled,onChange:this.handleRadioInputChange,onFocus:this.handleRadioInputFocus,onBlur:this.handleRadioInputBlur}),i("div",{class:`${r}-radio__dot-wrapper`}," ",i("div",{class:[`${r}-radio__dot`,this.renderSafeChecked&&`${r}-radio__dot--checked`]})),er(e.default,a=>!a&&!n?null:i("div",{ref:"labelRef",class:`${r}-radio__label`},a||n)))}}),wc=M("radio-group",` display: inline-block; font-size: var(--n-font-size); `,[le("splitor",` @@ -644,7 +644,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config white-space: nowrap; height: var(--n-height); line-height: var(--n-height); - `,[O("radio-button",{height:"var(--n-height)",lineHeight:"var(--n-height)"}),le("splitor",{height:"var(--n-height)"})]),O("radio-button",` + `,[M("radio-button",{height:"var(--n-height)",lineHeight:"var(--n-height)"}),le("splitor",{height:"var(--n-height)"})]),M("radio-button",` vertical-align: bottom; outline: none; position: relative; @@ -664,7 +664,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config color: var(--n-button-text-color); border-top: 1px solid var(--n-button-border-color); border-bottom: 1px solid var(--n-button-border-color); - `,[O("radio-input",` + `,[M("radio-input",` pointer-events: none; position: absolute; border: 0; @@ -711,7 +711,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config `),K("disabled",` cursor: not-allowed; opacity: var(--n-opacity-disabled); - `)])]);function xc(e,r,t){var n;const a=[];let o=!1;for(let l=0;l{const{value:P}=t,{common:{cubicBezierEaseInOut:$},self:{buttonBorderColor:T,buttonBorderColorActive:Y,buttonBorderRadius:z,buttonBoxShadow:N,buttonBoxShadowFocus:J,buttonBoxShadowHover:D,buttonColor:C,buttonColorActive:B,buttonTextColor:L,buttonTextColorActive:Q,buttonTextColorHover:q,opacityDisabled:ee,[Ve("buttonHeight",P)]:ue,[Ve("fontSize",P)]:te}}=f.value;return{"--n-font-size":te,"--n-bezier":$,"--n-button-border-color":T,"--n-button-border-color-active":Y,"--n-button-border-radius":z,"--n-button-box-shadow":N,"--n-button-box-shadow-focus":J,"--n-button-box-shadow-hover":D,"--n-button-color":C,"--n-button-color-active":B,"--n-button-text-color":L,"--n-button-text-color-hover":q,"--n-button-text-color-active":Q,"--n-height":ue,"--n-opacity-disabled":ee}}),x=u?Mt("radio-group",b(()=>t.value[0]),k,e):void 0;return{selfElRef:r,rtlEnabled:g,mergedClsPrefix:d,mergedValue:p,handleFocusout:w,handleFocusin:h,cssVars:u?void 0:k,themeClass:x==null?void 0:x.themeClass,onRender:x==null?void 0:x.onRender}},render(){var e;const{mergedValue:r,mergedClsPrefix:t,handleFocusin:n,handleFocusout:a}=this,{children:o,isButtonGroup:l}=xc(gs(bs(this)),r,t);return(e=this.onRender)===null||e===void 0||e.call(this),i("div",{onFocusin:n,onFocusout:a,ref:"selfElRef",class:[`${t}-radio-group`,this.rtlEnabled&&`${t}-radio-group--rtl`,this.themeClass,l&&`${t}-radio-group--button-group`],style:this.cssVars},o)}}),Rc=ge({name:"DataTableBodyRadio",props:{rowKey:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!0},onUpdateChecked:{type:Function,required:!0}},setup(e){const{mergedCheckedRowKeySetRef:r,componentId:t}=it(rn);return()=>{const{rowKey:n}=e;return i(Ji,{name:t,disabled:e.disabled,checked:r.value.has(n),onUpdateChecked:e.onUpdateChecked})}}}),Sc=Object.assign(Object.assign({},fr),Ye.props),Pc=ge({name:"Tooltip",props:Sc,__popover__:!0,setup(e){const{mergedClsPrefixRef:r}=xt(e),t=Ye("Tooltip","-tooltip",void 0,zl,e,r),n=F(null);return Object.assign(Object.assign({},{syncPosition(){n.value.syncPosition()},setShow(o){n.value.setShow(o)}}),{popoverRef:n,mergedTheme:t,popoverThemeOverrides:b(()=>t.value.self)})},render(){const{mergedTheme:e,internalExtraClass:r}=this;return i(yr,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:r.concat("tooltip"),ref:"popoverRef"}),this.$slots)}}),el=O("ellipsis",{overflow:"hidden"},[Ft("line-clamp",` + `)])]);function xc(e,r,t){var n;const a=[];let o=!1;for(let l=0;l{const{value:R}=t,{common:{cubicBezierEaseInOut:D},self:{buttonBorderColor:T,buttonBorderColorActive:Y,buttonBorderRadius:I,buttonBoxShadow:N,buttonBoxShadowFocus:J,buttonBoxShadowHover:O,buttonColor:C,buttonColorActive:B,buttonTextColor:L,buttonTextColorActive:Q,buttonTextColorHover:q,opacityDisabled:ee,[Ve("buttonHeight",R)]:ue,[Ve("fontSize",R)]:te}}=f.value;return{"--n-font-size":te,"--n-bezier":D,"--n-button-border-color":T,"--n-button-border-color-active":Y,"--n-button-border-radius":I,"--n-button-box-shadow":N,"--n-button-box-shadow-focus":J,"--n-button-box-shadow-hover":O,"--n-button-color":C,"--n-button-color-active":B,"--n-button-text-color":L,"--n-button-text-color-hover":q,"--n-button-text-color-active":Q,"--n-height":ue,"--n-opacity-disabled":ee}}),b=u?Mt("radio-group",g(()=>t.value[0]),k,e):void 0;return{selfElRef:r,rtlEnabled:w,mergedClsPrefix:d,mergedValue:p,handleFocusout:x,handleFocusin:h,cssVars:u?void 0:k,themeClass:b==null?void 0:b.themeClass,onRender:b==null?void 0:b.onRender}},render(){var e;const{mergedValue:r,mergedClsPrefix:t,handleFocusin:n,handleFocusout:a}=this,{children:o,isButtonGroup:l}=xc(gs(bs(this)),r,t);return(e=this.onRender)===null||e===void 0||e.call(this),i("div",{onFocusin:n,onFocusout:a,ref:"selfElRef",class:[`${t}-radio-group`,this.rtlEnabled&&`${t}-radio-group--rtl`,this.themeClass,l&&`${t}-radio-group--button-group`],style:this.cssVars},o)}}),Rc=ge({name:"DataTableBodyRadio",props:{rowKey:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!0},onUpdateChecked:{type:Function,required:!0}},setup(e){const{mergedCheckedRowKeySetRef:r,componentId:t}=it(rn);return()=>{const{rowKey:n}=e;return i(Ji,{name:t,disabled:e.disabled,checked:r.value.has(n),onUpdateChecked:e.onUpdateChecked})}}}),Sc=Object.assign(Object.assign({},fr),Ye.props),Pc=ge({name:"Tooltip",props:Sc,__popover__:!0,setup(e){const{mergedClsPrefixRef:r}=xt(e),t=Ye("Tooltip","-tooltip",void 0,zl,e,r),n=F(null);return Object.assign(Object.assign({},{syncPosition(){n.value.syncPosition()},setShow(o){n.value.setShow(o)}}),{popoverRef:n,mergedTheme:t,popoverThemeOverrides:g(()=>t.value.self)})},render(){const{mergedTheme:e,internalExtraClass:r}=this;return i(yr,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:r.concat("tooltip"),ref:"popoverRef"}),this.$slots)}}),el=M("ellipsis",{overflow:"hidden"},[Ft("line-clamp",` white-space: nowrap; display: inline-block; vertical-align: bottom; @@ -721,7 +721,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config -webkit-box-orient: vertical; `),K("cursor-pointer",` cursor: pointer; - `)]);function za(e){return`${e}-ellipsis--line-clamp`}function Ia(e,r){return`${e}-ellipsis--cursor-${r}`}const tl=Object.assign(Object.assign({},Ye.props),{expandTrigger:String,lineClamp:[Number,String],tooltip:{type:[Boolean,Object],default:!0}}),Za=ge({name:"Ellipsis",inheritAttrs:!1,props:tl,setup(e,{slots:r,attrs:t}){const n=si(),a=Ye("Ellipsis","-ellipsis",el,Il,e,n),o=F(null),l=F(null),s=F(null),d=F(!1),u=b(()=>{const{lineClamp:h}=e,{value:w}=d;return h!==void 0?{textOverflow:"","-webkit-line-clamp":w?"":h}:{textOverflow:w?"":"ellipsis","-webkit-line-clamp":""}});function c(){let h=!1;const{value:w}=d;if(w)return!0;const{value:g}=o;if(g){const{lineClamp:k}=e;if(m(g),k!==void 0)h=g.scrollHeight<=g.offsetHeight;else{const{value:x}=l;x&&(h=x.getBoundingClientRect().width<=g.getBoundingClientRect().width)}p(g,h)}return h}const f=b(()=>e.expandTrigger==="click"?()=>{var h;const{value:w}=d;w&&((h=s.value)===null||h===void 0||h.setShow(!1)),d.value=!w}:void 0);Zo(()=>{var h;e.tooltip&&((h=s.value)===null||h===void 0||h.setShow(!1))});const v=()=>i("span",Object.assign({},Un(t,{class:[`${n.value}-ellipsis`,e.lineClamp!==void 0?za(n.value):void 0,e.expandTrigger==="click"?Ia(n.value,"pointer"):void 0],style:u.value}),{ref:"triggerRef",onClick:f.value,onMouseenter:e.expandTrigger==="click"?c:void 0}),e.lineClamp?r:i("span",{ref:"triggerInnerRef"},r));function m(h){if(!h)return;const w=u.value,g=za(n.value);e.lineClamp!==void 0?y(h,g,"add"):y(h,g,"remove");for(const k in w)h.style[k]!==w[k]&&(h.style[k]=w[k])}function p(h,w){const g=Ia(n.value,"pointer");e.expandTrigger==="click"&&!w?y(h,g,"add"):y(h,g,"remove")}function y(h,w,g){g==="add"?h.classList.contains(w)||h.classList.add(w):h.classList.contains(w)&&h.classList.remove(w)}return{mergedTheme:a,triggerRef:o,triggerInnerRef:l,tooltipRef:s,handleClick:f,renderTrigger:v,getTooltipDisabled:c}},render(){var e;const{tooltip:r,renderTrigger:t,$slots:n}=this;if(r){const{mergedTheme:a}=this;return i(Pc,Object.assign({ref:"tooltipRef",placement:"top"},r,{getDisabled:this.getTooltipDisabled,theme:a.peers.Tooltip,themeOverrides:a.peerOverrides.Tooltip}),{trigger:t,default:(e=n.tooltip)!==null&&e!==void 0?e:n.default})}else return t()}}),Fc=ge({name:"PerformantEllipsis",props:tl,inheritAttrs:!1,setup(e,{attrs:r,slots:t}){const n=F(!1),a=si();return $l("-ellipsis",el,a),{mouseEntered:n,renderTrigger:()=>{const{lineClamp:l}=e,s=a.value;return i("span",Object.assign({},Un(r,{class:[`${s}-ellipsis`,l!==void 0?za(s):void 0,e.expandTrigger==="click"?Ia(s,"pointer"):void 0],style:l===void 0?{textOverflow:"ellipsis"}:{"-webkit-line-clamp":l}}),{onMouseenter:()=>{n.value=!0}}),l?t:i("span",null,t))}}},render(){return this.mouseEntered?i(Za,Un({},this.$attrs,this.$props),this.$slots):this.renderTrigger()}}),Tc=ge({name:"DataTableCell",props:{clsPrefix:{type:String,required:!0},row:{type:Object,required:!0},index:{type:Number,required:!0},column:{type:Object,required:!0},isSummary:Boolean,mergedTheme:{type:Object,required:!0},renderCell:Function},render(){var e;const{isSummary:r,column:t,row:n,renderCell:a}=this;let o;const{render:l,key:s,ellipsis:d}=t;if(l&&!r?o=l(n,this.index):r?o=(e=n[s])===null||e===void 0?void 0:e.value:o=a?a(io(n,s),n,t):io(n,s),d)if(typeof d=="object"){const{mergedTheme:u}=this;return t.ellipsisComponent==="performant-ellipsis"?i(Fc,Object.assign({},d,{theme:u.peers.Ellipsis,themeOverrides:u.peerOverrides.Ellipsis}),{default:()=>o}):i(Za,Object.assign({},d,{theme:u.peers.Ellipsis,themeOverrides:u.peerOverrides.Ellipsis}),{default:()=>o})}else return i("span",{class:`${this.clsPrefix}-data-table-td__ellipsis`},o);return o}}),Io=ge({name:"DataTableExpandTrigger",props:{clsPrefix:{type:String,required:!0},expanded:Boolean,loading:Boolean,onClick:{type:Function,required:!0},renderExpandIcon:{type:Function},rowData:{type:Object,required:!0}},render(){const{clsPrefix:e}=this;return i("div",{class:[`${e}-data-table-expand-trigger`,this.expanded&&`${e}-data-table-expand-trigger--expanded`],onClick:this.onClick,onMousedown:r=>{r.preventDefault()}},i(ri,null,{default:()=>this.loading?i(Va,{key:"loading",clsPrefix:this.clsPrefix,radius:85,strokeWidth:15,scale:.88}):this.renderExpandIcon?this.renderExpandIcon({expanded:this.expanded,rowData:this.rowData}):i(Pt,{clsPrefix:e,key:"base-icon"},{default:()=>i(xi,null)})}))}}),_c=ge({name:"DataTableFilterMenu",props:{column:{type:Object,required:!0},radioGroupName:{type:String,required:!0},multiple:{type:Boolean,required:!0},value:{type:[Array,String,Number],default:null},options:{type:Array,required:!0},onConfirm:{type:Function,required:!0},onClear:{type:Function,required:!0},onChange:{type:Function,required:!0}},setup(e){const{mergedClsPrefixRef:r,mergedRtlRef:t}=xt(e),n=gn("DataTable",t,r),{mergedClsPrefixRef:a,mergedThemeRef:o,localeRef:l}=it(rn),s=F(e.value),d=b(()=>{const{value:p}=s;return Array.isArray(p)?p:null}),u=b(()=>{const{value:p}=s;return ua(e.column)?Array.isArray(p)&&p.length&&p[0]||null:Array.isArray(p)?null:p});function c(p){e.onChange(p)}function f(p){e.multiple&&Array.isArray(p)?s.value=p:ua(e.column)&&!Array.isArray(p)?s.value=[p]:s.value=p}function v(){c(s.value),e.onConfirm()}function m(){e.multiple||ua(e.column)?c([]):c(null),e.onClear()}return{mergedClsPrefix:a,rtlEnabled:n,mergedTheme:o,locale:l,checkboxGroupValue:d,radioGroupValue:u,handleChange:f,handleConfirmClick:v,handleClearClick:m}},render(){const{mergedTheme:e,locale:r,mergedClsPrefix:t}=this;return i("div",{class:[`${t}-data-table-filter-menu`,this.rtlEnabled&&`${t}-data-table-filter-menu--rtl`]},i(Ut,null,{default:()=>{const{checkboxGroupValue:n,handleChange:a}=this;return this.multiple?i(ju,{value:n,class:`${t}-data-table-filter-menu__group`,onUpdateValue:a},{default:()=>this.options.map(o=>i(Xa,{key:o.value,theme:e.peers.Checkbox,themeOverrides:e.peerOverrides.Checkbox,value:o.value},{default:()=>o.label}))}):i(kc,{name:this.radioGroupName,class:`${t}-data-table-filter-menu__group`,value:this.radioGroupValue,onUpdateValue:this.handleChange},{default:()=>this.options.map(o=>i(Ji,{key:o.value,value:o.value,theme:e.peers.Radio,themeOverrides:e.peerOverrides.Radio},{default:()=>o.label}))})}}),i("div",{class:`${t}-data-table-filter-menu__action`},i(ft,{size:"tiny",theme:e.peers.Button,themeOverrides:e.peerOverrides.Button,onClick:this.handleClearClick},{default:()=>r.clear}),i(ft,{theme:e.peers.Button,themeOverrides:e.peerOverrides.Button,type:"primary",size:"tiny",onClick:this.handleConfirmClick},{default:()=>r.confirm})))}}),Dc=ge({name:"DataTableRenderFilter",props:{render:{type:Function,required:!0},active:{type:Boolean,default:!1},show:{type:Boolean,default:!1}},render(){const{render:e,active:r,show:t}=this;return e({active:r,show:t})}});function Oc(e,r,t){const n=Object.assign({},e);return n[r]=t,n}const Mc=ge({name:"DataTableFilterButton",props:{column:{type:Object,required:!0},options:{type:Array,default:()=>[]}},setup(e){const{mergedComponentPropsRef:r}=xt(),{mergedThemeRef:t,mergedClsPrefixRef:n,mergedFilterStateRef:a,filterMenuCssVarsRef:o,paginationBehaviorOnFilterRef:l,doUpdatePage:s,doUpdateFilters:d,filterIconPopoverPropsRef:u}=it(rn),c=F(!1),f=a,v=b(()=>e.column.filterMultiple!==!1),m=b(()=>{const k=f.value[e.column.key];if(k===void 0){const{value:x}=v;return x?[]:null}return k}),p=b(()=>{const{value:k}=m;return Array.isArray(k)?k.length>0:k!==null}),y=b(()=>{var k,x;return((x=(k=r==null?void 0:r.value)===null||k===void 0?void 0:k.DataTable)===null||x===void 0?void 0:x.renderFilter)||e.column.renderFilter});function h(k){const x=Oc(f.value,e.column.key,k);d(x,e.column),l.value==="first"&&s(1)}function w(){c.value=!1}function g(){c.value=!1}return{mergedTheme:t,mergedClsPrefix:n,active:p,showPopover:c,mergedRenderFilter:y,filterIconPopoverProps:u,filterMultiple:v,mergedFilterValue:m,filterMenuCssVars:o,handleFilterChange:h,handleFilterMenuConfirm:g,handleFilterMenuCancel:w}},render(){const{mergedTheme:e,mergedClsPrefix:r,handleFilterMenuCancel:t,filterIconPopoverProps:n}=this;return i(yr,Object.assign({show:this.showPopover,onUpdateShow:a=>this.showPopover=a,trigger:"click",theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,placement:"bottom"},n,{style:{padding:0}}),{trigger:()=>{const{mergedRenderFilter:a}=this;if(a)return i(Dc,{"data-data-table-filter":!0,render:a,active:this.active,show:this.showPopover});const{renderFilterIcon:o}=this.column;return i("div",{"data-data-table-filter":!0,class:[`${r}-data-table-filter`,{[`${r}-data-table-filter--active`]:this.active,[`${r}-data-table-filter--show`]:this.showPopover}]},o?o({active:this.active,show:this.showPopover}):i(Pt,{clsPrefix:r},{default:()=>i(_s,null)}))},default:()=>{const{renderFilterMenu:a}=this.column;return a?a({hide:t}):i(_c,{style:this.filterMenuCssVars,radioGroupName:String(this.column.key),multiple:this.filterMultiple,value:this.mergedFilterValue,options:this.options,column:this.column,onChange:this.handleFilterChange,onClear:this.handleFilterMenuCancel,onConfirm:this.handleFilterMenuConfirm})}})}}),zc=ge({name:"ColumnResizeButton",props:{onResizeStart:Function,onResize:Function,onResizeEnd:Function},setup(e){const{mergedClsPrefixRef:r}=it(rn),t=F(!1);let n=0;function a(d){return d.clientX}function o(d){var u;d.preventDefault();const c=t.value;n=a(d),t.value=!0,c||(hn("mousemove",window,l),hn("mouseup",window,s),(u=e.onResizeStart)===null||u===void 0||u.call(e))}function l(d){var u;(u=e.onResize)===null||u===void 0||u.call(e,a(d)-n)}function s(){var d;t.value=!1,(d=e.onResizeEnd)===null||d===void 0||d.call(e),kn("mousemove",window,l),kn("mouseup",window,s)}return Lr(()=>{kn("mousemove",window,l),kn("mouseup",window,s)}),{mergedClsPrefix:r,active:t,handleMousedown:o}},render(){const{mergedClsPrefix:e}=this;return i("span",{"data-data-table-resizable":!0,class:[`${e}-data-table-resize-button`,this.active&&`${e}-data-table-resize-button--active`],onMousedown:this.handleMousedown})}}),Ic=ge({name:"DataTableRenderSorter",props:{render:{type:Function,required:!0},order:{type:[String,Boolean],default:!1}},render(){const{render:e,order:r}=this;return e({order:r})}}),$c=ge({name:"SortIcon",props:{column:{type:Object,required:!0}},setup(e){const{mergedComponentPropsRef:r}=xt(),{mergedSortStateRef:t,mergedClsPrefixRef:n}=it(rn),a=b(()=>t.value.find(d=>d.columnKey===e.column.key)),o=b(()=>a.value!==void 0),l=b(()=>{const{value:d}=a;return d&&o.value?d.order:!1}),s=b(()=>{var d,u;return((u=(d=r==null?void 0:r.value)===null||d===void 0?void 0:d.DataTable)===null||u===void 0?void 0:u.renderSorter)||e.column.renderSorter});return{mergedClsPrefix:n,active:o,mergedSortOrder:l,mergedRenderSorter:s}},render(){const{mergedRenderSorter:e,mergedSortOrder:r,mergedClsPrefix:t}=this,{renderSorterIcon:n}=this.column;return e?i(Ic,{render:e,order:r}):i("span",{class:[`${t}-data-table-sorter`,r==="ascend"&&`${t}-data-table-sorter--asc`,r==="descend"&&`${t}-data-table-sorter--desc`]},n?n({order:r}):i(Pt,{clsPrefix:t},{default:()=>i(Ps,null)}))}}),Ja=bn("n-dropdown-menu"),Wr=bn("n-dropdown"),$o=bn("n-dropdown-option"),nl=ge({name:"DropdownDivider",props:{clsPrefix:{type:String,required:!0}},render(){return i("div",{class:`${this.clsPrefix}-dropdown-divider`})}}),Ac=ge({name:"DropdownGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{showIconRef:e,hasSubmenuRef:r}=it(Ja),{renderLabelRef:t,labelFieldRef:n,nodePropsRef:a,renderOptionRef:o}=it(Wr);return{labelField:n,showIcon:e,hasSubmenu:r,renderLabel:t,nodeProps:a,renderOption:o}},render(){var e;const{clsPrefix:r,hasSubmenu:t,showIcon:n,nodeProps:a,renderLabel:o,renderOption:l}=this,{rawNode:s}=this.tmNode,d=i("div",Object.assign({class:`${r}-dropdown-option`},a==null?void 0:a(s)),i("div",{class:`${r}-dropdown-option-body ${r}-dropdown-option-body--group`},i("div",{"data-dropdown-option":!0,class:[`${r}-dropdown-option-body__prefix`,n&&`${r}-dropdown-option-body__prefix--show-icon`]},ln(s.icon)),i("div",{class:`${r}-dropdown-option-body__label`,"data-dropdown-option":!0},o?o(s):ln((e=s.title)!==null&&e!==void 0?e:s[this.labelField])),i("div",{class:[`${r}-dropdown-option-body__suffix`,t&&`${r}-dropdown-option-body__suffix--has-submenu`],"data-dropdown-option":!0})));return l?l({node:d,option:s}):d}}),Nc=O("icon",` + `)]);function za(e){return`${e}-ellipsis--line-clamp`}function Ia(e,r){return`${e}-ellipsis--cursor-${r}`}const tl=Object.assign(Object.assign({},Ye.props),{expandTrigger:String,lineClamp:[Number,String],tooltip:{type:[Boolean,Object],default:!0}}),Za=ge({name:"Ellipsis",inheritAttrs:!1,props:tl,setup(e,{slots:r,attrs:t}){const n=si(),a=Ye("Ellipsis","-ellipsis",el,Il,e,n),o=F(null),l=F(null),s=F(null),d=F(!1),u=g(()=>{const{lineClamp:h}=e,{value:x}=d;return h!==void 0?{textOverflow:"","-webkit-line-clamp":x?"":h}:{textOverflow:x?"":"ellipsis","-webkit-line-clamp":""}});function c(){let h=!1;const{value:x}=d;if(x)return!0;const{value:w}=o;if(w){const{lineClamp:k}=e;if(m(w),k!==void 0)h=w.scrollHeight<=w.offsetHeight;else{const{value:b}=l;b&&(h=b.getBoundingClientRect().width<=w.getBoundingClientRect().width)}p(w,h)}return h}const f=g(()=>e.expandTrigger==="click"?()=>{var h;const{value:x}=d;x&&((h=s.value)===null||h===void 0||h.setShow(!1)),d.value=!x}:void 0);Zo(()=>{var h;e.tooltip&&((h=s.value)===null||h===void 0||h.setShow(!1))});const v=()=>i("span",Object.assign({},Un(t,{class:[`${n.value}-ellipsis`,e.lineClamp!==void 0?za(n.value):void 0,e.expandTrigger==="click"?Ia(n.value,"pointer"):void 0],style:u.value}),{ref:"triggerRef",onClick:f.value,onMouseenter:e.expandTrigger==="click"?c:void 0}),e.lineClamp?r:i("span",{ref:"triggerInnerRef"},r));function m(h){if(!h)return;const x=u.value,w=za(n.value);e.lineClamp!==void 0?y(h,w,"add"):y(h,w,"remove");for(const k in x)h.style[k]!==x[k]&&(h.style[k]=x[k])}function p(h,x){const w=Ia(n.value,"pointer");e.expandTrigger==="click"&&!x?y(h,w,"add"):y(h,w,"remove")}function y(h,x,w){w==="add"?h.classList.contains(x)||h.classList.add(x):h.classList.contains(x)&&h.classList.remove(x)}return{mergedTheme:a,triggerRef:o,triggerInnerRef:l,tooltipRef:s,handleClick:f,renderTrigger:v,getTooltipDisabled:c}},render(){var e;const{tooltip:r,renderTrigger:t,$slots:n}=this;if(r){const{mergedTheme:a}=this;return i(Pc,Object.assign({ref:"tooltipRef",placement:"top"},r,{getDisabled:this.getTooltipDisabled,theme:a.peers.Tooltip,themeOverrides:a.peerOverrides.Tooltip}),{trigger:t,default:(e=n.tooltip)!==null&&e!==void 0?e:n.default})}else return t()}}),Fc=ge({name:"PerformantEllipsis",props:tl,inheritAttrs:!1,setup(e,{attrs:r,slots:t}){const n=F(!1),a=si();return $l("-ellipsis",el,a),{mouseEntered:n,renderTrigger:()=>{const{lineClamp:l}=e,s=a.value;return i("span",Object.assign({},Un(r,{class:[`${s}-ellipsis`,l!==void 0?za(s):void 0,e.expandTrigger==="click"?Ia(s,"pointer"):void 0],style:l===void 0?{textOverflow:"ellipsis"}:{"-webkit-line-clamp":l}}),{onMouseenter:()=>{n.value=!0}}),l?t:i("span",null,t))}}},render(){return this.mouseEntered?i(Za,Un({},this.$attrs,this.$props),this.$slots):this.renderTrigger()}}),Tc=ge({name:"DataTableCell",props:{clsPrefix:{type:String,required:!0},row:{type:Object,required:!0},index:{type:Number,required:!0},column:{type:Object,required:!0},isSummary:Boolean,mergedTheme:{type:Object,required:!0},renderCell:Function},render(){var e;const{isSummary:r,column:t,row:n,renderCell:a}=this;let o;const{render:l,key:s,ellipsis:d}=t;if(l&&!r?o=l(n,this.index):r?o=(e=n[s])===null||e===void 0?void 0:e.value:o=a?a(io(n,s),n,t):io(n,s),d)if(typeof d=="object"){const{mergedTheme:u}=this;return t.ellipsisComponent==="performant-ellipsis"?i(Fc,Object.assign({},d,{theme:u.peers.Ellipsis,themeOverrides:u.peerOverrides.Ellipsis}),{default:()=>o}):i(Za,Object.assign({},d,{theme:u.peers.Ellipsis,themeOverrides:u.peerOverrides.Ellipsis}),{default:()=>o})}else return i("span",{class:`${this.clsPrefix}-data-table-td__ellipsis`},o);return o}}),Io=ge({name:"DataTableExpandTrigger",props:{clsPrefix:{type:String,required:!0},expanded:Boolean,loading:Boolean,onClick:{type:Function,required:!0},renderExpandIcon:{type:Function},rowData:{type:Object,required:!0}},render(){const{clsPrefix:e}=this;return i("div",{class:[`${e}-data-table-expand-trigger`,this.expanded&&`${e}-data-table-expand-trigger--expanded`],onClick:this.onClick,onMousedown:r=>{r.preventDefault()}},i(ri,null,{default:()=>this.loading?i(Va,{key:"loading",clsPrefix:this.clsPrefix,radius:85,strokeWidth:15,scale:.88}):this.renderExpandIcon?this.renderExpandIcon({expanded:this.expanded,rowData:this.rowData}):i(Pt,{clsPrefix:e,key:"base-icon"},{default:()=>i(xi,null)})}))}}),_c=ge({name:"DataTableFilterMenu",props:{column:{type:Object,required:!0},radioGroupName:{type:String,required:!0},multiple:{type:Boolean,required:!0},value:{type:[Array,String,Number],default:null},options:{type:Array,required:!0},onConfirm:{type:Function,required:!0},onClear:{type:Function,required:!0},onChange:{type:Function,required:!0}},setup(e){const{mergedClsPrefixRef:r,mergedRtlRef:t}=xt(e),n=gn("DataTable",t,r),{mergedClsPrefixRef:a,mergedThemeRef:o,localeRef:l}=it(rn),s=F(e.value),d=g(()=>{const{value:p}=s;return Array.isArray(p)?p:null}),u=g(()=>{const{value:p}=s;return ua(e.column)?Array.isArray(p)&&p.length&&p[0]||null:Array.isArray(p)?null:p});function c(p){e.onChange(p)}function f(p){e.multiple&&Array.isArray(p)?s.value=p:ua(e.column)&&!Array.isArray(p)?s.value=[p]:s.value=p}function v(){c(s.value),e.onConfirm()}function m(){e.multiple||ua(e.column)?c([]):c(null),e.onClear()}return{mergedClsPrefix:a,rtlEnabled:n,mergedTheme:o,locale:l,checkboxGroupValue:d,radioGroupValue:u,handleChange:f,handleConfirmClick:v,handleClearClick:m}},render(){const{mergedTheme:e,locale:r,mergedClsPrefix:t}=this;return i("div",{class:[`${t}-data-table-filter-menu`,this.rtlEnabled&&`${t}-data-table-filter-menu--rtl`]},i(Ut,null,{default:()=>{const{checkboxGroupValue:n,handleChange:a}=this;return this.multiple?i(ju,{value:n,class:`${t}-data-table-filter-menu__group`,onUpdateValue:a},{default:()=>this.options.map(o=>i(Xa,{key:o.value,theme:e.peers.Checkbox,themeOverrides:e.peerOverrides.Checkbox,value:o.value},{default:()=>o.label}))}):i(kc,{name:this.radioGroupName,class:`${t}-data-table-filter-menu__group`,value:this.radioGroupValue,onUpdateValue:this.handleChange},{default:()=>this.options.map(o=>i(Ji,{key:o.value,value:o.value,theme:e.peers.Radio,themeOverrides:e.peerOverrides.Radio},{default:()=>o.label}))})}}),i("div",{class:`${t}-data-table-filter-menu__action`},i(ft,{size:"tiny",theme:e.peers.Button,themeOverrides:e.peerOverrides.Button,onClick:this.handleClearClick},{default:()=>r.clear}),i(ft,{theme:e.peers.Button,themeOverrides:e.peerOverrides.Button,type:"primary",size:"tiny",onClick:this.handleConfirmClick},{default:()=>r.confirm})))}}),Oc=ge({name:"DataTableRenderFilter",props:{render:{type:Function,required:!0},active:{type:Boolean,default:!1},show:{type:Boolean,default:!1}},render(){const{render:e,active:r,show:t}=this;return e({active:r,show:t})}});function Dc(e,r,t){const n=Object.assign({},e);return n[r]=t,n}const Mc=ge({name:"DataTableFilterButton",props:{column:{type:Object,required:!0},options:{type:Array,default:()=>[]}},setup(e){const{mergedComponentPropsRef:r}=xt(),{mergedThemeRef:t,mergedClsPrefixRef:n,mergedFilterStateRef:a,filterMenuCssVarsRef:o,paginationBehaviorOnFilterRef:l,doUpdatePage:s,doUpdateFilters:d,filterIconPopoverPropsRef:u}=it(rn),c=F(!1),f=a,v=g(()=>e.column.filterMultiple!==!1),m=g(()=>{const k=f.value[e.column.key];if(k===void 0){const{value:b}=v;return b?[]:null}return k}),p=g(()=>{const{value:k}=m;return Array.isArray(k)?k.length>0:k!==null}),y=g(()=>{var k,b;return((b=(k=r==null?void 0:r.value)===null||k===void 0?void 0:k.DataTable)===null||b===void 0?void 0:b.renderFilter)||e.column.renderFilter});function h(k){const b=Dc(f.value,e.column.key,k);d(b,e.column),l.value==="first"&&s(1)}function x(){c.value=!1}function w(){c.value=!1}return{mergedTheme:t,mergedClsPrefix:n,active:p,showPopover:c,mergedRenderFilter:y,filterIconPopoverProps:u,filterMultiple:v,mergedFilterValue:m,filterMenuCssVars:o,handleFilterChange:h,handleFilterMenuConfirm:w,handleFilterMenuCancel:x}},render(){const{mergedTheme:e,mergedClsPrefix:r,handleFilterMenuCancel:t,filterIconPopoverProps:n}=this;return i(yr,Object.assign({show:this.showPopover,onUpdateShow:a=>this.showPopover=a,trigger:"click",theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,placement:"bottom"},n,{style:{padding:0}}),{trigger:()=>{const{mergedRenderFilter:a}=this;if(a)return i(Oc,{"data-data-table-filter":!0,render:a,active:this.active,show:this.showPopover});const{renderFilterIcon:o}=this.column;return i("div",{"data-data-table-filter":!0,class:[`${r}-data-table-filter`,{[`${r}-data-table-filter--active`]:this.active,[`${r}-data-table-filter--show`]:this.showPopover}]},o?o({active:this.active,show:this.showPopover}):i(Pt,{clsPrefix:r},{default:()=>i(_s,null)}))},default:()=>{const{renderFilterMenu:a}=this.column;return a?a({hide:t}):i(_c,{style:this.filterMenuCssVars,radioGroupName:String(this.column.key),multiple:this.filterMultiple,value:this.mergedFilterValue,options:this.options,column:this.column,onChange:this.handleFilterChange,onClear:this.handleFilterMenuCancel,onConfirm:this.handleFilterMenuConfirm})}})}}),zc=ge({name:"ColumnResizeButton",props:{onResizeStart:Function,onResize:Function,onResizeEnd:Function},setup(e){const{mergedClsPrefixRef:r}=it(rn),t=F(!1);let n=0;function a(d){return d.clientX}function o(d){var u;d.preventDefault();const c=t.value;n=a(d),t.value=!0,c||(hn("mousemove",window,l),hn("mouseup",window,s),(u=e.onResizeStart)===null||u===void 0||u.call(e))}function l(d){var u;(u=e.onResize)===null||u===void 0||u.call(e,a(d)-n)}function s(){var d;t.value=!1,(d=e.onResizeEnd)===null||d===void 0||d.call(e),Rn("mousemove",window,l),Rn("mouseup",window,s)}return Lr(()=>{Rn("mousemove",window,l),Rn("mouseup",window,s)}),{mergedClsPrefix:r,active:t,handleMousedown:o}},render(){const{mergedClsPrefix:e}=this;return i("span",{"data-data-table-resizable":!0,class:[`${e}-data-table-resize-button`,this.active&&`${e}-data-table-resize-button--active`],onMousedown:this.handleMousedown})}}),Ic=ge({name:"DataTableRenderSorter",props:{render:{type:Function,required:!0},order:{type:[String,Boolean],default:!1}},render(){const{render:e,order:r}=this;return e({order:r})}}),$c=ge({name:"SortIcon",props:{column:{type:Object,required:!0}},setup(e){const{mergedComponentPropsRef:r}=xt(),{mergedSortStateRef:t,mergedClsPrefixRef:n}=it(rn),a=g(()=>t.value.find(d=>d.columnKey===e.column.key)),o=g(()=>a.value!==void 0),l=g(()=>{const{value:d}=a;return d&&o.value?d.order:!1}),s=g(()=>{var d,u;return((u=(d=r==null?void 0:r.value)===null||d===void 0?void 0:d.DataTable)===null||u===void 0?void 0:u.renderSorter)||e.column.renderSorter});return{mergedClsPrefix:n,active:o,mergedSortOrder:l,mergedRenderSorter:s}},render(){const{mergedRenderSorter:e,mergedSortOrder:r,mergedClsPrefix:t}=this,{renderSorterIcon:n}=this.column;return e?i(Ic,{render:e,order:r}):i("span",{class:[`${t}-data-table-sorter`,r==="ascend"&&`${t}-data-table-sorter--asc`,r==="descend"&&`${t}-data-table-sorter--desc`]},n?n({order:r}):i(Pt,{clsPrefix:t},{default:()=>i(Ps,null)}))}}),Ja=bn("n-dropdown-menu"),Wr=bn("n-dropdown"),$o=bn("n-dropdown-option"),nl=ge({name:"DropdownDivider",props:{clsPrefix:{type:String,required:!0}},render(){return i("div",{class:`${this.clsPrefix}-dropdown-divider`})}}),Ac=ge({name:"DropdownGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{showIconRef:e,hasSubmenuRef:r}=it(Ja),{renderLabelRef:t,labelFieldRef:n,nodePropsRef:a,renderOptionRef:o}=it(Wr);return{labelField:n,showIcon:e,hasSubmenu:r,renderLabel:t,nodeProps:a,renderOption:o}},render(){var e;const{clsPrefix:r,hasSubmenu:t,showIcon:n,nodeProps:a,renderLabel:o,renderOption:l}=this,{rawNode:s}=this.tmNode,d=i("div",Object.assign({class:`${r}-dropdown-option`},a==null?void 0:a(s)),i("div",{class:`${r}-dropdown-option-body ${r}-dropdown-option-body--group`},i("div",{"data-dropdown-option":!0,class:[`${r}-dropdown-option-body__prefix`,n&&`${r}-dropdown-option-body__prefix--show-icon`]},ln(s.icon)),i("div",{class:`${r}-dropdown-option-body__label`,"data-dropdown-option":!0},o?o(s):ln((e=s.title)!==null&&e!==void 0?e:s[this.labelField])),i("div",{class:[`${r}-dropdown-option-body__suffix`,t&&`${r}-dropdown-option-body__suffix--has-submenu`],"data-dropdown-option":!0})));return l?l({node:d,option:s}):d}}),Nc=M("icon",` height: 1em; width: 1em; line-height: 1em; @@ -730,7 +730,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config position: relative; fill: currentColor; transform: translateZ(0); -`,[K("color-transition",{transition:"color .3s var(--n-bezier)"}),K("depth",{color:"var(--n-color)"},[W("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),W("svg",{height:"1em",width:"1em"})]),Bc=Object.assign(Object.assign({},Ye.props),{depth:[String,Number],size:[Number,String],color:String,component:[Object,Function]}),Ec=ge({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:Bc,setup(e){const{mergedClsPrefixRef:r,inlineThemeDisabled:t}=xt(e),n=Ye("Icon","-icon",Nc,Al,e,r),a=b(()=>{const{depth:l}=e,{common:{cubicBezierEaseInOut:s},self:d}=n.value;if(l!==void 0){const{color:u,[`opacity${l}Depth`]:c}=d;return{"--n-bezier":s,"--n-color":u,"--n-opacity":c}}return{"--n-bezier":s,"--n-color":"","--n-opacity":""}}),o=t?Mt("icon",b(()=>`${e.depth||"d"}`),a,e):void 0;return{mergedClsPrefix:r,mergedStyle:b(()=>{const{size:l,color:s}=e;return{fontSize:jt(l),color:s}}),cssVars:t?void 0:a,themeClass:o==null?void 0:o.themeClass,onRender:o==null?void 0:o.onRender}},render(){var e;const{$parent:r,depth:t,mergedClsPrefix:n,component:a,onRender:o,themeClass:l}=this;return!((e=r==null?void 0:r.$options)===null||e===void 0)&&e._n_icon__&&ur("icon","don't wrap `n-icon` inside `n-icon`"),o==null||o(),i("i",Un(this.$attrs,{role:"img",class:[`${n}-icon`,l,{[`${n}-icon--depth`]:t,[`${n}-icon--color-transition`]:t!==void 0}],style:[this.cssVars,this.mergedStyle]}),a?i(a):this.$slots)}});function $a(e,r){return e.type==="submenu"||e.type===void 0&&e[r]!==void 0}function Vc(e){return e.type==="group"}function rl(e){return e.type==="divider"}function Lc(e){return e.type==="render"}const al=ge({name:"DropdownOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null},placement:{type:String,default:"right-start"},props:Object,scrollable:Boolean},setup(e){const r=it(Wr),{hoverKeyRef:t,keyboardKeyRef:n,lastToggledSubmenuKeyRef:a,pendingKeyPathRef:o,activeKeyPathRef:l,animatedRef:s,mergedShowRef:d,renderLabelRef:u,renderIconRef:c,labelFieldRef:f,childrenFieldRef:v,renderOptionRef:m,nodePropsRef:p,menuPropsRef:y}=r,h=it($o,null),w=it(Ja),g=it(mi),k=b(()=>e.tmNode.rawNode),x=b(()=>{const{value:q}=v;return $a(e.tmNode.rawNode,q)}),P=b(()=>{const{disabled:q}=e.tmNode;return q}),$=b(()=>{if(!x.value)return!1;const{key:q,disabled:ee}=e.tmNode;if(ee)return!1;const{value:ue}=t,{value:te}=n,{value:V}=a,{value:_}=o;return ue!==null?_.includes(q):te!==null?_.includes(q)&&_[_.length-1]!==q:V!==null?_.includes(q):!1}),T=b(()=>n.value===null&&!s.value),Y=ys($,300,T),z=b(()=>!!(h!=null&&h.enteringSubmenuRef.value)),N=F(!1);At($o,{enteringSubmenuRef:N});function J(){N.value=!0}function D(){N.value=!1}function C(){const{parentKey:q,tmNode:ee}=e;ee.disabled||d.value&&(a.value=q,n.value=null,t.value=ee.key)}function B(){const{tmNode:q}=e;q.disabled||d.value&&t.value!==q.key&&C()}function L(q){if(e.tmNode.disabled||!d.value)return;const{relatedTarget:ee}=q;ee&&!Lt({target:ee},"dropdownOption")&&!Lt({target:ee},"scrollbarRail")&&(t.value=null)}function Q(){const{value:q}=x,{tmNode:ee}=e;d.value&&!q&&!ee.disabled&&(r.doSelect(ee.key,ee.rawNode),r.doUpdateShow(!1))}return{labelField:f,renderLabel:u,renderIcon:c,siblingHasIcon:w.showIconRef,siblingHasSubmenu:w.hasSubmenuRef,menuProps:y,popoverBody:g,animated:s,mergedShowSubmenu:b(()=>Y.value&&!z.value),rawNode:k,hasSubmenu:x,pending:at(()=>{const{value:q}=o,{key:ee}=e.tmNode;return q.includes(ee)}),childActive:at(()=>{const{value:q}=l,{key:ee}=e.tmNode,ue=q.findIndex(te=>ee===te);return ue===-1?!1:ue{const{value:q}=l,{key:ee}=e.tmNode,ue=q.findIndex(te=>ee===te);return ue===-1?!1:ue===q.length-1}),mergedDisabled:P,renderOption:m,nodeProps:p,handleClick:Q,handleMouseMove:B,handleMouseEnter:C,handleMouseLeave:L,handleSubmenuBeforeEnter:J,handleSubmenuAfterEnter:D}},render(){var e,r;const{animated:t,rawNode:n,mergedShowSubmenu:a,clsPrefix:o,siblingHasIcon:l,siblingHasSubmenu:s,renderLabel:d,renderIcon:u,renderOption:c,nodeProps:f,props:v,scrollable:m}=this;let p=null;if(a){const g=(e=this.menuProps)===null||e===void 0?void 0:e.call(this,n,n.children);p=i(ol,Object.assign({},g,{clsPrefix:o,scrollable:this.scrollable,tmNodes:this.tmNode.children,parentKey:this.tmNode.key}))}const y={class:[`${o}-dropdown-option-body`,this.pending&&`${o}-dropdown-option-body--pending`,this.active&&`${o}-dropdown-option-body--active`,this.childActive&&`${o}-dropdown-option-body--child-active`,this.mergedDisabled&&`${o}-dropdown-option-body--disabled`],onMousemove:this.handleMouseMove,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onClick:this.handleClick},h=f==null?void 0:f(n),w=i("div",Object.assign({class:[`${o}-dropdown-option`,h==null?void 0:h.class],"data-dropdown-option":!0},h),i("div",Un(y,v),[i("div",{class:[`${o}-dropdown-option-body__prefix`,l&&`${o}-dropdown-option-body__prefix--show-icon`]},[u?u(n):ln(n.icon)]),i("div",{"data-dropdown-option":!0,class:`${o}-dropdown-option-body__label`},d?d(n):ln((r=n[this.labelField])!==null&&r!==void 0?r:n.title)),i("div",{"data-dropdown-option":!0,class:[`${o}-dropdown-option-body__suffix`,s&&`${o}-dropdown-option-body__suffix--has-submenu`]},this.hasSubmenu?i(Ec,null,{default:()=>i(xi,null)}):null)]),this.hasSubmenu?i(wr,null,{default:()=>[i(xr,null,{default:()=>i("div",{class:`${o}-dropdown-offset-container`},i(Cr,{show:this.mergedShowSubmenu,placement:this.placement,to:m&&this.popoverBody||void 0,teleportDisabled:!m},{default:()=>i("div",{class:`${o}-dropdown-menu-wrapper`},t?i(Kn,{onBeforeEnter:this.handleSubmenuBeforeEnter,onAfterEnter:this.handleSubmenuAfterEnter,name:"fade-in-scale-up-transition",appear:!0},{default:()=>p}):p)}))})]}):null);return c?c({node:w,option:n}):w}}),Hc=ge({name:"NDropdownGroup",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null}},render(){const{tmNode:e,parentKey:r,clsPrefix:t}=this,{children:n}=e;return i(mn,null,i(Ac,{clsPrefix:t,tmNode:e,key:e.key}),n==null?void 0:n.map(a=>{const{rawNode:o}=a;return o.show===!1?null:rl(o)?i(nl,{clsPrefix:t,key:a.key}):a.isGroup?(ur("dropdown","`group` node is not allowed to be put in `group` node."),null):i(al,{clsPrefix:t,tmNode:a,parentKey:r,key:a.key})}))}}),Uc=ge({name:"DropdownRenderOption",props:{tmNode:{type:Object,required:!0}},render(){const{rawNode:{render:e,props:r}}=this.tmNode;return i("div",r,[e==null?void 0:e()])}}),ol=ge({name:"DropdownMenu",props:{scrollable:Boolean,showArrow:Boolean,arrowStyle:[String,Object],clsPrefix:{type:String,required:!0},tmNodes:{type:Array,default:()=>[]},parentKey:{type:[String,Number],default:null}},setup(e){const{renderIconRef:r,childrenFieldRef:t}=it(Wr);At(Ja,{showIconRef:b(()=>{const a=r.value;return e.tmNodes.some(o=>{var l;if(o.isGroup)return(l=o.children)===null||l===void 0?void 0:l.some(({rawNode:d})=>a?a(d):d.icon);const{rawNode:s}=o;return a?a(s):s.icon})}),hasSubmenuRef:b(()=>{const{value:a}=t;return e.tmNodes.some(o=>{var l;if(o.isGroup)return(l=o.children)===null||l===void 0?void 0:l.some(({rawNode:d})=>$a(d,a));const{rawNode:s}=o;return $a(s,a)})})});const n=F(null);return At(hs,null),At(vs,null),At(mi,n),{bodyRef:n}},render(){const{parentKey:e,clsPrefix:r,scrollable:t}=this,n=this.tmNodes.map(a=>{const{rawNode:o}=a;return o.show===!1?null:Lc(o)?i(Uc,{tmNode:a,key:a.key}):rl(o)?i(nl,{clsPrefix:r,key:a.key}):Vc(o)?i(Hc,{clsPrefix:r,tmNode:a,parentKey:e,key:a.key}):i(al,{clsPrefix:r,tmNode:a,parentKey:e,key:a.key,props:o.props,scrollable:t})});return i("div",{class:[`${r}-dropdown-menu`,t&&`${r}-dropdown-menu--scrollable`],ref:"bodyRef"},t?i(ls,{contentClass:`${r}-dropdown-menu__content`},{default:()=>n}):n,this.showArrow?fs({clsPrefix:r,arrowStyle:this.arrowStyle,arrowClass:void 0,arrowWrapperClass:void 0,arrowWrapperStyle:void 0}):null)}}),jc=O("dropdown-menu",` +`,[K("color-transition",{transition:"color .3s var(--n-bezier)"}),K("depth",{color:"var(--n-color)"},[W("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),W("svg",{height:"1em",width:"1em"})]),Bc=Object.assign(Object.assign({},Ye.props),{depth:[String,Number],size:[Number,String],color:String,component:[Object,Function]}),Ec=ge({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:Bc,setup(e){const{mergedClsPrefixRef:r,inlineThemeDisabled:t}=xt(e),n=Ye("Icon","-icon",Nc,Al,e,r),a=g(()=>{const{depth:l}=e,{common:{cubicBezierEaseInOut:s},self:d}=n.value;if(l!==void 0){const{color:u,[`opacity${l}Depth`]:c}=d;return{"--n-bezier":s,"--n-color":u,"--n-opacity":c}}return{"--n-bezier":s,"--n-color":"","--n-opacity":""}}),o=t?Mt("icon",g(()=>`${e.depth||"d"}`),a,e):void 0;return{mergedClsPrefix:r,mergedStyle:g(()=>{const{size:l,color:s}=e;return{fontSize:jt(l),color:s}}),cssVars:t?void 0:a,themeClass:o==null?void 0:o.themeClass,onRender:o==null?void 0:o.onRender}},render(){var e;const{$parent:r,depth:t,mergedClsPrefix:n,component:a,onRender:o,themeClass:l}=this;return!((e=r==null?void 0:r.$options)===null||e===void 0)&&e._n_icon__&&ur("icon","don't wrap `n-icon` inside `n-icon`"),o==null||o(),i("i",Un(this.$attrs,{role:"img",class:[`${n}-icon`,l,{[`${n}-icon--depth`]:t,[`${n}-icon--color-transition`]:t!==void 0}],style:[this.cssVars,this.mergedStyle]}),a?i(a):this.$slots)}});function $a(e,r){return e.type==="submenu"||e.type===void 0&&e[r]!==void 0}function Vc(e){return e.type==="group"}function rl(e){return e.type==="divider"}function Lc(e){return e.type==="render"}const al=ge({name:"DropdownOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null},placement:{type:String,default:"right-start"},props:Object,scrollable:Boolean},setup(e){const r=it(Wr),{hoverKeyRef:t,keyboardKeyRef:n,lastToggledSubmenuKeyRef:a,pendingKeyPathRef:o,activeKeyPathRef:l,animatedRef:s,mergedShowRef:d,renderLabelRef:u,renderIconRef:c,labelFieldRef:f,childrenFieldRef:v,renderOptionRef:m,nodePropsRef:p,menuPropsRef:y}=r,h=it($o,null),x=it(Ja),w=it(mi),k=g(()=>e.tmNode.rawNode),b=g(()=>{const{value:q}=v;return $a(e.tmNode.rawNode,q)}),R=g(()=>{const{disabled:q}=e.tmNode;return q}),D=g(()=>{if(!b.value)return!1;const{key:q,disabled:ee}=e.tmNode;if(ee)return!1;const{value:ue}=t,{value:te}=n,{value:V}=a,{value:_}=o;return ue!==null?_.includes(q):te!==null?_.includes(q)&&_[_.length-1]!==q:V!==null?_.includes(q):!1}),T=g(()=>n.value===null&&!s.value),Y=ys(D,300,T),I=g(()=>!!(h!=null&&h.enteringSubmenuRef.value)),N=F(!1);At($o,{enteringSubmenuRef:N});function J(){N.value=!0}function O(){N.value=!1}function C(){const{parentKey:q,tmNode:ee}=e;ee.disabled||d.value&&(a.value=q,n.value=null,t.value=ee.key)}function B(){const{tmNode:q}=e;q.disabled||d.value&&t.value!==q.key&&C()}function L(q){if(e.tmNode.disabled||!d.value)return;const{relatedTarget:ee}=q;ee&&!Lt({target:ee},"dropdownOption")&&!Lt({target:ee},"scrollbarRail")&&(t.value=null)}function Q(){const{value:q}=b,{tmNode:ee}=e;d.value&&!q&&!ee.disabled&&(r.doSelect(ee.key,ee.rawNode),r.doUpdateShow(!1))}return{labelField:f,renderLabel:u,renderIcon:c,siblingHasIcon:x.showIconRef,siblingHasSubmenu:x.hasSubmenuRef,menuProps:y,popoverBody:w,animated:s,mergedShowSubmenu:g(()=>Y.value&&!I.value),rawNode:k,hasSubmenu:b,pending:at(()=>{const{value:q}=o,{key:ee}=e.tmNode;return q.includes(ee)}),childActive:at(()=>{const{value:q}=l,{key:ee}=e.tmNode,ue=q.findIndex(te=>ee===te);return ue===-1?!1:ue{const{value:q}=l,{key:ee}=e.tmNode,ue=q.findIndex(te=>ee===te);return ue===-1?!1:ue===q.length-1}),mergedDisabled:R,renderOption:m,nodeProps:p,handleClick:Q,handleMouseMove:B,handleMouseEnter:C,handleMouseLeave:L,handleSubmenuBeforeEnter:J,handleSubmenuAfterEnter:O}},render(){var e,r;const{animated:t,rawNode:n,mergedShowSubmenu:a,clsPrefix:o,siblingHasIcon:l,siblingHasSubmenu:s,renderLabel:d,renderIcon:u,renderOption:c,nodeProps:f,props:v,scrollable:m}=this;let p=null;if(a){const w=(e=this.menuProps)===null||e===void 0?void 0:e.call(this,n,n.children);p=i(ol,Object.assign({},w,{clsPrefix:o,scrollable:this.scrollable,tmNodes:this.tmNode.children,parentKey:this.tmNode.key}))}const y={class:[`${o}-dropdown-option-body`,this.pending&&`${o}-dropdown-option-body--pending`,this.active&&`${o}-dropdown-option-body--active`,this.childActive&&`${o}-dropdown-option-body--child-active`,this.mergedDisabled&&`${o}-dropdown-option-body--disabled`],onMousemove:this.handleMouseMove,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onClick:this.handleClick},h=f==null?void 0:f(n),x=i("div",Object.assign({class:[`${o}-dropdown-option`,h==null?void 0:h.class],"data-dropdown-option":!0},h),i("div",Un(y,v),[i("div",{class:[`${o}-dropdown-option-body__prefix`,l&&`${o}-dropdown-option-body__prefix--show-icon`]},[u?u(n):ln(n.icon)]),i("div",{"data-dropdown-option":!0,class:`${o}-dropdown-option-body__label`},d?d(n):ln((r=n[this.labelField])!==null&&r!==void 0?r:n.title)),i("div",{"data-dropdown-option":!0,class:[`${o}-dropdown-option-body__suffix`,s&&`${o}-dropdown-option-body__suffix--has-submenu`]},this.hasSubmenu?i(Ec,null,{default:()=>i(xi,null)}):null)]),this.hasSubmenu?i(wr,null,{default:()=>[i(xr,null,{default:()=>i("div",{class:`${o}-dropdown-offset-container`},i(Cr,{show:this.mergedShowSubmenu,placement:this.placement,to:m&&this.popoverBody||void 0,teleportDisabled:!m},{default:()=>i("div",{class:`${o}-dropdown-menu-wrapper`},t?i(Kn,{onBeforeEnter:this.handleSubmenuBeforeEnter,onAfterEnter:this.handleSubmenuAfterEnter,name:"fade-in-scale-up-transition",appear:!0},{default:()=>p}):p)}))})]}):null);return c?c({node:x,option:n}):x}}),Hc=ge({name:"NDropdownGroup",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null}},render(){const{tmNode:e,parentKey:r,clsPrefix:t}=this,{children:n}=e;return i(mn,null,i(Ac,{clsPrefix:t,tmNode:e,key:e.key}),n==null?void 0:n.map(a=>{const{rawNode:o}=a;return o.show===!1?null:rl(o)?i(nl,{clsPrefix:t,key:a.key}):a.isGroup?(ur("dropdown","`group` node is not allowed to be put in `group` node."),null):i(al,{clsPrefix:t,tmNode:a,parentKey:r,key:a.key})}))}}),Uc=ge({name:"DropdownRenderOption",props:{tmNode:{type:Object,required:!0}},render(){const{rawNode:{render:e,props:r}}=this.tmNode;return i("div",r,[e==null?void 0:e()])}}),ol=ge({name:"DropdownMenu",props:{scrollable:Boolean,showArrow:Boolean,arrowStyle:[String,Object],clsPrefix:{type:String,required:!0},tmNodes:{type:Array,default:()=>[]},parentKey:{type:[String,Number],default:null}},setup(e){const{renderIconRef:r,childrenFieldRef:t}=it(Wr);At(Ja,{showIconRef:g(()=>{const a=r.value;return e.tmNodes.some(o=>{var l;if(o.isGroup)return(l=o.children)===null||l===void 0?void 0:l.some(({rawNode:d})=>a?a(d):d.icon);const{rawNode:s}=o;return a?a(s):s.icon})}),hasSubmenuRef:g(()=>{const{value:a}=t;return e.tmNodes.some(o=>{var l;if(o.isGroup)return(l=o.children)===null||l===void 0?void 0:l.some(({rawNode:d})=>$a(d,a));const{rawNode:s}=o;return $a(s,a)})})});const n=F(null);return At(hs,null),At(vs,null),At(mi,n),{bodyRef:n}},render(){const{parentKey:e,clsPrefix:r,scrollable:t}=this,n=this.tmNodes.map(a=>{const{rawNode:o}=a;return o.show===!1?null:Lc(o)?i(Uc,{tmNode:a,key:a.key}):rl(o)?i(nl,{clsPrefix:r,key:a.key}):Vc(o)?i(Hc,{clsPrefix:r,tmNode:a,parentKey:e,key:a.key}):i(al,{clsPrefix:r,tmNode:a,parentKey:e,key:a.key,props:o.props,scrollable:t})});return i("div",{class:[`${r}-dropdown-menu`,t&&`${r}-dropdown-menu--scrollable`],ref:"bodyRef"},t?i(ls,{contentClass:`${r}-dropdown-menu__content`},{default:()=>n}):n,this.showArrow?fs({clsPrefix:r,arrowStyle:this.arrowStyle,arrowClass:void 0,arrowWrapperClass:void 0,arrowWrapperStyle:void 0}):null)}}),jc=M("dropdown-menu",` transform-origin: var(--v-transform-origin); background-color: var(--n-color); border-radius: var(--n-border-radius); @@ -739,7 +739,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config transition: background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier); -`,[or(),O("dropdown-option",` +`,[or(),M("dropdown-option",` position: relative; `,[W("a",` text-decoration: none; @@ -752,7 +752,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config right: 0; top: 0; bottom: 0; - `)]),O("dropdown-option-body",` + `)]),M("dropdown-option-body",` display: flex; cursor: pointer; position: relative; @@ -802,7 +802,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config z-index: 1; `,[K("show-icon",` width: var(--n-option-icon-prefix-width); - `),O("icon",` + `),M("icon",` font-size: var(--n-option-icon-size); `)]),le("label",` white-space: nowrap; @@ -822,31 +822,31 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config z-index: 1; `,[K("has-submenu",` width: var(--n-option-icon-suffix-width); - `),O("icon",` + `),M("icon",` font-size: var(--n-option-icon-size); - `)]),O("dropdown-menu","pointer-events: all;")]),O("dropdown-offset-container",` + `)]),M("dropdown-menu","pointer-events: all;")]),M("dropdown-offset-container",` pointer-events: none; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; - `)]),O("dropdown-divider",` + `)]),M("dropdown-divider",` transition: background-color .3s var(--n-bezier); background-color: var(--n-divider-color); height: 1px; margin: 4px 0; - `),O("dropdown-menu-wrapper",` + `),M("dropdown-menu-wrapper",` transform-origin: var(--v-transform-origin); width: fit-content; - `),W(">",[O("scrollbar",` + `),W(">",[M("scrollbar",` height: inherit; max-height: inherit; `)]),Ft("scrollable",` padding: var(--n-padding); `),K("scrollable",[le("content",` padding: var(--n-padding); - `)])]),Yc={animated:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},size:{type:String,default:"medium"},inverted:Boolean,placement:{type:String,default:"bottom"},onSelect:[Function,Array],options:{type:Array,default:()=>[]},menuProps:Function,showArrow:Boolean,renderLabel:Function,renderIcon:Function,renderOption:Function,nodeProps:Function,labelField:{type:String,default:"label"},keyField:{type:String,default:"key"},childrenField:{type:String,default:"children"},value:[String,Number]},Kc=Object.keys(fr),Wc=Object.assign(Object.assign(Object.assign({},fr),Yc),Ye.props),qc=ge({name:"Dropdown",inheritAttrs:!1,props:Wc,setup(e){const r=F(!1),t=zt(me(e,"show"),r),n=b(()=>{const{keyField:D,childrenField:C}=e;return Kr(e.options,{getKey(B){return B[D]},getDisabled(B){return B.disabled===!0},getIgnored(B){return B.type==="divider"||B.type==="render"},getChildren(B){return B[C]}})}),a=b(()=>n.value.treeNodes),o=F(null),l=F(null),s=F(null),d=b(()=>{var D,C,B;return(B=(C=(D=o.value)!==null&&D!==void 0?D:l.value)!==null&&C!==void 0?C:s.value)!==null&&B!==void 0?B:null}),u=b(()=>n.value.getPath(d.value).keyPath),c=b(()=>n.value.getPath(e.value).keyPath),f=at(()=>e.keyboard&&t.value);Ua({keydown:{ArrowUp:{prevent:!0,handler:P},ArrowRight:{prevent:!0,handler:x},ArrowDown:{prevent:!0,handler:$},ArrowLeft:{prevent:!0,handler:k},Enter:{prevent:!0,handler:T},Escape:g}},f);const{mergedClsPrefixRef:v,inlineThemeDisabled:m}=xt(e),p=Ye("Dropdown","-dropdown",jc,Nl,e,v);At(Wr,{labelFieldRef:me(e,"labelField"),childrenFieldRef:me(e,"childrenField"),renderLabelRef:me(e,"renderLabel"),renderIconRef:me(e,"renderIcon"),hoverKeyRef:o,keyboardKeyRef:l,lastToggledSubmenuKeyRef:s,pendingKeyPathRef:u,activeKeyPathRef:c,animatedRef:me(e,"animated"),mergedShowRef:t,nodePropsRef:me(e,"nodeProps"),renderOptionRef:me(e,"renderOption"),menuPropsRef:me(e,"menuProps"),doSelect:y,doUpdateShow:h}),gt(t,D=>{!e.animated&&!D&&w()});function y(D,C){const{onSelect:B}=e;B&&oe(B,D,C)}function h(D){const{"onUpdate:show":C,onUpdateShow:B}=e;C&&oe(C,D),B&&oe(B,D),r.value=D}function w(){o.value=null,l.value=null,s.value=null}function g(){h(!1)}function k(){z("left")}function x(){z("right")}function P(){z("up")}function $(){z("down")}function T(){const D=Y();D!=null&&D.isLeaf&&t.value&&(y(D.key,D.rawNode),h(!1))}function Y(){var D;const{value:C}=n,{value:B}=d;return!C||B===null?null:(D=C.getNode(B))!==null&&D!==void 0?D:null}function z(D){const{value:C}=d,{value:{getFirstAvailableNode:B}}=n;let L=null;if(C===null){const Q=B();Q!==null&&(L=Q.key)}else{const Q=Y();if(Q){let q;switch(D){case"down":q=Q.getNext();break;case"up":q=Q.getPrev();break;case"right":q=Q.getChild();break;case"left":q=Q.getParent();break}q&&(L=q.key)}}L!==null&&(o.value=null,l.value=L)}const N=b(()=>{const{size:D,inverted:C}=e,{common:{cubicBezierEaseInOut:B},self:L}=p.value,{padding:Q,dividerColor:q,borderRadius:ee,optionOpacityDisabled:ue,[Ve("optionIconSuffixWidth",D)]:te,[Ve("optionSuffixWidth",D)]:V,[Ve("optionIconPrefixWidth",D)]:_,[Ve("optionPrefixWidth",D)]:E,[Ve("fontSize",D)]:U,[Ve("optionHeight",D)]:ne,[Ve("optionIconSize",D)]:De}=L,he={"--n-bezier":B,"--n-font-size":U,"--n-padding":Q,"--n-border-radius":ee,"--n-option-height":ne,"--n-option-prefix-width":E,"--n-option-icon-prefix-width":_,"--n-option-suffix-width":V,"--n-option-icon-suffix-width":te,"--n-option-icon-size":De,"--n-divider-color":q,"--n-option-opacity-disabled":ue};return C?(he["--n-color"]=L.colorInverted,he["--n-option-color-hover"]=L.optionColorHoverInverted,he["--n-option-color-active"]=L.optionColorActiveInverted,he["--n-option-text-color"]=L.optionTextColorInverted,he["--n-option-text-color-hover"]=L.optionTextColorHoverInverted,he["--n-option-text-color-active"]=L.optionTextColorActiveInverted,he["--n-option-text-color-child-active"]=L.optionTextColorChildActiveInverted,he["--n-prefix-color"]=L.prefixColorInverted,he["--n-suffix-color"]=L.suffixColorInverted,he["--n-group-header-text-color"]=L.groupHeaderTextColorInverted):(he["--n-color"]=L.color,he["--n-option-color-hover"]=L.optionColorHover,he["--n-option-color-active"]=L.optionColorActive,he["--n-option-text-color"]=L.optionTextColor,he["--n-option-text-color-hover"]=L.optionTextColorHover,he["--n-option-text-color-active"]=L.optionTextColorActive,he["--n-option-text-color-child-active"]=L.optionTextColorChildActive,he["--n-prefix-color"]=L.prefixColor,he["--n-suffix-color"]=L.suffixColor,he["--n-group-header-text-color"]=L.groupHeaderTextColor),he}),J=m?Mt("dropdown",b(()=>`${e.size[0]}${e.inverted?"i":""}`),N,e):void 0;return{mergedClsPrefix:v,mergedTheme:p,tmNodes:a,mergedShow:t,handleAfterLeave:()=>{e.animated&&w()},doUpdateShow:h,cssVars:m?void 0:N,themeClass:J==null?void 0:J.themeClass,onRender:J==null?void 0:J.onRender}},render(){const e=(n,a,o,l,s)=>{var d;const{mergedClsPrefix:u,menuProps:c}=this;(d=this.onRender)===null||d===void 0||d.call(this);const f=(c==null?void 0:c(void 0,this.tmNodes.map(m=>m.rawNode)))||{},v={ref:wi(a),class:[n,`${u}-dropdown`,this.themeClass],clsPrefix:u,tmNodes:this.tmNodes,style:[...o,this.cssVars],showArrow:this.showArrow,arrowStyle:this.arrowStyle,scrollable:this.scrollable,onMouseenter:l,onMouseleave:s};return i(ol,Un(this.$attrs,v,f))},{mergedTheme:r}=this,t={show:this.mergedShow,theme:r.peers.Popover,themeOverrides:r.peerOverrides.Popover,internalOnAfterLeave:this.handleAfterLeave,internalRenderBody:e,onUpdateShow:this.doUpdateShow,"onUpdate:show":void 0};return i(yr,Object.assign({},vi(this.$props,Kc),t),{trigger:()=>{var n,a;return(a=(n=this.$slots).default)===null||a===void 0?void 0:a.call(n)}})}}),il="_n_all__",ll="_n_none__";function Gc(e,r,t,n){return e?a=>{for(const o of e)switch(a){case il:t(!0);return;case ll:n(!0);return;default:if(typeof o=="object"&&o.key===a){o.onSelect(r.value);return}}}:()=>{}}function Xc(e,r){return e?e.map(t=>{switch(t){case"all":return{label:r.checkTableAll,key:il};case"none":return{label:r.uncheckTableAll,key:ll};default:return t}}):[]}const Qc=ge({name:"DataTableSelectionMenu",props:{clsPrefix:{type:String,required:!0}},setup(e){const{props:r,localeRef:t,checkOptionsRef:n,rawPaginatedDataRef:a,doCheckAll:o,doUncheckAll:l}=it(rn),s=b(()=>Gc(n.value,a,o,l)),d=b(()=>Xc(n.value,t.value));return()=>{var u,c,f,v;const{clsPrefix:m}=e;return i(qc,{theme:(c=(u=r.theme)===null||u===void 0?void 0:u.peers)===null||c===void 0?void 0:c.Dropdown,themeOverrides:(v=(f=r.themeOverrides)===null||f===void 0?void 0:f.peers)===null||v===void 0?void 0:v.Dropdown,options:d.value,onSelect:s.value},{default:()=>i(Pt,{clsPrefix:m,class:`${m}-data-table-check-extra`},{default:()=>i(ss,null)})})}}});function fa(e){return typeof e.title=="function"?e.title(e):e.title}const Zc=ge({props:{clsPrefix:{type:String,required:!0},id:{type:String,required:!0},cols:{type:Array,required:!0},width:String},render(){const{clsPrefix:e,id:r,cols:t,width:n}=this;return i("table",{style:{tableLayout:"fixed",width:n},class:`${e}-data-table-table`},i("colgroup",null,t.map(a=>i("col",{key:a.key,style:a.style}))),i("thead",{"data-n-id":r,class:`${e}-data-table-thead`},this.$slots))}}),sl=ge({name:"DataTableHeader",props:{discrete:{type:Boolean,default:!0}},setup(){const{mergedClsPrefixRef:e,scrollXRef:r,fixedColumnLeftMapRef:t,fixedColumnRightMapRef:n,mergedCurrentPageRef:a,allRowsCheckedRef:o,someRowsCheckedRef:l,rowsRef:s,colsRef:d,mergedThemeRef:u,checkOptionsRef:c,mergedSortStateRef:f,componentId:v,mergedTableLayoutRef:m,headerCheckboxDisabledRef:p,virtualScrollHeaderRef:y,headerHeightRef:h,onUnstableColumnResize:w,doUpdateResizableWidth:g,handleTableHeaderScroll:k,deriveNextSorter:x,doUncheckAll:P,doCheckAll:$}=it(rn),T=F(),Y=F({});function z(L){const Q=Y.value[L];return Q==null?void 0:Q.getBoundingClientRect().width}function N(){o.value?P():$()}function J(L,Q){if(Lt(L,"dataTableFilter")||Lt(L,"dataTableResizable")||!ca(Q))return;const q=f.value.find(ue=>ue.columnKey===Q.key)||null,ee=fc(Q,q);x(ee)}const D=new Map;function C(L){D.set(L.key,z(L.key))}function B(L,Q){const q=D.get(L.key);if(q===void 0)return;const ee=q+Q,ue=dc(ee,L.minWidth,L.maxWidth);w(ee,ue,L,z),g(L,ue)}return{cellElsRef:Y,componentId:v,mergedSortState:f,mergedClsPrefix:e,scrollX:r,fixedColumnLeftMap:t,fixedColumnRightMap:n,currentPage:a,allRowsChecked:o,someRowsChecked:l,rows:s,cols:d,mergedTheme:u,checkOptions:c,mergedTableLayout:m,headerCheckboxDisabled:p,headerHeight:h,virtualScrollHeader:y,virtualListRef:T,handleCheckboxUpdateChecked:N,handleColHeaderClick:J,handleTableHeaderScroll:k,handleColumnResizeStart:C,handleColumnResize:B}},render(){const{cellElsRef:e,mergedClsPrefix:r,fixedColumnLeftMap:t,fixedColumnRightMap:n,currentPage:a,allRowsChecked:o,someRowsChecked:l,rows:s,cols:d,mergedTheme:u,checkOptions:c,componentId:f,discrete:v,mergedTableLayout:m,headerCheckboxDisabled:p,mergedSortState:y,virtualScrollHeader:h,handleColHeaderClick:w,handleCheckboxUpdateChecked:g,handleColumnResizeStart:k,handleColumnResize:x}=this,P=(z,N,J)=>z.map(({column:D,colIndex:C,colSpan:B,rowSpan:L,isLast:Q})=>{var q,ee;const ue=en(D),{ellipsis:te}=D,V=()=>D.type==="selection"?D.multiple!==!1?i(mn,null,i(Xa,{key:a,privateInsideTable:!0,checked:o,indeterminate:l,disabled:p,onUpdateChecked:g}),c?i(Qc,{clsPrefix:r}):null):null:i(mn,null,i("div",{class:`${r}-data-table-th__title-wrapper`},i("div",{class:`${r}-data-table-th__title`},te===!0||te&&!te.tooltip?i("div",{class:`${r}-data-table-th__ellipsis`},fa(D)):te&&typeof te=="object"?i(Za,Object.assign({},te,{theme:u.peers.Ellipsis,themeOverrides:u.peerOverrides.Ellipsis}),{default:()=>fa(D)}):fa(D)),ca(D)?i($c,{column:D}):null),Mo(D)?i(Mc,{column:D,options:D.filterOptions}):null,Xi(D)?i(zc,{onResizeStart:()=>{k(D)},onResize:ne=>{x(D,ne)}}):null),_=ue in t,E=ue in n,U=N&&!D.fixed?"div":"th";return i(U,{ref:ne=>e[ue]=ne,key:ue,style:[N&&!D.fixed?{position:"absolute",left:Dt(N(C)),top:0,bottom:0}:{left:Dt((q=t[ue])===null||q===void 0?void 0:q.start),right:Dt((ee=n[ue])===null||ee===void 0?void 0:ee.start)},{width:Dt(D.width),textAlign:D.titleAlign||D.align,height:J}],colspan:B,rowspan:L,"data-col-key":ue,class:[`${r}-data-table-th`,(_||E)&&`${r}-data-table-th--fixed-${_?"left":"right"}`,{[`${r}-data-table-th--sorting`]:Qi(D,y),[`${r}-data-table-th--filterable`]:Mo(D),[`${r}-data-table-th--sortable`]:ca(D),[`${r}-data-table-th--selection`]:D.type==="selection",[`${r}-data-table-th--last`]:Q},D.className],onClick:D.type!=="selection"&&D.type!=="expand"&&!("children"in D)?ne=>{w(ne,D)}:void 0},V())});if(h){const{headerHeight:z}=this;let N=0,J=0;return d.forEach(D=>{D.column.fixed==="left"?N++:D.column.fixed==="right"&&J++}),i(tr,{ref:"virtualListRef",class:`${r}-data-table-base-table-header`,style:{height:Dt(z)},onScroll:this.handleTableHeaderScroll,columns:d,itemSize:z,showScrollbar:!1,items:[{}],itemResizable:!1,visibleItemsTag:Zc,visibleItemsProps:{clsPrefix:r,id:f,cols:d,width:jt(this.scrollX)},renderItemWithCols:({startColIndex:D,endColIndex:C,getLeft:B})=>{const L=d.map((q,ee)=>({column:q.column,isLast:ee===d.length-1,colIndex:q.index,colSpan:1,rowSpan:1})).filter(({column:q},ee)=>!!(D<=ee&&ee<=C||q.fixed)),Q=P(L,B,Dt(z));return Q.splice(N,0,i("th",{colspan:d.length-N-J,style:{pointerEvents:"none",visibility:"hidden",height:0}})),i("tr",{style:{position:"relative"}},Q)}},{default:({renderedItemWithCols:D})=>D})}const $=i("thead",{class:`${r}-data-table-thead`,"data-n-id":f},s.map(z=>i("tr",{class:`${r}-data-table-tr`},P(z,null,void 0))));if(!v)return $;const{handleTableHeaderScroll:T,scrollX:Y}=this;return i("div",{class:`${r}-data-table-base-table-header`,onScroll:T},i("table",{class:`${r}-data-table-table`,style:{minWidth:jt(Y),tableLayout:m}},i("colgroup",null,d.map(z=>i("col",{key:z.key,style:z.style}))),$))}});function Jc(e,r){const t=[];function n(a,o){a.forEach(l=>{l.children&&r.has(l.key)?(t.push({tmNode:l,striped:!1,key:l.key,index:o}),n(l.children,o)):t.push({key:l.key,tmNode:l,striped:!1,index:o})})}return e.forEach(a=>{t.push(a);const{children:o}=a.tmNode;o&&r.has(a.key)&&n(o,a.index)}),t}const ef=ge({props:{clsPrefix:{type:String,required:!0},id:{type:String,required:!0},cols:{type:Array,required:!0},onMouseenter:Function,onMouseleave:Function},render(){const{clsPrefix:e,id:r,cols:t,onMouseenter:n,onMouseleave:a}=this;return i("table",{style:{tableLayout:"fixed"},class:`${e}-data-table-table`,onMouseenter:n,onMouseleave:a},i("colgroup",null,t.map(o=>i("col",{key:o.key,style:o.style}))),i("tbody",{"data-n-id":r,class:`${e}-data-table-tbody`},this.$slots))}}),tf=ge({name:"DataTableBody",props:{onResize:Function,showHeader:Boolean,flexHeight:Boolean,bodyStyle:Object},setup(e){const{slots:r,bodyWidthRef:t,mergedExpandedRowKeysRef:n,mergedClsPrefixRef:a,mergedThemeRef:o,scrollXRef:l,colsRef:s,paginatedDataRef:d,rawPaginatedDataRef:u,fixedColumnLeftMapRef:c,fixedColumnRightMapRef:f,mergedCurrentPageRef:v,rowClassNameRef:m,leftActiveFixedColKeyRef:p,leftActiveFixedChildrenColKeysRef:y,rightActiveFixedColKeyRef:h,rightActiveFixedChildrenColKeysRef:w,renderExpandRef:g,hoverKeyRef:k,summaryRef:x,mergedSortStateRef:P,virtualScrollRef:$,virtualScrollXRef:T,heightForRowRef:Y,minRowHeightRef:z,componentId:N,mergedTableLayoutRef:J,childTriggerColIndexRef:D,indentRef:C,rowPropsRef:B,maxHeightRef:L,stripedRef:Q,loadingRef:q,onLoadRef:ee,loadingKeySetRef:ue,expandableRef:te,stickyExpandedRowsRef:V,renderExpandIconRef:_,summaryPlacementRef:E,treeMateRef:U,scrollbarPropsRef:ne,setHeaderScrollLeft:De,doUpdateExpandedRowKeys:he,handleTableBodyScroll:Te,doCheck:j,doUncheck:be,renderCell:Se}=it(rn),$e=it(Bl),Ke=F(null),lt=F(null),ht=F(null),Qe=at(()=>d.value.length===0),X=at(()=>e.showHeader||!Qe.value),we=at(()=>e.showHeader||Qe.value);let re="";const Re=b(()=>new Set(n.value));function Ee(ve){var Fe;return(Fe=U.value.getNode(ve))===null||Fe===void 0?void 0:Fe.rawNode}function ze(ve,Fe,R){const H=Ee(ve.key);if(!H){ur("data-table",`fail to get row data with key ${ve.key}`);return}if(R){const fe=d.value.findIndex(ke=>ke.key===re);if(fe!==-1){const ke=d.value.findIndex(ye=>ye.key===ve.key),xe=Math.min(fe,ke),S=Math.max(fe,ke),G=[];d.value.slice(xe,S+1).forEach(ye=>{ye.disabled||G.push(ye.key)}),Fe?j(G,!1,H):be(G,H),re=ve.key;return}}Fe?j(ve.key,!1,H):be(ve.key,H),re=ve.key}function Le(ve){const Fe=Ee(ve.key);if(!Fe){ur("data-table",`fail to get row data with key ${ve.key}`);return}j(ve.key,!0,Fe)}function Z(){if(!X.value){const{value:Fe}=ht;return Fe||null}if($.value)return A();const{value:ve}=Ke;return ve?ve.containerRef:null}function se(ve,Fe){var R;if(ue.value.has(ve))return;const{value:H}=n,fe=H.indexOf(ve),ke=Array.from(H);~fe?(ke.splice(fe,1),he(ke)):Fe&&!Fe.isLeaf&&!Fe.shallowLoaded?(ue.value.add(ve),(R=ee.value)===null||R===void 0||R.call(ee,Fe.rawNode).then(()=>{const{value:xe}=n,S=Array.from(xe);~S.indexOf(ve)||S.push(ve),he(S)}).finally(()=>{ue.value.delete(ve)})):(ke.push(ve),he(ke))}function Oe(){k.value=null}function A(){const{value:ve}=lt;return(ve==null?void 0:ve.listElRef)||null}function _e(){const{value:ve}=lt;return(ve==null?void 0:ve.itemsElRef)||null}function He(ve){var Fe;Te(ve),(Fe=Ke.value)===null||Fe===void 0||Fe.sync()}function vt(ve){var Fe;const{onResize:R}=e;R&&R(ve),(Fe=Ke.value)===null||Fe===void 0||Fe.sync()}const et={getScrollContainer:Z,scrollTo(ve,Fe){var R,H;$.value?(R=lt.value)===null||R===void 0||R.scrollTo(ve,Fe):(H=Ke.value)===null||H===void 0||H.scrollTo(ve,Fe)}},We=W([({props:ve})=>{const Fe=H=>H===null?null:W(`[data-n-id="${ve.componentId}"] [data-col-key="${H}"]::after`,{boxShadow:"var(--n-box-shadow-after)"}),R=H=>H===null?null:W(`[data-n-id="${ve.componentId}"] [data-col-key="${H}"]::before`,{boxShadow:"var(--n-box-shadow-before)"});return W([Fe(ve.leftActiveFixedColKey),R(ve.rightActiveFixedColKey),ve.leftActiveFixedChildrenColKeys.map(H=>Fe(H)),ve.rightActiveFixedChildrenColKeys.map(H=>R(H))])}]);let Ue=!1;return Ln(()=>{const{value:ve}=p,{value:Fe}=y,{value:R}=h,{value:H}=w;if(!Ue&&ve===null&&R===null)return;const fe={leftActiveFixedColKey:ve,leftActiveFixedChildrenColKeys:Fe,rightActiveFixedColKey:R,rightActiveFixedChildrenColKeys:H,componentId:N};We.mount({id:`n-${N}`,force:!0,props:fe,anchorMetaName:El,parent:$e==null?void 0:$e.styleMountTarget}),Ue=!0}),di(()=>{We.unmount({id:`n-${N}`,parent:$e==null?void 0:$e.styleMountTarget})}),Object.assign({bodyWidth:t,summaryPlacement:E,dataTableSlots:r,componentId:N,scrollbarInstRef:Ke,virtualListRef:lt,emptyElRef:ht,summary:x,mergedClsPrefix:a,mergedTheme:o,scrollX:l,cols:s,loading:q,bodyShowHeaderOnly:we,shouldDisplaySomeTablePart:X,empty:Qe,paginatedDataAndInfo:b(()=>{const{value:ve}=Q;let Fe=!1;return{data:d.value.map(ve?(H,fe)=>(H.isLeaf||(Fe=!0),{tmNode:H,key:H.key,striped:fe%2===1,index:fe}):(H,fe)=>(H.isLeaf||(Fe=!0),{tmNode:H,key:H.key,striped:!1,index:fe})),hasChildren:Fe}}),rawPaginatedData:u,fixedColumnLeftMap:c,fixedColumnRightMap:f,currentPage:v,rowClassName:m,renderExpand:g,mergedExpandedRowKeySet:Re,hoverKey:k,mergedSortState:P,virtualScroll:$,virtualScrollX:T,heightForRow:Y,minRowHeight:z,mergedTableLayout:J,childTriggerColIndex:D,indent:C,rowProps:B,maxHeight:L,loadingKeySet:ue,expandable:te,stickyExpandedRows:V,renderExpandIcon:_,scrollbarProps:ne,setHeaderScrollLeft:De,handleVirtualListScroll:He,handleVirtualListResize:vt,handleMouseleaveTable:Oe,virtualListContainer:A,virtualListContent:_e,handleTableBodyScroll:Te,handleCheckboxUpdateChecked:ze,handleRadioUpdateChecked:Le,handleUpdateExpanded:se,renderCell:Se},et)},render(){const{mergedTheme:e,scrollX:r,mergedClsPrefix:t,virtualScroll:n,maxHeight:a,mergedTableLayout:o,flexHeight:l,loadingKeySet:s,onResize:d,setHeaderScrollLeft:u}=this,c=r!==void 0||a!==void 0||l,f=!c&&o==="auto",v=r!==void 0||f,m={minWidth:jt(r)||"100%"};r&&(m.width="100%");const p=i(Ut,Object.assign({},this.scrollbarProps,{ref:"scrollbarInstRef",scrollable:c||f,class:`${t}-data-table-base-table-body`,style:this.empty?void 0:this.bodyStyle,theme:e.peers.Scrollbar,themeOverrides:e.peerOverrides.Scrollbar,contentStyle:m,container:n?this.virtualListContainer:void 0,content:n?this.virtualListContent:void 0,horizontalRailStyle:{zIndex:3},verticalRailStyle:{zIndex:3},xScrollable:v,onScroll:n?void 0:this.handleTableBodyScroll,internalOnUpdateScrollLeft:u,onResize:d}),{default:()=>{const y={},h={},{cols:w,paginatedDataAndInfo:g,mergedTheme:k,fixedColumnLeftMap:x,fixedColumnRightMap:P,currentPage:$,rowClassName:T,mergedSortState:Y,mergedExpandedRowKeySet:z,stickyExpandedRows:N,componentId:J,childTriggerColIndex:D,expandable:C,rowProps:B,handleMouseleaveTable:L,renderExpand:Q,summary:q,handleCheckboxUpdateChecked:ee,handleRadioUpdateChecked:ue,handleUpdateExpanded:te,heightForRow:V,minRowHeight:_,virtualScrollX:E}=this,{length:U}=w;let ne;const{data:De,hasChildren:he}=g,Te=he?Jc(De,z):De;if(q){const re=q(this.rawPaginatedData);if(Array.isArray(re)){const Re=re.map((Ee,ze)=>({isSummaryRow:!0,key:`__n_summary__${ze}`,tmNode:{rawNode:Ee,disabled:!0},index:-1}));ne=this.summaryPlacement==="top"?[...Re,...Te]:[...Te,...Re]}else{const Re={isSummaryRow:!0,key:"__n_summary__",tmNode:{rawNode:re,disabled:!0},index:-1};ne=this.summaryPlacement==="top"?[Re,...Te]:[...Te,Re]}}else ne=Te;const j=he?{width:Dt(this.indent)}:void 0,be=[];ne.forEach(re=>{Q&&z.has(re.key)&&(!C||C(re.tmNode.rawNode))?be.push(re,{isExpandedRow:!0,key:`${re.key}-expand`,tmNode:re.tmNode,index:re.index}):be.push(re)});const{length:Se}=be,$e={};De.forEach(({tmNode:re},Re)=>{$e[Re]=re.key});const Ke=N?this.bodyWidth:null,lt=Ke===null?void 0:`${Ke}px`,ht=this.virtualScrollX?"div":"td";let Qe=0,X=0;E&&w.forEach(re=>{re.column.fixed==="left"?Qe++:re.column.fixed==="right"&&X++});const we=({rowInfo:re,displayedRowIndex:Re,isVirtual:Ee,isVirtualX:ze,startColIndex:Le,endColIndex:Z,getLeft:se})=>{const{index:Oe}=re;if("isExpandedRow"in re){const{tmNode:{key:ke,rawNode:xe}}=re;return i("tr",{class:`${t}-data-table-tr ${t}-data-table-tr--expanded`,key:`${ke}__expand`},i("td",{class:[`${t}-data-table-td`,`${t}-data-table-td--last-col`,Re+1===Se&&`${t}-data-table-td--last-row`],colspan:U},N?i("div",{class:`${t}-data-table-expand`,style:{width:lt}},Q(xe,Oe)):Q(xe,Oe)))}const A="isSummaryRow"in re,_e=!A&&re.striped,{tmNode:He,key:vt}=re,{rawNode:et}=He,We=z.has(vt),Ue=B?B(et,Oe):void 0,ve=typeof T=="string"?T:cc(et,Oe,T),Fe=ze?w.filter((ke,xe)=>!!(Le<=xe&&xe<=Z||ke.column.fixed)):w,R=ze?Dt((V==null?void 0:V(et,Oe))||_):void 0,H=Fe.map(ke=>{var xe,S,G,ye,Me;const Ze=ke.index;if(Re in y){const bt=y[Re],St=bt.indexOf(Ze);if(~St)return bt.splice(St,1),null}const{column:Ne}=ke,I=en(ke),{rowSpan:ae,colSpan:pe}=Ne,Ie=A?((xe=re.tmNode.rawNode[I])===null||xe===void 0?void 0:xe.colSpan)||1:pe?pe(et,Oe):1,Je=A?((S=re.tmNode.rawNode[I])===null||S===void 0?void 0:S.rowSpan)||1:ae?ae(et,Oe):1,Ge=Ze+Ie===U,rt=Re+Je===Se,Nt=Je>1;if(Nt&&(h[Re]={[Ze]:[]}),Ie>1||Nt)for(let bt=Re;bt{te(vt,re.tmNode)}})]:null,Ne.type==="selection"?A?null:Ne.multiple===!1?i(Rc,{key:$,rowKey:vt,disabled:re.tmNode.disabled,onUpdateChecked:()=>{ue(re.tmNode)}}):i(mc,{key:$,rowKey:vt,disabled:re.tmNode.disabled,onUpdateChecked:(bt,St)=>{ee(re.tmNode,bt,St.shiftKey)}}):Ne.type==="expand"?A?null:!Ne.expandable||!((Me=Ne.expandable)===null||Me===void 0)&&Me.call(Ne,et)?i(Io,{clsPrefix:t,rowData:et,expanded:We,renderExpandIcon:this.renderExpandIcon,onClick:()=>{te(vt,null)}}):null:i(Tc,{clsPrefix:t,index:Oe,row:et,column:Ne,isSummary:A,mergedTheme:k,renderCell:this.renderCell}))});return ze&&Qe&&X&&H.splice(Qe,0,i("td",{colspan:w.length-Qe-X,style:{pointerEvents:"none",visibility:"hidden",height:0}})),i("tr",Object.assign({},Ue,{onMouseenter:ke=>{var xe;this.hoverKey=vt,(xe=Ue==null?void 0:Ue.onMouseenter)===null||xe===void 0||xe.call(Ue,ke)},key:vt,class:[`${t}-data-table-tr`,A&&`${t}-data-table-tr--summary`,_e&&`${t}-data-table-tr--striped`,We&&`${t}-data-table-tr--expanded`,ve,Ue==null?void 0:Ue.class],style:[Ue==null?void 0:Ue.style,ze&&{height:R}]}),H)};return n?i(tr,{ref:"virtualListRef",items:be,itemSize:this.minRowHeight,visibleItemsTag:ef,visibleItemsProps:{clsPrefix:t,id:J,cols:w,onMouseleave:L},showScrollbar:!1,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemsStyle:m,itemResizable:!E,columns:w,renderItemWithCols:E?({itemIndex:re,item:Re,startColIndex:Ee,endColIndex:ze,getLeft:Le})=>we({displayedRowIndex:re,isVirtual:!0,isVirtualX:!0,rowInfo:Re,startColIndex:Ee,endColIndex:ze,getLeft:Le}):void 0},{default:({item:re,index:Re,renderedItemWithCols:Ee})=>Ee||we({rowInfo:re,displayedRowIndex:Re,isVirtual:!0,isVirtualX:!1,startColIndex:0,endColIndex:0,getLeft(ze){return 0}})}):i("table",{class:`${t}-data-table-table`,onMouseleave:L,style:{tableLayout:this.mergedTableLayout}},i("colgroup",null,w.map(re=>i("col",{key:re.key,style:re.style}))),this.showHeader?i(sl,{discrete:!1}):null,this.empty?null:i("tbody",{"data-n-id":J,class:`${t}-data-table-tbody`},be.map((re,Re)=>we({rowInfo:re,displayedRowIndex:Re,isVirtual:!1,isVirtualX:!1,startColIndex:-1,endColIndex:-1,getLeft(Ee){return-1}}))))}});if(this.empty){const y=()=>i("div",{class:[`${t}-data-table-empty`,this.loading&&`${t}-data-table-empty--hide`],style:this.bodyStyle,ref:"emptyElRef"},qe(this.dataTableSlots.empty,()=>[i(Ri,{theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})]));return this.shouldDisplaySomeTablePart?i(mn,null,p,y()):i(Ca,{onResize:this.onResize},{default:y})}return p}}),nf=ge({name:"MainTable",setup(){const{mergedClsPrefixRef:e,rightFixedColumnsRef:r,leftFixedColumnsRef:t,bodyWidthRef:n,maxHeightRef:a,minHeightRef:o,flexHeightRef:l,virtualScrollHeaderRef:s,syncScrollState:d}=it(rn),u=F(null),c=F(null),f=F(null),v=F(!(t.value.length||r.value.length)),m=b(()=>({maxHeight:jt(a.value),minHeight:jt(o.value)}));function p(g){n.value=g.contentRect.width,d(),v.value||(v.value=!0)}function y(){var g;const{value:k}=u;return k?s.value?((g=k.virtualListRef)===null||g===void 0?void 0:g.listElRef)||null:k.$el:null}function h(){const{value:g}=c;return g?g.getScrollContainer():null}const w={getBodyElement:h,getHeaderElement:y,scrollTo(g,k){var x;(x=c.value)===null||x===void 0||x.scrollTo(g,k)}};return Ln(()=>{const{value:g}=f;if(!g)return;const k=`${e.value}-data-table-base-table--transition-disabled`;v.value?setTimeout(()=>{g.classList.remove(k)},0):g.classList.add(k)}),Object.assign({maxHeight:a,mergedClsPrefix:e,selfElRef:f,headerInstRef:u,bodyInstRef:c,bodyStyle:m,flexHeight:l,handleBodyResize:p},w)},render(){const{mergedClsPrefix:e,maxHeight:r,flexHeight:t}=this,n=r===void 0&&!t;return i("div",{class:`${e}-data-table-base-table`,ref:"selfElRef"},n?null:i(sl,{ref:"headerInstRef"}),i(tf,{ref:"bodyInstRef",bodyStyle:this.bodyStyle,showHeader:n,flexHeight:t,onResize:this.handleBodyResize}))}}),Ao=af(),rf=W([O("data-table",` + `)])]),Yc={animated:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},size:{type:String,default:"medium"},inverted:Boolean,placement:{type:String,default:"bottom"},onSelect:[Function,Array],options:{type:Array,default:()=>[]},menuProps:Function,showArrow:Boolean,renderLabel:Function,renderIcon:Function,renderOption:Function,nodeProps:Function,labelField:{type:String,default:"label"},keyField:{type:String,default:"key"},childrenField:{type:String,default:"children"},value:[String,Number]},Kc=Object.keys(fr),Wc=Object.assign(Object.assign(Object.assign({},fr),Yc),Ye.props),qc=ge({name:"Dropdown",inheritAttrs:!1,props:Wc,setup(e){const r=F(!1),t=zt(me(e,"show"),r),n=g(()=>{const{keyField:O,childrenField:C}=e;return Kr(e.options,{getKey(B){return B[O]},getDisabled(B){return B.disabled===!0},getIgnored(B){return B.type==="divider"||B.type==="render"},getChildren(B){return B[C]}})}),a=g(()=>n.value.treeNodes),o=F(null),l=F(null),s=F(null),d=g(()=>{var O,C,B;return(B=(C=(O=o.value)!==null&&O!==void 0?O:l.value)!==null&&C!==void 0?C:s.value)!==null&&B!==void 0?B:null}),u=g(()=>n.value.getPath(d.value).keyPath),c=g(()=>n.value.getPath(e.value).keyPath),f=at(()=>e.keyboard&&t.value);Ua({keydown:{ArrowUp:{prevent:!0,handler:R},ArrowRight:{prevent:!0,handler:b},ArrowDown:{prevent:!0,handler:D},ArrowLeft:{prevent:!0,handler:k},Enter:{prevent:!0,handler:T},Escape:w}},f);const{mergedClsPrefixRef:v,inlineThemeDisabled:m}=xt(e),p=Ye("Dropdown","-dropdown",jc,Nl,e,v);At(Wr,{labelFieldRef:me(e,"labelField"),childrenFieldRef:me(e,"childrenField"),renderLabelRef:me(e,"renderLabel"),renderIconRef:me(e,"renderIcon"),hoverKeyRef:o,keyboardKeyRef:l,lastToggledSubmenuKeyRef:s,pendingKeyPathRef:u,activeKeyPathRef:c,animatedRef:me(e,"animated"),mergedShowRef:t,nodePropsRef:me(e,"nodeProps"),renderOptionRef:me(e,"renderOption"),menuPropsRef:me(e,"menuProps"),doSelect:y,doUpdateShow:h}),bt(t,O=>{!e.animated&&!O&&x()});function y(O,C){const{onSelect:B}=e;B&&ie(B,O,C)}function h(O){const{"onUpdate:show":C,onUpdateShow:B}=e;C&&ie(C,O),B&&ie(B,O),r.value=O}function x(){o.value=null,l.value=null,s.value=null}function w(){h(!1)}function k(){I("left")}function b(){I("right")}function R(){I("up")}function D(){I("down")}function T(){const O=Y();O!=null&&O.isLeaf&&t.value&&(y(O.key,O.rawNode),h(!1))}function Y(){var O;const{value:C}=n,{value:B}=d;return!C||B===null?null:(O=C.getNode(B))!==null&&O!==void 0?O:null}function I(O){const{value:C}=d,{value:{getFirstAvailableNode:B}}=n;let L=null;if(C===null){const Q=B();Q!==null&&(L=Q.key)}else{const Q=Y();if(Q){let q;switch(O){case"down":q=Q.getNext();break;case"up":q=Q.getPrev();break;case"right":q=Q.getChild();break;case"left":q=Q.getParent();break}q&&(L=q.key)}}L!==null&&(o.value=null,l.value=L)}const N=g(()=>{const{size:O,inverted:C}=e,{common:{cubicBezierEaseInOut:B},self:L}=p.value,{padding:Q,dividerColor:q,borderRadius:ee,optionOpacityDisabled:ue,[Ve("optionIconSuffixWidth",O)]:te,[Ve("optionSuffixWidth",O)]:V,[Ve("optionIconPrefixWidth",O)]:_,[Ve("optionPrefixWidth",O)]:E,[Ve("fontSize",O)]:U,[Ve("optionHeight",O)]:ne,[Ve("optionIconSize",O)]:Oe}=L,he={"--n-bezier":B,"--n-font-size":U,"--n-padding":Q,"--n-border-radius":ee,"--n-option-height":ne,"--n-option-prefix-width":E,"--n-option-icon-prefix-width":_,"--n-option-suffix-width":V,"--n-option-icon-suffix-width":te,"--n-option-icon-size":Oe,"--n-divider-color":q,"--n-option-opacity-disabled":ue};return C?(he["--n-color"]=L.colorInverted,he["--n-option-color-hover"]=L.optionColorHoverInverted,he["--n-option-color-active"]=L.optionColorActiveInverted,he["--n-option-text-color"]=L.optionTextColorInverted,he["--n-option-text-color-hover"]=L.optionTextColorHoverInverted,he["--n-option-text-color-active"]=L.optionTextColorActiveInverted,he["--n-option-text-color-child-active"]=L.optionTextColorChildActiveInverted,he["--n-prefix-color"]=L.prefixColorInverted,he["--n-suffix-color"]=L.suffixColorInverted,he["--n-group-header-text-color"]=L.groupHeaderTextColorInverted):(he["--n-color"]=L.color,he["--n-option-color-hover"]=L.optionColorHover,he["--n-option-color-active"]=L.optionColorActive,he["--n-option-text-color"]=L.optionTextColor,he["--n-option-text-color-hover"]=L.optionTextColorHover,he["--n-option-text-color-active"]=L.optionTextColorActive,he["--n-option-text-color-child-active"]=L.optionTextColorChildActive,he["--n-prefix-color"]=L.prefixColor,he["--n-suffix-color"]=L.suffixColor,he["--n-group-header-text-color"]=L.groupHeaderTextColor),he}),J=m?Mt("dropdown",g(()=>`${e.size[0]}${e.inverted?"i":""}`),N,e):void 0;return{mergedClsPrefix:v,mergedTheme:p,tmNodes:a,mergedShow:t,handleAfterLeave:()=>{e.animated&&x()},doUpdateShow:h,cssVars:m?void 0:N,themeClass:J==null?void 0:J.themeClass,onRender:J==null?void 0:J.onRender}},render(){const e=(n,a,o,l,s)=>{var d;const{mergedClsPrefix:u,menuProps:c}=this;(d=this.onRender)===null||d===void 0||d.call(this);const f=(c==null?void 0:c(void 0,this.tmNodes.map(m=>m.rawNode)))||{},v={ref:wi(a),class:[n,`${u}-dropdown`,this.themeClass],clsPrefix:u,tmNodes:this.tmNodes,style:[...o,this.cssVars],showArrow:this.showArrow,arrowStyle:this.arrowStyle,scrollable:this.scrollable,onMouseenter:l,onMouseleave:s};return i(ol,Un(this.$attrs,v,f))},{mergedTheme:r}=this,t={show:this.mergedShow,theme:r.peers.Popover,themeOverrides:r.peerOverrides.Popover,internalOnAfterLeave:this.handleAfterLeave,internalRenderBody:e,onUpdateShow:this.doUpdateShow,"onUpdate:show":void 0};return i(yr,Object.assign({},vi(this.$props,Kc),t),{trigger:()=>{var n,a;return(a=(n=this.$slots).default)===null||a===void 0?void 0:a.call(n)}})}}),il="_n_all__",ll="_n_none__";function Gc(e,r,t,n){return e?a=>{for(const o of e)switch(a){case il:t(!0);return;case ll:n(!0);return;default:if(typeof o=="object"&&o.key===a){o.onSelect(r.value);return}}}:()=>{}}function Xc(e,r){return e?e.map(t=>{switch(t){case"all":return{label:r.checkTableAll,key:il};case"none":return{label:r.uncheckTableAll,key:ll};default:return t}}):[]}const Qc=ge({name:"DataTableSelectionMenu",props:{clsPrefix:{type:String,required:!0}},setup(e){const{props:r,localeRef:t,checkOptionsRef:n,rawPaginatedDataRef:a,doCheckAll:o,doUncheckAll:l}=it(rn),s=g(()=>Gc(n.value,a,o,l)),d=g(()=>Xc(n.value,t.value));return()=>{var u,c,f,v;const{clsPrefix:m}=e;return i(qc,{theme:(c=(u=r.theme)===null||u===void 0?void 0:u.peers)===null||c===void 0?void 0:c.Dropdown,themeOverrides:(v=(f=r.themeOverrides)===null||f===void 0?void 0:f.peers)===null||v===void 0?void 0:v.Dropdown,options:d.value,onSelect:s.value},{default:()=>i(Pt,{clsPrefix:m,class:`${m}-data-table-check-extra`},{default:()=>i(ss,null)})})}}});function fa(e){return typeof e.title=="function"?e.title(e):e.title}const Zc=ge({props:{clsPrefix:{type:String,required:!0},id:{type:String,required:!0},cols:{type:Array,required:!0},width:String},render(){const{clsPrefix:e,id:r,cols:t,width:n}=this;return i("table",{style:{tableLayout:"fixed",width:n},class:`${e}-data-table-table`},i("colgroup",null,t.map(a=>i("col",{key:a.key,style:a.style}))),i("thead",{"data-n-id":r,class:`${e}-data-table-thead`},this.$slots))}}),sl=ge({name:"DataTableHeader",props:{discrete:{type:Boolean,default:!0}},setup(){const{mergedClsPrefixRef:e,scrollXRef:r,fixedColumnLeftMapRef:t,fixedColumnRightMapRef:n,mergedCurrentPageRef:a,allRowsCheckedRef:o,someRowsCheckedRef:l,rowsRef:s,colsRef:d,mergedThemeRef:u,checkOptionsRef:c,mergedSortStateRef:f,componentId:v,mergedTableLayoutRef:m,headerCheckboxDisabledRef:p,virtualScrollHeaderRef:y,headerHeightRef:h,onUnstableColumnResize:x,doUpdateResizableWidth:w,handleTableHeaderScroll:k,deriveNextSorter:b,doUncheckAll:R,doCheckAll:D}=it(rn),T=F(),Y=F({});function I(L){const Q=Y.value[L];return Q==null?void 0:Q.getBoundingClientRect().width}function N(){o.value?R():D()}function J(L,Q){if(Lt(L,"dataTableFilter")||Lt(L,"dataTableResizable")||!ca(Q))return;const q=f.value.find(ue=>ue.columnKey===Q.key)||null,ee=fc(Q,q);b(ee)}const O=new Map;function C(L){O.set(L.key,I(L.key))}function B(L,Q){const q=O.get(L.key);if(q===void 0)return;const ee=q+Q,ue=dc(ee,L.minWidth,L.maxWidth);x(ee,ue,L,I),w(L,ue)}return{cellElsRef:Y,componentId:v,mergedSortState:f,mergedClsPrefix:e,scrollX:r,fixedColumnLeftMap:t,fixedColumnRightMap:n,currentPage:a,allRowsChecked:o,someRowsChecked:l,rows:s,cols:d,mergedTheme:u,checkOptions:c,mergedTableLayout:m,headerCheckboxDisabled:p,headerHeight:h,virtualScrollHeader:y,virtualListRef:T,handleCheckboxUpdateChecked:N,handleColHeaderClick:J,handleTableHeaderScroll:k,handleColumnResizeStart:C,handleColumnResize:B}},render(){const{cellElsRef:e,mergedClsPrefix:r,fixedColumnLeftMap:t,fixedColumnRightMap:n,currentPage:a,allRowsChecked:o,someRowsChecked:l,rows:s,cols:d,mergedTheme:u,checkOptions:c,componentId:f,discrete:v,mergedTableLayout:m,headerCheckboxDisabled:p,mergedSortState:y,virtualScrollHeader:h,handleColHeaderClick:x,handleCheckboxUpdateChecked:w,handleColumnResizeStart:k,handleColumnResize:b}=this,R=(I,N,J)=>I.map(({column:O,colIndex:C,colSpan:B,rowSpan:L,isLast:Q})=>{var q,ee;const ue=tn(O),{ellipsis:te}=O,V=()=>O.type==="selection"?O.multiple!==!1?i(mn,null,i(Xa,{key:a,privateInsideTable:!0,checked:o,indeterminate:l,disabled:p,onUpdateChecked:w}),c?i(Qc,{clsPrefix:r}):null):null:i(mn,null,i("div",{class:`${r}-data-table-th__title-wrapper`},i("div",{class:`${r}-data-table-th__title`},te===!0||te&&!te.tooltip?i("div",{class:`${r}-data-table-th__ellipsis`},fa(O)):te&&typeof te=="object"?i(Za,Object.assign({},te,{theme:u.peers.Ellipsis,themeOverrides:u.peerOverrides.Ellipsis}),{default:()=>fa(O)}):fa(O)),ca(O)?i($c,{column:O}):null),Mo(O)?i(Mc,{column:O,options:O.filterOptions}):null,Xi(O)?i(zc,{onResizeStart:()=>{k(O)},onResize:ne=>{b(O,ne)}}):null),_=ue in t,E=ue in n,U=N&&!O.fixed?"div":"th";return i(U,{ref:ne=>e[ue]=ne,key:ue,style:[N&&!O.fixed?{position:"absolute",left:Ot(N(C)),top:0,bottom:0}:{left:Ot((q=t[ue])===null||q===void 0?void 0:q.start),right:Ot((ee=n[ue])===null||ee===void 0?void 0:ee.start)},{width:Ot(O.width),textAlign:O.titleAlign||O.align,height:J}],colspan:B,rowspan:L,"data-col-key":ue,class:[`${r}-data-table-th`,(_||E)&&`${r}-data-table-th--fixed-${_?"left":"right"}`,{[`${r}-data-table-th--sorting`]:Qi(O,y),[`${r}-data-table-th--filterable`]:Mo(O),[`${r}-data-table-th--sortable`]:ca(O),[`${r}-data-table-th--selection`]:O.type==="selection",[`${r}-data-table-th--last`]:Q},O.className],onClick:O.type!=="selection"&&O.type!=="expand"&&!("children"in O)?ne=>{x(ne,O)}:void 0},V())});if(h){const{headerHeight:I}=this;let N=0,J=0;return d.forEach(O=>{O.column.fixed==="left"?N++:O.column.fixed==="right"&&J++}),i(tr,{ref:"virtualListRef",class:`${r}-data-table-base-table-header`,style:{height:Ot(I)},onScroll:this.handleTableHeaderScroll,columns:d,itemSize:I,showScrollbar:!1,items:[{}],itemResizable:!1,visibleItemsTag:Zc,visibleItemsProps:{clsPrefix:r,id:f,cols:d,width:jt(this.scrollX)},renderItemWithCols:({startColIndex:O,endColIndex:C,getLeft:B})=>{const L=d.map((q,ee)=>({column:q.column,isLast:ee===d.length-1,colIndex:q.index,colSpan:1,rowSpan:1})).filter(({column:q},ee)=>!!(O<=ee&&ee<=C||q.fixed)),Q=R(L,B,Ot(I));return Q.splice(N,0,i("th",{colspan:d.length-N-J,style:{pointerEvents:"none",visibility:"hidden",height:0}})),i("tr",{style:{position:"relative"}},Q)}},{default:({renderedItemWithCols:O})=>O})}const D=i("thead",{class:`${r}-data-table-thead`,"data-n-id":f},s.map(I=>i("tr",{class:`${r}-data-table-tr`},R(I,null,void 0))));if(!v)return D;const{handleTableHeaderScroll:T,scrollX:Y}=this;return i("div",{class:`${r}-data-table-base-table-header`,onScroll:T},i("table",{class:`${r}-data-table-table`,style:{minWidth:jt(Y),tableLayout:m}},i("colgroup",null,d.map(I=>i("col",{key:I.key,style:I.style}))),D))}});function Jc(e,r){const t=[];function n(a,o){a.forEach(l=>{l.children&&r.has(l.key)?(t.push({tmNode:l,striped:!1,key:l.key,index:o}),n(l.children,o)):t.push({key:l.key,tmNode:l,striped:!1,index:o})})}return e.forEach(a=>{t.push(a);const{children:o}=a.tmNode;o&&r.has(a.key)&&n(o,a.index)}),t}const ef=ge({props:{clsPrefix:{type:String,required:!0},id:{type:String,required:!0},cols:{type:Array,required:!0},onMouseenter:Function,onMouseleave:Function},render(){const{clsPrefix:e,id:r,cols:t,onMouseenter:n,onMouseleave:a}=this;return i("table",{style:{tableLayout:"fixed"},class:`${e}-data-table-table`,onMouseenter:n,onMouseleave:a},i("colgroup",null,t.map(o=>i("col",{key:o.key,style:o.style}))),i("tbody",{"data-n-id":r,class:`${e}-data-table-tbody`},this.$slots))}}),tf=ge({name:"DataTableBody",props:{onResize:Function,showHeader:Boolean,flexHeight:Boolean,bodyStyle:Object},setup(e){const{slots:r,bodyWidthRef:t,mergedExpandedRowKeysRef:n,mergedClsPrefixRef:a,mergedThemeRef:o,scrollXRef:l,colsRef:s,paginatedDataRef:d,rawPaginatedDataRef:u,fixedColumnLeftMapRef:c,fixedColumnRightMapRef:f,mergedCurrentPageRef:v,rowClassNameRef:m,leftActiveFixedColKeyRef:p,leftActiveFixedChildrenColKeysRef:y,rightActiveFixedColKeyRef:h,rightActiveFixedChildrenColKeysRef:x,renderExpandRef:w,hoverKeyRef:k,summaryRef:b,mergedSortStateRef:R,virtualScrollRef:D,virtualScrollXRef:T,heightForRowRef:Y,minRowHeightRef:I,componentId:N,mergedTableLayoutRef:J,childTriggerColIndexRef:O,indentRef:C,rowPropsRef:B,maxHeightRef:L,stripedRef:Q,loadingRef:q,onLoadRef:ee,loadingKeySetRef:ue,expandableRef:te,stickyExpandedRowsRef:V,renderExpandIconRef:_,summaryPlacementRef:E,treeMateRef:U,scrollbarPropsRef:ne,setHeaderScrollLeft:Oe,doUpdateExpandedRowKeys:he,handleTableBodyScroll:Te,doCheck:j,doUncheck:be,renderCell:Se}=it(rn),$e=it(Bl),Ke=F(null),lt=F(null),ht=F(null),Qe=at(()=>d.value.length===0),X=at(()=>e.showHeader||!Qe.value),we=at(()=>e.showHeader||Qe.value);let re="";const Re=g(()=>new Set(n.value));function Ee(ve){var Fe;return(Fe=U.value.getNode(ve))===null||Fe===void 0?void 0:Fe.rawNode}function ze(ve,Fe,S){const H=Ee(ve.key);if(!H){ur("data-table",`fail to get row data with key ${ve.key}`);return}if(S){const fe=d.value.findIndex(ke=>ke.key===re);if(fe!==-1){const ke=d.value.findIndex(ye=>ye.key===ve.key),xe=Math.min(fe,ke),P=Math.max(fe,ke),G=[];d.value.slice(xe,P+1).forEach(ye=>{ye.disabled||G.push(ye.key)}),Fe?j(G,!1,H):be(G,H),re=ve.key;return}}Fe?j(ve.key,!1,H):be(ve.key,H),re=ve.key}function Le(ve){const Fe=Ee(ve.key);if(!Fe){ur("data-table",`fail to get row data with key ${ve.key}`);return}j(ve.key,!0,Fe)}function Z(){if(!X.value){const{value:Fe}=ht;return Fe||null}if(D.value)return A();const{value:ve}=Ke;return ve?ve.containerRef:null}function se(ve,Fe){var S;if(ue.value.has(ve))return;const{value:H}=n,fe=H.indexOf(ve),ke=Array.from(H);~fe?(ke.splice(fe,1),he(ke)):Fe&&!Fe.isLeaf&&!Fe.shallowLoaded?(ue.value.add(ve),(S=ee.value)===null||S===void 0||S.call(ee,Fe.rawNode).then(()=>{const{value:xe}=n,P=Array.from(xe);~P.indexOf(ve)||P.push(ve),he(P)}).finally(()=>{ue.value.delete(ve)})):(ke.push(ve),he(ke))}function De(){k.value=null}function A(){const{value:ve}=lt;return(ve==null?void 0:ve.listElRef)||null}function _e(){const{value:ve}=lt;return(ve==null?void 0:ve.itemsElRef)||null}function He(ve){var Fe;Te(ve),(Fe=Ke.value)===null||Fe===void 0||Fe.sync()}function vt(ve){var Fe;const{onResize:S}=e;S&&S(ve),(Fe=Ke.value)===null||Fe===void 0||Fe.sync()}const et={getScrollContainer:Z,scrollTo(ve,Fe){var S,H;D.value?(S=lt.value)===null||S===void 0||S.scrollTo(ve,Fe):(H=Ke.value)===null||H===void 0||H.scrollTo(ve,Fe)}},We=W([({props:ve})=>{const Fe=H=>H===null?null:W(`[data-n-id="${ve.componentId}"] [data-col-key="${H}"]::after`,{boxShadow:"var(--n-box-shadow-after)"}),S=H=>H===null?null:W(`[data-n-id="${ve.componentId}"] [data-col-key="${H}"]::before`,{boxShadow:"var(--n-box-shadow-before)"});return W([Fe(ve.leftActiveFixedColKey),S(ve.rightActiveFixedColKey),ve.leftActiveFixedChildrenColKeys.map(H=>Fe(H)),ve.rightActiveFixedChildrenColKeys.map(H=>S(H))])}]);let je=!1;return Ln(()=>{const{value:ve}=p,{value:Fe}=y,{value:S}=h,{value:H}=x;if(!je&&ve===null&&S===null)return;const fe={leftActiveFixedColKey:ve,leftActiveFixedChildrenColKeys:Fe,rightActiveFixedColKey:S,rightActiveFixedChildrenColKeys:H,componentId:N};We.mount({id:`n-${N}`,force:!0,props:fe,anchorMetaName:El,parent:$e==null?void 0:$e.styleMountTarget}),je=!0}),di(()=>{We.unmount({id:`n-${N}`,parent:$e==null?void 0:$e.styleMountTarget})}),Object.assign({bodyWidth:t,summaryPlacement:E,dataTableSlots:r,componentId:N,scrollbarInstRef:Ke,virtualListRef:lt,emptyElRef:ht,summary:b,mergedClsPrefix:a,mergedTheme:o,scrollX:l,cols:s,loading:q,bodyShowHeaderOnly:we,shouldDisplaySomeTablePart:X,empty:Qe,paginatedDataAndInfo:g(()=>{const{value:ve}=Q;let Fe=!1;return{data:d.value.map(ve?(H,fe)=>(H.isLeaf||(Fe=!0),{tmNode:H,key:H.key,striped:fe%2===1,index:fe}):(H,fe)=>(H.isLeaf||(Fe=!0),{tmNode:H,key:H.key,striped:!1,index:fe})),hasChildren:Fe}}),rawPaginatedData:u,fixedColumnLeftMap:c,fixedColumnRightMap:f,currentPage:v,rowClassName:m,renderExpand:w,mergedExpandedRowKeySet:Re,hoverKey:k,mergedSortState:R,virtualScroll:D,virtualScrollX:T,heightForRow:Y,minRowHeight:I,mergedTableLayout:J,childTriggerColIndex:O,indent:C,rowProps:B,maxHeight:L,loadingKeySet:ue,expandable:te,stickyExpandedRows:V,renderExpandIcon:_,scrollbarProps:ne,setHeaderScrollLeft:Oe,handleVirtualListScroll:He,handleVirtualListResize:vt,handleMouseleaveTable:De,virtualListContainer:A,virtualListContent:_e,handleTableBodyScroll:Te,handleCheckboxUpdateChecked:ze,handleRadioUpdateChecked:Le,handleUpdateExpanded:se,renderCell:Se},et)},render(){const{mergedTheme:e,scrollX:r,mergedClsPrefix:t,virtualScroll:n,maxHeight:a,mergedTableLayout:o,flexHeight:l,loadingKeySet:s,onResize:d,setHeaderScrollLeft:u}=this,c=r!==void 0||a!==void 0||l,f=!c&&o==="auto",v=r!==void 0||f,m={minWidth:jt(r)||"100%"};r&&(m.width="100%");const p=i(Ut,Object.assign({},this.scrollbarProps,{ref:"scrollbarInstRef",scrollable:c||f,class:`${t}-data-table-base-table-body`,style:this.empty?void 0:this.bodyStyle,theme:e.peers.Scrollbar,themeOverrides:e.peerOverrides.Scrollbar,contentStyle:m,container:n?this.virtualListContainer:void 0,content:n?this.virtualListContent:void 0,horizontalRailStyle:{zIndex:3},verticalRailStyle:{zIndex:3},xScrollable:v,onScroll:n?void 0:this.handleTableBodyScroll,internalOnUpdateScrollLeft:u,onResize:d}),{default:()=>{const y={},h={},{cols:x,paginatedDataAndInfo:w,mergedTheme:k,fixedColumnLeftMap:b,fixedColumnRightMap:R,currentPage:D,rowClassName:T,mergedSortState:Y,mergedExpandedRowKeySet:I,stickyExpandedRows:N,componentId:J,childTriggerColIndex:O,expandable:C,rowProps:B,handleMouseleaveTable:L,renderExpand:Q,summary:q,handleCheckboxUpdateChecked:ee,handleRadioUpdateChecked:ue,handleUpdateExpanded:te,heightForRow:V,minRowHeight:_,virtualScrollX:E}=this,{length:U}=x;let ne;const{data:Oe,hasChildren:he}=w,Te=he?Jc(Oe,I):Oe;if(q){const re=q(this.rawPaginatedData);if(Array.isArray(re)){const Re=re.map((Ee,ze)=>({isSummaryRow:!0,key:`__n_summary__${ze}`,tmNode:{rawNode:Ee,disabled:!0},index:-1}));ne=this.summaryPlacement==="top"?[...Re,...Te]:[...Te,...Re]}else{const Re={isSummaryRow:!0,key:"__n_summary__",tmNode:{rawNode:re,disabled:!0},index:-1};ne=this.summaryPlacement==="top"?[Re,...Te]:[...Te,Re]}}else ne=Te;const j=he?{width:Ot(this.indent)}:void 0,be=[];ne.forEach(re=>{Q&&I.has(re.key)&&(!C||C(re.tmNode.rawNode))?be.push(re,{isExpandedRow:!0,key:`${re.key}-expand`,tmNode:re.tmNode,index:re.index}):be.push(re)});const{length:Se}=be,$e={};Oe.forEach(({tmNode:re},Re)=>{$e[Re]=re.key});const Ke=N?this.bodyWidth:null,lt=Ke===null?void 0:`${Ke}px`,ht=this.virtualScrollX?"div":"td";let Qe=0,X=0;E&&x.forEach(re=>{re.column.fixed==="left"?Qe++:re.column.fixed==="right"&&X++});const we=({rowInfo:re,displayedRowIndex:Re,isVirtual:Ee,isVirtualX:ze,startColIndex:Le,endColIndex:Z,getLeft:se})=>{const{index:De}=re;if("isExpandedRow"in re){const{tmNode:{key:ke,rawNode:xe}}=re;return i("tr",{class:`${t}-data-table-tr ${t}-data-table-tr--expanded`,key:`${ke}__expand`},i("td",{class:[`${t}-data-table-td`,`${t}-data-table-td--last-col`,Re+1===Se&&`${t}-data-table-td--last-row`],colspan:U},N?i("div",{class:`${t}-data-table-expand`,style:{width:lt}},Q(xe,De)):Q(xe,De)))}const A="isSummaryRow"in re,_e=!A&&re.striped,{tmNode:He,key:vt}=re,{rawNode:et}=He,We=I.has(vt),je=B?B(et,De):void 0,ve=typeof T=="string"?T:cc(et,De,T),Fe=ze?x.filter((ke,xe)=>!!(Le<=xe&&xe<=Z||ke.column.fixed)):x,S=ze?Ot((V==null?void 0:V(et,De))||_):void 0,H=Fe.map(ke=>{var xe,P,G,ye,Me;const Ze=ke.index;if(Re in y){const yt=y[Re],St=yt.indexOf(Ze);if(~St)return yt.splice(St,1),null}const{column:Be}=ke,$=tn(ke),{rowSpan:ae,colSpan:pe}=Be,Ie=A?((xe=re.tmNode.rawNode[$])===null||xe===void 0?void 0:xe.colSpan)||1:pe?pe(et,De):1,Je=A?((P=re.tmNode.rawNode[$])===null||P===void 0?void 0:P.rowSpan)||1:ae?ae(et,De):1,Ge=Ze+Ie===U,rt=Re+Je===Se,Nt=Je>1;if(Nt&&(h[Re]={[Ze]:[]}),Ie>1||Nt)for(let yt=Re;yt{te(vt,re.tmNode)}})]:null,Be.type==="selection"?A?null:Be.multiple===!1?i(Rc,{key:D,rowKey:vt,disabled:re.tmNode.disabled,onUpdateChecked:()=>{ue(re.tmNode)}}):i(mc,{key:D,rowKey:vt,disabled:re.tmNode.disabled,onUpdateChecked:(yt,St)=>{ee(re.tmNode,yt,St.shiftKey)}}):Be.type==="expand"?A?null:!Be.expandable||!((Me=Be.expandable)===null||Me===void 0)&&Me.call(Be,et)?i(Io,{clsPrefix:t,rowData:et,expanded:We,renderExpandIcon:this.renderExpandIcon,onClick:()=>{te(vt,null)}}):null:i(Tc,{clsPrefix:t,index:De,row:et,column:Be,isSummary:A,mergedTheme:k,renderCell:this.renderCell}))});return ze&&Qe&&X&&H.splice(Qe,0,i("td",{colspan:x.length-Qe-X,style:{pointerEvents:"none",visibility:"hidden",height:0}})),i("tr",Object.assign({},je,{onMouseenter:ke=>{var xe;this.hoverKey=vt,(xe=je==null?void 0:je.onMouseenter)===null||xe===void 0||xe.call(je,ke)},key:vt,class:[`${t}-data-table-tr`,A&&`${t}-data-table-tr--summary`,_e&&`${t}-data-table-tr--striped`,We&&`${t}-data-table-tr--expanded`,ve,je==null?void 0:je.class],style:[je==null?void 0:je.style,ze&&{height:S}]}),H)};return n?i(tr,{ref:"virtualListRef",items:be,itemSize:this.minRowHeight,visibleItemsTag:ef,visibleItemsProps:{clsPrefix:t,id:J,cols:x,onMouseleave:L},showScrollbar:!1,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemsStyle:m,itemResizable:!E,columns:x,renderItemWithCols:E?({itemIndex:re,item:Re,startColIndex:Ee,endColIndex:ze,getLeft:Le})=>we({displayedRowIndex:re,isVirtual:!0,isVirtualX:!0,rowInfo:Re,startColIndex:Ee,endColIndex:ze,getLeft:Le}):void 0},{default:({item:re,index:Re,renderedItemWithCols:Ee})=>Ee||we({rowInfo:re,displayedRowIndex:Re,isVirtual:!0,isVirtualX:!1,startColIndex:0,endColIndex:0,getLeft(ze){return 0}})}):i("table",{class:`${t}-data-table-table`,onMouseleave:L,style:{tableLayout:this.mergedTableLayout}},i("colgroup",null,x.map(re=>i("col",{key:re.key,style:re.style}))),this.showHeader?i(sl,{discrete:!1}):null,this.empty?null:i("tbody",{"data-n-id":J,class:`${t}-data-table-tbody`},be.map((re,Re)=>we({rowInfo:re,displayedRowIndex:Re,isVirtual:!1,isVirtualX:!1,startColIndex:-1,endColIndex:-1,getLeft(Ee){return-1}}))))}});if(this.empty){const y=()=>i("div",{class:[`${t}-data-table-empty`,this.loading&&`${t}-data-table-empty--hide`],style:this.bodyStyle,ref:"emptyElRef"},qe(this.dataTableSlots.empty,()=>[i(Ri,{theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})]));return this.shouldDisplaySomeTablePart?i(mn,null,p,y()):i(Ca,{onResize:this.onResize},{default:y})}return p}}),nf=ge({name:"MainTable",setup(){const{mergedClsPrefixRef:e,rightFixedColumnsRef:r,leftFixedColumnsRef:t,bodyWidthRef:n,maxHeightRef:a,minHeightRef:o,flexHeightRef:l,virtualScrollHeaderRef:s,syncScrollState:d}=it(rn),u=F(null),c=F(null),f=F(null),v=F(!(t.value.length||r.value.length)),m=g(()=>({maxHeight:jt(a.value),minHeight:jt(o.value)}));function p(w){n.value=w.contentRect.width,d(),v.value||(v.value=!0)}function y(){var w;const{value:k}=u;return k?s.value?((w=k.virtualListRef)===null||w===void 0?void 0:w.listElRef)||null:k.$el:null}function h(){const{value:w}=c;return w?w.getScrollContainer():null}const x={getBodyElement:h,getHeaderElement:y,scrollTo(w,k){var b;(b=c.value)===null||b===void 0||b.scrollTo(w,k)}};return Ln(()=>{const{value:w}=f;if(!w)return;const k=`${e.value}-data-table-base-table--transition-disabled`;v.value?setTimeout(()=>{w.classList.remove(k)},0):w.classList.add(k)}),Object.assign({maxHeight:a,mergedClsPrefix:e,selfElRef:f,headerInstRef:u,bodyInstRef:c,bodyStyle:m,flexHeight:l,handleBodyResize:p},x)},render(){const{mergedClsPrefix:e,maxHeight:r,flexHeight:t}=this,n=r===void 0&&!t;return i("div",{class:`${e}-data-table-base-table`,ref:"selfElRef"},n?null:i(sl,{ref:"headerInstRef"}),i(tf,{ref:"bodyInstRef",bodyStyle:this.bodyStyle,showHeader:n,flexHeight:t,onResize:this.handleBodyResize}))}}),Ao=af(),rf=W([M("data-table",` width: 100%; font-size: var(--n-font-size); display: flex; @@ -859,15 +859,15 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config --n-merged-td-color-hover: var(--n-td-color-hover); --n-merged-td-color-sorting: var(--n-td-color-sorting); --n-merged-td-color-striped: var(--n-td-color-striped); - `,[O("data-table-wrapper",` + `,[M("data-table-wrapper",` flex-grow: 1; display: flex; flex-direction: column; - `),K("flex-height",[W(">",[O("data-table-wrapper",[W(">",[O("data-table-base-table",` + `),K("flex-height",[W(">",[M("data-table-wrapper",[W(">",[M("data-table-base-table",` display: flex; flex-direction: column; flex-grow: 1; - `,[W(">",[O("data-table-base-table-body","flex-basis: 0;",[W("&:last-child","flex-grow: 1;")])])])])])])]),W(">",[O("data-table-loading-wrapper",` + `,[W(">",[M("data-table-base-table-body","flex-basis: 0;",[W("&:last-child","flex-grow: 1;")])])])])])])]),W(">",[M("data-table-loading-wrapper",` color: var(--n-loading-color); font-size: var(--n-loading-size); position: absolute; @@ -878,15 +878,15 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config display: flex; align-items: center; justify-content: center; - `,[or({originalTransform:"translateX(-50%) translateY(-50%)"})])]),O("data-table-expand-placeholder",` + `,[or({originalTransform:"translateX(-50%) translateY(-50%)"})])]),M("data-table-expand-placeholder",` margin-right: 8px; display: inline-block; width: 16px; height: 1px; - `),O("data-table-indent",` + `),M("data-table-indent",` display: inline-block; height: 1px; - `),O("data-table-expand-trigger",` + `),M("data-table-expand-trigger",` display: inline-flex; margin-right: 8px; cursor: pointer; @@ -897,7 +897,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config height: 16px; color: var(--n-td-text-color); transition: color .3s var(--n-bezier); - `,[K("expanded",[O("icon","transform: rotate(90deg);",[Xn({originalTransform:"rotate(90deg)"})]),O("base-icon","transform: rotate(90deg);",[Xn({originalTransform:"rotate(90deg)"})])]),O("base-loading",` + `,[K("expanded",[M("icon","transform: rotate(90deg);",[Xn({originalTransform:"rotate(90deg)"})]),M("base-icon","transform: rotate(90deg);",[Xn({originalTransform:"rotate(90deg)"})])]),M("base-loading",` color: var(--n-loading-color); transition: color .3s var(--n-bezier); position: absolute; @@ -905,34 +905,34 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config right: 0; top: 0; bottom: 0; - `,[Xn()]),O("icon",` + `,[Xn()]),M("icon",` position: absolute; left: 0; right: 0; top: 0; bottom: 0; - `,[Xn()]),O("base-icon",` + `,[Xn()]),M("base-icon",` position: absolute; left: 0; right: 0; top: 0; bottom: 0; - `,[Xn()])]),O("data-table-thead",` + `,[Xn()])]),M("data-table-thead",` transition: background-color .3s var(--n-bezier); background-color: var(--n-merged-th-color); - `),O("data-table-tr",` + `),M("data-table-tr",` position: relative; box-sizing: border-box; background-clip: padding-box; transition: background-color .3s var(--n-bezier); - `,[O("data-table-expand",` + `,[M("data-table-expand",` position: sticky; left: 0; overflow: hidden; margin: calc(var(--n-th-padding) * -1); padding: var(--n-th-padding); box-sizing: border-box; - `),K("striped","background-color: var(--n-merged-td-color-striped);",[O("data-table-td","background-color: var(--n-merged-td-color-striped);")]),Ft("summary",[W("&:hover","background-color: var(--n-merged-td-color-hover);",[W(">",[O("data-table-td","background-color: var(--n-merged-td-color-hover);")])])])]),O("data-table-th",` + `),K("striped","background-color: var(--n-merged-td-color-striped);",[M("data-table-td","background-color: var(--n-merged-td-color-striped);")]),Ft("summary",[W("&:hover","background-color: var(--n-merged-td-color-hover);",[W(">",[M("data-table-td","background-color: var(--n-merged-td-color-hover);")])])])]),M("data-table-th",` padding: var(--n-th-padding); position: relative; text-align: start; @@ -980,7 +980,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config max-width: calc(100% - 18px); `),W("&:hover",` background-color: var(--n-merged-th-color-hover); - `)]),O("data-table-sorter",` + `)]),M("data-table-sorter",` height: var(--n-sorter-size); width: var(--n-sorter-size); margin-left: 4px; @@ -991,13 +991,13 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config vertical-align: -0.2em; color: var(--n-th-icon-color); transition: color .3s var(--n-bezier); - `,[O("base-icon","transition: transform .3s var(--n-bezier)"),K("desc",[O("base-icon",` + `,[M("base-icon","transition: transform .3s var(--n-bezier)"),K("desc",[M("base-icon",` transform: rotate(0deg); - `)]),K("asc",[O("base-icon",` + `)]),K("asc",[M("base-icon",` transform: rotate(-180deg); `)]),K("asc, desc",` color: var(--n-th-icon-color-active); - `)]),O("data-table-resize-button",` + `)]),M("data-table-resize-button",` width: var(--n-resizable-container-size); position: absolute; top: 0; @@ -1021,7 +1021,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config background-color: var(--n-th-icon-color-active); `)]),W("&:hover::after",` background-color: var(--n-th-icon-color-active); - `)]),O("data-table-filter",` + `)]),M("data-table-filter",` position: absolute; z-index: auto; right: 0; @@ -1044,7 +1044,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config `),K("active",` background-color: var(--n-th-button-color-hover); color: var(--n-th-icon-color-active); - `)])]),O("data-table-td",` + `)])]),M("data-table-td",` padding: var(--n-td-padding); text-align: start; box-sizing: border-box; @@ -1057,7 +1057,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config background-color .3s var(--n-bezier), border-color .3s var(--n-bezier), color .3s var(--n-bezier); - `,[K("expand",[O("data-table-expand-trigger",` + `,[K("expand",[M("data-table-expand-trigger",` margin-right: 0; `)]),K("last-row",` border-bottom: 0 solid var(--n-merged-border-color); @@ -1083,7 +1083,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config text-align: center; padding: 0; line-height: 0; - `),Ao]),O("data-table-empty",` + `),Ao]),M("data-table-empty",` box-sizing: border-box; padding: var(--n-empty-padding); flex-grow: 1; @@ -1099,36 +1099,36 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config margin: var(--n-pagination-margin); display: flex; justify-content: flex-end; - `),O("data-table-wrapper",` + `),M("data-table-wrapper",` position: relative; opacity: 1; transition: opacity .3s var(--n-bezier), border-color .3s var(--n-bezier); border-top-left-radius: var(--n-border-radius); border-top-right-radius: var(--n-border-radius); line-height: var(--n-line-height); - `),K("loading",[O("data-table-wrapper",` + `),K("loading",[M("data-table-wrapper",` opacity: var(--n-opacity-loading); pointer-events: none; - `)]),K("single-column",[O("data-table-td",` + `)]),K("single-column",[M("data-table-td",` border-bottom: 0 solid var(--n-merged-border-color); `,[W("&::after, &::before",` bottom: 0 !important; - `)])]),Ft("single-line",[O("data-table-th",` + `)])]),Ft("single-line",[M("data-table-th",` border-right: 1px solid var(--n-merged-border-color); `,[K("last",` border-right: 0 solid var(--n-merged-border-color); - `)]),O("data-table-td",` + `)]),M("data-table-td",` border-right: 1px solid var(--n-merged-border-color); `,[K("last-col",` border-right: 0 solid var(--n-merged-border-color); - `)])]),K("bordered",[O("data-table-wrapper",` + `)])]),K("bordered",[M("data-table-wrapper",` border: 1px solid var(--n-merged-border-color); border-bottom-left-radius: var(--n-border-radius); border-bottom-right-radius: var(--n-border-radius); overflow: hidden; - `)]),O("data-table-base-table",[K("transition-disabled",[O("data-table-th",[W("&::after, &::before","transition: none;")]),O("data-table-td",[W("&::after, &::before","transition: none;")])])]),K("bottom-bordered",[O("data-table-td",[K("last-row",` + `)]),M("data-table-base-table",[K("transition-disabled",[M("data-table-th",[W("&::after, &::before","transition: none;")]),M("data-table-td",[W("&::after, &::before","transition: none;")])])]),K("bottom-bordered",[M("data-table-td",[K("last-row",` border-bottom: 1px solid var(--n-merged-border-color); - `)])]),O("data-table-table",` + `)])]),M("data-table-table",` font-variant-numeric: tabular-nums; width: 100%; word-break: break-word; @@ -1136,7 +1136,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config border-collapse: separate; border-spacing: 0; background-color: var(--n-merged-td-color); - `),O("data-table-base-table-header",` + `),M("data-table-base-table-header",` border-top-left-radius: calc(var(--n-border-radius) - 1px); border-top-right-radius: calc(var(--n-border-radius) - 1px); z-index: 3; @@ -1148,7 +1148,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config display: none; width: 0; height: 0; - `)]),O("data-table-check-extra",` + `)]),M("data-table-check-extra",` transition: color .3s var(--n-bezier); color: var(--n-th-icon-color); position: absolute; @@ -1157,16 +1157,16 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config top: 50%; transform: translateY(-50%); z-index: 1; - `)]),O("data-table-filter-menu",[O("scrollbar",` + `)]),M("data-table-filter-menu",[M("scrollbar",` max-height: 240px; `),le("group",` display: flex; flex-direction: column; padding: 12px 12px 0 12px; - `,[O("checkbox",` + `,[M("checkbox",` margin-bottom: 12px; margin-right: 0; - `),O("radio",` + `),M("radio",` margin-bottom: 12px; margin-right: 0; `)]),le("action",` @@ -1175,13 +1175,13 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config flex-wrap: nowrap; justify-content: space-evenly; border-top: 1px solid var(--n-action-divider-color); - `,[O("button",[W("&:not(:last-child)",` + `,[M("button",[W("&:not(:last-child)",` margin: var(--n-action-button-margin); `),W("&:last-child",` margin-right: 0; - `)])]),O("divider",` + `)])]),M("divider",` margin: 0 !important; - `)]),ti(O("data-table",` + `)]),ti(M("data-table",` --n-merged-th-color: var(--n-th-color-modal); --n-merged-td-color: var(--n-td-color-modal); --n-merged-border-color: var(--n-border-color-modal); @@ -1190,7 +1190,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config --n-merged-th-color-sorting: var(--n-th-color-hover-modal); --n-merged-td-color-sorting: var(--n-td-color-hover-modal); --n-merged-td-color-striped: var(--n-td-color-striped-modal); - `)),ni(O("data-table",` + `)),ni(M("data-table",` --n-merged-th-color: var(--n-th-color-popover); --n-merged-td-color: var(--n-td-color-popover); --n-merged-border-color: var(--n-border-color-popover); @@ -1227,15 +1227,15 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config bottom: -1px; transition: box-shadow .2s var(--n-bezier); left: -36px; - `)])]}function of(e,r){const{paginatedDataRef:t,treeMateRef:n,selectionColumnRef:a}=r,o=F(e.defaultCheckedRowKeys),l=b(()=>{var P;const{checkedRowKeys:$}=e,T=$===void 0?o.value:$;return((P=a.value)===null||P===void 0?void 0:P.multiple)===!1?{checkedKeys:T.slice(0,1),indeterminateKeys:[]}:n.value.getCheckedKeys(T,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded})}),s=b(()=>l.value.checkedKeys),d=b(()=>l.value.indeterminateKeys),u=b(()=>new Set(s.value)),c=b(()=>new Set(d.value)),f=b(()=>{const{value:P}=u;return t.value.reduce(($,T)=>{const{key:Y,disabled:z}=T;return $+(!z&&P.has(Y)?1:0)},0)}),v=b(()=>t.value.filter(P=>P.disabled).length),m=b(()=>{const{length:P}=t.value,{value:$}=c;return f.value>0&&f.value$.has(T.key))}),p=b(()=>{const{length:P}=t.value;return f.value!==0&&f.value===P-v.value}),y=b(()=>t.value.length===0);function h(P,$,T){const{"onUpdate:checkedRowKeys":Y,onUpdateCheckedRowKeys:z,onCheckedRowKeysChange:N}=e,J=[],{value:{getNode:D}}=n;P.forEach(C=>{var B;const L=(B=D(C))===null||B===void 0?void 0:B.rawNode;J.push(L)}),Y&&oe(Y,P,J,{row:$,action:T}),z&&oe(z,P,J,{row:$,action:T}),N&&oe(N,P,J,{row:$,action:T}),o.value=P}function w(P,$=!1,T){if(!e.loading){if($){h(Array.isArray(P)?P.slice(0,1):[P],T,"check");return}h(n.value.check(P,s.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,T,"check")}}function g(P,$){e.loading||h(n.value.uncheck(P,s.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,$,"uncheck")}function k(P=!1){const{value:$}=a;if(!$||e.loading)return;const T=[];(P?n.value.treeNodes:t.value).forEach(Y=>{Y.disabled||T.push(Y.key)}),h(n.value.check(T,s.value,{cascade:!0,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,void 0,"checkAll")}function x(P=!1){const{value:$}=a;if(!$||e.loading)return;const T=[];(P?n.value.treeNodes:t.value).forEach(Y=>{Y.disabled||T.push(Y.key)}),h(n.value.uncheck(T,s.value,{cascade:!0,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,void 0,"uncheckAll")}return{mergedCheckedRowKeySetRef:u,mergedCheckedRowKeysRef:s,mergedInderminateRowKeySetRef:c,someRowsCheckedRef:m,allRowsCheckedRef:p,headerCheckboxDisabledRef:y,doUpdateCheckedRowKeys:h,doCheckAll:k,doUncheckAll:x,doCheck:w,doUncheck:g}}function lf(e,r){const t=at(()=>{for(const u of e.columns)if(u.type==="expand")return u.renderExpand}),n=at(()=>{let u;for(const c of e.columns)if(c.type==="expand"){u=c.expandable;break}return u}),a=F(e.defaultExpandAll?t!=null&&t.value?(()=>{const u=[];return r.value.treeNodes.forEach(c=>{var f;!((f=n.value)===null||f===void 0)&&f.call(n,c.rawNode)&&u.push(c.key)}),u})():r.value.getNonLeafKeys():e.defaultExpandedRowKeys),o=me(e,"expandedRowKeys"),l=me(e,"stickyExpandedRows"),s=zt(o,a);function d(u){const{onUpdateExpandedRowKeys:c,"onUpdate:expandedRowKeys":f}=e;c&&oe(c,u),f&&oe(f,u),a.value=u}return{stickyExpandedRowsRef:l,mergedExpandedRowKeysRef:s,renderExpandRef:t,expandableRef:n,doUpdateExpandedRowKeys:d}}function sf(e,r){const t=[],n=[],a=[],o=new WeakMap;let l=-1,s=0,d=!1;function u(v,m){m>l&&(t[m]=[],l=m),v.forEach((p,y)=>{if("children"in p)u(p.children,m+1);else{const h="key"in p?p.key:void 0;n.push({key:en(p),style:uc(p,h!==void 0?jt(r(h)):void 0),column:p,index:y,width:p.width===void 0?128:Number(p.width)}),s+=1,d||(d=!!p.ellipsis),a.push(p)}})}u(e,0);let c=0;function f(v,m){let p=0;v.forEach(y=>{var h;if("children"in y){const w=c,g={column:y,colIndex:c,colSpan:0,rowSpan:1,isLast:!1};f(y.children,m+1),y.children.forEach(k=>{var x,P;g.colSpan+=(P=(x=o.get(k))===null||x===void 0?void 0:x.colSpan)!==null&&P!==void 0?P:0}),w+g.colSpan===s&&(g.isLast=!0),o.set(y,g),t[m].push(g)}else{if(c1&&(p=c+w);const g=c+w===s,k={column:y,colSpan:w,colIndex:c,rowSpan:l-m+1,isLast:g};o.set(y,k),t[m].push(k),c+=1}})}return f(e,0),{hasEllipsis:d,rows:t,cols:n,dataRelatedCols:a}}function df(e,r){const t=b(()=>sf(e.columns,r));return{rowsRef:b(()=>t.value.rows),colsRef:b(()=>t.value.cols),hasEllipsisRef:b(()=>t.value.hasEllipsis),dataRelatedColsRef:b(()=>t.value.dataRelatedCols)}}function uf(){const e=F({});function r(a){return e.value[a]}function t(a,o){Xi(a)&&"key"in a&&(e.value[a.key]=o)}function n(){e.value={}}return{getResizableWidth:r,doUpdateResizableWidth:t,clearResizableWidth:n}}function cf(e,{mainTableInstRef:r,mergedCurrentPageRef:t,bodyWidthRef:n}){let a=0;const o=F(),l=F(null),s=F([]),d=F(null),u=F([]),c=b(()=>jt(e.scrollX)),f=b(()=>e.columns.filter(z=>z.fixed==="left")),v=b(()=>e.columns.filter(z=>z.fixed==="right")),m=b(()=>{const z={};let N=0;function J(D){D.forEach(C=>{const B={start:N,end:0};z[en(C)]=B,"children"in C?(J(C.children),B.end=N):(N+=Do(C)||0,B.end=N)})}return J(f.value),z}),p=b(()=>{const z={};let N=0;function J(D){for(let C=D.length-1;C>=0;--C){const B=D[C],L={start:N,end:0};z[en(B)]=L,"children"in B?(J(B.children),L.end=N):(N+=Do(B)||0,L.end=N)}}return J(v.value),z});function y(){var z,N;const{value:J}=f;let D=0;const{value:C}=m;let B=null;for(let L=0;L(((z=C[Q])===null||z===void 0?void 0:z.start)||0)-D)B=Q,D=((N=C[Q])===null||N===void 0?void 0:N.end)||0;else break}l.value=B}function h(){s.value=[];let z=e.columns.find(N=>en(N)===l.value);for(;z&&"children"in z;){const N=z.children.length;if(N===0)break;const J=z.children[N-1];s.value.push(en(J)),z=J}}function w(){var z,N;const{value:J}=v,D=Number(e.scrollX),{value:C}=n;if(C===null)return;let B=0,L=null;const{value:Q}=p;for(let q=J.length-1;q>=0;--q){const ee=en(J[q]);if(Math.round(a+(((z=Q[ee])===null||z===void 0?void 0:z.start)||0)+C-B)en(N)===d.value);for(;z&&"children"in z&&z.children.length;){const N=z.children[0];u.value.push(en(N)),z=N}}function k(){const z=r.value?r.value.getHeaderElement():null,N=r.value?r.value.getBodyElement():null;return{header:z,body:N}}function x(){const{body:z}=k();z&&(z.scrollTop=0)}function P(){o.value!=="body"?ka(T):o.value=void 0}function $(z){var N;(N=e.onScroll)===null||N===void 0||N.call(e,z),o.value!=="head"?ka(T):o.value=void 0}function T(){const{header:z,body:N}=k();if(!N)return;const{value:J}=n;if(J!==null){if(e.maxHeight||e.flexHeight){if(!z)return;const D=a-z.scrollLeft;o.value=D!==0?"head":"body",o.value==="head"?(a=z.scrollLeft,N.scrollLeft=a):(a=N.scrollLeft,z.scrollLeft=a)}else a=N.scrollLeft;y(),h(),w(),g()}}function Y(z){const{header:N}=k();N&&(N.scrollLeft=z,T())}return gt(t,()=>{x()}),{styleScrollXRef:c,fixedColumnLeftMapRef:m,fixedColumnRightMapRef:p,leftFixedColumnsRef:f,rightFixedColumnsRef:v,leftActiveFixedColKeyRef:l,leftActiveFixedChildrenColKeysRef:s,rightActiveFixedColKeyRef:d,rightActiveFixedChildrenColKeysRef:u,syncScrollState:T,handleTableBodyScroll:$,handleTableHeaderScroll:P,setHeaderScrollLeft:Y}}function Tr(e){return typeof e=="object"&&typeof e.multiple=="number"?e.multiple:!1}function ff(e,r){return r&&(e===void 0||e==="default"||typeof e=="object"&&e.compare==="default")?hf(r):typeof e=="function"?e:e&&typeof e=="object"&&e.compare&&e.compare!=="default"?e.compare:!1}function hf(e){return(r,t)=>{const n=r[e],a=t[e];return n==null?a==null?0:-1:a==null?1:typeof n=="number"&&typeof a=="number"?n-a:typeof n=="string"&&typeof a=="string"?n.localeCompare(a):0}}function vf(e,{dataRelatedColsRef:r,filteredDataRef:t}){const n=[];r.value.forEach(m=>{var p;m.sorter!==void 0&&v(n,{columnKey:m.key,sorter:m.sorter,order:(p=m.defaultSortOrder)!==null&&p!==void 0?p:!1})});const a=F(n),o=b(()=>{const m=r.value.filter(h=>h.type!=="selection"&&h.sorter!==void 0&&(h.sortOrder==="ascend"||h.sortOrder==="descend"||h.sortOrder===!1)),p=m.filter(h=>h.sortOrder!==!1);if(p.length)return p.map(h=>({columnKey:h.key,order:h.sortOrder,sorter:h.sorter}));if(m.length)return[];const{value:y}=a;return Array.isArray(y)?y:y?[y]:[]}),l=b(()=>{const m=o.value.slice().sort((p,y)=>{const h=Tr(p.sorter)||0;return(Tr(y.sorter)||0)-h});return m.length?t.value.slice().sort((y,h)=>{let w=0;return m.some(g=>{const{columnKey:k,sorter:x,order:P}=g,$=ff(x,k);return $&&P&&(w=$(y.rawNode,h.rawNode),w!==0)?(w=w*sc(P),!0):!1}),w}):t.value});function s(m){let p=o.value.slice();return m&&Tr(m.sorter)!==!1?(p=p.filter(y=>Tr(y.sorter)!==!1),v(p,m),p):m||null}function d(m){const p=s(m);u(p)}function u(m){const{"onUpdate:sorter":p,onUpdateSorter:y,onSorterChange:h}=e;p&&oe(p,m),y&&oe(y,m),h&&oe(h,m),a.value=m}function c(m,p="ascend"){if(!m)f();else{const y=r.value.find(w=>w.type!=="selection"&&w.type!=="expand"&&w.key===m);if(!(y!=null&&y.sorter))return;const h=y.sorter;d({columnKey:m,sorter:h,order:p})}}function f(){u(null)}function v(m,p){const y=m.findIndex(h=>(p==null?void 0:p.columnKey)&&h.columnKey===p.columnKey);y!==void 0&&y>=0?m[y]=p:m.push(p)}return{clearSorter:f,sort:c,sortedDataRef:l,mergedSortStateRef:o,deriveNextSorter:d}}function mf(e,{dataRelatedColsRef:r}){const t=b(()=>{const V=_=>{for(let E=0;E<_.length;++E){const U=_[E];if("children"in U)return V(U.children);if(U.type==="selection")return U}return null};return V(e.columns)}),n=b(()=>{const{childrenKey:V}=e;return Kr(e.data,{ignoreEmptyChildren:!0,getKey:e.rowKey,getChildren:_=>_[V],getDisabled:_=>{var E,U;return!!(!((U=(E=t.value)===null||E===void 0?void 0:E.disabled)===null||U===void 0)&&U.call(E,_))}})}),a=at(()=>{const{columns:V}=e,{length:_}=V;let E=null;for(let U=0;U<_;++U){const ne=V[U];if(!ne.type&&E===null&&(E=U),"tree"in ne&&ne.tree)return U}return E||0}),o=F({}),{pagination:l}=e,s=F(l&&l.defaultPage||1),d=F(Wi(l)),u=b(()=>{const V=r.value.filter(U=>U.filterOptionValues!==void 0||U.filterOptionValue!==void 0),_={};return V.forEach(U=>{var ne;U.type==="selection"||U.type==="expand"||(U.filterOptionValues===void 0?_[U.key]=(ne=U.filterOptionValue)!==null&&ne!==void 0?ne:null:_[U.key]=U.filterOptionValues)}),Object.assign(Oo(o.value),_)}),c=b(()=>{const V=u.value,{columns:_}=e;function E(De){return(he,Te)=>!!~String(Te[De]).indexOf(String(he))}const{value:{treeNodes:U}}=n,ne=[];return _.forEach(De=>{De.type==="selection"||De.type==="expand"||"children"in De||ne.push([De.key,De])}),U?U.filter(De=>{const{rawNode:he}=De;for(const[Te,j]of ne){let be=V[Te];if(be==null||(Array.isArray(be)||(be=[be]),!be.length))continue;const Se=j.filter==="default"?E(Te):j.filter;if(j&&typeof Se=="function")if(j.filterMode==="and"){if(be.some($e=>!Se($e,he)))return!1}else{if(be.some($e=>Se($e,he)))continue;return!1}}return!0}):[]}),{sortedDataRef:f,deriveNextSorter:v,mergedSortStateRef:m,sort:p,clearSorter:y}=vf(e,{dataRelatedColsRef:r,filteredDataRef:c});r.value.forEach(V=>{var _;if(V.filter){const E=V.defaultFilterOptionValues;V.filterMultiple?o.value[V.key]=E||[]:E!==void 0?o.value[V.key]=E===null?[]:E:o.value[V.key]=(_=V.defaultFilterOptionValue)!==null&&_!==void 0?_:null}});const h=b(()=>{const{pagination:V}=e;if(V!==!1)return V.page}),w=b(()=>{const{pagination:V}=e;if(V!==!1)return V.pageSize}),g=zt(h,s),k=zt(w,d),x=at(()=>{const V=g.value;return e.remote?V:Math.max(1,Math.min(Math.ceil(c.value.length/k.value),V))}),P=b(()=>{const{pagination:V}=e;if(V){const{pageCount:_}=V;if(_!==void 0)return _}}),$=b(()=>{if(e.remote)return n.value.treeNodes;if(!e.pagination)return f.value;const V=k.value,_=(x.value-1)*V;return f.value.slice(_,_+V)}),T=b(()=>$.value.map(V=>V.rawNode));function Y(V){const{pagination:_}=e;if(_){const{onChange:E,"onUpdate:page":U,onUpdatePage:ne}=_;E&&oe(E,V),ne&&oe(ne,V),U&&oe(U,V),D(V)}}function z(V){const{pagination:_}=e;if(_){const{onPageSizeChange:E,"onUpdate:pageSize":U,onUpdatePageSize:ne}=_;E&&oe(E,V),ne&&oe(ne,V),U&&oe(U,V),C(V)}}const N=b(()=>{if(e.remote){const{pagination:V}=e;if(V){const{itemCount:_}=V;if(_!==void 0)return _}return}return c.value.length}),J=b(()=>Object.assign(Object.assign({},e.pagination),{onChange:void 0,onUpdatePage:void 0,onUpdatePageSize:void 0,onPageSizeChange:void 0,"onUpdate:page":Y,"onUpdate:pageSize":z,page:x.value,pageSize:k.value,pageCount:N.value===void 0?P.value:void 0,itemCount:N.value}));function D(V){const{"onUpdate:page":_,onPageChange:E,onUpdatePage:U}=e;U&&oe(U,V),_&&oe(_,V),E&&oe(E,V),s.value=V}function C(V){const{"onUpdate:pageSize":_,onPageSizeChange:E,onUpdatePageSize:U}=e;E&&oe(E,V),U&&oe(U,V),_&&oe(_,V),d.value=V}function B(V,_){const{onUpdateFilters:E,"onUpdate:filters":U,onFiltersChange:ne}=e;E&&oe(E,V,_),U&&oe(U,V,_),ne&&oe(ne,V,_),o.value=V}function L(V,_,E,U){var ne;(ne=e.onUnstableColumnResize)===null||ne===void 0||ne.call(e,V,_,E,U)}function Q(V){D(V)}function q(){ee()}function ee(){ue({})}function ue(V){te(V)}function te(V){V?V&&(o.value=Oo(V)):o.value={}}return{treeMateRef:n,mergedCurrentPageRef:x,mergedPaginationRef:J,paginatedDataRef:$,rawPaginatedDataRef:T,mergedFilterStateRef:u,mergedSortStateRef:m,hoverKeyRef:F(null),selectionColumnRef:t,childTriggerColIndexRef:a,doUpdateFilters:B,deriveNextSorter:v,doUpdatePageSize:C,doUpdatePage:D,onUnstableColumnResize:L,filter:te,filters:ue,clearFilter:q,clearFilters:ee,clearSorter:y,page:Q,sort:p}}const dl=ge({name:"DataTable",alias:["AdvancedTable"],props:ic,setup(e,{slots:r}){const{mergedBorderedRef:t,mergedClsPrefixRef:n,inlineThemeDisabled:a,mergedRtlRef:o}=xt(e),l=gn("DataTable",o,n),s=b(()=>{const{bottomBordered:R}=e;return t.value?!1:R!==void 0?R:!0}),d=Ye("DataTable","-data-table",rf,Ll,e,n),u=F(null),c=F(null),{getResizableWidth:f,clearResizableWidth:v,doUpdateResizableWidth:m}=uf(),{rowsRef:p,colsRef:y,dataRelatedColsRef:h,hasEllipsisRef:w}=df(e,f),{treeMateRef:g,mergedCurrentPageRef:k,paginatedDataRef:x,rawPaginatedDataRef:P,selectionColumnRef:$,hoverKeyRef:T,mergedPaginationRef:Y,mergedFilterStateRef:z,mergedSortStateRef:N,childTriggerColIndexRef:J,doUpdatePage:D,doUpdateFilters:C,onUnstableColumnResize:B,deriveNextSorter:L,filter:Q,filters:q,clearFilter:ee,clearFilters:ue,clearSorter:te,page:V,sort:_}=mf(e,{dataRelatedColsRef:h}),E=R=>{const{fileName:H="data.csv",keepOriginalData:fe=!1}=R||{},ke=fe?e.data:P.value,xe=vc(e.columns,ke,e.getCsvCell,e.getCsvHeader),S=new Blob([xe],{type:"text/csv;charset=utf-8"}),G=URL.createObjectURL(S);Rs(G,H.endsWith(".csv")?H:`${H}.csv`),URL.revokeObjectURL(G)},{doCheckAll:U,doUncheckAll:ne,doCheck:De,doUncheck:he,headerCheckboxDisabledRef:Te,someRowsCheckedRef:j,allRowsCheckedRef:be,mergedCheckedRowKeySetRef:Se,mergedInderminateRowKeySetRef:$e}=of(e,{selectionColumnRef:$,treeMateRef:g,paginatedDataRef:x}),{stickyExpandedRowsRef:Ke,mergedExpandedRowKeysRef:lt,renderExpandRef:ht,expandableRef:Qe,doUpdateExpandedRowKeys:X}=lf(e,g),{handleTableBodyScroll:we,handleTableHeaderScroll:re,syncScrollState:Re,setHeaderScrollLeft:Ee,leftActiveFixedColKeyRef:ze,leftActiveFixedChildrenColKeysRef:Le,rightActiveFixedColKeyRef:Z,rightActiveFixedChildrenColKeysRef:se,leftFixedColumnsRef:Oe,rightFixedColumnsRef:A,fixedColumnLeftMapRef:_e,fixedColumnRightMapRef:He}=cf(e,{bodyWidthRef:u,mainTableInstRef:c,mergedCurrentPageRef:k}),{localeRef:vt}=yn("DataTable"),et=b(()=>e.virtualScroll||e.flexHeight||e.maxHeight!==void 0||w.value?"fixed":e.tableLayout);At(rn,{props:e,treeMateRef:g,renderExpandIconRef:me(e,"renderExpandIcon"),loadingKeySetRef:F(new Set),slots:r,indentRef:me(e,"indent"),childTriggerColIndexRef:J,bodyWidthRef:u,componentId:ai(),hoverKeyRef:T,mergedClsPrefixRef:n,mergedThemeRef:d,scrollXRef:b(()=>e.scrollX),rowsRef:p,colsRef:y,paginatedDataRef:x,leftActiveFixedColKeyRef:ze,leftActiveFixedChildrenColKeysRef:Le,rightActiveFixedColKeyRef:Z,rightActiveFixedChildrenColKeysRef:se,leftFixedColumnsRef:Oe,rightFixedColumnsRef:A,fixedColumnLeftMapRef:_e,fixedColumnRightMapRef:He,mergedCurrentPageRef:k,someRowsCheckedRef:j,allRowsCheckedRef:be,mergedSortStateRef:N,mergedFilterStateRef:z,loadingRef:me(e,"loading"),rowClassNameRef:me(e,"rowClassName"),mergedCheckedRowKeySetRef:Se,mergedExpandedRowKeysRef:lt,mergedInderminateRowKeySetRef:$e,localeRef:vt,expandableRef:Qe,stickyExpandedRowsRef:Ke,rowKeyRef:me(e,"rowKey"),renderExpandRef:ht,summaryRef:me(e,"summary"),virtualScrollRef:me(e,"virtualScroll"),virtualScrollXRef:me(e,"virtualScrollX"),heightForRowRef:me(e,"heightForRow"),minRowHeightRef:me(e,"minRowHeight"),virtualScrollHeaderRef:me(e,"virtualScrollHeader"),headerHeightRef:me(e,"headerHeight"),rowPropsRef:me(e,"rowProps"),stripedRef:me(e,"striped"),checkOptionsRef:b(()=>{const{value:R}=$;return R==null?void 0:R.options}),rawPaginatedDataRef:P,filterMenuCssVarsRef:b(()=>{const{self:{actionDividerColor:R,actionPadding:H,actionButtonMargin:fe}}=d.value;return{"--n-action-padding":H,"--n-action-button-margin":fe,"--n-action-divider-color":R}}),onLoadRef:me(e,"onLoad"),mergedTableLayoutRef:et,maxHeightRef:me(e,"maxHeight"),minHeightRef:me(e,"minHeight"),flexHeightRef:me(e,"flexHeight"),headerCheckboxDisabledRef:Te,paginationBehaviorOnFilterRef:me(e,"paginationBehaviorOnFilter"),summaryPlacementRef:me(e,"summaryPlacement"),filterIconPopoverPropsRef:me(e,"filterIconPopoverProps"),scrollbarPropsRef:me(e,"scrollbarProps"),syncScrollState:Re,doUpdatePage:D,doUpdateFilters:C,getResizableWidth:f,onUnstableColumnResize:B,clearResizableWidth:v,doUpdateResizableWidth:m,deriveNextSorter:L,doCheck:De,doUncheck:he,doCheckAll:U,doUncheckAll:ne,doUpdateExpandedRowKeys:X,handleTableHeaderScroll:re,handleTableBodyScroll:we,setHeaderScrollLeft:Ee,renderCell:me(e,"renderCell")});const We={filter:Q,filters:q,clearFilters:ue,clearSorter:te,page:V,sort:_,clearFilter:ee,downloadCsv:E,scrollTo:(R,H)=>{var fe;(fe=c.value)===null||fe===void 0||fe.scrollTo(R,H)}},Ue=b(()=>{const{size:R}=e,{common:{cubicBezierEaseInOut:H},self:{borderColor:fe,tdColorHover:ke,tdColorSorting:xe,tdColorSortingModal:S,tdColorSortingPopover:G,thColorSorting:ye,thColorSortingModal:Me,thColorSortingPopover:Ze,thColor:Ne,thColorHover:I,tdColor:ae,tdTextColor:pe,thTextColor:Ie,thFontWeight:Je,thButtonColorHover:Ge,thIconColor:rt,thIconColorActive:Nt,filterSize:Yt,borderRadius:Ht,lineHeight:Rt,tdColorModal:Kt,thColorModal:Jt,borderColorModal:bt,thColorHoverModal:St,tdColorHoverModal:Bt,borderColorPopover:Dn,thColorPopover:On,tdColorPopover:Mn,tdColorHoverPopover:zn,thColorHoverPopover:In,paginationMargin:$n,emptyPadding:M,boxShadowAfter:de,boxShadowBefore:Pe,sorterSize:ut,resizableContainerSize:Wt,resizableSize:ct,loadingColor:An,loadingSize:Wn,opacityLoading:Nn,tdColorStriped:Gr,tdColorStripedModal:Xr,tdColorStripedPopover:Qr,[Ve("fontSize",R)]:Zr,[Ve("thPadding",R)]:Jr,[Ve("tdPadding",R)]:ea}}=d.value;return{"--n-font-size":Zr,"--n-th-padding":Jr,"--n-td-padding":ea,"--n-bezier":H,"--n-border-radius":Ht,"--n-line-height":Rt,"--n-border-color":fe,"--n-border-color-modal":bt,"--n-border-color-popover":Dn,"--n-th-color":Ne,"--n-th-color-hover":I,"--n-th-color-modal":Jt,"--n-th-color-hover-modal":St,"--n-th-color-popover":On,"--n-th-color-hover-popover":In,"--n-td-color":ae,"--n-td-color-hover":ke,"--n-td-color-modal":Kt,"--n-td-color-hover-modal":Bt,"--n-td-color-popover":Mn,"--n-td-color-hover-popover":zn,"--n-th-text-color":Ie,"--n-td-text-color":pe,"--n-th-font-weight":Je,"--n-th-button-color-hover":Ge,"--n-th-icon-color":rt,"--n-th-icon-color-active":Nt,"--n-filter-size":Yt,"--n-pagination-margin":$n,"--n-empty-padding":M,"--n-box-shadow-before":Pe,"--n-box-shadow-after":de,"--n-sorter-size":ut,"--n-resizable-container-size":Wt,"--n-resizable-size":ct,"--n-loading-size":Wn,"--n-loading-color":An,"--n-opacity-loading":Nn,"--n-td-color-striped":Gr,"--n-td-color-striped-modal":Xr,"--n-td-color-striped-popover":Qr,"n-td-color-sorting":xe,"n-td-color-sorting-modal":S,"n-td-color-sorting-popover":G,"n-th-color-sorting":ye,"n-th-color-sorting-modal":Me,"n-th-color-sorting-popover":Ze}}),ve=a?Mt("data-table",b(()=>e.size[0]),Ue,e):void 0,Fe=b(()=>{if(!e.pagination)return!1;if(e.paginateSinglePage)return!0;const R=Y.value,{pageCount:H}=R;return H!==void 0?H>1:R.itemCount&&R.pageSize&&R.itemCount>R.pageSize});return Object.assign({mainTableInstRef:c,mergedClsPrefix:n,rtlEnabled:l,mergedTheme:d,paginatedData:x,mergedBordered:t,mergedBottomBordered:s,mergedPagination:Y,mergedShowPagination:Fe,cssVars:a?void 0:Ue,themeClass:ve==null?void 0:ve.themeClass,onRender:ve==null?void 0:ve.onRender},We)},render(){const{mergedClsPrefix:e,themeClass:r,onRender:t,$slots:n,spinProps:a}=this;return t==null||t(),i("div",{class:[`${e}-data-table`,this.rtlEnabled&&`${e}-data-table--rtl`,r,{[`${e}-data-table--bordered`]:this.mergedBordered,[`${e}-data-table--bottom-bordered`]:this.mergedBottomBordered,[`${e}-data-table--single-line`]:this.singleLine,[`${e}-data-table--single-column`]:this.singleColumn,[`${e}-data-table--loading`]:this.loading,[`${e}-data-table--flex-height`]:this.flexHeight}],style:this.cssVars},i("div",{class:`${e}-data-table-wrapper`},i(nf,{ref:"mainTableInstRef"})),this.mergedShowPagination?i("div",{class:`${e}-data-table__pagination`},i(oc,Object.assign({theme:this.mergedTheme.peers.Pagination,themeOverrides:this.mergedTheme.peerOverrides.Pagination,disabled:this.loading},this.mergedPagination))):null,i(Kn,{name:"fade-in-scale-up-transition"},{default:()=>this.loading?i("div",{class:`${e}-data-table-loading-wrapper`},qe(n.loading,()=>[i(Va,Object.assign({clsPrefix:e,strokeWidth:20},a))])):null}))}}),qr=bn("n-date-picker"),Yn=40,pf="HH:mm:ss",ul={active:Boolean,dateFormat:String,calendarDayFormat:String,calendarHeaderYearFormat:String,calendarHeaderMonthFormat:String,calendarHeaderMonthYearSeparator:{type:String,required:!0},calendarHeaderMonthBeforeYear:{type:Boolean,default:void 0},timerPickerFormat:{type:String,value:pf},value:{type:[Array,Number],default:null},shortcuts:Object,defaultTime:[Number,String,Array],inputReadonly:Boolean,onClear:Function,onConfirm:Function,onClose:Function,onTabOut:Function,onKeydown:Function,actions:Array,onUpdateValue:{type:Function,required:!0},themeClass:String,onRender:Function,panel:Boolean,onNextMonth:Function,onPrevMonth:Function,onNextYear:Function,onPrevYear:Function};function cl(e){const{dateLocaleRef:r,timePickerSizeRef:t,timePickerPropsRef:n,localeRef:a,mergedClsPrefixRef:o,mergedThemeRef:l}=it(qr),s=b(()=>({locale:r.value.locale})),d=F(null),u=Ua();function c(){const{onClear:D}=e;D&&D()}function f(){const{onConfirm:D,value:C}=e;D&&D(C)}function v(D,C){const{onUpdateValue:B}=e;B(D,C)}function m(D=!1){const{onClose:C}=e;C&&C(D)}function p(){const{onTabOut:D}=e;D&&D()}function y(){v(null,!0),m(!0),c()}function h(){p()}function w(){(e.active||e.panel)&&nn(()=>{const{value:D}=d;if(!D)return;const C=D.querySelectorAll("[data-n-date]");C.forEach(B=>{B.classList.add("transition-disabled")}),D.offsetWidth,C.forEach(B=>{B.classList.remove("transition-disabled")})})}function g(D){D.key==="Tab"&&D.target===d.value&&u.shift&&(D.preventDefault(),p())}function k(D){const{value:C}=d;u.tab&&D.target===C&&(C!=null&&C.contains(D.relatedTarget))&&p()}let x=null,P=!1;function $(){x=e.value,P=!0}function T(){P=!1}function Y(){P&&(v(x,!1),P=!1)}function z(D){return typeof D=="function"?D():D}const N=F(!1);function J(){N.value=!N.value}return{mergedTheme:l,mergedClsPrefix:o,dateFnsOptions:s,timePickerSize:t,timePickerProps:n,selfRef:d,locale:a,doConfirm:f,doClose:m,doUpdateValue:v,doTabOut:p,handleClearClick:y,handleFocusDetectorFocus:h,disableTransitionOneTick:w,handlePanelKeyDown:g,handlePanelFocus:k,cachePendingValue:$,clearPendingValue:T,restorePendingValue:Y,getShortcutValue:z,handleShortcutMouseleave:Y,showMonthYearPanel:N,handleOpenQuickSelectMonthPanel:J}}const eo=Object.assign(Object.assign({},ul),{defaultCalendarStartTime:Number,actions:{type:Array,default:()=>["now","clear","confirm"]}});function to(e,r){var t;const n=cl(e),{isValueInvalidRef:a,isDateDisabledRef:o,isDateInvalidRef:l,isTimeInvalidRef:s,isDateTimeInvalidRef:d,isHourDisabledRef:u,isMinuteDisabledRef:c,isSecondDisabledRef:f,localeRef:v,firstDayOfWeekRef:m,datePickerSlots:p,yearFormatRef:y,monthFormatRef:h,quarterFormatRef:w,yearRangeRef:g}=it(qr),k={isValueInvalid:a,isDateDisabled:o,isDateInvalid:l,isTimeInvalid:s,isDateTimeInvalid:d,isHourDisabled:u,isMinuteDisabled:c,isSecondDisabled:f},x=b(()=>e.dateFormat||v.value.dateFormat),P=b(()=>e.calendarDayFormat||v.value.dayFormat),$=F(e.value===null||Array.isArray(e.value)?"":nt(e.value,x.value)),T=F(e.value===null||Array.isArray(e.value)?(t=e.defaultCalendarStartTime)!==null&&t!==void 0?t:Date.now():e.value),Y=F(null),z=F(null),N=F(null),J=F(Date.now()),D=b(()=>{var A;return _a(T.value,e.value,J.value,(A=m.value)!==null&&A!==void 0?A:v.value.firstDayOfWeek,!1,r==="week")}),C=b(()=>{const{value:A}=e;return Da(T.value,Array.isArray(A)?null:A,J.value,{monthFormat:h.value})}),B=b(()=>{const{value:A}=e;return Ma(Array.isArray(A)?null:A,J.value,{yearFormat:y.value},g)}),L=b(()=>{const{value:A}=e;return Oa(T.value,Array.isArray(A)?null:A,J.value,{quarterFormat:w.value})}),Q=b(()=>D.value.slice(0,7).map(A=>{const{ts:_e}=A;return nt(_e,P.value,n.dateFnsOptions.value)})),q=b(()=>nt(T.value,e.calendarHeaderMonthFormat||v.value.monthFormat,n.dateFnsOptions.value)),ee=b(()=>nt(T.value,e.calendarHeaderYearFormat||v.value.yearFormat,n.dateFnsOptions.value)),ue=b(()=>{var A;return(A=e.calendarHeaderMonthBeforeYear)!==null&&A!==void 0?A:v.value.monthBeforeYear});gt(T,(A,_e)=>{(r==="date"||r==="datetime")&&(Rr(A,_e)||n.disableTransitionOneTick())}),gt(b(()=>e.value),A=>{A!==null&&!Array.isArray(A)?($.value=nt(A,x.value,n.dateFnsOptions.value),T.value=A):$.value=""});function te(A){var _e;if(r==="datetime")return ce(qa(A));if(r==="month")return ce(fn(A));if(r==="year")return ce(kr(A));if(r==="quarter")return ce(mr(A));if(r==="week"){const He=(((_e=m.value)!==null&&_e!==void 0?_e:v.value.firstDayOfWeek)+1)%7;return ce(pn(A,{weekStartsOn:He}))}return ce(rr(A))}function V(A,_e){const{isDateDisabled:{value:He}}=k;return He?He(A,_e):!1}function _(A){const _e=Et(A,x.value,new Date,n.dateFnsOptions.value);if(Gt(_e)){if(e.value===null)n.doUpdateValue(ce(te(Date.now())),e.panel);else if(!Array.isArray(e.value)){const He=_t(e.value,{year:mt(_e),month:st(_e),date:qt(_e)});n.doUpdateValue(ce(te(ce(He))),e.panel)}}else $.value=A}function E(){const A=Et($.value,x.value,new Date,n.dateFnsOptions.value);if(Gt(A)){if(e.value===null)n.doUpdateValue(ce(te(Date.now())),!1);else if(!Array.isArray(e.value)){const _e=_t(e.value,{year:mt(A),month:st(A),date:qt(A)});n.doUpdateValue(ce(te(ce(_e))),!1)}}else $e()}function U(){n.doUpdateValue(null,!0),$.value="",n.doClose(!0),n.handleClearClick()}function ne(){n.doUpdateValue(ce(te(Date.now())),!0);const A=Date.now();T.value=A,n.doClose(!0),e.panel&&(r==="month"||r==="quarter"||r==="year")&&(n.disableTransitionOneTick(),se(A))}const De=F(null);function he(A){A.type==="date"&&r==="week"&&(De.value=te(ce(A.ts)))}function Te(A){return A.type==="date"&&r==="week"?te(ce(A.ts))===De.value:!1}function j(A){if(V(A.ts,A.type==="date"?{type:"date",year:A.dateObject.year,month:A.dateObject.month,date:A.dateObject.date}:A.type==="month"?{type:"month",year:A.dateObject.year,month:A.dateObject.month}:A.type==="year"?{type:"year",year:A.dateObject.year}:{type:"quarter",year:A.dateObject.year,quarter:A.dateObject.quarter}))return;let _e;if(e.value!==null&&!Array.isArray(e.value)?_e=e.value:_e=Date.now(),r==="datetime"&&e.defaultTime!==null&&!Array.isArray(e.defaultTime)){const He=Mr(e.defaultTime);He&&(_e=ce(_t(_e,He)))}switch(_e=ce(A.type==="quarter"&&A.dateObject.quarter?$u(Ta(_e,A.dateObject.year),A.dateObject.quarter):_t(_e,A.dateObject)),n.doUpdateValue(te(_e),e.panel||r==="date"||r==="week"||r==="year"),r){case"date":case"week":n.doClose();break;case"year":e.panel&&n.disableTransitionOneTick(),n.doClose();break;case"month":n.disableTransitionOneTick(),se(_e);break;case"quarter":n.disableTransitionOneTick(),se(_e);break}}function be(A,_e){let He;e.value!==null&&!Array.isArray(e.value)?He=e.value:He=Date.now(),He=ce(A.type==="month"?Ga(He,A.dateObject.month):Ta(He,A.dateObject.year)),_e(He),se(He)}function Se(A){T.value=A}function $e(A){if(e.value===null||Array.isArray(e.value)){$.value="";return}A===void 0&&(A=e.value),$.value=nt(A,x.value,n.dateFnsOptions.value)}function Ke(){k.isDateInvalid.value||k.isTimeInvalid.value||(n.doConfirm(),lt())}function lt(){e.active&&n.doClose()}function ht(){var A;T.value=ce(Sa(T.value,1)),(A=e.onNextYear)===null||A===void 0||A.call(e)}function Qe(){var A;T.value=ce(Sa(T.value,-1)),(A=e.onPrevYear)===null||A===void 0||A.call(e)}function X(){var A;T.value=ce(Tt(T.value,1)),(A=e.onNextMonth)===null||A===void 0||A.call(e)}function we(){var A;T.value=ce(Tt(T.value,-1)),(A=e.onPrevMonth)===null||A===void 0||A.call(e)}function re(){const{value:A}=Y;return(A==null?void 0:A.listElRef)||null}function Re(){const{value:A}=Y;return(A==null?void 0:A.itemsElRef)||null}function Ee(){var A;(A=z.value)===null||A===void 0||A.sync()}function ze(A){A!==null&&n.doUpdateValue(A,e.panel)}function Le(A){n.cachePendingValue();const _e=n.getShortcutValue(A);typeof _e=="number"&&n.doUpdateValue(_e,!1)}function Z(A){const _e=n.getShortcutValue(A);typeof _e=="number"&&(n.doUpdateValue(_e,e.panel),n.clearPendingValue(),Ke())}function se(A){const{value:_e}=e;if(N.value){const He=st(A===void 0?_e===null?Date.now():_e:A);N.value.scrollTo({top:He*Yn})}if(Y.value){const He=mt(A===void 0?_e===null?Date.now():_e:A)-g.value[0];Y.value.scrollTo({top:He*Yn})}}const Oe={monthScrollbarRef:N,yearScrollbarRef:z,yearVlRef:Y};return Object.assign(Object.assign(Object.assign(Object.assign({dateArray:D,monthArray:C,yearArray:B,quarterArray:L,calendarYear:ee,calendarMonth:q,weekdays:Q,calendarMonthBeforeYear:ue,mergedIsDateDisabled:V,nextYear:ht,prevYear:Qe,nextMonth:X,prevMonth:we,handleNowClick:ne,handleConfirmClick:Ke,handleSingleShortcutMouseenter:Le,handleSingleShortcutClick:Z},k),n),Oe),{handleDateClick:j,handleDateInputBlur:E,handleDateInput:_,handleDateMouseEnter:he,isWeekHovered:Te,handleTimePickerChange:ze,clearSelectedDateTime:U,virtualListContainer:re,virtualListContent:Re,handleVirtualListScroll:Ee,timePickerSize:n.timePickerSize,dateInputValue:$,datePickerSlots:p,handleQuickMonthClick:be,justifyColumnsScrollState:se,calendarValue:T,onUpdateCalendarValue:Se})}const fl=ge({name:"MonthPanel",props:Object.assign(Object.assign({},eo),{type:{type:String,required:!0},useAsQuickJump:Boolean}),setup(e){const r=to(e,e.type),{dateLocaleRef:t}=yn("DatePicker"),n=l=>{switch(l.type){case"year":return Ui(l.dateObject.year,l.yearFormat,t.value.locale);case"month":return Hi(l.dateObject.month,l.monthFormat,t.value.locale);case"quarter":return ji(l.dateObject.quarter,l.quarterFormat,t.value.locale)}},{useAsQuickJump:a}=e,o=(l,s,d)=>{const{mergedIsDateDisabled:u,handleDateClick:c,handleQuickMonthClick:f}=r;return i("div",{"data-n-date":!0,key:s,class:[`${d}-date-panel-month-calendar__picker-col-item`,l.isCurrent&&`${d}-date-panel-month-calendar__picker-col-item--current`,l.selected&&`${d}-date-panel-month-calendar__picker-col-item--selected`,!a&&u(l.ts,l.type==="year"?{type:"year",year:l.dateObject.year}:l.type==="month"?{type:"month",year:l.dateObject.year,month:l.dateObject.month}:l.type==="quarter"?{type:"month",year:l.dateObject.year,month:l.dateObject.quarter}:null)&&`${d}-date-panel-month-calendar__picker-col-item--disabled`],onClick:()=>{a?f(l,v=>{e.onUpdateValue(v,!1)}):c(l)}},n(l))};return Qt(()=>{r.justifyColumnsScrollState()}),Object.assign(Object.assign({},r),{renderItem:o})},render(){const{mergedClsPrefix:e,mergedTheme:r,shortcuts:t,actions:n,renderItem:a,type:o,onRender:l}=this;return l==null||l(),i("div",{ref:"selfRef",tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--month`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onFocus:this.handlePanelFocus,onKeydown:this.handlePanelKeyDown},i("div",{class:`${e}-date-panel-month-calendar`},i(Ut,{ref:"yearScrollbarRef",class:`${e}-date-panel-month-calendar__picker-col`,theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar,container:this.virtualListContainer,content:this.virtualListContent,horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>i(tr,{ref:"yearVlRef",items:this.yearArray,itemSize:Yn,showScrollbar:!1,keyField:"ts",onScroll:this.handleVirtualListScroll,paddingBottom:4},{default:({item:s,index:d})=>a(s,d,e)})}),o==="month"||o==="quarter"?i("div",{class:`${e}-date-panel-month-calendar__picker-col`},i(Ut,{ref:"monthScrollbarRef",theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar},{default:()=>[(o==="month"?this.monthArray:this.quarterArray).map((s,d)=>a(s,d,e)),i("div",{class:`${e}-date-panel-${o}-calendar__padding`})]})):null),this.datePickerSlots.footer?i("div",{class:`${e}-date-panel-footer`},{default:this.datePickerSlots.footer}):null,n!=null&&n.length||t?i("div",{class:`${e}-date-panel-actions`},i("div",{class:`${e}-date-panel-actions__prefix`},t&&Object.keys(t).map(s=>{const d=t[s];return Array.isArray(d)?null:i(sn,{size:"tiny",onMouseenter:()=>{this.handleSingleShortcutMouseenter(d)},onClick:()=>{this.handleSingleShortcutClick(d)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>s})})),i("div",{class:`${e}-date-panel-actions__suffix`},n!=null&&n.includes("clear")?Vt(this.$slots.now,{onClear:this.handleClearClick,text:this.locale.clear},()=>[i(ft,{theme:r.peers.Button,themeOverrides:r.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,n!=null&&n.includes("now")?Vt(this.$slots.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[i(ft,{theme:r.peers.Button,themeOverrides:r.peerOverrides.Button,size:"tiny",onClick:this.handleNowClick},{default:()=>this.locale.now})]):null,n!=null&&n.includes("confirm")?Vt(this.$slots.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isDateInvalid,text:this.locale.confirm},()=>[i(ft,{theme:r.peers.Button,themeOverrides:r.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isDateInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,i(_n,{onFocus:this.handleFocusDetectorFocus}))}}),ar=ge({props:{mergedClsPrefix:{type:String,required:!0},value:Number,monthBeforeYear:{type:Boolean,required:!0},monthYearSeparator:{type:String,required:!0},calendarMonth:{type:String,required:!0},calendarYear:{type:String,required:!0},onUpdateValue:{type:Function,required:!0}},setup(){const e=F(null),r=F(null),t=F(!1);function n(o){var l;t.value&&!(!((l=e.value)===null||l===void 0)&&l.contains(Ur(o)))&&(t.value=!1)}function a(){t.value=!t.value}return{show:t,triggerRef:e,monthPanelRef:r,handleHeaderClick:a,handleClickOutside:n}},render(){const{handleClickOutside:e,mergedClsPrefix:r}=this;return i("div",{class:`${r}-date-panel-month__month-year`,ref:"triggerRef"},i(wr,null,{default:()=>[i(xr,null,{default:()=>i("div",{class:[`${r}-date-panel-month__text`,this.show&&`${r}-date-panel-month__text--active`],onClick:this.handleHeaderClick},this.monthBeforeYear?[this.calendarMonth,this.monthYearSeparator,this.calendarYear]:[this.calendarYear,this.monthYearSeparator,this.calendarMonth])}),i(Cr,{show:this.show,teleportDisabled:!0},{default:()=>i(Kn,{name:"fade-in-scale-up-transition",appear:!0},{default:()=>this.show?Hr(i(fl,{ref:"monthPanelRef",onUpdateValue:this.onUpdateValue,actions:[],calendarHeaderMonthYearSeparator:this.monthYearSeparator,type:"month",key:"month",useAsQuickJump:!0,value:this.value}),[[hr,e,void 0,{capture:!0}]]):null})})]}))}}),gf=ge({name:"DatePanel",props:Object.assign(Object.assign({},eo),{type:{type:String,required:!0}}),setup(e){return to(e,e.type)},render(){var e,r,t;const{mergedClsPrefix:n,mergedTheme:a,shortcuts:o,onRender:l,$slots:s,type:d}=this;return l==null||l(),i("div",{ref:"selfRef",tabindex:0,class:[`${n}-date-panel`,`${n}-date-panel--${d}`,!this.panel&&`${n}-date-panel--shadow`,this.themeClass],onFocus:this.handlePanelFocus,onKeydown:this.handlePanelKeyDown},i("div",{class:`${n}-date-panel-calendar`},i("div",{class:`${n}-date-panel-month`},i("div",{class:`${n}-date-panel-month__fast-prev`,onClick:this.prevYear},qe(s["prev-year"],()=>[i(Sn,null)])),i("div",{class:`${n}-date-panel-month__prev`,onClick:this.prevMonth},qe(s["prev-month"],()=>[i(Rn,null)])),i(ar,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.calendarValue,onUpdateValue:this.onUpdateCalendarValue,mergedClsPrefix:n,calendarMonth:this.calendarMonth,calendarYear:this.calendarYear}),i("div",{class:`${n}-date-panel-month__next`,onClick:this.nextMonth},qe(s["next-month"],()=>[i(Fn,null)])),i("div",{class:`${n}-date-panel-month__fast-next`,onClick:this.nextYear},qe(s["next-year"],()=>[i(Pn,null)]))),i("div",{class:`${n}-date-panel-weekdays`},this.weekdays.map(u=>i("div",{key:u,class:`${n}-date-panel-weekdays__day`},u))),i("div",{class:`${n}-date-panel-dates`},this.dateArray.map((u,c)=>i("div",{"data-n-date":!0,key:c,class:[`${n}-date-panel-date`,{[`${n}-date-panel-date--current`]:u.isCurrentDate,[`${n}-date-panel-date--selected`]:u.selected,[`${n}-date-panel-date--excluded`]:!u.inCurrentMonth,[`${n}-date-panel-date--disabled`]:this.mergedIsDateDisabled(u.ts,{type:"date",year:u.dateObject.year,month:u.dateObject.month,date:u.dateObject.date}),[`${n}-date-panel-date--week-hovered`]:this.isWeekHovered(u),[`${n}-date-panel-date--week-selected`]:u.inSelectedWeek}],onClick:()=>{this.handleDateClick(u)},onMouseenter:()=>{this.handleDateMouseEnter(u)}},i("div",{class:`${n}-date-panel-date__trigger`}),u.dateObject.date,u.isCurrentDate?i("div",{class:`${n}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?i("div",{class:`${n}-date-panel-footer`},this.datePickerSlots.footer()):null,!((e=this.actions)===null||e===void 0)&&e.length||o?i("div",{class:`${n}-date-panel-actions`},i("div",{class:`${n}-date-panel-actions__prefix`},o&&Object.keys(o).map(u=>{const c=o[u];return Array.isArray(c)?null:i(sn,{size:"tiny",onMouseenter:()=>{this.handleSingleShortcutMouseenter(c)},onClick:()=>{this.handleSingleShortcutClick(c)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>u})})),i("div",{class:`${n}-date-panel-actions__suffix`},!((r=this.actions)===null||r===void 0)&&r.includes("clear")?Vt(this.$slots.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[i(ft,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,!((t=this.actions)===null||t===void 0)&&t.includes("now")?Vt(this.$slots.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[i(ft,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.handleNowClick},{default:()=>this.locale.now})]):null)):null,i(_n,{onFocus:this.handleFocusDetectorFocus}))}}),no=Object.assign(Object.assign({},ul),{defaultCalendarStartTime:Number,defaultCalendarEndTime:Number,bindCalendarMonths:Boolean,actions:{type:Array,default:()=>["clear","confirm"]}});function ro(e,r){var t,n;const{isDateDisabledRef:a,isStartHourDisabledRef:o,isEndHourDisabledRef:l,isStartMinuteDisabledRef:s,isEndMinuteDisabledRef:d,isStartSecondDisabledRef:u,isEndSecondDisabledRef:c,isStartDateInvalidRef:f,isEndDateInvalidRef:v,isStartTimeInvalidRef:m,isEndTimeInvalidRef:p,isStartValueInvalidRef:y,isEndValueInvalidRef:h,isRangeInvalidRef:w,localeRef:g,rangesRef:k,closeOnSelectRef:x,updateValueOnCloseRef:P,firstDayOfWeekRef:$,datePickerSlots:T,monthFormatRef:Y,yearFormatRef:z,quarterFormatRef:N,yearRangeRef:J}=it(qr),D={isDateDisabled:a,isStartHourDisabled:o,isEndHourDisabled:l,isStartMinuteDisabled:s,isEndMinuteDisabled:d,isStartSecondDisabled:u,isEndSecondDisabled:c,isStartDateInvalid:f,isEndDateInvalid:v,isStartTimeInvalid:m,isEndTimeInvalid:p,isStartValueInvalid:y,isEndValueInvalid:h,isRangeInvalid:w},C=cl(e),B=F(null),L=F(null),Q=F(null),q=F(null),ee=F(null),ue=F(null),te=F(null),V=F(null),{value:_}=e,E=(t=e.defaultCalendarStartTime)!==null&&t!==void 0?t:Array.isArray(_)&&typeof _[0]=="number"?_[0]:Date.now(),U=F(E),ne=F((n=e.defaultCalendarEndTime)!==null&&n!==void 0?n:Array.isArray(_)&&typeof _[1]=="number"?_[1]:ce(Tt(E,1)));We(!0);const De=F(Date.now()),he=F(!1),Te=F(0),j=b(()=>e.dateFormat||g.value.dateFormat),be=b(()=>e.calendarDayFormat||g.value.dayFormat),Se=F(Array.isArray(_)?nt(_[0],j.value,C.dateFnsOptions.value):""),$e=F(Array.isArray(_)?nt(_[1],j.value,C.dateFnsOptions.value):""),Ke=b(()=>he.value?"end":"start"),lt=b(()=>{var M;return _a(U.value,e.value,De.value,(M=$.value)!==null&&M!==void 0?M:g.value.firstDayOfWeek)}),ht=b(()=>{var M;return _a(ne.value,e.value,De.value,(M=$.value)!==null&&M!==void 0?M:g.value.firstDayOfWeek)}),Qe=b(()=>lt.value.slice(0,7).map(M=>{const{ts:de}=M;return nt(de,be.value,C.dateFnsOptions.value)})),X=b(()=>nt(U.value,e.calendarHeaderMonthFormat||g.value.monthFormat,C.dateFnsOptions.value)),we=b(()=>nt(ne.value,e.calendarHeaderMonthFormat||g.value.monthFormat,C.dateFnsOptions.value)),re=b(()=>nt(U.value,e.calendarHeaderYearFormat||g.value.yearFormat,C.dateFnsOptions.value)),Re=b(()=>nt(ne.value,e.calendarHeaderYearFormat||g.value.yearFormat,C.dateFnsOptions.value)),Ee=b(()=>{const{value:M}=e;return Array.isArray(M)?M[0]:null}),ze=b(()=>{const{value:M}=e;return Array.isArray(M)?M[1]:null}),Le=b(()=>{const{shortcuts:M}=e;return M||k.value}),Z=b(()=>Ma(Gn(e.value,"start"),De.value,{yearFormat:z.value},J)),se=b(()=>Ma(Gn(e.value,"end"),De.value,{yearFormat:z.value},J)),Oe=b(()=>{const M=Gn(e.value,"start");return Oa(M??Date.now(),M,De.value,{quarterFormat:N.value})}),A=b(()=>{const M=Gn(e.value,"end");return Oa(M??Date.now(),M,De.value,{quarterFormat:N.value})}),_e=b(()=>{const M=Gn(e.value,"start");return Da(M??Date.now(),M,De.value,{monthFormat:Y.value})}),He=b(()=>{const M=Gn(e.value,"end");return Da(M??Date.now(),M,De.value,{monthFormat:Y.value})}),vt=b(()=>{var M;return(M=e.calendarHeaderMonthBeforeYear)!==null&&M!==void 0?M:g.value.monthBeforeYear});gt(b(()=>e.value),M=>{if(M!==null&&Array.isArray(M)){const[de,Pe]=M;Se.value=nt(de,j.value,C.dateFnsOptions.value),$e.value=nt(Pe,j.value,C.dateFnsOptions.value),he.value||Me(M)}else Se.value="",$e.value=""});function et(M,de){(r==="daterange"||r==="datetimerange")&&(mt(M)!==mt(de)||st(M)!==st(de))&&C.disableTransitionOneTick()}gt(U,et),gt(ne,et);function We(M){const de=fn(U.value),Pe=fn(ne.value);(e.bindCalendarMonths||de>=Pe)&&(M?ne.value=ce(Tt(de,1)):U.value=ce(Tt(Pe,-1)))}function Ue(){U.value=ce(Tt(U.value,12)),We(!0)}function ve(){U.value=ce(Tt(U.value,-12)),We(!0)}function Fe(){U.value=ce(Tt(U.value,1)),We(!0)}function R(){U.value=ce(Tt(U.value,-1)),We(!0)}function H(){ne.value=ce(Tt(ne.value,12)),We(!1)}function fe(){ne.value=ce(Tt(ne.value,-12)),We(!1)}function ke(){ne.value=ce(Tt(ne.value,1)),We(!1)}function xe(){ne.value=ce(Tt(ne.value,-1)),We(!1)}function S(M){U.value=M,We(!0)}function G(M){ne.value=M,We(!1)}function ye(M){const de=a.value;if(!de)return!1;if(!Array.isArray(e.value)||Ke.value==="start")return de(M,"start",null);{const{value:Pe}=Te;return M=Te.value?Je(Te.value,M.ts,"wipPreview"):Je(M.ts,Te.value,"wipPreview")}}function I(){w.value||(C.doConfirm(),ae())}function ae(){he.value=!1,e.active&&C.doClose()}function pe(M){typeof M!="number"&&(M=ce(M)),e.value===null?C.doUpdateValue([M,M],e.panel):Array.isArray(e.value)&&C.doUpdateValue([M,Math.max(e.value[1],M)],e.panel)}function Ie(M){typeof M!="number"&&(M=ce(M)),e.value===null?C.doUpdateValue([M,M],e.panel):Array.isArray(e.value)&&C.doUpdateValue([Math.min(e.value[0],M),M],e.panel)}function Je(M,de,Pe){if(typeof M!="number"&&(M=ce(M)),Pe!=="shortcutPreview"){let ut,Wt;if(r==="datetimerange"){const{defaultTime:ct}=e;Array.isArray(ct)?(ut=Mr(ct[0]),Wt=Mr(ct[1])):(ut=Mr(ct),Wt=ut)}ut&&(M=ce(_t(M,ut))),Wt&&(de=ce(_t(de,Wt)))}C.doUpdateValue([M,de],e.panel&&Pe==="done")}function Ge(M){return ce(r==="datetimerange"?qa(M):r==="monthrange"?fn(M):rr(M))}function rt(M){const de=Et(M,j.value,new Date,C.dateFnsOptions.value);if(Gt(de))if(e.value){if(Array.isArray(e.value)){const Pe=_t(e.value[0],{year:mt(de),month:st(de),date:qt(de)});pe(Ge(ce(Pe)))}}else{const Pe=_t(new Date,{year:mt(de),month:st(de),date:qt(de)});pe(Ge(ce(Pe)))}else Se.value=M}function Nt(M){const de=Et(M,j.value,new Date,C.dateFnsOptions.value);if(Gt(de)){if(e.value===null){const Pe=_t(new Date,{year:mt(de),month:st(de),date:qt(de)});Ie(Ge(ce(Pe)))}else if(Array.isArray(e.value)){const Pe=_t(e.value[1],{year:mt(de),month:st(de),date:qt(de)});Ie(Ge(ce(Pe)))}}else $e.value=M}function Yt(){const M=Et(Se.value,j.value,new Date,C.dateFnsOptions.value),{value:de}=e;if(Gt(M)){if(de===null){const Pe=_t(new Date,{year:mt(M),month:st(M),date:qt(M)});pe(Ge(ce(Pe)))}else if(Array.isArray(de)){const Pe=_t(de[0],{year:mt(M),month:st(M),date:qt(M)});pe(Ge(ce(Pe)))}}else Rt()}function Ht(){const M=Et($e.value,j.value,new Date,C.dateFnsOptions.value),{value:de}=e;if(Gt(M)){if(de===null){const Pe=_t(new Date,{year:mt(M),month:st(M),date:qt(M)});Ie(Ge(ce(Pe)))}else if(Array.isArray(de)){const Pe=_t(de[1],{year:mt(M),month:st(M),date:qt(M)});Ie(Ge(ce(Pe)))}}else Rt()}function Rt(M){const{value:de}=e;if(de===null||!Array.isArray(de)){Se.value="",$e.value="";return}M===void 0&&(M=de),Se.value=nt(M[0],j.value,C.dateFnsOptions.value),$e.value=nt(M[1],j.value,C.dateFnsOptions.value)}function Kt(M){M!==null&&pe(M)}function Jt(M){M!==null&&Ie(M)}function bt(M){C.cachePendingValue();const de=C.getShortcutValue(M);Array.isArray(de)&&Je(de[0],de[1],"shortcutPreview")}function St(M){const de=C.getShortcutValue(M);Array.isArray(de)&&(Je(de[0],de[1],"done"),C.clearPendingValue(),I())}function Bt(M,de){const Pe=M===void 0?e.value:M;if(M===void 0||de==="start"){if(te.value){const ut=Array.isArray(Pe)?st(Pe[0]):st(Date.now());te.value.scrollTo({debounce:!1,index:ut,elSize:Yn})}if(ee.value){const ut=(Array.isArray(Pe)?mt(Pe[0]):mt(Date.now()))-J.value[0];ee.value.scrollTo({index:ut,debounce:!1})}}if(M===void 0||de==="end"){if(V.value){const ut=Array.isArray(Pe)?st(Pe[1]):st(Date.now());V.value.scrollTo({debounce:!1,index:ut,elSize:Yn})}if(ue.value){const ut=(Array.isArray(Pe)?mt(Pe[1]):mt(Date.now()))-J.value[0];ue.value.scrollTo({index:ut,debounce:!1})}}}function Dn(M,de){const{value:Pe}=e,ut=!Array.isArray(Pe),Wt=M.type==="year"&&r!=="yearrange"?ut?_t(M.ts,{month:st(r==="quarterrange"?mr(new Date):new Date)}).valueOf():_t(M.ts,{month:st(r==="quarterrange"?mr(Pe[de==="start"?0:1]):Pe[de==="start"?0:1])}).valueOf():M.ts;if(ut){const Wn=Ge(Wt),Nn=[Wn,Wn];C.doUpdateValue(Nn,e.panel),Bt(Nn,"start"),Bt(Nn,"end"),C.disableTransitionOneTick();return}const ct=[Pe[0],Pe[1]];let An=!1;switch(de==="start"?(ct[0]=Ge(Wt),ct[0]>ct[1]&&(ct[1]=ct[0],An=!0)):(ct[1]=Ge(Wt),ct[0]>ct[1]&&(ct[0]=ct[1],An=!0)),C.doUpdateValue(ct,e.panel),r){case"monthrange":case"quarterrange":C.disableTransitionOneTick(),An?(Bt(ct,"start"),Bt(ct,"end")):Bt(ct,de);break;case"yearrange":C.disableTransitionOneTick(),Bt(ct,"start"),Bt(ct,"end")}}function On(){var M;(M=Q.value)===null||M===void 0||M.sync()}function Mn(){var M;(M=q.value)===null||M===void 0||M.sync()}function zn(M){var de,Pe;return M==="start"?((de=ee.value)===null||de===void 0?void 0:de.listElRef)||null:((Pe=ue.value)===null||Pe===void 0?void 0:Pe.listElRef)||null}function In(M){var de,Pe;return M==="start"?((de=ee.value)===null||de===void 0?void 0:de.itemsElRef)||null:((Pe=ue.value)===null||Pe===void 0?void 0:Pe.itemsElRef)||null}const $n={startYearVlRef:ee,endYearVlRef:ue,startMonthScrollbarRef:te,endMonthScrollbarRef:V,startYearScrollbarRef:Q,endYearScrollbarRef:q};return Object.assign(Object.assign(Object.assign(Object.assign({startDatesElRef:B,endDatesElRef:L,handleDateClick:Ze,handleColItemClick:Dn,handleDateMouseEnter:Ne,handleConfirmClick:I,startCalendarPrevYear:ve,startCalendarPrevMonth:R,startCalendarNextYear:Ue,startCalendarNextMonth:Fe,endCalendarPrevYear:fe,endCalendarPrevMonth:xe,endCalendarNextMonth:ke,endCalendarNextYear:H,mergedIsDateDisabled:ye,changeStartEndTime:Je,ranges:k,calendarMonthBeforeYear:vt,startCalendarMonth:X,startCalendarYear:re,endCalendarMonth:we,endCalendarYear:Re,weekdays:Qe,startDateArray:lt,endDateArray:ht,startYearArray:Z,startMonthArray:_e,startQuarterArray:Oe,endYearArray:se,endMonthArray:He,endQuarterArray:A,isSelecting:he,handleRangeShortcutMouseenter:bt,handleRangeShortcutClick:St},C),D),$n),{startDateDisplayString:Se,endDateInput:$e,timePickerSize:C.timePickerSize,startTimeValue:Ee,endTimeValue:ze,datePickerSlots:T,shortcuts:Le,startCalendarDateTime:U,endCalendarDateTime:ne,justifyColumnsScrollState:Bt,handleFocusDetectorFocus:C.handleFocusDetectorFocus,handleStartTimePickerChange:Kt,handleEndTimePickerChange:Jt,handleStartDateInput:rt,handleStartDateInputBlur:Yt,handleEndDateInput:Nt,handleEndDateInputBlur:Ht,handleStartYearVlScroll:On,handleEndYearVlScroll:Mn,virtualListContainer:zn,virtualListContent:In,onUpdateStartCalendarValue:S,onUpdateEndCalendarValue:G})}const bf=ge({name:"DateRangePanel",props:no,setup(e){return ro(e,"daterange")},render(){var e,r,t;const{mergedClsPrefix:n,mergedTheme:a,shortcuts:o,onRender:l,$slots:s}=this;return l==null||l(),i("div",{ref:"selfRef",tabindex:0,class:[`${n}-date-panel`,`${n}-date-panel--daterange`,!this.panel&&`${n}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},i("div",{ref:"startDatesElRef",class:`${n}-date-panel-calendar ${n}-date-panel-calendar--start`},i("div",{class:`${n}-date-panel-month`},i("div",{class:`${n}-date-panel-month__fast-prev`,onClick:this.startCalendarPrevYear},qe(s["prev-year"],()=>[i(Sn,null)])),i("div",{class:`${n}-date-panel-month__prev`,onClick:this.startCalendarPrevMonth},qe(s["prev-month"],()=>[i(Rn,null)])),i(ar,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.startCalendarDateTime,onUpdateValue:this.onUpdateStartCalendarValue,mergedClsPrefix:n,calendarMonth:this.startCalendarMonth,calendarYear:this.startCalendarYear}),i("div",{class:`${n}-date-panel-month__next`,onClick:this.startCalendarNextMonth},qe(s["next-month"],()=>[i(Fn,null)])),i("div",{class:`${n}-date-panel-month__fast-next`,onClick:this.startCalendarNextYear},qe(s["next-year"],()=>[i(Pn,null)]))),i("div",{class:`${n}-date-panel-weekdays`},this.weekdays.map(d=>i("div",{key:d,class:`${n}-date-panel-weekdays__day`},d))),i("div",{class:`${n}-date-panel__divider`}),i("div",{class:`${n}-date-panel-dates`},this.startDateArray.map((d,u)=>i("div",{"data-n-date":!0,key:u,class:[`${n}-date-panel-date`,{[`${n}-date-panel-date--excluded`]:!d.inCurrentMonth,[`${n}-date-panel-date--current`]:d.isCurrentDate,[`${n}-date-panel-date--selected`]:d.selected,[`${n}-date-panel-date--covered`]:d.inSpan,[`${n}-date-panel-date--start`]:d.startOfSpan,[`${n}-date-panel-date--end`]:d.endOfSpan,[`${n}-date-panel-date--disabled`]:this.mergedIsDateDisabled(d.ts)}],onClick:()=>{this.handleDateClick(d)},onMouseenter:()=>{this.handleDateMouseEnter(d)}},i("div",{class:`${n}-date-panel-date__trigger`}),d.dateObject.date,d.isCurrentDate?i("div",{class:`${n}-date-panel-date__sup`}):null)))),i("div",{class:`${n}-date-panel__vertical-divider`}),i("div",{ref:"endDatesElRef",class:`${n}-date-panel-calendar ${n}-date-panel-calendar--end`},i("div",{class:`${n}-date-panel-month`},i("div",{class:`${n}-date-panel-month__fast-prev`,onClick:this.endCalendarPrevYear},qe(s["prev-year"],()=>[i(Sn,null)])),i("div",{class:`${n}-date-panel-month__prev`,onClick:this.endCalendarPrevMonth},qe(s["prev-month"],()=>[i(Rn,null)])),i(ar,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.endCalendarDateTime,onUpdateValue:this.onUpdateEndCalendarValue,mergedClsPrefix:n,calendarMonth:this.endCalendarMonth,calendarYear:this.endCalendarYear}),i("div",{class:`${n}-date-panel-month__next`,onClick:this.endCalendarNextMonth},qe(s["next-month"],()=>[i(Fn,null)])),i("div",{class:`${n}-date-panel-month__fast-next`,onClick:this.endCalendarNextYear},qe(s["next-year"],()=>[i(Pn,null)]))),i("div",{class:`${n}-date-panel-weekdays`},this.weekdays.map(d=>i("div",{key:d,class:`${n}-date-panel-weekdays__day`},d))),i("div",{class:`${n}-date-panel__divider`}),i("div",{class:`${n}-date-panel-dates`},this.endDateArray.map((d,u)=>i("div",{"data-n-date":!0,key:u,class:[`${n}-date-panel-date`,{[`${n}-date-panel-date--excluded`]:!d.inCurrentMonth,[`${n}-date-panel-date--current`]:d.isCurrentDate,[`${n}-date-panel-date--selected`]:d.selected,[`${n}-date-panel-date--covered`]:d.inSpan,[`${n}-date-panel-date--start`]:d.startOfSpan,[`${n}-date-panel-date--end`]:d.endOfSpan,[`${n}-date-panel-date--disabled`]:this.mergedIsDateDisabled(d.ts)}],onClick:()=>{this.handleDateClick(d)},onMouseenter:()=>{this.handleDateMouseEnter(d)}},i("div",{class:`${n}-date-panel-date__trigger`}),d.dateObject.date,d.isCurrentDate?i("div",{class:`${n}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?i("div",{class:`${n}-date-panel-footer`},this.datePickerSlots.footer()):null,!((e=this.actions)===null||e===void 0)&&e.length||o?i("div",{class:`${n}-date-panel-actions`},i("div",{class:`${n}-date-panel-actions__prefix`},o&&Object.keys(o).map(d=>{const u=o[d];return Array.isArray(u)||typeof u=="function"?i(sn,{size:"tiny",onMouseenter:()=>{this.handleRangeShortcutMouseenter(u)},onClick:()=>{this.handleRangeShortcutClick(u)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>d}):null})),i("div",{class:`${n}-date-panel-actions__suffix`},!((r=this.actions)===null||r===void 0)&&r.includes("clear")?Vt(s.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[i(ft,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,!((t=this.actions)===null||t===void 0)&&t.includes("confirm")?Vt(s.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isRangeInvalid||this.isSelecting,text:this.locale.confirm},()=>[i(ft,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isRangeInvalid||this.isSelecting,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,i(_n,{onFocus:this.handleFocusDetectorFocus}))}});function No(e,r,t){const n=$i(),a=xf(e,t.timeZone,t.locale??n.locale);return"formatToParts"in a?yf(a,r):wf(a,r)}function yf(e,r){const t=e.formatToParts(r);for(let n=t.length-1;n>=0;--n)if(t[n].type==="timeZoneName")return t[n].value}function wf(e,r){const t=e.format(r).replace(/\u200E/g,""),n=/ [\w-+ ]+$/.exec(t);return n?n[0].substr(1):""}function xf(e,r,t){return new Intl.DateTimeFormat(t?[t.code,"en-US"]:void 0,{timeZone:r,timeZoneName:e})}function Cf(e,r){const t=Ff(r);return"formatToParts"in t?Rf(t,e):Sf(t,e)}const kf={year:0,month:1,day:2,hour:3,minute:4,second:5};function Rf(e,r){try{const t=e.formatToParts(r),n=[];for(let a=0;a=0?o:1e3+o,n-a}function Df(e,r,t){let a=e.getTime()-r;const o=Aa(new Date(a),t);if(r===o)return r;a-=o-r;const l=Aa(new Date(a),t);return o===l?o:Math.max(o,l)}function Vo(e,r){return-23<=e&&e<=23&&(r==null||0<=r&&r<=59)}const Lo={};function Of(e){if(Lo[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Lo[e]=!0,!0}catch{return!1}}const Mf=60*1e3,zf={X:function(e,r,t){const n=ma(t.timeZone,e);if(n===0)return"Z";switch(r){case"X":return Ho(n);case"XXXX":case"XX":return Qn(n);case"XXXXX":case"XXX":default:return Qn(n,":")}},x:function(e,r,t){const n=ma(t.timeZone,e);switch(r){case"x":return Ho(n);case"xxxx":case"xx":return Qn(n);case"xxxxx":case"xxx":default:return Qn(n,":")}},O:function(e,r,t){const n=ma(t.timeZone,e);switch(r){case"O":case"OO":case"OOO":return"GMT"+If(n,":");case"OOOO":default:return"GMT"+Qn(n,":")}},z:function(e,r,t){switch(r){case"z":case"zz":case"zzz":return No("short",e,t);case"zzzz":default:return No("long",e,t)}}};function ma(e,r){const t=e?ao(e,r,!0)/Mf:(r==null?void 0:r.getTimezoneOffset())??0;if(Number.isNaN(t))throw new RangeError("Invalid time zone specified: "+e);return t}function Vr(e,r){const t=e<0?"-":"";let n=Math.abs(e).toString();for(;n.length0?"-":"+",n=Math.abs(e),a=Vr(Math.floor(n/60),2),o=Vr(Math.floor(n%60),2);return t+a+r+o}function Ho(e,r){return e%60===0?(e>0?"-":"+")+Vr(Math.abs(e)/60,2):Qn(e,r)}function If(e,r=""){const t=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),o=n%60;return o===0?t+String(a):t+String(a)+r+Vr(o,2)}function Uo(e){const r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+e-+r}const $f=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,pa=36e5,jo=6e4,Af=2,$t={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,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:$f};function vl(e,r={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const t=r.additionalDigits==null?Af:Number(r.additionalDigits);if(t!==2&&t!==1&&t!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const n=Nf(e),{year:a,restDateString:o}=Bf(n.date,t),l=Ef(o,a);if(l===null||isNaN(l.getTime()))return new Date(NaN);if(l){const s=l.getTime();let d=0,u;if(n.time&&(d=Vf(n.time),d===null||isNaN(d)))return new Date(NaN);if(n.timeZone||r.timeZone){if(u=ao(n.timeZone||r.timeZone,new Date(s+d)),isNaN(u))return new Date(NaN)}else u=Uo(new Date(s+d)),u=Uo(new Date(s+d+u));return new Date(s+d+u)}else return new Date(NaN)}function Nf(e){const r={};let t=$t.dateTimePattern.exec(e),n;if(t?(r.date=t[1],n=t[3]):(t=$t.datePattern.exec(e),t?(r.date=t[1],n=t[2]):(r.date=null,n=e)),n){const a=$t.timeZone.exec(n);a?(r.time=n.replace(a[1],""),r.timeZone=a[1].trim()):r.time=n}return r}function Bf(e,r){if(e){const t=$t.YYY[r],n=$t.YYYYY[r];let a=$t.YYYY.exec(e)||n.exec(e);if(a){const o=a[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(a=$t.YY.exec(e)||t.exec(e),a){const o=a[1];return{year:parseInt(o,10)*100,restDateString:e.slice(o.length)}}}return{year:null}}function Ef(e,r){if(r===null)return null;let t,n,a;if(!e||!e.length)return t=new Date(0),t.setUTCFullYear(r),t;let o=$t.MM.exec(e);if(o)return t=new Date(0),n=parseInt(o[1],10)-1,Ko(r,n)?(t.setUTCFullYear(r,n),t):new Date(NaN);if(o=$t.DDD.exec(e),o){t=new Date(0);const l=parseInt(o[1],10);return Uf(r,l)?(t.setUTCFullYear(r,0,l),t):new Date(NaN)}if(o=$t.MMDD.exec(e),o){t=new Date(0),n=parseInt(o[1],10)-1;const l=parseInt(o[2],10);return Ko(r,n,l)?(t.setUTCFullYear(r,n,l),t):new Date(NaN)}if(o=$t.Www.exec(e),o)return a=parseInt(o[1],10)-1,Wo(a)?Yo(r,a):new Date(NaN);if(o=$t.WwwD.exec(e),o){a=parseInt(o[1],10)-1;const l=parseInt(o[2],10)-1;return Wo(a,l)?Yo(r,a,l):new Date(NaN)}return null}function Vf(e){let r,t,n=$t.HH.exec(e);if(n)return r=parseFloat(n[1].replace(",",".")),ga(r)?r%24*pa:NaN;if(n=$t.HHMM.exec(e),n)return r=parseInt(n[1],10),t=parseFloat(n[2].replace(",",".")),ga(r,t)?r%24*pa+t*jo:NaN;if(n=$t.HHMMSS.exec(e),n){r=parseInt(n[1],10),t=parseInt(n[2],10);const a=parseFloat(n[3].replace(",","."));return ga(r,t,a)?r%24*pa+t*jo+a*1e3:NaN}return null}function Yo(e,r,t){r=r||0,t=t||0;const n=new Date(0);n.setUTCFullYear(e,0,4);const a=n.getUTCDay()||7,o=r*7+t+1-a;return n.setUTCDate(n.getUTCDate()+o),n}const Lf=[31,28,31,30,31,30,31,31,30,31,30,31],Hf=[31,29,31,30,31,30,31,31,30,31,30,31];function ml(e){return e%400===0||e%4===0&&e%100!==0}function Ko(e,r,t){if(r<0||r>11)return!1;if(t!=null){if(t<1)return!1;const n=ml(e);if(n&&t>Hf[r]||!n&&t>Lf[r])return!1}return!0}function Uf(e,r){if(r<1)return!1;const t=ml(e);return!(t&&r>366||!t&&r>365)}function Wo(e,r){return!(e<0||e>52||r!=null&&(r<0||r>6))}function ga(e,r,t){return!(e<0||e>=25||r!=null&&(r<0||r>=60)||t!=null&&(t<0||t>=60))}const jf=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Yf(e,r,t={}){r=String(r);const n=r.match(jf);if(n){const a=vl(t.originalDate||e,t);r=n.reduce(function(o,l){if(l[0]==="'")return o;const s=o.indexOf(l),d=o[s-1]==="'",u=o.replace(l,"'"+zf[l[0]](a,l,t)+"'");return d?u.substring(0,s-1)+u.substring(s+1):u},r)}return nt(e,r,t)}function Kf(e,r,t){e=vl(e,t);const n=ao(r,e,!0),a=new Date(e.getTime()-n),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 Wf(e,r,t,n){return n={...n,timeZone:r,originalDate:e},Yf(Kf(e,r,{timeZone:n.timeZone}),t,n)}const pl=bn("n-time-picker"),_r=ge({name:"TimePickerPanelCol",props:{clsPrefix:{type:String,required:!0},data:{type:Array,required:!0},activeValue:{type:[Number,String],default:null},onItemClick:Function},render(){const{activeValue:e,onItemClick:r,clsPrefix:t}=this;return this.data.map(n=>{const{label:a,disabled:o,value:l}=n,s=e===l;return i("div",{key:a,"data-active":s?"":null,class:[`${t}-time-picker-col__item`,s&&`${t}-time-picker-col__item--active`,o&&`${t}-time-picker-col__item--disabled`],onClick:r&&!o?()=>{r(l)}:void 0},a)})}}),ir={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 ba(e){return`00${e}`.slice(-2)}function lr(e,r,t){return Array.isArray(r)?(t==="am"?r.filter(n=>n<12):t==="pm"?r.filter(n=>n>=12).map(n=>n===12?12:n-12):r).map(n=>ba(n)):typeof r=="number"?t==="am"?e.filter(n=>{const a=Number(n);return a<12&&a%r===0}):t==="pm"?e.filter(n=>{const a=Number(n);return a>=12&&a%r===0}).map(n=>{const a=Number(n);return ba(a===12?12:a-12)}):e.filter(n=>Number(n)%r===0):t==="am"?e.filter(n=>Number(n)<12):t==="pm"?e.map(n=>Number(n)).filter(n=>Number(n)>=12).map(n=>ba(n===12?12:n-12)):e}function Dr(e,r,t){return t?typeof t=="number"?e%t===0:t.includes(e):!0}function qf(e,r,t){const n=lr(ir[r],t).map(Number);let a,o;for(let l=0;le){o=s;break}a=s}return a===void 0?(o||Hl("time-picker","Please set 'hours' or 'minutes' or 'seconds' props"),o):o===void 0||o-e>e-a?a:o}function Gf(e){return xn(e)<12?"am":"pm"}const Xf={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},Qf=ge({name:"TimePickerPanel",props:Xf,setup(e){const{mergedThemeRef:r,mergedClsPrefixRef:t}=it(pl),n=b(()=>{const{isHourDisabled:s,hours:d,use12Hours:u,amPmValue:c}=e;if(u){const f=c??Gf(Date.now());return lr(ir.hours,d,f).map(v=>{const m=Number(v),p=f==="pm"&&m!==12?m+12:m;return{label:v,value:p,disabled:s?s(p):!1}})}else return lr(ir.hours,d).map(f=>({label:f,value:Number(f),disabled:s?s(Number(f)):!1}))}),a=b(()=>{const{isMinuteDisabled:s,minutes:d}=e;return lr(ir.minutes,d).map(u=>({label:u,value:Number(u),disabled:s?s(Number(u),e.hourValue):!1}))}),o=b(()=>{const{isSecondDisabled:s,seconds:d}=e;return lr(ir.seconds,d).map(u=>({label:u,value:Number(u),disabled:s?s(Number(u),e.minuteValue,e.hourValue):!1}))}),l=b(()=>{const{isHourDisabled:s}=e;let d=!0,u=!0;for(let c=0;c<12;++c)if(!(s!=null&&s(c))){d=!1;break}for(let c=12;c<24;++c)if(!(s!=null&&s(c))){u=!1;break}return[{label:"AM",value:"am",disabled:d},{label:"PM",value:"pm",disabled:u}]});return{mergedTheme:r,mergedClsPrefix:t,hours:n,minutes:a,seconds:o,amPm:l,hourScrollRef:F(null),minuteScrollRef:F(null),secondScrollRef:F(null),amPmScrollRef:F(null)}},render(){var e,r,t,n;const{mergedClsPrefix:a,mergedTheme:o}=this;return i("div",{tabindex:0,class:`${a}-time-picker-panel`,onFocusin:this.onFocusin,onFocusout:this.onFocusout,onKeydown:this.onKeydown},i("div",{class:`${a}-time-picker-cols`},this.showHour?i("div",{class:[`${a}-time-picker-col`,this.isHourInvalid&&`${a}-time-picker-col--invalid`,this.transitionDisabled&&`${a}-time-picker-col--transition-disabled`]},i(Ut,{ref:"hourScrollRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar},{default:()=>[i(_r,{clsPrefix:a,data:this.hours,activeValue:this.hourValue,onItemClick:this.onHourClick}),i("div",{class:`${a}-time-picker-col__padding`})]})):null,this.showMinute?i("div",{class:[`${a}-time-picker-col`,this.transitionDisabled&&`${a}-time-picker-col--transition-disabled`,this.isMinuteInvalid&&`${a}-time-picker-col--invalid`]},i(Ut,{ref:"minuteScrollRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar},{default:()=>[i(_r,{clsPrefix:a,data:this.minutes,activeValue:this.minuteValue,onItemClick:this.onMinuteClick}),i("div",{class:`${a}-time-picker-col__padding`})]})):null,this.showSecond?i("div",{class:[`${a}-time-picker-col`,this.isSecondInvalid&&`${a}-time-picker-col--invalid`,this.transitionDisabled&&`${a}-time-picker-col--transition-disabled`]},i(Ut,{ref:"secondScrollRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar},{default:()=>[i(_r,{clsPrefix:a,data:this.seconds,activeValue:this.secondValue,onItemClick:this.onSecondClick}),i("div",{class:`${a}-time-picker-col__padding`})]})):null,this.use12Hours?i("div",{class:[`${a}-time-picker-col`,this.isAmPmInvalid&&`${a}-time-picker-col--invalid`,this.transitionDisabled&&`${a}-time-picker-col--transition-disabled`]},i(Ut,{ref:"amPmScrollRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar},{default:()=>[i(_r,{clsPrefix:a,data:this.amPm,activeValue:this.amPmValue,onItemClick:this.onAmPmClick}),i("div",{class:`${a}-time-picker-col__padding`})]})):null),!((e=this.actions)===null||e===void 0)&&e.length?i("div",{class:`${a}-time-picker-actions`},!((r=this.actions)===null||r===void 0)&&r.includes("clear")?i(ft,{theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,size:"tiny",onClick:this.onClearClick},{default:()=>this.clearText}):null,!((t=this.actions)===null||t===void 0)&&t.includes("now")?i(ft,{size:"tiny",theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:this.onNowClick},{default:()=>this.nowText}):null,!((n=this.actions)===null||n===void 0)&&n.includes("confirm")?i(ft,{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,i(_n,{onFocus:this.onFocusDetectorFocus}))}}),Zf=W([O("time-picker",` + `)])]}function of(e,r){const{paginatedDataRef:t,treeMateRef:n,selectionColumnRef:a}=r,o=F(e.defaultCheckedRowKeys),l=g(()=>{var R;const{checkedRowKeys:D}=e,T=D===void 0?o.value:D;return((R=a.value)===null||R===void 0?void 0:R.multiple)===!1?{checkedKeys:T.slice(0,1),indeterminateKeys:[]}:n.value.getCheckedKeys(T,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded})}),s=g(()=>l.value.checkedKeys),d=g(()=>l.value.indeterminateKeys),u=g(()=>new Set(s.value)),c=g(()=>new Set(d.value)),f=g(()=>{const{value:R}=u;return t.value.reduce((D,T)=>{const{key:Y,disabled:I}=T;return D+(!I&&R.has(Y)?1:0)},0)}),v=g(()=>t.value.filter(R=>R.disabled).length),m=g(()=>{const{length:R}=t.value,{value:D}=c;return f.value>0&&f.valueD.has(T.key))}),p=g(()=>{const{length:R}=t.value;return f.value!==0&&f.value===R-v.value}),y=g(()=>t.value.length===0);function h(R,D,T){const{"onUpdate:checkedRowKeys":Y,onUpdateCheckedRowKeys:I,onCheckedRowKeysChange:N}=e,J=[],{value:{getNode:O}}=n;R.forEach(C=>{var B;const L=(B=O(C))===null||B===void 0?void 0:B.rawNode;J.push(L)}),Y&&ie(Y,R,J,{row:D,action:T}),I&&ie(I,R,J,{row:D,action:T}),N&&ie(N,R,J,{row:D,action:T}),o.value=R}function x(R,D=!1,T){if(!e.loading){if(D){h(Array.isArray(R)?R.slice(0,1):[R],T,"check");return}h(n.value.check(R,s.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,T,"check")}}function w(R,D){e.loading||h(n.value.uncheck(R,s.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,D,"uncheck")}function k(R=!1){const{value:D}=a;if(!D||e.loading)return;const T=[];(R?n.value.treeNodes:t.value).forEach(Y=>{Y.disabled||T.push(Y.key)}),h(n.value.check(T,s.value,{cascade:!0,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,void 0,"checkAll")}function b(R=!1){const{value:D}=a;if(!D||e.loading)return;const T=[];(R?n.value.treeNodes:t.value).forEach(Y=>{Y.disabled||T.push(Y.key)}),h(n.value.uncheck(T,s.value,{cascade:!0,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,void 0,"uncheckAll")}return{mergedCheckedRowKeySetRef:u,mergedCheckedRowKeysRef:s,mergedInderminateRowKeySetRef:c,someRowsCheckedRef:m,allRowsCheckedRef:p,headerCheckboxDisabledRef:y,doUpdateCheckedRowKeys:h,doCheckAll:k,doUncheckAll:b,doCheck:x,doUncheck:w}}function lf(e,r){const t=at(()=>{for(const u of e.columns)if(u.type==="expand")return u.renderExpand}),n=at(()=>{let u;for(const c of e.columns)if(c.type==="expand"){u=c.expandable;break}return u}),a=F(e.defaultExpandAll?t!=null&&t.value?(()=>{const u=[];return r.value.treeNodes.forEach(c=>{var f;!((f=n.value)===null||f===void 0)&&f.call(n,c.rawNode)&&u.push(c.key)}),u})():r.value.getNonLeafKeys():e.defaultExpandedRowKeys),o=me(e,"expandedRowKeys"),l=me(e,"stickyExpandedRows"),s=zt(o,a);function d(u){const{onUpdateExpandedRowKeys:c,"onUpdate:expandedRowKeys":f}=e;c&&ie(c,u),f&&ie(f,u),a.value=u}return{stickyExpandedRowsRef:l,mergedExpandedRowKeysRef:s,renderExpandRef:t,expandableRef:n,doUpdateExpandedRowKeys:d}}function sf(e,r){const t=[],n=[],a=[],o=new WeakMap;let l=-1,s=0,d=!1;function u(v,m){m>l&&(t[m]=[],l=m),v.forEach((p,y)=>{if("children"in p)u(p.children,m+1);else{const h="key"in p?p.key:void 0;n.push({key:tn(p),style:uc(p,h!==void 0?jt(r(h)):void 0),column:p,index:y,width:p.width===void 0?128:Number(p.width)}),s+=1,d||(d=!!p.ellipsis),a.push(p)}})}u(e,0);let c=0;function f(v,m){let p=0;v.forEach(y=>{var h;if("children"in y){const x=c,w={column:y,colIndex:c,colSpan:0,rowSpan:1,isLast:!1};f(y.children,m+1),y.children.forEach(k=>{var b,R;w.colSpan+=(R=(b=o.get(k))===null||b===void 0?void 0:b.colSpan)!==null&&R!==void 0?R:0}),x+w.colSpan===s&&(w.isLast=!0),o.set(y,w),t[m].push(w)}else{if(c1&&(p=c+x);const w=c+x===s,k={column:y,colSpan:x,colIndex:c,rowSpan:l-m+1,isLast:w};o.set(y,k),t[m].push(k),c+=1}})}return f(e,0),{hasEllipsis:d,rows:t,cols:n,dataRelatedCols:a}}function df(e,r){const t=g(()=>sf(e.columns,r));return{rowsRef:g(()=>t.value.rows),colsRef:g(()=>t.value.cols),hasEllipsisRef:g(()=>t.value.hasEllipsis),dataRelatedColsRef:g(()=>t.value.dataRelatedCols)}}function uf(){const e=F({});function r(a){return e.value[a]}function t(a,o){Xi(a)&&"key"in a&&(e.value[a.key]=o)}function n(){e.value={}}return{getResizableWidth:r,doUpdateResizableWidth:t,clearResizableWidth:n}}function cf(e,{mainTableInstRef:r,mergedCurrentPageRef:t,bodyWidthRef:n}){let a=0;const o=F(),l=F(null),s=F([]),d=F(null),u=F([]),c=g(()=>jt(e.scrollX)),f=g(()=>e.columns.filter(I=>I.fixed==="left")),v=g(()=>e.columns.filter(I=>I.fixed==="right")),m=g(()=>{const I={};let N=0;function J(O){O.forEach(C=>{const B={start:N,end:0};I[tn(C)]=B,"children"in C?(J(C.children),B.end=N):(N+=Oo(C)||0,B.end=N)})}return J(f.value),I}),p=g(()=>{const I={};let N=0;function J(O){for(let C=O.length-1;C>=0;--C){const B=O[C],L={start:N,end:0};I[tn(B)]=L,"children"in B?(J(B.children),L.end=N):(N+=Oo(B)||0,L.end=N)}}return J(v.value),I});function y(){var I,N;const{value:J}=f;let O=0;const{value:C}=m;let B=null;for(let L=0;L(((I=C[Q])===null||I===void 0?void 0:I.start)||0)-O)B=Q,O=((N=C[Q])===null||N===void 0?void 0:N.end)||0;else break}l.value=B}function h(){s.value=[];let I=e.columns.find(N=>tn(N)===l.value);for(;I&&"children"in I;){const N=I.children.length;if(N===0)break;const J=I.children[N-1];s.value.push(tn(J)),I=J}}function x(){var I,N;const{value:J}=v,O=Number(e.scrollX),{value:C}=n;if(C===null)return;let B=0,L=null;const{value:Q}=p;for(let q=J.length-1;q>=0;--q){const ee=tn(J[q]);if(Math.round(a+(((I=Q[ee])===null||I===void 0?void 0:I.start)||0)+C-B)tn(N)===d.value);for(;I&&"children"in I&&I.children.length;){const N=I.children[0];u.value.push(tn(N)),I=N}}function k(){const I=r.value?r.value.getHeaderElement():null,N=r.value?r.value.getBodyElement():null;return{header:I,body:N}}function b(){const{body:I}=k();I&&(I.scrollTop=0)}function R(){o.value!=="body"?ka(T):o.value=void 0}function D(I){var N;(N=e.onScroll)===null||N===void 0||N.call(e,I),o.value!=="head"?ka(T):o.value=void 0}function T(){const{header:I,body:N}=k();if(!N)return;const{value:J}=n;if(J!==null){if(e.maxHeight||e.flexHeight){if(!I)return;const O=a-I.scrollLeft;o.value=O!==0?"head":"body",o.value==="head"?(a=I.scrollLeft,N.scrollLeft=a):(a=N.scrollLeft,I.scrollLeft=a)}else a=N.scrollLeft;y(),h(),x(),w()}}function Y(I){const{header:N}=k();N&&(N.scrollLeft=I,T())}return bt(t,()=>{b()}),{styleScrollXRef:c,fixedColumnLeftMapRef:m,fixedColumnRightMapRef:p,leftFixedColumnsRef:f,rightFixedColumnsRef:v,leftActiveFixedColKeyRef:l,leftActiveFixedChildrenColKeysRef:s,rightActiveFixedColKeyRef:d,rightActiveFixedChildrenColKeysRef:u,syncScrollState:T,handleTableBodyScroll:D,handleTableHeaderScroll:R,setHeaderScrollLeft:Y}}function Tr(e){return typeof e=="object"&&typeof e.multiple=="number"?e.multiple:!1}function ff(e,r){return r&&(e===void 0||e==="default"||typeof e=="object"&&e.compare==="default")?hf(r):typeof e=="function"?e:e&&typeof e=="object"&&e.compare&&e.compare!=="default"?e.compare:!1}function hf(e){return(r,t)=>{const n=r[e],a=t[e];return n==null?a==null?0:-1:a==null?1:typeof n=="number"&&typeof a=="number"?n-a:typeof n=="string"&&typeof a=="string"?n.localeCompare(a):0}}function vf(e,{dataRelatedColsRef:r,filteredDataRef:t}){const n=[];r.value.forEach(m=>{var p;m.sorter!==void 0&&v(n,{columnKey:m.key,sorter:m.sorter,order:(p=m.defaultSortOrder)!==null&&p!==void 0?p:!1})});const a=F(n),o=g(()=>{const m=r.value.filter(h=>h.type!=="selection"&&h.sorter!==void 0&&(h.sortOrder==="ascend"||h.sortOrder==="descend"||h.sortOrder===!1)),p=m.filter(h=>h.sortOrder!==!1);if(p.length)return p.map(h=>({columnKey:h.key,order:h.sortOrder,sorter:h.sorter}));if(m.length)return[];const{value:y}=a;return Array.isArray(y)?y:y?[y]:[]}),l=g(()=>{const m=o.value.slice().sort((p,y)=>{const h=Tr(p.sorter)||0;return(Tr(y.sorter)||0)-h});return m.length?t.value.slice().sort((y,h)=>{let x=0;return m.some(w=>{const{columnKey:k,sorter:b,order:R}=w,D=ff(b,k);return D&&R&&(x=D(y.rawNode,h.rawNode),x!==0)?(x=x*sc(R),!0):!1}),x}):t.value});function s(m){let p=o.value.slice();return m&&Tr(m.sorter)!==!1?(p=p.filter(y=>Tr(y.sorter)!==!1),v(p,m),p):m||null}function d(m){const p=s(m);u(p)}function u(m){const{"onUpdate:sorter":p,onUpdateSorter:y,onSorterChange:h}=e;p&&ie(p,m),y&&ie(y,m),h&&ie(h,m),a.value=m}function c(m,p="ascend"){if(!m)f();else{const y=r.value.find(x=>x.type!=="selection"&&x.type!=="expand"&&x.key===m);if(!(y!=null&&y.sorter))return;const h=y.sorter;d({columnKey:m,sorter:h,order:p})}}function f(){u(null)}function v(m,p){const y=m.findIndex(h=>(p==null?void 0:p.columnKey)&&h.columnKey===p.columnKey);y!==void 0&&y>=0?m[y]=p:m.push(p)}return{clearSorter:f,sort:c,sortedDataRef:l,mergedSortStateRef:o,deriveNextSorter:d}}function mf(e,{dataRelatedColsRef:r}){const t=g(()=>{const V=_=>{for(let E=0;E<_.length;++E){const U=_[E];if("children"in U)return V(U.children);if(U.type==="selection")return U}return null};return V(e.columns)}),n=g(()=>{const{childrenKey:V}=e;return Kr(e.data,{ignoreEmptyChildren:!0,getKey:e.rowKey,getChildren:_=>_[V],getDisabled:_=>{var E,U;return!!(!((U=(E=t.value)===null||E===void 0?void 0:E.disabled)===null||U===void 0)&&U.call(E,_))}})}),a=at(()=>{const{columns:V}=e,{length:_}=V;let E=null;for(let U=0;U<_;++U){const ne=V[U];if(!ne.type&&E===null&&(E=U),"tree"in ne&&ne.tree)return U}return E||0}),o=F({}),{pagination:l}=e,s=F(l&&l.defaultPage||1),d=F(Wi(l)),u=g(()=>{const V=r.value.filter(U=>U.filterOptionValues!==void 0||U.filterOptionValue!==void 0),_={};return V.forEach(U=>{var ne;U.type==="selection"||U.type==="expand"||(U.filterOptionValues===void 0?_[U.key]=(ne=U.filterOptionValue)!==null&&ne!==void 0?ne:null:_[U.key]=U.filterOptionValues)}),Object.assign(Do(o.value),_)}),c=g(()=>{const V=u.value,{columns:_}=e;function E(Oe){return(he,Te)=>!!~String(Te[Oe]).indexOf(String(he))}const{value:{treeNodes:U}}=n,ne=[];return _.forEach(Oe=>{Oe.type==="selection"||Oe.type==="expand"||"children"in Oe||ne.push([Oe.key,Oe])}),U?U.filter(Oe=>{const{rawNode:he}=Oe;for(const[Te,j]of ne){let be=V[Te];if(be==null||(Array.isArray(be)||(be=[be]),!be.length))continue;const Se=j.filter==="default"?E(Te):j.filter;if(j&&typeof Se=="function")if(j.filterMode==="and"){if(be.some($e=>!Se($e,he)))return!1}else{if(be.some($e=>Se($e,he)))continue;return!1}}return!0}):[]}),{sortedDataRef:f,deriveNextSorter:v,mergedSortStateRef:m,sort:p,clearSorter:y}=vf(e,{dataRelatedColsRef:r,filteredDataRef:c});r.value.forEach(V=>{var _;if(V.filter){const E=V.defaultFilterOptionValues;V.filterMultiple?o.value[V.key]=E||[]:E!==void 0?o.value[V.key]=E===null?[]:E:o.value[V.key]=(_=V.defaultFilterOptionValue)!==null&&_!==void 0?_:null}});const h=g(()=>{const{pagination:V}=e;if(V!==!1)return V.page}),x=g(()=>{const{pagination:V}=e;if(V!==!1)return V.pageSize}),w=zt(h,s),k=zt(x,d),b=at(()=>{const V=w.value;return e.remote?V:Math.max(1,Math.min(Math.ceil(c.value.length/k.value),V))}),R=g(()=>{const{pagination:V}=e;if(V){const{pageCount:_}=V;if(_!==void 0)return _}}),D=g(()=>{if(e.remote)return n.value.treeNodes;if(!e.pagination)return f.value;const V=k.value,_=(b.value-1)*V;return f.value.slice(_,_+V)}),T=g(()=>D.value.map(V=>V.rawNode));function Y(V){const{pagination:_}=e;if(_){const{onChange:E,"onUpdate:page":U,onUpdatePage:ne}=_;E&&ie(E,V),ne&&ie(ne,V),U&&ie(U,V),O(V)}}function I(V){const{pagination:_}=e;if(_){const{onPageSizeChange:E,"onUpdate:pageSize":U,onUpdatePageSize:ne}=_;E&&ie(E,V),ne&&ie(ne,V),U&&ie(U,V),C(V)}}const N=g(()=>{if(e.remote){const{pagination:V}=e;if(V){const{itemCount:_}=V;if(_!==void 0)return _}return}return c.value.length}),J=g(()=>Object.assign(Object.assign({},e.pagination),{onChange:void 0,onUpdatePage:void 0,onUpdatePageSize:void 0,onPageSizeChange:void 0,"onUpdate:page":Y,"onUpdate:pageSize":I,page:b.value,pageSize:k.value,pageCount:N.value===void 0?R.value:void 0,itemCount:N.value}));function O(V){const{"onUpdate:page":_,onPageChange:E,onUpdatePage:U}=e;U&&ie(U,V),_&&ie(_,V),E&&ie(E,V),s.value=V}function C(V){const{"onUpdate:pageSize":_,onPageSizeChange:E,onUpdatePageSize:U}=e;E&&ie(E,V),U&&ie(U,V),_&&ie(_,V),d.value=V}function B(V,_){const{onUpdateFilters:E,"onUpdate:filters":U,onFiltersChange:ne}=e;E&&ie(E,V,_),U&&ie(U,V,_),ne&&ie(ne,V,_),o.value=V}function L(V,_,E,U){var ne;(ne=e.onUnstableColumnResize)===null||ne===void 0||ne.call(e,V,_,E,U)}function Q(V){O(V)}function q(){ee()}function ee(){ue({})}function ue(V){te(V)}function te(V){V?V&&(o.value=Do(V)):o.value={}}return{treeMateRef:n,mergedCurrentPageRef:b,mergedPaginationRef:J,paginatedDataRef:D,rawPaginatedDataRef:T,mergedFilterStateRef:u,mergedSortStateRef:m,hoverKeyRef:F(null),selectionColumnRef:t,childTriggerColIndexRef:a,doUpdateFilters:B,deriveNextSorter:v,doUpdatePageSize:C,doUpdatePage:O,onUnstableColumnResize:L,filter:te,filters:ue,clearFilter:q,clearFilters:ee,clearSorter:y,page:Q,sort:p}}const dl=ge({name:"DataTable",alias:["AdvancedTable"],props:ic,setup(e,{slots:r}){const{mergedBorderedRef:t,mergedClsPrefixRef:n,inlineThemeDisabled:a,mergedRtlRef:o}=xt(e),l=gn("DataTable",o,n),s=g(()=>{const{bottomBordered:S}=e;return t.value?!1:S!==void 0?S:!0}),d=Ye("DataTable","-data-table",rf,Ll,e,n),u=F(null),c=F(null),{getResizableWidth:f,clearResizableWidth:v,doUpdateResizableWidth:m}=uf(),{rowsRef:p,colsRef:y,dataRelatedColsRef:h,hasEllipsisRef:x}=df(e,f),{treeMateRef:w,mergedCurrentPageRef:k,paginatedDataRef:b,rawPaginatedDataRef:R,selectionColumnRef:D,hoverKeyRef:T,mergedPaginationRef:Y,mergedFilterStateRef:I,mergedSortStateRef:N,childTriggerColIndexRef:J,doUpdatePage:O,doUpdateFilters:C,onUnstableColumnResize:B,deriveNextSorter:L,filter:Q,filters:q,clearFilter:ee,clearFilters:ue,clearSorter:te,page:V,sort:_}=mf(e,{dataRelatedColsRef:h}),E=S=>{const{fileName:H="data.csv",keepOriginalData:fe=!1}=S||{},ke=fe?e.data:R.value,xe=vc(e.columns,ke,e.getCsvCell,e.getCsvHeader),P=new Blob([xe],{type:"text/csv;charset=utf-8"}),G=URL.createObjectURL(P);Rs(G,H.endsWith(".csv")?H:`${H}.csv`),URL.revokeObjectURL(G)},{doCheckAll:U,doUncheckAll:ne,doCheck:Oe,doUncheck:he,headerCheckboxDisabledRef:Te,someRowsCheckedRef:j,allRowsCheckedRef:be,mergedCheckedRowKeySetRef:Se,mergedInderminateRowKeySetRef:$e}=of(e,{selectionColumnRef:D,treeMateRef:w,paginatedDataRef:b}),{stickyExpandedRowsRef:Ke,mergedExpandedRowKeysRef:lt,renderExpandRef:ht,expandableRef:Qe,doUpdateExpandedRowKeys:X}=lf(e,w),{handleTableBodyScroll:we,handleTableHeaderScroll:re,syncScrollState:Re,setHeaderScrollLeft:Ee,leftActiveFixedColKeyRef:ze,leftActiveFixedChildrenColKeysRef:Le,rightActiveFixedColKeyRef:Z,rightActiveFixedChildrenColKeysRef:se,leftFixedColumnsRef:De,rightFixedColumnsRef:A,fixedColumnLeftMapRef:_e,fixedColumnRightMapRef:He}=cf(e,{bodyWidthRef:u,mainTableInstRef:c,mergedCurrentPageRef:k}),{localeRef:vt}=yn("DataTable"),et=g(()=>e.virtualScroll||e.flexHeight||e.maxHeight!==void 0||x.value?"fixed":e.tableLayout);At(rn,{props:e,treeMateRef:w,renderExpandIconRef:me(e,"renderExpandIcon"),loadingKeySetRef:F(new Set),slots:r,indentRef:me(e,"indent"),childTriggerColIndexRef:J,bodyWidthRef:u,componentId:ai(),hoverKeyRef:T,mergedClsPrefixRef:n,mergedThemeRef:d,scrollXRef:g(()=>e.scrollX),rowsRef:p,colsRef:y,paginatedDataRef:b,leftActiveFixedColKeyRef:ze,leftActiveFixedChildrenColKeysRef:Le,rightActiveFixedColKeyRef:Z,rightActiveFixedChildrenColKeysRef:se,leftFixedColumnsRef:De,rightFixedColumnsRef:A,fixedColumnLeftMapRef:_e,fixedColumnRightMapRef:He,mergedCurrentPageRef:k,someRowsCheckedRef:j,allRowsCheckedRef:be,mergedSortStateRef:N,mergedFilterStateRef:I,loadingRef:me(e,"loading"),rowClassNameRef:me(e,"rowClassName"),mergedCheckedRowKeySetRef:Se,mergedExpandedRowKeysRef:lt,mergedInderminateRowKeySetRef:$e,localeRef:vt,expandableRef:Qe,stickyExpandedRowsRef:Ke,rowKeyRef:me(e,"rowKey"),renderExpandRef:ht,summaryRef:me(e,"summary"),virtualScrollRef:me(e,"virtualScroll"),virtualScrollXRef:me(e,"virtualScrollX"),heightForRowRef:me(e,"heightForRow"),minRowHeightRef:me(e,"minRowHeight"),virtualScrollHeaderRef:me(e,"virtualScrollHeader"),headerHeightRef:me(e,"headerHeight"),rowPropsRef:me(e,"rowProps"),stripedRef:me(e,"striped"),checkOptionsRef:g(()=>{const{value:S}=D;return S==null?void 0:S.options}),rawPaginatedDataRef:R,filterMenuCssVarsRef:g(()=>{const{self:{actionDividerColor:S,actionPadding:H,actionButtonMargin:fe}}=d.value;return{"--n-action-padding":H,"--n-action-button-margin":fe,"--n-action-divider-color":S}}),onLoadRef:me(e,"onLoad"),mergedTableLayoutRef:et,maxHeightRef:me(e,"maxHeight"),minHeightRef:me(e,"minHeight"),flexHeightRef:me(e,"flexHeight"),headerCheckboxDisabledRef:Te,paginationBehaviorOnFilterRef:me(e,"paginationBehaviorOnFilter"),summaryPlacementRef:me(e,"summaryPlacement"),filterIconPopoverPropsRef:me(e,"filterIconPopoverProps"),scrollbarPropsRef:me(e,"scrollbarProps"),syncScrollState:Re,doUpdatePage:O,doUpdateFilters:C,getResizableWidth:f,onUnstableColumnResize:B,clearResizableWidth:v,doUpdateResizableWidth:m,deriveNextSorter:L,doCheck:Oe,doUncheck:he,doCheckAll:U,doUncheckAll:ne,doUpdateExpandedRowKeys:X,handleTableHeaderScroll:re,handleTableBodyScroll:we,setHeaderScrollLeft:Ee,renderCell:me(e,"renderCell")});const We={filter:Q,filters:q,clearFilters:ue,clearSorter:te,page:V,sort:_,clearFilter:ee,downloadCsv:E,scrollTo:(S,H)=>{var fe;(fe=c.value)===null||fe===void 0||fe.scrollTo(S,H)}},je=g(()=>{const{size:S}=e,{common:{cubicBezierEaseInOut:H},self:{borderColor:fe,tdColorHover:ke,tdColorSorting:xe,tdColorSortingModal:P,tdColorSortingPopover:G,thColorSorting:ye,thColorSortingModal:Me,thColorSortingPopover:Ze,thColor:Be,thColorHover:$,tdColor:ae,tdTextColor:pe,thTextColor:Ie,thFontWeight:Je,thButtonColorHover:Ge,thIconColor:rt,thIconColorActive:Nt,filterSize:Kt,borderRadius:Ht,lineHeight:Rt,tdColorModal:Wt,thColorModal:en,borderColorModal:yt,thColorHoverModal:St,tdColorHoverModal:Bt,borderColorPopover:Dn,thColorPopover:Mn,tdColorPopover:zn,tdColorHoverPopover:In,thColorHoverPopover:$n,paginationMargin:An,emptyPadding:z,boxShadowAfter:de,boxShadowBefore:Pe,sorterSize:ut,resizableContainerSize:qt,resizableSize:ct,loadingColor:Nn,loadingSize:Wn,opacityLoading:Bn,tdColorStriped:Gr,tdColorStripedModal:Xr,tdColorStripedPopover:Qr,[Ve("fontSize",S)]:Zr,[Ve("thPadding",S)]:Jr,[Ve("tdPadding",S)]:ea}}=d.value;return{"--n-font-size":Zr,"--n-th-padding":Jr,"--n-td-padding":ea,"--n-bezier":H,"--n-border-radius":Ht,"--n-line-height":Rt,"--n-border-color":fe,"--n-border-color-modal":yt,"--n-border-color-popover":Dn,"--n-th-color":Be,"--n-th-color-hover":$,"--n-th-color-modal":en,"--n-th-color-hover-modal":St,"--n-th-color-popover":Mn,"--n-th-color-hover-popover":$n,"--n-td-color":ae,"--n-td-color-hover":ke,"--n-td-color-modal":Wt,"--n-td-color-hover-modal":Bt,"--n-td-color-popover":zn,"--n-td-color-hover-popover":In,"--n-th-text-color":Ie,"--n-td-text-color":pe,"--n-th-font-weight":Je,"--n-th-button-color-hover":Ge,"--n-th-icon-color":rt,"--n-th-icon-color-active":Nt,"--n-filter-size":Kt,"--n-pagination-margin":An,"--n-empty-padding":z,"--n-box-shadow-before":Pe,"--n-box-shadow-after":de,"--n-sorter-size":ut,"--n-resizable-container-size":qt,"--n-resizable-size":ct,"--n-loading-size":Wn,"--n-loading-color":Nn,"--n-opacity-loading":Bn,"--n-td-color-striped":Gr,"--n-td-color-striped-modal":Xr,"--n-td-color-striped-popover":Qr,"n-td-color-sorting":xe,"n-td-color-sorting-modal":P,"n-td-color-sorting-popover":G,"n-th-color-sorting":ye,"n-th-color-sorting-modal":Me,"n-th-color-sorting-popover":Ze}}),ve=a?Mt("data-table",g(()=>e.size[0]),je,e):void 0,Fe=g(()=>{if(!e.pagination)return!1;if(e.paginateSinglePage)return!0;const S=Y.value,{pageCount:H}=S;return H!==void 0?H>1:S.itemCount&&S.pageSize&&S.itemCount>S.pageSize});return Object.assign({mainTableInstRef:c,mergedClsPrefix:n,rtlEnabled:l,mergedTheme:d,paginatedData:b,mergedBordered:t,mergedBottomBordered:s,mergedPagination:Y,mergedShowPagination:Fe,cssVars:a?void 0:je,themeClass:ve==null?void 0:ve.themeClass,onRender:ve==null?void 0:ve.onRender},We)},render(){const{mergedClsPrefix:e,themeClass:r,onRender:t,$slots:n,spinProps:a}=this;return t==null||t(),i("div",{class:[`${e}-data-table`,this.rtlEnabled&&`${e}-data-table--rtl`,r,{[`${e}-data-table--bordered`]:this.mergedBordered,[`${e}-data-table--bottom-bordered`]:this.mergedBottomBordered,[`${e}-data-table--single-line`]:this.singleLine,[`${e}-data-table--single-column`]:this.singleColumn,[`${e}-data-table--loading`]:this.loading,[`${e}-data-table--flex-height`]:this.flexHeight}],style:this.cssVars},i("div",{class:`${e}-data-table-wrapper`},i(nf,{ref:"mainTableInstRef"})),this.mergedShowPagination?i("div",{class:`${e}-data-table__pagination`},i(oc,Object.assign({theme:this.mergedTheme.peers.Pagination,themeOverrides:this.mergedTheme.peerOverrides.Pagination,disabled:this.loading},this.mergedPagination))):null,i(Kn,{name:"fade-in-scale-up-transition"},{default:()=>this.loading?i("div",{class:`${e}-data-table-loading-wrapper`},qe(n.loading,()=>[i(Va,Object.assign({clsPrefix:e,strokeWidth:20},a))])):null}))}}),qr=bn("n-date-picker"),Yn=40,pf="HH:mm:ss",ul={active:Boolean,dateFormat:String,calendarDayFormat:String,calendarHeaderYearFormat:String,calendarHeaderMonthFormat:String,calendarHeaderMonthYearSeparator:{type:String,required:!0},calendarHeaderMonthBeforeYear:{type:Boolean,default:void 0},timerPickerFormat:{type:String,value:pf},value:{type:[Array,Number],default:null},shortcuts:Object,defaultTime:[Number,String,Array],inputReadonly:Boolean,onClear:Function,onConfirm:Function,onClose:Function,onTabOut:Function,onKeydown:Function,actions:Array,onUpdateValue:{type:Function,required:!0},themeClass:String,onRender:Function,panel:Boolean,onNextMonth:Function,onPrevMonth:Function,onNextYear:Function,onPrevYear:Function};function cl(e){const{dateLocaleRef:r,timePickerSizeRef:t,timePickerPropsRef:n,localeRef:a,mergedClsPrefixRef:o,mergedThemeRef:l}=it(qr),s=g(()=>({locale:r.value.locale})),d=F(null),u=Ua();function c(){const{onClear:O}=e;O&&O()}function f(){const{onConfirm:O,value:C}=e;O&&O(C)}function v(O,C){const{onUpdateValue:B}=e;B(O,C)}function m(O=!1){const{onClose:C}=e;C&&C(O)}function p(){const{onTabOut:O}=e;O&&O()}function y(){v(null,!0),m(!0),c()}function h(){p()}function x(){(e.active||e.panel)&&nn(()=>{const{value:O}=d;if(!O)return;const C=O.querySelectorAll("[data-n-date]");C.forEach(B=>{B.classList.add("transition-disabled")}),O.offsetWidth,C.forEach(B=>{B.classList.remove("transition-disabled")})})}function w(O){O.key==="Tab"&&O.target===d.value&&u.shift&&(O.preventDefault(),p())}function k(O){const{value:C}=d;u.tab&&O.target===C&&(C!=null&&C.contains(O.relatedTarget))&&p()}let b=null,R=!1;function D(){b=e.value,R=!0}function T(){R=!1}function Y(){R&&(v(b,!1),R=!1)}function I(O){return typeof O=="function"?O():O}const N=F(!1);function J(){N.value=!N.value}return{mergedTheme:l,mergedClsPrefix:o,dateFnsOptions:s,timePickerSize:t,timePickerProps:n,selfRef:d,locale:a,doConfirm:f,doClose:m,doUpdateValue:v,doTabOut:p,handleClearClick:y,handleFocusDetectorFocus:h,disableTransitionOneTick:x,handlePanelKeyDown:w,handlePanelFocus:k,cachePendingValue:D,clearPendingValue:T,restorePendingValue:Y,getShortcutValue:I,handleShortcutMouseleave:Y,showMonthYearPanel:N,handleOpenQuickSelectMonthPanel:J}}const eo=Object.assign(Object.assign({},ul),{defaultCalendarStartTime:Number,actions:{type:Array,default:()=>["now","clear","confirm"]}});function to(e,r){var t;const n=cl(e),{isValueInvalidRef:a,isDateDisabledRef:o,isDateInvalidRef:l,isTimeInvalidRef:s,isDateTimeInvalidRef:d,isHourDisabledRef:u,isMinuteDisabledRef:c,isSecondDisabledRef:f,localeRef:v,firstDayOfWeekRef:m,datePickerSlots:p,yearFormatRef:y,monthFormatRef:h,quarterFormatRef:x,yearRangeRef:w}=it(qr),k={isValueInvalid:a,isDateDisabled:o,isDateInvalid:l,isTimeInvalid:s,isDateTimeInvalid:d,isHourDisabled:u,isMinuteDisabled:c,isSecondDisabled:f},b=g(()=>e.dateFormat||v.value.dateFormat),R=g(()=>e.calendarDayFormat||v.value.dayFormat),D=F(e.value===null||Array.isArray(e.value)?"":nt(e.value,b.value)),T=F(e.value===null||Array.isArray(e.value)?(t=e.defaultCalendarStartTime)!==null&&t!==void 0?t:Date.now():e.value),Y=F(null),I=F(null),N=F(null),J=F(Date.now()),O=g(()=>{var A;return _a(T.value,e.value,J.value,(A=m.value)!==null&&A!==void 0?A:v.value.firstDayOfWeek,!1,r==="week")}),C=g(()=>{const{value:A}=e;return Oa(T.value,Array.isArray(A)?null:A,J.value,{monthFormat:h.value})}),B=g(()=>{const{value:A}=e;return Ma(Array.isArray(A)?null:A,J.value,{yearFormat:y.value},w)}),L=g(()=>{const{value:A}=e;return Da(T.value,Array.isArray(A)?null:A,J.value,{quarterFormat:x.value})}),Q=g(()=>O.value.slice(0,7).map(A=>{const{ts:_e}=A;return nt(_e,R.value,n.dateFnsOptions.value)})),q=g(()=>nt(T.value,e.calendarHeaderMonthFormat||v.value.monthFormat,n.dateFnsOptions.value)),ee=g(()=>nt(T.value,e.calendarHeaderYearFormat||v.value.yearFormat,n.dateFnsOptions.value)),ue=g(()=>{var A;return(A=e.calendarHeaderMonthBeforeYear)!==null&&A!==void 0?A:v.value.monthBeforeYear});bt(T,(A,_e)=>{(r==="date"||r==="datetime")&&(Rr(A,_e)||n.disableTransitionOneTick())}),bt(g(()=>e.value),A=>{A!==null&&!Array.isArray(A)?(D.value=nt(A,b.value,n.dateFnsOptions.value),T.value=A):D.value=""});function te(A){var _e;if(r==="datetime")return ce(qa(A));if(r==="month")return ce(fn(A));if(r==="year")return ce(kr(A));if(r==="quarter")return ce(mr(A));if(r==="week"){const He=(((_e=m.value)!==null&&_e!==void 0?_e:v.value.firstDayOfWeek)+1)%7;return ce(pn(A,{weekStartsOn:He}))}return ce(rr(A))}function V(A,_e){const{isDateDisabled:{value:He}}=k;return He?He(A,_e):!1}function _(A){const _e=Et(A,b.value,new Date,n.dateFnsOptions.value);if(Qt(_e)){if(e.value===null)n.doUpdateValue(ce(te(Date.now())),e.panel);else if(!Array.isArray(e.value)){const He=_t(e.value,{year:mt(_e),month:dt(_e),date:Gt(_e)});n.doUpdateValue(ce(te(ce(He))),e.panel)}}else D.value=A}function E(){const A=Et(D.value,b.value,new Date,n.dateFnsOptions.value);if(Qt(A)){if(e.value===null)n.doUpdateValue(ce(te(Date.now())),!1);else if(!Array.isArray(e.value)){const _e=_t(e.value,{year:mt(A),month:dt(A),date:Gt(A)});n.doUpdateValue(ce(te(ce(_e))),!1)}}else $e()}function U(){n.doUpdateValue(null,!0),D.value="",n.doClose(!0),n.handleClearClick()}function ne(){n.doUpdateValue(ce(te(Date.now())),!0);const A=Date.now();T.value=A,n.doClose(!0),e.panel&&(r==="month"||r==="quarter"||r==="year")&&(n.disableTransitionOneTick(),se(A))}const Oe=F(null);function he(A){A.type==="date"&&r==="week"&&(Oe.value=te(ce(A.ts)))}function Te(A){return A.type==="date"&&r==="week"?te(ce(A.ts))===Oe.value:!1}function j(A){if(V(A.ts,A.type==="date"?{type:"date",year:A.dateObject.year,month:A.dateObject.month,date:A.dateObject.date}:A.type==="month"?{type:"month",year:A.dateObject.year,month:A.dateObject.month}:A.type==="year"?{type:"year",year:A.dateObject.year}:{type:"quarter",year:A.dateObject.year,quarter:A.dateObject.quarter}))return;let _e;if(e.value!==null&&!Array.isArray(e.value)?_e=e.value:_e=Date.now(),r==="datetime"&&e.defaultTime!==null&&!Array.isArray(e.defaultTime)){const He=Mr(e.defaultTime);He&&(_e=ce(_t(_e,He)))}switch(_e=ce(A.type==="quarter"&&A.dateObject.quarter?$u(Ta(_e,A.dateObject.year),A.dateObject.quarter):_t(_e,A.dateObject)),n.doUpdateValue(te(_e),e.panel||r==="date"||r==="week"||r==="year"),r){case"date":case"week":n.doClose();break;case"year":e.panel&&n.disableTransitionOneTick(),n.doClose();break;case"month":n.disableTransitionOneTick(),se(_e);break;case"quarter":n.disableTransitionOneTick(),se(_e);break}}function be(A,_e){let He;e.value!==null&&!Array.isArray(e.value)?He=e.value:He=Date.now(),He=ce(A.type==="month"?Ga(He,A.dateObject.month):Ta(He,A.dateObject.year)),_e(He),se(He)}function Se(A){T.value=A}function $e(A){if(e.value===null||Array.isArray(e.value)){D.value="";return}A===void 0&&(A=e.value),D.value=nt(A,b.value,n.dateFnsOptions.value)}function Ke(){k.isDateInvalid.value||k.isTimeInvalid.value||(n.doConfirm(),lt())}function lt(){e.active&&n.doClose()}function ht(){var A;T.value=ce(Sa(T.value,1)),(A=e.onNextYear)===null||A===void 0||A.call(e)}function Qe(){var A;T.value=ce(Sa(T.value,-1)),(A=e.onPrevYear)===null||A===void 0||A.call(e)}function X(){var A;T.value=ce(Tt(T.value,1)),(A=e.onNextMonth)===null||A===void 0||A.call(e)}function we(){var A;T.value=ce(Tt(T.value,-1)),(A=e.onPrevMonth)===null||A===void 0||A.call(e)}function re(){const{value:A}=Y;return(A==null?void 0:A.listElRef)||null}function Re(){const{value:A}=Y;return(A==null?void 0:A.itemsElRef)||null}function Ee(){var A;(A=I.value)===null||A===void 0||A.sync()}function ze(A){A!==null&&n.doUpdateValue(A,e.panel)}function Le(A){n.cachePendingValue();const _e=n.getShortcutValue(A);typeof _e=="number"&&n.doUpdateValue(_e,!1)}function Z(A){const _e=n.getShortcutValue(A);typeof _e=="number"&&(n.doUpdateValue(_e,e.panel),n.clearPendingValue(),Ke())}function se(A){const{value:_e}=e;if(N.value){const He=dt(A===void 0?_e===null?Date.now():_e:A);N.value.scrollTo({top:He*Yn})}if(Y.value){const He=mt(A===void 0?_e===null?Date.now():_e:A)-w.value[0];Y.value.scrollTo({top:He*Yn})}}const De={monthScrollbarRef:N,yearScrollbarRef:I,yearVlRef:Y};return Object.assign(Object.assign(Object.assign(Object.assign({dateArray:O,monthArray:C,yearArray:B,quarterArray:L,calendarYear:ee,calendarMonth:q,weekdays:Q,calendarMonthBeforeYear:ue,mergedIsDateDisabled:V,nextYear:ht,prevYear:Qe,nextMonth:X,prevMonth:we,handleNowClick:ne,handleConfirmClick:Ke,handleSingleShortcutMouseenter:Le,handleSingleShortcutClick:Z},k),n),De),{handleDateClick:j,handleDateInputBlur:E,handleDateInput:_,handleDateMouseEnter:he,isWeekHovered:Te,handleTimePickerChange:ze,clearSelectedDateTime:U,virtualListContainer:re,virtualListContent:Re,handleVirtualListScroll:Ee,timePickerSize:n.timePickerSize,dateInputValue:D,datePickerSlots:p,handleQuickMonthClick:be,justifyColumnsScrollState:se,calendarValue:T,onUpdateCalendarValue:Se})}const fl=ge({name:"MonthPanel",props:Object.assign(Object.assign({},eo),{type:{type:String,required:!0},useAsQuickJump:Boolean}),setup(e){const r=to(e,e.type),{dateLocaleRef:t}=yn("DatePicker"),n=l=>{switch(l.type){case"year":return Ui(l.dateObject.year,l.yearFormat,t.value.locale);case"month":return Hi(l.dateObject.month,l.monthFormat,t.value.locale);case"quarter":return ji(l.dateObject.quarter,l.quarterFormat,t.value.locale)}},{useAsQuickJump:a}=e,o=(l,s,d)=>{const{mergedIsDateDisabled:u,handleDateClick:c,handleQuickMonthClick:f}=r;return i("div",{"data-n-date":!0,key:s,class:[`${d}-date-panel-month-calendar__picker-col-item`,l.isCurrent&&`${d}-date-panel-month-calendar__picker-col-item--current`,l.selected&&`${d}-date-panel-month-calendar__picker-col-item--selected`,!a&&u(l.ts,l.type==="year"?{type:"year",year:l.dateObject.year}:l.type==="month"?{type:"month",year:l.dateObject.year,month:l.dateObject.month}:l.type==="quarter"?{type:"month",year:l.dateObject.year,month:l.dateObject.quarter}:null)&&`${d}-date-panel-month-calendar__picker-col-item--disabled`],onClick:()=>{a?f(l,v=>{e.onUpdateValue(v,!1)}):c(l)}},n(l))};return Zt(()=>{r.justifyColumnsScrollState()}),Object.assign(Object.assign({},r),{renderItem:o})},render(){const{mergedClsPrefix:e,mergedTheme:r,shortcuts:t,actions:n,renderItem:a,type:o,onRender:l}=this;return l==null||l(),i("div",{ref:"selfRef",tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--month`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onFocus:this.handlePanelFocus,onKeydown:this.handlePanelKeyDown},i("div",{class:`${e}-date-panel-month-calendar`},i(Ut,{ref:"yearScrollbarRef",class:`${e}-date-panel-month-calendar__picker-col`,theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar,container:this.virtualListContainer,content:this.virtualListContent,horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>i(tr,{ref:"yearVlRef",items:this.yearArray,itemSize:Yn,showScrollbar:!1,keyField:"ts",onScroll:this.handleVirtualListScroll,paddingBottom:4},{default:({item:s,index:d})=>a(s,d,e)})}),o==="month"||o==="quarter"?i("div",{class:`${e}-date-panel-month-calendar__picker-col`},i(Ut,{ref:"monthScrollbarRef",theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar},{default:()=>[(o==="month"?this.monthArray:this.quarterArray).map((s,d)=>a(s,d,e)),i("div",{class:`${e}-date-panel-${o}-calendar__padding`})]})):null),this.datePickerSlots.footer?i("div",{class:`${e}-date-panel-footer`},{default:this.datePickerSlots.footer}):null,n!=null&&n.length||t?i("div",{class:`${e}-date-panel-actions`},i("div",{class:`${e}-date-panel-actions__prefix`},t&&Object.keys(t).map(s=>{const d=t[s];return Array.isArray(d)?null:i(sn,{size:"tiny",onMouseenter:()=>{this.handleSingleShortcutMouseenter(d)},onClick:()=>{this.handleSingleShortcutClick(d)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>s})})),i("div",{class:`${e}-date-panel-actions__suffix`},n!=null&&n.includes("clear")?Vt(this.$slots.now,{onClear:this.handleClearClick,text:this.locale.clear},()=>[i(ft,{theme:r.peers.Button,themeOverrides:r.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,n!=null&&n.includes("now")?Vt(this.$slots.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[i(ft,{theme:r.peers.Button,themeOverrides:r.peerOverrides.Button,size:"tiny",onClick:this.handleNowClick},{default:()=>this.locale.now})]):null,n!=null&&n.includes("confirm")?Vt(this.$slots.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isDateInvalid,text:this.locale.confirm},()=>[i(ft,{theme:r.peers.Button,themeOverrides:r.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isDateInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,i(On,{onFocus:this.handleFocusDetectorFocus}))}}),ar=ge({props:{mergedClsPrefix:{type:String,required:!0},value:Number,monthBeforeYear:{type:Boolean,required:!0},monthYearSeparator:{type:String,required:!0},calendarMonth:{type:String,required:!0},calendarYear:{type:String,required:!0},onUpdateValue:{type:Function,required:!0}},setup(){const e=F(null),r=F(null),t=F(!1);function n(o){var l;t.value&&!(!((l=e.value)===null||l===void 0)&&l.contains(Ur(o)))&&(t.value=!1)}function a(){t.value=!t.value}return{show:t,triggerRef:e,monthPanelRef:r,handleHeaderClick:a,handleClickOutside:n}},render(){const{handleClickOutside:e,mergedClsPrefix:r}=this;return i("div",{class:`${r}-date-panel-month__month-year`,ref:"triggerRef"},i(wr,null,{default:()=>[i(xr,null,{default:()=>i("div",{class:[`${r}-date-panel-month__text`,this.show&&`${r}-date-panel-month__text--active`],onClick:this.handleHeaderClick},this.monthBeforeYear?[this.calendarMonth,this.monthYearSeparator,this.calendarYear]:[this.calendarYear,this.monthYearSeparator,this.calendarMonth])}),i(Cr,{show:this.show,teleportDisabled:!0},{default:()=>i(Kn,{name:"fade-in-scale-up-transition",appear:!0},{default:()=>this.show?Hr(i(fl,{ref:"monthPanelRef",onUpdateValue:this.onUpdateValue,actions:[],calendarHeaderMonthYearSeparator:this.monthYearSeparator,type:"month",key:"month",useAsQuickJump:!0,value:this.value}),[[hr,e,void 0,{capture:!0}]]):null})})]}))}}),gf=ge({name:"DatePanel",props:Object.assign(Object.assign({},eo),{type:{type:String,required:!0}}),setup(e){return to(e,e.type)},render(){var e,r,t;const{mergedClsPrefix:n,mergedTheme:a,shortcuts:o,onRender:l,$slots:s,type:d}=this;return l==null||l(),i("div",{ref:"selfRef",tabindex:0,class:[`${n}-date-panel`,`${n}-date-panel--${d}`,!this.panel&&`${n}-date-panel--shadow`,this.themeClass],onFocus:this.handlePanelFocus,onKeydown:this.handlePanelKeyDown},i("div",{class:`${n}-date-panel-calendar`},i("div",{class:`${n}-date-panel-month`},i("div",{class:`${n}-date-panel-month__fast-prev`,onClick:this.prevYear},qe(s["prev-year"],()=>[i(Pn,null)])),i("div",{class:`${n}-date-panel-month__prev`,onClick:this.prevMonth},qe(s["prev-month"],()=>[i(Sn,null)])),i(ar,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.calendarValue,onUpdateValue:this.onUpdateCalendarValue,mergedClsPrefix:n,calendarMonth:this.calendarMonth,calendarYear:this.calendarYear}),i("div",{class:`${n}-date-panel-month__next`,onClick:this.nextMonth},qe(s["next-month"],()=>[i(Tn,null)])),i("div",{class:`${n}-date-panel-month__fast-next`,onClick:this.nextYear},qe(s["next-year"],()=>[i(Fn,null)]))),i("div",{class:`${n}-date-panel-weekdays`},this.weekdays.map(u=>i("div",{key:u,class:`${n}-date-panel-weekdays__day`},u))),i("div",{class:`${n}-date-panel-dates`},this.dateArray.map((u,c)=>i("div",{"data-n-date":!0,key:c,class:[`${n}-date-panel-date`,{[`${n}-date-panel-date--current`]:u.isCurrentDate,[`${n}-date-panel-date--selected`]:u.selected,[`${n}-date-panel-date--excluded`]:!u.inCurrentMonth,[`${n}-date-panel-date--disabled`]:this.mergedIsDateDisabled(u.ts,{type:"date",year:u.dateObject.year,month:u.dateObject.month,date:u.dateObject.date}),[`${n}-date-panel-date--week-hovered`]:this.isWeekHovered(u),[`${n}-date-panel-date--week-selected`]:u.inSelectedWeek}],onClick:()=>{this.handleDateClick(u)},onMouseenter:()=>{this.handleDateMouseEnter(u)}},i("div",{class:`${n}-date-panel-date__trigger`}),u.dateObject.date,u.isCurrentDate?i("div",{class:`${n}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?i("div",{class:`${n}-date-panel-footer`},this.datePickerSlots.footer()):null,!((e=this.actions)===null||e===void 0)&&e.length||o?i("div",{class:`${n}-date-panel-actions`},i("div",{class:`${n}-date-panel-actions__prefix`},o&&Object.keys(o).map(u=>{const c=o[u];return Array.isArray(c)?null:i(sn,{size:"tiny",onMouseenter:()=>{this.handleSingleShortcutMouseenter(c)},onClick:()=>{this.handleSingleShortcutClick(c)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>u})})),i("div",{class:`${n}-date-panel-actions__suffix`},!((r=this.actions)===null||r===void 0)&&r.includes("clear")?Vt(this.$slots.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[i(ft,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,!((t=this.actions)===null||t===void 0)&&t.includes("now")?Vt(this.$slots.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[i(ft,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.handleNowClick},{default:()=>this.locale.now})]):null)):null,i(On,{onFocus:this.handleFocusDetectorFocus}))}}),no=Object.assign(Object.assign({},ul),{defaultCalendarStartTime:Number,defaultCalendarEndTime:Number,bindCalendarMonths:Boolean,actions:{type:Array,default:()=>["clear","confirm"]}});function ro(e,r){var t,n;const{isDateDisabledRef:a,isStartHourDisabledRef:o,isEndHourDisabledRef:l,isStartMinuteDisabledRef:s,isEndMinuteDisabledRef:d,isStartSecondDisabledRef:u,isEndSecondDisabledRef:c,isStartDateInvalidRef:f,isEndDateInvalidRef:v,isStartTimeInvalidRef:m,isEndTimeInvalidRef:p,isStartValueInvalidRef:y,isEndValueInvalidRef:h,isRangeInvalidRef:x,localeRef:w,rangesRef:k,closeOnSelectRef:b,updateValueOnCloseRef:R,firstDayOfWeekRef:D,datePickerSlots:T,monthFormatRef:Y,yearFormatRef:I,quarterFormatRef:N,yearRangeRef:J}=it(qr),O={isDateDisabled:a,isStartHourDisabled:o,isEndHourDisabled:l,isStartMinuteDisabled:s,isEndMinuteDisabled:d,isStartSecondDisabled:u,isEndSecondDisabled:c,isStartDateInvalid:f,isEndDateInvalid:v,isStartTimeInvalid:m,isEndTimeInvalid:p,isStartValueInvalid:y,isEndValueInvalid:h,isRangeInvalid:x},C=cl(e),B=F(null),L=F(null),Q=F(null),q=F(null),ee=F(null),ue=F(null),te=F(null),V=F(null),{value:_}=e,E=(t=e.defaultCalendarStartTime)!==null&&t!==void 0?t:Array.isArray(_)&&typeof _[0]=="number"?_[0]:Date.now(),U=F(E),ne=F((n=e.defaultCalendarEndTime)!==null&&n!==void 0?n:Array.isArray(_)&&typeof _[1]=="number"?_[1]:ce(Tt(E,1)));We(!0);const Oe=F(Date.now()),he=F(!1),Te=F(0),j=g(()=>e.dateFormat||w.value.dateFormat),be=g(()=>e.calendarDayFormat||w.value.dayFormat),Se=F(Array.isArray(_)?nt(_[0],j.value,C.dateFnsOptions.value):""),$e=F(Array.isArray(_)?nt(_[1],j.value,C.dateFnsOptions.value):""),Ke=g(()=>he.value?"end":"start"),lt=g(()=>{var z;return _a(U.value,e.value,Oe.value,(z=D.value)!==null&&z!==void 0?z:w.value.firstDayOfWeek)}),ht=g(()=>{var z;return _a(ne.value,e.value,Oe.value,(z=D.value)!==null&&z!==void 0?z:w.value.firstDayOfWeek)}),Qe=g(()=>lt.value.slice(0,7).map(z=>{const{ts:de}=z;return nt(de,be.value,C.dateFnsOptions.value)})),X=g(()=>nt(U.value,e.calendarHeaderMonthFormat||w.value.monthFormat,C.dateFnsOptions.value)),we=g(()=>nt(ne.value,e.calendarHeaderMonthFormat||w.value.monthFormat,C.dateFnsOptions.value)),re=g(()=>nt(U.value,e.calendarHeaderYearFormat||w.value.yearFormat,C.dateFnsOptions.value)),Re=g(()=>nt(ne.value,e.calendarHeaderYearFormat||w.value.yearFormat,C.dateFnsOptions.value)),Ee=g(()=>{const{value:z}=e;return Array.isArray(z)?z[0]:null}),ze=g(()=>{const{value:z}=e;return Array.isArray(z)?z[1]:null}),Le=g(()=>{const{shortcuts:z}=e;return z||k.value}),Z=g(()=>Ma(Gn(e.value,"start"),Oe.value,{yearFormat:I.value},J)),se=g(()=>Ma(Gn(e.value,"end"),Oe.value,{yearFormat:I.value},J)),De=g(()=>{const z=Gn(e.value,"start");return Da(z??Date.now(),z,Oe.value,{quarterFormat:N.value})}),A=g(()=>{const z=Gn(e.value,"end");return Da(z??Date.now(),z,Oe.value,{quarterFormat:N.value})}),_e=g(()=>{const z=Gn(e.value,"start");return Oa(z??Date.now(),z,Oe.value,{monthFormat:Y.value})}),He=g(()=>{const z=Gn(e.value,"end");return Oa(z??Date.now(),z,Oe.value,{monthFormat:Y.value})}),vt=g(()=>{var z;return(z=e.calendarHeaderMonthBeforeYear)!==null&&z!==void 0?z:w.value.monthBeforeYear});bt(g(()=>e.value),z=>{if(z!==null&&Array.isArray(z)){const[de,Pe]=z;Se.value=nt(de,j.value,C.dateFnsOptions.value),$e.value=nt(Pe,j.value,C.dateFnsOptions.value),he.value||Me(z)}else Se.value="",$e.value=""});function et(z,de){(r==="daterange"||r==="datetimerange")&&(mt(z)!==mt(de)||dt(z)!==dt(de))&&C.disableTransitionOneTick()}bt(U,et),bt(ne,et);function We(z){const de=fn(U.value),Pe=fn(ne.value);(e.bindCalendarMonths||de>=Pe)&&(z?ne.value=ce(Tt(de,1)):U.value=ce(Tt(Pe,-1)))}function je(){U.value=ce(Tt(U.value,12)),We(!0)}function ve(){U.value=ce(Tt(U.value,-12)),We(!0)}function Fe(){U.value=ce(Tt(U.value,1)),We(!0)}function S(){U.value=ce(Tt(U.value,-1)),We(!0)}function H(){ne.value=ce(Tt(ne.value,12)),We(!1)}function fe(){ne.value=ce(Tt(ne.value,-12)),We(!1)}function ke(){ne.value=ce(Tt(ne.value,1)),We(!1)}function xe(){ne.value=ce(Tt(ne.value,-1)),We(!1)}function P(z){U.value=z,We(!0)}function G(z){ne.value=z,We(!1)}function ye(z){const de=a.value;if(!de)return!1;if(!Array.isArray(e.value)||Ke.value==="start")return de(z,"start",null);{const{value:Pe}=Te;return z=Te.value?Je(Te.value,z.ts,"wipPreview"):Je(z.ts,Te.value,"wipPreview")}}function $(){x.value||(C.doConfirm(),ae())}function ae(){he.value=!1,e.active&&C.doClose()}function pe(z){typeof z!="number"&&(z=ce(z)),e.value===null?C.doUpdateValue([z,z],e.panel):Array.isArray(e.value)&&C.doUpdateValue([z,Math.max(e.value[1],z)],e.panel)}function Ie(z){typeof z!="number"&&(z=ce(z)),e.value===null?C.doUpdateValue([z,z],e.panel):Array.isArray(e.value)&&C.doUpdateValue([Math.min(e.value[0],z),z],e.panel)}function Je(z,de,Pe){if(typeof z!="number"&&(z=ce(z)),Pe!=="shortcutPreview"){let ut,qt;if(r==="datetimerange"){const{defaultTime:ct}=e;Array.isArray(ct)?(ut=Mr(ct[0]),qt=Mr(ct[1])):(ut=Mr(ct),qt=ut)}ut&&(z=ce(_t(z,ut))),qt&&(de=ce(_t(de,qt)))}C.doUpdateValue([z,de],e.panel&&Pe==="done")}function Ge(z){return ce(r==="datetimerange"?qa(z):r==="monthrange"?fn(z):rr(z))}function rt(z){const de=Et(z,j.value,new Date,C.dateFnsOptions.value);if(Qt(de))if(e.value){if(Array.isArray(e.value)){const Pe=_t(e.value[0],{year:mt(de),month:dt(de),date:Gt(de)});pe(Ge(ce(Pe)))}}else{const Pe=_t(new Date,{year:mt(de),month:dt(de),date:Gt(de)});pe(Ge(ce(Pe)))}else Se.value=z}function Nt(z){const de=Et(z,j.value,new Date,C.dateFnsOptions.value);if(Qt(de)){if(e.value===null){const Pe=_t(new Date,{year:mt(de),month:dt(de),date:Gt(de)});Ie(Ge(ce(Pe)))}else if(Array.isArray(e.value)){const Pe=_t(e.value[1],{year:mt(de),month:dt(de),date:Gt(de)});Ie(Ge(ce(Pe)))}}else $e.value=z}function Kt(){const z=Et(Se.value,j.value,new Date,C.dateFnsOptions.value),{value:de}=e;if(Qt(z)){if(de===null){const Pe=_t(new Date,{year:mt(z),month:dt(z),date:Gt(z)});pe(Ge(ce(Pe)))}else if(Array.isArray(de)){const Pe=_t(de[0],{year:mt(z),month:dt(z),date:Gt(z)});pe(Ge(ce(Pe)))}}else Rt()}function Ht(){const z=Et($e.value,j.value,new Date,C.dateFnsOptions.value),{value:de}=e;if(Qt(z)){if(de===null){const Pe=_t(new Date,{year:mt(z),month:dt(z),date:Gt(z)});Ie(Ge(ce(Pe)))}else if(Array.isArray(de)){const Pe=_t(de[1],{year:mt(z),month:dt(z),date:Gt(z)});Ie(Ge(ce(Pe)))}}else Rt()}function Rt(z){const{value:de}=e;if(de===null||!Array.isArray(de)){Se.value="",$e.value="";return}z===void 0&&(z=de),Se.value=nt(z[0],j.value,C.dateFnsOptions.value),$e.value=nt(z[1],j.value,C.dateFnsOptions.value)}function Wt(z){z!==null&&pe(z)}function en(z){z!==null&&Ie(z)}function yt(z){C.cachePendingValue();const de=C.getShortcutValue(z);Array.isArray(de)&&Je(de[0],de[1],"shortcutPreview")}function St(z){const de=C.getShortcutValue(z);Array.isArray(de)&&(Je(de[0],de[1],"done"),C.clearPendingValue(),$())}function Bt(z,de){const Pe=z===void 0?e.value:z;if(z===void 0||de==="start"){if(te.value){const ut=Array.isArray(Pe)?dt(Pe[0]):dt(Date.now());te.value.scrollTo({debounce:!1,index:ut,elSize:Yn})}if(ee.value){const ut=(Array.isArray(Pe)?mt(Pe[0]):mt(Date.now()))-J.value[0];ee.value.scrollTo({index:ut,debounce:!1})}}if(z===void 0||de==="end"){if(V.value){const ut=Array.isArray(Pe)?dt(Pe[1]):dt(Date.now());V.value.scrollTo({debounce:!1,index:ut,elSize:Yn})}if(ue.value){const ut=(Array.isArray(Pe)?mt(Pe[1]):mt(Date.now()))-J.value[0];ue.value.scrollTo({index:ut,debounce:!1})}}}function Dn(z,de){const{value:Pe}=e,ut=!Array.isArray(Pe),qt=z.type==="year"&&r!=="yearrange"?ut?_t(z.ts,{month:dt(r==="quarterrange"?mr(new Date):new Date)}).valueOf():_t(z.ts,{month:dt(r==="quarterrange"?mr(Pe[de==="start"?0:1]):Pe[de==="start"?0:1])}).valueOf():z.ts;if(ut){const Wn=Ge(qt),Bn=[Wn,Wn];C.doUpdateValue(Bn,e.panel),Bt(Bn,"start"),Bt(Bn,"end"),C.disableTransitionOneTick();return}const ct=[Pe[0],Pe[1]];let Nn=!1;switch(de==="start"?(ct[0]=Ge(qt),ct[0]>ct[1]&&(ct[1]=ct[0],Nn=!0)):(ct[1]=Ge(qt),ct[0]>ct[1]&&(ct[0]=ct[1],Nn=!0)),C.doUpdateValue(ct,e.panel),r){case"monthrange":case"quarterrange":C.disableTransitionOneTick(),Nn?(Bt(ct,"start"),Bt(ct,"end")):Bt(ct,de);break;case"yearrange":C.disableTransitionOneTick(),Bt(ct,"start"),Bt(ct,"end")}}function Mn(){var z;(z=Q.value)===null||z===void 0||z.sync()}function zn(){var z;(z=q.value)===null||z===void 0||z.sync()}function In(z){var de,Pe;return z==="start"?((de=ee.value)===null||de===void 0?void 0:de.listElRef)||null:((Pe=ue.value)===null||Pe===void 0?void 0:Pe.listElRef)||null}function $n(z){var de,Pe;return z==="start"?((de=ee.value)===null||de===void 0?void 0:de.itemsElRef)||null:((Pe=ue.value)===null||Pe===void 0?void 0:Pe.itemsElRef)||null}const An={startYearVlRef:ee,endYearVlRef:ue,startMonthScrollbarRef:te,endMonthScrollbarRef:V,startYearScrollbarRef:Q,endYearScrollbarRef:q};return Object.assign(Object.assign(Object.assign(Object.assign({startDatesElRef:B,endDatesElRef:L,handleDateClick:Ze,handleColItemClick:Dn,handleDateMouseEnter:Be,handleConfirmClick:$,startCalendarPrevYear:ve,startCalendarPrevMonth:S,startCalendarNextYear:je,startCalendarNextMonth:Fe,endCalendarPrevYear:fe,endCalendarPrevMonth:xe,endCalendarNextMonth:ke,endCalendarNextYear:H,mergedIsDateDisabled:ye,changeStartEndTime:Je,ranges:k,calendarMonthBeforeYear:vt,startCalendarMonth:X,startCalendarYear:re,endCalendarMonth:we,endCalendarYear:Re,weekdays:Qe,startDateArray:lt,endDateArray:ht,startYearArray:Z,startMonthArray:_e,startQuarterArray:De,endYearArray:se,endMonthArray:He,endQuarterArray:A,isSelecting:he,handleRangeShortcutMouseenter:yt,handleRangeShortcutClick:St},C),O),An),{startDateDisplayString:Se,endDateInput:$e,timePickerSize:C.timePickerSize,startTimeValue:Ee,endTimeValue:ze,datePickerSlots:T,shortcuts:Le,startCalendarDateTime:U,endCalendarDateTime:ne,justifyColumnsScrollState:Bt,handleFocusDetectorFocus:C.handleFocusDetectorFocus,handleStartTimePickerChange:Wt,handleEndTimePickerChange:en,handleStartDateInput:rt,handleStartDateInputBlur:Kt,handleEndDateInput:Nt,handleEndDateInputBlur:Ht,handleStartYearVlScroll:Mn,handleEndYearVlScroll:zn,virtualListContainer:In,virtualListContent:$n,onUpdateStartCalendarValue:P,onUpdateEndCalendarValue:G})}const bf=ge({name:"DateRangePanel",props:no,setup(e){return ro(e,"daterange")},render(){var e,r,t;const{mergedClsPrefix:n,mergedTheme:a,shortcuts:o,onRender:l,$slots:s}=this;return l==null||l(),i("div",{ref:"selfRef",tabindex:0,class:[`${n}-date-panel`,`${n}-date-panel--daterange`,!this.panel&&`${n}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},i("div",{ref:"startDatesElRef",class:`${n}-date-panel-calendar ${n}-date-panel-calendar--start`},i("div",{class:`${n}-date-panel-month`},i("div",{class:`${n}-date-panel-month__fast-prev`,onClick:this.startCalendarPrevYear},qe(s["prev-year"],()=>[i(Pn,null)])),i("div",{class:`${n}-date-panel-month__prev`,onClick:this.startCalendarPrevMonth},qe(s["prev-month"],()=>[i(Sn,null)])),i(ar,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.startCalendarDateTime,onUpdateValue:this.onUpdateStartCalendarValue,mergedClsPrefix:n,calendarMonth:this.startCalendarMonth,calendarYear:this.startCalendarYear}),i("div",{class:`${n}-date-panel-month__next`,onClick:this.startCalendarNextMonth},qe(s["next-month"],()=>[i(Tn,null)])),i("div",{class:`${n}-date-panel-month__fast-next`,onClick:this.startCalendarNextYear},qe(s["next-year"],()=>[i(Fn,null)]))),i("div",{class:`${n}-date-panel-weekdays`},this.weekdays.map(d=>i("div",{key:d,class:`${n}-date-panel-weekdays__day`},d))),i("div",{class:`${n}-date-panel__divider`}),i("div",{class:`${n}-date-panel-dates`},this.startDateArray.map((d,u)=>i("div",{"data-n-date":!0,key:u,class:[`${n}-date-panel-date`,{[`${n}-date-panel-date--excluded`]:!d.inCurrentMonth,[`${n}-date-panel-date--current`]:d.isCurrentDate,[`${n}-date-panel-date--selected`]:d.selected,[`${n}-date-panel-date--covered`]:d.inSpan,[`${n}-date-panel-date--start`]:d.startOfSpan,[`${n}-date-panel-date--end`]:d.endOfSpan,[`${n}-date-panel-date--disabled`]:this.mergedIsDateDisabled(d.ts)}],onClick:()=>{this.handleDateClick(d)},onMouseenter:()=>{this.handleDateMouseEnter(d)}},i("div",{class:`${n}-date-panel-date__trigger`}),d.dateObject.date,d.isCurrentDate?i("div",{class:`${n}-date-panel-date__sup`}):null)))),i("div",{class:`${n}-date-panel__vertical-divider`}),i("div",{ref:"endDatesElRef",class:`${n}-date-panel-calendar ${n}-date-panel-calendar--end`},i("div",{class:`${n}-date-panel-month`},i("div",{class:`${n}-date-panel-month__fast-prev`,onClick:this.endCalendarPrevYear},qe(s["prev-year"],()=>[i(Pn,null)])),i("div",{class:`${n}-date-panel-month__prev`,onClick:this.endCalendarPrevMonth},qe(s["prev-month"],()=>[i(Sn,null)])),i(ar,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.endCalendarDateTime,onUpdateValue:this.onUpdateEndCalendarValue,mergedClsPrefix:n,calendarMonth:this.endCalendarMonth,calendarYear:this.endCalendarYear}),i("div",{class:`${n}-date-panel-month__next`,onClick:this.endCalendarNextMonth},qe(s["next-month"],()=>[i(Tn,null)])),i("div",{class:`${n}-date-panel-month__fast-next`,onClick:this.endCalendarNextYear},qe(s["next-year"],()=>[i(Fn,null)]))),i("div",{class:`${n}-date-panel-weekdays`},this.weekdays.map(d=>i("div",{key:d,class:`${n}-date-panel-weekdays__day`},d))),i("div",{class:`${n}-date-panel__divider`}),i("div",{class:`${n}-date-panel-dates`},this.endDateArray.map((d,u)=>i("div",{"data-n-date":!0,key:u,class:[`${n}-date-panel-date`,{[`${n}-date-panel-date--excluded`]:!d.inCurrentMonth,[`${n}-date-panel-date--current`]:d.isCurrentDate,[`${n}-date-panel-date--selected`]:d.selected,[`${n}-date-panel-date--covered`]:d.inSpan,[`${n}-date-panel-date--start`]:d.startOfSpan,[`${n}-date-panel-date--end`]:d.endOfSpan,[`${n}-date-panel-date--disabled`]:this.mergedIsDateDisabled(d.ts)}],onClick:()=>{this.handleDateClick(d)},onMouseenter:()=>{this.handleDateMouseEnter(d)}},i("div",{class:`${n}-date-panel-date__trigger`}),d.dateObject.date,d.isCurrentDate?i("div",{class:`${n}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?i("div",{class:`${n}-date-panel-footer`},this.datePickerSlots.footer()):null,!((e=this.actions)===null||e===void 0)&&e.length||o?i("div",{class:`${n}-date-panel-actions`},i("div",{class:`${n}-date-panel-actions__prefix`},o&&Object.keys(o).map(d=>{const u=o[d];return Array.isArray(u)||typeof u=="function"?i(sn,{size:"tiny",onMouseenter:()=>{this.handleRangeShortcutMouseenter(u)},onClick:()=>{this.handleRangeShortcutClick(u)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>d}):null})),i("div",{class:`${n}-date-panel-actions__suffix`},!((r=this.actions)===null||r===void 0)&&r.includes("clear")?Vt(s.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[i(ft,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,!((t=this.actions)===null||t===void 0)&&t.includes("confirm")?Vt(s.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isRangeInvalid||this.isSelecting,text:this.locale.confirm},()=>[i(ft,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isRangeInvalid||this.isSelecting,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,i(On,{onFocus:this.handleFocusDetectorFocus}))}});function No(e,r,t){const n=$i(),a=xf(e,t.timeZone,t.locale??n.locale);return"formatToParts"in a?yf(a,r):wf(a,r)}function yf(e,r){const t=e.formatToParts(r);for(let n=t.length-1;n>=0;--n)if(t[n].type==="timeZoneName")return t[n].value}function wf(e,r){const t=e.format(r).replace(/\u200E/g,""),n=/ [\w-+ ]+$/.exec(t);return n?n[0].substr(1):""}function xf(e,r,t){return new Intl.DateTimeFormat(t?[t.code,"en-US"]:void 0,{timeZone:r,timeZoneName:e})}function Cf(e,r){const t=Ff(r);return"formatToParts"in t?Rf(t,e):Sf(t,e)}const kf={year:0,month:1,day:2,hour:3,minute:4,second:5};function Rf(e,r){try{const t=e.formatToParts(r),n=[];for(let a=0;a=0?o:1e3+o,n-a}function Of(e,r,t){let a=e.getTime()-r;const o=Aa(new Date(a),t);if(r===o)return r;a-=o-r;const l=Aa(new Date(a),t);return o===l?o:Math.max(o,l)}function Vo(e,r){return-23<=e&&e<=23&&(r==null||0<=r&&r<=59)}const Lo={};function Df(e){if(Lo[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Lo[e]=!0,!0}catch{return!1}}const Mf=60*1e3,zf={X:function(e,r,t){const n=ma(t.timeZone,e);if(n===0)return"Z";switch(r){case"X":return Ho(n);case"XXXX":case"XX":return Qn(n);case"XXXXX":case"XXX":default:return Qn(n,":")}},x:function(e,r,t){const n=ma(t.timeZone,e);switch(r){case"x":return Ho(n);case"xxxx":case"xx":return Qn(n);case"xxxxx":case"xxx":default:return Qn(n,":")}},O:function(e,r,t){const n=ma(t.timeZone,e);switch(r){case"O":case"OO":case"OOO":return"GMT"+If(n,":");case"OOOO":default:return"GMT"+Qn(n,":")}},z:function(e,r,t){switch(r){case"z":case"zz":case"zzz":return No("short",e,t);case"zzzz":default:return No("long",e,t)}}};function ma(e,r){const t=e?ao(e,r,!0)/Mf:(r==null?void 0:r.getTimezoneOffset())??0;if(Number.isNaN(t))throw new RangeError("Invalid time zone specified: "+e);return t}function Vr(e,r){const t=e<0?"-":"";let n=Math.abs(e).toString();for(;n.length0?"-":"+",n=Math.abs(e),a=Vr(Math.floor(n/60),2),o=Vr(Math.floor(n%60),2);return t+a+r+o}function Ho(e,r){return e%60===0?(e>0?"-":"+")+Vr(Math.abs(e)/60,2):Qn(e,r)}function If(e,r=""){const t=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),o=n%60;return o===0?t+String(a):t+String(a)+r+Vr(o,2)}function Uo(e){const r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+e-+r}const $f=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,pa=36e5,jo=6e4,Af=2,$t={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,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:$f};function vl(e,r={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const t=r.additionalDigits==null?Af:Number(r.additionalDigits);if(t!==2&&t!==1&&t!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const n=Nf(e),{year:a,restDateString:o}=Bf(n.date,t),l=Ef(o,a);if(l===null||isNaN(l.getTime()))return new Date(NaN);if(l){const s=l.getTime();let d=0,u;if(n.time&&(d=Vf(n.time),d===null||isNaN(d)))return new Date(NaN);if(n.timeZone||r.timeZone){if(u=ao(n.timeZone||r.timeZone,new Date(s+d)),isNaN(u))return new Date(NaN)}else u=Uo(new Date(s+d)),u=Uo(new Date(s+d+u));return new Date(s+d+u)}else return new Date(NaN)}function Nf(e){const r={};let t=$t.dateTimePattern.exec(e),n;if(t?(r.date=t[1],n=t[3]):(t=$t.datePattern.exec(e),t?(r.date=t[1],n=t[2]):(r.date=null,n=e)),n){const a=$t.timeZone.exec(n);a?(r.time=n.replace(a[1],""),r.timeZone=a[1].trim()):r.time=n}return r}function Bf(e,r){if(e){const t=$t.YYY[r],n=$t.YYYYY[r];let a=$t.YYYY.exec(e)||n.exec(e);if(a){const o=a[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(a=$t.YY.exec(e)||t.exec(e),a){const o=a[1];return{year:parseInt(o,10)*100,restDateString:e.slice(o.length)}}}return{year:null}}function Ef(e,r){if(r===null)return null;let t,n,a;if(!e||!e.length)return t=new Date(0),t.setUTCFullYear(r),t;let o=$t.MM.exec(e);if(o)return t=new Date(0),n=parseInt(o[1],10)-1,Ko(r,n)?(t.setUTCFullYear(r,n),t):new Date(NaN);if(o=$t.DDD.exec(e),o){t=new Date(0);const l=parseInt(o[1],10);return Uf(r,l)?(t.setUTCFullYear(r,0,l),t):new Date(NaN)}if(o=$t.MMDD.exec(e),o){t=new Date(0),n=parseInt(o[1],10)-1;const l=parseInt(o[2],10);return Ko(r,n,l)?(t.setUTCFullYear(r,n,l),t):new Date(NaN)}if(o=$t.Www.exec(e),o)return a=parseInt(o[1],10)-1,Wo(a)?Yo(r,a):new Date(NaN);if(o=$t.WwwD.exec(e),o){a=parseInt(o[1],10)-1;const l=parseInt(o[2],10)-1;return Wo(a,l)?Yo(r,a,l):new Date(NaN)}return null}function Vf(e){let r,t,n=$t.HH.exec(e);if(n)return r=parseFloat(n[1].replace(",",".")),ga(r)?r%24*pa:NaN;if(n=$t.HHMM.exec(e),n)return r=parseInt(n[1],10),t=parseFloat(n[2].replace(",",".")),ga(r,t)?r%24*pa+t*jo:NaN;if(n=$t.HHMMSS.exec(e),n){r=parseInt(n[1],10),t=parseInt(n[2],10);const a=parseFloat(n[3].replace(",","."));return ga(r,t,a)?r%24*pa+t*jo+a*1e3:NaN}return null}function Yo(e,r,t){r=r||0,t=t||0;const n=new Date(0);n.setUTCFullYear(e,0,4);const a=n.getUTCDay()||7,o=r*7+t+1-a;return n.setUTCDate(n.getUTCDate()+o),n}const Lf=[31,28,31,30,31,30,31,31,30,31,30,31],Hf=[31,29,31,30,31,30,31,31,30,31,30,31];function ml(e){return e%400===0||e%4===0&&e%100!==0}function Ko(e,r,t){if(r<0||r>11)return!1;if(t!=null){if(t<1)return!1;const n=ml(e);if(n&&t>Hf[r]||!n&&t>Lf[r])return!1}return!0}function Uf(e,r){if(r<1)return!1;const t=ml(e);return!(t&&r>366||!t&&r>365)}function Wo(e,r){return!(e<0||e>52||r!=null&&(r<0||r>6))}function ga(e,r,t){return!(e<0||e>=25||r!=null&&(r<0||r>=60)||t!=null&&(t<0||t>=60))}const jf=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Yf(e,r,t={}){r=String(r);const n=r.match(jf);if(n){const a=vl(t.originalDate||e,t);r=n.reduce(function(o,l){if(l[0]==="'")return o;const s=o.indexOf(l),d=o[s-1]==="'",u=o.replace(l,"'"+zf[l[0]](a,l,t)+"'");return d?u.substring(0,s-1)+u.substring(s+1):u},r)}return nt(e,r,t)}function Kf(e,r,t){e=vl(e,t);const n=ao(r,e,!0),a=new Date(e.getTime()-n),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 Wf(e,r,t,n){return n={...n,timeZone:r,originalDate:e},Yf(Kf(e,r,{timeZone:n.timeZone}),t,n)}const pl=bn("n-time-picker"),_r=ge({name:"TimePickerPanelCol",props:{clsPrefix:{type:String,required:!0},data:{type:Array,required:!0},activeValue:{type:[Number,String],default:null},onItemClick:Function},render(){const{activeValue:e,onItemClick:r,clsPrefix:t}=this;return this.data.map(n=>{const{label:a,disabled:o,value:l}=n,s=e===l;return i("div",{key:a,"data-active":s?"":null,class:[`${t}-time-picker-col__item`,s&&`${t}-time-picker-col__item--active`,o&&`${t}-time-picker-col__item--disabled`],onClick:r&&!o?()=>{r(l)}:void 0},a)})}}),ir={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 ba(e){return`00${e}`.slice(-2)}function lr(e,r,t){return Array.isArray(r)?(t==="am"?r.filter(n=>n<12):t==="pm"?r.filter(n=>n>=12).map(n=>n===12?12:n-12):r).map(n=>ba(n)):typeof r=="number"?t==="am"?e.filter(n=>{const a=Number(n);return a<12&&a%r===0}):t==="pm"?e.filter(n=>{const a=Number(n);return a>=12&&a%r===0}).map(n=>{const a=Number(n);return ba(a===12?12:a-12)}):e.filter(n=>Number(n)%r===0):t==="am"?e.filter(n=>Number(n)<12):t==="pm"?e.map(n=>Number(n)).filter(n=>Number(n)>=12).map(n=>ba(n===12?12:n-12)):e}function Or(e,r,t){return t?typeof t=="number"?e%t===0:t.includes(e):!0}function qf(e,r,t){const n=lr(ir[r],t).map(Number);let a,o;for(let l=0;le){o=s;break}a=s}return a===void 0?(o||Hl("time-picker","Please set 'hours' or 'minutes' or 'seconds' props"),o):o===void 0||o-e>e-a?a:o}function Gf(e){return Cn(e)<12?"am":"pm"}const Xf={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},Qf=ge({name:"TimePickerPanel",props:Xf,setup(e){const{mergedThemeRef:r,mergedClsPrefixRef:t}=it(pl),n=g(()=>{const{isHourDisabled:s,hours:d,use12Hours:u,amPmValue:c}=e;if(u){const f=c??Gf(Date.now());return lr(ir.hours,d,f).map(v=>{const m=Number(v),p=f==="pm"&&m!==12?m+12:m;return{label:v,value:p,disabled:s?s(p):!1}})}else return lr(ir.hours,d).map(f=>({label:f,value:Number(f),disabled:s?s(Number(f)):!1}))}),a=g(()=>{const{isMinuteDisabled:s,minutes:d}=e;return lr(ir.minutes,d).map(u=>({label:u,value:Number(u),disabled:s?s(Number(u),e.hourValue):!1}))}),o=g(()=>{const{isSecondDisabled:s,seconds:d}=e;return lr(ir.seconds,d).map(u=>({label:u,value:Number(u),disabled:s?s(Number(u),e.minuteValue,e.hourValue):!1}))}),l=g(()=>{const{isHourDisabled:s}=e;let d=!0,u=!0;for(let c=0;c<12;++c)if(!(s!=null&&s(c))){d=!1;break}for(let c=12;c<24;++c)if(!(s!=null&&s(c))){u=!1;break}return[{label:"AM",value:"am",disabled:d},{label:"PM",value:"pm",disabled:u}]});return{mergedTheme:r,mergedClsPrefix:t,hours:n,minutes:a,seconds:o,amPm:l,hourScrollRef:F(null),minuteScrollRef:F(null),secondScrollRef:F(null),amPmScrollRef:F(null)}},render(){var e,r,t,n;const{mergedClsPrefix:a,mergedTheme:o}=this;return i("div",{tabindex:0,class:`${a}-time-picker-panel`,onFocusin:this.onFocusin,onFocusout:this.onFocusout,onKeydown:this.onKeydown},i("div",{class:`${a}-time-picker-cols`},this.showHour?i("div",{class:[`${a}-time-picker-col`,this.isHourInvalid&&`${a}-time-picker-col--invalid`,this.transitionDisabled&&`${a}-time-picker-col--transition-disabled`]},i(Ut,{ref:"hourScrollRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar},{default:()=>[i(_r,{clsPrefix:a,data:this.hours,activeValue:this.hourValue,onItemClick:this.onHourClick}),i("div",{class:`${a}-time-picker-col__padding`})]})):null,this.showMinute?i("div",{class:[`${a}-time-picker-col`,this.transitionDisabled&&`${a}-time-picker-col--transition-disabled`,this.isMinuteInvalid&&`${a}-time-picker-col--invalid`]},i(Ut,{ref:"minuteScrollRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar},{default:()=>[i(_r,{clsPrefix:a,data:this.minutes,activeValue:this.minuteValue,onItemClick:this.onMinuteClick}),i("div",{class:`${a}-time-picker-col__padding`})]})):null,this.showSecond?i("div",{class:[`${a}-time-picker-col`,this.isSecondInvalid&&`${a}-time-picker-col--invalid`,this.transitionDisabled&&`${a}-time-picker-col--transition-disabled`]},i(Ut,{ref:"secondScrollRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar},{default:()=>[i(_r,{clsPrefix:a,data:this.seconds,activeValue:this.secondValue,onItemClick:this.onSecondClick}),i("div",{class:`${a}-time-picker-col__padding`})]})):null,this.use12Hours?i("div",{class:[`${a}-time-picker-col`,this.isAmPmInvalid&&`${a}-time-picker-col--invalid`,this.transitionDisabled&&`${a}-time-picker-col--transition-disabled`]},i(Ut,{ref:"amPmScrollRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar},{default:()=>[i(_r,{clsPrefix:a,data:this.amPm,activeValue:this.amPmValue,onItemClick:this.onAmPmClick}),i("div",{class:`${a}-time-picker-col__padding`})]})):null),!((e=this.actions)===null||e===void 0)&&e.length?i("div",{class:`${a}-time-picker-actions`},!((r=this.actions)===null||r===void 0)&&r.includes("clear")?i(ft,{theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,size:"tiny",onClick:this.onClearClick},{default:()=>this.clearText}):null,!((t=this.actions)===null||t===void 0)&&t.includes("now")?i(ft,{size:"tiny",theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:this.onNowClick},{default:()=>this.nowText}):null,!((n=this.actions)===null||n===void 0)&&n.includes("confirm")?i(ft,{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,i(On,{onFocus:this.onFocusDetectorFocus}))}}),Zf=W([M("time-picker",` z-index: auto; position: relative; - `,[O("time-picker-icon",` + `,[M("time-picker-icon",` color: var(--n-icon-color-override); transition: color .3s var(--n-bezier); - `),K("disabled",[O("time-picker-icon",` + `),K("disabled",[M("time-picker-icon",` color: var(--n-icon-color-disabled-override); - `)])]),O("time-picker-panel",` + `)])]),M("time-picker-panel",` transition: box-shadow .3s var(--n-bezier), background-color .3s var(--n-bezier); @@ -1247,18 +1247,18 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config overflow: hidden; background-color: var(--n-panel-color); box-shadow: var(--n-panel-box-shadow); - `,[or(),O("time-picker-actions",` + `,[or(),M("time-picker-actions",` padding: var(--n-panel-action-padding); align-items: center; display: flex; justify-content: space-evenly; - `),O("time-picker-cols",` + `),M("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); - `),O("time-picker-col",` + `),M("time-picker-col",` flex-grow: 1; min-width: var(--n-item-width); height: calc(var(--n-item-height) * 6); @@ -1306,20 +1306,20 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config `)]),K("invalid",[le("item",[K("active",` text-decoration: line-through; text-decoration-color: var(--n-item-text-color-active); - `)])])])])]);function ya(e,r){return e===void 0?!0:Array.isArray(e)?e.every(t=>t>=0&&t<=r):e>=0&&e<=r}const Jf=Object.assign(Object.assign({},Ye.props),{to:un.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:e=>ya(e,23)},minutes:{type:[Number,Array],validator:e=>ya(e,59)},seconds:{type:[Number,Array],validator:e=>ya(e,59)},use12Hours:Boolean,stateful:{type:Boolean,default:!0},onChange:[Function,Array]}),Na=ge({name:"TimePicker",props:Jf,setup(e){const{mergedBorderedRef:r,mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:a}=xt(e),{localeRef:o,dateLocaleRef:l}=yn("TimePicker"),s=Tn(e),{mergedSizeRef:d,mergedDisabledRef:u,mergedStatusRef:c}=s,f=Ye("TimePicker","-time-picker",Zf,Ul,e,t),v=Ua(),m=F(null),p=F(null),y=b(()=>({locale:l.value.locale}));function h(I){return I===null?null:Et(I,e.valueFormat||e.format,new Date,y.value).getTime()}const{defaultValue:w,defaultFormattedValue:g}=e,k=F(g!==void 0?h(g):w),x=b(()=>{const{formattedValue:I}=e;if(I!==void 0)return h(I);const{value:ae}=e;return ae!==void 0?ae:k.value}),P=b(()=>{const{timeZone:I}=e;return I?(ae,pe,Ie)=>Wf(ae,I,pe,Ie):(ae,pe,Ie)=>nt(ae,pe,Ie)}),$=F("");gt(()=>e.timeZone,()=>{const I=x.value;$.value=I===null?"":P.value(I,e.format,y.value)},{immediate:!0});const T=F(!1),Y=me(e,"show"),z=zt(Y,T),N=F(x.value),J=F(!1),D=b(()=>o.value.clear),C=b(()=>o.value.now),B=b(()=>e.placeholder!==void 0?e.placeholder:o.value.placeholder),L=b(()=>o.value.negativeText),Q=b(()=>o.value.positiveText),q=b(()=>/H|h|K|k/.test(e.format)),ee=b(()=>e.format.includes("m")),ue=b(()=>e.format.includes("s")),te=b(()=>{const{value:I}=x;return I===null?null:Number(P.value(I,"HH",y.value))}),V=b(()=>{const{value:I}=x;return I===null?null:Number(P.value(I,"mm",y.value))}),_=b(()=>{const{value:I}=x;return I===null?null:Number(P.value(I,"ss",y.value))}),E=b(()=>{const{isHourDisabled:I}=e;return te.value===null?!1:Dr(te.value,"hours",e.hours)?I?I(te.value):!1:!0}),U=b(()=>{const{value:I}=V,{value:ae}=te;if(I===null||ae===null)return!1;if(!Dr(I,"minutes",e.minutes))return!0;const{isMinuteDisabled:pe}=e;return pe?pe(I,ae):!1}),ne=b(()=>{const{value:I}=V,{value:ae}=te,{value:pe}=_;if(pe===null||I===null||ae===null)return!1;if(!Dr(pe,"seconds",e.seconds))return!0;const{isSecondDisabled:Ie}=e;return Ie?Ie(pe,I,ae):!1}),De=b(()=>E.value||U.value||ne.value),he=b(()=>e.format.length+4),Te=b(()=>{const{value:I}=x;return I===null?null:xn(I)<12?"am":"pm"});function j(I,ae){const{onUpdateFormattedValue:pe,"onUpdate:formattedValue":Ie}=e;pe&&oe(pe,I,ae),Ie&&oe(Ie,I,ae)}function be(I){return I===null?null:P.value(I,e.valueFormat||e.format)}function Se(I){const{onUpdateValue:ae,"onUpdate:value":pe,onChange:Ie}=e,{nTriggerFormChange:Je,nTriggerFormInput:Ge}=s,rt=be(I);ae&&oe(ae,I,rt),pe&&oe(pe,I,rt),Ie&&oe(Ie,I,rt),j(rt,I),k.value=I,Je(),Ge()}function $e(I){const{onFocus:ae}=e,{nTriggerFormFocus:pe}=s;ae&&oe(ae,I),pe()}function Ke(I){const{onBlur:ae}=e,{nTriggerFormBlur:pe}=s;ae&&oe(ae,I),pe()}function lt(){const{onConfirm:I}=e;I&&oe(I,x.value,be(x.value))}function ht(I){var ae;I.stopPropagation(),Se(null),Oe(null),(ae=e.onClear)===null||ae===void 0||ae.call(e)}function Qe(){R({returnFocus:!0})}function X(){Se(null),Oe(null),R({returnFocus:!0})}function we(I){I.key==="Escape"&&z.value&&vr(I)}function re(I){var ae;switch(I.key){case"Escape":z.value&&(vr(I),R({returnFocus:!0}));break;case"Tab":v.shift&&I.target===((ae=p.value)===null||ae===void 0?void 0:ae.$el)&&(I.preventDefault(),R({returnFocus:!0}));break}}function Re(){J.value=!0,nn(()=>{J.value=!1})}function Ee(I){u.value||Lt(I,"clear")||z.value||ve()}function ze(I){typeof I!="string"&&(x.value===null?Se(ce(Bn(Iu(new Date),I))):Se(ce(Bn(x.value,I))))}function Le(I){typeof I!="string"&&(x.value===null?Se(ce(la(xd(new Date),I))):Se(ce(la(x.value,I))))}function Z(I){typeof I!="string"&&(x.value===null?Se(ce(sa(qa(new Date),I))):Se(ce(sa(x.value,I))))}function se(I){const{value:ae}=x;if(ae===null){const pe=new Date,Ie=xn(pe);I==="pm"&&Ie<12?Se(ce(Bn(pe,Ie+12))):I==="am"&&Ie>=12&&Se(ce(Bn(pe,Ie-12))),Se(ce(pe))}else{const pe=xn(ae);I==="pm"&&pe<12?Se(ce(Bn(ae,pe+12))):I==="am"&&pe>=12&&Se(ce(Bn(ae,pe-12)))}}function Oe(I){I===void 0&&(I=x.value),I===null?$.value="":$.value=P.value(I,e.format,y.value)}function A(I){Ue(I)||$e(I)}function _e(I){var ae;if(!Ue(I))if(z.value){const pe=(ae=p.value)===null||ae===void 0?void 0:ae.$el;pe!=null&&pe.contains(I.relatedTarget)||(Oe(),Ke(I),R({returnFocus:!1}))}else Oe(),Ke(I)}function He(){u.value||z.value||ve()}function vt(){u.value||(Oe(),R({returnFocus:!1}))}function et(){if(!p.value)return;const{hourScrollRef:I,minuteScrollRef:ae,secondScrollRef:pe,amPmScrollRef:Ie}=p.value;[I,ae,pe,Ie].forEach(Je=>{var Ge;if(!Je)return;const rt=(Ge=Je.contentRef)===null||Ge===void 0?void 0:Ge.querySelector("[data-active]");rt&&Je.scrollTo({top:rt.offsetTop})})}function We(I){T.value=I;const{onUpdateShow:ae,"onUpdate:show":pe}=e;ae&&oe(ae,I),pe&&oe(pe,I)}function Ue(I){var ae,pe,Ie;return!!(!((pe=(ae=m.value)===null||ae===void 0?void 0:ae.wrapperElRef)===null||pe===void 0)&&pe.contains(I.relatedTarget)||!((Ie=p.value)===null||Ie===void 0)&&Ie.$el.contains(I.relatedTarget))}function ve(){N.value=x.value,We(!0),nn(et)}function Fe(I){var ae,pe;z.value&&!(!((pe=(ae=m.value)===null||ae===void 0?void 0:ae.wrapperElRef)===null||pe===void 0)&&pe.contains(Ur(I)))&&R({returnFocus:!1})}function R({returnFocus:I}){var ae;z.value&&(We(!1),I&&((ae=m.value)===null||ae===void 0||ae.focus()))}function H(I){if(I===""){Se(null);return}const ae=Et(I,e.format,new Date,y.value);if($.value=I,Gt(ae)){const{value:pe}=x;if(pe!==null){const Ie=_t(pe,{hours:xn(ae),minutes:Nr(ae),seconds:Br(ae),milliseconds:Bd(ae)});Se(ce(Ie))}else Se(ce(ae))}}function fe(){Se(N.value),We(!1)}function ke(){const I=new Date,ae={hours:xn,minutes:Nr,seconds:Br},[pe,Ie,Je]=["hours","minutes","seconds"].map(rt=>!e[rt]||Dr(ae[rt](I),rt,e[rt])?ae[rt](I):qf(ae[rt](I),rt,e[rt])),Ge=sa(la(Bn(x.value?x.value:ce(I),pe),Ie),Je);Se(ce(Ge))}function xe(){Oe(),lt(),R({returnFocus:!0})}function S(I){Ue(I)||(Oe(),Ke(I),R({returnFocus:!1}))}gt(x,I=>{Oe(I),Re(),nn(et)}),gt(z,()=>{De.value&&Se(N.value)}),At(pl,{mergedThemeRef:f,mergedClsPrefixRef:t});const G={focus:()=>{var I;(I=m.value)===null||I===void 0||I.focus()},blur:()=>{var I;(I=m.value)===null||I===void 0||I.blur()}},ye=b(()=>{const{common:{cubicBezierEaseInOut:I},self:{iconColor:ae,iconColorDisabled:pe}}=f.value;return{"--n-icon-color-override":ae,"--n-icon-color-disabled-override":pe,"--n-bezier":I}}),Me=a?Mt("time-picker-trigger",void 0,ye,e):void 0,Ze=b(()=>{const{self:{panelColor:I,itemTextColor:ae,itemTextColorActive:pe,itemColorHover:Ie,panelDividerColor:Je,panelBoxShadow:Ge,itemOpacityDisabled:rt,borderRadius:Nt,itemFontSize:Yt,itemWidth:Ht,itemHeight:Rt,panelActionPadding:Kt,itemBorderRadius:Jt},common:{cubicBezierEaseInOut:bt}}=f.value;return{"--n-bezier":bt,"--n-border-radius":Nt,"--n-item-color-hover":Ie,"--n-item-font-size":Yt,"--n-item-height":Rt,"--n-item-opacity-disabled":rt,"--n-item-text-color":ae,"--n-item-text-color-active":pe,"--n-item-width":Ht,"--n-panel-action-padding":Kt,"--n-panel-box-shadow":Ge,"--n-panel-color":I,"--n-panel-divider-color":Je,"--n-item-border-radius":Jt}}),Ne=a?Mt("time-picker",void 0,Ze,e):void 0;return{focus:G.focus,blur:G.blur,mergedStatus:c,mergedBordered:r,mergedClsPrefix:t,namespace:n,uncontrolledValue:k,mergedValue:x,isMounted:La(),inputInstRef:m,panelInstRef:p,adjustedTo:un(e),mergedShow:z,localizedClear:D,localizedNow:C,localizedPlaceholder:B,localizedNegativeText:L,localizedPositiveText:Q,hourInFormat:q,minuteInFormat:ee,secondInFormat:ue,mergedAttrSize:he,displayTimeString:$,mergedSize:d,mergedDisabled:u,isValueInvalid:De,isHourInvalid:E,isMinuteInvalid:U,isSecondInvalid:ne,transitionDisabled:J,hourValue:te,minuteValue:V,secondValue:_,amPmValue:Te,handleInputKeydown:we,handleTimeInputFocus:A,handleTimeInputBlur:_e,handleNowClick:ke,handleConfirmClick:xe,handleTimeInputUpdateValue:H,handleMenuFocusOut:S,handleCancelClick:fe,handleClickOutside:Fe,handleTimeInputActivate:He,handleTimeInputDeactivate:vt,handleHourClick:ze,handleMinuteClick:Le,handleSecondClick:Z,handleAmPmClick:se,handleTimeInputClear:ht,handleFocusDetectorFocus:Qe,handleMenuKeydown:re,handleTriggerClick:Ee,mergedTheme:f,triggerCssVars:a?void 0:ye,triggerThemeClass:Me==null?void 0:Me.themeClass,triggerOnRender:Me==null?void 0:Me.onRender,cssVars:a?void 0:Ze,themeClass:Ne==null?void 0:Ne.themeClass,onRender:Ne==null?void 0:Ne.onRender,clearSelectedValue:X}},render(){const{mergedClsPrefix:e,$slots:r,triggerOnRender:t}=this;return t==null||t(),i("div",{class:[`${e}-time-picker`,this.triggerThemeClass],style:this.triggerCssVars},i(wr,null,{default:()=>[i(xr,null,{default:()=>i(Xt,{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"]:()=>i(Pt,{clsPrefix:e,class:`${e}-time-picker-icon`},{default:()=>r.icon?r.icon():i(Os,null)})}:null)}),i(Cr,{teleportDisabled:this.adjustedTo===un.tdkey,show:this.mergedShow,to:this.adjustedTo,containerClass:this.namespace,placement:this.placement},{default:()=>i(Kn,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>{var n;return this.mergedShow?((n=this.onRender)===null||n===void 0||n.call(this),Hr(i(Qf,{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}),[[hr,this.handleClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),eh=ge({name:"DateTimePanel",props:eo,setup(e){return to(e,"datetime")},render(){var e,r,t,n;const{mergedClsPrefix:a,mergedTheme:o,shortcuts:l,timePickerProps:s,onRender:d,$slots:u}=this;return d==null||d(),i("div",{ref:"selfRef",tabindex:0,class:[`${a}-date-panel`,`${a}-date-panel--datetime`,!this.panel&&`${a}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},i("div",{class:`${a}-date-panel-header`},i(Xt,{value:this.dateInputValue,theme:o.peers.Input,themeOverrides:o.peerOverrides.Input,stateful:!1,size:this.timePickerSize,readonly:this.inputReadonly,class:`${a}-date-panel-date-input`,textDecoration:this.isDateInvalid?"line-through":"",placeholder:this.locale.selectDate,onBlur:this.handleDateInputBlur,onUpdateValue:this.handleDateInput}),i(Na,Object.assign({size:this.timePickerSize,placeholder:this.locale.selectTime,format:this.timerPickerFormat},Array.isArray(s)?void 0:s,{showIcon:!1,to:!1,theme:o.peers.TimePicker,themeOverrides:o.peerOverrides.TimePicker,value:Array.isArray(this.value)?null:this.value,isHourDisabled:this.isHourDisabled,isMinuteDisabled:this.isMinuteDisabled,isSecondDisabled:this.isSecondDisabled,onUpdateValue:this.handleTimePickerChange,stateful:!1}))),i("div",{class:`${a}-date-panel-calendar`},i("div",{class:`${a}-date-panel-month`},i("div",{class:`${a}-date-panel-month__fast-prev`,onClick:this.prevYear},qe(u["prev-year"],()=>[i(Sn,null)])),i("div",{class:`${a}-date-panel-month__prev`,onClick:this.prevMonth},qe(u["prev-month"],()=>[i(Rn,null)])),i(ar,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.calendarValue,onUpdateValue:this.onUpdateCalendarValue,mergedClsPrefix:a,calendarMonth:this.calendarMonth,calendarYear:this.calendarYear}),i("div",{class:`${a}-date-panel-month__next`,onClick:this.nextMonth},qe(u["next-month"],()=>[i(Fn,null)])),i("div",{class:`${a}-date-panel-month__fast-next`,onClick:this.nextYear},qe(u["next-year"],()=>[i(Pn,null)]))),i("div",{class:`${a}-date-panel-weekdays`},this.weekdays.map(c=>i("div",{key:c,class:`${a}-date-panel-weekdays__day`},c))),i("div",{class:`${a}-date-panel-dates`},this.dateArray.map((c,f)=>i("div",{"data-n-date":!0,key:f,class:[`${a}-date-panel-date`,{[`${a}-date-panel-date--current`]:c.isCurrentDate,[`${a}-date-panel-date--selected`]:c.selected,[`${a}-date-panel-date--excluded`]:!c.inCurrentMonth,[`${a}-date-panel-date--disabled`]:this.mergedIsDateDisabled(c.ts,{type:"date",year:c.dateObject.year,month:c.dateObject.month,date:c.dateObject.date})}],onClick:()=>{this.handleDateClick(c)}},i("div",{class:`${a}-date-panel-date__trigger`}),c.dateObject.date,c.isCurrentDate?i("div",{class:`${a}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?i("div",{class:`${a}-date-panel-footer`},this.datePickerSlots.footer()):null,!((e=this.actions)===null||e===void 0)&&e.length||l?i("div",{class:`${a}-date-panel-actions`},i("div",{class:`${a}-date-panel-actions__prefix`},l&&Object.keys(l).map(c=>{const f=l[c];return Array.isArray(f)?null:i(sn,{size:"tiny",onMouseenter:()=>{this.handleSingleShortcutMouseenter(f)},onClick:()=>{this.handleSingleShortcutClick(f)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>c})})),i("div",{class:`${a}-date-panel-actions__suffix`},!((r=this.actions)===null||r===void 0)&&r.includes("clear")?Vt(this.$slots.clear,{onClear:this.clearSelectedDateTime,text:this.locale.clear},()=>[i(ft,{theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,size:"tiny",onClick:this.clearSelectedDateTime},{default:()=>this.locale.clear})]):null,!((t=this.actions)===null||t===void 0)&&t.includes("now")?Vt(u.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[i(ft,{theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,size:"tiny",onClick:this.handleNowClick},{default:()=>this.locale.now})]):null,!((n=this.actions)===null||n===void 0)&&n.includes("confirm")?Vt(u.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isDateInvalid,text:this.locale.confirm},()=>[i(ft,{theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isDateInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,i(_n,{onFocus:this.handleFocusDetectorFocus}))}}),th=ge({name:"DateTimeRangePanel",props:no,setup(e){return ro(e,"datetimerange")},render(){var e,r,t;const{mergedClsPrefix:n,mergedTheme:a,shortcuts:o,timePickerProps:l,onRender:s,$slots:d}=this;return s==null||s(),i("div",{ref:"selfRef",tabindex:0,class:[`${n}-date-panel`,`${n}-date-panel--datetimerange`,!this.panel&&`${n}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},i("div",{class:`${n}-date-panel-header`},i(Xt,{value:this.startDateDisplayString,theme:a.peers.Input,themeOverrides:a.peerOverrides.Input,size:this.timePickerSize,stateful:!1,readonly:this.inputReadonly,class:`${n}-date-panel-date-input`,textDecoration:this.isStartValueInvalid?"line-through":"",placeholder:this.locale.selectDate,onBlur:this.handleStartDateInputBlur,onUpdateValue:this.handleStartDateInput}),i(Na,Object.assign({placeholder:this.locale.selectTime,format:this.timerPickerFormat,size:this.timePickerSize},Array.isArray(l)?l[0]:l,{value:this.startTimeValue,to:!1,showIcon:!1,disabled:this.isSelecting,theme:a.peers.TimePicker,themeOverrides:a.peerOverrides.TimePicker,stateful:!1,isHourDisabled:this.isStartHourDisabled,isMinuteDisabled:this.isStartMinuteDisabled,isSecondDisabled:this.isStartSecondDisabled,onUpdateValue:this.handleStartTimePickerChange})),i(Xt,{value:this.endDateInput,theme:a.peers.Input,themeOverrides:a.peerOverrides.Input,stateful:!1,size:this.timePickerSize,readonly:this.inputReadonly,class:`${n}-date-panel-date-input`,textDecoration:this.isEndValueInvalid?"line-through":"",placeholder:this.locale.selectDate,onBlur:this.handleEndDateInputBlur,onUpdateValue:this.handleEndDateInput}),i(Na,Object.assign({placeholder:this.locale.selectTime,format:this.timerPickerFormat,size:this.timePickerSize},Array.isArray(l)?l[1]:l,{disabled:this.isSelecting,showIcon:!1,theme:a.peers.TimePicker,themeOverrides:a.peerOverrides.TimePicker,to:!1,stateful:!1,value:this.endTimeValue,isHourDisabled:this.isEndHourDisabled,isMinuteDisabled:this.isEndMinuteDisabled,isSecondDisabled:this.isEndSecondDisabled,onUpdateValue:this.handleEndTimePickerChange}))),i("div",{ref:"startDatesElRef",class:`${n}-date-panel-calendar ${n}-date-panel-calendar--start`},i("div",{class:`${n}-date-panel-month`},i("div",{class:`${n}-date-panel-month__fast-prev`,onClick:this.startCalendarPrevYear},qe(d["prev-year"],()=>[i(Sn,null)])),i("div",{class:`${n}-date-panel-month__prev`,onClick:this.startCalendarPrevMonth},qe(d["prev-month"],()=>[i(Rn,null)])),i(ar,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.startCalendarDateTime,onUpdateValue:this.onUpdateStartCalendarValue,mergedClsPrefix:n,calendarMonth:this.startCalendarMonth,calendarYear:this.startCalendarYear}),i("div",{class:`${n}-date-panel-month__next`,onClick:this.startCalendarNextMonth},qe(d["next-month"],()=>[i(Fn,null)])),i("div",{class:`${n}-date-panel-month__fast-next`,onClick:this.startCalendarNextYear},qe(d["next-year"],()=>[i(Pn,null)]))),i("div",{class:`${n}-date-panel-weekdays`},this.weekdays.map(u=>i("div",{key:u,class:`${n}-date-panel-weekdays__day`},u))),i("div",{class:`${n}-date-panel__divider`}),i("div",{class:`${n}-date-panel-dates`},this.startDateArray.map((u,c)=>{const f=this.mergedIsDateDisabled(u.ts);return i("div",{"data-n-date":!0,key:c,class:[`${n}-date-panel-date`,{[`${n}-date-panel-date--excluded`]:!u.inCurrentMonth,[`${n}-date-panel-date--current`]:u.isCurrentDate,[`${n}-date-panel-date--selected`]:u.selected,[`${n}-date-panel-date--covered`]:u.inSpan,[`${n}-date-panel-date--start`]:u.startOfSpan,[`${n}-date-panel-date--end`]:u.endOfSpan,[`${n}-date-panel-date--disabled`]:f}],onClick:f?void 0:()=>{this.handleDateClick(u)},onMouseenter:f?void 0:()=>{this.handleDateMouseEnter(u)}},i("div",{class:`${n}-date-panel-date__trigger`}),u.dateObject.date,u.isCurrentDate?i("div",{class:`${n}-date-panel-date__sup`}):null)}))),i("div",{class:`${n}-date-panel__vertical-divider`}),i("div",{ref:"endDatesElRef",class:`${n}-date-panel-calendar ${n}-date-panel-calendar--end`},i("div",{class:`${n}-date-panel-month`},i("div",{class:`${n}-date-panel-month__fast-prev`,onClick:this.endCalendarPrevYear},qe(d["prev-year"],()=>[i(Sn,null)])),i("div",{class:`${n}-date-panel-month__prev`,onClick:this.endCalendarPrevMonth},qe(d["prev-month"],()=>[i(Rn,null)])),i(ar,{monthBeforeYear:this.calendarMonthBeforeYear,value:this.endCalendarDateTime,onUpdateValue:this.onUpdateEndCalendarValue,mergedClsPrefix:n,monthYearSeparator:this.calendarHeaderMonthYearSeparator,calendarMonth:this.endCalendarMonth,calendarYear:this.endCalendarYear}),i("div",{class:`${n}-date-panel-month__next`,onClick:this.endCalendarNextMonth},qe(d["next-month"],()=>[i(Fn,null)])),i("div",{class:`${n}-date-panel-month__fast-next`,onClick:this.endCalendarNextYear},qe(d["next-year"],()=>[i(Pn,null)]))),i("div",{class:`${n}-date-panel-weekdays`},this.weekdays.map(u=>i("div",{key:u,class:`${n}-date-panel-weekdays__day`},u))),i("div",{class:`${n}-date-panel__divider`}),i("div",{class:`${n}-date-panel-dates`},this.endDateArray.map((u,c)=>{const f=this.mergedIsDateDisabled(u.ts);return i("div",{"data-n-date":!0,key:c,class:[`${n}-date-panel-date`,{[`${n}-date-panel-date--excluded`]:!u.inCurrentMonth,[`${n}-date-panel-date--current`]:u.isCurrentDate,[`${n}-date-panel-date--selected`]:u.selected,[`${n}-date-panel-date--covered`]:u.inSpan,[`${n}-date-panel-date--start`]:u.startOfSpan,[`${n}-date-panel-date--end`]:u.endOfSpan,[`${n}-date-panel-date--disabled`]:f}],onClick:f?void 0:()=>{this.handleDateClick(u)},onMouseenter:f?void 0:()=>{this.handleDateMouseEnter(u)}},i("div",{class:`${n}-date-panel-date__trigger`}),u.dateObject.date,u.isCurrentDate?i("div",{class:`${n}-date-panel-date__sup`}):null)}))),this.datePickerSlots.footer?i("div",{class:`${n}-date-panel-footer`},this.datePickerSlots.footer()):null,!((e=this.actions)===null||e===void 0)&&e.length||o?i("div",{class:`${n}-date-panel-actions`},i("div",{class:`${n}-date-panel-actions__prefix`},o&&Object.keys(o).map(u=>{const c=o[u];return Array.isArray(c)||typeof c=="function"?i(sn,{size:"tiny",onMouseenter:()=>{this.handleRangeShortcutMouseenter(c)},onClick:()=>{this.handleRangeShortcutClick(c)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>u}):null})),i("div",{class:`${n}-date-panel-actions__suffix`},!((r=this.actions)===null||r===void 0)&&r.includes("clear")?Vt(d.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[i(ft,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,!((t=this.actions)===null||t===void 0)&&t.includes("confirm")?Vt(d.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isRangeInvalid||this.isSelecting,text:this.locale.confirm},()=>[i(ft,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isRangeInvalid||this.isSelecting,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,i(_n,{onFocus:this.handleFocusDetectorFocus}))}}),nh=ge({name:"MonthRangePanel",props:Object.assign(Object.assign({},no),{type:{type:String,required:!0}}),setup(e){const r=ro(e,e.type),{dateLocaleRef:t}=yn("DatePicker"),n=(a,o,l,s)=>{const{handleColItemClick:d}=r;return i("div",{"data-n-date":!0,key:o,class:[`${l}-date-panel-month-calendar__picker-col-item`,a.isCurrent&&`${l}-date-panel-month-calendar__picker-col-item--current`,a.selected&&`${l}-date-panel-month-calendar__picker-col-item--selected`,!1],onClick:()=>{d(a,s)}},a.type==="month"?Hi(a.dateObject.month,a.monthFormat,t.value.locale):a.type==="quarter"?ji(a.dateObject.quarter,a.quarterFormat,t.value.locale):Ui(a.dateObject.year,a.yearFormat,t.value.locale))};return Qt(()=>{r.justifyColumnsScrollState()}),Object.assign(Object.assign({},r),{renderItem:n})},render(){var e,r,t;const{mergedClsPrefix:n,mergedTheme:a,shortcuts:o,type:l,renderItem:s,onRender:d}=this;return d==null||d(),i("div",{ref:"selfRef",tabindex:0,class:[`${n}-date-panel`,`${n}-date-panel--daterange`,!this.panel&&`${n}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},i("div",{ref:"startDatesElRef",class:`${n}-date-panel-calendar ${n}-date-panel-calendar--start`},i("div",{class:`${n}-date-panel-month-calendar`},i(Ut,{ref:"startYearScrollbarRef",class:`${n}-date-panel-month-calendar__picker-col`,theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar,container:()=>this.virtualListContainer("start"),content:()=>this.virtualListContent("start"),horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>i(tr,{ref:"startYearVlRef",items:this.startYearArray,itemSize:Yn,showScrollbar:!1,keyField:"ts",onScroll:this.handleStartYearVlScroll,paddingBottom:4},{default:({item:u,index:c})=>s(u,c,n,"start")})}),l==="monthrange"||l==="quarterrange"?i("div",{class:`${n}-date-panel-month-calendar__picker-col`},i(Ut,{ref:"startMonthScrollbarRef",theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar},{default:()=>[(l==="monthrange"?this.startMonthArray:this.startQuarterArray).map((u,c)=>s(u,c,n,"start")),l==="monthrange"&&i("div",{class:`${n}-date-panel-month-calendar__padding`})]})):null)),i("div",{class:`${n}-date-panel__vertical-divider`}),i("div",{ref:"endDatesElRef",class:`${n}-date-panel-calendar ${n}-date-panel-calendar--end`},i("div",{class:`${n}-date-panel-month-calendar`},i(Ut,{ref:"endYearScrollbarRef",class:`${n}-date-panel-month-calendar__picker-col`,theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar,container:()=>this.virtualListContainer("end"),content:()=>this.virtualListContent("end"),horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>i(tr,{ref:"endYearVlRef",items:this.endYearArray,itemSize:Yn,showScrollbar:!1,keyField:"ts",onScroll:this.handleEndYearVlScroll,paddingBottom:4},{default:({item:u,index:c})=>s(u,c,n,"end")})}),l==="monthrange"||l==="quarterrange"?i("div",{class:`${n}-date-panel-month-calendar__picker-col`},i(Ut,{ref:"endMonthScrollbarRef",theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar},{default:()=>[(l==="monthrange"?this.endMonthArray:this.endQuarterArray).map((u,c)=>s(u,c,n,"end")),l==="monthrange"&&i("div",{class:`${n}-date-panel-month-calendar__padding`})]})):null)),this.datePickerSlots.footer?i("div",{class:`${n}-date-panel-footer`},Jo(this.datePickerSlots,"footer")):null,!((e=this.actions)===null||e===void 0)&&e.length||o?i("div",{class:`${n}-date-panel-actions`},i("div",{class:`${n}-date-panel-actions__prefix`},o&&Object.keys(o).map(u=>{const c=o[u];return Array.isArray(c)||typeof c=="function"?i(sn,{size:"tiny",onMouseenter:()=>{this.handleRangeShortcutMouseenter(c)},onClick:()=>{this.handleRangeShortcutClick(c)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>u}):null})),i("div",{class:`${n}-date-panel-actions__suffix`},!((r=this.actions)===null||r===void 0)&&r.includes("clear")?Vt(this.$slots.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[i(sn,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,!((t=this.actions)===null||t===void 0)&&t.includes("confirm")?Vt(this.$slots.confirm,{disabled:this.isRangeInvalid,onConfirm:this.handleConfirmClick,text:this.locale.confirm},()=>[i(sn,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isRangeInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,i(_n,{onFocus:this.handleFocusDetectorFocus}))}}),rh=Object.assign(Object.assign({},Ye.props),{to:un.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,updateValueOnClose:Boolean,calendarDayFormat:String,calendarHeaderYearFormat:String,calendarHeaderMonthFormat:String,calendarHeaderMonthYearSeparator:{type:String,default:" "},calendarHeaderMonthBeforeYear:{type:Boolean,default:void 0},defaultValue:[Number,Array],defaultFormattedValue:[String,Array],defaultTime:[Number,String,Array],disabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom-start"},value:[Number,Array],formattedValue:[String,Array],size:String,type:{type:String,default:"date"},valueFormat:String,separator:String,placeholder:String,startPlaceholder:String,endPlaceholder:String,format:String,dateFormat:String,timerPickerFormat:String,actions:Array,shortcuts:Object,isDateDisabled:Function,isTimeDisabled:Function,show:{type:Boolean,default:void 0},panel:Boolean,ranges:Object,firstDayOfWeek:Number,inputReadonly:Boolean,closeOnSelect:Boolean,status:String,timePickerProps:[Object,Array],onClear:Function,onConfirm:Function,defaultCalendarStartTime:Number,defaultCalendarEndTime:Number,bindCalendarMonths:Boolean,monthFormat:{type:String,default:"M"},yearFormat:{type:String,default:"y"},quarterFormat:{type:String,default:"'Q'Q"},yearRange:{type:Array,default:()=>[1901,2100]},"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],"onUpdate:formattedValue":[Function,Array],onUpdateFormattedValue:[Function,Array],"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onNextMonth:Function,onPrevMonth:Function,onNextYear:Function,onPrevYear:Function,onChange:[Function,Array]}),ah=W([O("date-picker",` + `)])])])])]);function ya(e,r){return e===void 0?!0:Array.isArray(e)?e.every(t=>t>=0&&t<=r):e>=0&&e<=r}const Jf=Object.assign(Object.assign({},Ye.props),{to:un.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:e=>ya(e,23)},minutes:{type:[Number,Array],validator:e=>ya(e,59)},seconds:{type:[Number,Array],validator:e=>ya(e,59)},use12Hours:Boolean,stateful:{type:Boolean,default:!0},onChange:[Function,Array]}),Na=ge({name:"TimePicker",props:Jf,setup(e){const{mergedBorderedRef:r,mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:a}=xt(e),{localeRef:o,dateLocaleRef:l}=yn("TimePicker"),s=_n(e),{mergedSizeRef:d,mergedDisabledRef:u,mergedStatusRef:c}=s,f=Ye("TimePicker","-time-picker",Zf,Ul,e,t),v=Ua(),m=F(null),p=F(null),y=g(()=>({locale:l.value.locale}));function h($){return $===null?null:Et($,e.valueFormat||e.format,new Date,y.value).getTime()}const{defaultValue:x,defaultFormattedValue:w}=e,k=F(w!==void 0?h(w):x),b=g(()=>{const{formattedValue:$}=e;if($!==void 0)return h($);const{value:ae}=e;return ae!==void 0?ae:k.value}),R=g(()=>{const{timeZone:$}=e;return $?(ae,pe,Ie)=>Wf(ae,$,pe,Ie):(ae,pe,Ie)=>nt(ae,pe,Ie)}),D=F("");bt(()=>e.timeZone,()=>{const $=b.value;D.value=$===null?"":R.value($,e.format,y.value)},{immediate:!0});const T=F(!1),Y=me(e,"show"),I=zt(Y,T),N=F(b.value),J=F(!1),O=g(()=>o.value.clear),C=g(()=>o.value.now),B=g(()=>e.placeholder!==void 0?e.placeholder:o.value.placeholder),L=g(()=>o.value.negativeText),Q=g(()=>o.value.positiveText),q=g(()=>/H|h|K|k/.test(e.format)),ee=g(()=>e.format.includes("m")),ue=g(()=>e.format.includes("s")),te=g(()=>{const{value:$}=b;return $===null?null:Number(R.value($,"HH",y.value))}),V=g(()=>{const{value:$}=b;return $===null?null:Number(R.value($,"mm",y.value))}),_=g(()=>{const{value:$}=b;return $===null?null:Number(R.value($,"ss",y.value))}),E=g(()=>{const{isHourDisabled:$}=e;return te.value===null?!1:Or(te.value,"hours",e.hours)?$?$(te.value):!1:!0}),U=g(()=>{const{value:$}=V,{value:ae}=te;if($===null||ae===null)return!1;if(!Or($,"minutes",e.minutes))return!0;const{isMinuteDisabled:pe}=e;return pe?pe($,ae):!1}),ne=g(()=>{const{value:$}=V,{value:ae}=te,{value:pe}=_;if(pe===null||$===null||ae===null)return!1;if(!Or(pe,"seconds",e.seconds))return!0;const{isSecondDisabled:Ie}=e;return Ie?Ie(pe,$,ae):!1}),Oe=g(()=>E.value||U.value||ne.value),he=g(()=>e.format.length+4),Te=g(()=>{const{value:$}=b;return $===null?null:Cn($)<12?"am":"pm"});function j($,ae){const{onUpdateFormattedValue:pe,"onUpdate:formattedValue":Ie}=e;pe&&ie(pe,$,ae),Ie&&ie(Ie,$,ae)}function be($){return $===null?null:R.value($,e.valueFormat||e.format)}function Se($){const{onUpdateValue:ae,"onUpdate:value":pe,onChange:Ie}=e,{nTriggerFormChange:Je,nTriggerFormInput:Ge}=s,rt=be($);ae&&ie(ae,$,rt),pe&&ie(pe,$,rt),Ie&&ie(Ie,$,rt),j(rt,$),k.value=$,Je(),Ge()}function $e($){const{onFocus:ae}=e,{nTriggerFormFocus:pe}=s;ae&&ie(ae,$),pe()}function Ke($){const{onBlur:ae}=e,{nTriggerFormBlur:pe}=s;ae&&ie(ae,$),pe()}function lt(){const{onConfirm:$}=e;$&&ie($,b.value,be(b.value))}function ht($){var ae;$.stopPropagation(),Se(null),De(null),(ae=e.onClear)===null||ae===void 0||ae.call(e)}function Qe(){S({returnFocus:!0})}function X(){Se(null),De(null),S({returnFocus:!0})}function we($){$.key==="Escape"&&I.value&&vr($)}function re($){var ae;switch($.key){case"Escape":I.value&&(vr($),S({returnFocus:!0}));break;case"Tab":v.shift&&$.target===((ae=p.value)===null||ae===void 0?void 0:ae.$el)&&($.preventDefault(),S({returnFocus:!0}));break}}function Re(){J.value=!0,nn(()=>{J.value=!1})}function Ee($){u.value||Lt($,"clear")||I.value||ve()}function ze($){typeof $!="string"&&(b.value===null?Se(ce(En(Iu(new Date),$))):Se(ce(En(b.value,$))))}function Le($){typeof $!="string"&&(b.value===null?Se(ce(la(xd(new Date),$))):Se(ce(la(b.value,$))))}function Z($){typeof $!="string"&&(b.value===null?Se(ce(sa(qa(new Date),$))):Se(ce(sa(b.value,$))))}function se($){const{value:ae}=b;if(ae===null){const pe=new Date,Ie=Cn(pe);$==="pm"&&Ie<12?Se(ce(En(pe,Ie+12))):$==="am"&&Ie>=12&&Se(ce(En(pe,Ie-12))),Se(ce(pe))}else{const pe=Cn(ae);$==="pm"&&pe<12?Se(ce(En(ae,pe+12))):$==="am"&&pe>=12&&Se(ce(En(ae,pe-12)))}}function De($){$===void 0&&($=b.value),$===null?D.value="":D.value=R.value($,e.format,y.value)}function A($){je($)||$e($)}function _e($){var ae;if(!je($))if(I.value){const pe=(ae=p.value)===null||ae===void 0?void 0:ae.$el;pe!=null&&pe.contains($.relatedTarget)||(De(),Ke($),S({returnFocus:!1}))}else De(),Ke($)}function He(){u.value||I.value||ve()}function vt(){u.value||(De(),S({returnFocus:!1}))}function et(){if(!p.value)return;const{hourScrollRef:$,minuteScrollRef:ae,secondScrollRef:pe,amPmScrollRef:Ie}=p.value;[$,ae,pe,Ie].forEach(Je=>{var Ge;if(!Je)return;const rt=(Ge=Je.contentRef)===null||Ge===void 0?void 0:Ge.querySelector("[data-active]");rt&&Je.scrollTo({top:rt.offsetTop})})}function We($){T.value=$;const{onUpdateShow:ae,"onUpdate:show":pe}=e;ae&&ie(ae,$),pe&&ie(pe,$)}function je($){var ae,pe,Ie;return!!(!((pe=(ae=m.value)===null||ae===void 0?void 0:ae.wrapperElRef)===null||pe===void 0)&&pe.contains($.relatedTarget)||!((Ie=p.value)===null||Ie===void 0)&&Ie.$el.contains($.relatedTarget))}function ve(){N.value=b.value,We(!0),nn(et)}function Fe($){var ae,pe;I.value&&!(!((pe=(ae=m.value)===null||ae===void 0?void 0:ae.wrapperElRef)===null||pe===void 0)&&pe.contains(Ur($)))&&S({returnFocus:!1})}function S({returnFocus:$}){var ae;I.value&&(We(!1),$&&((ae=m.value)===null||ae===void 0||ae.focus()))}function H($){if($===""){Se(null);return}const ae=Et($,e.format,new Date,y.value);if(D.value=$,Qt(ae)){const{value:pe}=b;if(pe!==null){const Ie=_t(pe,{hours:Cn(ae),minutes:Nr(ae),seconds:Br(ae),milliseconds:Bd(ae)});Se(ce(Ie))}else Se(ce(ae))}}function fe(){Se(N.value),We(!1)}function ke(){const $=new Date,ae={hours:Cn,minutes:Nr,seconds:Br},[pe,Ie,Je]=["hours","minutes","seconds"].map(rt=>!e[rt]||Or(ae[rt]($),rt,e[rt])?ae[rt]($):qf(ae[rt]($),rt,e[rt])),Ge=sa(la(En(b.value?b.value:ce($),pe),Ie),Je);Se(ce(Ge))}function xe(){De(),lt(),S({returnFocus:!0})}function P($){je($)||(De(),Ke($),S({returnFocus:!1}))}bt(b,$=>{De($),Re(),nn(et)}),bt(I,()=>{Oe.value&&Se(N.value)}),At(pl,{mergedThemeRef:f,mergedClsPrefixRef:t});const G={focus:()=>{var $;($=m.value)===null||$===void 0||$.focus()},blur:()=>{var $;($=m.value)===null||$===void 0||$.blur()}},ye=g(()=>{const{common:{cubicBezierEaseInOut:$},self:{iconColor:ae,iconColorDisabled:pe}}=f.value;return{"--n-icon-color-override":ae,"--n-icon-color-disabled-override":pe,"--n-bezier":$}}),Me=a?Mt("time-picker-trigger",void 0,ye,e):void 0,Ze=g(()=>{const{self:{panelColor:$,itemTextColor:ae,itemTextColorActive:pe,itemColorHover:Ie,panelDividerColor:Je,panelBoxShadow:Ge,itemOpacityDisabled:rt,borderRadius:Nt,itemFontSize:Kt,itemWidth:Ht,itemHeight:Rt,panelActionPadding:Wt,itemBorderRadius:en},common:{cubicBezierEaseInOut:yt}}=f.value;return{"--n-bezier":yt,"--n-border-radius":Nt,"--n-item-color-hover":Ie,"--n-item-font-size":Kt,"--n-item-height":Rt,"--n-item-opacity-disabled":rt,"--n-item-text-color":ae,"--n-item-text-color-active":pe,"--n-item-width":Ht,"--n-panel-action-padding":Wt,"--n-panel-box-shadow":Ge,"--n-panel-color":$,"--n-panel-divider-color":Je,"--n-item-border-radius":en}}),Be=a?Mt("time-picker",void 0,Ze,e):void 0;return{focus:G.focus,blur:G.blur,mergedStatus:c,mergedBordered:r,mergedClsPrefix:t,namespace:n,uncontrolledValue:k,mergedValue:b,isMounted:La(),inputInstRef:m,panelInstRef:p,adjustedTo:un(e),mergedShow:I,localizedClear:O,localizedNow:C,localizedPlaceholder:B,localizedNegativeText:L,localizedPositiveText:Q,hourInFormat:q,minuteInFormat:ee,secondInFormat:ue,mergedAttrSize:he,displayTimeString:D,mergedSize:d,mergedDisabled:u,isValueInvalid:Oe,isHourInvalid:E,isMinuteInvalid:U,isSecondInvalid:ne,transitionDisabled:J,hourValue:te,minuteValue:V,secondValue:_,amPmValue:Te,handleInputKeydown:we,handleTimeInputFocus:A,handleTimeInputBlur:_e,handleNowClick:ke,handleConfirmClick:xe,handleTimeInputUpdateValue:H,handleMenuFocusOut:P,handleCancelClick:fe,handleClickOutside:Fe,handleTimeInputActivate:He,handleTimeInputDeactivate:vt,handleHourClick:ze,handleMinuteClick:Le,handleSecondClick:Z,handleAmPmClick:se,handleTimeInputClear:ht,handleFocusDetectorFocus:Qe,handleMenuKeydown:re,handleTriggerClick:Ee,mergedTheme:f,triggerCssVars:a?void 0:ye,triggerThemeClass:Me==null?void 0:Me.themeClass,triggerOnRender:Me==null?void 0:Me.onRender,cssVars:a?void 0:Ze,themeClass:Be==null?void 0:Be.themeClass,onRender:Be==null?void 0:Be.onRender,clearSelectedValue:X}},render(){const{mergedClsPrefix:e,$slots:r,triggerOnRender:t}=this;return t==null||t(),i("div",{class:[`${e}-time-picker`,this.triggerThemeClass],style:this.triggerCssVars},i(wr,null,{default:()=>[i(xr,null,{default:()=>i(Yt,{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"]:()=>i(Pt,{clsPrefix:e,class:`${e}-time-picker-icon`},{default:()=>r.icon?r.icon():i(Ds,null)})}:null)}),i(Cr,{teleportDisabled:this.adjustedTo===un.tdkey,show:this.mergedShow,to:this.adjustedTo,containerClass:this.namespace,placement:this.placement},{default:()=>i(Kn,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>{var n;return this.mergedShow?((n=this.onRender)===null||n===void 0||n.call(this),Hr(i(Qf,{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}),[[hr,this.handleClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),eh=ge({name:"DateTimePanel",props:eo,setup(e){return to(e,"datetime")},render(){var e,r,t,n;const{mergedClsPrefix:a,mergedTheme:o,shortcuts:l,timePickerProps:s,onRender:d,$slots:u}=this;return d==null||d(),i("div",{ref:"selfRef",tabindex:0,class:[`${a}-date-panel`,`${a}-date-panel--datetime`,!this.panel&&`${a}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},i("div",{class:`${a}-date-panel-header`},i(Yt,{value:this.dateInputValue,theme:o.peers.Input,themeOverrides:o.peerOverrides.Input,stateful:!1,size:this.timePickerSize,readonly:this.inputReadonly,class:`${a}-date-panel-date-input`,textDecoration:this.isDateInvalid?"line-through":"",placeholder:this.locale.selectDate,onBlur:this.handleDateInputBlur,onUpdateValue:this.handleDateInput}),i(Na,Object.assign({size:this.timePickerSize,placeholder:this.locale.selectTime,format:this.timerPickerFormat},Array.isArray(s)?void 0:s,{showIcon:!1,to:!1,theme:o.peers.TimePicker,themeOverrides:o.peerOverrides.TimePicker,value:Array.isArray(this.value)?null:this.value,isHourDisabled:this.isHourDisabled,isMinuteDisabled:this.isMinuteDisabled,isSecondDisabled:this.isSecondDisabled,onUpdateValue:this.handleTimePickerChange,stateful:!1}))),i("div",{class:`${a}-date-panel-calendar`},i("div",{class:`${a}-date-panel-month`},i("div",{class:`${a}-date-panel-month__fast-prev`,onClick:this.prevYear},qe(u["prev-year"],()=>[i(Pn,null)])),i("div",{class:`${a}-date-panel-month__prev`,onClick:this.prevMonth},qe(u["prev-month"],()=>[i(Sn,null)])),i(ar,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.calendarValue,onUpdateValue:this.onUpdateCalendarValue,mergedClsPrefix:a,calendarMonth:this.calendarMonth,calendarYear:this.calendarYear}),i("div",{class:`${a}-date-panel-month__next`,onClick:this.nextMonth},qe(u["next-month"],()=>[i(Tn,null)])),i("div",{class:`${a}-date-panel-month__fast-next`,onClick:this.nextYear},qe(u["next-year"],()=>[i(Fn,null)]))),i("div",{class:`${a}-date-panel-weekdays`},this.weekdays.map(c=>i("div",{key:c,class:`${a}-date-panel-weekdays__day`},c))),i("div",{class:`${a}-date-panel-dates`},this.dateArray.map((c,f)=>i("div",{"data-n-date":!0,key:f,class:[`${a}-date-panel-date`,{[`${a}-date-panel-date--current`]:c.isCurrentDate,[`${a}-date-panel-date--selected`]:c.selected,[`${a}-date-panel-date--excluded`]:!c.inCurrentMonth,[`${a}-date-panel-date--disabled`]:this.mergedIsDateDisabled(c.ts,{type:"date",year:c.dateObject.year,month:c.dateObject.month,date:c.dateObject.date})}],onClick:()=>{this.handleDateClick(c)}},i("div",{class:`${a}-date-panel-date__trigger`}),c.dateObject.date,c.isCurrentDate?i("div",{class:`${a}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?i("div",{class:`${a}-date-panel-footer`},this.datePickerSlots.footer()):null,!((e=this.actions)===null||e===void 0)&&e.length||l?i("div",{class:`${a}-date-panel-actions`},i("div",{class:`${a}-date-panel-actions__prefix`},l&&Object.keys(l).map(c=>{const f=l[c];return Array.isArray(f)?null:i(sn,{size:"tiny",onMouseenter:()=>{this.handleSingleShortcutMouseenter(f)},onClick:()=>{this.handleSingleShortcutClick(f)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>c})})),i("div",{class:`${a}-date-panel-actions__suffix`},!((r=this.actions)===null||r===void 0)&&r.includes("clear")?Vt(this.$slots.clear,{onClear:this.clearSelectedDateTime,text:this.locale.clear},()=>[i(ft,{theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,size:"tiny",onClick:this.clearSelectedDateTime},{default:()=>this.locale.clear})]):null,!((t=this.actions)===null||t===void 0)&&t.includes("now")?Vt(u.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[i(ft,{theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,size:"tiny",onClick:this.handleNowClick},{default:()=>this.locale.now})]):null,!((n=this.actions)===null||n===void 0)&&n.includes("confirm")?Vt(u.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isDateInvalid,text:this.locale.confirm},()=>[i(ft,{theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isDateInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,i(On,{onFocus:this.handleFocusDetectorFocus}))}}),th=ge({name:"DateTimeRangePanel",props:no,setup(e){return ro(e,"datetimerange")},render(){var e,r,t;const{mergedClsPrefix:n,mergedTheme:a,shortcuts:o,timePickerProps:l,onRender:s,$slots:d}=this;return s==null||s(),i("div",{ref:"selfRef",tabindex:0,class:[`${n}-date-panel`,`${n}-date-panel--datetimerange`,!this.panel&&`${n}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},i("div",{class:`${n}-date-panel-header`},i(Yt,{value:this.startDateDisplayString,theme:a.peers.Input,themeOverrides:a.peerOverrides.Input,size:this.timePickerSize,stateful:!1,readonly:this.inputReadonly,class:`${n}-date-panel-date-input`,textDecoration:this.isStartValueInvalid?"line-through":"",placeholder:this.locale.selectDate,onBlur:this.handleStartDateInputBlur,onUpdateValue:this.handleStartDateInput}),i(Na,Object.assign({placeholder:this.locale.selectTime,format:this.timerPickerFormat,size:this.timePickerSize},Array.isArray(l)?l[0]:l,{value:this.startTimeValue,to:!1,showIcon:!1,disabled:this.isSelecting,theme:a.peers.TimePicker,themeOverrides:a.peerOverrides.TimePicker,stateful:!1,isHourDisabled:this.isStartHourDisabled,isMinuteDisabled:this.isStartMinuteDisabled,isSecondDisabled:this.isStartSecondDisabled,onUpdateValue:this.handleStartTimePickerChange})),i(Yt,{value:this.endDateInput,theme:a.peers.Input,themeOverrides:a.peerOverrides.Input,stateful:!1,size:this.timePickerSize,readonly:this.inputReadonly,class:`${n}-date-panel-date-input`,textDecoration:this.isEndValueInvalid?"line-through":"",placeholder:this.locale.selectDate,onBlur:this.handleEndDateInputBlur,onUpdateValue:this.handleEndDateInput}),i(Na,Object.assign({placeholder:this.locale.selectTime,format:this.timerPickerFormat,size:this.timePickerSize},Array.isArray(l)?l[1]:l,{disabled:this.isSelecting,showIcon:!1,theme:a.peers.TimePicker,themeOverrides:a.peerOverrides.TimePicker,to:!1,stateful:!1,value:this.endTimeValue,isHourDisabled:this.isEndHourDisabled,isMinuteDisabled:this.isEndMinuteDisabled,isSecondDisabled:this.isEndSecondDisabled,onUpdateValue:this.handleEndTimePickerChange}))),i("div",{ref:"startDatesElRef",class:`${n}-date-panel-calendar ${n}-date-panel-calendar--start`},i("div",{class:`${n}-date-panel-month`},i("div",{class:`${n}-date-panel-month__fast-prev`,onClick:this.startCalendarPrevYear},qe(d["prev-year"],()=>[i(Pn,null)])),i("div",{class:`${n}-date-panel-month__prev`,onClick:this.startCalendarPrevMonth},qe(d["prev-month"],()=>[i(Sn,null)])),i(ar,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.startCalendarDateTime,onUpdateValue:this.onUpdateStartCalendarValue,mergedClsPrefix:n,calendarMonth:this.startCalendarMonth,calendarYear:this.startCalendarYear}),i("div",{class:`${n}-date-panel-month__next`,onClick:this.startCalendarNextMonth},qe(d["next-month"],()=>[i(Tn,null)])),i("div",{class:`${n}-date-panel-month__fast-next`,onClick:this.startCalendarNextYear},qe(d["next-year"],()=>[i(Fn,null)]))),i("div",{class:`${n}-date-panel-weekdays`},this.weekdays.map(u=>i("div",{key:u,class:`${n}-date-panel-weekdays__day`},u))),i("div",{class:`${n}-date-panel__divider`}),i("div",{class:`${n}-date-panel-dates`},this.startDateArray.map((u,c)=>{const f=this.mergedIsDateDisabled(u.ts);return i("div",{"data-n-date":!0,key:c,class:[`${n}-date-panel-date`,{[`${n}-date-panel-date--excluded`]:!u.inCurrentMonth,[`${n}-date-panel-date--current`]:u.isCurrentDate,[`${n}-date-panel-date--selected`]:u.selected,[`${n}-date-panel-date--covered`]:u.inSpan,[`${n}-date-panel-date--start`]:u.startOfSpan,[`${n}-date-panel-date--end`]:u.endOfSpan,[`${n}-date-panel-date--disabled`]:f}],onClick:f?void 0:()=>{this.handleDateClick(u)},onMouseenter:f?void 0:()=>{this.handleDateMouseEnter(u)}},i("div",{class:`${n}-date-panel-date__trigger`}),u.dateObject.date,u.isCurrentDate?i("div",{class:`${n}-date-panel-date__sup`}):null)}))),i("div",{class:`${n}-date-panel__vertical-divider`}),i("div",{ref:"endDatesElRef",class:`${n}-date-panel-calendar ${n}-date-panel-calendar--end`},i("div",{class:`${n}-date-panel-month`},i("div",{class:`${n}-date-panel-month__fast-prev`,onClick:this.endCalendarPrevYear},qe(d["prev-year"],()=>[i(Pn,null)])),i("div",{class:`${n}-date-panel-month__prev`,onClick:this.endCalendarPrevMonth},qe(d["prev-month"],()=>[i(Sn,null)])),i(ar,{monthBeforeYear:this.calendarMonthBeforeYear,value:this.endCalendarDateTime,onUpdateValue:this.onUpdateEndCalendarValue,mergedClsPrefix:n,monthYearSeparator:this.calendarHeaderMonthYearSeparator,calendarMonth:this.endCalendarMonth,calendarYear:this.endCalendarYear}),i("div",{class:`${n}-date-panel-month__next`,onClick:this.endCalendarNextMonth},qe(d["next-month"],()=>[i(Tn,null)])),i("div",{class:`${n}-date-panel-month__fast-next`,onClick:this.endCalendarNextYear},qe(d["next-year"],()=>[i(Fn,null)]))),i("div",{class:`${n}-date-panel-weekdays`},this.weekdays.map(u=>i("div",{key:u,class:`${n}-date-panel-weekdays__day`},u))),i("div",{class:`${n}-date-panel__divider`}),i("div",{class:`${n}-date-panel-dates`},this.endDateArray.map((u,c)=>{const f=this.mergedIsDateDisabled(u.ts);return i("div",{"data-n-date":!0,key:c,class:[`${n}-date-panel-date`,{[`${n}-date-panel-date--excluded`]:!u.inCurrentMonth,[`${n}-date-panel-date--current`]:u.isCurrentDate,[`${n}-date-panel-date--selected`]:u.selected,[`${n}-date-panel-date--covered`]:u.inSpan,[`${n}-date-panel-date--start`]:u.startOfSpan,[`${n}-date-panel-date--end`]:u.endOfSpan,[`${n}-date-panel-date--disabled`]:f}],onClick:f?void 0:()=>{this.handleDateClick(u)},onMouseenter:f?void 0:()=>{this.handleDateMouseEnter(u)}},i("div",{class:`${n}-date-panel-date__trigger`}),u.dateObject.date,u.isCurrentDate?i("div",{class:`${n}-date-panel-date__sup`}):null)}))),this.datePickerSlots.footer?i("div",{class:`${n}-date-panel-footer`},this.datePickerSlots.footer()):null,!((e=this.actions)===null||e===void 0)&&e.length||o?i("div",{class:`${n}-date-panel-actions`},i("div",{class:`${n}-date-panel-actions__prefix`},o&&Object.keys(o).map(u=>{const c=o[u];return Array.isArray(c)||typeof c=="function"?i(sn,{size:"tiny",onMouseenter:()=>{this.handleRangeShortcutMouseenter(c)},onClick:()=>{this.handleRangeShortcutClick(c)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>u}):null})),i("div",{class:`${n}-date-panel-actions__suffix`},!((r=this.actions)===null||r===void 0)&&r.includes("clear")?Vt(d.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[i(ft,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,!((t=this.actions)===null||t===void 0)&&t.includes("confirm")?Vt(d.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isRangeInvalid||this.isSelecting,text:this.locale.confirm},()=>[i(ft,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isRangeInvalid||this.isSelecting,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,i(On,{onFocus:this.handleFocusDetectorFocus}))}}),nh=ge({name:"MonthRangePanel",props:Object.assign(Object.assign({},no),{type:{type:String,required:!0}}),setup(e){const r=ro(e,e.type),{dateLocaleRef:t}=yn("DatePicker"),n=(a,o,l,s)=>{const{handleColItemClick:d}=r;return i("div",{"data-n-date":!0,key:o,class:[`${l}-date-panel-month-calendar__picker-col-item`,a.isCurrent&&`${l}-date-panel-month-calendar__picker-col-item--current`,a.selected&&`${l}-date-panel-month-calendar__picker-col-item--selected`,!1],onClick:()=>{d(a,s)}},a.type==="month"?Hi(a.dateObject.month,a.monthFormat,t.value.locale):a.type==="quarter"?ji(a.dateObject.quarter,a.quarterFormat,t.value.locale):Ui(a.dateObject.year,a.yearFormat,t.value.locale))};return Zt(()=>{r.justifyColumnsScrollState()}),Object.assign(Object.assign({},r),{renderItem:n})},render(){var e,r,t;const{mergedClsPrefix:n,mergedTheme:a,shortcuts:o,type:l,renderItem:s,onRender:d}=this;return d==null||d(),i("div",{ref:"selfRef",tabindex:0,class:[`${n}-date-panel`,`${n}-date-panel--daterange`,!this.panel&&`${n}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},i("div",{ref:"startDatesElRef",class:`${n}-date-panel-calendar ${n}-date-panel-calendar--start`},i("div",{class:`${n}-date-panel-month-calendar`},i(Ut,{ref:"startYearScrollbarRef",class:`${n}-date-panel-month-calendar__picker-col`,theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar,container:()=>this.virtualListContainer("start"),content:()=>this.virtualListContent("start"),horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>i(tr,{ref:"startYearVlRef",items:this.startYearArray,itemSize:Yn,showScrollbar:!1,keyField:"ts",onScroll:this.handleStartYearVlScroll,paddingBottom:4},{default:({item:u,index:c})=>s(u,c,n,"start")})}),l==="monthrange"||l==="quarterrange"?i("div",{class:`${n}-date-panel-month-calendar__picker-col`},i(Ut,{ref:"startMonthScrollbarRef",theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar},{default:()=>[(l==="monthrange"?this.startMonthArray:this.startQuarterArray).map((u,c)=>s(u,c,n,"start")),l==="monthrange"&&i("div",{class:`${n}-date-panel-month-calendar__padding`})]})):null)),i("div",{class:`${n}-date-panel__vertical-divider`}),i("div",{ref:"endDatesElRef",class:`${n}-date-panel-calendar ${n}-date-panel-calendar--end`},i("div",{class:`${n}-date-panel-month-calendar`},i(Ut,{ref:"endYearScrollbarRef",class:`${n}-date-panel-month-calendar__picker-col`,theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar,container:()=>this.virtualListContainer("end"),content:()=>this.virtualListContent("end"),horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>i(tr,{ref:"endYearVlRef",items:this.endYearArray,itemSize:Yn,showScrollbar:!1,keyField:"ts",onScroll:this.handleEndYearVlScroll,paddingBottom:4},{default:({item:u,index:c})=>s(u,c,n,"end")})}),l==="monthrange"||l==="quarterrange"?i("div",{class:`${n}-date-panel-month-calendar__picker-col`},i(Ut,{ref:"endMonthScrollbarRef",theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar},{default:()=>[(l==="monthrange"?this.endMonthArray:this.endQuarterArray).map((u,c)=>s(u,c,n,"end")),l==="monthrange"&&i("div",{class:`${n}-date-panel-month-calendar__padding`})]})):null)),this.datePickerSlots.footer?i("div",{class:`${n}-date-panel-footer`},Jo(this.datePickerSlots,"footer")):null,!((e=this.actions)===null||e===void 0)&&e.length||o?i("div",{class:`${n}-date-panel-actions`},i("div",{class:`${n}-date-panel-actions__prefix`},o&&Object.keys(o).map(u=>{const c=o[u];return Array.isArray(c)||typeof c=="function"?i(sn,{size:"tiny",onMouseenter:()=>{this.handleRangeShortcutMouseenter(c)},onClick:()=>{this.handleRangeShortcutClick(c)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>u}):null})),i("div",{class:`${n}-date-panel-actions__suffix`},!((r=this.actions)===null||r===void 0)&&r.includes("clear")?Vt(this.$slots.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[i(sn,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,!((t=this.actions)===null||t===void 0)&&t.includes("confirm")?Vt(this.$slots.confirm,{disabled:this.isRangeInvalid,onConfirm:this.handleConfirmClick,text:this.locale.confirm},()=>[i(sn,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isRangeInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,i(On,{onFocus:this.handleFocusDetectorFocus}))}}),rh=Object.assign(Object.assign({},Ye.props),{to:un.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,updateValueOnClose:Boolean,calendarDayFormat:String,calendarHeaderYearFormat:String,calendarHeaderMonthFormat:String,calendarHeaderMonthYearSeparator:{type:String,default:" "},calendarHeaderMonthBeforeYear:{type:Boolean,default:void 0},defaultValue:[Number,Array],defaultFormattedValue:[String,Array],defaultTime:[Number,String,Array],disabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom-start"},value:[Number,Array],formattedValue:[String,Array],size:String,type:{type:String,default:"date"},valueFormat:String,separator:String,placeholder:String,startPlaceholder:String,endPlaceholder:String,format:String,dateFormat:String,timerPickerFormat:String,actions:Array,shortcuts:Object,isDateDisabled:Function,isTimeDisabled:Function,show:{type:Boolean,default:void 0},panel:Boolean,ranges:Object,firstDayOfWeek:Number,inputReadonly:Boolean,closeOnSelect:Boolean,status:String,timePickerProps:[Object,Array],onClear:Function,onConfirm:Function,defaultCalendarStartTime:Number,defaultCalendarEndTime:Number,bindCalendarMonths:Boolean,monthFormat:{type:String,default:"M"},yearFormat:{type:String,default:"y"},quarterFormat:{type:String,default:"'Q'Q"},yearRange:{type:Array,default:()=>[1901,2100]},"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],"onUpdate:formattedValue":[Function,Array],onUpdateFormattedValue:[Function,Array],"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onNextMonth:Function,onPrevMonth:Function,onNextYear:Function,onPrevYear:Function,onChange:[Function,Array]}),ah=W([M("date-picker",` position: relative; z-index: auto; - `,[O("date-picker-icon",` + `,[M("date-picker-icon",` color: var(--n-icon-color-override); transition: color .3s var(--n-bezier); - `),O("icon",` + `),M("icon",` color: var(--n-icon-color-override); transition: color .3s var(--n-bezier); - `),K("disabled",[O("date-picker-icon",` + `),K("disabled",[M("date-picker-icon",` color: var(--n-icon-color-disabled-override); - `),O("icon",` + `),M("icon",` color: var(--n-icon-color-disabled-override); - `)])]),O("date-panel",` + `)])]),M("date-panel",` width: fit-content; outline: none; margin: 4px 0; @@ -1331,7 +1331,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config user-select: none; `,[or(),K("shadow",` box-shadow: var(--n-panel-box-shadow); - `),O("date-panel-calendar",{padding:"var(--n-calendar-left-padding)",display:"grid",gridTemplateColumns:"1fr",gridArea:"left-calendar"},[K("end",{padding:"var(--n-calendar-right-padding)",gridArea:"right-calendar"})]),O("date-panel-month-calendar",{display:"flex",gridArea:"left-calendar"},[le("picker-col",` + `),M("date-panel-calendar",{padding:"var(--n-calendar-left-padding)",display:"grid",gridTemplateColumns:"1fr",gridArea:"left-calendar"},[K("end",{padding:"var(--n-calendar-right-padding)",gridArea:"right-calendar"})]),M("date-panel-month-calendar",{display:"flex",gridArea:"left-calendar"},[le("picker-col",` min-width: var(--n-scroll-item-width); height: calc(var(--n-scroll-item-height) * 6); user-select: none; @@ -1401,7 +1401,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config "left-calendar" "footer" "action" - `}),O("date-panel-footer",{gridArea:"footer"}),O("date-panel-actions",{gridArea:"action"}),O("date-panel-header",{gridArea:"header"}),O("date-panel-header",` + `}),M("date-panel-footer",{gridArea:"footer"}),M("date-panel-actions",{gridArea:"action"}),M("date-panel-header",{gridArea:"header"}),M("date-panel-header",` box-sizing: border-box; width: 100%; align-items: center; @@ -1409,7 +1409,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config display: flex; justify-content: space-between; border-bottom: 1px solid var(--n-panel-header-divider-color); - `,[W(">",[W("*:not(:last-child)",{marginRight:"10px"}),W("*",{flex:1,width:0}),O("time-picker",{zIndex:1})])]),O("date-panel-month",` + `,[W(">",[W("*:not(:last-child)",{marginRight:"10px"}),W("*",{flex:1,width:0}),M("time-picker",{zIndex:1})])]),M("date-panel-month",` box-sizing: border-box; display: grid; grid-template-columns: var(--n-calendar-title-grid-template-columns); @@ -1442,7 +1442,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config background-color: var(--n-calendar-title-color-hover); `),W("&:hover",` background-color: var(--n-calendar-title-color-hover); - `)])])]),O("date-panel-weekdays",` + `)])])]),M("date-panel-weekdays",` display: grid; margin: auto; grid-template-columns: repeat(7, var(--n-item-cell-width)); @@ -1463,7 +1463,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config display: flex; align-items: center; justify-content: center; - `)]),O("date-panel-dates",` + `)]),M("date-panel-dates",` margin: auto; display: grid; grid-template-columns: repeat(7, var(--n-item-cell-width)); @@ -1471,7 +1471,7 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config align-items: center; justify-items: center; flex-wrap: wrap; - `,[O("date-panel-date",` + `,[M("date-panel-date",` user-select: none; -webkit-user-select: none; position: relative; @@ -1540,9 +1540,9 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config `),W("&:nth-child(7n + 7)::before",` border-top-right-radius: var(--n-item-border-radius); border-bottom-right-radius: var(--n-item-border-radius); - `)])])]),Ft("week",[O("date-panel-dates",[O("date-panel-date",[Ft("disabled",[Ft("selected",[W("&:hover",` + `)])])]),Ft("week",[M("date-panel-dates",[M("date-panel-date",[Ft("disabled",[Ft("selected",[W("&:hover",` background-color: var(--n-item-color-hover); - `)])])])])]),K("week",[O("date-panel-dates",[O("date-panel-date",[W("&::before",` + `)])])])])]),K("week",[M("date-panel-dates",[M("date-panel-date",[W("&::before",` content: ""; z-index: -2; position: absolute; @@ -1556,10 +1556,10 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config height: 100%; width: 1px; background-color: var(--n-calendar-divider-color); - `),O("date-panel-footer",` + `),M("date-panel-footer",` border-top: 1px solid var(--n-panel-action-divider-color); padding: var(--n-panel-extra-footer-padding); - `),O("date-panel-actions",` + `),M("date-panel-actions",` flex: 1; padding: var(--n-panel-action-padding); display: flex; @@ -1573,14 +1573,17 @@ var bl=Object.defineProperty;var yl=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,config align-self: flex-end; `),le("prefix",` flex-wrap: wrap; - `),O("button",` + `),M("button",` margin-bottom: 8px; `,[W("&:not(:last-child)",` margin-right: 8px; - `)])])]),W("[data-n-date].transition-disabled",{transition:"none !important"},[W("&::before, &::after",{transition:"none !important"})])]);function oh(e,r){const t=b(()=>{const{isTimeDisabled:c}=e,{value:f}=r;if(!(f===null||Array.isArray(f)))return c==null?void 0:c(f)}),n=b(()=>{var c;return(c=t.value)===null||c===void 0?void 0:c.isHourDisabled}),a=b(()=>{var c;return(c=t.value)===null||c===void 0?void 0:c.isMinuteDisabled}),o=b(()=>{var c;return(c=t.value)===null||c===void 0?void 0:c.isSecondDisabled}),l=b(()=>{const{type:c,isDateDisabled:f}=e,{value:v}=r;return v===null||Array.isArray(v)||!["date","datetime"].includes(c)||!f?!1:f(v,{type:"input"})}),s=b(()=>{const{type:c}=e,{value:f}=r;if(f===null||c==="datetime"||Array.isArray(f))return!1;const v=new Date(f),m=v.getHours(),p=v.getMinutes(),y=v.getMinutes();return(n.value?n.value(m):!1)||(a.value?a.value(p,m):!1)||(o.value?o.value(y,p,m):!1)}),d=b(()=>l.value||s.value);return{isValueInvalidRef:b(()=>{const{type:c}=e;return c==="date"?l.value:c==="datetime"?d.value:!1}),isDateInvalidRef:l,isTimeInvalidRef:s,isDateTimeInvalidRef:d,isHourDisabledRef:n,isMinuteDisabledRef:a,isSecondDisabledRef:o}}function ih(e,r){const t=b(()=>{const{isTimeDisabled:f}=e,{value:v}=r;return!Array.isArray(v)||!f?[void 0,void 0]:[f==null?void 0:f(v[0],"start",v),f==null?void 0:f(v[1],"end",v)]}),n={isStartHourDisabledRef:b(()=>{var f;return(f=t.value[0])===null||f===void 0?void 0:f.isHourDisabled}),isEndHourDisabledRef:b(()=>{var f;return(f=t.value[1])===null||f===void 0?void 0:f.isHourDisabled}),isStartMinuteDisabledRef:b(()=>{var f;return(f=t.value[0])===null||f===void 0?void 0:f.isMinuteDisabled}),isEndMinuteDisabledRef:b(()=>{var f;return(f=t.value[1])===null||f===void 0?void 0:f.isMinuteDisabled}),isStartSecondDisabledRef:b(()=>{var f;return(f=t.value[0])===null||f===void 0?void 0:f.isSecondDisabled}),isEndSecondDisabledRef:b(()=>{var f;return(f=t.value[1])===null||f===void 0?void 0:f.isSecondDisabled})},a=b(()=>{const{type:f,isDateDisabled:v}=e,{value:m}=r;return m===null||!Array.isArray(m)||!["daterange","datetimerange"].includes(f)||!v?!1:v(m[0],"start",m)}),o=b(()=>{const{type:f,isDateDisabled:v}=e,{value:m}=r;return m===null||!Array.isArray(m)||!["daterange","datetimerange"].includes(f)||!v?!1:v(m[1],"end",m)}),l=b(()=>{const{type:f}=e,{value:v}=r;if(v===null||!Array.isArray(v)||f!=="datetimerange")return!1;const m=xn(v[0]),p=Nr(v[0]),y=Br(v[0]),{isStartHourDisabledRef:h,isStartMinuteDisabledRef:w,isStartSecondDisabledRef:g}=n;return(h.value?h.value(m):!1)||(w.value?w.value(p,m):!1)||(g.value?g.value(y,p,m):!1)}),s=b(()=>{const{type:f}=e,{value:v}=r;if(v===null||!Array.isArray(v)||f!=="datetimerange")return!1;const m=xn(v[1]),p=Nr(v[1]),y=Br(v[1]),{isEndHourDisabledRef:h,isEndMinuteDisabledRef:w,isEndSecondDisabledRef:g}=n;return(h.value?h.value(m):!1)||(w.value?w.value(p,m):!1)||(g.value?g.value(y,p,m):!1)}),d=b(()=>a.value||l.value),u=b(()=>o.value||s.value),c=b(()=>d.value||u.value);return Object.assign(Object.assign({},n),{isStartDateInvalidRef:a,isEndDateInvalidRef:o,isStartTimeInvalidRef:l,isEndTimeInvalidRef:s,isStartValueInvalidRef:d,isEndValueInvalidRef:u,isRangeInvalidRef:c})}const lh=ge({name:"DatePicker",props:rh,setup(e,{slots:r}){var t;const{localeRef:n,dateLocaleRef:a}=yn("DatePicker"),o=Tn(e),{mergedSizeRef:l,mergedDisabledRef:s,mergedStatusRef:d}=o,{mergedComponentPropsRef:u,mergedClsPrefixRef:c,mergedBorderedRef:f,namespaceRef:v,inlineThemeDisabled:m}=xt(e),p=F(null),y=F(null),h=F(null),w=F(!1),g=me(e,"show"),k=zt(g,w),x=b(()=>({locale:a.value.locale,useAdditionalWeekYearTokens:!0})),P=b(()=>{const{format:S}=e;if(S)return S;switch(e.type){case"date":case"daterange":return n.value.dateFormat;case"datetime":case"datetimerange":return n.value.dateTimeFormat;case"year":case"yearrange":return n.value.yearTypeFormat;case"month":case"monthrange":return n.value.monthTypeFormat;case"quarter":case"quarterrange":return n.value.quarterFormat;case"week":return n.value.weekFormat}}),$=b(()=>{var S;return(S=e.valueFormat)!==null&&S!==void 0?S:P.value});function T(S){if(S===null)return null;const{value:G}=$,{value:ye}=x;return Array.isArray(S)?[Et(S[0],G,new Date,ye).getTime(),Et(S[1],G,new Date,ye).getTime()]:Et(S,G,new Date,ye).getTime()}const{defaultFormattedValue:Y,defaultValue:z}=e,N=F((t=Y!==void 0?T(Y):z)!==null&&t!==void 0?t:null),J=b(()=>{const{formattedValue:S}=e;return S!==void 0?T(S):e.value}),D=zt(J,N),C=F(null);Ln(()=>{C.value=D.value});const B=F(""),L=F(""),Q=F(""),q=Ye("DatePicker","-date-picker",ah,jl,e,c),ee=b(()=>{var S,G;return((G=(S=u==null?void 0:u.value)===null||S===void 0?void 0:S.DatePicker)===null||G===void 0?void 0:G.timePickerSize)||"small"}),ue=b(()=>["daterange","datetimerange","monthrange","quarterrange","yearrange"].includes(e.type)),te=b(()=>{const{placeholder:S}=e;if(S===void 0){const{type:G}=e;switch(G){case"date":return n.value.datePlaceholder;case"datetime":return n.value.datetimePlaceholder;case"month":return n.value.monthPlaceholder;case"year":return n.value.yearPlaceholder;case"quarter":return n.value.quarterPlaceholder;case"week":return n.value.weekPlaceholder;default:return""}}else return S}),V=b(()=>e.startPlaceholder===void 0?e.type==="daterange"?n.value.startDatePlaceholder:e.type==="datetimerange"?n.value.startDatetimePlaceholder:e.type==="monthrange"?n.value.startMonthPlaceholder:"":e.startPlaceholder),_=b(()=>e.endPlaceholder===void 0?e.type==="daterange"?n.value.endDatePlaceholder:e.type==="datetimerange"?n.value.endDatetimePlaceholder:e.type==="monthrange"?n.value.endMonthPlaceholder:"":e.endPlaceholder),E=b(()=>{const{actions:S,type:G,clearable:ye}=e;if(S===null)return[];if(S!==void 0)return S;const Me=ye?["clear"]:[];switch(G){case"date":case"week":return Me.push("now"),Me;case"datetime":return Me.push("now","confirm"),Me;case"daterange":return Me.push("confirm"),Me;case"datetimerange":return Me.push("confirm"),Me;case"month":return Me.push("now","confirm"),Me;case"year":return Me.push("now"),Me;case"quarter":return Me.push("now","confirm"),Me;case"monthrange":case"yearrange":case"quarterrange":return Me.push("confirm"),Me;default:{ur("date-picker","The type is wrong, n-date-picker's type only supports `date`, `datetime`, `daterange` and `datetimerange`.");break}}});function U(S){if(S===null)return null;if(Array.isArray(S)){const{value:G}=$,{value:ye}=x;return[nt(S[0],G,ye),nt(S[1],G,x.value)]}else return nt(S,$.value,x.value)}function ne(S){C.value=S}function De(S,G){const{"onUpdate:formattedValue":ye,onUpdateFormattedValue:Me}=e;ye&&oe(ye,S,G),Me&&oe(Me,S,G)}function he(S,G){const{"onUpdate:value":ye,onUpdateValue:Me,onChange:Ze}=e,{nTriggerFormChange:Ne,nTriggerFormInput:I}=o,ae=U(S);G.doConfirm&&j(S,ae),Me&&oe(Me,S,ae),ye&&oe(ye,S,ae),Ze&&oe(Ze,S,ae),N.value=S,De(ae,S),Ne(),I()}function Te(){const{onClear:S}=e;S==null||S()}function j(S,G){const{onConfirm:ye}=e;ye&&ye(S,G)}function be(S){const{onFocus:G}=e,{nTriggerFormFocus:ye}=o;G&&oe(G,S),ye()}function Se(S){const{onBlur:G}=e,{nTriggerFormBlur:ye}=o;G&&oe(G,S),ye()}function $e(S){const{"onUpdate:show":G,onUpdateShow:ye}=e;G&&oe(G,S),ye&&oe(ye,S),w.value=S}function Ke(S){S.key==="Escape"&&k.value&&(vr(S),Ue({returnFocus:!0}))}function lt(S){S.key==="Escape"&&k.value&&vr(S)}function ht(){var S;$e(!1),(S=h.value)===null||S===void 0||S.deactivate(),Te()}function Qe(){var S;(S=h.value)===null||S===void 0||S.deactivate(),Te()}function X(){Ue({returnFocus:!0})}function we(S){var G;k.value&&!(!((G=y.value)===null||G===void 0)&&G.contains(Ur(S)))&&Ue({returnFocus:!1})}function re(S){Ue({returnFocus:!0,disableUpdateOnClose:S})}function Re(S,G){G?he(S,{doConfirm:!1}):ne(S)}function Ee(){const S=C.value;he(Array.isArray(S)?[S[0],S[1]]:S,{doConfirm:!0})}function ze(){const{value:S}=C;ue.value?(Array.isArray(S)||S===null)&&Z(S):Array.isArray(S)||Le(S)}function Le(S){S===null?B.value="":B.value=nt(S,P.value,x.value)}function Z(S){if(S===null)L.value="",Q.value="";else{const G=x.value;L.value=nt(S[0],P.value,G),Q.value=nt(S[1],P.value,G)}}function se(){k.value||We()}function Oe(S){var G;!((G=p.value)===null||G===void 0)&&G.$el.contains(S.relatedTarget)||(Se(S),ze(),Ue({returnFocus:!1}))}function A(){s.value||(ze(),Ue({returnFocus:!1}))}function _e(S){if(S===""){he(null,{doConfirm:!1}),C.value=null,B.value="";return}const G=Et(S,P.value,new Date,x.value);Gt(G)?(he(ce(G),{doConfirm:!1}),ze()):B.value=S}function He(S,{source:G}){if(S[0]===""&&S[1]===""){he(null,{doConfirm:!1}),C.value=null,L.value="",Q.value="";return}const[ye,Me]=S,Ze=Et(ye,P.value,new Date,x.value),Ne=Et(Me,P.value,new Date,x.value);if(Gt(Ze)&&Gt(Ne)){let I=ce(Ze),ae=ce(Ne);Ne{ze()}),ze(),gt(k,S=>{S||(C.value=D.value)});const ve=oh(e,C),Fe=ih(e,C);At(qr,Object.assign(Object.assign(Object.assign({mergedClsPrefixRef:c,mergedThemeRef:q,timePickerSizeRef:ee,localeRef:n,dateLocaleRef:a,firstDayOfWeekRef:me(e,"firstDayOfWeek"),isDateDisabledRef:me(e,"isDateDisabled"),rangesRef:me(e,"ranges"),timePickerPropsRef:me(e,"timePickerProps"),closeOnSelectRef:me(e,"closeOnSelect"),updateValueOnCloseRef:me(e,"updateValueOnClose"),monthFormatRef:me(e,"monthFormat"),yearFormatRef:me(e,"yearFormat"),quarterFormatRef:me(e,"quarterFormat"),yearRangeRef:me(e,"yearRange")},ve),Fe),{datePickerSlots:r}));const R={focus:()=>{var S;(S=h.value)===null||S===void 0||S.focus()},blur:()=>{var S;(S=h.value)===null||S===void 0||S.blur()}},H=b(()=>{const{common:{cubicBezierEaseInOut:S},self:{iconColor:G,iconColorDisabled:ye}}=q.value;return{"--n-bezier":S,"--n-icon-color-override":G,"--n-icon-color-disabled-override":ye}}),fe=m?Mt("date-picker-trigger",void 0,H,e):void 0,ke=b(()=>{const{type:S}=e,{common:{cubicBezierEaseInOut:G},self:{calendarTitleFontSize:ye,calendarDaysFontSize:Me,itemFontSize:Ze,itemTextColor:Ne,itemColorDisabled:I,itemColorIncluded:ae,itemColorHover:pe,itemColorActive:Ie,itemBorderRadius:Je,itemTextColorDisabled:Ge,itemTextColorActive:rt,panelColor:Nt,panelTextColor:Yt,arrowColor:Ht,calendarTitleTextColor:Rt,panelActionDividerColor:Kt,panelHeaderDividerColor:Jt,calendarDaysDividerColor:bt,panelBoxShadow:St,panelBorderRadius:Bt,calendarTitleFontWeight:Dn,panelExtraFooterPadding:On,panelActionPadding:Mn,itemSize:zn,itemCellWidth:In,itemCellHeight:$n,scrollItemWidth:M,scrollItemHeight:de,calendarTitlePadding:Pe,calendarTitleHeight:ut,calendarDaysHeight:Wt,calendarDaysTextColor:ct,arrowSize:An,panelHeaderPadding:Wn,calendarDividerColor:Nn,calendarTitleGridTempateColumns:Gr,iconColor:Xr,iconColorDisabled:Qr,scrollItemBorderRadius:Zr,calendarTitleColorHover:Jr,[Ve("calendarLeftPadding",S)]:ea,[Ve("calendarRightPadding",S)]:gl}}=q.value;return{"--n-bezier":G,"--n-panel-border-radius":Bt,"--n-panel-color":Nt,"--n-panel-box-shadow":St,"--n-panel-text-color":Yt,"--n-panel-header-padding":Wn,"--n-panel-header-divider-color":Jt,"--n-calendar-left-padding":ea,"--n-calendar-right-padding":gl,"--n-calendar-title-color-hover":Jr,"--n-calendar-title-height":ut,"--n-calendar-title-padding":Pe,"--n-calendar-title-font-size":ye,"--n-calendar-title-font-weight":Dn,"--n-calendar-title-text-color":Rt,"--n-calendar-title-grid-template-columns":Gr,"--n-calendar-days-height":Wt,"--n-calendar-days-divider-color":bt,"--n-calendar-days-font-size":Me,"--n-calendar-days-text-color":ct,"--n-calendar-divider-color":Nn,"--n-panel-action-padding":Mn,"--n-panel-extra-footer-padding":On,"--n-panel-action-divider-color":Kt,"--n-item-font-size":Ze,"--n-item-border-radius":Je,"--n-item-size":zn,"--n-item-cell-width":In,"--n-item-cell-height":$n,"--n-item-text-color":Ne,"--n-item-color-included":ae,"--n-item-color-disabled":I,"--n-item-color-hover":pe,"--n-item-color-active":Ie,"--n-item-text-color-disabled":Ge,"--n-item-text-color-active":rt,"--n-scroll-item-width":M,"--n-scroll-item-height":de,"--n-scroll-item-border-radius":Zr,"--n-arrow-size":An,"--n-arrow-color":Ht,"--n-icon-color":Xr,"--n-icon-color-disabled":Qr}}),xe=m?Mt("date-picker",b(()=>e.type),ke,e):void 0;return Object.assign(Object.assign({},R),{mergedStatus:d,mergedClsPrefix:c,mergedBordered:f,namespace:v,uncontrolledValue:N,pendingValue:C,panelInstRef:p,triggerElRef:y,inputInstRef:h,isMounted:La(),displayTime:B,displayStartTime:L,displayEndTime:Q,mergedShow:k,adjustedTo:un(e),isRange:ue,localizedStartPlaceholder:V,localizedEndPlaceholder:_,mergedSize:l,mergedDisabled:s,localizedPlacehoder:te,isValueInvalid:ve.isValueInvalidRef,isStartValueInvalid:Fe.isStartValueInvalidRef,isEndValueInvalid:Fe.isEndValueInvalidRef,handleInputKeydown:lt,handleClickOutside:we,handleKeydown:Ke,handleClear:ht,handlePanelClear:Qe,handleTriggerClick:vt,handleInputActivate:se,handleInputDeactivate:A,handleInputFocus:et,handleInputBlur:Oe,handlePanelTabOut:X,handlePanelClose:re,handleRangeUpdateValue:He,handleSingleUpdateValue:_e,handlePanelUpdateValue:Re,handlePanelConfirm:Ee,mergedTheme:q,actions:E,triggerCssVars:m?void 0:H,triggerThemeClass:fe==null?void 0:fe.themeClass,triggerOnRender:fe==null?void 0:fe.onRender,cssVars:m?void 0:ke,themeClass:xe==null?void 0:xe.themeClass,onRender:xe==null?void 0:xe.onRender,onNextMonth:e.onNextMonth,onPrevMonth:e.onPrevMonth,onNextYear:e.onNextYear,onPrevYear:e.onPrevYear})},render(){const{clearable:e,triggerOnRender:r,mergedClsPrefix:t,$slots:n}=this,a={onUpdateValue:this.handlePanelUpdateValue,onTabOut:this.handlePanelTabOut,onClose:this.handlePanelClose,onClear:this.handlePanelClear,onKeydown:this.handleKeydown,onConfirm:this.handlePanelConfirm,ref:"panelInstRef",value:this.pendingValue,active:this.mergedShow,actions:this.actions,shortcuts:this.shortcuts,style:this.cssVars,defaultTime:this.defaultTime,themeClass:this.themeClass,panel:this.panel,inputReadonly:this.inputReadonly||this.mergedDisabled,onRender:this.onRender,onNextMonth:this.onNextMonth,onPrevMonth:this.onPrevMonth,onNextYear:this.onNextYear,onPrevYear:this.onPrevYear,timerPickerFormat:this.timerPickerFormat,dateFormat:this.dateFormat,calendarDayFormat:this.calendarDayFormat,calendarHeaderYearFormat:this.calendarHeaderYearFormat,calendarHeaderMonthFormat:this.calendarHeaderMonthFormat,calendarHeaderMonthYearSeparator:this.calendarHeaderMonthYearSeparator,calendarHeaderMonthBeforeYear:this.calendarHeaderMonthBeforeYear},o=()=>{const{type:s}=this;return s==="datetime"?i(eh,Object.assign({},a,{defaultCalendarStartTime:this.defaultCalendarStartTime}),n):s==="daterange"?i(bf,Object.assign({},a,{defaultCalendarStartTime:this.defaultCalendarStartTime,defaultCalendarEndTime:this.defaultCalendarEndTime,bindCalendarMonths:this.bindCalendarMonths}),n):s==="datetimerange"?i(th,Object.assign({},a,{defaultCalendarStartTime:this.defaultCalendarStartTime,defaultCalendarEndTime:this.defaultCalendarEndTime,bindCalendarMonths:this.bindCalendarMonths}),n):s==="month"||s==="year"||s==="quarter"?i(fl,Object.assign({},a,{type:s,key:s})):s==="monthrange"||s==="yearrange"||s==="quarterrange"?i(nh,Object.assign({},a,{type:s})):i(gf,Object.assign({},a,{type:s,defaultCalendarStartTime:this.defaultCalendarStartTime}),n)};if(this.panel)return o();r==null||r();const l={bordered:this.mergedBordered,size:this.mergedSize,passivelyActivated:!0,disabled:this.mergedDisabled,readonly:this.inputReadonly||this.mergedDisabled,clearable:e,onClear:this.handleClear,onClick:this.handleTriggerClick,onKeydown:this.handleInputKeydown,onActivate:this.handleInputActivate,onDeactivate:this.handleInputDeactivate,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur};return i("div",{ref:"triggerElRef",class:[`${t}-date-picker`,this.mergedDisabled&&`${t}-date-picker--disabled`,this.isRange&&`${t}-date-picker--range`,this.triggerThemeClass],style:this.triggerCssVars,onKeydown:this.handleKeydown},i(wr,null,{default:()=>[i(xr,null,{default:()=>this.isRange?i(Xt,Object.assign({ref:"inputInstRef",status:this.mergedStatus,value:[this.displayStartTime,this.displayEndTime],placeholder:[this.localizedStartPlaceholder,this.localizedEndPlaceholder],textDecoration:[this.isStartValueInvalid?"line-through":"",this.isEndValueInvalid?"line-through":""],pair:!0,onUpdateValue:this.handleRangeUpdateValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,internalForceFocus:this.mergedShow,internalDeactivateOnEnter:!0},l),{separator:()=>this.separator===void 0?qe(n.separator,()=>[i(Pt,{clsPrefix:t,class:`${t}-date-picker-icon`},{default:()=>i(Ms,null)})]):this.separator,[e?"clear-icon-placeholder":"suffix"]:()=>qe(n["date-icon"],()=>[i(Pt,{clsPrefix:t,class:`${t}-date-picker-icon`},{default:()=>i(vo,null)})])}):i(Xt,Object.assign({ref:"inputInstRef",status:this.mergedStatus,value:this.displayTime,placeholder:this.localizedPlacehoder,textDecoration:this.isValueInvalid&&!this.isRange?"line-through":"",onUpdateValue:this.handleSingleUpdateValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,internalForceFocus:this.mergedShow,internalDeactivateOnEnter:!0},l),{[e?"clear-icon-placeholder":"suffix"]:()=>i(Pt,{clsPrefix:t,class:`${t}-date-picker-icon`},{default:()=>qe(n["date-icon"],()=>[i(vo,null)])})})}),i(Cr,{show:this.mergedShow,containerClass:this.namespace,to:this.adjustedTo,teleportDisabled:this.adjustedTo===un.tdkey,placement:this.placement},{default:()=>i(Kn,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>this.mergedShow?Hr(o(),[[hr,this.handleClickOutside,void 0,{capture:!0}]]):null})})]}))}});function sh(e){const{textColorDisabled:r}=e;return{iconColorDisabled:r}}const dh=Yl({name:"InputNumber",common:ql,peers:{Button:Wl,Input:Kl},self:sh}),uh=W([O("input-number-suffix",` + `)])])]),W("[data-n-date].transition-disabled",{transition:"none !important"},[W("&::before, &::after",{transition:"none !important"})])]);function oh(e,r){const t=g(()=>{const{isTimeDisabled:c}=e,{value:f}=r;if(!(f===null||Array.isArray(f)))return c==null?void 0:c(f)}),n=g(()=>{var c;return(c=t.value)===null||c===void 0?void 0:c.isHourDisabled}),a=g(()=>{var c;return(c=t.value)===null||c===void 0?void 0:c.isMinuteDisabled}),o=g(()=>{var c;return(c=t.value)===null||c===void 0?void 0:c.isSecondDisabled}),l=g(()=>{const{type:c,isDateDisabled:f}=e,{value:v}=r;return v===null||Array.isArray(v)||!["date","datetime"].includes(c)||!f?!1:f(v,{type:"input"})}),s=g(()=>{const{type:c}=e,{value:f}=r;if(f===null||c==="datetime"||Array.isArray(f))return!1;const v=new Date(f),m=v.getHours(),p=v.getMinutes(),y=v.getMinutes();return(n.value?n.value(m):!1)||(a.value?a.value(p,m):!1)||(o.value?o.value(y,p,m):!1)}),d=g(()=>l.value||s.value);return{isValueInvalidRef:g(()=>{const{type:c}=e;return c==="date"?l.value:c==="datetime"?d.value:!1}),isDateInvalidRef:l,isTimeInvalidRef:s,isDateTimeInvalidRef:d,isHourDisabledRef:n,isMinuteDisabledRef:a,isSecondDisabledRef:o}}function ih(e,r){const t=g(()=>{const{isTimeDisabled:f}=e,{value:v}=r;return!Array.isArray(v)||!f?[void 0,void 0]:[f==null?void 0:f(v[0],"start",v),f==null?void 0:f(v[1],"end",v)]}),n={isStartHourDisabledRef:g(()=>{var f;return(f=t.value[0])===null||f===void 0?void 0:f.isHourDisabled}),isEndHourDisabledRef:g(()=>{var f;return(f=t.value[1])===null||f===void 0?void 0:f.isHourDisabled}),isStartMinuteDisabledRef:g(()=>{var f;return(f=t.value[0])===null||f===void 0?void 0:f.isMinuteDisabled}),isEndMinuteDisabledRef:g(()=>{var f;return(f=t.value[1])===null||f===void 0?void 0:f.isMinuteDisabled}),isStartSecondDisabledRef:g(()=>{var f;return(f=t.value[0])===null||f===void 0?void 0:f.isSecondDisabled}),isEndSecondDisabledRef:g(()=>{var f;return(f=t.value[1])===null||f===void 0?void 0:f.isSecondDisabled})},a=g(()=>{const{type:f,isDateDisabled:v}=e,{value:m}=r;return m===null||!Array.isArray(m)||!["daterange","datetimerange"].includes(f)||!v?!1:v(m[0],"start",m)}),o=g(()=>{const{type:f,isDateDisabled:v}=e,{value:m}=r;return m===null||!Array.isArray(m)||!["daterange","datetimerange"].includes(f)||!v?!1:v(m[1],"end",m)}),l=g(()=>{const{type:f}=e,{value:v}=r;if(v===null||!Array.isArray(v)||f!=="datetimerange")return!1;const m=Cn(v[0]),p=Nr(v[0]),y=Br(v[0]),{isStartHourDisabledRef:h,isStartMinuteDisabledRef:x,isStartSecondDisabledRef:w}=n;return(h.value?h.value(m):!1)||(x.value?x.value(p,m):!1)||(w.value?w.value(y,p,m):!1)}),s=g(()=>{const{type:f}=e,{value:v}=r;if(v===null||!Array.isArray(v)||f!=="datetimerange")return!1;const m=Cn(v[1]),p=Nr(v[1]),y=Br(v[1]),{isEndHourDisabledRef:h,isEndMinuteDisabledRef:x,isEndSecondDisabledRef:w}=n;return(h.value?h.value(m):!1)||(x.value?x.value(p,m):!1)||(w.value?w.value(y,p,m):!1)}),d=g(()=>a.value||l.value),u=g(()=>o.value||s.value),c=g(()=>d.value||u.value);return Object.assign(Object.assign({},n),{isStartDateInvalidRef:a,isEndDateInvalidRef:o,isStartTimeInvalidRef:l,isEndTimeInvalidRef:s,isStartValueInvalidRef:d,isEndValueInvalidRef:u,isRangeInvalidRef:c})}const lh=ge({name:"DatePicker",props:rh,setup(e,{slots:r}){var t;const{localeRef:n,dateLocaleRef:a}=yn("DatePicker"),o=_n(e),{mergedSizeRef:l,mergedDisabledRef:s,mergedStatusRef:d}=o,{mergedComponentPropsRef:u,mergedClsPrefixRef:c,mergedBorderedRef:f,namespaceRef:v,inlineThemeDisabled:m}=xt(e),p=F(null),y=F(null),h=F(null),x=F(!1),w=me(e,"show"),k=zt(w,x),b=g(()=>({locale:a.value.locale,useAdditionalWeekYearTokens:!0})),R=g(()=>{const{format:P}=e;if(P)return P;switch(e.type){case"date":case"daterange":return n.value.dateFormat;case"datetime":case"datetimerange":return n.value.dateTimeFormat;case"year":case"yearrange":return n.value.yearTypeFormat;case"month":case"monthrange":return n.value.monthTypeFormat;case"quarter":case"quarterrange":return n.value.quarterFormat;case"week":return n.value.weekFormat}}),D=g(()=>{var P;return(P=e.valueFormat)!==null&&P!==void 0?P:R.value});function T(P){if(P===null)return null;const{value:G}=D,{value:ye}=b;return Array.isArray(P)?[Et(P[0],G,new Date,ye).getTime(),Et(P[1],G,new Date,ye).getTime()]:Et(P,G,new Date,ye).getTime()}const{defaultFormattedValue:Y,defaultValue:I}=e,N=F((t=Y!==void 0?T(Y):I)!==null&&t!==void 0?t:null),J=g(()=>{const{formattedValue:P}=e;return P!==void 0?T(P):e.value}),O=zt(J,N),C=F(null);Ln(()=>{C.value=O.value});const B=F(""),L=F(""),Q=F(""),q=Ye("DatePicker","-date-picker",ah,jl,e,c),ee=g(()=>{var P,G;return((G=(P=u==null?void 0:u.value)===null||P===void 0?void 0:P.DatePicker)===null||G===void 0?void 0:G.timePickerSize)||"small"}),ue=g(()=>["daterange","datetimerange","monthrange","quarterrange","yearrange"].includes(e.type)),te=g(()=>{const{placeholder:P}=e;if(P===void 0){const{type:G}=e;switch(G){case"date":return n.value.datePlaceholder;case"datetime":return n.value.datetimePlaceholder;case"month":return n.value.monthPlaceholder;case"year":return n.value.yearPlaceholder;case"quarter":return n.value.quarterPlaceholder;case"week":return n.value.weekPlaceholder;default:return""}}else return P}),V=g(()=>e.startPlaceholder===void 0?e.type==="daterange"?n.value.startDatePlaceholder:e.type==="datetimerange"?n.value.startDatetimePlaceholder:e.type==="monthrange"?n.value.startMonthPlaceholder:"":e.startPlaceholder),_=g(()=>e.endPlaceholder===void 0?e.type==="daterange"?n.value.endDatePlaceholder:e.type==="datetimerange"?n.value.endDatetimePlaceholder:e.type==="monthrange"?n.value.endMonthPlaceholder:"":e.endPlaceholder),E=g(()=>{const{actions:P,type:G,clearable:ye}=e;if(P===null)return[];if(P!==void 0)return P;const Me=ye?["clear"]:[];switch(G){case"date":case"week":return Me.push("now"),Me;case"datetime":return Me.push("now","confirm"),Me;case"daterange":return Me.push("confirm"),Me;case"datetimerange":return Me.push("confirm"),Me;case"month":return Me.push("now","confirm"),Me;case"year":return Me.push("now"),Me;case"quarter":return Me.push("now","confirm"),Me;case"monthrange":case"yearrange":case"quarterrange":return Me.push("confirm"),Me;default:{ur("date-picker","The type is wrong, n-date-picker's type only supports `date`, `datetime`, `daterange` and `datetimerange`.");break}}});function U(P){if(P===null)return null;if(Array.isArray(P)){const{value:G}=D,{value:ye}=b;return[nt(P[0],G,ye),nt(P[1],G,b.value)]}else return nt(P,D.value,b.value)}function ne(P){C.value=P}function Oe(P,G){const{"onUpdate:formattedValue":ye,onUpdateFormattedValue:Me}=e;ye&&ie(ye,P,G),Me&&ie(Me,P,G)}function he(P,G){const{"onUpdate:value":ye,onUpdateValue:Me,onChange:Ze}=e,{nTriggerFormChange:Be,nTriggerFormInput:$}=o,ae=U(P);G.doConfirm&&j(P,ae),Me&&ie(Me,P,ae),ye&&ie(ye,P,ae),Ze&&ie(Ze,P,ae),N.value=P,Oe(ae,P),Be(),$()}function Te(){const{onClear:P}=e;P==null||P()}function j(P,G){const{onConfirm:ye}=e;ye&&ye(P,G)}function be(P){const{onFocus:G}=e,{nTriggerFormFocus:ye}=o;G&&ie(G,P),ye()}function Se(P){const{onBlur:G}=e,{nTriggerFormBlur:ye}=o;G&&ie(G,P),ye()}function $e(P){const{"onUpdate:show":G,onUpdateShow:ye}=e;G&&ie(G,P),ye&&ie(ye,P),x.value=P}function Ke(P){P.key==="Escape"&&k.value&&(vr(P),je({returnFocus:!0}))}function lt(P){P.key==="Escape"&&k.value&&vr(P)}function ht(){var P;$e(!1),(P=h.value)===null||P===void 0||P.deactivate(),Te()}function Qe(){var P;(P=h.value)===null||P===void 0||P.deactivate(),Te()}function X(){je({returnFocus:!0})}function we(P){var G;k.value&&!(!((G=y.value)===null||G===void 0)&&G.contains(Ur(P)))&&je({returnFocus:!1})}function re(P){je({returnFocus:!0,disableUpdateOnClose:P})}function Re(P,G){G?he(P,{doConfirm:!1}):ne(P)}function Ee(){const P=C.value;he(Array.isArray(P)?[P[0],P[1]]:P,{doConfirm:!0})}function ze(){const{value:P}=C;ue.value?(Array.isArray(P)||P===null)&&Z(P):Array.isArray(P)||Le(P)}function Le(P){P===null?B.value="":B.value=nt(P,R.value,b.value)}function Z(P){if(P===null)L.value="",Q.value="";else{const G=b.value;L.value=nt(P[0],R.value,G),Q.value=nt(P[1],R.value,G)}}function se(){k.value||We()}function De(P){var G;!((G=p.value)===null||G===void 0)&&G.$el.contains(P.relatedTarget)||(Se(P),ze(),je({returnFocus:!1}))}function A(){s.value||(ze(),je({returnFocus:!1}))}function _e(P){if(P===""){he(null,{doConfirm:!1}),C.value=null,B.value="";return}const G=Et(P,R.value,new Date,b.value);Qt(G)?(he(ce(G),{doConfirm:!1}),ze()):B.value=P}function He(P,{source:G}){if(P[0]===""&&P[1]===""){he(null,{doConfirm:!1}),C.value=null,L.value="",Q.value="";return}const[ye,Me]=P,Ze=Et(ye,R.value,new Date,b.value),Be=Et(Me,R.value,new Date,b.value);if(Qt(Ze)&&Qt(Be)){let $=ce(Ze),ae=ce(Be);Be{ze()}),ze(),bt(k,P=>{P||(C.value=O.value)});const ve=oh(e,C),Fe=ih(e,C);At(qr,Object.assign(Object.assign(Object.assign({mergedClsPrefixRef:c,mergedThemeRef:q,timePickerSizeRef:ee,localeRef:n,dateLocaleRef:a,firstDayOfWeekRef:me(e,"firstDayOfWeek"),isDateDisabledRef:me(e,"isDateDisabled"),rangesRef:me(e,"ranges"),timePickerPropsRef:me(e,"timePickerProps"),closeOnSelectRef:me(e,"closeOnSelect"),updateValueOnCloseRef:me(e,"updateValueOnClose"),monthFormatRef:me(e,"monthFormat"),yearFormatRef:me(e,"yearFormat"),quarterFormatRef:me(e,"quarterFormat"),yearRangeRef:me(e,"yearRange")},ve),Fe),{datePickerSlots:r}));const S={focus:()=>{var P;(P=h.value)===null||P===void 0||P.focus()},blur:()=>{var P;(P=h.value)===null||P===void 0||P.blur()}},H=g(()=>{const{common:{cubicBezierEaseInOut:P},self:{iconColor:G,iconColorDisabled:ye}}=q.value;return{"--n-bezier":P,"--n-icon-color-override":G,"--n-icon-color-disabled-override":ye}}),fe=m?Mt("date-picker-trigger",void 0,H,e):void 0,ke=g(()=>{const{type:P}=e,{common:{cubicBezierEaseInOut:G},self:{calendarTitleFontSize:ye,calendarDaysFontSize:Me,itemFontSize:Ze,itemTextColor:Be,itemColorDisabled:$,itemColorIncluded:ae,itemColorHover:pe,itemColorActive:Ie,itemBorderRadius:Je,itemTextColorDisabled:Ge,itemTextColorActive:rt,panelColor:Nt,panelTextColor:Kt,arrowColor:Ht,calendarTitleTextColor:Rt,panelActionDividerColor:Wt,panelHeaderDividerColor:en,calendarDaysDividerColor:yt,panelBoxShadow:St,panelBorderRadius:Bt,calendarTitleFontWeight:Dn,panelExtraFooterPadding:Mn,panelActionPadding:zn,itemSize:In,itemCellWidth:$n,itemCellHeight:An,scrollItemWidth:z,scrollItemHeight:de,calendarTitlePadding:Pe,calendarTitleHeight:ut,calendarDaysHeight:qt,calendarDaysTextColor:ct,arrowSize:Nn,panelHeaderPadding:Wn,calendarDividerColor:Bn,calendarTitleGridTempateColumns:Gr,iconColor:Xr,iconColorDisabled:Qr,scrollItemBorderRadius:Zr,calendarTitleColorHover:Jr,[Ve("calendarLeftPadding",P)]:ea,[Ve("calendarRightPadding",P)]:gl}}=q.value;return{"--n-bezier":G,"--n-panel-border-radius":Bt,"--n-panel-color":Nt,"--n-panel-box-shadow":St,"--n-panel-text-color":Kt,"--n-panel-header-padding":Wn,"--n-panel-header-divider-color":en,"--n-calendar-left-padding":ea,"--n-calendar-right-padding":gl,"--n-calendar-title-color-hover":Jr,"--n-calendar-title-height":ut,"--n-calendar-title-padding":Pe,"--n-calendar-title-font-size":ye,"--n-calendar-title-font-weight":Dn,"--n-calendar-title-text-color":Rt,"--n-calendar-title-grid-template-columns":Gr,"--n-calendar-days-height":qt,"--n-calendar-days-divider-color":yt,"--n-calendar-days-font-size":Me,"--n-calendar-days-text-color":ct,"--n-calendar-divider-color":Bn,"--n-panel-action-padding":zn,"--n-panel-extra-footer-padding":Mn,"--n-panel-action-divider-color":Wt,"--n-item-font-size":Ze,"--n-item-border-radius":Je,"--n-item-size":In,"--n-item-cell-width":$n,"--n-item-cell-height":An,"--n-item-text-color":Be,"--n-item-color-included":ae,"--n-item-color-disabled":$,"--n-item-color-hover":pe,"--n-item-color-active":Ie,"--n-item-text-color-disabled":Ge,"--n-item-text-color-active":rt,"--n-scroll-item-width":z,"--n-scroll-item-height":de,"--n-scroll-item-border-radius":Zr,"--n-arrow-size":Nn,"--n-arrow-color":Ht,"--n-icon-color":Xr,"--n-icon-color-disabled":Qr}}),xe=m?Mt("date-picker",g(()=>e.type),ke,e):void 0;return Object.assign(Object.assign({},S),{mergedStatus:d,mergedClsPrefix:c,mergedBordered:f,namespace:v,uncontrolledValue:N,pendingValue:C,panelInstRef:p,triggerElRef:y,inputInstRef:h,isMounted:La(),displayTime:B,displayStartTime:L,displayEndTime:Q,mergedShow:k,adjustedTo:un(e),isRange:ue,localizedStartPlaceholder:V,localizedEndPlaceholder:_,mergedSize:l,mergedDisabled:s,localizedPlacehoder:te,isValueInvalid:ve.isValueInvalidRef,isStartValueInvalid:Fe.isStartValueInvalidRef,isEndValueInvalid:Fe.isEndValueInvalidRef,handleInputKeydown:lt,handleClickOutside:we,handleKeydown:Ke,handleClear:ht,handlePanelClear:Qe,handleTriggerClick:vt,handleInputActivate:se,handleInputDeactivate:A,handleInputFocus:et,handleInputBlur:De,handlePanelTabOut:X,handlePanelClose:re,handleRangeUpdateValue:He,handleSingleUpdateValue:_e,handlePanelUpdateValue:Re,handlePanelConfirm:Ee,mergedTheme:q,actions:E,triggerCssVars:m?void 0:H,triggerThemeClass:fe==null?void 0:fe.themeClass,triggerOnRender:fe==null?void 0:fe.onRender,cssVars:m?void 0:ke,themeClass:xe==null?void 0:xe.themeClass,onRender:xe==null?void 0:xe.onRender,onNextMonth:e.onNextMonth,onPrevMonth:e.onPrevMonth,onNextYear:e.onNextYear,onPrevYear:e.onPrevYear})},render(){const{clearable:e,triggerOnRender:r,mergedClsPrefix:t,$slots:n}=this,a={onUpdateValue:this.handlePanelUpdateValue,onTabOut:this.handlePanelTabOut,onClose:this.handlePanelClose,onClear:this.handlePanelClear,onKeydown:this.handleKeydown,onConfirm:this.handlePanelConfirm,ref:"panelInstRef",value:this.pendingValue,active:this.mergedShow,actions:this.actions,shortcuts:this.shortcuts,style:this.cssVars,defaultTime:this.defaultTime,themeClass:this.themeClass,panel:this.panel,inputReadonly:this.inputReadonly||this.mergedDisabled,onRender:this.onRender,onNextMonth:this.onNextMonth,onPrevMonth:this.onPrevMonth,onNextYear:this.onNextYear,onPrevYear:this.onPrevYear,timerPickerFormat:this.timerPickerFormat,dateFormat:this.dateFormat,calendarDayFormat:this.calendarDayFormat,calendarHeaderYearFormat:this.calendarHeaderYearFormat,calendarHeaderMonthFormat:this.calendarHeaderMonthFormat,calendarHeaderMonthYearSeparator:this.calendarHeaderMonthYearSeparator,calendarHeaderMonthBeforeYear:this.calendarHeaderMonthBeforeYear},o=()=>{const{type:s}=this;return s==="datetime"?i(eh,Object.assign({},a,{defaultCalendarStartTime:this.defaultCalendarStartTime}),n):s==="daterange"?i(bf,Object.assign({},a,{defaultCalendarStartTime:this.defaultCalendarStartTime,defaultCalendarEndTime:this.defaultCalendarEndTime,bindCalendarMonths:this.bindCalendarMonths}),n):s==="datetimerange"?i(th,Object.assign({},a,{defaultCalendarStartTime:this.defaultCalendarStartTime,defaultCalendarEndTime:this.defaultCalendarEndTime,bindCalendarMonths:this.bindCalendarMonths}),n):s==="month"||s==="year"||s==="quarter"?i(fl,Object.assign({},a,{type:s,key:s})):s==="monthrange"||s==="yearrange"||s==="quarterrange"?i(nh,Object.assign({},a,{type:s})):i(gf,Object.assign({},a,{type:s,defaultCalendarStartTime:this.defaultCalendarStartTime}),n)};if(this.panel)return o();r==null||r();const l={bordered:this.mergedBordered,size:this.mergedSize,passivelyActivated:!0,disabled:this.mergedDisabled,readonly:this.inputReadonly||this.mergedDisabled,clearable:e,onClear:this.handleClear,onClick:this.handleTriggerClick,onKeydown:this.handleInputKeydown,onActivate:this.handleInputActivate,onDeactivate:this.handleInputDeactivate,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur};return i("div",{ref:"triggerElRef",class:[`${t}-date-picker`,this.mergedDisabled&&`${t}-date-picker--disabled`,this.isRange&&`${t}-date-picker--range`,this.triggerThemeClass],style:this.triggerCssVars,onKeydown:this.handleKeydown},i(wr,null,{default:()=>[i(xr,null,{default:()=>this.isRange?i(Yt,Object.assign({ref:"inputInstRef",status:this.mergedStatus,value:[this.displayStartTime,this.displayEndTime],placeholder:[this.localizedStartPlaceholder,this.localizedEndPlaceholder],textDecoration:[this.isStartValueInvalid?"line-through":"",this.isEndValueInvalid?"line-through":""],pair:!0,onUpdateValue:this.handleRangeUpdateValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,internalForceFocus:this.mergedShow,internalDeactivateOnEnter:!0},l),{separator:()=>this.separator===void 0?qe(n.separator,()=>[i(Pt,{clsPrefix:t,class:`${t}-date-picker-icon`},{default:()=>i(Ms,null)})]):this.separator,[e?"clear-icon-placeholder":"suffix"]:()=>qe(n["date-icon"],()=>[i(Pt,{clsPrefix:t,class:`${t}-date-picker-icon`},{default:()=>i(vo,null)})])}):i(Yt,Object.assign({ref:"inputInstRef",status:this.mergedStatus,value:this.displayTime,placeholder:this.localizedPlacehoder,textDecoration:this.isValueInvalid&&!this.isRange?"line-through":"",onUpdateValue:this.handleSingleUpdateValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,internalForceFocus:this.mergedShow,internalDeactivateOnEnter:!0},l),{[e?"clear-icon-placeholder":"suffix"]:()=>i(Pt,{clsPrefix:t,class:`${t}-date-picker-icon`},{default:()=>qe(n["date-icon"],()=>[i(vo,null)])})})}),i(Cr,{show:this.mergedShow,containerClass:this.namespace,to:this.adjustedTo,teleportDisabled:this.adjustedTo===un.tdkey,placement:this.placement},{default:()=>i(Kn,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>this.mergedShow?Hr(o(),[[hr,this.handleClickOutside,void 0,{capture:!0}]]):null})})]}))}});function sh(e){const{textColorDisabled:r}=e;return{iconColorDisabled:r}}const dh=Yl({name:"InputNumber",common:ql,peers:{Button:Wl,Input:Kl},self:sh}),uh=W([M("input-number-suffix",` display: inline-block; margin-right: 10px; - `),O("input-number-prefix",` + `),M("input-number-prefix",` display: inline-block; margin-left: 10px; - `)]);function ch(e){return e==null||typeof e=="string"&&e.trim()===""?null:Number(e)}function fh(e){return e.includes(".")&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||e==="-"||e==="-0"}function wa(e){return e==null?!0:!Number.isNaN(e)}function qo(e,r){return typeof e!="number"?"":r===void 0?String(e):e.toFixed(r)}function xa(e){if(e===null)return null;if(typeof e=="number")return e;{const r=Number(e);return Number.isNaN(r)?null:r}}const Go=800,Xo=100,hh=Object.assign(Object.assign({},Ye.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]}),Ba=ge({name:"InputNumber",props:hh,setup(e){const{mergedBorderedRef:r,mergedClsPrefixRef:t,mergedRtlRef:n}=xt(e),a=Ye("InputNumber","-input-number",uh,dh,e,t),{localeRef:o}=yn("InputNumber"),l=Tn(e),{mergedSizeRef:s,mergedDisabledRef:d,mergedStatusRef:u}=l,c=F(null),f=F(null),v=F(null),m=F(e.defaultValue),p=me(e,"value"),y=zt(p,m),h=F(""),w=X=>{const we=String(X).split(".")[1];return we?we.length:0},g=X=>{const we=[e.min,e.max,e.step,X].map(re=>re===void 0?0:w(re));return Math.max(...we)},k=at(()=>{const{placeholder:X}=e;return X!==void 0?X:o.value.placeholder}),x=at(()=>{const X=xa(e.step);return X!==null?X===0?1:Math.abs(X):1}),P=at(()=>{const X=xa(e.min);return X!==null?X:null}),$=at(()=>{const X=xa(e.max);return X!==null?X:null}),T=()=>{const{value:X}=y;if(wa(X)){const{format:we,precision:re}=e;we?h.value=we(X):X===null||re===void 0||w(X)>re?h.value=qo(X,void 0):h.value=qo(X,re)}else h.value=String(X)};T();const Y=X=>{const{value:we}=y;if(X===we){T();return}const{"onUpdate:value":re,onUpdateValue:Re,onChange:Ee}=e,{nTriggerFormInput:ze,nTriggerFormChange:Le}=l;Ee&&oe(Ee,X),Re&&oe(Re,X),re&&oe(re,X),m.value=X,ze(),Le()},z=({offset:X,doUpdateIfValid:we,fixPrecision:re,isInputing:Re})=>{const{value:Ee}=h;if(Re&&fh(Ee))return!1;const ze=(e.parse||ch)(Ee);if(ze===null)return we&&Y(null),null;if(wa(ze)){const Le=w(ze),{precision:Z}=e;if(Z!==void 0&&ZOe){if(!we||Re)return!1;se=Oe}if(A!==null&&sez({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),J=at(()=>{const{value:X}=y;if(e.validator&&X===null)return!1;const{value:we}=x;return z({offset:-we,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),D=at(()=>{const{value:X}=y;if(e.validator&&X===null)return!1;const{value:we}=x;return z({offset:+we,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function C(X){const{onFocus:we}=e,{nTriggerFormFocus:re}=l;we&&oe(we,X),re()}function B(X){var we,re;if(X.target===((we=c.value)===null||we===void 0?void 0:we.wrapperElRef))return;const Re=z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(Re!==!1){const Le=(re=c.value)===null||re===void 0?void 0:re.inputElRef;Le&&(Le.value=String(Re||"")),y.value===Re&&T()}else T();const{onBlur:Ee}=e,{nTriggerFormBlur:ze}=l;Ee&&oe(Ee,X),ze(),nn(()=>{T()})}function L(X){const{onClear:we}=e;we&&oe(we,X)}function Q(){const{value:X}=D;if(!X){Te();return}const{value:we}=y;if(we===null)e.validator||Y(te());else{const{value:re}=x;z({offset:re,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function q(){const{value:X}=J;if(!X){De();return}const{value:we}=y;if(we===null)e.validator||Y(te());else{const{value:re}=x;z({offset:-re,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}const ee=C,ue=B;function te(){if(e.validator)return null;const{value:X}=P,{value:we}=$;return X!==null?Math.max(0,X):we!==null?Math.min(0,we):0}function V(X){L(X),Y(null)}function _(X){var we,re,Re;!((we=v.value)===null||we===void 0)&&we.$el.contains(X.target)&&X.preventDefault(),!((re=f.value)===null||re===void 0)&&re.$el.contains(X.target)&&X.preventDefault(),(Re=c.value)===null||Re===void 0||Re.activate()}let E=null,U=null,ne=null;function De(){ne&&(window.clearTimeout(ne),ne=null),E&&(window.clearInterval(E),E=null)}let he=null;function Te(){he&&(window.clearTimeout(he),he=null),U&&(window.clearInterval(U),U=null)}function j(){De(),ne=window.setTimeout(()=>{E=window.setInterval(()=>{q()},Xo)},Go),hn("mouseup",document,De,{once:!0})}function be(){Te(),he=window.setTimeout(()=>{U=window.setInterval(()=>{Q()},Xo)},Go),hn("mouseup",document,Te,{once:!0})}const Se=()=>{U||Q()},$e=()=>{E||q()};function Ke(X){var we,re;if(X.key==="Enter"){if(X.target===((we=c.value)===null||we===void 0?void 0:we.wrapperElRef))return;z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((re=c.value)===null||re===void 0||re.deactivate())}else if(X.key==="ArrowUp"){if(!D.value||e.keyboard.ArrowUp===!1)return;X.preventDefault(),z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&Q()}else if(X.key==="ArrowDown"){if(!J.value||e.keyboard.ArrowDown===!1)return;X.preventDefault(),z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&q()}}function lt(X){h.value=X,e.updateValueOnInput&&!e.format&&!e.parse&&e.precision===void 0&&z({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}gt(y,()=>{T()});const ht={focus:()=>{var X;return(X=c.value)===null||X===void 0?void 0:X.focus()},blur:()=>{var X;return(X=c.value)===null||X===void 0?void 0:X.blur()},select:()=>{var X;return(X=c.value)===null||X===void 0?void 0:X.select()}},Qe=gn("InputNumber",n,t);return Object.assign(Object.assign({},ht),{rtlEnabled:Qe,inputInstRef:c,minusButtonInstRef:f,addButtonInstRef:v,mergedClsPrefix:t,mergedBordered:r,uncontrolledValue:m,mergedValue:y,mergedPlaceholder:k,displayedValueInvalid:N,mergedSize:s,mergedDisabled:d,displayedValue:h,addable:D,minusable:J,mergedStatus:u,handleFocus:ee,handleBlur:ue,handleClear:V,handleMouseDown:_,handleAddClick:Se,handleMinusClick:$e,handleAddMousedown:be,handleMinusMousedown:j,handleKeyDown:Ke,handleUpdateDisplayedValue:lt,mergedTheme:a,inputThemeOverrides:{paddingSmall:"0 8px 0 10px",paddingMedium:"0 8px 0 12px",paddingLarge:"0 8px 0 14px"},buttonThemeOverrides:b(()=>{const{self:{iconColorDisabled:X}}=a.value,[we,re,Re,Ee]=Gl(X);return{textColorTextDisabled:`rgb(${we}, ${re}, ${Re})`,opacityDisabled:`${Ee}`}})})},render(){const{mergedClsPrefix:e,$slots:r}=this,t=()=>i(sn,{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:()=>qe(r["minus-icon"],()=>[i(Pt,{clsPrefix:e},{default:()=>i(Ds,null)})])}),n=()=>i(sn,{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:()=>qe(r["add-icon"],()=>[i(Pt,{clsPrefix:e},{default:()=>i(ms,null)})])});return i("div",{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},i(Xt,{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"?[t(),er(r.prefix,o=>o?i("span",{class:`${e}-input-number-prefix`},o):null)]:(a=r.prefix)===null||a===void 0?void 0:a.call(r)},suffix:()=>{var a;return this.showButton?[er(r.suffix,o=>o?i("span",{class:`${e}-input-number-suffix`},o):null),this.buttonPlacement==="right"?t():null,n()]:(a=r.suffix)===null||a===void 0?void 0:a.call(r)}}))}});async function vh(){const{data:e}=await Zt("/admin/api/users");return e}async function mh(e){const{data:r}=await Zt(`/admin/api/users/${encodeURIComponent(e)}/reset-password`,{method:"POST"});return r}async function ph(e){await Zt(`/admin/api/users/${encodeURIComponent(e)}/disable`,{method:"POST"})}async function gh(e){await Zt(`/admin/api/users/${encodeURIComponent(e)}/admin`,{method:"POST"})}async function bh(e){await Zt(`/admin/api/users/${encodeURIComponent(e)}/admin`,{method:"DELETE"})}async function yh(){const{data:e}=await Zt("/admin/api/invitations");return e}async function wh(e){const{data:r}=await Zt("/admin/api/invitations",{method:"POST",body:JSON.stringify(e)});return r&&typeof r=="object"&&"invites"in r?r.invites:[r]}async function xh(){const{data:e}=await Zt("/admin/api/config");return e}async function Ch(e){const{data:r}=await Zt("/admin/api/config",{method:"PUT",body:JSON.stringify(e)});return r}async function kh(){const{data:e}=await Zt("/admin/api/feishu");return e}async function Rh(e){const{data:r}=await Zt("/admin/api/feishu",{method:"PUT",body:JSON.stringify(e)});return r}async function Sh(){const{data:e}=await Zt("/admin/api/feishu/generate-key",{method:"POST"});return e.encrypt_key}const Ph={class:"field"},Fh={class:"field-label"},Th={class:"field"},_h={class:"field-label"},Dh={class:"field"},Oh={class:"field-label"},Mh={class:"secret-msg"},zh={class:"secret-display"},Ih={key:0,class:"empty"},$h=ge({__name:"Invitations",setup(e){const r=F([]),t=F(!0),n=F(!1),a=F(""),o=F(1),l=F(null),s=F([]),d=Yr(),{t:u}=gr(),c={"data-testid":"invite-note",autocomplete:"off"},f={"data-testid":"invite-count"},v={"data-testid":"invite-expires"};function m(w){return ci(w)}const p=b(()=>[{title:u("admin.invitationsTab.prefix"),key:"code_prefix",render:w=>i("code",{},w.code_prefix)},{title:u("admin.invitationsTab.note"),key:"note"},{title:u("admin.created"),key:"created_at",render:w=>m(w.created_at)},{title:u("admin.invitationsTab.expires"),key:"expires_at",render:w=>m(w.expires_at)},{title:u("admin.invitationsTab.consumed"),key:"consumed_at",render:w=>w.consumed_at?i("span",{},`${m(w.consumed_at)}${w.consumed_by?" · "+w.consumed_by:""}`):i(Hn,{size:"small",type:"default"},{default:()=>u("admin.invitationsTab.unused")})}]);async function y(){t.value=!0;try{r.value=await yh()}catch(w){w instanceof vn&&d.error(u("admin.invitationsTab.loadFailed"))}finally{t.value=!1}}async function h(w){if(w.preventDefault(),!n.value){n.value=!0;try{const g=Math.max(1,Math.min(50,Math.round(o.value||1))),k=a.value.trim(),x={count:g};k&&(x.note=k),l.value!=null&&(x.expires_at=new Date(l.value).toISOString());const P=await wh(x);s.value=P,a.value="",l.value=null,o.value=1,await y()}catch(g){g instanceof vn&&d.error(u("admin.invitationsTab.createFailed",{code:g.code}))}finally{n.value=!1}}}return Qt(y),(w,g)=>(Ot(),dn(ie(jr),{title:ie(u)("admin.invitations"),bordered:!1},{default:je(()=>[yt("form",{onSubmit:h,autocomplete:"off",class:"create-form"},[Be(ie(tn),{wrap:!1,align:"end"},{default:je(()=>[yt("div",Ph,[yt("label",Fh,dt(ie(u)("admin.invitationsTab.note")),1),Be(ie(Xt),{value:a.value,"onUpdate:value":g[0]||(g[0]=k=>a.value=k),type:"text",placeholder:ie(u)("common.optional"),"input-props":c},null,8,["value","placeholder"])]),yt("div",Th,[yt("label",_h,dt(ie(u)("admin.invitationsTab.count")),1),Be(ie(Ba),{value:o.value,"onUpdate:value":g[1]||(g[1]=k=>o.value=k),min:1,max:50,"input-props":f},null,8,["value"])]),yt("div",Dh,[yt("label",Oh,dt(ie(u)("admin.invitationsTab.expires")),1),Be(ie(lh),{value:l.value,"onUpdate:value":g[2]||(g[2]=k=>l.value=k),type:"datetime",clearable:"",placeholder:ie(u)("common.optional"),"input-props":v},null,8,["value","placeholder"])]),Be(ie(ft),{type:"primary","attr-type":"submit",loading:n.value,disabled:n.value},{default:je(()=>[cr(dt(ie(u)("common.create")),1)]),_:1},8,["loading","disabled"])]),_:1})],32),(Ot(!0),jn(mn,null,ui(s.value,(k,x)=>(Ot(),dn(ie(pi),{key:x,type:"success","show-icon":!1,class:"secret-alert"},{default:je(()=>[yt("div",Mh,dt(ie(u)("admin.invitationsTab.copyNow",{note:k.note?` (${k.note})`:""})),1),yt("code",zh,dt(k.plaintext),1)]),_:2},1024))),128)),Be(ie(dl),{columns:p.value,data:r.value,loading:t.value,size:"small",bordered:!1,pagination:!1},null,8,["columns","data","loading"]),!t.value&&r.value.length===0?(Ot(),jn("p",Ih,dt(ie(u)("admin.invitationsTab.empty")),1)):Cn("",!0)]),_:1},8,["title"]))}}),Ah=br($h,[["__scopeId","data-v-9794d932"]]),Nh={class:"secret-msg"},Bh={class:"secret-display"},Eh={key:0,class:"form-error",role:"alert"},Vh=ge({__name:"Users",setup(e){const r=F([]),t=F(!0),n=F(""),a=F([]);Yr();const{t:o}=gr();function l(h){return ci(h)}function s(h){if(h instanceof vn){if(h.code==="last_admin")return o("admin.errors.lastAdmin");if(h.code==="cannot_demote_self")return o("admin.errors.cannotDemoteSelf")}return o("admin.errors.actionFailed")}async function d(){t.value=!0,n.value="";try{r.value=await vh()}catch(h){h instanceof vn&&(n.value=o("admin.loadUsersFailed"))}finally{t.value=!1}}async function u(h){n.value="";try{await gh(h),await d()}catch(w){n.value=s(w)}}async function c(h){n.value="";try{await bh(h),await d()}catch(w){n.value=s(w)}}async function f(h,w){n.value="",a.value=[];try{const{plaintext:g}=await mh(h);a.value=[{label:o("admin.temporaryPasswordFor",{email:w}),plaintext:g}],await d()}catch(g){n.value=s(g)}}async function v(h){n.value="";try{await ph(h),await d()}catch(w){n.value=s(w)}}function m(h){return h.disabled_at?i(Hn,{size:"small",type:"error"},{default:()=>o("admin.disabled",{when:l(h.disabled_at)})}):h.is_admin?i(Hn,{size:"small",type:"success"},{default:()=>o("admin.userStatus.admin")}):i(Hn,{size:"small",type:"default"},{default:()=>o("admin.userStatus.active")})}function p(h){if(h.disabled_at)return null;const w=h.is_admin?i(Sr,{onPositiveClick:()=>c(h.id)},{trigger:()=>i(ft,{size:"small","data-testid":`demote-${h.id}`},{default:()=>o("admin.demote")}),default:()=>o("admin.demoteConfirm")}):i(Sr,{onPositiveClick:()=>u(h.id)},{trigger:()=>i(ft,{size:"small","data-testid":`promote-${h.id}`},{default:()=>o("admin.promote")}),default:()=>o("admin.promoteConfirm")}),g=i(Sr,{onPositiveClick:()=>f(h.id,h.email)},{trigger:()=>i(ft,{size:"small","data-testid":`reset-${h.id}`},{default:()=>o("admin.resetPassword")}),default:()=>o("admin.resetPasswordConfirm")}),k=i(Sr,{onPositiveClick:()=>v(h.id)},{trigger:()=>i(ft,{size:"small",type:"error","data-testid":`disable-${h.id}`},{default:()=>o("admin.disable")}),default:()=>o("admin.disableConfirm")});return i(tn,{},{default:()=>[w,g,k]})}const y=b(()=>[{title:o("admin.email"),key:"email"},{title:o("admin.id"),key:"id",render:h=>i("code",{},h.id)},{title:o("admin.created"),key:"created_at",render:h=>l(h.created_at)},{title:o("admin.status"),key:"status",render:m},{title:o("admin.actions"),key:"actions",render:p}]);return Qt(d),(h,w)=>(Ot(),dn(ie(jr),{title:ie(o)("admin.users"),bordered:!1},{default:je(()=>[(Ot(!0),jn(mn,null,ui(a.value,(g,k)=>(Ot(),dn(ie(pi),{key:k,type:"success","show-icon":!1,class:"secret-alert"},{default:je(()=>[yt("div",Nh,dt(ie(o)("admin.secretCopyOnce",{label:g.label})),1),yt("code",Bh,dt(g.plaintext),1)]),_:2},1024))),128)),Be(ie(dl),{columns:y.value,data:r.value,loading:t.value,size:"small",bordered:!1,pagination:!1},null,8,["columns","data","loading"]),n.value?(Ot(),jn("p",Eh,dt(n.value),1)):Cn("",!0)]),_:1},8,["title"]))}}),Lh=br(Vh,[["__scopeId","data-v-e0bdfd90"]]),Hh={class:"hint"},Uh={class:"muted"},jh={class:"muted"},Yh={class:"muted"},Kh={class:"warn"},Wh={class:"muted version"},qh={key:1,class:"form-error",role:"alert"},Gh=ge({__name:"Config",setup(e){const r=F(null),t=F(0),n=F(0),a=F(!1),o=F(!1),l=F(!0),s=F(!1),d=F(""),u=Yr(),{t:c}=gr();function f(g,k){return g<0?c("admin.config.effectiveDisabled"):g===0?c("admin.config.effective",{value:k}):c("admin.config.effective",{value:g})}const v=b(()=>r.value?f(t.value,r.value.default_rate_limit_per_minute):""),m=b(()=>r.value?f(n.value,r.value.default_max_connections_per_key):"");async function p(){l.value=!0,d.value="";try{const g=await xh();r.value=g,t.value=g.rate_limit_per_minute,n.value=g.max_connections_per_key,a.value=g.debug,o.value=g.debug_payload}catch(g){g instanceof vn&&(d.value=c("admin.config.loadFailed"))}finally{l.value=!1}}async function y(){if(!(!r.value||s.value)){d.value="",s.value=!0;try{const g=await Ch({rate_limit_per_minute:Math.round(t.value),max_connections_per_key:Math.round(n.value),debug:a.value,debug_payload:o.value});r.value=g,t.value=g.rate_limit_per_minute,n.value=g.max_connections_per_key,a.value=g.debug,o.value=g.debug_payload,u.success(c("setup.saved"))}catch(g){g instanceof vn&&(d.value=c("admin.config.saveFailed"))}finally{s.value=!1}}}const h={"data-testid":"cfg-rate"},w={"data-testid":"cfg-conn"};return Qt(p),(g,k)=>(Ot(),dn(ie(jr),{title:ie(c)("admin.config.runtimeLimits"),bordered:!1},{default:je(()=>[yt("p",Hh,dt(ie(c)("admin.config.hint")),1),r.value?(Ot(),dn(ie(fi),{key:0,"label-placement":"top","require-mark-placement":"right-hanging"},{default:je(()=>[Be(ie(Vn),{label:ie(c)("admin.config.rateLimit"),"show-feedback":!1},{default:je(()=>[Be(ie(tn),{wrap:!1,align:"center"},{default:je(()=>[Be(ie(Ba),{value:t.value,"onUpdate:value":k[0]||(k[0]=x=>t.value=x),"show-button":!1,"input-props":h},null,8,["value"]),yt("span",Uh,dt(v.value),1)]),_:1})]),_:1},8,["label"]),Be(ie(Vn),{label:ie(c)("admin.config.maxConnections"),"show-feedback":!1},{default:je(()=>[Be(ie(tn),{wrap:!1,align:"center"},{default:je(()=>[Be(ie(Ba),{value:n.value,"onUpdate:value":k[1]||(k[1]=x=>n.value=x),"show-button":!1,"input-props":w},null,8,["value"]),yt("span",jh,dt(m.value),1)]),_:1})]),_:1},8,["label"]),Be(ie(Vn),{label:ie(c)("admin.config.debug"),"show-feedback":!1},{default:je(()=>[Be(ie(tn),{align:"center",size:8},{default:je(()=>[Be(ie(zr),{value:a.value,"onUpdate:value":k[2]||(k[2]=x=>a.value=x),"data-testid":"cfg-debug"},null,8,["value"]),yt("span",Yh,dt(ie(c)("admin.config.debugHint")),1)]),_:1})]),_:1},8,["label"]),Be(ie(Vn),{label:ie(c)("admin.config.debugPayload"),"show-feedback":!1},{default:je(()=>[Be(ie(tn),{align:"center",size:8},{default:je(()=>[Be(ie(zr),{value:o.value,"onUpdate:value":k[3]||(k[3]=x=>o.value=x),"data-testid":"cfg-debug-payload"},null,8,["value"]),yt("span",Kh,dt(ie(c)("admin.config.debugPayloadWarn")),1)]),_:1})]),_:1},8,["label"]),Be(ie(tn),{class:"actions",align:"center"},{default:je(()=>[Be(ie(ft),{type:"primary",loading:s.value,disabled:s.value,"data-testid":"cfg-save",onClick:y},{default:je(()=>[cr(dt(ie(c)("common.save")),1)]),_:1},8,["loading","disabled"]),yt("span",Wh,[cr(dt(ie(c)("common.version"))+": ",1),yt("code",null,dt(r.value.version),1)])]),_:1})]),_:1})):Cn("",!0),d.value?(Ot(),jn("p",qh,dt(d.value),1)):Cn("",!0)]),_:1},8,["title"]))}}),Xh=br(Gh,[["__scopeId","data-v-0b657ff9"]]),Qh={class:"hint"},Zh={key:0,class:"warn"},Jh={class:"muted"},ev={class:"muted"},tv={key:1,class:"form-error",role:"alert"},nv=ge({__name:"FeishuConfig",setup(e){const r=F(null),t=F(!1),n=F(""),a=F(""),o=F(!1),l=F(!0),s=F(!1),d=F(""),u=Yr(),{t:c}=gr();async function f(){l.value=!0,d.value="";try{const y=await kh();v(y)}catch(y){y instanceof vn&&(d.value=c("admin.feishuConfig.loadFailed"))}finally{l.value=!1}}function v(y){r.value=y,t.value=y.enabled,n.value=y.base_url,a.value="",o.value=!1}async function m(){d.value="";try{a.value=await Sh(),u.info(c("admin.feishuConfig.keyGenerated"))}catch(y){y instanceof vn&&(d.value=c("admin.feishuConfig.saveFailed"))}}async function p(){if(!s.value){d.value="",s.value=!0;try{const y={enabled:t.value},h=a.value.trim();h&&(y.encrypt_key=h);const w=n.value.trim();w&&(y.base_url=w),o.value&&(y.force=!0);const g=await Rh(y);v(g),u.success(c("setup.saved"))}catch(y){y instanceof vn&&(d.value=y.status===409?c("admin.feishuConfig.rotateConflict"):c("admin.feishuConfig.saveFailed"))}finally{s.value=!1}}}return Qt(f),(y,h)=>(Ot(),dn(ie(jr),{title:ie(c)("admin.feishuConfig.title"),bordered:!1},{default:je(()=>[yt("p",Qh,dt(ie(c)("admin.feishuConfig.description")),1),r.value?(Ot(),dn(ie(fi),{key:0,"label-placement":"top"},{default:je(()=>[Be(ie(Vn),{label:ie(c)("admin.feishuConfig.enabled"),"show-feedback":!1},{default:je(()=>[Be(ie(zr),{value:t.value,"onUpdate:value":h[0]||(h[0]=w=>t.value=w),"data-testid":"feishu-enabled"},null,8,["value"])]),_:1},8,["label"]),Be(ie(Vn),{label:ie(c)("admin.feishuConfig.encryptKey"),"show-feedback":!1},{default:je(()=>[Be(ie(tn),{vertical:"",size:6,style:{width:"100%"}},{default:je(()=>[Be(ie(tn),{wrap:!1,align:"center",style:{width:"100%"}},{default:je(()=>[Be(ie(Xt),{value:a.value,"onUpdate:value":h[1]||(h[1]=w=>a.value=w),type:"password","show-password-on":"click",placeholder:r.value.key_set?ie(c)("admin.feishuConfig.keyKeepPlaceholder",{last4:r.value.key_last4??""}):ie(c)("admin.feishuConfig.keyEmptyPlaceholder"),"data-testid":"feishu-key"},null,8,["value","placeholder"]),Be(ie(ft),{tertiary:"","data-testid":"feishu-generate",onClick:m},{default:je(()=>[cr(dt(ie(c)("admin.feishuConfig.generate")),1)]),_:1})]),_:1}),a.value?(Ot(),jn("span",Zh,dt(ie(c)("admin.feishuConfig.keyCopyOnce")),1)):Cn("",!0),a.value&&r.value.key_set?(Ot(),dn(ie(tn),{key:1,align:"center",size:8},{default:je(()=>[Be(ie(zr),{value:o.value,"onUpdate:value":h[2]||(h[2]=w=>o.value=w),size:"small","data-testid":"feishu-force"},null,8,["value"]),yt("span",Jh,dt(ie(c)("admin.feishuConfig.forceRotate")),1)]),_:1})):Cn("",!0)]),_:1})]),_:1},8,["label"]),Be(ie(Vn),{label:ie(c)("admin.feishuConfig.baseUrl"),"show-feedback":!1},{default:je(()=>[Be(ie(Xt),{value:n.value,"onUpdate:value":h[3]||(h[3]=w=>n.value=w),placeholder:"https://open.feishu.cn","data-testid":"feishu-base"},null,8,["value"])]),_:1},8,["label"]),Be(ie(tn),{class:"actions",align:"center"},{default:je(()=>[Be(ie(ft),{type:"primary",loading:s.value,disabled:s.value,"data-testid":"feishu-save",onClick:p},{default:je(()=>[cr(dt(ie(c)("common.save")),1)]),_:1},8,["loading","disabled"]),yt("span",ev,dt(r.value.running?ie(c)("admin.feishuConfig.statusRunning"):ie(c)("admin.feishuConfig.statusStopped")),1)]),_:1})]),_:1})):Cn("",!0),d.value?(Ot(),jn("p",tv,dt(d.value),1)):Cn("",!0)]),_:1},8,["title"]))}}),rv=br(nv,[["__scopeId","data-v-040f66db"]]),av={class:"admin-page"},ov=ge({__name:"App",setup(e){const r=["invitations","users","config","feishu"];function t(){const d=location.hash.replace(/^#/,"");return r.includes(d)?d:"invitations"}const n=F(t()),{t:a}=gr();function o(){n.value=t()}Qt(()=>window.addEventListener("hashchange",o)),di(()=>window.removeEventListener("hashchange",o));function l(d){r.includes(d)&&location.hash.replace(/^#/,"")!==d&&(location.hash="#"+d)}const s=Xl();return(d,u)=>(Ot(),dn(ie(Jl),{theme:ie(Zl),"theme-overrides":ie(s),locale:ie(oo).locale,"date-locale":ie(oo).dateLocale},{default:je(()=>[Be(ie(Ql),null,{default:je(()=>[Be(rs,{active:"admin"}),yt("main",av,[Be(ie(ps),{value:n.value,type:"line",animated:"","onUpdate:value":l},{default:je(()=>[Be(ie(Pr),{name:"invitations",tab:ie(a)("admin.invitations")},{default:je(()=>[Be(Ah)]),_:1},8,["tab"]),Be(ie(Pr),{name:"users",tab:ie(a)("admin.users")},{default:je(()=>[Be(Lh)]),_:1},8,["tab"]),Be(ie(Pr),{name:"config",tab:ie(a)("admin.configTab")},{default:je(()=>[Be(Xh)]),_:1},8,["tab"]),Be(ie(Pr),{name:"feishu",tab:ie(a)("admin.feishuTab")},{default:je(()=>[Be(rv)]),_:1},8,["tab"])]),_:1},8,["value"])])]),_:1})]),_:1},8,["theme","theme-overrides","locale","date-locale"]))}}),iv=br(ov,[["__scopeId","data-v-66a48cc2"]]);es("admin")||(ts(),ns(iv).mount("#app")); + `)]);function ch(e){return e==null||typeof e=="string"&&e.trim()===""?null:Number(e)}function fh(e){return e.includes(".")&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||e==="-"||e==="-0"}function wa(e){return e==null?!0:!Number.isNaN(e)}function qo(e,r){return typeof e!="number"?"":r===void 0?String(e):e.toFixed(r)}function xa(e){if(e===null)return null;if(typeof e=="number")return e;{const r=Number(e);return Number.isNaN(r)?null:r}}const Go=800,Xo=100,hh=Object.assign(Object.assign({},Ye.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]}),Ba=ge({name:"InputNumber",props:hh,setup(e){const{mergedBorderedRef:r,mergedClsPrefixRef:t,mergedRtlRef:n}=xt(e),a=Ye("InputNumber","-input-number",uh,dh,e,t),{localeRef:o}=yn("InputNumber"),l=_n(e),{mergedSizeRef:s,mergedDisabledRef:d,mergedStatusRef:u}=l,c=F(null),f=F(null),v=F(null),m=F(e.defaultValue),p=me(e,"value"),y=zt(p,m),h=F(""),x=X=>{const we=String(X).split(".")[1];return we?we.length:0},w=X=>{const we=[e.min,e.max,e.step,X].map(re=>re===void 0?0:x(re));return Math.max(...we)},k=at(()=>{const{placeholder:X}=e;return X!==void 0?X:o.value.placeholder}),b=at(()=>{const X=xa(e.step);return X!==null?X===0?1:Math.abs(X):1}),R=at(()=>{const X=xa(e.min);return X!==null?X:null}),D=at(()=>{const X=xa(e.max);return X!==null?X:null}),T=()=>{const{value:X}=y;if(wa(X)){const{format:we,precision:re}=e;we?h.value=we(X):X===null||re===void 0||x(X)>re?h.value=qo(X,void 0):h.value=qo(X,re)}else h.value=String(X)};T();const Y=X=>{const{value:we}=y;if(X===we){T();return}const{"onUpdate:value":re,onUpdateValue:Re,onChange:Ee}=e,{nTriggerFormInput:ze,nTriggerFormChange:Le}=l;Ee&&ie(Ee,X),Re&&ie(Re,X),re&&ie(re,X),m.value=X,ze(),Le()},I=({offset:X,doUpdateIfValid:we,fixPrecision:re,isInputing:Re})=>{const{value:Ee}=h;if(Re&&fh(Ee))return!1;const ze=(e.parse||ch)(Ee);if(ze===null)return we&&Y(null),null;if(wa(ze)){const Le=x(ze),{precision:Z}=e;if(Z!==void 0&&ZDe){if(!we||Re)return!1;se=De}if(A!==null&&seI({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),J=at(()=>{const{value:X}=y;if(e.validator&&X===null)return!1;const{value:we}=b;return I({offset:-we,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),O=at(()=>{const{value:X}=y;if(e.validator&&X===null)return!1;const{value:we}=b;return I({offset:+we,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function C(X){const{onFocus:we}=e,{nTriggerFormFocus:re}=l;we&&ie(we,X),re()}function B(X){var we,re;if(X.target===((we=c.value)===null||we===void 0?void 0:we.wrapperElRef))return;const Re=I({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(Re!==!1){const Le=(re=c.value)===null||re===void 0?void 0:re.inputElRef;Le&&(Le.value=String(Re||"")),y.value===Re&&T()}else T();const{onBlur:Ee}=e,{nTriggerFormBlur:ze}=l;Ee&&ie(Ee,X),ze(),nn(()=>{T()})}function L(X){const{onClear:we}=e;we&&ie(we,X)}function Q(){const{value:X}=O;if(!X){Te();return}const{value:we}=y;if(we===null)e.validator||Y(te());else{const{value:re}=b;I({offset:re,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function q(){const{value:X}=J;if(!X){Oe();return}const{value:we}=y;if(we===null)e.validator||Y(te());else{const{value:re}=b;I({offset:-re,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}const ee=C,ue=B;function te(){if(e.validator)return null;const{value:X}=R,{value:we}=D;return X!==null?Math.max(0,X):we!==null?Math.min(0,we):0}function V(X){L(X),Y(null)}function _(X){var we,re,Re;!((we=v.value)===null||we===void 0)&&we.$el.contains(X.target)&&X.preventDefault(),!((re=f.value)===null||re===void 0)&&re.$el.contains(X.target)&&X.preventDefault(),(Re=c.value)===null||Re===void 0||Re.activate()}let E=null,U=null,ne=null;function Oe(){ne&&(window.clearTimeout(ne),ne=null),E&&(window.clearInterval(E),E=null)}let he=null;function Te(){he&&(window.clearTimeout(he),he=null),U&&(window.clearInterval(U),U=null)}function j(){Oe(),ne=window.setTimeout(()=>{E=window.setInterval(()=>{q()},Xo)},Go),hn("mouseup",document,Oe,{once:!0})}function be(){Te(),he=window.setTimeout(()=>{U=window.setInterval(()=>{Q()},Xo)},Go),hn("mouseup",document,Te,{once:!0})}const Se=()=>{U||Q()},$e=()=>{E||q()};function Ke(X){var we,re;if(X.key==="Enter"){if(X.target===((we=c.value)===null||we===void 0?void 0:we.wrapperElRef))return;I({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((re=c.value)===null||re===void 0||re.deactivate())}else if(X.key==="ArrowUp"){if(!O.value||e.keyboard.ArrowUp===!1)return;X.preventDefault(),I({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&Q()}else if(X.key==="ArrowDown"){if(!J.value||e.keyboard.ArrowDown===!1)return;X.preventDefault(),I({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&q()}}function lt(X){h.value=X,e.updateValueOnInput&&!e.format&&!e.parse&&e.precision===void 0&&I({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}bt(y,()=>{T()});const ht={focus:()=>{var X;return(X=c.value)===null||X===void 0?void 0:X.focus()},blur:()=>{var X;return(X=c.value)===null||X===void 0?void 0:X.blur()},select:()=>{var X;return(X=c.value)===null||X===void 0?void 0:X.select()}},Qe=gn("InputNumber",n,t);return Object.assign(Object.assign({},ht),{rtlEnabled:Qe,inputInstRef:c,minusButtonInstRef:f,addButtonInstRef:v,mergedClsPrefix:t,mergedBordered:r,uncontrolledValue:m,mergedValue:y,mergedPlaceholder:k,displayedValueInvalid:N,mergedSize:s,mergedDisabled:d,displayedValue:h,addable:O,minusable:J,mergedStatus:u,handleFocus:ee,handleBlur:ue,handleClear:V,handleMouseDown:_,handleAddClick:Se,handleMinusClick:$e,handleAddMousedown:be,handleMinusMousedown:j,handleKeyDown:Ke,handleUpdateDisplayedValue:lt,mergedTheme:a,inputThemeOverrides:{paddingSmall:"0 8px 0 10px",paddingMedium:"0 8px 0 12px",paddingLarge:"0 8px 0 14px"},buttonThemeOverrides:g(()=>{const{self:{iconColorDisabled:X}}=a.value,[we,re,Re,Ee]=Gl(X);return{textColorTextDisabled:`rgb(${we}, ${re}, ${Re})`,opacityDisabled:`${Ee}`}})})},render(){const{mergedClsPrefix:e,$slots:r}=this,t=()=>i(sn,{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:()=>qe(r["minus-icon"],()=>[i(Pt,{clsPrefix:e},{default:()=>i(Os,null)})])}),n=()=>i(sn,{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:()=>qe(r["add-icon"],()=>[i(Pt,{clsPrefix:e},{default:()=>i(ms,null)})])});return i("div",{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},i(Yt,{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"?[t(),er(r.prefix,o=>o?i("span",{class:`${e}-input-number-prefix`},o):null)]:(a=r.prefix)===null||a===void 0?void 0:a.call(r)},suffix:()=>{var a;return this.showButton?[er(r.suffix,o=>o?i("span",{class:`${e}-input-number-suffix`},o):null),this.buttonPlacement==="right"?t():null,n()]:(a=r.suffix)===null||a===void 0?void 0:a.call(r)}}))}});async function vh(){const{data:e}=await Jt("/admin/api/users");return e}async function mh(e){const{data:r}=await Jt(`/admin/api/users/${encodeURIComponent(e)}/reset-password`,{method:"POST"});return r}async function ph(e){await Jt(`/admin/api/users/${encodeURIComponent(e)}/disable`,{method:"POST"})}async function gh(e){await Jt(`/admin/api/users/${encodeURIComponent(e)}/admin`,{method:"POST"})}async function bh(e){await Jt(`/admin/api/users/${encodeURIComponent(e)}/admin`,{method:"DELETE"})}async function yh(){const{data:e}=await Jt("/admin/api/invitations");return e}async function wh(e){const{data:r}=await Jt("/admin/api/invitations",{method:"POST",body:JSON.stringify(e)});return r&&typeof r=="object"&&"invites"in r?r.invites:[r]}async function xh(){const{data:e}=await Jt("/admin/api/config");return e}async function Ch(e){const{data:r}=await Jt("/admin/api/config",{method:"PUT",body:JSON.stringify(e)});return r}async function kh(){const{data:e}=await Jt("/admin/api/feishu");return e}async function Rh(e){const{data:r}=await Jt("/admin/api/feishu",{method:"PUT",body:JSON.stringify(e)});return r}async function Sh(){const{data:e}=await Jt("/admin/api/feishu/generate-key",{method:"POST"});return e.encrypt_key}const Ph={class:"field"},Fh={class:"field-label"},Th={class:"field"},_h={class:"field-label"},Oh={class:"field"},Dh={class:"field-label"},Mh={class:"secret-msg"},zh={class:"secret-display"},Ih={key:0,class:"empty"},$h=ge({__name:"Invitations",setup(e){const r=F([]),t=F(!0),n=F(!1),a=F(""),o=F(1),l=F(null),s=F([]),d=Yr(),{t:u}=gr(),c={"data-testid":"invite-note",autocomplete:"off"},f={"data-testid":"invite-count"},v={"data-testid":"invite-expires"};function m(x){return ci(x)}const p=g(()=>[{title:u("admin.invitationsTab.prefix"),key:"code_prefix",render:x=>i("code",{},x.code_prefix)},{title:u("admin.invitationsTab.note"),key:"note"},{title:u("admin.created"),key:"created_at",render:x=>m(x.created_at)},{title:u("admin.invitationsTab.expires"),key:"expires_at",render:x=>m(x.expires_at)},{title:u("admin.invitationsTab.consumed"),key:"consumed_at",render:x=>x.consumed_at?i("span",{},`${m(x.consumed_at)}${x.consumed_by?" · "+x.consumed_by:""}`):i(Hn,{size:"small",type:"default"},{default:()=>u("admin.invitationsTab.unused")})}]);async function y(){t.value=!0;try{r.value=await yh()}catch(x){x instanceof vn&&d.error(u("admin.invitationsTab.loadFailed"))}finally{t.value=!1}}async function h(x){if(x.preventDefault(),!n.value){n.value=!0;try{const w=Math.max(1,Math.min(50,Math.round(o.value||1))),k=a.value.trim(),b={count:w};k&&(b.note=k),l.value!=null&&(b.expires_at=new Date(l.value).toISOString());const R=await wh(b);s.value=R,a.value="",l.value=null,o.value=1,await y()}catch(w){w instanceof vn&&d.error(u("admin.invitationsTab.createFailed",{code:w.code}))}finally{n.value=!1}}}return Zt(y),(x,w)=>(Dt(),dn(oe(jr),{title:oe(u)("admin.invitations"),bordered:!1},{default:Ue(()=>[pt("form",{onSubmit:h,autocomplete:"off",class:"create-form"},[Ae(oe(Xt),{wrap:!1,align:"end"},{default:Ue(()=>[pt("div",Ph,[pt("label",Fh,st(oe(u)("admin.invitationsTab.note")),1),Ae(oe(Yt),{value:a.value,"onUpdate:value":w[0]||(w[0]=k=>a.value=k),type:"text",placeholder:oe(u)("common.optional"),"input-props":c},null,8,["value","placeholder"])]),pt("div",Th,[pt("label",_h,st(oe(u)("admin.invitationsTab.count")),1),Ae(oe(Ba),{value:o.value,"onUpdate:value":w[1]||(w[1]=k=>o.value=k),min:1,max:50,"input-props":f},null,8,["value"])]),pt("div",Oh,[pt("label",Dh,st(oe(u)("admin.invitationsTab.expires")),1),Ae(oe(lh),{value:l.value,"onUpdate:value":w[2]||(w[2]=k=>l.value=k),type:"datetime",clearable:"",placeholder:oe(u)("common.optional"),"input-props":v},null,8,["value","placeholder"])]),Ae(oe(ft),{type:"primary","attr-type":"submit",loading:n.value,disabled:n.value},{default:Ue(()=>[cr(st(oe(u)("common.create")),1)]),_:1},8,["loading","disabled"])]),_:1})],32),(Dt(!0),jn(mn,null,ui(s.value,(k,b)=>(Dt(),dn(oe(pi),{key:b,type:"success","show-icon":!1,class:"secret-alert"},{default:Ue(()=>[pt("div",Mh,st(oe(u)("admin.invitationsTab.copyNow",{note:k.note?` (${k.note})`:""})),1),pt("code",zh,st(k.plaintext),1)]),_:2},1024))),128)),Ae(oe(dl),{columns:p.value,data:r.value,loading:t.value,size:"small",bordered:!1,pagination:!1},null,8,["columns","data","loading"]),!t.value&&r.value.length===0?(Dt(),jn("p",Ih,st(oe(u)("admin.invitationsTab.empty")),1)):kn("",!0)]),_:1},8,["title"]))}}),Ah=br($h,[["__scopeId","data-v-9794d932"]]),Nh={class:"secret-msg"},Bh={class:"secret-display"},Eh={key:0,class:"form-error",role:"alert"},Vh=ge({__name:"Users",setup(e){const r=F([]),t=F(!0),n=F(""),a=F([]);Yr();const{t:o}=gr();function l(h){return ci(h)}function s(h){if(h instanceof vn){if(h.code==="last_admin")return o("admin.errors.lastAdmin");if(h.code==="cannot_demote_self")return o("admin.errors.cannotDemoteSelf")}return o("admin.errors.actionFailed")}async function d(){t.value=!0,n.value="";try{r.value=await vh()}catch(h){h instanceof vn&&(n.value=o("admin.loadUsersFailed"))}finally{t.value=!1}}async function u(h){n.value="";try{await gh(h),await d()}catch(x){n.value=s(x)}}async function c(h){n.value="";try{await bh(h),await d()}catch(x){n.value=s(x)}}async function f(h,x){n.value="",a.value=[];try{const{plaintext:w}=await mh(h);a.value=[{label:o("admin.temporaryPasswordFor",{email:x}),plaintext:w}],await d()}catch(w){n.value=s(w)}}async function v(h){n.value="";try{await ph(h),await d()}catch(x){n.value=s(x)}}function m(h){return h.disabled_at?i(Hn,{size:"small",type:"error"},{default:()=>o("admin.disabled",{when:l(h.disabled_at)})}):h.is_admin?i(Hn,{size:"small",type:"success"},{default:()=>o("admin.userStatus.admin")}):i(Hn,{size:"small",type:"default"},{default:()=>o("admin.userStatus.active")})}function p(h){if(h.disabled_at)return null;const x=h.is_admin?i(Sr,{onPositiveClick:()=>c(h.id)},{trigger:()=>i(ft,{size:"small","data-testid":`demote-${h.id}`},{default:()=>o("admin.demote")}),default:()=>o("admin.demoteConfirm")}):i(Sr,{onPositiveClick:()=>u(h.id)},{trigger:()=>i(ft,{size:"small","data-testid":`promote-${h.id}`},{default:()=>o("admin.promote")}),default:()=>o("admin.promoteConfirm")}),w=i(Sr,{onPositiveClick:()=>f(h.id,h.email)},{trigger:()=>i(ft,{size:"small","data-testid":`reset-${h.id}`},{default:()=>o("admin.resetPassword")}),default:()=>o("admin.resetPasswordConfirm")}),k=i(Sr,{onPositiveClick:()=>v(h.id)},{trigger:()=>i(ft,{size:"small",type:"error","data-testid":`disable-${h.id}`},{default:()=>o("admin.disable")}),default:()=>o("admin.disableConfirm")});return i(Xt,{},{default:()=>[x,w,k]})}const y=g(()=>[{title:o("admin.email"),key:"email"},{title:o("admin.id"),key:"id",render:h=>i("code",{},h.id)},{title:o("admin.created"),key:"created_at",render:h=>l(h.created_at)},{title:o("admin.status"),key:"status",render:m},{title:o("admin.actions"),key:"actions",render:p}]);return Zt(d),(h,x)=>(Dt(),dn(oe(jr),{title:oe(o)("admin.users"),bordered:!1},{default:Ue(()=>[(Dt(!0),jn(mn,null,ui(a.value,(w,k)=>(Dt(),dn(oe(pi),{key:k,type:"success","show-icon":!1,class:"secret-alert"},{default:Ue(()=>[pt("div",Nh,st(oe(o)("admin.secretCopyOnce",{label:w.label})),1),pt("code",Bh,st(w.plaintext),1)]),_:2},1024))),128)),Ae(oe(dl),{columns:y.value,data:r.value,loading:t.value,size:"small",bordered:!1,pagination:!1},null,8,["columns","data","loading"]),n.value?(Dt(),jn("p",Eh,st(n.value),1)):kn("",!0)]),_:1},8,["title"]))}}),Lh=br(Vh,[["__scopeId","data-v-e0bdfd90"]]),Hh={class:"hint"},Uh={class:"muted"},jh={class:"muted"},Yh={class:"muted"},Kh={class:"warn"},Wh={class:"muted"},qh={class:"muted version"},Gh={key:1,class:"form-error",role:"alert"},Xh=ge({__name:"Config",setup(e){const r=F(null),t=F(0),n=F(0),a=F(!1),o=F(!1),l=F(""),s=F(!0),d=F(!1),u=F(""),c=Yr(),{t:f}=gr();function v(b){return b.split(` +`).map(R=>R.trim()).filter(Boolean)}function m(b,R){return b<0?f("admin.config.effectiveDisabled"):b===0?f("admin.config.effective",{value:R}):f("admin.config.effective",{value:b})}const p=g(()=>r.value?m(t.value,r.value.default_rate_limit_per_minute):""),y=g(()=>r.value?m(n.value,r.value.default_max_connections_per_key):"");async function h(){s.value=!0,u.value="";try{const b=await xh();r.value=b,t.value=b.rate_limit_per_minute,n.value=b.max_connections_per_key,a.value=b.debug,o.value=b.debug_payload,l.value=(b.allowed_origins??[]).join(` +`)}catch(b){b instanceof vn&&(u.value=f("admin.config.loadFailed"))}finally{s.value=!1}}async function x(){if(!(!r.value||d.value)){u.value="",d.value=!0;try{const b=await Ch({rate_limit_per_minute:Math.round(t.value),max_connections_per_key:Math.round(n.value),debug:a.value,debug_payload:o.value,allowed_origins:v(l.value)});r.value=b,t.value=b.rate_limit_per_minute,n.value=b.max_connections_per_key,a.value=b.debug,o.value=b.debug_payload,l.value=(b.allowed_origins??[]).join(` +`),c.success(f("setup.saved"))}catch(b){b instanceof vn&&(u.value=f("admin.config.saveFailed"))}finally{d.value=!1}}}const w={"data-testid":"cfg-rate"},k={"data-testid":"cfg-conn"};return Zt(h),(b,R)=>(Dt(),dn(oe(jr),{title:oe(f)("admin.config.runtimeLimits"),bordered:!1},{default:Ue(()=>[pt("p",Hh,st(oe(f)("admin.config.hint")),1),r.value?(Dt(),dn(oe(fi),{key:0,"label-placement":"top","require-mark-placement":"right-hanging"},{default:Ue(()=>[Ae(oe(xn),{label:oe(f)("admin.config.rateLimit"),"show-feedback":!1},{default:Ue(()=>[Ae(oe(Xt),{wrap:!1,align:"center"},{default:Ue(()=>[Ae(oe(Ba),{value:t.value,"onUpdate:value":R[0]||(R[0]=D=>t.value=D),"show-button":!1,"input-props":w},null,8,["value"]),pt("span",Uh,st(p.value),1)]),_:1})]),_:1},8,["label"]),Ae(oe(xn),{label:oe(f)("admin.config.maxConnections"),"show-feedback":!1},{default:Ue(()=>[Ae(oe(Xt),{wrap:!1,align:"center"},{default:Ue(()=>[Ae(oe(Ba),{value:n.value,"onUpdate:value":R[1]||(R[1]=D=>n.value=D),"show-button":!1,"input-props":k},null,8,["value"]),pt("span",jh,st(y.value),1)]),_:1})]),_:1},8,["label"]),Ae(oe(xn),{label:oe(f)("admin.config.debug"),"show-feedback":!1},{default:Ue(()=>[Ae(oe(Xt),{align:"center",size:8},{default:Ue(()=>[Ae(oe(zr),{value:a.value,"onUpdate:value":R[2]||(R[2]=D=>a.value=D),"data-testid":"cfg-debug"},null,8,["value"]),pt("span",Yh,st(oe(f)("admin.config.debugHint")),1)]),_:1})]),_:1},8,["label"]),Ae(oe(xn),{label:oe(f)("admin.config.debugPayload"),"show-feedback":!1},{default:Ue(()=>[Ae(oe(Xt),{align:"center",size:8},{default:Ue(()=>[Ae(oe(zr),{value:o.value,"onUpdate:value":R[3]||(R[3]=D=>o.value=D),"data-testid":"cfg-debug-payload"},null,8,["value"]),pt("span",Kh,st(oe(f)("admin.config.debugPayloadWarn")),1)]),_:1})]),_:1},8,["label"]),Ae(oe(xn),{label:oe(f)("admin.config.allowedOrigins"),"show-feedback":!1},{default:Ue(()=>[Ae(oe(Xt),{vertical:"",size:4,style:{width:"100%"}},{default:Ue(()=>[Ae(oe(Yt),{value:l.value,"onUpdate:value":R[4]||(R[4]=D=>l.value=D),type:"textarea",placeholder:oe(f)("admin.config.allowedOriginsPlaceholder"),autosize:{minRows:3,maxRows:10},"input-props":{"data-testid":"cfg-origins"}},null,8,["value","placeholder"]),pt("span",Wh,st(oe(f)("admin.config.allowedOriginsHint")),1)]),_:1})]),_:1},8,["label"]),Ae(oe(Xt),{class:"actions",align:"center"},{default:Ue(()=>[Ae(oe(ft),{type:"primary",loading:d.value,disabled:d.value,"data-testid":"cfg-save",onClick:x},{default:Ue(()=>[cr(st(oe(f)("common.save")),1)]),_:1},8,["loading","disabled"]),pt("span",qh,[cr(st(oe(f)("common.version"))+": ",1),pt("code",null,st(r.value.version),1)])]),_:1})]),_:1})):kn("",!0),u.value?(Dt(),jn("p",Gh,st(u.value),1)):kn("",!0)]),_:1},8,["title"]))}}),Qh=br(Xh,[["__scopeId","data-v-7aad855f"]]),Zh={class:"hint"},Jh={key:0,class:"warn"},ev={class:"muted"},tv={class:"muted"},nv={key:1,class:"form-error",role:"alert"},rv=ge({__name:"FeishuConfig",setup(e){const r=F(null),t=F(!1),n=F(""),a=F(""),o=F(!1),l=F(!0),s=F(!1),d=F(""),u=Yr(),{t:c}=gr();async function f(){l.value=!0,d.value="";try{const y=await kh();v(y)}catch(y){y instanceof vn&&(d.value=c("admin.feishuConfig.loadFailed"))}finally{l.value=!1}}function v(y){r.value=y,t.value=y.enabled,n.value=y.base_url,a.value="",o.value=!1}async function m(){d.value="";try{a.value=await Sh(),u.info(c("admin.feishuConfig.keyGenerated"))}catch(y){y instanceof vn&&(d.value=c("admin.feishuConfig.saveFailed"))}}async function p(){if(!s.value){d.value="",s.value=!0;try{const y={enabled:t.value},h=a.value.trim();h&&(y.encrypt_key=h);const x=n.value.trim();x&&(y.base_url=x),o.value&&(y.force=!0);const w=await Rh(y);v(w),u.success(c("setup.saved"))}catch(y){y instanceof vn&&(d.value=y.status===409?c("admin.feishuConfig.rotateConflict"):c("admin.feishuConfig.saveFailed"))}finally{s.value=!1}}}return Zt(f),(y,h)=>(Dt(),dn(oe(jr),{title:oe(c)("admin.feishuConfig.title"),bordered:!1},{default:Ue(()=>[pt("p",Zh,st(oe(c)("admin.feishuConfig.description")),1),r.value?(Dt(),dn(oe(fi),{key:0,"label-placement":"top"},{default:Ue(()=>[Ae(oe(xn),{label:oe(c)("admin.feishuConfig.enabled"),"show-feedback":!1},{default:Ue(()=>[Ae(oe(zr),{value:t.value,"onUpdate:value":h[0]||(h[0]=x=>t.value=x),"data-testid":"feishu-enabled"},null,8,["value"])]),_:1},8,["label"]),Ae(oe(xn),{label:oe(c)("admin.feishuConfig.encryptKey"),"show-feedback":!1},{default:Ue(()=>[Ae(oe(Xt),{vertical:"",size:6,style:{width:"100%"}},{default:Ue(()=>[Ae(oe(Xt),{wrap:!1,align:"center",style:{width:"100%"}},{default:Ue(()=>[Ae(oe(Yt),{value:a.value,"onUpdate:value":h[1]||(h[1]=x=>a.value=x),type:"password","show-password-on":"click",placeholder:r.value.key_set?oe(c)("admin.feishuConfig.keyKeepPlaceholder",{last4:r.value.key_last4??""}):oe(c)("admin.feishuConfig.keyEmptyPlaceholder"),"data-testid":"feishu-key"},null,8,["value","placeholder"]),Ae(oe(ft),{tertiary:"","data-testid":"feishu-generate",onClick:m},{default:Ue(()=>[cr(st(oe(c)("admin.feishuConfig.generate")),1)]),_:1})]),_:1}),a.value?(Dt(),jn("span",Jh,st(oe(c)("admin.feishuConfig.keyCopyOnce")),1)):kn("",!0),a.value&&r.value.key_set?(Dt(),dn(oe(Xt),{key:1,align:"center",size:8},{default:Ue(()=>[Ae(oe(zr),{value:o.value,"onUpdate:value":h[2]||(h[2]=x=>o.value=x),size:"small","data-testid":"feishu-force"},null,8,["value"]),pt("span",ev,st(oe(c)("admin.feishuConfig.forceRotate")),1)]),_:1})):kn("",!0)]),_:1})]),_:1},8,["label"]),Ae(oe(xn),{label:oe(c)("admin.feishuConfig.baseUrl"),"show-feedback":!1},{default:Ue(()=>[Ae(oe(Yt),{value:n.value,"onUpdate:value":h[3]||(h[3]=x=>n.value=x),placeholder:"https://open.feishu.cn","data-testid":"feishu-base"},null,8,["value"])]),_:1},8,["label"]),Ae(oe(Xt),{class:"actions",align:"center"},{default:Ue(()=>[Ae(oe(ft),{type:"primary",loading:s.value,disabled:s.value,"data-testid":"feishu-save",onClick:p},{default:Ue(()=>[cr(st(oe(c)("common.save")),1)]),_:1},8,["loading","disabled"]),pt("span",tv,st(r.value.running?oe(c)("admin.feishuConfig.statusRunning"):oe(c)("admin.feishuConfig.statusStopped")),1)]),_:1})]),_:1})):kn("",!0),d.value?(Dt(),jn("p",nv,st(d.value),1)):kn("",!0)]),_:1},8,["title"]))}}),av=br(rv,[["__scopeId","data-v-040f66db"]]),ov={class:"admin-page"},iv=ge({__name:"App",setup(e){const r=["invitations","users","config","feishu"];function t(){const d=location.hash.replace(/^#/,"");return r.includes(d)?d:"invitations"}const n=F(t()),{t:a}=gr();function o(){n.value=t()}Zt(()=>window.addEventListener("hashchange",o)),di(()=>window.removeEventListener("hashchange",o));function l(d){r.includes(d)&&location.hash.replace(/^#/,"")!==d&&(location.hash="#"+d)}const s=Xl();return(d,u)=>(Dt(),dn(oe(Jl),{theme:oe(Zl),"theme-overrides":oe(s),locale:oe(oo).locale,"date-locale":oe(oo).dateLocale},{default:Ue(()=>[Ae(oe(Ql),null,{default:Ue(()=>[Ae(rs,{active:"admin"}),pt("main",ov,[Ae(oe(ps),{value:n.value,type:"line",animated:"","onUpdate:value":l},{default:Ue(()=>[Ae(oe(Pr),{name:"invitations",tab:oe(a)("admin.invitations")},{default:Ue(()=>[Ae(Ah)]),_:1},8,["tab"]),Ae(oe(Pr),{name:"users",tab:oe(a)("admin.users")},{default:Ue(()=>[Ae(Lh)]),_:1},8,["tab"]),Ae(oe(Pr),{name:"config",tab:oe(a)("admin.configTab")},{default:Ue(()=>[Ae(Qh)]),_:1},8,["tab"]),Ae(oe(Pr),{name:"feishu",tab:oe(a)("admin.feishuTab")},{default:Ue(()=>[Ae(av)]),_:1},8,["tab"])]),_:1},8,["value"])])]),_:1})]),_:1},8,["theme","theme-overrides","locale","date-locale"]))}}),lv=br(iv,[["__scopeId","data-v-66a48cc2"]]);es("admin")||(ts(),ns(lv).mount("#app")); diff --git a/internal/relay/web-dist/assets/client-Bd6vJHn4.js b/internal/relay/web-dist/assets/client-BRiQMdFT.js similarity index 95% rename from internal/relay/web-dist/assets/client-Bd6vJHn4.js rename to internal/relay/web-dist/assets/client-BRiQMdFT.js index ad709584..7ee69a0a 100644 --- a/internal/relay/web-dist/assets/client-Bd6vJHn4.js +++ b/internal/relay/web-dist/assets/client-BRiQMdFT.js @@ -1 +1 @@ -import{b3 as d,K as f}from"./mobile-guard-CHHXRZ12.js";function m(o){if(!o||!o.startsWith("/")||o.startsWith("//")||o.startsWith("/\\")||typeof location>"u")return"/";try{const t=new URL(o,location.origin);return t.origin!==location.origin?"/":t.pathname+t.search+t.hash}catch{return"/"}}class l extends Error{constructor(t,a,s){super(`api error ${t} ${a}`),this.status=t,this.code=a,this.response=s,this.name="ApiError"}}async function C(o,t={}){const a=(t.method||"GET").toUpperCase(),s=new Headers(t.headers),n=d();n!=null&&n.sessionToken&&s.set("Authorization",`Bearer ${n.sessionToken}`),!s.has("Content-Type")&&t.body!==void 0&&a!=="GET"&&a!=="HEAD"&&s.set("Content-Type","application/json");const p=((n==null?void 0:n.baseURL)??"").replace(/\/$/,"")+o;let e;try{e=await fetch(p,{...t,headers:s,credentials:"omit"})}catch{throw new l(0,"network_error",null)}if(e.status===401&&(f(),typeof location<"u"&&!(location.pathname==="/login.html"||location.pathname==="/signup.html"))){const h=m(location.pathname+location.search+location.hash);location.assign("/login.html?next="+encodeURIComponent(h))}if(!e.ok){let i="http_error";if((e.headers.get("Content-Type")||"").includes("application/json"))try{const c=await e.clone().json();c&&typeof c.error=="string"&&(i=c.error)}catch{}throw new l(e.status,i,e)}const u=e.headers.get("Content-Type")||"";let r;return u.includes("application/json")?r=await e.json():r=void 0,{data:r,status:e.status,headers:e.headers}}export{l as A,C as a,m as s}; +import{b3 as d,K as f}from"./mobile-guard-BvFpjCXb.js";function m(o){if(!o||!o.startsWith("/")||o.startsWith("//")||o.startsWith("/\\")||typeof location>"u")return"/";try{const t=new URL(o,location.origin);return t.origin!==location.origin?"/":t.pathname+t.search+t.hash}catch{return"/"}}class l extends Error{constructor(t,a,s){super(`api error ${t} ${a}`),this.status=t,this.code=a,this.response=s,this.name="ApiError"}}async function C(o,t={}){const a=(t.method||"GET").toUpperCase(),s=new Headers(t.headers),n=d();n!=null&&n.sessionToken&&s.set("Authorization",`Bearer ${n.sessionToken}`),!s.has("Content-Type")&&t.body!==void 0&&a!=="GET"&&a!=="HEAD"&&s.set("Content-Type","application/json");const p=((n==null?void 0:n.baseURL)??"").replace(/\/$/,"")+o;let e;try{e=await fetch(p,{...t,headers:s,credentials:"omit"})}catch{throw new l(0,"network_error",null)}if(e.status===401&&(f(),typeof location<"u"&&!(location.pathname==="/login.html"||location.pathname==="/signup.html"))){const h=m(location.pathname+location.search+location.hash);location.assign("/login.html?next="+encodeURIComponent(h))}if(!e.ok){let i="http_error";if((e.headers.get("Content-Type")||"").includes("application/json"))try{const c=await e.clone().json();c&&typeof c.error=="string"&&(i=c.error)}catch{}throw new l(e.status,i,e)}const u=e.headers.get("Content-Type")||"";let r;return u.includes("application/json")?r=await e.json():r=void 0,{data:r,status:e.status,headers:e.headers}}export{l as A,C as a,m as s}; diff --git a/internal/relay/web-dist/assets/firstrun-Cty8GPtT.js b/internal/relay/web-dist/assets/firstrun-Blv5VNhr.js similarity index 92% rename from internal/relay/web-dist/assets/firstrun-Cty8GPtT.js rename to internal/relay/web-dist/assets/firstrun-Blv5VNhr.js index 42d0ddcb..145d34e7 100644 --- a/internal/relay/web-dist/assets/firstrun-Cty8GPtT.js +++ b/internal/relay/web-dist/assets/firstrun-Blv5VNhr.js @@ -1 +1 @@ -import{ai as q,bs as n,$ as x,bf as I,aA as S,bh as f,a3 as y,c7 as l,ac as r,bS as e,h as C,a2 as o,bN as u,B as E,aa as v,a5 as M,a4 as k,b6 as N,ae as P,e as T,bV as U,n as D,o as F,aG as G,a1 as H}from"./mobile-guard-CHHXRZ12.js";import{A as O}from"./client-Bd6vJHn4.js";import{a as R,g as W,f as $,r as j}from"./pwa-DV81pmUS.js";import{L as z}from"./LanguageSelect-DQdfalDe.js";import{a as J,b as K,c as _,d as b}from"./FormItem-KX1KLzyv.js";const Q={class:"auth-page"},X={class:"auth-title"},Y={class:"auth-subtitle"},Z={class:"auth-hint"},ee={key:0,class:"auth-error",role:"alert"},ae={class:"auth-alt"},te={href:"/login.html"},se={class:"auth-version"},re=q({__name:"App",setup(oe){const m=n(""),p=n(""),h=n(""),d=n(!1),i=n(""),g=n(!1),w=n("dev"),{t:a}=U(),A=x(()=>R(w.value,a));I(async()=>{try{const{admin_exists:t}=await W();if(t){location.replace("/login.html");return}}catch{}g.value=!0,w.value=await $()});function B(t){if(t instanceof O){if(t.code==="email_taken")return a("auth.errors.emailTaken");if(t.code==="password_weak")return a("auth.errors.passwordWeak");if(t.code==="invalid_email")return a("auth.errors.invalidEmail");if(t.code==="rate_limited")return a("auth.errors.rateLimitedShort");if(t.code==="invalid_request")return a("auth.errors.invalidRequest")}return a("auth.setup.failed")}async function L(t){if(t.preventDefault(),!d.value){if(i.value="",p.value!==h.value){i.value=a("auth.setup.passwordMismatch");return}d.value=!0;try{(await j(m.value.trim(),p.value)).is_admin?location.assign("/"):i.value=a("auth.setup.notAdmin")}catch(s){i.value=B(s)}finally{d.value=!1}}}const V=S();return(t,s)=>(f(),y(e(T),{theme:e(P),"theme-overrides":e(V),locale:e(N).locale,"date-locale":e(N).dateLocale},{default:l(()=>[r(e(C),null,{default:l(()=>[o("main",Q,[r(z,{class:"auth-language"}),g.value?(f(),y(e(J),{key:0,class:"auth-card",bordered:!1},{default:l(()=>[o("header",X,[o("h1",null,u(e(a)("common.appName")),1),o("p",Y,u(e(a)("auth.setup.title")),1)]),o("p",Z,u(e(a)("auth.setup.hint")),1),r(e(K),{"label-placement":"top","require-mark-placement":"right-hanging",autocomplete:"on",novalidate:"",onSubmit:L},{default:l(()=>[r(e(_),{label:e(a)("auth.email"),"show-feedback":!1},{default:l(()=>[r(e(b),{value:m.value,"onUpdate:value":s[0]||(s[0]=c=>m.value=c),type:"text",placeholder:e(a)("auth.setup.emailPlaceholder"),"input-props":{type:"email",required:!0,autocomplete:"username"}},null,8,["value","placeholder"])]),_:1},8,["label"]),r(e(_),{label:e(a)("auth.password"),"show-feedback":!1},{default:l(()=>[r(e(b),{value:p.value,"onUpdate:value":s[1]||(s[1]=c=>p.value=c),type:"password","show-password-on":"click","input-props":{required:!0,autocomplete:"new-password",minlength:12}},null,8,["value"])]),_:1},8,["label"]),r(e(_),{label:e(a)("auth.setup.confirmPassword"),"show-feedback":!1},{default:l(()=>[r(e(b),{value:h.value,"onUpdate:value":s[2]||(s[2]=c=>h.value=c),type:"password","show-password-on":"click","input-props":{required:!0,autocomplete:"new-password",minlength:12}},null,8,["value"])]),_:1},8,["label"]),r(e(E),{class:"submit-btn",type:"primary","attr-type":"submit",loading:d.value,disabled:d.value,block:""},{default:l(()=>[v(u(e(a)("auth.setup.createAdmin")),1)]),_:1},8,["loading","disabled"]),i.value?(f(),M("p",ee,u(i.value),1)):k("",!0),o("p",ae,[v(u(e(a)("auth.alreadyHaveAccount"))+" ",1),o("a",te,u(e(a)("auth.signIn")),1),s[3]||(s[3]=v(". "))])]),_:1})]),_:1})):k("",!0),o("p",se,u(A.value),1)])]),_:1})]),_:1},8,["theme","theme-overrides","locale","date-locale"]))}}),le=D(re,[["__scopeId","data-v-687faf31"]]);F("firstrun")||(G(),H(le).mount("#app")); +import{ai as q,bs as n,$ as x,bf as I,aA as S,bh as f,a3 as y,c7 as l,ac as r,bS as e,h as C,a2 as o,bN as u,B as E,aa as v,a5 as M,a4 as k,b6 as N,ae as P,e as T,bV as U,n as D,o as F,aG as G,a1 as H}from"./mobile-guard-BvFpjCXb.js";import{A as O}from"./client-BRiQMdFT.js";import{a as R,g as W,f as $,r as j}from"./pwa-BRtGQKIK.js";import{L as z}from"./LanguageSelect-CXI-71aS.js";import{a as J,b as K,c as _,d as b}from"./FormItem-Biv8w1Bg.js";const Q={class:"auth-page"},X={class:"auth-title"},Y={class:"auth-subtitle"},Z={class:"auth-hint"},ee={key:0,class:"auth-error",role:"alert"},ae={class:"auth-alt"},te={href:"/login.html"},se={class:"auth-version"},re=q({__name:"App",setup(oe){const m=n(""),p=n(""),h=n(""),d=n(!1),i=n(""),g=n(!1),w=n("dev"),{t:a}=U(),A=x(()=>R(w.value,a));I(async()=>{try{const{admin_exists:t}=await W();if(t){location.replace("/login.html");return}}catch{}g.value=!0,w.value=await $()});function B(t){if(t instanceof O){if(t.code==="email_taken")return a("auth.errors.emailTaken");if(t.code==="password_weak")return a("auth.errors.passwordWeak");if(t.code==="invalid_email")return a("auth.errors.invalidEmail");if(t.code==="rate_limited")return a("auth.errors.rateLimitedShort");if(t.code==="invalid_request")return a("auth.errors.invalidRequest")}return a("auth.setup.failed")}async function L(t){if(t.preventDefault(),!d.value){if(i.value="",p.value!==h.value){i.value=a("auth.setup.passwordMismatch");return}d.value=!0;try{(await j(m.value.trim(),p.value)).is_admin?location.assign("/"):i.value=a("auth.setup.notAdmin")}catch(s){i.value=B(s)}finally{d.value=!1}}}const V=S();return(t,s)=>(f(),y(e(T),{theme:e(P),"theme-overrides":e(V),locale:e(N).locale,"date-locale":e(N).dateLocale},{default:l(()=>[r(e(C),null,{default:l(()=>[o("main",Q,[r(z,{class:"auth-language"}),g.value?(f(),y(e(J),{key:0,class:"auth-card",bordered:!1},{default:l(()=>[o("header",X,[o("h1",null,u(e(a)("common.appName")),1),o("p",Y,u(e(a)("auth.setup.title")),1)]),o("p",Z,u(e(a)("auth.setup.hint")),1),r(e(K),{"label-placement":"top","require-mark-placement":"right-hanging",autocomplete:"on",novalidate:"",onSubmit:L},{default:l(()=>[r(e(_),{label:e(a)("auth.email"),"show-feedback":!1},{default:l(()=>[r(e(b),{value:m.value,"onUpdate:value":s[0]||(s[0]=c=>m.value=c),type:"text",placeholder:e(a)("auth.setup.emailPlaceholder"),"input-props":{type:"email",required:!0,autocomplete:"username"}},null,8,["value","placeholder"])]),_:1},8,["label"]),r(e(_),{label:e(a)("auth.password"),"show-feedback":!1},{default:l(()=>[r(e(b),{value:p.value,"onUpdate:value":s[1]||(s[1]=c=>p.value=c),type:"password","show-password-on":"click","input-props":{required:!0,autocomplete:"new-password",minlength:12}},null,8,["value"])]),_:1},8,["label"]),r(e(_),{label:e(a)("auth.setup.confirmPassword"),"show-feedback":!1},{default:l(()=>[r(e(b),{value:h.value,"onUpdate:value":s[2]||(s[2]=c=>h.value=c),type:"password","show-password-on":"click","input-props":{required:!0,autocomplete:"new-password",minlength:12}},null,8,["value"])]),_:1},8,["label"]),r(e(E),{class:"submit-btn",type:"primary","attr-type":"submit",loading:d.value,disabled:d.value,block:""},{default:l(()=>[v(u(e(a)("auth.setup.createAdmin")),1)]),_:1},8,["loading","disabled"]),i.value?(f(),M("p",ee,u(i.value),1)):k("",!0),o("p",ae,[v(u(e(a)("auth.alreadyHaveAccount"))+" ",1),o("a",te,u(e(a)("auth.signIn")),1),s[3]||(s[3]=v(". "))])]),_:1})]),_:1})):k("",!0),o("p",se,u(A.value),1)])]),_:1})]),_:1},8,["theme","theme-overrides","locale","date-locale"]))}}),le=D(re,[["__scopeId","data-v-687faf31"]]);F("firstrun")||(G(),H(le).mount("#app")); diff --git a/internal/relay/web-dist/assets/index-ngF1pcJG.js b/internal/relay/web-dist/assets/index-LmLtimRI.js similarity index 99% rename from internal/relay/web-dist/assets/index-ngF1pcJG.js rename to internal/relay/web-dist/assets/index-LmLtimRI.js index 8bebe47c..36bb7079 100644 --- a/internal/relay/web-dist/assets/index-ngF1pcJG.js +++ b/internal/relay/web-dist/assets/index-LmLtimRI.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/prefsSync-C6s4W7Ql.js","assets/client-Bd6vJHn4.js","assets/mobile-guard-CHHXRZ12.js","assets/mobile-guard-CMCsLwt1.css"])))=>i.map(i=>d[i]); -var pt=Object.defineProperty;var gt=(T,D,A)=>D in T?pt(T,D,{enumerable:!0,configurable:!0,writable:!0,value:A}):T[D]=A;var Q=(T,D,A)=>gt(T,typeof D!="symbol"?D+"":D,A);import{ai as _e,bs as ne,$ as he,bf as ke,bg as it,bh as X,a5 as ee,a2 as j,bN as K,bS as Y,ac as ue,c7 as Se,aa as be,B as rt,a4 as re,F as Ce,bu as Ee,a3 as me,b9 as nt,bV as Le,b3 as Ve,n as fe,aU as mt,_ as St,bd as Ge,c5 as ze,a9 as bt,c9 as qe,c8 as Ct,c1 as yt,b8 as wt,aA as Et,h as kt,b6 as Xe,ae as Lt,e as Dt,o as Rt,aG as At,a1 as xt}from"./mobile-guard-CHHXRZ12.js";import{N as Bt,T as Tt}from"./Topbar-qQtT5o6t.js";import{a as Mt,A as ot}from"./client-Bd6vJHn4.js";import{l as Ke,j as It,h as Ot,i as Pt,e as Ht}from"./pwa-DV81pmUS.js";import{N as at}from"./Alert-CTGJYwHC.js";import{PrefsSyncEngine as Ft,localStorageAdapter as $t,apiRelayClient as Ut,setSharedPrefsSync as Nt}from"./prefsSync-C6s4W7Ql.js";async function Wt(){const{data:T}=await Mt("/api/sessions");return jt(T)}function jt(T){const D=Ke();return D?T.map(A=>zt(A,D)):T}function zt(T,D){if(!T.sealed)return T;let A;try{A=qt(T.sealed)}catch{return T}const M=It(A,D,T.id);if(!M)return T;const F={...T};return M.title!==void 0&&(F.title=M.title),M.cwd!==void 0&&(F.cwd=M.cwd),M.command!==void 0&&(F.command=M.command),M.current_command!==void 0&&(F.current_command=M.current_command),F}function qt(T){const D=atob(T),A=new Uint8Array(D.length);for(let M=0;M{const s=`${location.pathname||"/"}${location.search||""}${location.hash||""}`;return`/login.html?next=${encodeURIComponent(s||"/")}`});async function n(){if(h()){B.value=!0,M.value=[],U.value="",F.value=!1;return}B.value=!1;try{M.value=await Wt(),U.value=""}catch(s){s instanceof ot&&(U.value=r("main.errors.loadSessions"))}finally{F.value=!1}}const d=he(()=>{const s=new Map;for(const t of M.value){const i=t.host_id||t.host||"",l=s.get(i);l?l.sessions.push(t):s.set(i,{hostId:t.host_id,hostname:t.host||r("main.unknownHost"),sessions:[t]})}return Array.from(s.values())});function _(s){return s.slice(0,8)}function v(s){A("navigate",s)}function u(s){return r(s===1?"main.sessionCountOne":"main.sessionCount",{count:s})}function e(s){return Vt(s.type)}return ke(async()=>{await n(),o=setInterval(n,cs)}),it(()=>{o!==null&&clearInterval(o),o=null}),(s,t)=>(X(),ee("section",Gt,[j("div",Xt,[j("h1",null,K(Y(r)("main.activeSessions")),1),ue(Y(rt),{size:"small",tertiary:"",onClick:n},{default:Se(()=>[be(K(Y(r)("main.refresh")),1)]),_:1})]),!F.value&&!B.value&&M.value.length===0?(X(),ee("p",Jt,[be(K(Y(r)("main.empty"))+" ",1),t[0]||(t[0]=j("code",null,"atterm-agent",-1)),t[1]||(t[1]=be(". "))])):re("",!0),!F.value&&B.value?(X(),ee("div",Yt,[j("h2",null,K(Y(r)("main.unlock.title")),1),j("p",null,K(Y(r)("main.unlock.text")),1),j("a",{class:"unlock-link","data-testid":"unlock-account-key",href:f.value},K(Y(r)("main.unlock.action")),9,Zt)])):re("",!0),B.value?re("",!0):(X(!0),ee(Ce,{key:2},Ee(d.value,i=>(X(),ee("div",{key:i.hostId||i.hostname,class:"host-group"},[j("header",null,[j("span",Qt,K(i.hostname),1),i.hostId?(X(),me(Y(Bt),{key:0,size:"small",type:"default"},{default:Se(()=>[j("code",null,K(_(i.hostId)),1)]),_:2},1024)):re("",!0),j("span",es,K(u(i.sessions.length)),1)]),j("div",ts,[(X(!0),ee(Ce,null,Ee(i.sessions,l=>{var c,p;return X(),ee("button",{key:l.id,type:"button",class:"card","data-testid":`session-card-${l.id}`,onClick:m=>v(l.id)},[j("div",is,[e(l)?(X(),ee("span",{key:0,class:"type-chip",style:nt({"--chip":e(l).color})},K(Y(r)(`main.taskTypes.${e(l).key}`)),5)):re("",!0),be(" "+K(l.type==="ai"&&l.title?l.title:l.command||Y(r)("main.unknownCommand")),1)]),j("div",rs,[j("span",ns,[j("code",null,K(_(l.id)),1)]),j("span",os,K(l.cols)+"×"+K(l.rows),1),j("span",as,K(l.cwd),1)]),l.task_state==="failed"&&((p=(c=l.summary)==null?void 0:c.error_lines)!=null&&p.length)?(X(),ee("span",{key:0,class:"err-line","data-testid":`task-err-${l.id}`},K(l.summary.error_lines[0]),9,ls)):re("",!0)],8,ss)}),128))])]))),128)),U.value?(X(),ee("p",hs,K(U.value),1)):re("",!0)]))}}),us=fe(ds,[["__scopeId","data-v-cc46a124"]]);var lt={exports:{}};(function(T,D){(function(A,M){T.exports=M()})(self,()=>(()=>{var A={4567:function(B,r,o){var h=this&&this.__decorate||function(i,l,c,p){var m,a=arguments.length,g=a<3?l:p===null?p=Object.getOwnPropertyDescriptor(l,c):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(i,l,c,p);else for(var C=i.length-1;C>=0;C--)(m=i[C])&&(g=(a<3?m(g):a>3?m(l,c,g):m(l,c))||g);return a>3&&g&&Object.defineProperty(l,c,g),g},f=this&&this.__param||function(i,l){return function(c,p){l(c,p,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(6114),_=o(9924),v=o(844),u=o(5596),e=o(4725),s=o(3656);let t=r.AccessibilityManager=class extends v.Disposable{constructor(i,l){super(),this._terminal=i,this._renderService=l,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let c=0;cthis._handleBoundaryFocus(c,0),this._bottomBoundaryFocusListener=c=>this._handleBoundaryFocus(c,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new _.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(c=>this._handleResize(c.rows))),this.register(this._terminal.onRender(c=>this._refreshRows(c.start,c.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(c=>this._handleChar(c))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/prefsSync-BGOlzhJD.js","assets/client-BRiQMdFT.js","assets/mobile-guard-BvFpjCXb.js","assets/mobile-guard-CMCsLwt1.css"])))=>i.map(i=>d[i]); +var pt=Object.defineProperty;var gt=(T,D,A)=>D in T?pt(T,D,{enumerable:!0,configurable:!0,writable:!0,value:A}):T[D]=A;var Q=(T,D,A)=>gt(T,typeof D!="symbol"?D+"":D,A);import{ai as _e,bs as ne,$ as he,bf as ke,bg as it,bh as X,a5 as ee,a2 as j,bN as K,bS as Y,ac as ue,c7 as Se,aa as be,B as rt,a4 as re,F as Ce,bu as Ee,a3 as me,b9 as nt,bV as Le,b3 as Ve,n as fe,aU as mt,_ as St,bd as Ge,c5 as ze,a9 as bt,c9 as qe,c8 as Ct,c1 as yt,b8 as wt,aA as Et,h as kt,b6 as Xe,ae as Lt,e as Dt,o as Rt,aG as At,a1 as xt}from"./mobile-guard-BvFpjCXb.js";import{N as Bt,T as Tt}from"./Topbar-Cz_j_mBL.js";import{a as Mt,A as ot}from"./client-BRiQMdFT.js";import{l as Ke,j as It,h as Ot,i as Pt,e as Ht}from"./pwa-BRtGQKIK.js";import{N as at}from"./Alert-Dj-XqAz8.js";import{PrefsSyncEngine as Ft,localStorageAdapter as $t,apiRelayClient as Ut,setSharedPrefsSync as Nt}from"./prefsSync-BGOlzhJD.js";async function Wt(){const{data:T}=await Mt("/api/sessions");return jt(T)}function jt(T){const D=Ke();return D?T.map(A=>zt(A,D)):T}function zt(T,D){if(!T.sealed)return T;let A;try{A=qt(T.sealed)}catch{return T}const M=It(A,D,T.id);if(!M)return T;const F={...T};return M.title!==void 0&&(F.title=M.title),M.cwd!==void 0&&(F.cwd=M.cwd),M.command!==void 0&&(F.command=M.command),M.current_command!==void 0&&(F.current_command=M.current_command),F}function qt(T){const D=atob(T),A=new Uint8Array(D.length);for(let M=0;M{const s=`${location.pathname||"/"}${location.search||""}${location.hash||""}`;return`/login.html?next=${encodeURIComponent(s||"/")}`});async function n(){if(h()){B.value=!0,M.value=[],U.value="",F.value=!1;return}B.value=!1;try{M.value=await Wt(),U.value=""}catch(s){s instanceof ot&&(U.value=r("main.errors.loadSessions"))}finally{F.value=!1}}const d=he(()=>{const s=new Map;for(const t of M.value){const i=t.host_id||t.host||"",l=s.get(i);l?l.sessions.push(t):s.set(i,{hostId:t.host_id,hostname:t.host||r("main.unknownHost"),sessions:[t]})}return Array.from(s.values())});function _(s){return s.slice(0,8)}function v(s){A("navigate",s)}function u(s){return r(s===1?"main.sessionCountOne":"main.sessionCount",{count:s})}function e(s){return Vt(s.type)}return ke(async()=>{await n(),o=setInterval(n,cs)}),it(()=>{o!==null&&clearInterval(o),o=null}),(s,t)=>(X(),ee("section",Gt,[j("div",Xt,[j("h1",null,K(Y(r)("main.activeSessions")),1),ue(Y(rt),{size:"small",tertiary:"",onClick:n},{default:Se(()=>[be(K(Y(r)("main.refresh")),1)]),_:1})]),!F.value&&!B.value&&M.value.length===0?(X(),ee("p",Jt,[be(K(Y(r)("main.empty"))+" ",1),t[0]||(t[0]=j("code",null,"atterm-agent",-1)),t[1]||(t[1]=be(". "))])):re("",!0),!F.value&&B.value?(X(),ee("div",Yt,[j("h2",null,K(Y(r)("main.unlock.title")),1),j("p",null,K(Y(r)("main.unlock.text")),1),j("a",{class:"unlock-link","data-testid":"unlock-account-key",href:f.value},K(Y(r)("main.unlock.action")),9,Zt)])):re("",!0),B.value?re("",!0):(X(!0),ee(Ce,{key:2},Ee(d.value,i=>(X(),ee("div",{key:i.hostId||i.hostname,class:"host-group"},[j("header",null,[j("span",Qt,K(i.hostname),1),i.hostId?(X(),me(Y(Bt),{key:0,size:"small",type:"default"},{default:Se(()=>[j("code",null,K(_(i.hostId)),1)]),_:2},1024)):re("",!0),j("span",es,K(u(i.sessions.length)),1)]),j("div",ts,[(X(!0),ee(Ce,null,Ee(i.sessions,l=>{var c,p;return X(),ee("button",{key:l.id,type:"button",class:"card","data-testid":`session-card-${l.id}`,onClick:m=>v(l.id)},[j("div",is,[e(l)?(X(),ee("span",{key:0,class:"type-chip",style:nt({"--chip":e(l).color})},K(Y(r)(`main.taskTypes.${e(l).key}`)),5)):re("",!0),be(" "+K(l.type==="ai"&&l.title?l.title:l.command||Y(r)("main.unknownCommand")),1)]),j("div",rs,[j("span",ns,[j("code",null,K(_(l.id)),1)]),j("span",os,K(l.cols)+"×"+K(l.rows),1),j("span",as,K(l.cwd),1)]),l.task_state==="failed"&&((p=(c=l.summary)==null?void 0:c.error_lines)!=null&&p.length)?(X(),ee("span",{key:0,class:"err-line","data-testid":`task-err-${l.id}`},K(l.summary.error_lines[0]),9,ls)):re("",!0)],8,ss)}),128))])]))),128)),U.value?(X(),ee("p",hs,K(U.value),1)):re("",!0)]))}}),us=fe(ds,[["__scopeId","data-v-cc46a124"]]);var lt={exports:{}};(function(T,D){(function(A,M){T.exports=M()})(self,()=>(()=>{var A={4567:function(B,r,o){var h=this&&this.__decorate||function(i,l,c,p){var m,a=arguments.length,g=a<3?l:p===null?p=Object.getOwnPropertyDescriptor(l,c):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(i,l,c,p);else for(var C=i.length-1;C>=0;C--)(m=i[C])&&(g=(a<3?m(g):a>3?m(l,c,g):m(l,c))||g);return a>3&&g&&Object.defineProperty(l,c,g),g},f=this&&this.__param||function(i,l){return function(c,p){l(c,p,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(6114),_=o(9924),v=o(844),u=o(5596),e=o(4725),s=o(3656);let t=r.AccessibilityManager=class extends v.Disposable{constructor(i,l){super(),this._terminal=i,this._renderService=l,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let c=0;cthis._handleBoundaryFocus(c,0),this._bottomBoundaryFocusListener=c=>this._handleBoundaryFocus(c,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new _.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(c=>this._handleResize(c.rows))),this.register(this._terminal.onRender(c=>this._refreshRows(c.start,c.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(c=>this._handleChar(c))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` `))),this.register(this._terminal.onA11yTab(c=>this._handleTab(c))),this.register(this._terminal.onKey(c=>this._handleKey(c.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new u.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,s.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,v.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(i){for(let l=0;l0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===` `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&this._liveRegion.remove()}_handleKey(i){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(i)||this._charsToConsume.push(i)}_refreshRows(i,l){this._liveRegionDebouncer.refresh(i,l,this._terminal.rows)}_renderRows(i,l){const c=this._terminal.buffer,p=c.lines.length.toString();for(let m=i;m<=l;m++){const a=c.translateBufferLineToString(c.ydisp+m,!0),g=(c.ydisp+m+1).toString(),C=this._rowElements[m];C&&(a.length===0?C.innerText=" ":C.textContent=a,C.setAttribute("aria-posinset",g),C.setAttribute("aria-setsize",p))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(i,l){const c=i.target,p=this._rowElements[l===0?1:this._rowElements.length-2];if(c.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||i.relatedTarget!==p)return;let m,a;if(l===0?(m=c,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(m=this._rowElements.shift(),a=c,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),a.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const g=this._createAccessibilityTreeNode();this._rowElements.unshift(g),this._rowContainer.insertAdjacentElement("afterbegin",g)}else{const g=this._createAccessibilityTreeNode();this._rowElements.push(g),this._rowContainer.appendChild(g)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}_handleResize(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;li;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let i=0;i{function o(d){return d.replace(/\r?\n/g,"\r")}function h(d,_){return _?"\x1B[200~"+d+"\x1B[201~":d}function f(d,_,v,u){d=h(d=o(d),v.decPrivateModes.bracketedPasteMode&&u.rawOptions.ignoreBracketedPasteMode!==!0),v.triggerDataEvent(d,!0),_.value=""}function n(d,_,v){const u=v.getBoundingClientRect(),e=d.clientX-u.left-10,s=d.clientY-u.top-10;_.style.width="20px",_.style.height="20px",_.style.left=`${e}px`,_.style.top=`${s}px`,_.style.zIndex="1000",_.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=h,r.copyHandler=function(d,_){d.clipboardData&&d.clipboardData.setData("text/plain",_.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,_,v,u){d.stopPropagation(),d.clipboardData&&f(d.clipboardData.getData("text/plain"),_,v,u)},r.paste=f,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,_,v,u,e){n(d,_,v),e&&u.rightClickSelect(d),_.value=u.selectionText,_.select()}},7239:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const h=o(1505);r.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(f,n,d){this._css.set(f,n,d)}getCss(f,n){return this._css.get(f,n)}setColor(f,n,d){this._color.set(f,n,d)}getColor(f,n){return this._color.get(f,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,h,f,n){o.addEventListener(h,f,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(h,f,n))}}}},6465:function(B,r,o){var h=this&&this.__decorate||function(e,s,t,i){var l,c=arguments.length,p=c<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(l=e[m])&&(p=(c<3?l(p):c>3?l(s,t,p):l(s,t))||p);return c>3&&p&&Object.defineProperty(s,t,p),p},f=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier2=void 0;const n=o(3656),d=o(8460),_=o(844),v=o(2585);let u=r.Linkifier2=class extends _.Disposable{get currentLink(){return this._currentLink}constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,_.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,_.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const s=this._linkProviders.indexOf(e);s!==-1&&this._linkProviders.splice(s,1)}}}attachToDom(e,s,t){this._element=e,this._mouseService=s,this._renderService=t,this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const t=e.composedPath();for(let i=0;i{c==null||c.forEach(p=>{p.link.dispose&&p.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let l=!1;for(const[c,p]of this._linkProviders.entries())s?!((i=this._activeProviderReplies)===null||i===void 0)&&i.get(c)&&(l=this._checkLinkProviderResult(c,e,l)):p.provideLinks(e.y,m=>{var a,g;if(this._isMouseOut)return;const C=m==null?void 0:m.map(w=>({link:w}));(a=this._activeProviderReplies)===null||a===void 0||a.set(c,C),l=this._checkLinkProviderResult(c,e,l),((g=this._activeProviderReplies)===null||g===void 0?void 0:g.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,s){const t=new Set;for(let i=0;ie?this._bufferService.cols:p.link.range.end.x;for(let g=m;g<=a;g++){if(t.has(g)){l.splice(c--,1);break}t.add(g)}}}}_checkLinkProviderResult(e,s,t){var i;if(!this._activeProviderReplies)return t;const l=this._activeProviderReplies.get(e);let c=!1;for(let p=0;pthis._linkAtPosition(m.link,s));p&&(t=!0,this._handleNewLink(p))}if(this._activeProviderReplies.size===this._linkProviders.length&&!t)for(let p=0;pthis._linkAtPosition(a.link,s));if(m){t=!0,this._handleNewLink(m);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,s){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!s||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,_.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(e.link,s)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.pointerCursor},set:t=>{var i,l;!((i=this._currentLink)===null||i===void 0)&&i.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&((l=this._element)===null||l===void 0||l.classList.toggle("xterm-cursor-pointer",t)))}},underline:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.underline},set:t=>{var i,l,c;!((i=this._currentLink)===null||i===void 0)&&i.state&&((c=(l=this._currentLink)===null||l===void 0?void 0:l.state)===null||c===void 0?void 0:c.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(t=>{if(!this._currentLink)return;const i=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,l=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=l&&(this._clearCurrentLink(i,l),this._lastMouseEvent&&this._element)){const c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._askForLink(c,!1)}})))}_linkHover(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(t,s.text)}_fireUnderlineEvent(e,s){const t=e.range,i=this._bufferService.buffer.ydisp,l=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-i-1,t.end.x,t.end.y-i-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(l)}_linkLeave(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(t,s.text)}_linkAtPosition(e,s){const t=e.range.start.y*this._bufferService.cols+e.range.start.x,i=e.range.end.y*this._bufferService.cols+e.range.end.x,l=s.y*this._bufferService.cols+s.x;return t<=l&&l<=i}_positionFromMouseEvent(e,s,t){const i=t.getCoords(e,s,this._bufferService.cols,this._bufferService.rows);if(i)return{x:i[0],y:i[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,s,t,i,l){return{x1:e,y1:s,x2:t,y2:i,cols:this._bufferService.cols,fg:l}}};r.Linkifier2=u=h([f(0,v.IBufferService)],u)},9042:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(B,r,o){var h=this&&this.__decorate||function(u,e,s,t){var i,l=arguments.length,c=l<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,s):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(u,e,s,t);else for(var p=u.length-1;p>=0;p--)(i=u[p])&&(c=(l<3?i(c):l>3?i(e,s,c):i(e,s))||c);return l>3&&c&&Object.defineProperty(e,s,c),c},f=this&&this.__param||function(u,e){return function(s,t){e(s,t,u)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const n=o(511),d=o(2585);let _=r.OscLinkProvider=class{constructor(u,e,s){this._bufferService=u,this._optionsService=e,this._oscLinkService=s}provideLinks(u,e){var s;const t=this._bufferService.buffer.lines.get(u-1);if(!t)return void e(void 0);const i=[],l=this._optionsService.rawOptions.linkHandler,c=new n.CellData,p=t.getTrimmedLength();let m=-1,a=-1,g=!1;for(let C=0;Cl?l.activate(I,H,y):v(0,H),hover:(I,H)=>{var N;return(N=l==null?void 0:l.hover)===null||N===void 0?void 0:N.call(l,I,H,y)},leave:(I,H)=>{var N;return(N=l==null?void 0:l.leave)===null||N===void 0?void 0:N.call(l,I,H,y)}})}g=!1,c.hasExtendedAttrs()&&c.extended.urlId?(a=C,m=c.extended.urlId):(a=-1,m=-1)}}e(i)}};function v(u,e){if(confirm(`Do you want to navigate to ${e}? @@ -7,6 +7,6 @@ WARNING: This link could potentially be dangerous`)){const s=window.open();if(s) `:` `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(a){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),s.isLinux&&a&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(a){const g=this._getMouseBufferCoords(a),C=this._model.finalSelectionStart,w=this._model.finalSelectionEnd;return!!(C&&w&&g)&&this._areCoordsInSelection(g,C,w)}isCellInSelection(a,g){const C=this._model.finalSelectionStart,w=this._model.finalSelectionEnd;return!(!C||!w)&&this._areCoordsInSelection([a,g],C,w)}_areCoordsInSelection(a,g,C){return a[1]>g[1]&&a[1]=g[0]&&a[0]=g[0]}_selectWordAtCursor(a,g){var C,w;const y=(w=(C=this._linkifier.currentLink)===null||C===void 0?void 0:C.link)===null||w===void 0?void 0:w.range;if(y)return this._model.selectionStart=[y.start.x-1,y.start.y-1],this._model.selectionStartLength=(0,t.getRangeLength)(y,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const L=this._getMouseBufferCoords(a);return!!L&&(this._selectWordAt(L,g),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(a,g){this._model.clearSelection(),a=Math.max(a,0),g=Math.min(g,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,a],this._model.selectionEnd=[this._bufferService.cols,g],this.refresh(),this._onSelectionChange.fire()}_handleTrim(a){this._model.handleTrim(a)&&this.refresh()}_getMouseBufferCoords(a){const g=this._mouseService.getCoords(a,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(g)return g[0]--,g[1]--,g[1]+=this._bufferService.buffer.ydisp,g}_getMouseEventScrollAmount(a){let g=(0,n.getCoordsRelativeToElement)(this._coreBrowserService.window,a,this._screenElement)[1];const C=this._renderService.dimensions.css.canvas.height;return g>=0&&g<=C?0:(g>C&&(g-=C),g=Math.min(Math.max(g,-50),50),g/=50,g/Math.abs(g)+Math.round(14*g))}shouldForceSelection(a){return s.isMac?a.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:a.shiftKey}handleMouseDown(a){if(this._mouseDownTimeStamp=a.timeStamp,(a.button!==2||!this.hasSelection)&&a.button===0){if(!this._enabled){if(!this.shouldForceSelection(a))return;a.stopPropagation()}a.preventDefault(),this._dragScrollAmount=0,this._enabled&&a.shiftKey?this._handleIncrementalClick(a):a.detail===1?this._handleSingleClick(a):a.detail===2?this._handleDoubleClick(a):a.detail===3&&this._handleTripleClick(a),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(a){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(a))}_handleSingleClick(a){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(a)?3:0,this._model.selectionStart=this._getMouseBufferCoords(a),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const g=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);g&&g.length!==this._model.selectionStart[0]&&g.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(a){this._selectWordAtCursor(a,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(a){const g=this._getMouseBufferCoords(a);g&&(this._activeSelectionMode=2,this._selectLineAt(g[1]))}shouldColumnSelect(a){return a.altKey&&!(s.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(a){if(a.stopImmediatePropagation(),!this._model.selectionStart)return;const g=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(a),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const C=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(a.ydisp+this._bufferService.rows,a.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=a.ydisp),this.refresh()}}_handleMouseUp(a){const g=a.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&g<500&&a.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const C=this._mouseService.getCoords(a,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(C&&C[0]!==void 0&&C[1]!==void 0){const w=(0,d.moveToCellSequence)(C[0]-1,C[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(w,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const a=this._model.finalSelectionStart,g=this._model.finalSelectionEnd,C=!(!a||!g||a[0]===g[0]&&a[1]===g[1]);C?a&&g&&(this._oldSelectionStart&&this._oldSelectionEnd&&a[0]===this._oldSelectionStart[0]&&a[1]===this._oldSelectionStart[1]&&g[0]===this._oldSelectionEnd[0]&&g[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(a,g,C)):this._oldHasSelection&&this._fireOnSelectionChange(a,g,C)}_fireOnSelectionChange(a,g,C){this._oldSelectionStart=a,this._oldSelectionEnd=g,this._oldHasSelection=C,this._onSelectionChange.fire()}_handleBufferActivate(a){this.clearSelection(),this._trimListener.dispose(),this._trimListener=a.activeBuffer.lines.onTrim(g=>this._handleTrim(g))}_convertViewportColToCharacterIndex(a,g){let C=g;for(let w=0;g>=w;w++){const y=a.loadCell(w,this._workCell).getChars().length;this._workCell.getWidth()===0?C--:y>1&&g!==w&&(C+=y-1)}return C}setSelection(a,g,C){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[a,g],this._model.selectionStartLength=C,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(a){this._isClickInSelection(a)||(this._selectWordAtCursor(a,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(a,g,C=!0,w=!0){if(a[0]>=this._bufferService.cols)return;const y=this._bufferService.buffer,L=y.lines.get(a[1]);if(!L)return;const I=y.translateBufferLineToString(a[1],!1);let H=this._convertViewportColToCharacterIndex(L,a[0]),N=H;const $=a[0]-H;let b=0,E=0,k=0,R=0;if(I.charAt(H)===" "){for(;H>0&&I.charAt(H-1)===" ";)H--;for(;N1&&(R+=se-1,N+=se-1);G>0&&H>0&&!this._isCharWordSeparator(L.loadCell(G-1,this._workCell));){L.loadCell(G-1,this._workCell);const S=this._workCell.getChars().length;this._workCell.getWidth()===0?(b++,G--):S>1&&(k+=S-1,H-=S-1),H--,G--}for(;V1&&(R+=S-1,N+=S-1),N++,V++}}N++;let W=H+$-b+k,z=Math.min(this._bufferService.cols,N-H+b+E-k-R);if(g||I.slice(H,N).trim()!==""){if(C&&W===0&&L.getCodePoint(0)!==32){const G=y.lines.get(a[1]-1);if(G&&L.isWrapped&&G.getCodePoint(this._bufferService.cols-1)!==32){const V=this._getWordAt([this._bufferService.cols-1,a[1]-1],!1,!0,!1);if(V){const se=this._bufferService.cols-V.start;W-=se,z+=se}}}if(w&&W+z===this._bufferService.cols&&L.getCodePoint(this._bufferService.cols-1)!==32){const G=y.lines.get(a[1]+1);if(G!=null&&G.isWrapped&&G.getCodePoint(0)!==32){const V=this._getWordAt([0,a[1]+1],!1,!1,!0);V&&(z+=V.length)}}return{start:W,length:z}}}_selectWordAt(a,g){const C=this._getWordAt(a,g);if(C){for(;C.start<0;)C.start+=this._bufferService.cols,a[1]--;this._model.selectionStart=[C.start,a[1]],this._model.selectionStartLength=C.length}}_selectToWordAt(a){const g=this._getWordAt(a,!0);if(g){let C=a[1];for(;g.start<0;)g.start+=this._bufferService.cols,C--;if(!this._model.areSelectionValuesReversed())for(;g.start+g.length>this._bufferService.cols;)g.length-=this._bufferService.cols,C++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?g.start:g.start+g.length,C]}}_isCharWordSeparator(a){return a.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(a.getChars())>=0}_selectLineAt(a){const g=this._bufferService.buffer.getWrappedRangeForLine(a),C={start:{x:0,y:g.first},end:{x:this._bufferService.cols-1,y:g.last}};this._model.selectionStart=[0,g.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,t.getRangeLength)(C,this._bufferService.cols)}};r.SelectionService=m=h([f(3,l.IBufferService),f(4,l.ICoreService),f(5,v.IMouseService),f(6,l.IOptionsService),f(7,v.IRenderService),f(8,v.ICoreBrowserService)],m)},4725:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IThemeService=r.ICharacterJoinerService=r.ISelectionService=r.IRenderService=r.IMouseService=r.ICoreBrowserService=r.ICharSizeService=void 0;const h=o(8343);r.ICharSizeService=(0,h.createDecorator)("CharSizeService"),r.ICoreBrowserService=(0,h.createDecorator)("CoreBrowserService"),r.IMouseService=(0,h.createDecorator)("MouseService"),r.IRenderService=(0,h.createDecorator)("RenderService"),r.ISelectionService=(0,h.createDecorator)("SelectionService"),r.ICharacterJoinerService=(0,h.createDecorator)("CharacterJoinerService"),r.IThemeService=(0,h.createDecorator)("ThemeService")},6731:function(B,r,o){var h=this&&this.__decorate||function(m,a,g,C){var w,y=arguments.length,L=y<3?a:C===null?C=Object.getOwnPropertyDescriptor(a,g):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(m,a,g,C);else for(var I=m.length-1;I>=0;I--)(w=m[I])&&(L=(y<3?w(L):y>3?w(a,g,L):w(a,g))||L);return y>3&&L&&Object.defineProperty(a,g,L),L},f=this&&this.__param||function(m,a){return function(g,C){a(g,C,m)}};Object.defineProperty(r,"__esModule",{value:!0}),r.ThemeService=r.DEFAULT_ANSI_COLORS=void 0;const n=o(7239),d=o(8055),_=o(8460),v=o(844),u=o(2585),e=d.css.toColor("#ffffff"),s=d.css.toColor("#000000"),t=d.css.toColor("#ffffff"),i=d.css.toColor("#000000"),l={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};r.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const m=[d.css.toColor("#2e3436"),d.css.toColor("#cc0000"),d.css.toColor("#4e9a06"),d.css.toColor("#c4a000"),d.css.toColor("#3465a4"),d.css.toColor("#75507b"),d.css.toColor("#06989a"),d.css.toColor("#d3d7cf"),d.css.toColor("#555753"),d.css.toColor("#ef2929"),d.css.toColor("#8ae234"),d.css.toColor("#fce94f"),d.css.toColor("#729fcf"),d.css.toColor("#ad7fa8"),d.css.toColor("#34e2e2"),d.css.toColor("#eeeeec")],a=[0,95,135,175,215,255];for(let g=0;g<216;g++){const C=a[g/36%6|0],w=a[g/6%6|0],y=a[g%6];m.push({css:d.channels.toCss(C,w,y),rgba:d.channels.toRgba(C,w,y)})}for(let g=0;g<24;g++){const C=8+10*g;m.push({css:d.channels.toCss(C,C,C),rgba:d.channels.toRgba(C,C,C)})}return m})());let c=r.ThemeService=class extends v.Disposable{get colors(){return this._colors}constructor(m){super(),this._optionsService=m,this._contrastCache=new n.ColorContrastCache,this._halfContrastCache=new n.ColorContrastCache,this._onChangeColors=this.register(new _.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:e,background:s,cursor:t,cursorAccent:i,selectionForeground:void 0,selectionBackgroundTransparent:l,selectionBackgroundOpaque:d.color.blend(s,l),selectionInactiveBackgroundTransparent:l,selectionInactiveBackgroundOpaque:d.color.blend(s,l),ansi:r.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(m={}){const a=this._colors;if(a.foreground=p(m.foreground,e),a.background=p(m.background,s),a.cursor=p(m.cursor,t),a.cursorAccent=p(m.cursorAccent,i),a.selectionBackgroundTransparent=p(m.selectionBackground,l),a.selectionBackgroundOpaque=d.color.blend(a.background,a.selectionBackgroundTransparent),a.selectionInactiveBackgroundTransparent=p(m.selectionInactiveBackground,a.selectionBackgroundTransparent),a.selectionInactiveBackgroundOpaque=d.color.blend(a.background,a.selectionInactiveBackgroundTransparent),a.selectionForeground=m.selectionForeground?p(m.selectionForeground,d.NULL_COLOR):void 0,a.selectionForeground===d.NULL_COLOR&&(a.selectionForeground=void 0),d.color.isOpaque(a.selectionBackgroundTransparent)&&(a.selectionBackgroundTransparent=d.color.opacity(a.selectionBackgroundTransparent,.3)),d.color.isOpaque(a.selectionInactiveBackgroundTransparent)&&(a.selectionInactiveBackgroundTransparent=d.color.opacity(a.selectionInactiveBackgroundTransparent,.3)),a.ansi=r.DEFAULT_ANSI_COLORS.slice(),a.ansi[0]=p(m.black,r.DEFAULT_ANSI_COLORS[0]),a.ansi[1]=p(m.red,r.DEFAULT_ANSI_COLORS[1]),a.ansi[2]=p(m.green,r.DEFAULT_ANSI_COLORS[2]),a.ansi[3]=p(m.yellow,r.DEFAULT_ANSI_COLORS[3]),a.ansi[4]=p(m.blue,r.DEFAULT_ANSI_COLORS[4]),a.ansi[5]=p(m.magenta,r.DEFAULT_ANSI_COLORS[5]),a.ansi[6]=p(m.cyan,r.DEFAULT_ANSI_COLORS[6]),a.ansi[7]=p(m.white,r.DEFAULT_ANSI_COLORS[7]),a.ansi[8]=p(m.brightBlack,r.DEFAULT_ANSI_COLORS[8]),a.ansi[9]=p(m.brightRed,r.DEFAULT_ANSI_COLORS[9]),a.ansi[10]=p(m.brightGreen,r.DEFAULT_ANSI_COLORS[10]),a.ansi[11]=p(m.brightYellow,r.DEFAULT_ANSI_COLORS[11]),a.ansi[12]=p(m.brightBlue,r.DEFAULT_ANSI_COLORS[12]),a.ansi[13]=p(m.brightMagenta,r.DEFAULT_ANSI_COLORS[13]),a.ansi[14]=p(m.brightCyan,r.DEFAULT_ANSI_COLORS[14]),a.ansi[15]=p(m.brightWhite,r.DEFAULT_ANSI_COLORS[15]),m.extendedAnsi){const g=Math.min(a.ansi.length-16,m.extendedAnsi.length);for(let C=0;C{Object.defineProperty(r,"__esModule",{value:!0}),r.CircularList=void 0;const h=o(8460),f=o(844);class n extends f.Disposable{constructor(_){super(),this._maxLength=_,this.onDeleteEmitter=this.register(new h.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new h.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new h.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(_){if(this._maxLength===_)return;const v=new Array(_);for(let u=0;uthis._length)for(let v=this._length;v<_;v++)this._array[v]=void 0;this._length=_}get(_){return this._array[this._getCyclicIndex(_)]}set(_,v){this._array[this._getCyclicIndex(_)]=v}push(_){this._array[this._getCyclicIndex(this._length)]=_,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(_,v,...u){if(v){for(let e=_;e=_;e--)this._array[this._getCyclicIndex(e+u.length)]=this._array[this._getCyclicIndex(e)];for(let e=0;ethis._maxLength){const e=this._length+u.length-this._maxLength;this._startIndex+=e,this._length=this._maxLength,this.onTrimEmitter.fire(e)}else this._length+=u.length}trimStart(_){_>this._length&&(_=this._length),this._startIndex+=_,this._length-=_,this.onTrimEmitter.fire(_)}shiftElements(_,v,u){if(!(v<=0)){if(_<0||_>=this._length)throw new Error("start argument out of range");if(_+u<0)throw new Error("Cannot shift elements in list beyond index 0");if(u>0){for(let s=v-1;s>=0;s--)this.set(_+s+u,this.get(_+s));const e=_+v+u-this._length;if(e>0)for(this._length+=e;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let e=0;e{Object.defineProperty(r,"__esModule",{value:!0}),r.clone=void 0,r.clone=function o(h,f=5){if(typeof h!="object")return h;const n=Array.isArray(h)?[]:{};for(const d in h)n[d]=f<=1?h[d]:h[d]&&o(h[d],f-1);return n}},8055:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.contrastRatio=r.toPaddedHex=r.rgba=r.rgb=r.css=r.color=r.channels=r.NULL_COLOR=void 0;const h=o(6114);let f=0,n=0,d=0,_=0;var v,u,e,s,t;function i(c){const p=c.toString(16);return p.length<2?"0"+p:p}function l(c,p){return c>>0}}(v||(r.channels=v={})),function(c){function p(m,a){return _=Math.round(255*a),[f,n,d]=t.toChannels(m.rgba),{css:v.toCss(f,n,d,_),rgba:v.toRgba(f,n,d,_)}}c.blend=function(m,a){if(_=(255&a.rgba)/255,_===1)return{css:a.css,rgba:a.rgba};const g=a.rgba>>24&255,C=a.rgba>>16&255,w=a.rgba>>8&255,y=m.rgba>>24&255,L=m.rgba>>16&255,I=m.rgba>>8&255;return f=y+Math.round((g-y)*_),n=L+Math.round((C-L)*_),d=I+Math.round((w-I)*_),{css:v.toCss(f,n,d),rgba:v.toRgba(f,n,d)}},c.isOpaque=function(m){return(255&m.rgba)==255},c.ensureContrastRatio=function(m,a,g){const C=t.ensureContrastRatio(m.rgba,a.rgba,g);if(C)return t.toColor(C>>24&255,C>>16&255,C>>8&255)},c.opaque=function(m){const a=(255|m.rgba)>>>0;return[f,n,d]=t.toChannels(a),{css:v.toCss(f,n,d),rgba:a}},c.opacity=p,c.multiplyOpacity=function(m,a){return _=255&m.rgba,p(m,_*a/255)},c.toColorRGB=function(m){return[m.rgba>>24&255,m.rgba>>16&255,m.rgba>>8&255]}}(u||(r.color=u={})),function(c){let p,m;if(!h.isNode){const a=document.createElement("canvas");a.width=1,a.height=1;const g=a.getContext("2d",{willReadFrequently:!0});g&&(p=g,p.globalCompositeOperation="copy",m=p.createLinearGradient(0,0,1,1))}c.toColor=function(a){if(a.match(/#[\da-f]{3,8}/i))switch(a.length){case 4:return f=parseInt(a.slice(1,2).repeat(2),16),n=parseInt(a.slice(2,3).repeat(2),16),d=parseInt(a.slice(3,4).repeat(2),16),t.toColor(f,n,d);case 5:return f=parseInt(a.slice(1,2).repeat(2),16),n=parseInt(a.slice(2,3).repeat(2),16),d=parseInt(a.slice(3,4).repeat(2),16),_=parseInt(a.slice(4,5).repeat(2),16),t.toColor(f,n,d,_);case 7:return{css:a,rgba:(parseInt(a.slice(1),16)<<8|255)>>>0};case 9:return{css:a,rgba:parseInt(a.slice(1),16)>>>0}}const g=a.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(g)return f=parseInt(g[1]),n=parseInt(g[2]),d=parseInt(g[3]),_=Math.round(255*(g[5]===void 0?1:parseFloat(g[5]))),t.toColor(f,n,d,_);if(!p||!m)throw new Error("css.toColor: Unsupported css format");if(p.fillStyle=m,p.fillStyle=a,typeof p.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(p.fillRect(0,0,1,1),[f,n,d,_]=p.getImageData(0,0,1,1).data,_!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:v.toRgba(f,n,d,_),css:a}}}(e||(r.css=e={})),function(c){function p(m,a,g){const C=m/255,w=a/255,y=g/255;return .2126*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.7152*(w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4))+.0722*(y<=.03928?y/12.92:Math.pow((y+.055)/1.055,2.4))}c.relativeLuminance=function(m){return p(m>>16&255,m>>8&255,255&m)},c.relativeLuminance2=p}(s||(r.rgb=s={})),function(c){function p(a,g,C){const w=a>>24&255,y=a>>16&255,L=a>>8&255;let I=g>>24&255,H=g>>16&255,N=g>>8&255,$=l(s.relativeLuminance2(I,H,N),s.relativeLuminance2(w,y,L));for(;$0||H>0||N>0);)I-=Math.max(0,Math.ceil(.1*I)),H-=Math.max(0,Math.ceil(.1*H)),N-=Math.max(0,Math.ceil(.1*N)),$=l(s.relativeLuminance2(I,H,N),s.relativeLuminance2(w,y,L));return(I<<24|H<<16|N<<8|255)>>>0}function m(a,g,C){const w=a>>24&255,y=a>>16&255,L=a>>8&255;let I=g>>24&255,H=g>>16&255,N=g>>8&255,$=l(s.relativeLuminance2(I,H,N),s.relativeLuminance2(w,y,L));for(;$>>0}c.ensureContrastRatio=function(a,g,C){const w=s.relativeLuminance(a>>8),y=s.relativeLuminance(g>>8);if(l(w,y)>8));if(Nl(w,s.relativeLuminance($>>8))?H:$}return H}const L=m(a,g,C),I=l(w,s.relativeLuminance(L>>8));if(Il(w,s.relativeLuminance(H>>8))?L:H}return L}},c.reduceLuminance=p,c.increaseLuminance=m,c.toChannels=function(a){return[a>>24&255,a>>16&255,a>>8&255,255&a]},c.toColor=function(a,g,C,w){return{css:v.toCss(a,g,C,w),rgba:v.toRgba(a,g,C,w)}}}(t||(r.rgba=t={})),r.toPaddedHex=i,r.contrastRatio=l},8969:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreTerminal=void 0;const h=o(844),f=o(2585),n=o(4348),d=o(7866),_=o(744),v=o(7302),u=o(6975),e=o(8460),s=o(1753),t=o(1480),i=o(7994),l=o(9282),c=o(5435),p=o(5981),m=o(2660);let a=!1;class g extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new e.EventEmitter),this._onScroll.event(w=>{var y;(y=this._onScrollApi)===null||y===void 0||y.fire(w.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(w){for(const y in w)this.optionsService.options[y]=w[y]}constructor(w){super(),this._windowsWrappingHeuristics=this.register(new h.MutableDisposable),this._onBinary=this.register(new e.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new e.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new e.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new e.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new e.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new e.EventEmitter),this._instantiationService=new n.InstantiationService,this.optionsService=this.register(new v.OptionsService(w)),this._instantiationService.setService(f.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(_.BufferService)),this._instantiationService.setService(f.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(d.LogService)),this._instantiationService.setService(f.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(u.CoreService)),this._instantiationService.setService(f.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(s.CoreMouseService)),this._instantiationService.setService(f.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(t.UnicodeService)),this._instantiationService.setService(f.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(i.CharsetService),this._instantiationService.setService(f.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(m.OscLinkService),this._instantiationService.setService(f.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new c.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,e.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,e.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,e.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,e.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(y=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(y=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new p.WriteBuffer((y,L)=>this._inputHandler.parse(y,L))),this.register((0,e.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(w,y){this._writeBuffer.write(w,y)}writeSync(w,y){this._logService.logLevel<=f.LogLevelEnum.WARN&&!a&&(this._logService.warn("writeSync is unreliable and will be removed soon."),a=!0),this._writeBuffer.writeSync(w,y)}resize(w,y){isNaN(w)||isNaN(y)||(w=Math.max(w,_.MINIMUM_COLS),y=Math.max(y,_.MINIMUM_ROWS),this._bufferService.resize(w,y))}scroll(w,y=!1){this._bufferService.scroll(w,y)}scrollLines(w,y,L){this._bufferService.scrollLines(w,y,L)}scrollPages(w){this.scrollLines(w*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(w){const y=w-this._bufferService.buffer.ydisp;y!==0&&this.scrollLines(y)}registerEscHandler(w,y){return this._inputHandler.registerEscHandler(w,y)}registerDcsHandler(w,y){return this._inputHandler.registerDcsHandler(w,y)}registerCsiHandler(w,y){return this._inputHandler.registerCsiHandler(w,y)}registerOscHandler(w,y){return this._inputHandler.registerOscHandler(w,y)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let w=!1;const y=this.optionsService.rawOptions.windowsPty;y&&y.buildNumber!==void 0&&y.buildNumber!==void 0?w=y.backend==="conpty"&&y.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(w=!0),w?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const w=[];w.push(this.onLineFeed(l.updateWindowsModeWrappedState.bind(null,this._bufferService))),w.push(this.registerCsiHandler({final:"H"},()=>((0,l.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)(()=>{for(const y of w)y.dispose()})}}}r.CoreTerminal=g},8460:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=o=>(this._listeners.push(o),{dispose:()=>{if(!this._disposed){for(let h=0;hh.fire(f))}},5435:function(B,r,o){var h=this&&this.__decorate||function($,b,E,k){var R,W=arguments.length,z=W<3?b:k===null?k=Object.getOwnPropertyDescriptor(b,E):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate($,b,E,k);else for(var G=$.length-1;G>=0;G--)(R=$[G])&&(z=(W<3?R(z):W>3?R(b,E,z):R(b,E))||z);return W>3&&z&&Object.defineProperty(b,E,z),z},f=this&&this.__param||function($,b){return function(E,k){b(E,k,$)}};Object.defineProperty(r,"__esModule",{value:!0}),r.InputHandler=r.WindowsOptionsReportType=void 0;const n=o(2584),d=o(7116),_=o(2015),v=o(844),u=o(482),e=o(8437),s=o(8460),t=o(643),i=o(511),l=o(3734),c=o(2585),p=o(6242),m=o(6351),a=o(5941),g={"(":0,")":1,"*":2,"+":3,"-":1,".":2},C=131072;function w($,b){if($>24)return b.setWinLines||!1;switch($){case 1:return!!b.restoreWin;case 2:return!!b.minimizeWin;case 3:return!!b.setWinPosition;case 4:return!!b.setWinSizePixels;case 5:return!!b.raiseWin;case 6:return!!b.lowerWin;case 7:return!!b.refreshWin;case 8:return!!b.setWinSizeChars;case 9:return!!b.maximizeWin;case 10:return!!b.fullscreenWin;case 11:return!!b.getWinState;case 13:return!!b.getWinPosition;case 14:return!!b.getWinSizePixels;case 15:return!!b.getScreenSizePixels;case 16:return!!b.getCellSizePixels;case 18:return!!b.getWinSizeChars;case 19:return!!b.getScreenSizeChars;case 20:return!!b.getIconTitle;case 21:return!!b.getWinTitle;case 22:return!!b.pushTitle;case 23:return!!b.popTitle;case 24:return!!b.setWinLines}return!1}var y;(function($){$[$.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",$[$.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(y||(r.WindowsOptionsReportType=y={}));let L=0;class I extends v.Disposable{getAttrData(){return this._curAttrData}constructor(b,E,k,R,W,z,G,V,se=new _.EscapeSequenceParser){super(),this._bufferService=b,this._charsetService=E,this._coreService=k,this._logService=R,this._optionsService=W,this._oscLinkService=z,this._coreMouseService=G,this._unicodeService=V,this._parser=se,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new u.StringToUtf32,this._utf8Decoder=new u.Utf8ToUtf32,this._workCell=new i.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new s.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new s.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new s.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new s.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new s.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new s.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new s.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new s.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new s.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new s.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new s.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new s.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new s.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new H(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(S=>this._activeBuffer=S.activeBuffer)),this._parser.setCsiHandlerFallback((S,x)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(S),params:x.toArray()})}),this._parser.setEscHandlerFallback(S=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(S)})}),this._parser.setExecuteHandlerFallback(S=>{this._logService.debug("Unknown EXECUTE code: ",{code:S})}),this._parser.setOscHandlerFallback((S,x,P)=>{this._logService.debug("Unknown OSC code: ",{identifier:S,action:x,data:P})}),this._parser.setDcsHandlerFallback((S,x,P)=>{x==="HOOK"&&(P=P.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(S),action:x,payload:P})}),this._parser.setPrintHandler((S,x,P)=>this.print(S,x,P)),this._parser.registerCsiHandler({final:"@"},S=>this.insertChars(S)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},S=>this.scrollLeft(S)),this._parser.registerCsiHandler({final:"A"},S=>this.cursorUp(S)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},S=>this.scrollRight(S)),this._parser.registerCsiHandler({final:"B"},S=>this.cursorDown(S)),this._parser.registerCsiHandler({final:"C"},S=>this.cursorForward(S)),this._parser.registerCsiHandler({final:"D"},S=>this.cursorBackward(S)),this._parser.registerCsiHandler({final:"E"},S=>this.cursorNextLine(S)),this._parser.registerCsiHandler({final:"F"},S=>this.cursorPrecedingLine(S)),this._parser.registerCsiHandler({final:"G"},S=>this.cursorCharAbsolute(S)),this._parser.registerCsiHandler({final:"H"},S=>this.cursorPosition(S)),this._parser.registerCsiHandler({final:"I"},S=>this.cursorForwardTab(S)),this._parser.registerCsiHandler({final:"J"},S=>this.eraseInDisplay(S,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},S=>this.eraseInDisplay(S,!0)),this._parser.registerCsiHandler({final:"K"},S=>this.eraseInLine(S,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},S=>this.eraseInLine(S,!0)),this._parser.registerCsiHandler({final:"L"},S=>this.insertLines(S)),this._parser.registerCsiHandler({final:"M"},S=>this.deleteLines(S)),this._parser.registerCsiHandler({final:"P"},S=>this.deleteChars(S)),this._parser.registerCsiHandler({final:"S"},S=>this.scrollUp(S)),this._parser.registerCsiHandler({final:"T"},S=>this.scrollDown(S)),this._parser.registerCsiHandler({final:"X"},S=>this.eraseChars(S)),this._parser.registerCsiHandler({final:"Z"},S=>this.cursorBackwardTab(S)),this._parser.registerCsiHandler({final:"`"},S=>this.charPosAbsolute(S)),this._parser.registerCsiHandler({final:"a"},S=>this.hPositionRelative(S)),this._parser.registerCsiHandler({final:"b"},S=>this.repeatPrecedingCharacter(S)),this._parser.registerCsiHandler({final:"c"},S=>this.sendDeviceAttributesPrimary(S)),this._parser.registerCsiHandler({prefix:">",final:"c"},S=>this.sendDeviceAttributesSecondary(S)),this._parser.registerCsiHandler({final:"d"},S=>this.linePosAbsolute(S)),this._parser.registerCsiHandler({final:"e"},S=>this.vPositionRelative(S)),this._parser.registerCsiHandler({final:"f"},S=>this.hVPosition(S)),this._parser.registerCsiHandler({final:"g"},S=>this.tabClear(S)),this._parser.registerCsiHandler({final:"h"},S=>this.setMode(S)),this._parser.registerCsiHandler({prefix:"?",final:"h"},S=>this.setModePrivate(S)),this._parser.registerCsiHandler({final:"l"},S=>this.resetMode(S)),this._parser.registerCsiHandler({prefix:"?",final:"l"},S=>this.resetModePrivate(S)),this._parser.registerCsiHandler({final:"m"},S=>this.charAttributes(S)),this._parser.registerCsiHandler({final:"n"},S=>this.deviceStatus(S)),this._parser.registerCsiHandler({prefix:"?",final:"n"},S=>this.deviceStatusPrivate(S)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},S=>this.softReset(S)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},S=>this.setCursorStyle(S)),this._parser.registerCsiHandler({final:"r"},S=>this.setScrollRegion(S)),this._parser.registerCsiHandler({final:"s"},S=>this.saveCursor(S)),this._parser.registerCsiHandler({final:"t"},S=>this.windowOptions(S)),this._parser.registerCsiHandler({final:"u"},S=>this.restoreCursor(S)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},S=>this.insertColumns(S)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},S=>this.deleteColumns(S)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},S=>this.selectProtected(S)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},S=>this.requestMode(S,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},S=>this.requestMode(S,!1)),this._parser.setExecuteHandler(n.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(n.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(n.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(n.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(n.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(n.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(n.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(n.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(n.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(n.C1.IND,()=>this.index()),this._parser.setExecuteHandler(n.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(n.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new p.OscHandler(S=>(this.setTitle(S),this.setIconName(S),!0))),this._parser.registerOscHandler(1,new p.OscHandler(S=>this.setIconName(S))),this._parser.registerOscHandler(2,new p.OscHandler(S=>this.setTitle(S))),this._parser.registerOscHandler(4,new p.OscHandler(S=>this.setOrReportIndexedColor(S))),this._parser.registerOscHandler(8,new p.OscHandler(S=>this.setHyperlink(S))),this._parser.registerOscHandler(10,new p.OscHandler(S=>this.setOrReportFgColor(S))),this._parser.registerOscHandler(11,new p.OscHandler(S=>this.setOrReportBgColor(S))),this._parser.registerOscHandler(12,new p.OscHandler(S=>this.setOrReportCursorColor(S))),this._parser.registerOscHandler(104,new p.OscHandler(S=>this.restoreIndexedColor(S))),this._parser.registerOscHandler(110,new p.OscHandler(S=>this.restoreFgColor(S))),this._parser.registerOscHandler(111,new p.OscHandler(S=>this.restoreBgColor(S))),this._parser.registerOscHandler(112,new p.OscHandler(S=>this.restoreCursorColor(S))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(const S in d.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:S},()=>this.selectCharset("("+S)),this._parser.registerEscHandler({intermediates:")",final:S},()=>this.selectCharset(")"+S)),this._parser.registerEscHandler({intermediates:"*",final:S},()=>this.selectCharset("*"+S)),this._parser.registerEscHandler({intermediates:"+",final:S},()=>this.selectCharset("+"+S)),this._parser.registerEscHandler({intermediates:"-",final:S},()=>this.selectCharset("-"+S)),this._parser.registerEscHandler({intermediates:".",final:S},()=>this.selectCharset("."+S)),this._parser.registerEscHandler({intermediates:"/",final:S},()=>this.selectCharset("/"+S));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(S=>(this._logService.error("Parsing error: ",S),S)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new m.DcsHandler((S,x)=>this.requestStatusString(S,x)))}_preserveStack(b,E,k,R){this._parseStack.paused=!0,this._parseStack.cursorStartX=b,this._parseStack.cursorStartY=E,this._parseStack.decodedLength=k,this._parseStack.position=R}_logSlowResolvingAsync(b){this._logService.logLevel<=c.LogLevelEnum.WARN&&Promise.race([b,new Promise((E,k)=>setTimeout(()=>k("#SLOW_TIMEOUT"),5e3))]).catch(E=>{if(E!=="#SLOW_TIMEOUT")throw E;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(b,E){let k,R=this._activeBuffer.x,W=this._activeBuffer.y,z=0;const G=this._parseStack.paused;if(G){if(k=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,E))return this._logSlowResolvingAsync(k),k;R=this._parseStack.cursorStartX,W=this._parseStack.cursorStartY,this._parseStack.paused=!1,b.length>C&&(z=this._parseStack.position+C)}if(this._logService.logLevel<=c.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof b=="string"?` "${b}"`:` "${Array.prototype.map.call(b,V=>String.fromCharCode(V)).join("")}"`),typeof b=="string"?b.split("").map(V=>V.charCodeAt(0)):b),this._parseBuffer.lengthC)for(let V=z;V0&&P.getWidth(this._activeBuffer.x-1)===2&&P.setCellFromCodePoint(this._activeBuffer.x-1,0,1,x.fg,x.bg,x.extended);for(let O=E;O=V){if(se){for(;this._activeBuffer.x=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=V-1,W===2)continue}if(S&&(P.insertCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(x),x),P.getWidth(V-1)===2&&P.setCellFromCodePoint(V-1,t.NULL_CELL_CODE,t.NULL_CELL_WIDTH,x.fg,x.bg,x.extended)),P.setCellFromCodePoint(this._activeBuffer.x++,R,W,x.fg,x.bg,x.extended),W>0)for(;--W;)P.setCellFromCodePoint(this._activeBuffer.x++,0,0,x.fg,x.bg,x.extended)}else P.getWidth(this._activeBuffer.x-1)?P.addCodepointToCell(this._activeBuffer.x-1,R):P.addCodepointToCell(this._activeBuffer.x-2,R)}k-E>0&&(P.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x0&&P.getWidth(this._activeBuffer.x)===0&&!P.hasContent(this._activeBuffer.x)&&P.setCellFromCodePoint(this._activeBuffer.x,0,1,x.fg,x.bg,x.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(b,E){return b.final!=="t"||b.prefix||b.intermediates?this._parser.registerCsiHandler(b,E):this._parser.registerCsiHandler(b,k=>!w(k.params[0],this._optionsService.rawOptions.windowOptions)||E(k))}registerDcsHandler(b,E){return this._parser.registerDcsHandler(b,new m.DcsHandler(E))}registerEscHandler(b,E){return this._parser.registerEscHandler(b,E)}registerOscHandler(b,E){return this._parser.registerOscHandler(b,new p.OscHandler(E))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var b;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(!((b=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||b===void 0)&&b.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);E.hasWidth(this._activeBuffer.x)&&!E.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const b=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-b),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(b=this._bufferService.cols-1){this._activeBuffer.x=Math.min(b,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(b,E){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=b,this._activeBuffer.y=this._activeBuffer.scrollTop+E):(this._activeBuffer.x=b,this._activeBuffer.y=E),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(b,E){this._restrictCursor(),this._setCursor(this._activeBuffer.x+b,this._activeBuffer.y+E)}cursorUp(b){const E=this._activeBuffer.y-this._activeBuffer.scrollTop;return E>=0?this._moveCursor(0,-Math.min(E,b.params[0]||1)):this._moveCursor(0,-(b.params[0]||1)),!0}cursorDown(b){const E=this._activeBuffer.scrollBottom-this._activeBuffer.y;return E>=0?this._moveCursor(0,Math.min(E,b.params[0]||1)):this._moveCursor(0,b.params[0]||1),!0}cursorForward(b){return this._moveCursor(b.params[0]||1,0),!0}cursorBackward(b){return this._moveCursor(-(b.params[0]||1),0),!0}cursorNextLine(b){return this.cursorDown(b),this._activeBuffer.x=0,!0}cursorPrecedingLine(b){return this.cursorUp(b),this._activeBuffer.x=0,!0}cursorCharAbsolute(b){return this._setCursor((b.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(b){return this._setCursor(b.length>=2?(b.params[1]||1)-1:0,(b.params[0]||1)-1),!0}charPosAbsolute(b){return this._setCursor((b.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(b){return this._moveCursor(b.params[0]||1,0),!0}linePosAbsolute(b){return this._setCursor(this._activeBuffer.x,(b.params[0]||1)-1),!0}vPositionRelative(b){return this._moveCursor(0,b.params[0]||1),!0}hVPosition(b){return this.cursorPosition(b),!0}tabClear(b){const E=b.params[0];return E===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:E===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(b){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let E=b.params[0]||1;for(;E--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(b){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let E=b.params[0]||1;for(;E--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(b){const E=b.params[0];return E===1&&(this._curAttrData.bg|=536870912),E!==2&&E!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(b,E,k,R=!1,W=!1){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+b);z.replaceCells(E,k,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),W),R&&(z.isWrapped=!1)}_resetBufferLine(b,E=!1){const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+b);k&&(k.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),E),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+b),k.isWrapped=!1)}eraseInDisplay(b,E=!1){let k;switch(this._restrictCursor(this._bufferService.cols),b.params[0]){case 0:for(k=this._activeBuffer.y,this._dirtyRowTracker.markDirty(k),this._eraseInBufferLine(k++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,E);k=this._bufferService.cols&&(this._activeBuffer.lines.get(k+1).isWrapped=!1);k--;)this._resetBufferLine(k,E);this._dirtyRowTracker.markDirty(0);break;case 2:for(k=this._bufferService.rows,this._dirtyRowTracker.markDirty(k-1);k--;)this._resetBufferLine(k,E);this._dirtyRowTracker.markDirty(0);break;case 3:const R=this._activeBuffer.lines.length-this._bufferService.rows;R>0&&(this._activeBuffer.lines.trimStart(R),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-R,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-R,0),this._onScroll.fire(0))}return!0}eraseInLine(b,E=!1){switch(this._restrictCursor(this._bufferService.cols),b.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,E);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,E);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,E)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(b){this._restrictCursor();let E=b.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(n.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(n.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(b){return b.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(n.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(n.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(b.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(n.C0.ESC+"[>83;40003;0c")),!0}_is(b){return(this._optionsService.rawOptions.termName+"").indexOf(b)===0}setMode(b){for(let E=0;Ete?1:2,O=b.params[0];return J=O,q=E?O===2?4:O===4?P(z.modes.insertMode):O===12?3:O===20?P(x.convertEol):0:O===1?P(k.applicationCursorKeys):O===3?x.windowOptions.setWinLines?V===80?2:V===132?1:0:0:O===6?P(k.origin):O===7?P(k.wraparound):O===8?3:O===9?P(R==="X10"):O===12?P(x.cursorBlink):O===25?P(!z.isCursorHidden):O===45?P(k.reverseWraparound):O===66?P(k.applicationKeypad):O===67?4:O===1e3?P(R==="VT200"):O===1002?P(R==="DRAG"):O===1003?P(R==="ANY"):O===1004?P(k.sendFocus):O===1005?4:O===1006?P(W==="SGR"):O===1015?4:O===1016?P(W==="SGR_PIXELS"):O===1048?1:O===47||O===1047||O===1049?P(se===S):O===2004?P(k.bracketedPasteMode):0,z.triggerDataEvent(`${n.C0.ESC}[${E?"":"?"}${J};${q}$y`),!0;var J,q}_updateAttrColor(b,E,k,R,W){return E===2?(b|=50331648,b&=-16777216,b|=l.AttributeData.fromColorRGB([k,R,W])):E===5&&(b&=-50331904,b|=33554432|255&k),b}_extractColor(b,E,k){const R=[0,0,-1,0,0,0];let W=0,z=0;do{if(R[z+W]=b.params[E+z],b.hasSubParams(E+z)){const G=b.getSubParams(E+z);let V=0;do R[1]===5&&(W=1),R[z+V+1+W]=G[V];while(++V=2||R[1]===2&&z+W>=5)break;R[1]&&(W=1)}while(++z+E5)&&(b=1),E.extended.underlineStyle=b,E.fg|=268435456,b===0&&(E.fg&=-268435457),E.updateExtended()}_processSGR0(b){b.fg=e.DEFAULT_ATTR_DATA.fg,b.bg=e.DEFAULT_ATTR_DATA.bg,b.extended=b.extended.clone(),b.extended.underlineStyle=0,b.extended.underlineColor&=-67108864,b.updateExtended()}charAttributes(b){if(b.length===1&&b.params[0]===0)return this._processSGR0(this._curAttrData),!0;const E=b.length;let k;const R=this._curAttrData;for(let W=0;W=30&&k<=37?(R.fg&=-50331904,R.fg|=16777216|k-30):k>=40&&k<=47?(R.bg&=-50331904,R.bg|=16777216|k-40):k>=90&&k<=97?(R.fg&=-50331904,R.fg|=16777224|k-90):k>=100&&k<=107?(R.bg&=-50331904,R.bg|=16777224|k-100):k===0?this._processSGR0(R):k===1?R.fg|=134217728:k===3?R.bg|=67108864:k===4?(R.fg|=268435456,this._processUnderline(b.hasSubParams(W)?b.getSubParams(W)[0]:1,R)):k===5?R.fg|=536870912:k===7?R.fg|=67108864:k===8?R.fg|=1073741824:k===9?R.fg|=2147483648:k===2?R.bg|=134217728:k===21?this._processUnderline(2,R):k===22?(R.fg&=-134217729,R.bg&=-134217729):k===23?R.bg&=-67108865:k===24?(R.fg&=-268435457,this._processUnderline(0,R)):k===25?R.fg&=-536870913:k===27?R.fg&=-67108865:k===28?R.fg&=-1073741825:k===29?R.fg&=2147483647:k===39?(R.fg&=-67108864,R.fg|=16777215&e.DEFAULT_ATTR_DATA.fg):k===49?(R.bg&=-67108864,R.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):k===38||k===48||k===58?W+=this._extractColor(b,W,R):k===53?R.bg|=1073741824:k===55?R.bg&=-1073741825:k===59?(R.extended=R.extended.clone(),R.extended.underlineColor=-1,R.updateExtended()):k===100?(R.fg&=-67108864,R.fg|=16777215&e.DEFAULT_ATTR_DATA.fg,R.bg&=-67108864,R.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",k);return!0}deviceStatus(b){switch(b.params[0]){case 5:this._coreService.triggerDataEvent(`${n.C0.ESC}[0n`);break;case 6:const E=this._activeBuffer.y+1,k=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${n.C0.ESC}[${E};${k}R`)}return!0}deviceStatusPrivate(b){if(b.params[0]===6){const E=this._activeBuffer.y+1,k=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${n.C0.ESC}[?${E};${k}R`)}return!0}softReset(b){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(b){const E=b.params[0]||1;switch(E){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const k=E%2==1;return this._optionsService.options.cursorBlink=k,!0}setScrollRegion(b){const E=b.params[0]||1;let k;return(b.length<2||(k=b.params[1])>this._bufferService.rows||k===0)&&(k=this._bufferService.rows),k>E&&(this._activeBuffer.scrollTop=E-1,this._activeBuffer.scrollBottom=k-1,this._setCursor(0,0)),!0}windowOptions(b){if(!w(b.params[0],this._optionsService.rawOptions.windowOptions))return!0;const E=b.length>1?b.params[1]:0;switch(b.params[0]){case 14:E!==2&&this._onRequestWindowsOptionsReport.fire(y.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(y.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${n.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:E!==0&&E!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),E!==0&&E!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:E!==0&&E!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),E!==0&&E!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(b){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(b){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(b){return this._windowTitle=b,this._onTitleChange.fire(b),!0}setIconName(b){return this._iconName=b,!0}setOrReportIndexedColor(b){const E=[],k=b.split(";");for(;k.length>1;){const R=k.shift(),W=k.shift();if(/^\d+$/.exec(R)){const z=parseInt(R);if(N(z))if(W==="?")E.push({type:0,index:z});else{const G=(0,a.parseColor)(W);G&&E.push({type:1,index:z,color:G})}}}return E.length&&this._onColor.fire(E),!0}setHyperlink(b){const E=b.split(";");return!(E.length<2)&&(E[1]?this._createHyperlink(E[0],E[1]):!E[0]&&this._finishHyperlink())}_createHyperlink(b,E){this._getCurrentLinkId()&&this._finishHyperlink();const k=b.split(":");let R;const W=k.findIndex(z=>z.startsWith("id="));return W!==-1&&(R=k[W].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:R,uri:E}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(b,E){const k=b.split(";");for(let R=0;R=this._specialColors.length);++R,++E)if(k[R]==="?")this._onColor.fire([{type:0,index:this._specialColors[E]}]);else{const W=(0,a.parseColor)(k[R]);W&&this._onColor.fire([{type:1,index:this._specialColors[E],color:W}])}return!0}setOrReportFgColor(b){return this._setOrReportSpecialColor(b,0)}setOrReportBgColor(b){return this._setOrReportSpecialColor(b,1)}setOrReportCursorColor(b){return this._setOrReportSpecialColor(b,2)}restoreIndexedColor(b){if(!b)return this._onColor.fire([{type:2}]),!0;const E=[],k=b.split(";");for(let R=0;R=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const b=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,b,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(b){return this._charsetService.setgLevel(b),!0}screenAlignmentPattern(){const b=new i.CellData;b.content=4194373,b.fg=this._curAttrData.fg,b.bg=this._curAttrData.bg,this._setCursor(0,0);for(let E=0;E(this._coreService.triggerDataEvent(`${n.C0.ESC}${W}${n.C0.ESC}\\`),!0))(b==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:b==='"p'?'P1$r61;1"p':b==="r"?`P1$r${k.scrollTop+1};${k.scrollBottom+1}r`:b==="m"?"P1$r0m":b===" q"?`P1$r${{block:2,underline:4,bar:6}[R.cursorStyle]-(R.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(b,E){this._dirtyRowTracker.markRangeDirty(b,E)}}r.InputHandler=I;let H=class{constructor($){this._bufferService=$,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty($){$this.end&&(this.end=$)}markRangeDirty($,b){$>b&&(L=$,$=b,b=L),$this.end&&(this.end=b)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function N($){return 0<=$&&$<256}H=h([f(0,c.IBufferService)],H)},844:(B,r)=>{function o(h){for(const f of h)f.dispose();h.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const h of this._disposables)h.dispose();this._disposables.length=0}register(h){return this._disposables.push(h),h}unregister(h){const f=this._disposables.indexOf(h);f!==-1&&this._disposables.splice(f,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var f;this._isDisposed||h===this._value||((f=this._value)===null||f===void 0||f.dispose(),this._value=h)}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,(h=this._value)===null||h===void 0||h.dispose(),this._value=void 0}},r.toDisposable=function(h){return{dispose:h}},r.disposeArray=o,r.getDisposeArrayDisposable=function(h){return{dispose:()=>o(h)}}},1505:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class o{constructor(){this._data={}}set(f,n,d){this._data[f]||(this._data[f]={}),this._data[f][n]=d}get(f,n){return this._data[f]?this._data[f][n]:void 0}clear(){this._data={}}}r.TwoKeyMap=o,r.FourKeyMap=class{constructor(){this._data=new o}set(h,f,n,d,_){this._data.get(h,f)||this._data.set(h,f,new o),this._data.get(h,f).set(n,d,_)}get(h,f,n,d){var _;return(_=this._data.get(h,f))===null||_===void 0?void 0:_.get(n,d)}clear(){this._data.clear()}}},6114:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isChromeOS=r.isLinux=r.isWindows=r.isIphone=r.isIpad=r.isMac=r.getSafariVersion=r.isSafari=r.isLegacyEdge=r.isFirefox=r.isNode=void 0,r.isNode=typeof navigator>"u";const o=r.isNode?"node":navigator.userAgent,h=r.isNode?"node":navigator.platform;r.isFirefox=o.includes("Firefox"),r.isLegacyEdge=o.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(o),r.getSafariVersion=function(){if(!r.isSafari)return 0;const f=o.match(/Version\/(\d+)/);return f===null||f.length<2?0:parseInt(f[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),r.isIpad=h==="iPad",r.isIphone=h==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),r.isLinux=h.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(o)},6106:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SortedList=void 0;let o=0;r.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(o=this._search(this._getKey(h)),this._array.splice(o,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const f=this._getKey(h);if(f===void 0||(o=this._search(f),o===-1)||this._getKey(this._array[o])!==f)return!1;do if(this._array[o]===h)return this._array.splice(o,1),!0;while(++o=this._array.length)&&this._getKey(this._array[o])===h))do yield this._array[o];while(++o=this._array.length)&&this._getKey(this._array[o])===h))do f(this._array[o]);while(++o=f;){let d=f+n>>1;const _=this._getKey(this._array[d]);if(_>h)n=d-1;else{if(!(_0&&this._getKey(this._array[d-1])===h;)d--;return d}f=d+1}}return f}}},7226:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;const h=o(6114);class f{constructor(){this._tasks=[],this._i=0}enqueue(_){this._tasks.push(_),this._start()}flush(){for(;this._is)return e-v<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(e-v))}ms`),void this._start();e=s}this.clear()}}class n extends f{_requestCallback(_){return setTimeout(()=>_(this._createDeadline(16)))}_cancelCallback(_){clearTimeout(_)}_createDeadline(_){const v=Date.now()+_;return{timeRemaining:()=>Math.max(0,v-Date.now())}}}r.PriorityTaskQueue=n,r.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends f{_requestCallback(d){return requestIdleCallback(d)}_cancelCallback(d){cancelIdleCallback(d)}}:n,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(d){this._queue.clear(),this._queue.enqueue(d)}flush(){this._queue.flush()}}},9282:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.updateWindowsModeWrappedState=void 0;const h=o(643);r.updateWindowsModeWrappedState=function(f){const n=f.buffer.lines.get(f.buffer.ybase+f.buffer.y-1),d=n==null?void 0:n.get(f.cols-1),_=f.buffer.lines.get(f.buffer.ybase+f.buffer.y);_&&d&&(_.isWrapped=d[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&d[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class o{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(n){return[n>>>16&255,n>>>8&255,255&n]}static fromColorRGB(n){return(255&n[0])<<16|(255&n[1])<<8|255&n[2]}clone(){const n=new o;return n.fg=this.fg,n.bg=this.bg,n.extended=this.extended.clone(),n}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}r.AttributeData=o;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(n){this._ext=n}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(n){this._ext&=-469762049,this._ext|=n<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(n){this._ext&=-67108864,this._ext|=67108863&n}get urlId(){return this._urlId}set urlId(n){this._urlId=n}constructor(n=0,d=0){this._ext=0,this._urlId=0,this._ext=n,this._urlId=d}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=h},9092:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Buffer=r.MAX_BUFFER_SIZE=void 0;const h=o(6349),f=o(7226),n=o(3734),d=o(8437),_=o(4634),v=o(511),u=o(643),e=o(4863),s=o(7116);r.MAX_BUFFER_SIZE=4294967295,r.Buffer=class{constructor(t,i,l){this._hasScrollback=t,this._optionsService=i,this._bufferService=l,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=d.DEFAULT_ATTR_DATA.clone(),this.savedCharset=s.DEFAULT_CHARSET,this.markers=[],this._nullCell=v.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]),this._whitespaceCell=v.CellData.fromCharData([0,u.WHITESPACE_CELL_CHAR,u.WHITESPACE_CELL_WIDTH,u.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new f.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(t){return t?(this._nullCell.fg=t.fg,this._nullCell.bg=t.bg,this._nullCell.extended=t.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new n.ExtendedAttrs),this._nullCell}getWhitespaceCell(t){return t?(this._whitespaceCell.fg=t.fg,this._whitespaceCell.bg=t.bg,this._whitespaceCell.extended=t.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new n.ExtendedAttrs),this._whitespaceCell}getBlankLine(t,i){return new d.BufferLine(this._bufferService.cols,this.getNullCell(t),i)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const t=this.ybase+this.y-this.ydisp;return t>=0&&tr.MAX_BUFFER_SIZE?r.MAX_BUFFER_SIZE:i}fillViewportRows(t){if(this.lines.length===0){t===void 0&&(t=d.DEFAULT_ATTR_DATA);let i=this._rows;for(;i--;)this.lines.push(this.getBlankLine(t))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(t,i){const l=this.getNullCell(d.DEFAULT_ATTR_DATA);let c=0;const p=this._getCorrectBufferLength(i);if(p>this.lines.maxLength&&(this.lines.maxLength=p),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+m+1?(this.ybase--,m++,this.ydisp>0&&this.ydisp--):this.lines.push(new d.BufferLine(t,l)));else for(let a=this._rows;a>i;a--)this.lines.length>i+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(p0&&(this.lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0),this.savedY=Math.max(this.savedY-a,0)),this.lines.maxLength=p}this.x=Math.min(this.x,t-1),this.y=Math.min(this.y,i-1),m&&(this.y+=m),this.savedX=Math.min(this.savedX,t-1),this.scrollTop=0}if(this.scrollBottom=i-1,this._isReflowEnabled&&(this._reflow(t,i),this._cols>t))for(let m=0;m.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let t=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,t=!1);let i=0;for(;this._memoryCleanupPosition100)return!0;return t}get _isReflowEnabled(){const t=this._optionsService.rawOptions.windowsPty;return t&&t.buildNumber?this._hasScrollback&&t.backend==="conpty"&&t.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(t,i){this._cols!==t&&(t>this._cols?this._reflowLarger(t,i):this._reflowSmaller(t,i))}_reflowLarger(t,i){const l=(0,_.reflowLargerGetLinesToRemove)(this.lines,this._cols,t,this.ybase+this.y,this.getNullCell(d.DEFAULT_ATTR_DATA));if(l.length>0){const c=(0,_.reflowLargerCreateNewLayout)(this.lines,l);(0,_.reflowLargerApplyNewLayout)(this.lines,c.layout),this._reflowLargerAdjustViewport(t,i,c.countRemoved)}}_reflowLargerAdjustViewport(t,i,l){const c=this.getNullCell(d.DEFAULT_ATTR_DATA);let p=l;for(;p-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;m--){let a=this.lines.get(m);if(!a||!a.isWrapped&&a.getTrimmedLength()<=t)continue;const g=[a];for(;a.isWrapped&&m>0;)a=this.lines.get(--m),g.unshift(a);const C=this.ybase+this.y;if(C>=m&&C0&&(c.push({start:m+g.length+p,newLines:H}),p+=H.length),g.push(...H);let N=y.length-1,$=y[N];$===0&&(N--,$=y[N]);let b=g.length-L-1,E=w;for(;b>=0;){const R=Math.min(E,$);if(g[N]===void 0)break;if(g[N].copyCellsFrom(g[b],E-R,$-R,R,!0),$-=R,$===0&&(N--,$=y[N]),E-=R,E===0){b--;const W=Math.max(b,0);E=(0,_.getWrappedLineTrimmedLength)(g,W,this._cols)}}for(let R=0;R0;)this.ybase===0?this.y0){const m=[],a=[];for(let N=0;N=0;N--)if(y&&y.start>C+L){for(let $=y.newLines.length-1;$>=0;$--)this.lines.set(N--,y.newLines[$]);N++,m.push({index:C+1,amount:y.newLines.length}),L+=y.newLines.length,y=c[++w]}else this.lines.set(N,a[C--]);let I=0;for(let N=m.length-1;N>=0;N--)m[N].index+=I,this.lines.onInsertEmitter.fire(m[N]),I+=m[N].amount;const H=Math.max(0,g+p-this.lines.maxLength);H>0&&this.lines.onTrimEmitter.fire(H)}}translateBufferLineToString(t,i,l=0,c){const p=this.lines.get(t);return p?p.translateToString(i,l,c):""}getWrappedRangeForLine(t){let i=t,l=t;for(;i>0&&this.lines.get(i).isWrapped;)i--;for(;l+10;);return t>=this._cols?this._cols-1:t<0?0:t}nextStop(t){for(t==null&&(t=this.x);!this.tabs[++t]&&t=this._cols?this._cols-1:t<0?0:t}clearMarkers(t){this._isClearing=!0;for(let i=0;i{i.line-=l,i.line<0&&i.dispose()})),i.register(this.lines.onInsert(l=>{i.line>=l.index&&(i.line+=l.amount)})),i.register(this.lines.onDelete(l=>{i.line>=l.index&&i.linel.index&&(i.line-=l.amount)})),i.register(i.onDispose(()=>this._removeMarker(i))),i}_removeMarker(t){this._isClearing||this.markers.splice(this.markers.indexOf(t),1)}}},8437:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLine=r.DEFAULT_ATTR_DATA=void 0;const h=o(3734),f=o(511),n=o(643),d=o(482);r.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let _=0;class v{constructor(e,s,t=!1){this.isWrapped=t,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*e);const i=s||f.CellData.fromCharData([0,n.NULL_CELL_CHAR,n.NULL_CELL_WIDTH,n.NULL_CELL_CODE]);for(let l=0;l>22,2097152&s?this._combined[e].charCodeAt(this._combined[e].length-1):t]}set(e,s){this._data[3*e+1]=s[n.CHAR_DATA_ATTR_INDEX],s[n.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[e]=s[1],this._data[3*e+0]=2097152|e|s[n.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*e+0]=s[n.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|s[n.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(e){return this._data[3*e+0]>>22}hasWidth(e){return 12582912&this._data[3*e+0]}getFg(e){return this._data[3*e+1]}getBg(e){return this._data[3*e+2]}hasContent(e){return 4194303&this._data[3*e+0]}getCodePoint(e){const s=this._data[3*e+0];return 2097152&s?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&s}isCombined(e){return 2097152&this._data[3*e+0]}getString(e){const s=this._data[3*e+0];return 2097152&s?this._combined[e]:2097151&s?(0,d.stringFromCodePoint)(2097151&s):""}isProtected(e){return 536870912&this._data[3*e+2]}loadCell(e,s){return _=3*e,s.content=this._data[_+0],s.fg=this._data[_+1],s.bg=this._data[_+2],2097152&s.content&&(s.combinedData=this._combined[e]),268435456&s.bg&&(s.extended=this._extendedAttrs[e]),s}setCell(e,s){2097152&s.content&&(this._combined[e]=s.combinedData),268435456&s.bg&&(this._extendedAttrs[e]=s.extended),this._data[3*e+0]=s.content,this._data[3*e+1]=s.fg,this._data[3*e+2]=s.bg}setCellFromCodePoint(e,s,t,i,l,c){268435456&l&&(this._extendedAttrs[e]=c),this._data[3*e+0]=s|t<<22,this._data[3*e+1]=i,this._data[3*e+2]=l}addCodepointToCell(e,s){let t=this._data[3*e+0];2097152&t?this._combined[e]+=(0,d.stringFromCodePoint)(s):(2097151&t?(this._combined[e]=(0,d.stringFromCodePoint)(2097151&t)+(0,d.stringFromCodePoint)(s),t&=-2097152,t|=2097152):t=s|4194304,this._data[3*e+0]=t)}insertCells(e,s,t,i){if((e%=this.length)&&this.getWidth(e-1)===2&&this.setCellFromCodePoint(e-1,0,1,(i==null?void 0:i.fg)||0,(i==null?void 0:i.bg)||0,(i==null?void 0:i.extended)||new h.ExtendedAttrs),s=0;--c)this.setCell(e+s+c,this.loadCell(e+c,l));for(let c=0;cthis.length){if(this._data.buffer.byteLength>=4*t)this._data=new Uint32Array(this._data.buffer,0,t);else{const i=new Uint32Array(t);i.set(this._data),this._data=i}for(let i=this.length;i=e&&delete this._combined[p]}const l=Object.keys(this._extendedAttrs);for(let c=0;c=e&&delete this._extendedAttrs[p]}}return this.length=e,4*t*2=0;--e)if(4194303&this._data[3*e+0])return e+(this._data[3*e+0]>>22);return 0}getNoBgTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0]||50331648&this._data[3*e+2])return e+(this._data[3*e+0]>>22);return 0}copyCellsFrom(e,s,t,i,l){const c=e._data;if(l)for(let m=i-1;m>=0;m--){for(let a=0;a<3;a++)this._data[3*(t+m)+a]=c[3*(s+m)+a];268435456&c[3*(s+m)+2]&&(this._extendedAttrs[t+m]=e._extendedAttrs[s+m])}else for(let m=0;m=s&&(this._combined[a-s+t]=e._combined[a])}}translateToString(e=!1,s=0,t=this.length){e&&(t=Math.min(t,this.getTrimmedLength()));let i="";for(;s>22||1}return i}}r.BufferLine=v},4841:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getRangeLength=void 0,r.getRangeLength=function(o,h){if(o.start.y>o.end.y)throw new Error(`Buffer range end (${o.end.x}, ${o.end.y}) cannot be before start (${o.start.x}, ${o.start.y})`);return h*(o.end.y-o.start.y)+(o.end.x-o.start.x+1)}},4634:(B,r)=>{function o(h,f,n){if(f===h.length-1)return h[f].getTrimmedLength();const d=!h[f].hasContent(n-1)&&h[f].getWidth(n-1)===1,_=h[f+1].getWidth(0)===2;return d&&_?n-1:n}Object.defineProperty(r,"__esModule",{value:!0}),r.getWrappedLineTrimmedLength=r.reflowSmallerGetNewLineLengths=r.reflowLargerApplyNewLayout=r.reflowLargerCreateNewLayout=r.reflowLargerGetLinesToRemove=void 0,r.reflowLargerGetLinesToRemove=function(h,f,n,d,_){const v=[];for(let u=0;u=u&&d0&&(a>i||t[a].getTrimmedLength()===0);a--)m++;m>0&&(v.push(u+t.length-m),v.push(m)),u+=t.length-1}return v},r.reflowLargerCreateNewLayout=function(h,f){const n=[];let d=0,_=f[d],v=0;for(let u=0;uo(h,t,f)).reduce((s,t)=>s+t);let v=0,u=0,e=0;for(;e<_;){if(_-es&&(v-=s,u++);const t=h[u].getWidth(v-1)===2;t&&v--;const i=t?n-1:n;d.push(i),e+=i}return d},r.getWrappedLineTrimmedLength=o},5295:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferSet=void 0;const h=o(8460),f=o(844),n=o(9092);class d extends f.Disposable{constructor(v,u){super(),this._optionsService=v,this._bufferService=u,this._onBufferActivate=this.register(new h.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new n.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new n.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(v){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(v),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(v,u){this._normal.resize(v,u),this._alt.resize(v,u),this.setupTabStops(v)}setupTabStops(v){this._normal.setupTabStops(v),this._alt.setupTabStops(v)}}r.BufferSet=d},511:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;const h=o(482),f=o(643),n=o(3734);class d extends n.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new n.ExtendedAttrs,this.combinedData=""}static fromCharData(v){const u=new d;return u.setFromCharData(v),u}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,h.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(v){this.fg=v[f.CHAR_DATA_ATTR_INDEX],this.bg=0;let u=!1;if(v[f.CHAR_DATA_CHAR_INDEX].length>2)u=!0;else if(v[f.CHAR_DATA_CHAR_INDEX].length===2){const e=v[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=e&&e<=56319){const s=v[f.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=s&&s<=57343?this.content=1024*(e-55296)+s-56320+65536|v[f.CHAR_DATA_WIDTH_INDEX]<<22:u=!0}else u=!0}else this.content=v[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[f.CHAR_DATA_WIDTH_INDEX]<<22;u&&(this.combinedData=v[f.CHAR_DATA_CHAR_INDEX],this.content=2097152|v[f.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=d},643:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WHITESPACE_CELL_CODE=r.WHITESPACE_CELL_WIDTH=r.WHITESPACE_CELL_CHAR=r.NULL_CELL_CODE=r.NULL_CELL_WIDTH=r.NULL_CELL_CHAR=r.CHAR_DATA_CODE_INDEX=r.CHAR_DATA_WIDTH_INDEX=r.CHAR_DATA_CHAR_INDEX=r.CHAR_DATA_ATTR_INDEX=r.DEFAULT_EXT=r.DEFAULT_ATTR=r.DEFAULT_COLOR=void 0,r.DEFAULT_COLOR=0,r.DEFAULT_ATTR=256|r.DEFAULT_COLOR<<9,r.DEFAULT_EXT=0,r.CHAR_DATA_ATTR_INDEX=0,r.CHAR_DATA_CHAR_INDEX=1,r.CHAR_DATA_WIDTH_INDEX=2,r.CHAR_DATA_CODE_INDEX=3,r.NULL_CELL_CHAR="",r.NULL_CELL_WIDTH=1,r.NULL_CELL_CODE=0,r.WHITESPACE_CELL_CHAR=" ",r.WHITESPACE_CELL_WIDTH=1,r.WHITESPACE_CELL_CODE=32},4863:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Marker=void 0;const h=o(8460),f=o(844);class n{get id(){return this._id}constructor(_){this.line=_,this.isDisposed=!1,this._disposables=[],this._id=n._nextId++,this._onDispose=this.register(new h.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,f.disposeArray)(this._disposables),this._disposables.length=0)}register(_){return this._disposables.push(_),_}}r.Marker=n,n._nextId=1},7116:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_CHARSET=r.CHARSETS=void 0,r.CHARSETS={},r.DEFAULT_CHARSET=r.CHARSETS.B,r.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},r.CHARSETS.A={"#":"£"},r.CHARSETS.B=void 0,r.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},r.CHARSETS.C=r.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},r.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},r.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},r.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},r.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},r.CHARSETS.E=r.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},r.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},r.CHARSETS.H=r.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},r.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(B,r)=>{var o,h,f;Object.defineProperty(r,"__esModule",{value:!0}),r.C1_ESCAPED=r.C1=r.C0=void 0,function(n){n.NUL="\0",n.SOH="",n.STX="",n.ETX="",n.EOT="",n.ENQ="",n.ACK="",n.BEL="\x07",n.BS="\b",n.HT=" ",n.LF=` `,n.VT="\v",n.FF="\f",n.CR="\r",n.SO="",n.SI="",n.DLE="",n.DC1="",n.DC2="",n.DC3="",n.DC4="",n.NAK="",n.SYN="",n.ETB="",n.CAN="",n.EM="",n.SUB="",n.ESC="\x1B",n.FS="",n.GS="",n.RS="",n.US="",n.SP=" ",n.DEL=""}(o||(r.C0=o={})),function(n){n.PAD="€",n.HOP="",n.BPH="‚",n.NBH="ƒ",n.IND="„",n.NEL="…",n.SSA="†",n.ESA="‡",n.HTS="ˆ",n.HTJ="‰",n.VTS="Š",n.PLD="‹",n.PLU="Œ",n.RI="",n.SS2="Ž",n.SS3="",n.DCS="",n.PU1="‘",n.PU2="’",n.STS="“",n.CCH="”",n.MW="•",n.SPA="–",n.EPA="—",n.SOS="˜",n.SGCI="™",n.SCI="š",n.CSI="›",n.ST="œ",n.OSC="",n.PM="ž",n.APC="Ÿ"}(h||(r.C1=h={})),function(n){n.ST=`${o.ESC}\\`}(f||(r.C1_ESCAPED=f={}))},7399:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.evaluateKeyboardEvent=void 0;const h=o(2584),f={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};r.evaluateKeyboardEvent=function(n,d,_,v){const u={type:0,cancel:!1,key:void 0},e=(n.shiftKey?1:0)|(n.altKey?2:0)|(n.ctrlKey?4:0)|(n.metaKey?8:0);switch(n.keyCode){case 0:n.key==="UIKeyInputUpArrow"?u.key=d?h.C0.ESC+"OA":h.C0.ESC+"[A":n.key==="UIKeyInputLeftArrow"?u.key=d?h.C0.ESC+"OD":h.C0.ESC+"[D":n.key==="UIKeyInputRightArrow"?u.key=d?h.C0.ESC+"OC":h.C0.ESC+"[C":n.key==="UIKeyInputDownArrow"&&(u.key=d?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:if(n.altKey){u.key=h.C0.ESC+h.C0.DEL;break}u.key=h.C0.DEL;break;case 9:if(n.shiftKey){u.key=h.C0.ESC+"[Z";break}u.key=h.C0.HT,u.cancel=!0;break;case 13:u.key=n.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,u.cancel=!0;break;case 27:u.key=h.C0.ESC,n.altKey&&(u.key=h.C0.ESC+h.C0.ESC),u.cancel=!0;break;case 37:if(n.metaKey)break;e?(u.key=h.C0.ESC+"[1;"+(e+1)+"D",u.key===h.C0.ESC+"[1;3D"&&(u.key=h.C0.ESC+(_?"b":"[1;5D"))):u.key=d?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(n.metaKey)break;e?(u.key=h.C0.ESC+"[1;"+(e+1)+"C",u.key===h.C0.ESC+"[1;3C"&&(u.key=h.C0.ESC+(_?"f":"[1;5C"))):u.key=d?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(n.metaKey)break;e?(u.key=h.C0.ESC+"[1;"+(e+1)+"A",_||u.key!==h.C0.ESC+"[1;3A"||(u.key=h.C0.ESC+"[1;5A")):u.key=d?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(n.metaKey)break;e?(u.key=h.C0.ESC+"[1;"+(e+1)+"B",_||u.key!==h.C0.ESC+"[1;3B"||(u.key=h.C0.ESC+"[1;5B")):u.key=d?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:n.shiftKey||n.ctrlKey||(u.key=h.C0.ESC+"[2~");break;case 46:u.key=e?h.C0.ESC+"[3;"+(e+1)+"~":h.C0.ESC+"[3~";break;case 36:u.key=e?h.C0.ESC+"[1;"+(e+1)+"H":d?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:u.key=e?h.C0.ESC+"[1;"+(e+1)+"F":d?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:n.shiftKey?u.type=2:n.ctrlKey?u.key=h.C0.ESC+"[5;"+(e+1)+"~":u.key=h.C0.ESC+"[5~";break;case 34:n.shiftKey?u.type=3:n.ctrlKey?u.key=h.C0.ESC+"[6;"+(e+1)+"~":u.key=h.C0.ESC+"[6~";break;case 112:u.key=e?h.C0.ESC+"[1;"+(e+1)+"P":h.C0.ESC+"OP";break;case 113:u.key=e?h.C0.ESC+"[1;"+(e+1)+"Q":h.C0.ESC+"OQ";break;case 114:u.key=e?h.C0.ESC+"[1;"+(e+1)+"R":h.C0.ESC+"OR";break;case 115:u.key=e?h.C0.ESC+"[1;"+(e+1)+"S":h.C0.ESC+"OS";break;case 116:u.key=e?h.C0.ESC+"[15;"+(e+1)+"~":h.C0.ESC+"[15~";break;case 117:u.key=e?h.C0.ESC+"[17;"+(e+1)+"~":h.C0.ESC+"[17~";break;case 118:u.key=e?h.C0.ESC+"[18;"+(e+1)+"~":h.C0.ESC+"[18~";break;case 119:u.key=e?h.C0.ESC+"[19;"+(e+1)+"~":h.C0.ESC+"[19~";break;case 120:u.key=e?h.C0.ESC+"[20;"+(e+1)+"~":h.C0.ESC+"[20~";break;case 121:u.key=e?h.C0.ESC+"[21;"+(e+1)+"~":h.C0.ESC+"[21~";break;case 122:u.key=e?h.C0.ESC+"[23;"+(e+1)+"~":h.C0.ESC+"[23~";break;case 123:u.key=e?h.C0.ESC+"[24;"+(e+1)+"~":h.C0.ESC+"[24~";break;default:if(!n.ctrlKey||n.shiftKey||n.altKey||n.metaKey)if(_&&!v||!n.altKey||n.metaKey)!_||n.altKey||n.ctrlKey||n.shiftKey||!n.metaKey?n.key&&!n.ctrlKey&&!n.altKey&&!n.metaKey&&n.keyCode>=48&&n.key.length===1?u.key=n.key:n.key&&n.ctrlKey&&(n.key==="_"&&(u.key=h.C0.US),n.key==="@"&&(u.key=h.C0.NUL)):n.keyCode===65&&(u.type=1);else{const s=f[n.keyCode],t=s==null?void 0:s[n.shiftKey?1:0];if(t)u.key=h.C0.ESC+t;else if(n.keyCode>=65&&n.keyCode<=90){const i=n.ctrlKey?n.keyCode-64:n.keyCode+32;let l=String.fromCharCode(i);n.shiftKey&&(l=l.toUpperCase()),u.key=h.C0.ESC+l}else if(n.keyCode===32)u.key=h.C0.ESC+(n.ctrlKey?h.C0.NUL:" ");else if(n.key==="Dead"&&n.code.startsWith("Key")){let i=n.code.slice(3,4);n.shiftKey||(i=i.toLowerCase()),u.key=h.C0.ESC+i,u.cancel=!0}}else n.keyCode>=65&&n.keyCode<=90?u.key=String.fromCharCode(n.keyCode-64):n.keyCode===32?u.key=h.C0.NUL:n.keyCode>=51&&n.keyCode<=55?u.key=String.fromCharCode(n.keyCode-51+27):n.keyCode===56?u.key=h.C0.DEL:n.keyCode===219?u.key=h.C0.ESC:n.keyCode===220?u.key=h.C0.FS:n.keyCode===221&&(u.key=h.C0.GS)}return u}},482:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(o){return o>65535?(o-=65536,String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):String.fromCharCode(o)},r.utf32ToString=function(o,h=0,f=o.length){let n="";for(let d=h;d65535?(_-=65536,n+=String.fromCharCode(55296+(_>>10))+String.fromCharCode(_%1024+56320)):n+=String.fromCharCode(_)}return n},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(o,h){const f=o.length;if(!f)return 0;let n=0,d=0;if(this._interim){const _=o.charCodeAt(d++);56320<=_&&_<=57343?h[n++]=1024*(this._interim-55296)+_-56320+65536:(h[n++]=this._interim,h[n++]=_),this._interim=0}for(let _=d;_=f)return this._interim=v,n;const u=o.charCodeAt(_);56320<=u&&u<=57343?h[n++]=1024*(v-55296)+u-56320+65536:(h[n++]=v,h[n++]=u)}else v!==65279&&(h[n++]=v)}return n}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(o,h){const f=o.length;if(!f)return 0;let n,d,_,v,u=0,e=0,s=0;if(this.interim[0]){let l=!1,c=this.interim[0];c&=(224&c)==192?31:(240&c)==224?15:7;let p,m=0;for(;(p=63&this.interim[++m])&&m<4;)c<<=6,c|=p;const a=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,g=a-m;for(;s=f)return 0;if(p=o[s++],(192&p)!=128){s--,l=!0;break}this.interim[m++]=p,c<<=6,c|=63&p}l||(a===2?c<128?s--:h[u++]=c:a===3?c<2048||c>=55296&&c<=57343||c===65279||(h[u++]=c):c<65536||c>1114111||(h[u++]=c)),this.interim.fill(0)}const t=f-4;let i=s;for(;i=f)return this.interim[0]=n,u;if(d=o[i++],(192&d)!=128){i--;continue}if(e=(31&n)<<6|63&d,e<128){i--;continue}h[u++]=e}else if((240&n)==224){if(i>=f)return this.interim[0]=n,u;if(d=o[i++],(192&d)!=128){i--;continue}if(i>=f)return this.interim[0]=n,this.interim[1]=d,u;if(_=o[i++],(192&_)!=128){i--;continue}if(e=(15&n)<<12|(63&d)<<6|63&_,e<2048||e>=55296&&e<=57343||e===65279)continue;h[u++]=e}else if((248&n)==240){if(i>=f)return this.interim[0]=n,u;if(d=o[i++],(192&d)!=128){i--;continue}if(i>=f)return this.interim[0]=n,this.interim[1]=d,u;if(_=o[i++],(192&_)!=128){i--;continue}if(i>=f)return this.interim[0]=n,this.interim[1]=d,this.interim[2]=_,u;if(v=o[i++],(192&v)!=128){i--;continue}if(e=(7&n)<<18|(63&d)<<12|(63&_)<<6|63&v,e<65536||e>1114111)continue;h[u++]=e}}return u}}},225:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV6=void 0;const o=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let f;r.UnicodeV6=class{constructor(){if(this.version="6",!f){f=new Uint8Array(65536),f.fill(1),f[0]=0,f.fill(0,1,32),f.fill(0,127,160),f.fill(2,4352,4448),f[9001]=2,f[9002]=2,f.fill(2,11904,42192),f[12351]=1,f.fill(2,44032,55204),f.fill(2,63744,64256),f.fill(2,65040,65050),f.fill(2,65072,65136),f.fill(2,65280,65377),f.fill(2,65504,65511);for(let n=0;n_[e][1])return!1;for(;e>=u;)if(v=u+e>>1,d>_[v][1])u=v+1;else{if(!(d<_[v][0]))return!0;e=v-1}return!1}(n,h)?0:n>=131072&&n<=196605||n>=196608&&n<=262141?2:1}}},5981:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WriteBuffer=void 0;const h=o(8460),f=o(844);class n extends f.Disposable{constructor(_){super(),this._action=_,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(_,v){if(v!==void 0&&this._syncCalls>v)return void(this._syncCalls=0);if(this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let u;for(this._isSyncWriting=!0;u=this._writeBuffer.shift();){this._action(u);const e=this._callbacks.shift();e&&e()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(_,v){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(v),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(v)}_innerWrite(_=0,v=!0){const u=_||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const e=this._writeBuffer[this._bufferOffset],s=this._action(e,v);if(s){const i=l=>Date.now()-u>=12?setTimeout(()=>this._innerWrite(0,l)):this._innerWrite(u,l);return void s.catch(l=>(queueMicrotask(()=>{throw l}),Promise.resolve(!1))).then(i)}const t=this._callbacks[this._bufferOffset];if(t&&t(),this._bufferOffset++,this._pendingData-=e.length,Date.now()-u>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}r.WriteBuffer=n},5941:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.toRgbString=r.parseColor=void 0;const o=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,h=/^[\da-f]+$/;function f(n,d){const _=n.toString(16),v=_.length<2?"0"+_:_;switch(d){case 4:return _[0];case 8:return v;case 12:return(v+v).slice(0,3);default:return v+v}}r.parseColor=function(n){if(!n)return;let d=n.toLowerCase();if(d.indexOf("rgb:")===0){d=d.slice(4);const _=o.exec(d);if(_){const v=_[1]?15:_[4]?255:_[7]?4095:65535;return[Math.round(parseInt(_[1]||_[4]||_[7]||_[10],16)/v*255),Math.round(parseInt(_[2]||_[5]||_[8]||_[11],16)/v*255),Math.round(parseInt(_[3]||_[6]||_[9]||_[12],16)/v*255)]}}else if(d.indexOf("#")===0&&(d=d.slice(1),h.exec(d)&&[3,6,9,12].includes(d.length))){const _=d.length/3,v=[0,0,0];for(let u=0;u<3;++u){const e=parseInt(d.slice(_*u,_*u+_),16);v[u]=_===1?e<<4:_===2?e:_===3?e>>4:e>>8}return v}},r.toRgbString=function(n,d=16){const[_,v,u]=n;return`rgb:${f(_,d)}/${f(v,d)}/${f(u,d)}`}},5770:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.PAYLOAD_LIMIT=void 0,r.PAYLOAD_LIMIT=1e7},6351:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DcsHandler=r.DcsParser=void 0;const h=o(482),f=o(8742),n=o(5770),d=[];r.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=d,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=d}registerHandler(v,u){this._handlers[v]===void 0&&(this._handlers[v]=[]);const e=this._handlers[v];return e.push(u),{dispose:()=>{const s=e.indexOf(u);s!==-1&&e.splice(s,1)}}}clearHandler(v){this._handlers[v]&&delete this._handlers[v]}setHandlerFallback(v){this._handlerFb=v}reset(){if(this._active.length)for(let v=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;v>=0;--v)this._active[v].unhook(!1);this._stack.paused=!1,this._active=d,this._ident=0}hook(v,u){if(this.reset(),this._ident=v,this._active=this._handlers[v]||d,this._active.length)for(let e=this._active.length-1;e>=0;e--)this._active[e].hook(u);else this._handlerFb(this._ident,"HOOK",u)}put(v,u,e){if(this._active.length)for(let s=this._active.length-1;s>=0;s--)this._active[s].put(v,u,e);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(v,u,e))}unhook(v,u=!0){if(this._active.length){let e=!1,s=this._active.length-1,t=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,e=u,t=this._stack.fallThrough,this._stack.paused=!1),!t&&e===!1){for(;s>=0&&(e=this._active[s].unhook(v),e!==!0);s--)if(e instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,e;s--}for(;s>=0;s--)if(e=this._active[s].unhook(!1),e instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,e}else this._handlerFb(this._ident,"UNHOOK",v);this._active=d,this._ident=0}};const _=new f.Params;_.addParam(0),r.DcsHandler=class{constructor(v){this._handler=v,this._data="",this._params=_,this._hitLimit=!1}hook(v){this._params=v.length>1||v.params[0]?v.clone():_,this._data="",this._hitLimit=!1}put(v,u,e){this._hitLimit||(this._data+=(0,h.utf32ToString)(v,u,e),this._data.length>n.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(v){let u=!1;if(this._hitLimit)u=!1;else if(v&&(u=this._handler(this._data,this._params),u instanceof Promise))return u.then(e=>(this._params=_,this._data="",this._hitLimit=!1,e));return this._params=_,this._data="",this._hitLimit=!1,u}}},2015:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.EscapeSequenceParser=r.VT500_TRANSITION_TABLE=r.TransitionTable=void 0;const h=o(844),f=o(8742),n=o(6242),d=o(6351);class _{constructor(s){this.table=new Uint8Array(s)}setDefault(s,t){this.table.fill(s<<4|t)}add(s,t,i,l){this.table[t<<8|s]=i<<4|l}addMany(s,t,i,l){for(let c=0;ca),t=(m,a)=>s.slice(m,a),i=t(32,127),l=t(0,24);l.push(25),l.push.apply(l,t(28,32));const c=t(0,14);let p;for(p in e.setDefault(1,0),e.addMany(i,0,2,0),c)e.addMany([24,26,153,154],p,3,0),e.addMany(t(128,144),p,3,0),e.addMany(t(144,152),p,3,0),e.add(156,p,0,0),e.add(27,p,11,1),e.add(157,p,4,8),e.addMany([152,158,159],p,0,7),e.add(155,p,11,3),e.add(144,p,11,9);return e.addMany(l,0,3,0),e.addMany(l,1,3,1),e.add(127,1,0,1),e.addMany(l,8,0,8),e.addMany(l,3,3,3),e.add(127,3,0,3),e.addMany(l,4,3,4),e.add(127,4,0,4),e.addMany(l,6,3,6),e.addMany(l,5,3,5),e.add(127,5,0,5),e.addMany(l,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(i,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(t(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(i,7,0,7),e.addMany(l,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(t(64,127),3,7,0),e.addMany(t(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(t(48,60),4,8,4),e.addMany(t(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(t(32,64),6,0,6),e.add(127,6,0,6),e.addMany(t(64,127),6,0,0),e.addMany(t(32,48),3,9,5),e.addMany(t(32,48),5,9,5),e.addMany(t(48,64),5,0,6),e.addMany(t(64,127),5,7,0),e.addMany(t(32,48),4,9,5),e.addMany(t(32,48),1,9,2),e.addMany(t(32,48),2,9,2),e.addMany(t(48,127),2,10,0),e.addMany(t(48,80),1,10,0),e.addMany(t(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(t(96,127),1,10,0),e.add(80,1,11,9),e.addMany(l,9,0,9),e.add(127,9,0,9),e.addMany(t(28,32),9,0,9),e.addMany(t(32,48),9,9,12),e.addMany(t(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(l,11,0,11),e.addMany(t(32,128),11,0,11),e.addMany(t(28,32),11,0,11),e.addMany(l,10,0,10),e.add(127,10,0,10),e.addMany(t(28,32),10,0,10),e.addMany(t(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(t(32,48),10,9,12),e.addMany(l,12,0,12),e.add(127,12,0,12),e.addMany(t(28,32),12,0,12),e.addMany(t(32,48),12,9,12),e.addMany(t(48,64),12,0,11),e.addMany(t(64,127),12,12,13),e.addMany(t(64,127),10,12,13),e.addMany(t(64,127),9,12,13),e.addMany(l,13,13,13),e.addMany(i,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(v,0,2,0),e.add(v,8,5,8),e.add(v,6,0,6),e.add(v,11,0,11),e.add(v,13,13,13),e}();class u extends h.Disposable{constructor(s=r.VT500_TRANSITION_TABLE){super(),this._transitions=s,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new f.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(t,i,l)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,i)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,h.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new n.OscParser),this._dcsParser=this.register(new d.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(s,t=[64,126]){let i=0;if(s.prefix){if(s.prefix.length>1)throw new Error("only one byte as prefix supported");if(i=s.prefix.charCodeAt(0),i&&60>i||i>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(s.intermediates){if(s.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let c=0;cp||p>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");i<<=8,i|=p}}if(s.final.length!==1)throw new Error("final must be a single byte");const l=s.final.charCodeAt(0);if(t[0]>l||l>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return i<<=8,i|=l,i}identToString(s){const t=[];for(;s;)t.push(String.fromCharCode(255&s)),s>>=8;return t.reverse().join("")}setPrintHandler(s){this._printHandler=s}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(s,t){const i=this._identifier(s,[48,126]);this._escHandlers[i]===void 0&&(this._escHandlers[i]=[]);const l=this._escHandlers[i];return l.push(t),{dispose:()=>{const c=l.indexOf(t);c!==-1&&l.splice(c,1)}}}clearEscHandler(s){this._escHandlers[this._identifier(s,[48,126])]&&delete this._escHandlers[this._identifier(s,[48,126])]}setEscHandlerFallback(s){this._escHandlerFb=s}setExecuteHandler(s,t){this._executeHandlers[s.charCodeAt(0)]=t}clearExecuteHandler(s){this._executeHandlers[s.charCodeAt(0)]&&delete this._executeHandlers[s.charCodeAt(0)]}setExecuteHandlerFallback(s){this._executeHandlerFb=s}registerCsiHandler(s,t){const i=this._identifier(s);this._csiHandlers[i]===void 0&&(this._csiHandlers[i]=[]);const l=this._csiHandlers[i];return l.push(t),{dispose:()=>{const c=l.indexOf(t);c!==-1&&l.splice(c,1)}}}clearCsiHandler(s){this._csiHandlers[this._identifier(s)]&&delete this._csiHandlers[this._identifier(s)]}setCsiHandlerFallback(s){this._csiHandlerFb=s}registerDcsHandler(s,t){return this._dcsParser.registerHandler(this._identifier(s),t)}clearDcsHandler(s){this._dcsParser.clearHandler(this._identifier(s))}setDcsHandlerFallback(s){this._dcsParser.setHandlerFallback(s)}registerOscHandler(s,t){return this._oscParser.registerHandler(s,t)}clearOscHandler(s){this._oscParser.clearHandler(s)}setOscHandlerFallback(s){this._oscParser.setHandlerFallback(s)}setErrorHandler(s){this._errorHandler=s}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(s,t,i,l,c){this._parseStack.state=s,this._parseStack.handlers=t,this._parseStack.handlerPos=i,this._parseStack.transition=l,this._parseStack.chunkPos=c}parse(s,t,i){let l,c=0,p=0,m=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,m=this._parseStack.chunkPos+1;else{if(i===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const a=this._parseStack.handlers;let g=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(i===!1&&g>-1){for(;g>=0&&(l=a[g](this._params),l!==!0);g--)if(l instanceof Promise)return this._parseStack.handlerPos=g,l}this._parseStack.handlers=[];break;case 4:if(i===!1&&g>-1){for(;g>=0&&(l=a[g](),l!==!0);g--)if(l instanceof Promise)return this._parseStack.handlerPos=g,l}this._parseStack.handlers=[];break;case 6:if(c=s[this._parseStack.chunkPos],l=this._dcsParser.unhook(c!==24&&c!==26,i),l)return l;c===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(c=s[this._parseStack.chunkPos],l=this._oscParser.end(c!==24&&c!==26,i),l)return l;c===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,m=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(let a=m;a>4){case 2:for(let L=a+1;;++L){if(L>=t||(c=s[L])<32||c>126&&c=t||(c=s[L])<32||c>126&&c=t||(c=s[L])<32||c>126&&c=t||(c=s[L])<32||c>126&&c=0&&(l=g[C](this._params),l!==!0);C--)if(l instanceof Promise)return this._preserveStack(3,g,C,p,a),l;C<0&&this._csiHandlerFb(this._collect<<8|c,this._params),this.precedingCodepoint=0;break;case 8:do switch(c){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(c-48)}while(++a47&&c<60);a--;break;case 9:this._collect<<=8,this._collect|=c;break;case 10:const w=this._escHandlers[this._collect<<8|c];let y=w?w.length-1:-1;for(;y>=0&&(l=w[y](),l!==!0);y--)if(l instanceof Promise)return this._preserveStack(4,w,y,p,a),l;y<0&&this._escHandlerFb(this._collect<<8|c),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|c,this._params);break;case 13:for(let L=a+1;;++L)if(L>=t||(c=s[L])===24||c===26||c===27||c>127&&c=t||(c=s[L])<32||c>127&&c{Object.defineProperty(r,"__esModule",{value:!0}),r.OscHandler=r.OscParser=void 0;const h=o(5770),f=o(482),n=[];r.OscParser=class{constructor(){this._state=0,this._active=n,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(d,_){this._handlers[d]===void 0&&(this._handlers[d]=[]);const v=this._handlers[d];return v.push(_),{dispose:()=>{const u=v.indexOf(_);u!==-1&&v.splice(u,1)}}}clearHandler(d){this._handlers[d]&&delete this._handlers[d]}setHandlerFallback(d){this._handlerFb=d}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=n}reset(){if(this._state===2)for(let d=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;d>=0;--d)this._active[d].end(!1);this._stack.paused=!1,this._active=n,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||n,this._active.length)for(let d=this._active.length-1;d>=0;d--)this._active[d].start();else this._handlerFb(this._id,"START")}_put(d,_,v){if(this._active.length)for(let u=this._active.length-1;u>=0;u--)this._active[u].put(d,_,v);else this._handlerFb(this._id,"PUT",(0,f.utf32ToString)(d,_,v))}start(){this.reset(),this._state=1}put(d,_,v){if(this._state!==3){if(this._state===1)for(;_0&&this._put(d,_,v)}}end(d,_=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let v=!1,u=this._active.length-1,e=!1;if(this._stack.paused&&(u=this._stack.loopPosition-1,v=_,e=this._stack.fallThrough,this._stack.paused=!1),!e&&v===!1){for(;u>=0&&(v=this._active[u].end(d),v!==!0);u--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=u,this._stack.fallThrough=!1,v;u--}for(;u>=0;u--)if(v=this._active[u].end(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=u,this._stack.fallThrough=!0,v}else this._handlerFb(this._id,"END",d);this._active=n,this._id=-1,this._state=0}}},r.OscHandler=class{constructor(d){this._handler=d,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(d,_,v){this._hitLimit||(this._data+=(0,f.utf32ToString)(d,_,v),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(d){let _=!1;if(this._hitLimit)_=!1;else if(d&&(_=this._handler(this._data),_ instanceof Promise))return _.then(v=>(this._data="",this._hitLimit=!1,v));return this._data="",this._hitLimit=!1,_}}},8742:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Params=void 0;const o=2147483647;class h{static fromArray(n){const d=new h;if(!n.length)return d;for(let _=Array.isArray(n[0])?1:0;_256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(n),this.length=0,this._subParams=new Int32Array(d),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(n),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const n=new h(this.maxLength,this.maxSubParamsLength);return n.params.set(this.params),n.length=this.length,n._subParams.set(this._subParams),n._subParamsLength=this._subParamsLength,n._subParamsIdx.set(this._subParamsIdx),n._rejectDigits=this._rejectDigits,n._rejectSubDigits=this._rejectSubDigits,n._digitIsSub=this._digitIsSub,n}toArray(){const n=[];for(let d=0;d>8,v=255&this._subParamsIdx[d];v-_>0&&n.push(Array.prototype.slice.call(this._subParams,_,v))}return n}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(n){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(n<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=n>o?o:n}}addSubParam(n){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(n<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=n>o?o:n,this._subParamsIdx[this.length-1]++}}hasSubParams(n){return(255&this._subParamsIdx[n])-(this._subParamsIdx[n]>>8)>0}getSubParams(n){const d=this._subParamsIdx[n]>>8,_=255&this._subParamsIdx[n];return _-d>0?this._subParams.subarray(d,_):null}getSubParamsAll(){const n={};for(let d=0;d>8,v=255&this._subParamsIdx[d];v-_>0&&(n[d]=this._subParams.slice(_,v))}return n}addDigit(n){let d;if(this._rejectDigits||!(d=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const _=this._digitIsSub?this._subParams:this.params,v=_[d-1];_[d-1]=~v?Math.min(10*v+n,o):n}}r.Params=h},5741:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.AddonManager=void 0,r.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let o=this._addons.length-1;o>=0;o--)this._addons[o].instance.dispose()}loadAddon(o,h){const f={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(f),h.dispose=()=>this._wrappedAddonDispose(f),h.activate(o)}_wrappedAddonDispose(o){if(o.isDisposed)return;let h=-1;for(let f=0;f{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferApiView=void 0;const h=o(3785),f=o(511);r.BufferApiView=class{constructor(n,d){this._buffer=n,this.type=d}init(n){return this._buffer=n,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(n){const d=this._buffer.lines.get(n);if(d)return new h.BufferLineApiView(d)}getNullCell(){return new f.CellData}}},3785:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLineApiView=void 0;const h=o(511);r.BufferLineApiView=class{constructor(f){this._line=f}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(f,n){if(!(f<0||f>=this._line.length))return n?(this._line.loadCell(f,n),n):this._line.loadCell(f,new h.CellData)}translateToString(f,n,d){return this._line.translateToString(f,n,d)}}},8285:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferNamespaceApi=void 0;const h=o(8771),f=o(8460),n=o(844);class d extends n.Disposable{constructor(v){super(),this._core=v,this._onBufferChange=this.register(new f.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new h.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new h.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}r.BufferNamespaceApi=d},7975:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ParserApi=void 0,r.ParserApi=class{constructor(o){this._core=o}registerCsiHandler(o,h){return this._core.registerCsiHandler(o,f=>h(f.toArray()))}addCsiHandler(o,h){return this.registerCsiHandler(o,h)}registerDcsHandler(o,h){return this._core.registerDcsHandler(o,(f,n)=>h(f,n.toArray()))}addDcsHandler(o,h){return this.registerDcsHandler(o,h)}registerEscHandler(o,h){return this._core.registerEscHandler(o,h)}addEscHandler(o,h){return this.registerEscHandler(o,h)}registerOscHandler(o,h){return this._core.registerOscHandler(o,h)}addOscHandler(o,h){return this.registerOscHandler(o,h)}}},7090:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeApi=void 0,r.UnicodeApi=class{constructor(o){this._core=o}register(o){this._core.unicodeService.register(o)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(o){this._core.unicodeService.activeVersion=o}}},744:function(B,r,o){var h=this&&this.__decorate||function(e,s,t,i){var l,c=arguments.length,p=c<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(l=e[m])&&(p=(c<3?l(p):c>3?l(s,t,p):l(s,t))||p);return c>3&&p&&Object.defineProperty(s,t,p),p},f=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferService=r.MINIMUM_ROWS=r.MINIMUM_COLS=void 0;const n=o(8460),d=o(844),_=o(5295),v=o(2585);r.MINIMUM_COLS=2,r.MINIMUM_ROWS=1;let u=r.BufferService=class extends d.Disposable{get buffer(){return this.buffers.active}constructor(e){super(),this.isUserScrolling=!1,this._onResize=this.register(new n.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new n.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,r.MINIMUM_COLS),this.rows=Math.max(e.rawOptions.rows||0,r.MINIMUM_ROWS),this.buffers=this.register(new _.BufferSet(e,this))}resize(e,s){this.cols=e,this.rows=s,this.buffers.resize(e,s),this._onResize.fire({cols:e,rows:s})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,s=!1){const t=this.buffer;let i;i=this._cachedBlankLine,i&&i.length===this.cols&&i.getFg(0)===e.fg&&i.getBg(0)===e.bg||(i=t.getBlankLine(e,s),this._cachedBlankLine=i),i.isWrapped=s;const l=t.ybase+t.scrollTop,c=t.ybase+t.scrollBottom;if(t.scrollTop===0){const p=t.lines.isFull;c===t.lines.length-1?p?t.lines.recycle().copyFrom(i):t.lines.push(i.clone()):t.lines.splice(c+1,0,i.clone()),p?this.isUserScrolling&&(t.ydisp=Math.max(t.ydisp-1,0)):(t.ybase++,this.isUserScrolling||t.ydisp++)}else{const p=c-l+1;t.lines.shiftElements(l+1,p-1,-1),t.lines.set(c,i.clone())}this.isUserScrolling||(t.ydisp=t.ybase),this._onScroll.fire(t.ydisp)}scrollLines(e,s,t){const i=this.buffer;if(e<0){if(i.ydisp===0)return;this.isUserScrolling=!0}else e+i.ydisp>=i.ybase&&(this.isUserScrolling=!1);const l=i.ydisp;i.ydisp=Math.max(Math.min(i.ydisp+e,i.ybase),0),l!==i.ydisp&&(s||this._onScroll.fire(i.ydisp))}};r.BufferService=u=h([f(0,v.IOptionsService)],u)},7994:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CharsetService=void 0,r.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(o){this.glevel=o,this.charset=this._charsets[o]}setgCharset(o,h){this._charsets[o]=h,this.glevel===o&&(this.charset=h)}}},1753:function(B,r,o){var h=this&&this.__decorate||function(i,l,c,p){var m,a=arguments.length,g=a<3?l:p===null?p=Object.getOwnPropertyDescriptor(l,c):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(i,l,c,p);else for(var C=i.length-1;C>=0;C--)(m=i[C])&&(g=(a<3?m(g):a>3?m(l,c,g):m(l,c))||g);return a>3&&g&&Object.defineProperty(l,c,g),g},f=this&&this.__param||function(i,l){return function(c,p){l(c,p,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreMouseService=void 0;const n=o(2585),d=o(8460),_=o(844),v={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:i=>i.button!==4&&i.action===1&&(i.ctrl=!1,i.alt=!1,i.shift=!1,!0)},VT200:{events:19,restrict:i=>i.action!==32},DRAG:{events:23,restrict:i=>i.action!==32||i.button!==3},ANY:{events:31,restrict:i=>!0}};function u(i,l){let c=(i.ctrl?16:0)|(i.shift?4:0)|(i.alt?8:0);return i.button===4?(c|=64,c|=i.action):(c|=3&i.button,4&i.button&&(c|=64),8&i.button&&(c|=128),i.action===32?c|=32:i.action!==0||l||(c|=3)),c}const e=String.fromCharCode,s={DEFAULT:i=>{const l=[u(i,!1)+32,i.col+32,i.row+32];return l[0]>255||l[1]>255||l[2]>255?"":`\x1B[M${e(l[0])}${e(l[1])}${e(l[2])}`},SGR:i=>{const l=i.action===0&&i.button!==4?"m":"M";return`\x1B[<${u(i,!0)};${i.col};${i.row}${l}`},SGR_PIXELS:i=>{const l=i.action===0&&i.button!==4?"m":"M";return`\x1B[<${u(i,!0)};${i.x};${i.y}${l}`}};let t=r.CoreMouseService=class extends _.Disposable{constructor(i,l){super(),this._bufferService=i,this._coreService=l,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new d.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const c of Object.keys(v))this.addProtocol(c,v[c]);for(const c of Object.keys(s))this.addEncoding(c,s[c]);this.reset()}addProtocol(i,l){this._protocols[i]=l}addEncoding(i,l){this._encodings[i]=l}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(i){if(!this._protocols[i])throw new Error(`unknown protocol "${i}"`);this._activeProtocol=i,this._onProtocolChange.fire(this._protocols[i].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(i){if(!this._encodings[i])throw new Error(`unknown encoding "${i}"`);this._activeEncoding=i}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(i){if(i.col<0||i.col>=this._bufferService.cols||i.row<0||i.row>=this._bufferService.rows||i.button===4&&i.action===32||i.button===3&&i.action!==32||i.button!==4&&(i.action===2||i.action===3)||(i.col++,i.row++,i.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,i,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(i))return!1;const l=this._encodings[this._activeEncoding](i);return l&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(l):this._coreService.triggerDataEvent(l,!0)),this._lastEvent=i,!0}explainEvents(i){return{down:!!(1&i),up:!!(2&i),drag:!!(4&i),move:!!(8&i),wheel:!!(16&i)}}_equalEvents(i,l,c){if(c){if(i.x!==l.x||i.y!==l.y)return!1}else if(i.col!==l.col||i.row!==l.row)return!1;return i.button===l.button&&i.action===l.action&&i.ctrl===l.ctrl&&i.alt===l.alt&&i.shift===l.shift}};r.CoreMouseService=t=h([f(0,n.IBufferService),f(1,n.ICoreService)],t)},6975:function(B,r,o){var h=this&&this.__decorate||function(t,i,l,c){var p,m=arguments.length,a=m<3?i:c===null?c=Object.getOwnPropertyDescriptor(i,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,i,l,c);else for(var g=t.length-1;g>=0;g--)(p=t[g])&&(a=(m<3?p(a):m>3?p(i,l,a):p(i,l))||a);return m>3&&a&&Object.defineProperty(i,l,a),a},f=this&&this.__param||function(t,i){return function(l,c){i(l,c,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreService=void 0;const n=o(1439),d=o(8460),_=o(844),v=o(2585),u=Object.freeze({insertMode:!1}),e=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let s=r.CoreService=class extends _.Disposable{constructor(t,i,l){super(),this._bufferService=t,this._logService=i,this._optionsService=l,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new d.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new d.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new d.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new d.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,n.clone)(u),this.decPrivateModes=(0,n.clone)(e)}reset(){this.modes=(0,n.clone)(u),this.decPrivateModes=(0,n.clone)(e)}triggerDataEvent(t,i=!1){if(this._optionsService.rawOptions.disableStdin)return;const l=this._bufferService.buffer;i&&this._optionsService.rawOptions.scrollOnUserInput&&l.ybase!==l.ydisp&&this._onRequestScrollToBottom.fire(),i&&this._onUserInput.fire(),this._logService.debug(`sending data "${t}"`,()=>t.split("").map(c=>c.charCodeAt(0))),this._onData.fire(t)}triggerBinaryEvent(t){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${t}"`,()=>t.split("").map(i=>i.charCodeAt(0))),this._onBinary.fire(t))}};r.CoreService=s=h([f(0,v.IBufferService),f(1,v.ILogService),f(2,v.IOptionsService)],s)},9074:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DecorationService=void 0;const h=o(8055),f=o(8460),n=o(844),d=o(6106);let _=0,v=0;class u extends n.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new d.SortedList(t=>t==null?void 0:t.marker.line),this._onDecorationRegistered=this.register(new f.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new f.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,n.toDisposable)(()=>this.reset()))}registerDecoration(t){if(t.marker.isDisposed)return;const i=new e(t);if(i){const l=i.marker.onDispose(()=>i.dispose());i.onDispose(()=>{i&&(this._decorations.delete(i)&&this._onDecorationRemoved.fire(i),l.dispose())}),this._decorations.insert(i),this._onDecorationRegistered.fire(i)}return i}reset(){for(const t of this._decorations.values())t.dispose();this._decorations.clear()}*getDecorationsAtCell(t,i,l){var c,p,m;let a=0,g=0;for(const C of this._decorations.getKeyIterator(i))a=(c=C.options.x)!==null&&c!==void 0?c:0,g=a+((p=C.options.width)!==null&&p!==void 0?p:1),t>=a&&t{var m,a,g;_=(m=p.options.x)!==null&&m!==void 0?m:0,v=_+((a=p.options.width)!==null&&a!==void 0?a:1),t>=_&&t{Object.defineProperty(r,"__esModule",{value:!0}),r.InstantiationService=r.ServiceCollection=void 0;const h=o(2585),f=o(8343);class n{constructor(..._){this._entries=new Map;for(const[v,u]of _)this.set(v,u)}set(_,v){const u=this._entries.get(_);return this._entries.set(_,v),u}forEach(_){for(const[v,u]of this._entries.entries())_(v,u)}has(_){return this._entries.has(_)}get(_){return this._entries.get(_)}}r.ServiceCollection=n,r.InstantiationService=class{constructor(){this._services=new n,this._services.set(h.IInstantiationService,this)}setService(d,_){this._services.set(d,_)}getService(d){return this._services.get(d)}createInstance(d,..._){const v=(0,f.getServiceDependencies)(d).sort((s,t)=>s.index-t.index),u=[];for(const s of v){const t=this._services.get(s.id);if(!t)throw new Error(`[createInstance] ${d.name} depends on UNKNOWN service ${s.id}.`);u.push(t)}const e=v.length>0?v[0].index:_.length;if(_.length!==e)throw new Error(`[createInstance] First service dependency of ${d.name} at position ${e+1} conflicts with ${_.length} static arguments`);return new d(..._,...u)}}},7866:function(B,r,o){var h=this&&this.__decorate||function(e,s,t,i){var l,c=arguments.length,p=c<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(l=e[m])&&(p=(c<3?l(p):c>3?l(s,t,p):l(s,t))||p);return c>3&&p&&Object.defineProperty(s,t,p),p},f=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;const n=o(844),d=o(2585),_={trace:d.LogLevelEnum.TRACE,debug:d.LogLevelEnum.DEBUG,info:d.LogLevelEnum.INFO,warn:d.LogLevelEnum.WARN,error:d.LogLevelEnum.ERROR,off:d.LogLevelEnum.OFF};let v,u=r.LogService=class extends n.Disposable{get logLevel(){return this._logLevel}constructor(e){super(),this._optionsService=e,this._logLevel=d.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),v=this}_updateLogLevel(){this._logLevel=_[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let s=0;sJSON.stringify(p)).join(", ")})`);const c=i.apply(this,l);return v.trace(`GlyphRenderer#${i.name} return`,c),c}}},7302:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OptionsService=r.DEFAULT_OPTIONS=void 0;const h=o(8460),f=o(844),n=o(6114);r.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:n.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const d=["normal","bold","100","200","300","400","500","600","700","800","900"];class _ extends f.Disposable{constructor(u){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const e=Object.assign({},r.DEFAULT_OPTIONS);for(const s in u)if(s in e)try{const t=u[s];e[s]=this._sanitizeAndValidateOption(s,t)}catch(t){console.error(t)}this.rawOptions=e,this.options=Object.assign({},e),this._setupOptions()}onSpecificOptionChange(u,e){return this.onOptionChange(s=>{s===u&&e(this.rawOptions[u])})}onMultipleOptionChange(u,e){return this.onOptionChange(s=>{u.indexOf(s)!==-1&&e()})}_setupOptions(){const u=s=>{if(!(s in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${s}"`);return this.rawOptions[s]},e=(s,t)=>{if(!(s in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${s}"`);t=this._sanitizeAndValidateOption(s,t),this.rawOptions[s]!==t&&(this.rawOptions[s]=t,this._onOptionChange.fire(s))};for(const s in this.rawOptions){const t={get:u.bind(this,s),set:e.bind(this,s)};Object.defineProperty(this.options,s,t)}}_sanitizeAndValidateOption(u,e){switch(u){case"cursorStyle":if(e||(e=r.DEFAULT_OPTIONS[u]),!function(s){return s==="block"||s==="underline"||s==="bar"}(e))throw new Error(`"${e}" is not a valid value for ${u}`);break;case"wordSeparator":e||(e=r.DEFAULT_OPTIONS[u]);break;case"fontWeight":case"fontWeightBold":if(typeof e=="number"&&1<=e&&e<=1e3)break;e=d.includes(e)?e:r.DEFAULT_OPTIONS[u];break;case"cursorWidth":e=Math.floor(e);case"lineHeight":case"tabStopWidth":if(e<1)throw new Error(`${u} cannot be less than 1, value: ${e}`);break;case"minimumContrastRatio":e=Math.max(1,Math.min(21,Math.round(10*e)/10));break;case"scrollback":if((e=Math.min(e,4294967295))<0)throw new Error(`${u} cannot be less than 0, value: ${e}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(e<=0)throw new Error(`${u} cannot be less than or equal to 0, value: ${e}`);break;case"rows":case"cols":if(!e&&e!==0)throw new Error(`${u} must be numeric, value: ${e}`);break;case"windowsPty":e=e??{}}return e}}r.OptionsService=_},2660:function(B,r,o){var h=this&&this.__decorate||function(_,v,u,e){var s,t=arguments.length,i=t<3?v:e===null?e=Object.getOwnPropertyDescriptor(v,u):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(_,v,u,e);else for(var l=_.length-1;l>=0;l--)(s=_[l])&&(i=(t<3?s(i):t>3?s(v,u,i):s(v,u))||i);return t>3&&i&&Object.defineProperty(v,u,i),i},f=this&&this.__param||function(_,v){return function(u,e){v(u,e,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkService=void 0;const n=o(2585);let d=r.OscLinkService=class{constructor(_){this._bufferService=_,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(_){const v=this._bufferService.buffer;if(_.id===void 0){const l=v.addMarker(v.ybase+v.y),c={data:_,id:this._nextId++,lines:[l]};return l.onDispose(()=>this._removeMarkerFromLink(c,l)),this._dataByLinkId.set(c.id,c),c.id}const u=_,e=this._getEntryIdKey(u),s=this._entriesWithId.get(e);if(s)return this.addLineToLink(s.id,v.ybase+v.y),s.id;const t=v.addMarker(v.ybase+v.y),i={id:this._nextId++,key:this._getEntryIdKey(u),data:u,lines:[t]};return t.onDispose(()=>this._removeMarkerFromLink(i,t)),this._entriesWithId.set(i.key,i),this._dataByLinkId.set(i.id,i),i.id}addLineToLink(_,v){const u=this._dataByLinkId.get(_);if(u&&u.lines.every(e=>e.line!==v)){const e=this._bufferService.buffer.addMarker(v);u.lines.push(e),e.onDispose(()=>this._removeMarkerFromLink(u,e))}}getLinkData(_){var v;return(v=this._dataByLinkId.get(_))===null||v===void 0?void 0:v.data}_getEntryIdKey(_){return`${_.id};;${_.uri}`}_removeMarkerFromLink(_,v){const u=_.lines.indexOf(v);u!==-1&&(_.lines.splice(u,1),_.lines.length===0&&(_.data.id!==void 0&&this._entriesWithId.delete(_.key),this._dataByLinkId.delete(_.id)))}};r.OscLinkService=d=h([f(0,n.IBufferService)],d)},8343:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;const o="di$target",h="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(f){return f[h]||[]},r.createDecorator=function(f){if(r.serviceRegistry.has(f))return r.serviceRegistry.get(f);const n=function(d,_,v){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(u,e,s){e[o]===e?e[h].push({id:u,index:s}):(e[h]=[{id:u,index:s}],e[o]=e)})(n,d,v)};return n.toString=()=>f,r.serviceRegistry.set(f,n),n}},2585:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IDecorationService=r.IUnicodeService=r.IOscLinkService=r.IOptionsService=r.ILogService=r.LogLevelEnum=r.IInstantiationService=r.ICharsetService=r.ICoreService=r.ICoreMouseService=r.IBufferService=void 0;const h=o(8343);var f;r.IBufferService=(0,h.createDecorator)("BufferService"),r.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),r.ICoreService=(0,h.createDecorator)("CoreService"),r.ICharsetService=(0,h.createDecorator)("CharsetService"),r.IInstantiationService=(0,h.createDecorator)("InstantiationService"),function(n){n[n.TRACE=0]="TRACE",n[n.DEBUG=1]="DEBUG",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.OFF=5]="OFF"}(f||(r.LogLevelEnum=f={})),r.ILogService=(0,h.createDecorator)("LogService"),r.IOptionsService=(0,h.createDecorator)("OptionsService"),r.IOscLinkService=(0,h.createDecorator)("OscLinkService"),r.IUnicodeService=(0,h.createDecorator)("UnicodeService"),r.IDecorationService=(0,h.createDecorator)("DecorationService")},1480:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;const h=o(8460),f=o(225);r.UnicodeService=class{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new h.EventEmitter,this.onChange=this._onChange.event;const n=new f.UnicodeV6;this.register(n),this._active=n.version,this._activeProvider=n}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(n){if(!this._providers[n])throw new Error(`unknown Unicode version "${n}"`);this._active=n,this._activeProvider=this._providers[n],this._onChange.fire(n)}register(n){this._providers[n.version]=n}wcwidth(n){return this._activeProvider.wcwidth(n)}getStringCellWidth(n){let d=0;const _=n.length;for(let v=0;v<_;++v){let u=n.charCodeAt(v);if(55296<=u&&u<=56319){if(++v>=_)return d+this.wcwidth(u);const e=n.charCodeAt(v);56320<=e&&e<=57343?u=1024*(u-55296)+e-56320+65536:d+=this.wcwidth(e)}d+=this.wcwidth(u)}return d}}}},M={};function F(B){var r=M[B];if(r!==void 0)return r.exports;var o=M[B]={exports:{}};return A[B].call(o.exports,o,o.exports,F),o.exports}var U={};return(()=>{var B=U;Object.defineProperty(B,"__esModule",{value:!0}),B.Terminal=void 0;const r=F(9042),o=F(3236),h=F(844),f=F(5741),n=F(8285),d=F(7975),_=F(7090),v=["cols","rows"];class u extends h.Disposable{constructor(s){super(),this._core=this.register(new o.Terminal(s)),this._addonManager=this.register(new f.AddonManager),this._publicOptions=Object.assign({},this._core.options);const t=l=>this._core.options[l],i=(l,c)=>{this._checkReadonlyOptions(l),this._core.options[l]=c};for(const l in this._core.options){const c={get:t.bind(this,l),set:i.bind(this,l)};Object.defineProperty(this._publicOptions,l,c)}}_checkReadonlyOptions(s){if(v.includes(s))throw new Error(`Option "${s}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new d.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new _.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new n.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const s=this._core.coreService.decPrivateModes;let t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any"}return{applicationCursorKeysMode:s.applicationCursorKeys,applicationKeypadMode:s.applicationKeypad,bracketedPasteMode:s.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:s.origin,reverseWraparoundMode:s.reverseWraparound,sendFocusMode:s.sendFocus,wraparoundMode:s.wraparound}}get options(){return this._publicOptions}set options(s){for(const t in s)this._publicOptions[t]=s[t]}blur(){this._core.blur()}focus(){this._core.focus()}resize(s,t){this._verifyIntegers(s,t),this._core.resize(s,t)}open(s){this._core.open(s)}attachCustomKeyEventHandler(s){this._core.attachCustomKeyEventHandler(s)}registerLinkProvider(s){return this._core.registerLinkProvider(s)}registerCharacterJoiner(s){return this._checkProposedApi(),this._core.registerCharacterJoiner(s)}deregisterCharacterJoiner(s){this._checkProposedApi(),this._core.deregisterCharacterJoiner(s)}registerMarker(s=0){return this._verifyIntegers(s),this._core.registerMarker(s)}registerDecoration(s){var t,i,l;return this._checkProposedApi(),this._verifyPositiveIntegers((t=s.x)!==null&&t!==void 0?t:0,(i=s.width)!==null&&i!==void 0?i:0,(l=s.height)!==null&&l!==void 0?l:0),this._core.registerDecoration(s)}hasSelection(){return this._core.hasSelection()}select(s,t,i){this._verifyIntegers(s,t,i),this._core.select(s,t,i)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(s,t){this._verifyIntegers(s,t),this._core.selectLines(s,t)}dispose(){super.dispose()}scrollLines(s){this._verifyIntegers(s),this._core.scrollLines(s)}scrollPages(s){this._verifyIntegers(s),this._core.scrollPages(s)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(s){this._verifyIntegers(s),this._core.scrollToLine(s)}clear(){this._core.clear()}write(s,t){this._core.write(s,t)}writeln(s,t){this._core.write(s),this._core.write(`\r -`,t)}paste(s){this._core.paste(s)}refresh(s,t){this._verifyIntegers(s,t),this._core.refresh(s,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(s){this._addonManager.loadAddon(this,s)}static get strings(){return r}_verifyIntegers(...s){for(const t of s)if(t===1/0||isNaN(t)||t%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...s){for(const t of s)if(t&&(t===1/0||isNaN(t)||t%1!=0||t<0))throw new Error("This API only accepts positive integers")}}B.Terminal=u})(),U})())})(lt);var _s=lt.exports,ct={exports:{}};(function(T,D){(function(A,M){T.exports=M()})(self,()=>(()=>{var A={};return(()=>{var M=A;Object.defineProperty(M,"__esModule",{value:!0}),M.FitAddon=void 0,M.FitAddon=class{activate(F){this._terminal=F}dispose(){}fit(){const F=this.proposeDimensions();if(!F||!this._terminal||isNaN(F.cols)||isNaN(F.rows))return;const U=this._terminal._core;this._terminal.rows===F.rows&&this._terminal.cols===F.cols||(U._renderService.clear(),this._terminal.resize(F.cols,F.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const F=this._terminal._core,U=F._renderService.dimensions;if(U.css.cell.width===0||U.css.cell.height===0)return;const B=this._terminal.options.scrollback===0?0:F.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),h=Math.max(0,parseInt(r.getPropertyValue("width"))),f=window.getComputedStyle(this._terminal.element),n=o-(parseInt(f.getPropertyValue("padding-top"))+parseInt(f.getPropertyValue("padding-bottom"))),d=h-(parseInt(f.getPropertyValue("padding-right"))+parseInt(f.getPropertyValue("padding-left")))-B;return{cols:Math.max(2,Math.floor(d/U.css.cell.width)),rows:Math.max(1,Math.floor(n/U.css.cell.height))}}}})(),A})())})(ct);var fs=ct.exports;const dt=1,we=6,Ie=16,Te=we+Ie,le={IN:2,OUT:3,RESIZE:4,META:5,CLOSE:6,ATTACH:16,REPLAY_PROGRESS:19,PING:32,PONG:33,PASTE_IMAGE:51,CLAIM_DRIVER:52,PASTE_FILE:55},vs=new Uint8Array(16);function ge(T,D,A){const M=A??new Uint8Array(0),F=new Uint8Array(we+Ie+M.length),U=new DataView(F.buffer);return F[0]=dt,F[1]=T,U.setUint32(2,M.length,!1),F.set(D??vs,we),F.set(M,we+Ie),F}function ps(T){if(T.length{this.listeners.delete(D)}}emit(){for(const D of this.listeners)try{D()}catch{}}setState(D,A){if(this.state!==D){if(D==="reconnecting")this.pendingReconnect=!0,this.reconnectStartAt=A;else if(this.pendingReconnect&&D==="connected"){const M={at_ms:this.reconnectStartAt,reason:this.pendingReason,duration_ms:A-this.reconnectStartAt};this.reconnects.push(M),this.reconnects.length>Je&&(this.reconnects=this.reconnects.slice(-Je)),this.pendingReconnect=!1,this.pendingReason=""}this.state=D,this.emit()}}setReconnectReason(D,A){this.pendingReason=D}onPongRTT(D,A){this.rttRing[this.rttHead]={at_ms:A,rtt_ms:D},this.rttHead=(this.rttHead+1)%Ue,this.rttHead===0&&(this.rttFilled=!0)}onBytesIn(D,A){this.rollover(A),this.bytesInBucket+=D}onBytesOut(D,A){this.rollover(A),this.bytesOutBucket+=D}tick(D){this.rollover(D)}rollover(D){const A=Math.floor(D/1e3);A!==this.bytesBucketSec&&(this.bytesInPerSec=Me*this.bytesInBucket+(1-Me)*this.bytesInPerSec,this.bytesOutPerSec=Me*this.bytesOutBucket+(1-Me)*this.bytesOutPerSec,this.bytesInBucket=0,this.bytesOutBucket=0,this.bytesBucketSec=A)}onSeqGap(){this.seqGaps+=1}snapshot(D){const A=this.orderedRTT(),M={state:this.state,rtt:{last_ms:null,p50_ms:null,p95_ms:null},rtt_samples:A,reconnect:{count_last_hour:0,last_at_ms:null,last_reason:"",history:this.reconnects.slice()},bytes:{in_per_sec:Math.round(this.bytesInPerSec),out_per_sec:Math.round(this.bytesOutPerSec)},seq_gaps:this.seqGaps};if(A.length>0){M.rtt.last_ms=A[A.length-1].rtt_ms;const U=A.map(B=>B.rtt_ms).sort((B,r)=>B-r);M.rtt.p50_ms=Ye(U,50),M.rtt.p95_ms=Ye(U,95)}const F=D-bs;if(M.reconnect.count_last_hour=this.reconnects.filter(U=>U.at_ms>=F).length,this.reconnects.length>0){const U=this.reconnects[this.reconnects.length-1];M.reconnect.last_at_ms=U.at_ms,M.reconnect.last_reason=U.reason}return M}orderedRTT(){return this.rttFilled?this.rttRing.slice(this.rttHead).concat(this.rttRing.slice(0,this.rttHead)):this.rttRing.slice(0,this.rttHead)}}function Ye(T,D){if(T.length===0)return 0;if(D<=0)return T[0];if(D>=100)return T[T.length-1];const A=Math.floor(D*T.length/100);return T[Math.min(A,T.length-1)]}const ys=5e3,ws=1e3,Es=500,ks=8e3;class Ls{constructor(D,A={}){Q(this,"sessionId");Q(this,"sidBytes");Q(this,"handlers");Q(this,"ws",null);Q(this,"pendingInputs",[]);Q(this,"lastSeq",0);Q(this,"detached",!1);Q(this,"reconnectAttempts",0);Q(this,"consecutiveFailures",0);Q(this,"firstFailureAt",null);Q(this,"reconnectTimer",null);Q(this,"lastSentCols",null);Q(this,"lastSentRows",null);Q(this,"clientID",crypto.randomUUID());Q(this,"clientName","web");Q(this,"currentDriverClientID","");Q(this,"health",new Cs);Q(this,"pingTimer",null);Q(this,"tickTimer",null);Q(this,"lastSeqForGap",0);this.sessionId=D,this.sidBytes=Ss(D),this.handlers=A}getHealth(){return this.health.snapshot(Date.now())}onHealthChange(D){return this.health.onChange(D)}attach(){this.detached||this.openWS()}detach(){if(this.detached=!0,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.stopHealthLoops(),this.health.setState("closed",Date.now()),this.ws){try{this.ws.close()}catch{}this.ws=null}}sendInput(D){if(!this.ws||this.ws.readyState===WebSocket.CONNECTING){this.pendingInputs.push(D);return}if(this.ws.readyState!==WebSocket.OPEN)return;const A=ge(le.IN,this.sidBytes,new TextEncoder().encode(D));this.ws.send(A),this.health.onBytesOut(A.byteLength,Date.now())}sendResize(D,A){if(D===this.lastSentCols&&A===this.lastSentRows||!this.ws||this.ws.readyState!==WebSocket.OPEN)return;const M=ge(le.RESIZE,this.sidBytes,ms(D,A));this.ws.send(M),this.health.onBytesOut(M.byteLength,Date.now()),this.lastSentCols=D,this.lastSentRows=A}claimDriver(){if(!this.ws||this.ws.readyState!==WebSocket.OPEN)return;const D=new TextEncoder().encode(JSON.stringify({client_id:this.clientID,client_name:this.clientName})),A=ge(le.CLAIM_DRIVER,this.sidBytes,D);this.ws.send(A),this.health.onBytesOut(A.byteLength,Date.now())}sendPasteImage(D,A="clipboard-image"){return(async()=>{if(!this.ws||this.ws.readyState!==WebSocket.OPEN)return!1;const M=await D.arrayBuffer(),F=Qe(new Uint8Array(M)),U=new TextEncoder().encode(JSON.stringify({filename:A,content_type:D.type||"image/png",data:F})),B=ge(le.PASTE_IMAGE,this.sidBytes,U);return this.ws.send(B),this.health.onBytesOut(B.byteLength,Date.now()),!0})()}sendPasteFile(D,A){return(async()=>{if(!this.ws||this.ws.readyState!==WebSocket.OPEN)return!1;const M=await D.arrayBuffer(),F=Qe(new Uint8Array(M)),U=new TextEncoder().encode(JSON.stringify({filename:A,content_type:D.type||"application/octet-stream",data:F})),B=ge(le.PASTE_FILE,this.sidBytes,U);return this.ws.send(B),this.health.onBytesOut(B.byteLength,Date.now()),!0})()}startHealthLoops(D){this.stopHealthLoops(),this.tickTimer=setInterval(()=>{this.health.tick(Date.now())},ws),this.pingTimer=setInterval(()=>{if(D.readyState!==WebSocket.OPEN)return;const A=Date.now(),M=new Uint8Array(8),F=new DataView(M.buffer);F.setUint32(0,Math.floor(A/4294967296),!1),F.setUint32(4,A>>>0,!1);const U=ge(le.PING,this.sidBytes,M);D.send(U),this.health.onBytesOut(U.byteLength,Date.now())},ys)}stopHealthLoops(){this.pingTimer!==null&&(clearInterval(this.pingTimer),this.pingTimer=null),this.tickTimer!==null&&(clearInterval(this.tickTimer),this.tickTimer=null)}decryptOut(D,A){if(D.length<41||D[0]!==1)return D;const F=Ke();return F?Pt(D,F,this.sessionId,A):null}openWS(){var U,B;if(this.detached)return;const D=Ds("/client"),A=Ve(),M=A!=null&&A.sessionToken?[`atterm-token.${A.sessionToken}`]:[],F=new WebSocket(D,M);F.binaryType="arraybuffer",this.ws=F,this.health.setState(this.reconnectAttempts===0?"connecting":"reconnecting",Date.now()),(B=(U=this.handlers).onStatus)==null||B.call(U,this.reconnectAttempts===0?"connecting":"reconnecting"),F.onopen=()=>{var h,f;this.reconnectAttempts=0,this.consecutiveFailures=0,this.firstFailureAt=null,this.health.setState("connected",Date.now()),(f=(h=this.handlers).onStatus)==null||f.call(h,"attached");const r=new TextEncoder().encode(JSON.stringify({session_id:this.sessionId,since_seq:this.lastSeq,client_id:this.clientID,client_name:this.clientName})),o=ge(le.ATTACH,this.sidBytes,r);if(F.send(o),this.health.onBytesOut(o.byteLength,Date.now()),this.pendingInputs.length>0){const n=this.pendingInputs;this.pendingInputs=[];for(const d of n){const _=ge(le.IN,this.sidBytes,new TextEncoder().encode(d));F.send(_),this.health.onBytesOut(_.byteLength,Date.now())}}this.startHealthLoops(F)},F.onmessage=r=>{var f,n,d,_,v,u,e,s,t,i,l,c;const o=new Uint8Array(r.data);this.health.onBytesIn(o.byteLength,Date.now());let h;try{h=ps(o)}catch{return}switch(h.type){case le.OUT:{const{seq:p,data:m}=gs(h.payload);this.lastSeqForGap!==0&&p>this.lastSeqForGap+1&&this.health.onSeqGap(),this.lastSeqForGap=p,p>this.lastSeq&&(this.lastSeq=p);const a=this.decryptOut(m,p);a&&((n=(f=this.handlers).onOutput)==null||n.call(f,a,p));break}case le.PONG:{if(h.payload.length===8){const p=new DataView(h.payload.buffer,h.payload.byteOffset,h.payload.byteLength),m=p.getUint32(0,!1),a=p.getUint32(4,!1),g=m*4294967296+a,C=Date.now()-g;C>=0&&C<6e4&&this.health.onPongRTT(C,Date.now())}break}case le.META:{try{const p=JSON.parse(new TextDecoder().decode(h.payload)),m=Ke();if(m&&typeof p.sealed=="string"&&p.sealed.length>0){const C=Rs(p.sealed),w=Ht(C,m,this.sessionId);w&&(w.cwd!==void 0&&(p.cwd=w.cwd),w.title!==void 0&&(p.title=w.title),w.current_command!==void 0&&(p.current_command=w.current_command))}(_=(d=this.handlers).onMeta)==null||_.call(d,p);const a=String(p.driver_client_id??""),g=String(p.driver_client_name??"");a!==this.currentDriverClientID&&(this.currentDriverClientID=a,(u=(v=this.handlers).onDriverChange)==null||u.call(v,a,a!==""&&a===this.clientID,g))}catch{}break}case le.CLOSE:{let p={exit_code:0};try{p=JSON.parse(new TextDecoder().decode(h.payload))}catch{}(s=(e=this.handlers).onClose)==null||s.call(e,p),(i=(t=this.handlers).onStatus)==null||i.call(t,"ended");break}case le.REPLAY_PROGRESS:{try{(c=(l=this.handlers).onReplayProgress)==null||c.call(l,JSON.parse(new TextDecoder().decode(h.payload)))}catch{}break}}},F.onclose=r=>{var n,d;if(this.ws=null,this.stopHealthLoops(),this.detached){this.health.setState("closed",Date.now());return}const o=r.code?`ws_close_${r.code}`:"ws_close";this.health.setReconnectReason(o,Date.now()),this.health.setState("reconnecting",Date.now()),this.consecutiveFailures+=1,this.firstFailureAt===null&&(this.firstFailureAt=Date.now());const h=Bs({consecutiveFailures:this.consecutiveFailures,firstFailureAt:this.firstFailureAt,now:Date.now()});(d=(n=this.handlers).onStatus)==null||d.call(n,h?"lost":"reconnecting");const f=Math.min(ks,Es*Math.pow(2,this.reconnectAttempts++));this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.openWS()},f)},F.onerror=()=>{}}}function Ze(T,D){const A=new URL(T);return`${A.protocol==="https:"?"wss:":"ws:"}//${A.host}${D}`}function Ds(T){const D=Ve();if(D!=null&&D.homeInstanceURL)return Ze(D.homeInstanceURL,T);if(mt()){const M=D==null?void 0:D.baseURL;if(!M)throw new ot(0,"relay_not_configured",null);return Ze(M,T)}return typeof location>"u"?`ws://localhost${T}`:`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}${T}`}function Qe(T){let D="";for(let A=0;A=As?!0:T.firstFailureAt!==null&&T.now-T.firstFailureAt>=xs?T.consecutiveFailures>0:!1}const Ts=Object.freeze([{id:"default-yes",label:"yes",text:"yes"},{id:"default-ok",label:"ok",text:"ok"},{id:"default-continue",label:"continue",text:"continue"},{id:"default-commit",label:"commit",text:"commit"},{id:"default-push",label:"push",text:"push"},{id:"default-release",label:"release",text:"release"},{id:"default-1",label:"1",text:"1"},{id:"default-2",label:"2",text:"2"},{id:"default-3",label:"3",text:"3"}]);async function Ms(T){const D=await T.load();return D.length>0?D:Ts}const Ne="atterm.templates",Is={load(){return new Promise(T=>{if(typeof localStorage>"u")return T([]);const D=localStorage.getItem(Ne);if(!D)return T([]);try{const A=JSON.parse(D);T(Array.isArray(A)?A:[])}catch{T([])}})},save(T){return new Promise(D=>{if(typeof localStorage>"u")return D();localStorage.setItem(Ne,JSON.stringify(T));try{localStorage.setItem("atterm.quick_templates.value",JSON.stringify(T))}catch{}St(async()=>{const{notifyLocalChange:A}=await import("./prefsSync-C6s4W7Ql.js");return{notifyLocalChange:A}},__vite__mapDeps([0,1,2,3])).then(({notifyLocalChange:A})=>{A("quick_templates")}).catch(()=>{}),D()})},clear(){return new Promise(T=>{if(typeof localStorage>"u")return T();localStorage.removeItem(Ne),T()})}},Os={class:"term-view"},Ps={href:"/setup.html"},Hs={class:"term-wrap"},Fs={key:0,class:"replay-overlay","data-testid":"replay-progress"},$s={class:"replay-text"},Us={class:"replay-track","aria-hidden":"true"},Ns={key:1,class:"viewer-overlay","data-testid":"viewer-overlay"},Ws={class:"viewer-card"},js={class:"viewer-title"},zs={key:1,class:"template-bar","data-testid":"template-bar"},qs=["data-testid","onClick"],Ks={class:"status-line","data-testid":"status-line"},Vs=_e({__name:"TerminalView",props:{sessionId:{},focusInput:{type:Boolean}},emits:["request-paste","request-copy"],setup(T,{expose:D,emit:A}){const M=T,F=ne("connecting"),U=ne(null),B=ne(!0),r=ne(null),o=ne([]),h=ne(typeof localStorage<"u"&&localStorage.getItem("atterm.templates.hidden")==="1"),{t:f}=Le();let n=null,d=null,_=null,v=null;const u={background:"#000000"},e=he(()=>f(`terminal.statuses.${F.value}`));function s(){return!U.value||U.value.total_bytes===0?0:Math.min(100,Math.round(U.value.bytes/U.value.total_bytes*100))}function t(){if(!(!d||!n))try{d.fit()}catch{}}function i(){const a=n;a&&a.write("",()=>{n===a&&a.scrollToBottom()})}function l(){n=new _s.Terminal({fontFamily:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",fontSize:13,theme:u,cursorBlink:!0,convertEol:!1,scrollback:2e4,allowProposedApi:!0}),d=new fs.FitAddon,n.loadAddon(d),n.open(r.value),t(),M.focusInput&&n.focus(),n.onData(a=>{_==null||_.sendInput(a)}),n.onResize(({cols:a,rows:g})=>{_==null||_.sendResize(a,g)}),v=new ResizeObserver(()=>t()),v.observe(r.value)}function c(){_=new Ls(M.sessionId,{onOutput:a=>{n==null||n.write(a)},onMeta:a=>{},onClose:a=>{n==null||n.write(`\r +`,t)}paste(s){this._core.paste(s)}refresh(s,t){this._verifyIntegers(s,t),this._core.refresh(s,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(s){this._addonManager.loadAddon(this,s)}static get strings(){return r}_verifyIntegers(...s){for(const t of s)if(t===1/0||isNaN(t)||t%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...s){for(const t of s)if(t&&(t===1/0||isNaN(t)||t%1!=0||t<0))throw new Error("This API only accepts positive integers")}}B.Terminal=u})(),U})())})(lt);var _s=lt.exports,ct={exports:{}};(function(T,D){(function(A,M){T.exports=M()})(self,()=>(()=>{var A={};return(()=>{var M=A;Object.defineProperty(M,"__esModule",{value:!0}),M.FitAddon=void 0,M.FitAddon=class{activate(F){this._terminal=F}dispose(){}fit(){const F=this.proposeDimensions();if(!F||!this._terminal||isNaN(F.cols)||isNaN(F.rows))return;const U=this._terminal._core;this._terminal.rows===F.rows&&this._terminal.cols===F.cols||(U._renderService.clear(),this._terminal.resize(F.cols,F.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const F=this._terminal._core,U=F._renderService.dimensions;if(U.css.cell.width===0||U.css.cell.height===0)return;const B=this._terminal.options.scrollback===0?0:F.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),h=Math.max(0,parseInt(r.getPropertyValue("width"))),f=window.getComputedStyle(this._terminal.element),n=o-(parseInt(f.getPropertyValue("padding-top"))+parseInt(f.getPropertyValue("padding-bottom"))),d=h-(parseInt(f.getPropertyValue("padding-right"))+parseInt(f.getPropertyValue("padding-left")))-B;return{cols:Math.max(2,Math.floor(d/U.css.cell.width)),rows:Math.max(1,Math.floor(n/U.css.cell.height))}}}})(),A})())})(ct);var fs=ct.exports;const dt=1,we=6,Ie=16,Te=we+Ie,le={IN:2,OUT:3,RESIZE:4,META:5,CLOSE:6,ATTACH:16,REPLAY_PROGRESS:19,PING:32,PONG:33,PASTE_IMAGE:51,CLAIM_DRIVER:52,PASTE_FILE:55},vs=new Uint8Array(16);function ge(T,D,A){const M=A??new Uint8Array(0),F=new Uint8Array(we+Ie+M.length),U=new DataView(F.buffer);return F[0]=dt,F[1]=T,U.setUint32(2,M.length,!1),F.set(D??vs,we),F.set(M,we+Ie),F}function ps(T){if(T.length{this.listeners.delete(D)}}emit(){for(const D of this.listeners)try{D()}catch{}}setState(D,A){if(this.state!==D){if(D==="reconnecting")this.pendingReconnect=!0,this.reconnectStartAt=A;else if(this.pendingReconnect&&D==="connected"){const M={at_ms:this.reconnectStartAt,reason:this.pendingReason,duration_ms:A-this.reconnectStartAt};this.reconnects.push(M),this.reconnects.length>Je&&(this.reconnects=this.reconnects.slice(-Je)),this.pendingReconnect=!1,this.pendingReason=""}this.state=D,this.emit()}}setReconnectReason(D,A){this.pendingReason=D}onPongRTT(D,A){this.rttRing[this.rttHead]={at_ms:A,rtt_ms:D},this.rttHead=(this.rttHead+1)%Ue,this.rttHead===0&&(this.rttFilled=!0)}onBytesIn(D,A){this.rollover(A),this.bytesInBucket+=D}onBytesOut(D,A){this.rollover(A),this.bytesOutBucket+=D}tick(D){this.rollover(D)}rollover(D){const A=Math.floor(D/1e3);A!==this.bytesBucketSec&&(this.bytesInPerSec=Me*this.bytesInBucket+(1-Me)*this.bytesInPerSec,this.bytesOutPerSec=Me*this.bytesOutBucket+(1-Me)*this.bytesOutPerSec,this.bytesInBucket=0,this.bytesOutBucket=0,this.bytesBucketSec=A)}onSeqGap(){this.seqGaps+=1}snapshot(D){const A=this.orderedRTT(),M={state:this.state,rtt:{last_ms:null,p50_ms:null,p95_ms:null},rtt_samples:A,reconnect:{count_last_hour:0,last_at_ms:null,last_reason:"",history:this.reconnects.slice()},bytes:{in_per_sec:Math.round(this.bytesInPerSec),out_per_sec:Math.round(this.bytesOutPerSec)},seq_gaps:this.seqGaps};if(A.length>0){M.rtt.last_ms=A[A.length-1].rtt_ms;const U=A.map(B=>B.rtt_ms).sort((B,r)=>B-r);M.rtt.p50_ms=Ye(U,50),M.rtt.p95_ms=Ye(U,95)}const F=D-bs;if(M.reconnect.count_last_hour=this.reconnects.filter(U=>U.at_ms>=F).length,this.reconnects.length>0){const U=this.reconnects[this.reconnects.length-1];M.reconnect.last_at_ms=U.at_ms,M.reconnect.last_reason=U.reason}return M}orderedRTT(){return this.rttFilled?this.rttRing.slice(this.rttHead).concat(this.rttRing.slice(0,this.rttHead)):this.rttRing.slice(0,this.rttHead)}}function Ye(T,D){if(T.length===0)return 0;if(D<=0)return T[0];if(D>=100)return T[T.length-1];const A=Math.floor(D*T.length/100);return T[Math.min(A,T.length-1)]}const ys=5e3,ws=1e3,Es=500,ks=8e3;class Ls{constructor(D,A={}){Q(this,"sessionId");Q(this,"sidBytes");Q(this,"handlers");Q(this,"ws",null);Q(this,"pendingInputs",[]);Q(this,"lastSeq",0);Q(this,"detached",!1);Q(this,"reconnectAttempts",0);Q(this,"consecutiveFailures",0);Q(this,"firstFailureAt",null);Q(this,"reconnectTimer",null);Q(this,"lastSentCols",null);Q(this,"lastSentRows",null);Q(this,"clientID",crypto.randomUUID());Q(this,"clientName","web");Q(this,"currentDriverClientID","");Q(this,"health",new Cs);Q(this,"pingTimer",null);Q(this,"tickTimer",null);Q(this,"lastSeqForGap",0);this.sessionId=D,this.sidBytes=Ss(D),this.handlers=A}getHealth(){return this.health.snapshot(Date.now())}onHealthChange(D){return this.health.onChange(D)}attach(){this.detached||this.openWS()}detach(){if(this.detached=!0,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.stopHealthLoops(),this.health.setState("closed",Date.now()),this.ws){try{this.ws.close()}catch{}this.ws=null}}sendInput(D){if(!this.ws||this.ws.readyState===WebSocket.CONNECTING){this.pendingInputs.push(D);return}if(this.ws.readyState!==WebSocket.OPEN)return;const A=ge(le.IN,this.sidBytes,new TextEncoder().encode(D));this.ws.send(A),this.health.onBytesOut(A.byteLength,Date.now())}sendResize(D,A){if(D===this.lastSentCols&&A===this.lastSentRows||!this.ws||this.ws.readyState!==WebSocket.OPEN)return;const M=ge(le.RESIZE,this.sidBytes,ms(D,A));this.ws.send(M),this.health.onBytesOut(M.byteLength,Date.now()),this.lastSentCols=D,this.lastSentRows=A}claimDriver(){if(!this.ws||this.ws.readyState!==WebSocket.OPEN)return;const D=new TextEncoder().encode(JSON.stringify({client_id:this.clientID,client_name:this.clientName})),A=ge(le.CLAIM_DRIVER,this.sidBytes,D);this.ws.send(A),this.health.onBytesOut(A.byteLength,Date.now())}sendPasteImage(D,A="clipboard-image"){return(async()=>{if(!this.ws||this.ws.readyState!==WebSocket.OPEN)return!1;const M=await D.arrayBuffer(),F=Qe(new Uint8Array(M)),U=new TextEncoder().encode(JSON.stringify({filename:A,content_type:D.type||"image/png",data:F})),B=ge(le.PASTE_IMAGE,this.sidBytes,U);return this.ws.send(B),this.health.onBytesOut(B.byteLength,Date.now()),!0})()}sendPasteFile(D,A){return(async()=>{if(!this.ws||this.ws.readyState!==WebSocket.OPEN)return!1;const M=await D.arrayBuffer(),F=Qe(new Uint8Array(M)),U=new TextEncoder().encode(JSON.stringify({filename:A,content_type:D.type||"application/octet-stream",data:F})),B=ge(le.PASTE_FILE,this.sidBytes,U);return this.ws.send(B),this.health.onBytesOut(B.byteLength,Date.now()),!0})()}startHealthLoops(D){this.stopHealthLoops(),this.tickTimer=setInterval(()=>{this.health.tick(Date.now())},ws),this.pingTimer=setInterval(()=>{if(D.readyState!==WebSocket.OPEN)return;const A=Date.now(),M=new Uint8Array(8),F=new DataView(M.buffer);F.setUint32(0,Math.floor(A/4294967296),!1),F.setUint32(4,A>>>0,!1);const U=ge(le.PING,this.sidBytes,M);D.send(U),this.health.onBytesOut(U.byteLength,Date.now())},ys)}stopHealthLoops(){this.pingTimer!==null&&(clearInterval(this.pingTimer),this.pingTimer=null),this.tickTimer!==null&&(clearInterval(this.tickTimer),this.tickTimer=null)}decryptOut(D,A){if(D.length<41||D[0]!==1)return D;const F=Ke();return F?Pt(D,F,this.sessionId,A):null}openWS(){var U,B;if(this.detached)return;const D=Ds("/client"),A=Ve(),M=A!=null&&A.sessionToken?[`atterm-token.${A.sessionToken}`]:[],F=new WebSocket(D,M);F.binaryType="arraybuffer",this.ws=F,this.health.setState(this.reconnectAttempts===0?"connecting":"reconnecting",Date.now()),(B=(U=this.handlers).onStatus)==null||B.call(U,this.reconnectAttempts===0?"connecting":"reconnecting"),F.onopen=()=>{var h,f;this.reconnectAttempts=0,this.consecutiveFailures=0,this.firstFailureAt=null,this.health.setState("connected",Date.now()),(f=(h=this.handlers).onStatus)==null||f.call(h,"attached");const r=new TextEncoder().encode(JSON.stringify({session_id:this.sessionId,since_seq:this.lastSeq,client_id:this.clientID,client_name:this.clientName})),o=ge(le.ATTACH,this.sidBytes,r);if(F.send(o),this.health.onBytesOut(o.byteLength,Date.now()),this.pendingInputs.length>0){const n=this.pendingInputs;this.pendingInputs=[];for(const d of n){const _=ge(le.IN,this.sidBytes,new TextEncoder().encode(d));F.send(_),this.health.onBytesOut(_.byteLength,Date.now())}}this.startHealthLoops(F)},F.onmessage=r=>{var f,n,d,_,v,u,e,s,t,i,l,c;const o=new Uint8Array(r.data);this.health.onBytesIn(o.byteLength,Date.now());let h;try{h=ps(o)}catch{return}switch(h.type){case le.OUT:{const{seq:p,data:m}=gs(h.payload);this.lastSeqForGap!==0&&p>this.lastSeqForGap+1&&this.health.onSeqGap(),this.lastSeqForGap=p,p>this.lastSeq&&(this.lastSeq=p);const a=this.decryptOut(m,p);a&&((n=(f=this.handlers).onOutput)==null||n.call(f,a,p));break}case le.PONG:{if(h.payload.length===8){const p=new DataView(h.payload.buffer,h.payload.byteOffset,h.payload.byteLength),m=p.getUint32(0,!1),a=p.getUint32(4,!1),g=m*4294967296+a,C=Date.now()-g;C>=0&&C<6e4&&this.health.onPongRTT(C,Date.now())}break}case le.META:{try{const p=JSON.parse(new TextDecoder().decode(h.payload)),m=Ke();if(m&&typeof p.sealed=="string"&&p.sealed.length>0){const C=Rs(p.sealed),w=Ht(C,m,this.sessionId);w&&(w.cwd!==void 0&&(p.cwd=w.cwd),w.title!==void 0&&(p.title=w.title),w.current_command!==void 0&&(p.current_command=w.current_command))}(_=(d=this.handlers).onMeta)==null||_.call(d,p);const a=String(p.driver_client_id??""),g=String(p.driver_client_name??"");a!==this.currentDriverClientID&&(this.currentDriverClientID=a,(u=(v=this.handlers).onDriverChange)==null||u.call(v,a,a!==""&&a===this.clientID,g))}catch{}break}case le.CLOSE:{let p={exit_code:0};try{p=JSON.parse(new TextDecoder().decode(h.payload))}catch{}(s=(e=this.handlers).onClose)==null||s.call(e,p),(i=(t=this.handlers).onStatus)==null||i.call(t,"ended");break}case le.REPLAY_PROGRESS:{try{(c=(l=this.handlers).onReplayProgress)==null||c.call(l,JSON.parse(new TextDecoder().decode(h.payload)))}catch{}break}}},F.onclose=r=>{var n,d;if(this.ws=null,this.stopHealthLoops(),this.detached){this.health.setState("closed",Date.now());return}const o=r.code?`ws_close_${r.code}`:"ws_close";this.health.setReconnectReason(o,Date.now()),this.health.setState("reconnecting",Date.now()),this.consecutiveFailures+=1,this.firstFailureAt===null&&(this.firstFailureAt=Date.now());const h=Bs({consecutiveFailures:this.consecutiveFailures,firstFailureAt:this.firstFailureAt,now:Date.now()});(d=(n=this.handlers).onStatus)==null||d.call(n,h?"lost":"reconnecting");const f=Math.min(ks,Es*Math.pow(2,this.reconnectAttempts++));this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.openWS()},f)},F.onerror=()=>{}}}function Ze(T,D){const A=new URL(T);return`${A.protocol==="https:"?"wss:":"ws:"}//${A.host}${D}`}function Ds(T){const D=Ve();if(D!=null&&D.homeInstanceURL)return Ze(D.homeInstanceURL,T);if(mt()){const M=D==null?void 0:D.baseURL;if(!M)throw new ot(0,"relay_not_configured",null);return Ze(M,T)}return typeof location>"u"?`ws://localhost${T}`:`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}${T}`}function Qe(T){let D="";for(let A=0;A=As?!0:T.firstFailureAt!==null&&T.now-T.firstFailureAt>=xs?T.consecutiveFailures>0:!1}const Ts=Object.freeze([{id:"default-yes",label:"yes",text:"yes"},{id:"default-ok",label:"ok",text:"ok"},{id:"default-continue",label:"continue",text:"continue"},{id:"default-commit",label:"commit",text:"commit"},{id:"default-push",label:"push",text:"push"},{id:"default-release",label:"release",text:"release"},{id:"default-1",label:"1",text:"1"},{id:"default-2",label:"2",text:"2"},{id:"default-3",label:"3",text:"3"}]);async function Ms(T){const D=await T.load();return D.length>0?D:Ts}const Ne="atterm.templates",Is={load(){return new Promise(T=>{if(typeof localStorage>"u")return T([]);const D=localStorage.getItem(Ne);if(!D)return T([]);try{const A=JSON.parse(D);T(Array.isArray(A)?A:[])}catch{T([])}})},save(T){return new Promise(D=>{if(typeof localStorage>"u")return D();localStorage.setItem(Ne,JSON.stringify(T));try{localStorage.setItem("atterm.quick_templates.value",JSON.stringify(T))}catch{}St(async()=>{const{notifyLocalChange:A}=await import("./prefsSync-BGOlzhJD.js");return{notifyLocalChange:A}},__vite__mapDeps([0,1,2,3])).then(({notifyLocalChange:A})=>{A("quick_templates")}).catch(()=>{}),D()})},clear(){return new Promise(T=>{if(typeof localStorage>"u")return T();localStorage.removeItem(Ne),T()})}},Os={class:"term-view"},Ps={href:"/setup.html"},Hs={class:"term-wrap"},Fs={key:0,class:"replay-overlay","data-testid":"replay-progress"},$s={class:"replay-text"},Us={class:"replay-track","aria-hidden":"true"},Ns={key:1,class:"viewer-overlay","data-testid":"viewer-overlay"},Ws={class:"viewer-card"},js={class:"viewer-title"},zs={key:1,class:"template-bar","data-testid":"template-bar"},qs=["data-testid","onClick"],Ks={class:"status-line","data-testid":"status-line"},Vs=_e({__name:"TerminalView",props:{sessionId:{},focusInput:{type:Boolean}},emits:["request-paste","request-copy"],setup(T,{expose:D,emit:A}){const M=T,F=ne("connecting"),U=ne(null),B=ne(!0),r=ne(null),o=ne([]),h=ne(typeof localStorage<"u"&&localStorage.getItem("atterm.templates.hidden")==="1"),{t:f}=Le();let n=null,d=null,_=null,v=null;const u={background:"#000000"},e=he(()=>f(`terminal.statuses.${F.value}`));function s(){return!U.value||U.value.total_bytes===0?0:Math.min(100,Math.round(U.value.bytes/U.value.total_bytes*100))}function t(){if(!(!d||!n))try{d.fit()}catch{}}function i(){const a=n;a&&a.write("",()=>{n===a&&a.scrollToBottom()})}function l(){n=new _s.Terminal({fontFamily:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",fontSize:13,theme:u,cursorBlink:!0,convertEol:!1,scrollback:2e4,allowProposedApi:!0}),d=new fs.FitAddon,n.loadAddon(d),n.open(r.value),t(),M.focusInput&&n.focus(),n.onData(a=>{_==null||_.sendInput(a)}),n.onResize(({cols:a,rows:g})=>{_==null||_.sendResize(a,g)}),v=new ResizeObserver(()=>t()),v.observe(r.value)}function c(){_=new Ls(M.sessionId,{onOutput:a=>{n==null||n.write(a)},onMeta:a=>{},onClose:a=>{n==null||n.write(`\r \x1B[33m[AT Term] ${f("terminal.ended",{code:a.exit_code})}\x1B[0m\r `)},onReplayProgress:a=>{String(a.phase)==="end"?(U.value=null,i()):U.value={bytes:Number(a.bytes??0),total_bytes:Number(a.total_bytes??0)}},onStatus:a=>{F.value=a},onDriverChange:(a,g)=>{B.value=g,n&&(n.options.disableStdin=!g)}}),_.attach()}function p(){_==null||_.claimDriver()}function m(a){_==null||_.sendInput(a.text);const g=_;window.setTimeout(()=>g==null?void 0:g.sendInput("\r"),16)}return ke(()=>{l(),c(),Ms(Is).then(a=>{o.value=a})}),Ge(()=>{v==null||v.disconnect(),v=null,_==null||_.detach(),_=null,n==null||n.dispose(),n=null,d=null}),ze(()=>M.sessionId,()=>{_==null||_.detach(),_=null,n==null||n.reset(),U.value=null,c()}),ze(()=>M.focusInput,a=>{a&&(n==null||n.focus())}),D({sendInput(a){_==null||_.sendInput(a)},sendPasteImage(a,g){return _==null?void 0:_.sendPasteImage(a,g)},sendPasteFile(a,g){return _==null?void 0:_.sendPasteFile(a,g)},copySelection(){if(!n)return;const a=n.getSelection();a&&navigator.clipboard.writeText(a).catch(()=>{})},getHealth(){return typeof(_==null?void 0:_.getHealth)=="function"?_.getHealth():null}}),(a,g)=>(X(),ee("section",Os,[F.value==="lost"?(X(),me(Y(at),{key:0,type:"warning","show-icon":!0,class:"lost-banner","data-testid":"lost-banner"},{default:Se(()=>[be(K(Y(f)("terminal.cannotReachRelay"))+" ",1),j("a",Ps,K(Y(f)("terminal.tapToChangeConfig")),1)]),_:1})):re("",!0),j("div",Hs,[j("div",{ref_key:"termContainer",ref:r,class:"term"},null,512),U.value?(X(),ee("div",Fs,[j("div",$s,K(Y(f)("terminal.loadingHistory",{percent:s()})),1),j("div",Us,[j("div",{class:"replay-fill",style:nt({width:s()+"%"})},null,4)])])):re("",!0),B.value?re("",!0):(X(),ee("div",Ns,[j("div",Ws,[j("div",js,K(Y(f)("terminal.remoteControl")),1),j("button",{class:"take-control","data-testid":"take-control",onClick:p},K(Y(f)("terminal.takeControl")),1)])]))]),h.value?re("",!0):(X(),ee("div",zs,[(X(!0),ee(Ce,null,Ee(o.value,C=>(X(),ee("button",{key:C.id,class:"template-btn","data-testid":`template-btn-${C.id}`,onClick:w=>m(C)},K(C.label),9,qs))),128))])),j("p",Ks,K(e.value),1)]))}}),Gs=fe(Vs,[["__scopeId","data-v-c585edca"]]),Xs=["aria-label"],Js=_e({__name:"ShortcutBar",emits:["input","copy","paste"],setup(T,{emit:D}){const A=D,{t:M}=Le(),F={esc:"\x1B",tab:" ","ctrl-c":"","ctrl-d":"",up:"\x1B[A",down:"\x1B[B",right:"\x1B[C",left:"\x1B[D"};function U(B){const r=B.target.closest("button[data-shortcut]");if(!r)return;const o=r.getAttribute("data-shortcut")||"",h=F[o];h!==void 0&&A("input",h)}return(B,r)=>(X(),ee("div",{class:"shortcut-bar","aria-label":Y(M)("terminal.shortcuts"),onClick:U},[r[2]||(r[2]=bt('',8)),j("button",{type:"button","data-testid":"copy",onClick:r[0]||(r[0]=qe(o=>A("copy"),["stop"]))},K(Y(M)("common.copy")),1),j("button",{type:"button","data-testid":"paste",onClick:r[1]||(r[1]=qe(o=>A("paste"),["stop"]))},K(Y(M)("terminal.paste")),1)],8,Xs))}}),Ys=fe(Js,[["__scopeId","data-v-57455025"]]),Zs=["placeholder"],Qs={class:"actions"},ei={class:"paste-image-pick",for:"paste-image-file"},ti={class:"paste-image-pick",for:"paste-file-file"},si={type:"submit"},ii=10*1024*1024,ri=_e({__name:"PasteFallback",props:{open:{type:Boolean}},emits:["paste-text","paste-image","paste-file","close"],setup(T,{emit:D}){const A=T,M=D,F=ne(""),{t:U}=Le();ze(()=>A.open,n=>{n||(F.value="")});function B(n){n.preventDefault(),F.value&&M("paste-text",F.value),M("close")}function r(){M("close")}function o(n){if(n.size>ii){console.warn("[PasteFallback] file too large, dropping",n.name,n.size);return}n.type.startsWith("image/")?M("paste-image",n):M("paste-file",n)}function h(n){var v;const d=n.target,_=(v=d.files)==null?void 0:v[0];d.value="",_&&o(_)}function f(n){var v;const d=n.target,_=(v=d.files)==null?void 0:v[0];d.value="",_&&o(_)}return(n,d)=>n.open?(X(),ee("form",{key:0,class:"paste-fallback",onSubmit:B},[Ct(j("textarea",{"onUpdate:modelValue":d[0]||(d[0]=_=>F.value=_),rows:"3",placeholder:Y(U)("terminal.paste"),"data-testid":"paste-text"},null,8,Zs),[[yt,F.value]]),j("div",Qs,[j("label",ei,K(Y(U)("terminal.pickImage")),1),j("input",{id:"paste-image-file",type:"file",accept:"image/*",hidden:"","data-testid":"paste-image-file",onChange:h},null,32),j("label",ti,K(Y(U)("terminal.pickFile")),1),j("input",{id:"paste-file-file",type:"file",accept:"*/*",hidden:"","data-testid":"paste-file-file",onChange:f},null,32),j("button",{type:"button","data-testid":"paste-cancel",onClick:r},K(Y(U)("common.cancel")),1),j("button",si,K(Y(U)("common.send")),1)])],32)):re("",!0)}}),ni=fe(ri,[["__scopeId","data-v-62a149bf"]]),We=new Set,ut={emit(T,D){const A={id:crypto.randomUUID(),file:T,name:D||"clipboard-image"};for(const M of We)try{M(A)}catch(F){console.warn("[pasteImageBus] handler threw",F)}},on(T){return We.add(T),()=>{We.delete(T)}}},oi={class:"paste-preview-host"},ai=["onMouseenter","onMouseleave"],li=["src","alt","onClick"],hi={class:"paste-toast-name"},ci=["aria-label","onClick"],di=["src","alt"],ui=5e3,_i=_e({__name:"PasteImagePreviewHost",setup(T){const D=ne([]),A=ne(null),M=new Map;function F(v){const u=window.setTimeout(()=>r(v),ui);M.set(v,u)}function U(v){const u=M.get(v);u!==void 0&&(window.clearTimeout(u),M.delete(v))}function B(v){let u;try{u=URL.createObjectURL(v.file)}catch(e){console.warn("[PasteImagePreviewHost] createObjectURL failed",e);return}D.value.push({id:v.id,file:v.file,url:u,name:v.name}),F(v.id)}function r(v){U(v);const u=D.value.findIndex(s=>s.id===v);if(u===-1)return;const[e]=D.value.splice(u,1);e&&URL.revokeObjectURL(e.url)}function o(v){U(v)}function h(v){D.value.some(u=>u.id===v)&&F(v)}function f(v){A.value&&URL.revokeObjectURL(A.value.url);try{A.value={url:URL.createObjectURL(v.file),name:v.name}}catch(u){console.warn("[PasteImagePreviewHost] lightbox createObjectURL failed",u),A.value=null}}function n(){A.value&&(URL.revokeObjectURL(A.value.url),A.value=null)}function d(v){v.key==="Escape"&&A.value&&n()}let _=null;return ke(()=>{_=ut.on(B),document.addEventListener("keydown",d)}),Ge(()=>{_==null||_(),_=null,document.removeEventListener("keydown",d);for(const v of M.values())window.clearTimeout(v);M.clear();for(const v of D.value)URL.revokeObjectURL(v.url);D.value=[],A.value&&(URL.revokeObjectURL(A.value.url),A.value=null)}),(v,u)=>(X(),ee("div",oi,[(X(!0),ee(Ce,null,Ee(D.value,e=>(X(),ee("div",{key:e.id,class:"paste-toast","data-testid":"paste-toast",onMouseenter:s=>o(e.id),onMouseleave:s=>h(e.id)},[j("img",{src:e.url,alt:e.name,class:"paste-toast-thumb",onClick:s=>f(e)},null,8,li),j("span",hi,K(e.name),1),j("button",{type:"button",class:"paste-toast-close","data-testid":"paste-toast-close","aria-label":"close "+e.name,onClick:s=>r(e.id)},"×",8,ci)],40,ai))),128)),A.value?(X(),ee("div",{key:0,class:"paste-lightbox","data-testid":"paste-lightbox",onClick:n},[j("img",{src:A.value.url,alt:A.value.name,onClick:u[0]||(u[0]=qe(()=>{},["stop"]))},null,8,di)])):re("",!0)]))}}),fi=fe(_i,[["__scopeId","data-v-c71b4b80"]]),je=new Set,_t={emit(T,D){const A={id:crypto.randomUUID(),name:T||"file",size:D};for(const M of je)try{M(A)}catch(F){console.warn("[pasteFileBus] handler threw",F)}},on(T){return je.add(T),()=>{je.delete(T)}}},vi={class:"paste-file-host"},pi={class:"paste-file-name"},gi={class:"paste-file-size"},mi=["aria-label","onClick"],Si=3e3,bi=_e({__name:"PasteFilePreviewHost",setup(T){const D=ne([]),A=new Map;function M(h){return h<1024?`${h} B`:h<1024*1024?`${(h/1024).toFixed(1)} KiB`:`${(h/(1024*1024)).toFixed(1)} MiB`}function F(h){const f=window.setTimeout(()=>r(h),Si);A.set(h,f)}function U(h){const f=A.get(h);f!==void 0&&(window.clearTimeout(f),A.delete(h))}function B(h){D.value.push({id:h.id,name:h.name,size:h.size}),F(h.id)}function r(h){U(h);const f=D.value.findIndex(n=>n.id===h);f!==-1&&D.value.splice(f,1)}let o=null;return ke(()=>{o=_t.on(B)}),Ge(()=>{o==null||o(),o=null;for(const h of A.values())window.clearTimeout(h);A.clear(),D.value=[]}),(h,f)=>(X(),ee("div",vi,[(X(!0),ee(Ce,null,Ee(D.value,n=>(X(),ee("div",{key:n.id,class:"paste-file-toast","data-testid":"paste-file-toast"},[f[0]||(f[0]=j("span",{class:"paste-file-icon"},"📎",-1)),j("span",pi,K(n.name),1),j("span",gi,"("+K(M(n.size))+")",1),j("button",{type:"button",class:"paste-file-close","data-testid":"paste-file-close","aria-label":"close "+n.name,onClick:d=>r(n.id)},"×",8,mi)]))),128))]))}}),Ci=fe(bi,[["__scopeId","data-v-537ceb1c"]]),yi={key:0,class:"install-hint"},wi=["aria-label"],et="at-term-install-hint-dismissed",Ei=_e({__name:"InstallHint",setup(T){const D=ne(!1),{t:A}=Le();function M(B){return/iPad|iPhone|iPod/i.test(B)&&!/Macintosh|Windows|Android/i.test(B)}function F(){var B;return typeof window>"u"?!1:!!((B=window.matchMedia)!=null&&B.call(window,"(display-mode: standalone)").matches||window.navigator.standalone===!0)}function U(){localStorage.setItem(et,"1"),D.value=!1}return ke(()=>{if(typeof navigator>"u"||typeof localStorage>"u")return;const B=localStorage.getItem(et)==="1";D.value=M(navigator.userAgent)&&!F()&&!B}),(B,r)=>D.value?(X(),ee("section",yi,[j("div",null,[j("strong",null,K(Y(A)("main.install.title")),1),j("span",null,K(Y(A)("main.install.text")),1)]),j("button",{type:"button","aria-label":Y(A)("main.install.dismiss"),onClick:U},"×",8,wi)])):re("",!0)}}),ki=fe(Ei,[["__scopeId","data-v-5ec93c4f"]]),Li=["aria-label"],Di={class:"text"},Ri=_e({__name:"ConnHealthPill",props:{health:{},labels:{}},setup(T){const D=T,A=he(()=>{var U,B,r,o;return{connecting:((U=D.labels)==null?void 0:U.connecting)??"connecting…",reconnecting:((B=D.labels)==null?void 0:B.reconnecting)??"reconnecting…",off:((r=D.labels)==null?void 0:r.off)??"off",unknownMS:((o=D.labels)==null?void 0:o.unknownMS)??"—"}}),M=he(()=>{if(D.health.state==="reconnecting"||D.health.state==="connecting")return"band-reconnecting";if(D.health.state==="closed")return"band-off";const U=D.health.rtt.last_ms;return U===null||U<150?"band-green":U<500?"band-yellow":"band-red"}),F=he(()=>{if(D.health.state==="reconnecting")return A.value.reconnecting;if(D.health.state==="connecting")return A.value.connecting;if(D.health.state==="closed")return A.value.off;const U=D.health.rtt.last_ms;return U===null?A.value.unknownMS:`${U} ms`});return(U,B)=>(X(),ee("button",{class:wt(["conn-health-pill",M.value]),type:"button","aria-label":F.value},[B[0]||(B[0]=j("span",{class:"dot"},"●",-1)),j("span",Di,K(F.value),1)],10,Li))}}),Ai=fe(Ri,[["__scopeId","data-v-5daa187a"]]),xi=["aria-label"],Bi={class:"head"},Ti=["aria-label"],Mi={class:"rtt"},Ii={class:"row"},Oi={class:"metric-label"},Pi={class:"metric-value"},Hi={class:"row"},Fi={class:"metric-label"},$i={class:"metric-value"},Ui={width:"240",height:"60",class:"spark","aria-hidden":"true"},Ni=["d"],Wi={class:"bytes"},ji={class:"row"},zi={class:"metric-label"},qi={class:"metric-value"},Ki={class:"row"},Vi={class:"metric-label"},Gi={class:"metric-value"},Xi={class:"recon"},Ji={class:"row"},Yi={class:"metric-label"},Zi={class:"metric-value"},Qi={class:"row"},er={class:"metric-label"},tr={class:"metric-value"},sr={key:0,class:"reconn-table"},ir={key:0,class:"gaps"},rr=_e({__name:"ConnHealthDrawer",props:{health:{},open:{type:Boolean},labels:{}},emits:["close"],setup(T){const D=T,A=he(()=>{var r,o,h,f,n,d,_,v,u,e,s,t;return{title:((r=D.labels)==null?void 0:r.title)??"Connection health",rttNow:((o=D.labels)==null?void 0:o.rttNow)??"RTT (now)",rttP50P95:((h=D.labels)==null?void 0:h.rttP50P95)??"p50 / p95 (5 min)",bytesIn:((f=D.labels)==null?void 0:f.bytesIn)??"↓ in",bytesOut:((n=D.labels)==null?void 0:n.bytesOut)??"↑ out",state:((d=D.labels)==null?void 0:d.state)??"State",reconnectsLastHour:((_=D.labels)==null?void 0:_.reconnectsLastHour)??"Reconnects (1 h)",reconnectsTime:((v=D.labels)==null?void 0:v.reconnectsTime)??"time",reconnectsReason:((u=D.labels)==null?void 0:u.reconnectsReason)??"reason",reconnectsDowntime:((e=D.labels)==null?void 0:e.reconnectsDowntime)??"downtime",seqGaps:((s=D.labels)==null?void 0:s.seqGaps)??"Seq gaps observed:",close:((t=D.labels)==null?void 0:t.close)??"Close"}}),M=he(()=>{const r=D.health.rtt_samples;if(r.length<2)return"";const o=240,h=60,f=4,n=s=>f+s/(r.length-1)*(o-2*f),d=r.map(s=>s.rtt_ms),_=Math.min(...d),v=Math.max(...d),u=Math.max(1,v-_),e=s=>f+(1-(s-_)/u)*(h-2*f);return r.map((s,t)=>`${t===0?"M":"L"} ${n(t).toFixed(1)} ${e(s.rtt_ms).toFixed(1)}`).join(" ")}),F=r=>`${(r/1024).toFixed(1)} KB/s`,U=r=>r<1e3?`${r} ms`:`${Math.round(r/1e3)} s`,B=r=>new Date(r).toLocaleTimeString();return(r,o)=>r.open?(X(),ee("aside",{key:0,class:"drawer",role:"dialog","aria-label":A.value.title},[j("header",Bi,[j("span",null,K(A.value.title),1),j("button",{class:"close",type:"button","aria-label":A.value.close,onClick:o[0]||(o[0]=h=>r.$emit("close"))},"×",8,Ti)]),j("section",Mi,[j("div",Ii,[j("span",Oi,K(A.value.rttNow),1),j("span",Pi,K(r.health.rtt.last_ms??"—")+" ms",1)]),j("div",Hi,[j("span",Fi,K(A.value.rttP50P95),1),j("span",$i,K(r.health.rtt.p50_ms??"—")+" / "+K(r.health.rtt.p95_ms??"—")+" ms",1)]),(X(),ee("svg",Ui,[j("path",{d:M.value,fill:"none",stroke:"currentColor","stroke-width":"1.5"},null,8,Ni)]))]),j("section",Wi,[j("div",ji,[j("span",zi,K(A.value.bytesIn),1),j("span",qi,K(F(r.health.bytes.in_per_sec)),1)]),j("div",Ki,[j("span",Vi,K(A.value.bytesOut),1),j("span",Gi,K(F(r.health.bytes.out_per_sec)),1)])]),j("section",Xi,[j("div",Ji,[j("span",Yi,K(A.value.state),1),j("span",Zi,K(r.health.state),1)]),j("div",Qi,[j("span",er,K(A.value.reconnectsLastHour),1),j("span",tr,K(r.health.reconnect.count_last_hour),1)]),r.health.reconnect.history.length>0?(X(),ee("table",sr,[j("thead",null,[j("tr",null,[j("th",null,K(A.value.reconnectsTime),1),j("th",null,K(A.value.reconnectsReason),1),j("th",null,K(A.value.reconnectsDowntime),1)])]),j("tbody",null,[(X(!0),ee(Ce,null,Ee(r.health.reconnect.history,h=>(X(),ee("tr",{key:h.at_ms},[j("td",null,K(B(h.at_ms)),1),j("td",null,K(h.reason),1),j("td",null,K(U(h.duration_ms)),1)]))),128))])])):re("",!0)]),r.health.seq_gaps>0?(X(),ee("section",ir,K(A.value.seqGaps)+" "+K(r.health.seq_gaps),1)):re("",!0)],8,xi)):re("",!0)}}),nr=fe(rr,[["__scopeId","data-v-c8bb9e85"]]),or=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,ft=/^#\/s\/([0-9a-fA-F-]+)(?:\?(.+))?$/;function tt(T){const D=ft.exec(T);if(!D)return null;const A=D[1];return or.test(A)?A.toLowerCase():null}function st(T){const D=ft.exec(T);if(!D||!D[2])return{};const A=new URLSearchParams(D[2]),M={},F=A.get("notification"),U=A.get("focus"),B=A.get("permission");return F&&(M.notification=F),U&&(M.focus=U),B&&(M.permission=B),M}function ar(T,D={}){const A=new URLSearchParams;D.notification&&A.set("notification",D.notification),D.focus&&A.set("focus",D.focus),D.permission&&A.set("permission",D.permission);const M=A.toString();return`#/s/${T}${M?`?${M}`:""}`}const lr={key:0,class:"conn-health-anchor"},hr={class:"home-main"},cr=_e({__name:"App",setup(T){const D=ne(tt(location.hash)),A=ne(st(location.hash)),M=ne(!1),F=ne(null),{t:U}=Le(),B=ne(null),r=ne(!1);let o=null,h=!1;function f(){if(o!==null&&clearTimeout(o),h)return;const C=F.value,w=typeof(C==null?void 0:C.getHealth)=="function"?C.getHealth():null;B.value=w??null;const y=r.value?1e3:5e3;o=setTimeout(f,y)}const n=he(()=>({connecting:U("connHealth.pillLabelConnecting"),reconnecting:U("connHealth.pillLabelReconnecting"),off:U("connHealth.pillLabelOff")})),d=he(()=>({title:U("connHealth.drawerTitle"),rttNow:U("connHealth.drawerRttNow"),rttP50P95:U("connHealth.drawerRttP50P95"),bytesIn:U("connHealth.drawerBytesIn"),bytesOut:U("connHealth.drawerBytesOut"),state:U("connHealth.drawerState"),reconnectsLastHour:U("connHealth.drawerReconnectsLastHour"),reconnectsTime:U("connHealth.drawerReconnectsTime"),reconnectsReason:U("connHealth.drawerReconnectsReason"),reconnectsDowntime:U("connHealth.drawerReconnectsDowntime"),seqGaps:U("connHealth.drawerSeqGaps"),close:U("common.close")}));function _(){D.value=tt(location.hash),A.value=st(location.hash)}function v(C){location.hash=ar(C)}function u(){location.hash=""}function e(C){var w;(w=F.value)==null||w.sendInput(C)}async function s(){var C;try{const w=await navigator.clipboard.readText();if(w){(C=F.value)==null||C.sendInput(w);return}}catch{}M.value=!0}function t(){var C;(C=F.value)==null||C.copySelection()}function i(C){var w;(w=F.value)==null||w.sendInput(C)}function l(C){var w;ut.emit(C,C.name),(w=F.value)==null||w.sendPasteImage(C,C.name)}function c(C){var w;_t.emit(C.name,C.size),(w=F.value)==null||w.sendPasteFile(C,C.name)}const p=Et(),m=he(()=>!!D.value),a=he(()=>A.value.focus==="input"),g=he(()=>A.value.permission==="view");return ke(()=>{window.addEventListener("hashchange",_),f()}),it(()=>{window.removeEventListener("hashchange",_),h=!0,o!==null&&clearTimeout(o)}),(C,w)=>(X(),me(Y(Dt),{theme:Y(Lt),"theme-overrides":Y(p),locale:Y(Xe).locale,"date-locale":Y(Xe).dateLocale},{default:Se(()=>[ue(Y(kt),null,{default:Se(()=>[ue(fi),ue(Ci),ue(Tt,{active:"home"}),m.value&&B.value?(X(),ee("div",lr,[ue(Ai,{health:B.value,labels:n.value,onClick:w[0]||(w[0]=y=>r.value=!r.value)},null,8,["health","labels"]),ue(nr,{health:B.value,open:r.value,labels:d.value,onClose:w[1]||(w[1]=y=>r.value=!1)},null,8,["health","open","labels"])])):re("",!0),m.value?re("",!0):(X(),me(ki,{key:1})),m.value?(X(),me(Y(rt),{key:2,class:"back-floating",size:"small",tertiary:"","aria-label":Y(U)("main.backToSessions"),onClick:u},{default:Se(()=>[be(" ← "+K(Y(U)("main.back")),1)]),_:1},8,["aria-label"])):re("",!0),j("main",hr,[m.value?(X(),ee(Ce,{key:1},[g.value?(X(),me(Y(at),{key:0,type:"info",class:"permission-notice","data-testid":"view-only-notice"},{default:Se(()=>[be(K(Y(U)("main.viewOnlyNotice")),1)]),_:1})):re("",!0),ue(Gs,{ref_key:"termRef",ref:F,"session-id":D.value,"focus-input":a.value},null,8,["session-id","focus-input"]),ue(Ys,{onInput:e,onCopy:t,onPaste:s}),ue(ni,{open:M.value,onPasteText:i,onPasteImage:l,onPasteFile:c,onClose:w[2]||(w[2]=y=>M.value=!1)},null,8,["open"])],64)):(X(),me(us,{key:0,onNavigate:v}))])]),_:1})]),_:1},8,["theme","theme-overrides","locale","date-locale"]))}}),dr=fe(cr,[["__scopeId","data-v-d1bddbbc"]]);if(!Rt("home")){At();const T=new Ft($t(),Ut());Nt(T),T.pull().catch(()=>{}),window.addEventListener("focus",()=>{T.pull().catch(()=>{})}),xt(dr).mount("#app")} diff --git a/internal/relay/web-dist/assets/login-C9xn7txx.js b/internal/relay/web-dist/assets/login-CwA4p5L1.js similarity index 89% rename from internal/relay/web-dist/assets/login-C9xn7txx.js rename to internal/relay/web-dist/assets/login-CwA4p5L1.js index 3ece5799..7ab514e1 100644 --- a/internal/relay/web-dist/assets/login-C9xn7txx.js +++ b/internal/relay/web-dist/assets/login-CwA4p5L1.js @@ -1 +1 @@ -import{ai as x,bs as u,$ as I,bf as L,aA as B,bh as f,a3 as C,c7 as o,ac as r,bS as e,h as V,a2 as l,bN as n,B as A,aa as h,a5 as S,a4 as q,b6 as _,ae as P,e as E,bV as M,n as U,o as F,aG as D,a1 as G}from"./mobile-guard-CHHXRZ12.js";import{s as R,A as T}from"./client-Bd6vJHn4.js";import{a as H,g as O,f as $,b as j}from"./pwa-DV81pmUS.js";import{L as z}from"./LanguageSelect-DQdfalDe.js";import{a as J,b as K,c as b,d as g}from"./FormItem-KX1KLzyv.js";const Q={class:"auth-page"},W={class:"auth-title"},X={class:"auth-subtitle"},Y={key:0,class:"auth-error",role:"alert"},Z={class:"auth-alt"},ee={href:"/signup.html"},ae={class:"auth-version"},te=x({__name:"App",setup(re){const d=u(""),p=u(""),i=u(!1),c=u(""),v=u("dev"),{t:a}=M(),y=I(()=>H(v.value,a));L(async()=>{try{const{admin_exists:s}=await O();if(!s){location.replace("/firstrun.html");return}}catch{}v.value=await $()});function N(s){if(s instanceof T){if(s.code==="invalid_credentials")return a("auth.errors.invalidCredentials");if(s.code==="rate_limited")return a("auth.errors.rateLimited");if(s.code==="invalid_request")return a("auth.errors.invalidRequest")}return a("auth.errors.signInFailed")}async function w(s){if(s.preventDefault(),!i.value){c.value="",i.value=!0;try{await j(d.value,p.value);const t=new URLSearchParams(location.search).get("next");location.assign(R(t))}catch(t){c.value=N(t)}finally{i.value=!1}}}const k=B();return(s,t)=>(f(),C(e(E),{theme:e(P),"theme-overrides":e(k),locale:e(_).locale,"date-locale":e(_).dateLocale},{default:o(()=>[r(e(V),null,{default:o(()=>[l("main",Q,[r(z,{class:"auth-language"}),r(e(J),{class:"auth-card",bordered:!1},{default:o(()=>[l("header",W,[l("h1",null,n(e(a)("common.appName")),1),l("p",X,n(e(a)("auth.signIn")),1)]),r(e(K),{"label-placement":"top","require-mark-placement":"right-hanging",autocomplete:"on",novalidate:"",onSubmit:w},{default:o(()=>[r(e(b),{label:e(a)("auth.email"),"show-feedback":!1},{default:o(()=>[r(e(g),{value:d.value,"onUpdate:value":t[0]||(t[0]=m=>d.value=m),type:"text",placeholder:e(a)("auth.emailPlaceholder"),"input-props":{type:"email",required:!0,autocomplete:"username"}},null,8,["value","placeholder"])]),_:1},8,["label"]),r(e(b),{label:e(a)("auth.password"),"show-feedback":!1},{default:o(()=>[r(e(g),{value:p.value,"onUpdate:value":t[1]||(t[1]=m=>p.value=m),type:"password","show-password-on":"click","input-props":{required:!0,autocomplete:"current-password"}},null,8,["value"])]),_:1},8,["label"]),r(e(A),{class:"submit-btn",type:"primary","attr-type":"submit",loading:i.value,disabled:i.value,block:""},{default:o(()=>[h(n(e(a)("auth.signIn")),1)]),_:1},8,["loading","disabled"]),c.value?(f(),S("p",Y,n(c.value),1)):q("",!0),l("p",Z,[h(n(e(a)("auth.haveInviteCode"))+" ",1),l("a",ee,n(e(a)("auth.signUpHere")),1),t[2]||(t[2]=h(". "))])]),_:1})]),_:1}),l("p",ae,n(y.value),1)])]),_:1})]),_:1},8,["theme","theme-overrides","locale","date-locale"]))}}),se=U(te,[["__scopeId","data-v-45a8746e"]]);F("login")||(D(),G(se).mount("#app")); +import{ai as x,bs as u,$ as I,bf as L,aA as B,bh as f,a3 as C,c7 as o,ac as r,bS as e,h as V,a2 as l,bN as n,B as A,aa as h,a5 as S,a4 as q,b6 as _,ae as P,e as E,bV as M,n as U,o as F,aG as D,a1 as G}from"./mobile-guard-BvFpjCXb.js";import{s as R,A as T}from"./client-BRiQMdFT.js";import{a as H,g as O,f as $,b as j}from"./pwa-BRtGQKIK.js";import{L as z}from"./LanguageSelect-CXI-71aS.js";import{a as J,b as K,c as b,d as g}from"./FormItem-Biv8w1Bg.js";const Q={class:"auth-page"},W={class:"auth-title"},X={class:"auth-subtitle"},Y={key:0,class:"auth-error",role:"alert"},Z={class:"auth-alt"},ee={href:"/signup.html"},ae={class:"auth-version"},te=x({__name:"App",setup(re){const d=u(""),p=u(""),i=u(!1),c=u(""),v=u("dev"),{t:a}=M(),y=I(()=>H(v.value,a));L(async()=>{try{const{admin_exists:s}=await O();if(!s){location.replace("/firstrun.html");return}}catch{}v.value=await $()});function N(s){if(s instanceof T){if(s.code==="invalid_credentials")return a("auth.errors.invalidCredentials");if(s.code==="rate_limited")return a("auth.errors.rateLimited");if(s.code==="invalid_request")return a("auth.errors.invalidRequest")}return a("auth.errors.signInFailed")}async function w(s){if(s.preventDefault(),!i.value){c.value="",i.value=!0;try{await j(d.value,p.value);const t=new URLSearchParams(location.search).get("next");location.assign(R(t))}catch(t){c.value=N(t)}finally{i.value=!1}}}const k=B();return(s,t)=>(f(),C(e(E),{theme:e(P),"theme-overrides":e(k),locale:e(_).locale,"date-locale":e(_).dateLocale},{default:o(()=>[r(e(V),null,{default:o(()=>[l("main",Q,[r(z,{class:"auth-language"}),r(e(J),{class:"auth-card",bordered:!1},{default:o(()=>[l("header",W,[l("h1",null,n(e(a)("common.appName")),1),l("p",X,n(e(a)("auth.signIn")),1)]),r(e(K),{"label-placement":"top","require-mark-placement":"right-hanging",autocomplete:"on",novalidate:"",onSubmit:w},{default:o(()=>[r(e(b),{label:e(a)("auth.email"),"show-feedback":!1},{default:o(()=>[r(e(g),{value:d.value,"onUpdate:value":t[0]||(t[0]=m=>d.value=m),type:"text",placeholder:e(a)("auth.emailPlaceholder"),"input-props":{type:"email",required:!0,autocomplete:"username"}},null,8,["value","placeholder"])]),_:1},8,["label"]),r(e(b),{label:e(a)("auth.password"),"show-feedback":!1},{default:o(()=>[r(e(g),{value:p.value,"onUpdate:value":t[1]||(t[1]=m=>p.value=m),type:"password","show-password-on":"click","input-props":{required:!0,autocomplete:"current-password"}},null,8,["value"])]),_:1},8,["label"]),r(e(A),{class:"submit-btn",type:"primary","attr-type":"submit",loading:i.value,disabled:i.value,block:""},{default:o(()=>[h(n(e(a)("auth.signIn")),1)]),_:1},8,["loading","disabled"]),c.value?(f(),S("p",Y,n(c.value),1)):q("",!0),l("p",Z,[h(n(e(a)("auth.haveInviteCode"))+" ",1),l("a",ee,n(e(a)("auth.signUpHere")),1),t[2]||(t[2]=h(". "))])]),_:1})]),_:1}),l("p",ae,n(y.value),1)])]),_:1})]),_:1},8,["theme","theme-overrides","locale","date-locale"]))}}),se=U(te,[["__scopeId","data-v-45a8746e"]]);F("login")||(D(),G(se).mount("#app")); diff --git a/internal/relay/web-dist/assets/mobile-guard-CHHXRZ12.js b/internal/relay/web-dist/assets/mobile-guard-BvFpjCXb.js similarity index 88% rename from internal/relay/web-dist/assets/mobile-guard-CHHXRZ12.js rename to internal/relay/web-dist/assets/mobile-guard-BvFpjCXb.js index 3b837314..398f38b4 100644 --- a/internal/relay/web-dist/assets/mobile-guard-CHHXRZ12.js +++ b/internal/relay/web-dist/assets/mobile-guard-BvFpjCXb.js @@ -1,34 +1,34 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/prefsSync-C6s4W7Ql.js","assets/client-Bd6vJHn4.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/prefsSync-BGOlzhJD.js","assets/client-BRiQMdFT.js"])))=>i.map(i=>d[i]); (function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))r(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(n){if(n.ep)return;n.ep=!0;const i=t(n);fetch(n.href,i)}})();/** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function ii(e){const o=Object.create(null);for(const t of e.split(","))o[t]=1;return t=>t in o}const fe={},ft=[],mo=()=>{},Xc=()=>!1,Wr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ai=e=>e.startsWith("onUpdate:"),we=Object.assign,li=(e,o)=>{const t=e.indexOf(o);t>-1&&e.splice(t,1)},ed=Object.prototype.hasOwnProperty,se=(e,o)=>ed.call(e,o),Y=Array.isArray,pt=e=>jr(e)==="[object Map]",Ja=e=>jr(e)==="[object Set]",X=e=>typeof e=="function",ve=e=>typeof e=="string",Ho=e=>typeof e=="symbol",me=e=>e!==null&&typeof e=="object",Za=e=>(me(e)||X(e))&&X(e.then)&&X(e.catch),Qa=Object.prototype.toString,jr=e=>Qa.call(e),od=e=>jr(e).slice(8,-1),Xa=e=>jr(e)==="[object Object]",si=e=>ve(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,kt=ii(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Nr=e=>{const o=Object.create(null);return t=>o[t]||(o[t]=e(t))},td=/-(\w)/g,Oo=Nr(e=>e.replace(td,(o,t)=>t?t.toUpperCase():"")),rd=/\B([A-Z])/g,nt=Nr(e=>e.replace(rd,"-$1").toLowerCase()),el=Nr(e=>e.charAt(0).toUpperCase()+e.slice(1)),gn=Nr(e=>e?`on${el(e)}`:""),zo=(e,o)=>!Object.is(e,o),yr=(e,...o)=>{for(let t=0;t{Object.defineProperty(e,o,{configurable:!0,enumerable:!1,writable:r,value:t})},Dn=e=>{const o=parseFloat(e);return isNaN(o)?e:o},nd=e=>{const o=ve(e)?Number(e):NaN;return isNaN(o)?e:o};let Oi;const Vr=()=>Oi||(Oi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ci(e){if(Y(e)){const o={};for(let t=0;t{if(t){const r=t.split(ad);r.length>1&&(o[r[0].trim()]=r[1].trim())}}),o}function di(e){let o="";if(ve(e))o=e;else if(Y(e))for(let t=0;t!!(e&&e.__v_isRef===!0),ud=e=>ve(e)?e:e==null?"":Y(e)||me(e)&&(e.toString===Qa||!X(e.toString))?rl(e)?ud(e.value):JSON.stringify(e,nl,2):String(e),nl=(e,o)=>rl(o)?nl(e,o.value):pt(o)?{[`Map(${o.size})`]:[...o.entries()].reduce((t,[r,n],i)=>(t[bn(r,i)+" =>"]=n,t),{})}:Ja(o)?{[`Set(${o.size})`]:[...o.values()].map(t=>bn(t))}:Ho(o)?bn(o):me(o)&&!Y(o)&&!Xa(o)?String(o):o,bn=(e,o="")=>{var t;return Ho(e)?`Symbol(${(t=e.description)!=null?t:o})`:e};/** +**//*! #__NO_SIDE_EFFECTS__ */function ii(e){const o=Object.create(null);for(const t of e.split(","))o[t]=1;return t=>t in o}const fe={},ft=[],mo=()=>{},Xc=()=>!1,Wr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ai=e=>e.startsWith("onUpdate:"),we=Object.assign,li=(e,o)=>{const t=e.indexOf(o);t>-1&&e.splice(t,1)},ed=Object.prototype.hasOwnProperty,se=(e,o)=>ed.call(e,o),Y=Array.isArray,pt=e=>jr(e)==="[object Map]",Ja=e=>jr(e)==="[object Set]",X=e=>typeof e=="function",ve=e=>typeof e=="string",Ho=e=>typeof e=="symbol",me=e=>e!==null&&typeof e=="object",Za=e=>(me(e)||X(e))&&X(e.then)&&X(e.catch),Qa=Object.prototype.toString,jr=e=>Qa.call(e),od=e=>jr(e).slice(8,-1),Xa=e=>jr(e)==="[object Object]",si=e=>ve(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,kt=ii(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Nr=e=>{const o=Object.create(null);return t=>o[t]||(o[t]=e(t))},td=/-(\w)/g,zo=Nr(e=>e.replace(td,(o,t)=>t?t.toUpperCase():"")),rd=/\B([A-Z])/g,nt=Nr(e=>e.replace(rd,"-$1").toLowerCase()),el=Nr(e=>e.charAt(0).toUpperCase()+e.slice(1)),gn=Nr(e=>e?`on${el(e)}`:""),Oo=(e,o)=>!Object.is(e,o),yr=(e,...o)=>{for(let t=0;t{Object.defineProperty(e,o,{configurable:!0,enumerable:!1,writable:r,value:t})},Dn=e=>{const o=parseFloat(e);return isNaN(o)?e:o},nd=e=>{const o=ve(e)?Number(e):NaN;return isNaN(o)?e:o};let zi;const Vr=()=>zi||(zi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ci(e){if(Y(e)){const o={};for(let t=0;t{if(t){const r=t.split(ad);r.length>1&&(o[r[0].trim()]=r[1].trim())}}),o}function di(e){let o="";if(ve(e))o=e;else if(Y(e))for(let t=0;t!!(e&&e.__v_isRef===!0),ud=e=>ve(e)?e:e==null?"":Y(e)||me(e)&&(e.toString===Qa||!X(e.toString))?rl(e)?ud(e.value):JSON.stringify(e,nl,2):String(e),nl=(e,o)=>rl(o)?nl(e,o.value):pt(o)?{[`Map(${o.size})`]:[...o.entries()].reduce((t,[r,n],i)=>(t[bn(r,i)+" =>"]=n,t),{})}:Ja(o)?{[`Set(${o.size})`]:[...o.values()].map(t=>bn(t))}:Ho(o)?bn(o):me(o)&&!Y(o)&&!Xa(o)?String(o):o,bn=(e,o="")=>{var t;return Ho(e)?`Symbol(${(t=e.description)!=null?t:o})`:e};/** * @vue/reactivity v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let qe;class fd{constructor(o=!1){this.detached=o,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=qe,!o&&qe&&(this.index=(qe.scopes||(qe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let o,t;if(this.scopes)for(o=0,t=this.scopes.length;o0)return;if(Ot){let o=Ot;for(Ot=void 0;o;){const t=o.next;o.next=void 0,o.flags&=-9,o=t}}let e;for(;zt;){let o=zt;for(zt=void 0;o;){const t=o.next;if(o.next=void 0,o.flags&=-9,o.flags&1)try{o.trigger()}catch(r){e||(e=r)}o=t}}if(e)throw e}function sl(e){for(let o=e.deps;o;o=o.nextDep)o.version=-1,o.prevActiveLink=o.dep.activeLink,o.dep.activeLink=o}function cl(e){let o,t=e.depsTail,r=t;for(;r;){const n=r.prevDep;r.version===-1?(r===t&&(t=n),pi(r),hd(r)):o=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=n}e.deps=o,e.depsTail=t}function _n(e){for(let o=e.deps;o;o=o.nextDep)if(o.dep.version!==o.version||o.dep.computed&&(dl(o.dep.computed)||o.dep.version!==o.version))return!0;return!!e._dirty}function dl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Vt))return;e.globalVersion=Vt;const o=e.dep;if(e.flags|=2,o.version>0&&!e.isSSR&&e.deps&&!_n(e)){e.flags&=-3;return}const t=he,r=oo;he=e,oo=!0;try{sl(e);const n=e.fn(e._value);(o.version===0||zo(n,e._value))&&(e._value=n,o.version++)}catch(n){throw o.version++,n}finally{he=t,oo=r,cl(e),e.flags&=-3}}function pi(e,o=!1){const{dep:t,prevSub:r,nextSub:n}=e;if(r&&(r.nextSub=n,e.prevSub=void 0),n&&(n.prevSub=r,e.nextSub=void 0),t.subs===e&&(t.subs=r,!r&&t.computed)){t.computed.flags&=-5;for(let i=t.computed.deps;i;i=i.nextDep)pi(i,!0)}!o&&!--t.sc&&t.map&&t.map.delete(t.key)}function hd(e){const{prevDep:o,nextDep:t}=e;o&&(o.nextDep=t,e.prevDep=void 0),t&&(t.prevDep=o,e.nextDep=void 0)}let oo=!0;const ul=[];function jo(){ul.push(oo),oo=!1}function No(){const e=ul.pop();oo=e===void 0?!0:e}function Bi(e){const{cleanup:o}=e;if(e.cleanup=void 0,o){const t=he;he=void 0;try{o()}finally{he=t}}}let Vt=0;class md{constructor(o,t){this.sub=o,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class hi{constructor(o){this.computed=o,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(o){if(!he||!oo||he===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==he)t=this.activeLink=new md(he,this),he.deps?(t.prevDep=he.depsTail,he.depsTail.nextDep=t,he.depsTail=t):he.deps=he.depsTail=t,fl(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const r=t.nextDep;r.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=r),t.prevDep=he.depsTail,t.nextDep=void 0,he.depsTail.nextDep=t,he.depsTail=t,he.deps===t&&(he.deps=r)}return t}trigger(o){this.version++,Vt++,this.notify(o)}notify(o){ui();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{fi()}}}function fl(e){if(e.dep.sc++,e.sub.flags&4){const o=e.dep.computed;if(o&&!e.dep.subs){o.flags|=20;for(let r=o.deps;r;r=r.nextDep)fl(r)}const t=e.dep.subs;t!==e&&(e.prevSub=t,t&&(t.nextSub=e)),e.dep.subs=e}}const Ir=new WeakMap,Xo=Symbol(""),En=Symbol(""),Ut=Symbol("");function Ie(e,o,t){if(oo&&he){let r=Ir.get(e);r||Ir.set(e,r=new Map);let n=r.get(t);n||(r.set(t,n=new hi),n.map=r,n.key=t),n.track()}}function wo(e,o,t,r,n,i){const a=Ir.get(e);if(!a){Vt++;return}const l=s=>{s&&s.trigger()};if(ui(),o==="clear")a.forEach(l);else{const s=Y(e),c=s&&si(t);if(s&&t==="length"){const d=Number(r);a.forEach((u,p)=>{(p==="length"||p===Ut||!Ho(p)&&p>=d)&&l(u)})}else switch((t!==void 0||a.has(void 0))&&l(a.get(t)),c&&l(a.get(Ut)),o){case"add":s?c&&l(a.get("length")):(l(a.get(Xo)),pt(e)&&l(a.get(En)));break;case"delete":s||(l(a.get(Xo)),pt(e)&&l(a.get(En)));break;case"set":pt(e)&&l(a.get(Xo));break}}fi()}function gd(e,o){const t=Ir.get(e);return t&&t.get(o)}function ct(e){const o=ie(e);return o===e?o:(Ie(o,"iterate",Ut),Xe(e)?o:o.map(He))}function Ur(e){return Ie(e=ie(e),"iterate",Ut),e}const bd={__proto__:null,[Symbol.iterator](){return xn(this,Symbol.iterator,He)},concat(...e){return ct(this).concat(...e.map(o=>Y(o)?ct(o):o))},entries(){return xn(this,"entries",e=>(e[1]=He(e[1]),e))},every(e,o){return yo(this,"every",e,o,void 0,arguments)},filter(e,o){return yo(this,"filter",e,o,t=>t.map(He),arguments)},find(e,o){return yo(this,"find",e,o,He,arguments)},findIndex(e,o){return yo(this,"findIndex",e,o,void 0,arguments)},findLast(e,o){return yo(this,"findLast",e,o,He,arguments)},findLastIndex(e,o){return yo(this,"findLastIndex",e,o,void 0,arguments)},forEach(e,o){return yo(this,"forEach",e,o,void 0,arguments)},includes(...e){return vn(this,"includes",e)},indexOf(...e){return vn(this,"indexOf",e)},join(e){return ct(this).join(e)},lastIndexOf(...e){return vn(this,"lastIndexOf",e)},map(e,o){return yo(this,"map",e,o,void 0,arguments)},pop(){return At(this,"pop")},push(...e){return At(this,"push",e)},reduce(e,...o){return Wi(this,"reduce",e,o)},reduceRight(e,...o){return Wi(this,"reduceRight",e,o)},shift(){return At(this,"shift")},some(e,o){return yo(this,"some",e,o,void 0,arguments)},splice(...e){return At(this,"splice",e)},toReversed(){return ct(this).toReversed()},toSorted(e){return ct(this).toSorted(e)},toSpliced(...e){return ct(this).toSpliced(...e)},unshift(...e){return At(this,"unshift",e)},values(){return xn(this,"values",He)}};function xn(e,o,t){const r=Ur(e),n=r[o]();return r!==e&&!Xe(e)&&(n._next=n.next,n.next=()=>{const i=n._next();return i.value&&(i.value=t(i.value)),i}),n}const Cd=Array.prototype;function yo(e,o,t,r,n,i){const a=Ur(e),l=a!==e&&!Xe(e),s=a[o];if(s!==Cd[o]){const u=s.apply(e,i);return l?He(u):u}let c=t;a!==e&&(l?c=function(u,p){return t.call(this,He(u),p,e)}:t.length>2&&(c=function(u,p){return t.call(this,u,p,e)}));const d=s.call(a,c,r);return l&&n?n(d):d}function Wi(e,o,t,r){const n=Ur(e);let i=t;return n!==e&&(Xe(e)?t.length>3&&(i=function(a,l,s){return t.call(this,a,l,s,e)}):i=function(a,l,s){return t.call(this,a,He(l),s,e)}),n[o](i,...r)}function vn(e,o,t){const r=ie(e);Ie(r,"iterate",Ut);const n=r[o](...t);return(n===-1||n===!1)&&Ci(t[0])?(t[0]=ie(t[0]),r[o](...t)):n}function At(e,o,t=[]){jo(),ui();const r=ie(e)[o].apply(e,t);return fi(),No(),r}const xd=ii("__proto__,__v_isRef,__isVue"),pl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ho));function vd(e){Ho(e)||(e=String(e));const o=ie(this);return Ie(o,"has",e),o.hasOwnProperty(e)}class hl{constructor(o=!1,t=!1){this._isReadonly=o,this._isShallow=t}get(o,t,r){if(t==="__v_skip")return o.__v_skip;const n=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!n;if(t==="__v_isReadonly")return n;if(t==="__v_isShallow")return i;if(t==="__v_raw")return r===(n?i?Ad:Cl:i?bl:gl).get(o)||Object.getPrototypeOf(o)===Object.getPrototypeOf(r)?o:void 0;const a=Y(o);if(!n){let s;if(a&&(s=bd[t]))return s;if(t==="hasOwnProperty")return vd}const l=Reflect.get(o,t,Pe(o)?o:r);return(Ho(t)?pl.has(t):xd(t))||(n||Ie(o,"get",t),i)?l:Pe(l)?a&&si(t)?l:l.value:me(l)?n?gi(l):Gr(l):l}}class ml extends hl{constructor(o=!1){super(!1,o)}set(o,t,r,n){let i=o[t];if(!this._isShallow){const s=ot(i);if(!Xe(r)&&!ot(r)&&(i=ie(i),r=ie(r)),!Y(o)&&Pe(i)&&!Pe(r))return s?!1:(i.value=r,!0)}const a=Y(o)&&si(t)?Number(t)e,fr=e=>Reflect.getPrototypeOf(e);function Td(e,o,t){return function(...r){const n=this.__v_raw,i=ie(n),a=pt(i),l=e==="entries"||e===Symbol.iterator&&a,s=e==="keys"&&a,c=n[e](...r),d=t?Rn:o?kn:He;return!o&&Ie(i,"iterate",s?En:Xo),{next(){const{value:u,done:p}=c.next();return p?{value:u,done:p}:{value:l?[d(u[0]),d(u[1])]:d(u),done:p}},[Symbol.iterator](){return this}}}}function pr(e){return function(...o){return e==="delete"?!1:e==="clear"?void 0:this}}function $d(e,o){const t={get(n){const i=this.__v_raw,a=ie(i),l=ie(n);e||(zo(n,l)&&Ie(a,"get",n),Ie(a,"get",l));const{has:s}=fr(a),c=o?Rn:e?kn:He;if(s.call(a,n))return c(i.get(n));if(s.call(a,l))return c(i.get(l));i!==a&&i.get(n)},get size(){const n=this.__v_raw;return!e&&Ie(ie(n),"iterate",Xo),Reflect.get(n,"size",n)},has(n){const i=this.__v_raw,a=ie(i),l=ie(n);return e||(zo(n,l)&&Ie(a,"has",n),Ie(a,"has",l)),n===l?i.has(n):i.has(n)||i.has(l)},forEach(n,i){const a=this,l=a.__v_raw,s=ie(l),c=o?Rn:e?kn:He;return!e&&Ie(s,"iterate",Xo),l.forEach((d,u)=>n.call(i,c(d),c(u),a))}};return we(t,e?{add:pr("add"),set:pr("set"),delete:pr("delete"),clear:pr("clear")}:{add(n){!o&&!Xe(n)&&!ot(n)&&(n=ie(n));const i=ie(this);return fr(i).has.call(i,n)||(i.add(n),wo(i,"add",n,n)),this},set(n,i){!o&&!Xe(i)&&!ot(i)&&(i=ie(i));const a=ie(this),{has:l,get:s}=fr(a);let c=l.call(a,n);c||(n=ie(n),c=l.call(a,n));const d=s.call(a,n);return a.set(n,i),c?zo(i,d)&&wo(a,"set",n,i):wo(a,"add",n,i),this},delete(n){const i=ie(this),{has:a,get:l}=fr(i);let s=a.call(i,n);s||(n=ie(n),s=a.call(i,n)),l&&l.call(i,n);const c=i.delete(n);return s&&wo(i,"delete",n,void 0),c},clear(){const n=ie(this),i=n.size!==0,a=n.clear();return i&&wo(n,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(n=>{t[n]=Td(n,e,o)}),t}function mi(e,o){const t=$d(e,o);return(r,n,i)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?r:Reflect.get(se(t,n)&&n in r?t:r,n,i)}const Id={get:mi(!1,!1)},Hd={get:mi(!1,!0)},Fd={get:mi(!0,!1)};const gl=new WeakMap,bl=new WeakMap,Cl=new WeakMap,Ad=new WeakMap;function Md(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Dd(e){return e.__v_skip||!Object.isExtensible(e)?0:Md(od(e))}function Gr(e){return ot(e)?e:bi(e,!1,Sd,Id,gl)}function _d(e){return bi(e,!1,Pd,Hd,bl)}function gi(e){return bi(e,!0,wd,Fd,Cl)}function bi(e,o,t,r,n){if(!me(e)||e.__v_raw&&!(o&&e.__v_isReactive))return e;const i=n.get(e);if(i)return i;const a=Dd(e);if(a===0)return e;const l=new Proxy(e,a===2?r:t);return n.set(e,l),l}function ht(e){return ot(e)?ht(e.__v_raw):!!(e&&e.__v_isReactive)}function ot(e){return!!(e&&e.__v_isReadonly)}function Xe(e){return!!(e&&e.__v_isShallow)}function Ci(e){return e?!!e.__v_raw:!1}function ie(e){const o=e&&e.__v_raw;return o?ie(o):e}function Ln(e){return!se(e,"__v_skip")&&Object.isExtensible(e)&&ol(e,"__v_skip",!0),e}const He=e=>me(e)?Gr(e):e,kn=e=>me(e)?gi(e):e;function Pe(e){return e?e.__v_isRef===!0:!1}function Be(e){return vl(e,!1)}function xl(e){return vl(e,!0)}function vl(e,o){return Pe(e)?e:new Ed(e,o)}class Ed{constructor(o,t){this.dep=new hi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?o:ie(o),this._value=t?o:He(o),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(o){const t=this._rawValue,r=this.__v_isShallow||Xe(o)||ot(o);o=r?o:ie(o),zo(o,t)&&(this._rawValue=o,this._value=r?o:He(o),this.dep.trigger())}}function Rd(e){return Pe(e)?e.value:e}const Ld={get:(e,o,t)=>o==="__v_raw"?e:Rd(Reflect.get(e,o,t)),set:(e,o,t,r)=>{const n=e[o];return Pe(n)&&!Pe(t)?(n.value=t,!0):Reflect.set(e,o,t,r)}};function yl(e){return ht(e)?e:new Proxy(e,Ld)}class kd{constructor(o,t,r){this._object=o,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const o=this._object[this._key];return this._value=o===void 0?this._defaultValue:o}set value(o){this._object[this._key]=o}get dep(){return gd(ie(this._object),this._key)}}class zd{constructor(o){this._getter=o,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function qr(e,o,t){return Pe(e)?e:X(e)?new zd(e):me(e)&&arguments.length>1?Od(e,o,t):Be(e)}function Od(e,o,t){const r=e[o];return Pe(r)?r:new kd(e,o,t)}class Bd{constructor(o,t,r){this.fn=o,this.setter=t,this._value=void 0,this.dep=new hi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Vt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&he!==this)return ll(this,!0),!0}get value(){const o=this.dep.track();return dl(this),o&&(o.version=this.dep.version),this._value}set value(o){this.setter&&this.setter(o)}}function Wd(e,o,t=!1){let r,n;return X(e)?r=e:(r=e.get,n=e.set),new Bd(r,n,t)}const hr={},Hr=new WeakMap;let Yo;function jd(e,o=!1,t=Yo){if(t){let r=Hr.get(t);r||Hr.set(t,r=[]),r.push(e)}}function Nd(e,o,t=fe){const{immediate:r,deep:n,once:i,scheduler:a,augmentJob:l,call:s}=t,c=v=>n?v:Xe(v)||n===!1||n===0?Po(v,1):Po(v);let d,u,p,g,h=!1,b=!1;if(Pe(e)?(u=()=>e.value,h=Xe(e)):ht(e)?(u=()=>c(e),h=!0):Y(e)?(b=!0,h=e.some(v=>ht(v)||Xe(v)),u=()=>e.map(v=>{if(Pe(v))return v.value;if(ht(v))return c(v);if(X(v))return s?s(v,2):v()})):X(e)?o?u=s?()=>s(e,2):e:u=()=>{if(p){jo();try{p()}finally{No()}}const v=Yo;Yo=d;try{return s?s(e,3,[g]):e(g)}finally{Yo=v}}:u=mo,o&&n){const v=u,L=n===!0?1/0:n;u=()=>Po(v(),L)}const y=pd(),C=()=>{d.stop(),y&&y.active&&li(y.effects,d)};if(i&&o){const v=o;o=(...L)=>{v(...L),C()}}let I=b?new Array(e.length).fill(hr):hr;const E=v=>{if(!(!(d.flags&1)||!d.dirty&&!v))if(o){const L=d.run();if(n||h||(b?L.some((W,w)=>zo(W,I[w])):zo(L,I))){p&&p();const W=Yo;Yo=d;try{const w=[L,I===hr?void 0:b&&I[0]===hr?[]:I,g];s?s(o,3,w):o(...w),I=L}finally{Yo=W}}}else d.run()};return l&&l(E),d=new il(u),d.scheduler=a?()=>a(E,!1):E,g=v=>jd(v,!1,d),p=d.onStop=()=>{const v=Hr.get(d);if(v){if(s)s(v,4);else for(const L of v)L();Hr.delete(d)}},o?r?E(!0):I=d.run():a?a(E.bind(null,!0),!0):d.run(),C.pause=d.pause.bind(d),C.resume=d.resume.bind(d),C.stop=C,C}function Po(e,o=1/0,t){if(o<=0||!me(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),o--,Pe(e))Po(e.value,o,t);else if(Y(e))for(let r=0;r{Po(r,o,t)});else if(Xa(e)){for(const r in e)Po(e[r],o,t);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Po(e[r],o,t)}return e}/** +**/let qe;class fd{constructor(o=!1){this.detached=o,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=qe,!o&&qe&&(this.index=(qe.scopes||(qe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let o,t;if(this.scopes)for(o=0,t=this.scopes.length;o0)return;if(zt){let o=zt;for(zt=void 0;o;){const t=o.next;o.next=void 0,o.flags&=-9,o=t}}let e;for(;Ot;){let o=Ot;for(Ot=void 0;o;){const t=o.next;if(o.next=void 0,o.flags&=-9,o.flags&1)try{o.trigger()}catch(r){e||(e=r)}o=t}}if(e)throw e}function sl(e){for(let o=e.deps;o;o=o.nextDep)o.version=-1,o.prevActiveLink=o.dep.activeLink,o.dep.activeLink=o}function cl(e){let o,t=e.depsTail,r=t;for(;r;){const n=r.prevDep;r.version===-1?(r===t&&(t=n),pi(r),hd(r)):o=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=n}e.deps=o,e.depsTail=t}function _n(e){for(let o=e.deps;o;o=o.nextDep)if(o.dep.version!==o.version||o.dep.computed&&(dl(o.dep.computed)||o.dep.version!==o.version))return!0;return!!e._dirty}function dl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Vt))return;e.globalVersion=Vt;const o=e.dep;if(e.flags|=2,o.version>0&&!e.isSSR&&e.deps&&!_n(e)){e.flags&=-3;return}const t=he,r=oo;he=e,oo=!0;try{sl(e);const n=e.fn(e._value);(o.version===0||Oo(n,e._value))&&(e._value=n,o.version++)}catch(n){throw o.version++,n}finally{he=t,oo=r,cl(e),e.flags&=-3}}function pi(e,o=!1){const{dep:t,prevSub:r,nextSub:n}=e;if(r&&(r.nextSub=n,e.prevSub=void 0),n&&(n.prevSub=r,e.nextSub=void 0),t.subs===e&&(t.subs=r,!r&&t.computed)){t.computed.flags&=-5;for(let i=t.computed.deps;i;i=i.nextDep)pi(i,!0)}!o&&!--t.sc&&t.map&&t.map.delete(t.key)}function hd(e){const{prevDep:o,nextDep:t}=e;o&&(o.nextDep=t,e.prevDep=void 0),t&&(t.prevDep=o,e.nextDep=void 0)}let oo=!0;const ul=[];function jo(){ul.push(oo),oo=!1}function No(){const e=ul.pop();oo=e===void 0?!0:e}function Bi(e){const{cleanup:o}=e;if(e.cleanup=void 0,o){const t=he;he=void 0;try{o()}finally{he=t}}}let Vt=0;class md{constructor(o,t){this.sub=o,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class hi{constructor(o){this.computed=o,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(o){if(!he||!oo||he===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==he)t=this.activeLink=new md(he,this),he.deps?(t.prevDep=he.depsTail,he.depsTail.nextDep=t,he.depsTail=t):he.deps=he.depsTail=t,fl(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const r=t.nextDep;r.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=r),t.prevDep=he.depsTail,t.nextDep=void 0,he.depsTail.nextDep=t,he.depsTail=t,he.deps===t&&(he.deps=r)}return t}trigger(o){this.version++,Vt++,this.notify(o)}notify(o){ui();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{fi()}}}function fl(e){if(e.dep.sc++,e.sub.flags&4){const o=e.dep.computed;if(o&&!e.dep.subs){o.flags|=20;for(let r=o.deps;r;r=r.nextDep)fl(r)}const t=e.dep.subs;t!==e&&(e.prevSub=t,t&&(t.nextSub=e)),e.dep.subs=e}}const Ir=new WeakMap,Xo=Symbol(""),En=Symbol(""),Ut=Symbol("");function Ie(e,o,t){if(oo&&he){let r=Ir.get(e);r||Ir.set(e,r=new Map);let n=r.get(t);n||(r.set(t,n=new hi),n.map=r,n.key=t),n.track()}}function wo(e,o,t,r,n,i){const a=Ir.get(e);if(!a){Vt++;return}const l=s=>{s&&s.trigger()};if(ui(),o==="clear")a.forEach(l);else{const s=Y(e),c=s&&si(t);if(s&&t==="length"){const d=Number(r);a.forEach((u,p)=>{(p==="length"||p===Ut||!Ho(p)&&p>=d)&&l(u)})}else switch((t!==void 0||a.has(void 0))&&l(a.get(t)),c&&l(a.get(Ut)),o){case"add":s?c&&l(a.get("length")):(l(a.get(Xo)),pt(e)&&l(a.get(En)));break;case"delete":s||(l(a.get(Xo)),pt(e)&&l(a.get(En)));break;case"set":pt(e)&&l(a.get(Xo));break}}fi()}function gd(e,o){const t=Ir.get(e);return t&&t.get(o)}function ct(e){const o=ie(e);return o===e?o:(Ie(o,"iterate",Ut),Xe(e)?o:o.map(He))}function Ur(e){return Ie(e=ie(e),"iterate",Ut),e}const bd={__proto__:null,[Symbol.iterator](){return xn(this,Symbol.iterator,He)},concat(...e){return ct(this).concat(...e.map(o=>Y(o)?ct(o):o))},entries(){return xn(this,"entries",e=>(e[1]=He(e[1]),e))},every(e,o){return yo(this,"every",e,o,void 0,arguments)},filter(e,o){return yo(this,"filter",e,o,t=>t.map(He),arguments)},find(e,o){return yo(this,"find",e,o,He,arguments)},findIndex(e,o){return yo(this,"findIndex",e,o,void 0,arguments)},findLast(e,o){return yo(this,"findLast",e,o,He,arguments)},findLastIndex(e,o){return yo(this,"findLastIndex",e,o,void 0,arguments)},forEach(e,o){return yo(this,"forEach",e,o,void 0,arguments)},includes(...e){return vn(this,"includes",e)},indexOf(...e){return vn(this,"indexOf",e)},join(e){return ct(this).join(e)},lastIndexOf(...e){return vn(this,"lastIndexOf",e)},map(e,o){return yo(this,"map",e,o,void 0,arguments)},pop(){return At(this,"pop")},push(...e){return At(this,"push",e)},reduce(e,...o){return Wi(this,"reduce",e,o)},reduceRight(e,...o){return Wi(this,"reduceRight",e,o)},shift(){return At(this,"shift")},some(e,o){return yo(this,"some",e,o,void 0,arguments)},splice(...e){return At(this,"splice",e)},toReversed(){return ct(this).toReversed()},toSorted(e){return ct(this).toSorted(e)},toSpliced(...e){return ct(this).toSpliced(...e)},unshift(...e){return At(this,"unshift",e)},values(){return xn(this,"values",He)}};function xn(e,o,t){const r=Ur(e),n=r[o]();return r!==e&&!Xe(e)&&(n._next=n.next,n.next=()=>{const i=n._next();return i.value&&(i.value=t(i.value)),i}),n}const Cd=Array.prototype;function yo(e,o,t,r,n,i){const a=Ur(e),l=a!==e&&!Xe(e),s=a[o];if(s!==Cd[o]){const u=s.apply(e,i);return l?He(u):u}let c=t;a!==e&&(l?c=function(u,p){return t.call(this,He(u),p,e)}:t.length>2&&(c=function(u,p){return t.call(this,u,p,e)}));const d=s.call(a,c,r);return l&&n?n(d):d}function Wi(e,o,t,r){const n=Ur(e);let i=t;return n!==e&&(Xe(e)?t.length>3&&(i=function(a,l,s){return t.call(this,a,l,s,e)}):i=function(a,l,s){return t.call(this,a,He(l),s,e)}),n[o](i,...r)}function vn(e,o,t){const r=ie(e);Ie(r,"iterate",Ut);const n=r[o](...t);return(n===-1||n===!1)&&Ci(t[0])?(t[0]=ie(t[0]),r[o](...t)):n}function At(e,o,t=[]){jo(),ui();const r=ie(e)[o].apply(e,t);return fi(),No(),r}const xd=ii("__proto__,__v_isRef,__isVue"),pl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ho));function vd(e){Ho(e)||(e=String(e));const o=ie(this);return Ie(o,"has",e),o.hasOwnProperty(e)}class hl{constructor(o=!1,t=!1){this._isReadonly=o,this._isShallow=t}get(o,t,r){if(t==="__v_skip")return o.__v_skip;const n=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!n;if(t==="__v_isReadonly")return n;if(t==="__v_isShallow")return i;if(t==="__v_raw")return r===(n?i?Ad:Cl:i?bl:gl).get(o)||Object.getPrototypeOf(o)===Object.getPrototypeOf(r)?o:void 0;const a=Y(o);if(!n){let s;if(a&&(s=bd[t]))return s;if(t==="hasOwnProperty")return vd}const l=Reflect.get(o,t,Pe(o)?o:r);return(Ho(t)?pl.has(t):xd(t))||(n||Ie(o,"get",t),i)?l:Pe(l)?a&&si(t)?l:l.value:me(l)?n?gi(l):Gr(l):l}}class ml extends hl{constructor(o=!1){super(!1,o)}set(o,t,r,n){let i=o[t];if(!this._isShallow){const s=ot(i);if(!Xe(r)&&!ot(r)&&(i=ie(i),r=ie(r)),!Y(o)&&Pe(i)&&!Pe(r))return s?!1:(i.value=r,!0)}const a=Y(o)&&si(t)?Number(t)e,fr=e=>Reflect.getPrototypeOf(e);function Td(e,o,t){return function(...r){const n=this.__v_raw,i=ie(n),a=pt(i),l=e==="entries"||e===Symbol.iterator&&a,s=e==="keys"&&a,c=n[e](...r),d=t?Rn:o?kn:He;return!o&&Ie(i,"iterate",s?En:Xo),{next(){const{value:u,done:p}=c.next();return p?{value:u,done:p}:{value:l?[d(u[0]),d(u[1])]:d(u),done:p}},[Symbol.iterator](){return this}}}}function pr(e){return function(...o){return e==="delete"?!1:e==="clear"?void 0:this}}function $d(e,o){const t={get(n){const i=this.__v_raw,a=ie(i),l=ie(n);e||(Oo(n,l)&&Ie(a,"get",n),Ie(a,"get",l));const{has:s}=fr(a),c=o?Rn:e?kn:He;if(s.call(a,n))return c(i.get(n));if(s.call(a,l))return c(i.get(l));i!==a&&i.get(n)},get size(){const n=this.__v_raw;return!e&&Ie(ie(n),"iterate",Xo),Reflect.get(n,"size",n)},has(n){const i=this.__v_raw,a=ie(i),l=ie(n);return e||(Oo(n,l)&&Ie(a,"has",n),Ie(a,"has",l)),n===l?i.has(n):i.has(n)||i.has(l)},forEach(n,i){const a=this,l=a.__v_raw,s=ie(l),c=o?Rn:e?kn:He;return!e&&Ie(s,"iterate",Xo),l.forEach((d,u)=>n.call(i,c(d),c(u),a))}};return we(t,e?{add:pr("add"),set:pr("set"),delete:pr("delete"),clear:pr("clear")}:{add(n){!o&&!Xe(n)&&!ot(n)&&(n=ie(n));const i=ie(this);return fr(i).has.call(i,n)||(i.add(n),wo(i,"add",n,n)),this},set(n,i){!o&&!Xe(i)&&!ot(i)&&(i=ie(i));const a=ie(this),{has:l,get:s}=fr(a);let c=l.call(a,n);c||(n=ie(n),c=l.call(a,n));const d=s.call(a,n);return a.set(n,i),c?Oo(i,d)&&wo(a,"set",n,i):wo(a,"add",n,i),this},delete(n){const i=ie(this),{has:a,get:l}=fr(i);let s=a.call(i,n);s||(n=ie(n),s=a.call(i,n)),l&&l.call(i,n);const c=i.delete(n);return s&&wo(i,"delete",n,void 0),c},clear(){const n=ie(this),i=n.size!==0,a=n.clear();return i&&wo(n,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(n=>{t[n]=Td(n,e,o)}),t}function mi(e,o){const t=$d(e,o);return(r,n,i)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?r:Reflect.get(se(t,n)&&n in r?t:r,n,i)}const Id={get:mi(!1,!1)},Hd={get:mi(!1,!0)},Fd={get:mi(!0,!1)};const gl=new WeakMap,bl=new WeakMap,Cl=new WeakMap,Ad=new WeakMap;function Md(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Dd(e){return e.__v_skip||!Object.isExtensible(e)?0:Md(od(e))}function Gr(e){return ot(e)?e:bi(e,!1,Sd,Id,gl)}function _d(e){return bi(e,!1,Pd,Hd,bl)}function gi(e){return bi(e,!0,wd,Fd,Cl)}function bi(e,o,t,r,n){if(!me(e)||e.__v_raw&&!(o&&e.__v_isReactive))return e;const i=n.get(e);if(i)return i;const a=Dd(e);if(a===0)return e;const l=new Proxy(e,a===2?r:t);return n.set(e,l),l}function ht(e){return ot(e)?ht(e.__v_raw):!!(e&&e.__v_isReactive)}function ot(e){return!!(e&&e.__v_isReadonly)}function Xe(e){return!!(e&&e.__v_isShallow)}function Ci(e){return e?!!e.__v_raw:!1}function ie(e){const o=e&&e.__v_raw;return o?ie(o):e}function Ln(e){return!se(e,"__v_skip")&&Object.isExtensible(e)&&ol(e,"__v_skip",!0),e}const He=e=>me(e)?Gr(e):e,kn=e=>me(e)?gi(e):e;function Pe(e){return e?e.__v_isRef===!0:!1}function Be(e){return vl(e,!1)}function xl(e){return vl(e,!0)}function vl(e,o){return Pe(e)?e:new Ed(e,o)}class Ed{constructor(o,t){this.dep=new hi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?o:ie(o),this._value=t?o:He(o),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(o){const t=this._rawValue,r=this.__v_isShallow||Xe(o)||ot(o);o=r?o:ie(o),Oo(o,t)&&(this._rawValue=o,this._value=r?o:He(o),this.dep.trigger())}}function Rd(e){return Pe(e)?e.value:e}const Ld={get:(e,o,t)=>o==="__v_raw"?e:Rd(Reflect.get(e,o,t)),set:(e,o,t,r)=>{const n=e[o];return Pe(n)&&!Pe(t)?(n.value=t,!0):Reflect.set(e,o,t,r)}};function yl(e){return ht(e)?e:new Proxy(e,Ld)}class kd{constructor(o,t,r){this._object=o,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const o=this._object[this._key];return this._value=o===void 0?this._defaultValue:o}set value(o){this._object[this._key]=o}get dep(){return gd(ie(this._object),this._key)}}class Od{constructor(o){this._getter=o,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function qr(e,o,t){return Pe(e)?e:X(e)?new Od(e):me(e)&&arguments.length>1?zd(e,o,t):Be(e)}function zd(e,o,t){const r=e[o];return Pe(r)?r:new kd(e,o,t)}class Bd{constructor(o,t,r){this.fn=o,this.setter=t,this._value=void 0,this.dep=new hi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Vt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&he!==this)return ll(this,!0),!0}get value(){const o=this.dep.track();return dl(this),o&&(o.version=this.dep.version),this._value}set value(o){this.setter&&this.setter(o)}}function Wd(e,o,t=!1){let r,n;return X(e)?r=e:(r=e.get,n=e.set),new Bd(r,n,t)}const hr={},Hr=new WeakMap;let Yo;function jd(e,o=!1,t=Yo){if(t){let r=Hr.get(t);r||Hr.set(t,r=[]),r.push(e)}}function Nd(e,o,t=fe){const{immediate:r,deep:n,once:i,scheduler:a,augmentJob:l,call:s}=t,c=v=>n?v:Xe(v)||n===!1||n===0?Po(v,1):Po(v);let d,u,p,g,h=!1,b=!1;if(Pe(e)?(u=()=>e.value,h=Xe(e)):ht(e)?(u=()=>c(e),h=!0):Y(e)?(b=!0,h=e.some(v=>ht(v)||Xe(v)),u=()=>e.map(v=>{if(Pe(v))return v.value;if(ht(v))return c(v);if(X(v))return s?s(v,2):v()})):X(e)?o?u=s?()=>s(e,2):e:u=()=>{if(p){jo();try{p()}finally{No()}}const v=Yo;Yo=d;try{return s?s(e,3,[g]):e(g)}finally{Yo=v}}:u=mo,o&&n){const v=u,L=n===!0?1/0:n;u=()=>Po(v(),L)}const y=pd(),C=()=>{d.stop(),y&&y.active&&li(y.effects,d)};if(i&&o){const v=o;o=(...L)=>{v(...L),C()}}let I=b?new Array(e.length).fill(hr):hr;const E=v=>{if(!(!(d.flags&1)||!d.dirty&&!v))if(o){const L=d.run();if(n||h||(b?L.some((W,w)=>Oo(W,I[w])):Oo(L,I))){p&&p();const W=Yo;Yo=d;try{const w=[L,I===hr?void 0:b&&I[0]===hr?[]:I,g];s?s(o,3,w):o(...w),I=L}finally{Yo=W}}}else d.run()};return l&&l(E),d=new il(u),d.scheduler=a?()=>a(E,!1):E,g=v=>jd(v,!1,d),p=d.onStop=()=>{const v=Hr.get(d);if(v){if(s)s(v,4);else for(const L of v)L();Hr.delete(d)}},o?r?E(!0):I=d.run():a?a(E.bind(null,!0),!0):d.run(),C.pause=d.pause.bind(d),C.resume=d.resume.bind(d),C.stop=C,C}function Po(e,o=1/0,t){if(o<=0||!me(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),o--,Pe(e))Po(e.value,o,t);else if(Y(e))for(let r=0;r{Po(r,o,t)});else if(Xa(e)){for(const r in e)Po(e[r],o,t);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Po(e[r],o,t)}return e}/** * @vue/runtime-core v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function or(e,o,t,r){try{return r?e(...r):e()}catch(n){Kr(n,o,t)}}function ro(e,o,t,r){if(X(e)){const n=or(e,o,t,r);return n&&Za(n)&&n.catch(i=>{Kr(i,o,t)}),n}if(Y(e)){const n=[];for(let i=0;i>>1,n=ke[r],i=Gt(n);i=Gt(t)?ke.push(e):ke.splice(Ud(o),0,e),e.flags|=1,Pl()}}function Pl(){Fr||(Fr=Sl.then($l))}function Gd(e){Y(e)?mt.push(...e):Eo&&e.id===-1?Eo.splice(dt+1,0,e):e.flags&1||(mt.push(e),e.flags|=1),Pl()}function ji(e,o,t=uo+1){for(;tGt(t)-Gt(r));if(mt.length=0,Eo){Eo.push(...o);return}for(Eo=o,dt=0;dte.id==null?e.flags&2?-1:1/0:e.id;function $l(e){try{for(uo=0;uo{r._d&&oa(-1);const i=Ar(o);let a;try{a=e(...n)}finally{Ar(i),r._d&&oa(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Rv(e,o){if(Te===null)return e;const t=tn(Te),r=e.dirs||(e.dirs=[]);for(let n=0;ne.__isTeleport,Bt=e=>e&&(e.disabled||e.disabled===""),Ni=e=>e&&(e.defer||e.defer===""),Vi=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Ui=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,zn=(e,o)=>{const t=e&&e.to;return ve(t)?o?o(t):null:t},Al={name:"Teleport",__isTeleport:!0,process(e,o,t,r,n,i,a,l,s,c){const{mc:d,pc:u,pbc:p,o:{insert:g,querySelector:h,createText:b,createComment:y}}=c,C=Bt(o.props);let{shapeFlag:I,children:E,dynamicChildren:v}=o;if(e==null){const L=o.el=b(""),W=o.anchor=b("");g(L,t,r),g(W,t,r);const w=(D,j)=>{I&16&&(n&&n.isCE&&(n.ce._teleportTarget=D),d(E,D,j,n,i,a,l,s))},K=()=>{const D=o.target=zn(o.props,h),j=Ml(D,o,b,g);D&&(a!=="svg"&&Vi(D)?a="svg":a!=="mathml"&&Ui(D)&&(a="mathml"),C||(w(D,j),Sr(o,!1)))};C&&(w(t,W),Sr(o,!0)),Ni(o.props)?Le(()=>{K(),o.el.__isMounted=!0},i):K()}else{if(Ni(o.props)&&!e.el.__isMounted){Le(()=>{Al.process(e,o,t,r,n,i,a,l,s,c),delete e.el.__isMounted},i);return}o.el=e.el,o.targetStart=e.targetStart;const L=o.anchor=e.anchor,W=o.target=e.target,w=o.targetAnchor=e.targetAnchor,K=Bt(e.props),D=K?t:W,j=K?L:w;if(a==="svg"||Vi(W)?a="svg":(a==="mathml"||Ui(W))&&(a="mathml"),v?(p(e.dynamicChildren,v,D,n,i,a,l),Si(e,o,!0)):s||u(e,o,D,j,n,i,a,l,!1),C)K?o.props&&e.props&&o.props.to!==e.props.to&&(o.props.to=e.props.to):mr(o,t,L,c,1);else if((o.props&&o.props.to)!==(e.props&&e.props.to)){const q=o.target=zn(o.props,h);q&&mr(o,q,null,c,0)}else K&&mr(o,W,w,c,1);Sr(o,C)}},remove(e,o,t,{um:r,o:{remove:n}},i){const{shapeFlag:a,children:l,anchor:s,targetStart:c,targetAnchor:d,target:u,props:p}=e;if(u&&(n(c),n(d)),i&&n(s),a&16){const g=i||!Bt(p);for(let h=0;h{e.isMounted=!0}),Xr(()=>{e.isUnmounting=!0}),e}const Qe=[Function,Array],_l={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Qe,onEnter:Qe,onAfterEnter:Qe,onEnterCancelled:Qe,onBeforeLeave:Qe,onLeave:Qe,onAfterLeave:Qe,onLeaveCancelled:Qe,onBeforeAppear:Qe,onAppear:Qe,onAfterAppear:Qe,onAppearCancelled:Qe},El=e=>{const o=e.subTree;return o.component?El(o.component):o},Jd={name:"BaseTransition",props:_l,setup(e,{slots:o}){const t=ss(),r=Dl();return()=>{const n=o.default&&vi(o.default(),!0);if(!n||!n.length)return;const i=Rl(n),a=ie(e),{mode:l}=a;if(r.isLeaving)return yn(i);const s=Gi(i);if(!s)return yn(i);let c=qt(s,a,r,t,u=>c=u);s.type!==Me&&tt(s,c);let d=t.subTree&&Gi(t.subTree);if(d&&d.type!==Me&&!Jo(s,d)&&El(t).type!==Me){let u=qt(d,a,r,t);if(tt(d,u),l==="out-in"&&s.type!==Me)return r.isLeaving=!0,u.afterLeave=()=>{r.isLeaving=!1,t.job.flags&8||t.update(),delete u.afterLeave,d=void 0},yn(i);l==="in-out"&&s.type!==Me?u.delayLeave=(p,g,h)=>{const b=Ll(r,d);b[String(d.key)]=d,p[Ro]=()=>{g(),p[Ro]=void 0,delete c.delayedLeave,d=void 0},c.delayedLeave=()=>{h(),delete c.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return i}}};function Rl(e){let o=e[0];if(e.length>1){for(const t of e)if(t.type!==Me){o=t;break}}return o}const Zd=Jd;function Ll(e,o){const{leavingVNodes:t}=e;let r=t.get(o.type);return r||(r=Object.create(null),t.set(o.type,r)),r}function qt(e,o,t,r,n){const{appear:i,mode:a,persisted:l=!1,onBeforeEnter:s,onEnter:c,onAfterEnter:d,onEnterCancelled:u,onBeforeLeave:p,onLeave:g,onAfterLeave:h,onLeaveCancelled:b,onBeforeAppear:y,onAppear:C,onAfterAppear:I,onAppearCancelled:E}=o,v=String(e.key),L=Ll(t,e),W=(D,j)=>{D&&ro(D,r,9,j)},w=(D,j)=>{const q=j[1];W(D,j),Y(D)?D.every(F=>F.length<=1)&&q():D.length<=1&&q()},K={mode:a,persisted:l,beforeEnter(D){let j=s;if(!t.isMounted)if(i)j=y||s;else return;D[Ro]&&D[Ro](!0);const q=L[v];q&&Jo(e,q)&&q.el[Ro]&&q.el[Ro](),W(j,[D])},enter(D){let j=c,q=d,F=u;if(!t.isMounted)if(i)j=C||c,q=I||d,F=E||u;else return;let ee=!1;const ae=D[gr]=xe=>{ee||(ee=!0,xe?W(F,[D]):W(q,[D]),K.delayedLeave&&K.delayedLeave(),D[gr]=void 0)};j?w(j,[D,ae]):ae()},leave(D,j){const q=String(e.key);if(D[gr]&&D[gr](!0),t.isUnmounting)return j();W(p,[D]);let F=!1;const ee=D[Ro]=ae=>{F||(F=!0,j(),ae?W(b,[D]):W(h,[D]),D[Ro]=void 0,L[q]===e&&delete L[q])};L[q]=e,g?w(g,[D,ee]):ee()},clone(D){const j=qt(D,o,t,r,n);return n&&n(j),j}};return K}function yn(e){if(Yr(e))return e=Bo(e),e.children=null,e}function Gi(e){if(!Yr(e))return Fl(e.type)&&e.children?Rl(e.children):e;const{shapeFlag:o,children:t}=e;if(t){if(o&16)return t[0];if(o&32&&X(t.default))return t.default()}}function tt(e,o){e.shapeFlag&6&&e.component?(e.transition=o,tt(e.component.subTree,o)):e.shapeFlag&128?(e.ssContent.transition=o.clone(e.ssContent),e.ssFallback.transition=o.clone(e.ssFallback)):e.transition=o}function vi(e,o=!1,t){let r=[],n=0;for(let i=0;i1)for(let i=0;iMr(h,o&&(Y(o)?o[b]:o),t,r,n));return}if(gt(r)&&!n){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Mr(e,o,t,r.component.subTree);return}const i=r.shapeFlag&4?tn(r.component):r.el,a=n?null:i,{i:l,r:s}=e,c=o&&o.r,d=l.refs===fe?l.refs={}:l.refs,u=l.setupState,p=ie(u),g=u===fe?()=>!1:h=>se(p,h);if(c!=null&&c!==s&&(ve(c)?(d[c]=null,g(c)&&(u[c]=null)):Pe(c)&&(c.value=null)),X(s))or(s,l,12,[a,d]);else{const h=ve(s),b=Pe(s);if(h||b){const y=()=>{if(e.f){const C=h?g(s)?u[s]:d[s]:s.value;n?Y(C)&&li(C,i):Y(C)?C.includes(i)||C.push(i):h?(d[s]=[i],g(s)&&(u[s]=d[s])):(s.value=[i],e.k&&(d[e.k]=s.value))}else h?(d[s]=a,g(s)&&(u[s]=a)):b&&(s.value=a,e.k&&(d[e.k]=a))};a?(y.id=-1,Le(y,t)):y()}}}Vr().requestIdleCallback;Vr().cancelIdleCallback;const gt=e=>!!e.type.__asyncLoader,Yr=e=>e.type.__isKeepAlive;function Qd(e,o){zl(e,"a",o)}function Xd(e,o){zl(e,"da",o)}function zl(e,o,t=De){const r=e.__wdc||(e.__wdc=()=>{let n=t;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(Jr(o,r,t),t){let n=t.parent;for(;n&&n.parent;)Yr(n.parent.vnode)&&eu(r,o,t,n),n=n.parent}}function eu(e,o,t,r){const n=Jr(o,e,r,!0);Bl(()=>{li(r[o],n)},t)}function Jr(e,o,t=De,r=!1){if(t){const n=t[e]||(t[e]=[]),i=o.__weh||(o.__weh=(...a)=>{jo();const l=tr(t),s=ro(o,t,e,a);return l(),No(),s});return r?n.unshift(i):n.push(i),i}}const Fo=e=>(o,t=De)=>{(!Jt||e==="sp")&&Jr(e,(...r)=>o(...r),t)},Zr=Fo("bm"),Qr=Fo("m"),ou=Fo("bu"),Ol=Fo("u"),Xr=Fo("bum"),Bl=Fo("um"),tu=Fo("sp"),ru=Fo("rtg"),nu=Fo("rtc");function iu(e,o=De){Jr("ec",e,o)}const au=Symbol.for("v-ndc");function Lv(e,o,t,r){let n;const i=t,a=Y(e);if(a||ve(e)){const l=a&&ht(e);let s=!1;l&&(s=!Xe(e),e=Ur(e)),n=new Array(e.length);for(let c=0,d=e.length;co(l,s,void 0,i));else{const l=Object.keys(e);n=new Array(l.length);for(let s=0,c=l.length;sxt(o)?!(o.type===Me||o.type===Fe&&!Wl(o.children)):!0)?e:null}const On=e=>e?cs(e)?tn(e):On(e.parent):null,Wt=we(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>On(e.parent),$root:e=>On(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Nl(e),$forceUpdate:e=>e.f||(e.f=()=>{xi(e.update)}),$nextTick:e=>e.n||(e.n=wl.bind(e.proxy)),$watch:e=>Iu.bind(e)}),Sn=(e,o)=>e!==fe&&!e.__isScriptSetup&&se(e,o),lu={get({_:e},o){if(o==="__v_skip")return!0;const{ctx:t,setupState:r,data:n,props:i,accessCache:a,type:l,appContext:s}=e;let c;if(o[0]!=="$"){const g=a[o];if(g!==void 0)switch(g){case 1:return r[o];case 2:return n[o];case 4:return t[o];case 3:return i[o]}else{if(Sn(r,o))return a[o]=1,r[o];if(n!==fe&&se(n,o))return a[o]=2,n[o];if((c=e.propsOptions[0])&&se(c,o))return a[o]=3,i[o];if(t!==fe&&se(t,o))return a[o]=4,t[o];Bn&&(a[o]=0)}}const d=Wt[o];let u,p;if(d)return o==="$attrs"&&Ie(e.attrs,"get",""),d(e);if((u=l.__cssModules)&&(u=u[o]))return u;if(t!==fe&&se(t,o))return a[o]=4,t[o];if(p=s.config.globalProperties,se(p,o))return p[o]},set({_:e},o,t){const{data:r,setupState:n,ctx:i}=e;return Sn(n,o)?(n[o]=t,!0):r!==fe&&se(r,o)?(r[o]=t,!0):se(e.props,o)||o[0]==="$"&&o.slice(1)in e?!1:(i[o]=t,!0)},has({_:{data:e,setupState:o,accessCache:t,ctx:r,appContext:n,propsOptions:i}},a){let l;return!!t[a]||e!==fe&&se(e,a)||Sn(o,a)||(l=i[0])&&se(l,a)||se(r,a)||se(Wt,a)||se(n.config.globalProperties,a)},defineProperty(e,o,t){return t.get!=null?e._.accessCache[o]=0:se(t,"value")&&this.set(e,o,t.value,null),Reflect.defineProperty(e,o,t)}};function qi(e){return Y(e)?e.reduce((o,t)=>(o[t]=null,o),{}):e}let Bn=!0;function su(e){const o=Nl(e),t=e.proxy,r=e.ctx;Bn=!1,o.beforeCreate&&Ki(o.beforeCreate,e,"bc");const{data:n,computed:i,methods:a,watch:l,provide:s,inject:c,created:d,beforeMount:u,mounted:p,beforeUpdate:g,updated:h,activated:b,deactivated:y,beforeDestroy:C,beforeUnmount:I,destroyed:E,unmounted:v,render:L,renderTracked:W,renderTriggered:w,errorCaptured:K,serverPrefetch:D,expose:j,inheritAttrs:q,components:F,directives:ee,filters:ae}=o;if(c&&cu(c,r,null),a)for(const V in a){const re=a[V];X(re)&&(r[V]=re.bind(t))}if(n){const V=n.call(t,t);me(V)&&(e.data=Gr(V))}if(Bn=!0,i)for(const V in i){const re=i[V],Ne=X(re)?re.bind(t,t):X(re.get)?re.get.bind(t,t):mo,Ze=!X(re)&&X(re.set)?re.set.bind(t):mo,Co=de({get:Ne,set:Ze});Object.defineProperty(r,V,{enumerable:!0,configurable:!0,get:()=>Co.value,set:Ve=>Co.value=Ve})}if(l)for(const V in l)jl(l[V],r,t,V);if(s){const V=X(s)?s.call(t):s;Reflect.ownKeys(V).forEach(re=>{Kt(re,V[re])})}d&&Ki(d,e,"c");function oe(V,re){Y(re)?re.forEach(Ne=>V(Ne.bind(t))):re&&V(re.bind(t))}if(oe(Zr,u),oe(Qr,p),oe(ou,g),oe(Ol,h),oe(Qd,b),oe(Xd,y),oe(iu,K),oe(nu,W),oe(ru,w),oe(Xr,I),oe(Bl,v),oe(tu,D),Y(j))if(j.length){const V=e.exposed||(e.exposed={});j.forEach(re=>{Object.defineProperty(V,re,{get:()=>t[re],set:Ne=>t[re]=Ne})})}else e.exposed||(e.exposed={});L&&e.render===mo&&(e.render=L),q!=null&&(e.inheritAttrs=q),F&&(e.components=F),ee&&(e.directives=ee),D&&kl(e)}function cu(e,o,t=mo){Y(e)&&(e=Wn(e));for(const r in e){const n=e[r];let i;me(n)?"default"in n?i=Ee(n.from||r,n.default,!0):i=Ee(n.from||r):i=Ee(n),Pe(i)?Object.defineProperty(o,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):o[r]=i}}function Ki(e,o,t){ro(Y(e)?e.map(r=>r.bind(o.proxy)):e.bind(o.proxy),o,t)}function jl(e,o,t,r){let n=r.includes(".")?ts(t,r):()=>t[r];if(ve(e)){const i=o[e];X(i)&&wr(n,i)}else if(X(e))wr(n,e.bind(t));else if(me(e))if(Y(e))e.forEach(i=>jl(i,o,t,r));else{const i=X(e.handler)?e.handler.bind(t):o[e.handler];X(i)&&wr(n,i,e)}}function Nl(e){const o=e.type,{mixins:t,extends:r}=o,{mixins:n,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,l=i.get(o);let s;return l?s=l:!n.length&&!t&&!r?s=o:(s={},n.length&&n.forEach(c=>Dr(s,c,a,!0)),Dr(s,o,a)),me(o)&&i.set(o,s),s}function Dr(e,o,t,r=!1){const{mixins:n,extends:i}=o;i&&Dr(e,i,t,!0),n&&n.forEach(a=>Dr(e,a,t,!0));for(const a in o)if(!(r&&a==="expose")){const l=du[a]||t&&t[a];e[a]=l?l(e[a],o[a]):o[a]}return e}const du={data:Yi,props:Ji,emits:Ji,methods:Rt,computed:Rt,beforeCreate:Re,created:Re,beforeMount:Re,mounted:Re,beforeUpdate:Re,updated:Re,beforeDestroy:Re,beforeUnmount:Re,destroyed:Re,unmounted:Re,activated:Re,deactivated:Re,errorCaptured:Re,serverPrefetch:Re,components:Rt,directives:Rt,watch:fu,provide:Yi,inject:uu};function Yi(e,o){return o?e?function(){return we(X(e)?e.call(this,this):e,X(o)?o.call(this,this):o)}:o:e}function uu(e,o){return Rt(Wn(e),Wn(o))}function Wn(e){if(Y(e)){const o={};for(let t=0;t1)return t&&X(o)?o.call(r&&r.proxy):o}}const Ul={},Gl=()=>Object.create(Ul),ql=e=>Object.getPrototypeOf(e)===Ul;function mu(e,o,t,r=!1){const n={},i=Gl();e.propsDefaults=Object.create(null),Kl(e,o,n,i);for(const a in e.propsOptions[0])a in n||(n[a]=void 0);t?e.props=r?n:_d(n):e.type.props?e.props=n:e.props=i,e.attrs=i}function gu(e,o,t,r){const{props:n,attrs:i,vnode:{patchFlag:a}}=e,l=ie(n),[s]=e.propsOptions;let c=!1;if((r||a>0)&&!(a&16)){if(a&8){const d=e.vnode.dynamicProps;for(let u=0;u{s=!0;const[p,g]=Yl(u,o,!0);we(a,p),g&&l.push(...g)};!t&&o.mixins.length&&o.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!s)return me(e)&&r.set(e,ft),ft;if(Y(i))for(let d=0;de[0]==="_"||e==="$stable",yi=e=>Y(e)?e.map(fo):[fo(e)],Cu=(e,o,t)=>{if(o._n)return o;const r=qd((...n)=>yi(o(...n)),t);return r._c=!1,r},Zl=(e,o,t)=>{const r=e._ctx;for(const n in e){if(Jl(n))continue;const i=e[n];if(X(i))o[n]=Cu(n,i,r);else if(i!=null){const a=yi(i);o[n]=()=>a}}},Ql=(e,o)=>{const t=yi(o);e.slots.default=()=>t},Xl=(e,o,t)=>{for(const r in o)(t||r!=="_")&&(e[r]=o[r])},xu=(e,o,t)=>{const r=e.slots=Gl();if(e.vnode.shapeFlag&32){const n=o._;n?(Xl(r,o,t),t&&ol(r,"_",n,!0)):Zl(o,r)}else o&&Ql(e,o)},vu=(e,o,t)=>{const{vnode:r,slots:n}=e;let i=!0,a=fe;if(r.shapeFlag&32){const l=o._;l?t&&l===1?i=!1:Xl(n,o,t):(i=!o.$stable,Zl(o,n)),a=o}else o&&(Ql(e,o),a={default:1});if(i)for(const l in n)!Jl(l)&&a[l]==null&&delete n[l]},Le=Eu;function yu(e){return Su(e)}function Su(e,o){const t=Vr();t.__VUE__=!0;const{insert:r,remove:n,patchProp:i,createElement:a,createText:l,createComment:s,setText:c,setElementText:d,parentNode:u,nextSibling:p,setScopeId:g=mo,insertStaticContent:h}=e,b=(f,m,x,H=null,T=null,$=null,R=void 0,M=null,P=!!m.dynamicChildren)=>{if(f===m)return;f&&!Jo(f,m)&&(H=xo(f),Ve(f,T,$,!0),f=null),m.patchFlag===-2&&(P=!1,m.dynamicChildren=null);const{type:S,ref:N,shapeFlag:z}=m;switch(S){case on:y(f,m,x,H);break;case Me:C(f,m,x,H);break;case Pr:f==null&&I(m,x,H,R);break;case Fe:F(f,m,x,H,T,$,R,M,P);break;default:z&1?L(f,m,x,H,T,$,R,M,P):z&6?ee(f,m,x,H,T,$,R,M,P):(z&64||z&128)&&S.process(f,m,x,H,T,$,R,M,P,vo)}N!=null&&T&&Mr(N,f&&f.ref,$,m||f,!m)},y=(f,m,x,H)=>{if(f==null)r(m.el=l(m.children),x,H);else{const T=m.el=f.el;m.children!==f.children&&c(T,m.children)}},C=(f,m,x,H)=>{f==null?r(m.el=s(m.children||""),x,H):m.el=f.el},I=(f,m,x,H)=>{[f.el,f.anchor]=h(f.children,m,x,H,f.el,f.anchor)},E=({el:f,anchor:m},x,H)=>{let T;for(;f&&f!==m;)T=p(f),r(f,x,H),f=T;r(m,x,H)},v=({el:f,anchor:m})=>{let x;for(;f&&f!==m;)x=p(f),n(f),f=x;n(m)},L=(f,m,x,H,T,$,R,M,P)=>{m.type==="svg"?R="svg":m.type==="math"&&(R="mathml"),f==null?W(m,x,H,T,$,R,M,P):D(f,m,T,$,R,M,P)},W=(f,m,x,H,T,$,R,M)=>{let P,S;const{props:N,shapeFlag:z,transition:G,dirs:J}=f;if(P=f.el=a(f.type,$,N&&N.is,N),z&8?d(P,f.children):z&16&&K(f.children,P,null,H,T,wn(f,$),R,M),J&&Vo(f,null,H,"created"),w(P,f,f.scopeId,R,H),N){for(const pe in N)pe!=="value"&&!kt(pe)&&i(P,pe,null,N[pe],$,H);"value"in N&&i(P,"value",null,N.value,$),(S=N.onVnodeBeforeMount)&&lo(S,H,f)}J&&Vo(f,null,H,"beforeMount");const te=wu(T,G);te&&G.beforeEnter(P),r(P,m,x),((S=N&&N.onVnodeMounted)||te||J)&&Le(()=>{S&&lo(S,H,f),te&&G.enter(P),J&&Vo(f,null,H,"mounted")},T)},w=(f,m,x,H,T)=>{if(x&&g(f,x),H)for(let $=0;${for(let S=P;S{const M=m.el=f.el;let{patchFlag:P,dynamicChildren:S,dirs:N}=m;P|=f.patchFlag&16;const z=f.props||fe,G=m.props||fe;let J;if(x&&Uo(x,!1),(J=G.onVnodeBeforeUpdate)&&lo(J,x,m,f),N&&Vo(m,f,x,"beforeUpdate"),x&&Uo(x,!0),(z.innerHTML&&G.innerHTML==null||z.textContent&&G.textContent==null)&&d(M,""),S?j(f.dynamicChildren,S,M,x,H,wn(m,T),$):R||re(f,m,M,null,x,H,wn(m,T),$,!1),P>0){if(P&16)q(M,z,G,x,T);else if(P&2&&z.class!==G.class&&i(M,"class",null,G.class,T),P&4&&i(M,"style",z.style,G.style,T),P&8){const te=m.dynamicProps;for(let pe=0;pe{J&&lo(J,x,m,f),N&&Vo(m,f,x,"updated")},H)},j=(f,m,x,H,T,$,R)=>{for(let M=0;M{if(m!==x){if(m!==fe)for(const $ in m)!kt($)&&!($ in x)&&i(f,$,m[$],null,T,H);for(const $ in x){if(kt($))continue;const R=x[$],M=m[$];R!==M&&$!=="value"&&i(f,$,M,R,T,H)}"value"in x&&i(f,"value",m.value,x.value,T)}},F=(f,m,x,H,T,$,R,M,P)=>{const S=m.el=f?f.el:l(""),N=m.anchor=f?f.anchor:l("");let{patchFlag:z,dynamicChildren:G,slotScopeIds:J}=m;J&&(M=M?M.concat(J):J),f==null?(r(S,x,H),r(N,x,H),K(m.children||[],x,N,T,$,R,M,P)):z>0&&z&64&&G&&f.dynamicChildren?(j(f.dynamicChildren,G,x,T,$,R,M),(m.key!=null||T&&m===T.subTree)&&Si(f,m,!0)):re(f,m,x,N,T,$,R,M,P)},ee=(f,m,x,H,T,$,R,M,P)=>{m.slotScopeIds=M,f==null?m.shapeFlag&512?T.ctx.activate(m,x,H,R,P):ae(m,x,H,T,$,R,P):xe(f,m,P)},ae=(f,m,x,H,T,$,R)=>{const M=f.component=Wu(f,H,T);if(Yr(f)&&(M.ctx.renderer=vo),ju(M,!1,R),M.asyncDep){if(T&&T.registerDep(M,oe,R),!f.el){const P=M.subTree=_e(Me);C(null,P,m,x)}}else oe(M,f,m,x,T,$,R)},xe=(f,m,x)=>{const H=m.component=f.component;if(Du(f,m,x))if(H.asyncDep&&!H.asyncResolved){V(H,m,x);return}else H.next=m,H.update();else m.el=f.el,H.vnode=m},oe=(f,m,x,H,T,$,R)=>{const M=()=>{if(f.isMounted){let{next:z,bu:G,u:J,parent:te,vnode:pe}=f;{const io=es(f);if(io){z&&(z.el=pe.el,V(f,z,R)),io.asyncDep.then(()=>{f.isUnmounted||M()});return}}let ce=z,Ue;Uo(f,!1),z?(z.el=pe.el,V(f,z,R)):z=pe,G&&yr(G),(Ue=z.props&&z.props.onVnodeBeforeUpdate)&&lo(Ue,te,z,pe),Uo(f,!0);const ze=Xi(f),no=f.subTree;f.subTree=ze,b(no,ze,u(no.el),xo(no),f,T,$),z.el=ze.el,ce===null&&_u(f,ze.el),J&&Le(J,T),(Ue=z.props&&z.props.onVnodeUpdated)&&Le(()=>lo(Ue,te,z,pe),T)}else{let z;const{el:G,props:J}=m,{bm:te,m:pe,parent:ce,root:Ue,type:ze}=f,no=gt(m);Uo(f,!1),te&&yr(te),!no&&(z=J&&J.onVnodeBeforeMount)&&lo(z,ce,m),Uo(f,!0);{Ue.ce&&Ue.ce._injectChildStyle(ze);const io=f.subTree=Xi(f);b(null,io,x,H,f,T,$),m.el=io.el}if(pe&&Le(pe,T),!no&&(z=J&&J.onVnodeMounted)){const io=m;Le(()=>lo(z,ce,io),T)}(m.shapeFlag&256||ce&>(ce.vnode)&&ce.vnode.shapeFlag&256)&&f.a&&Le(f.a,T),f.isMounted=!0,m=x=H=null}};f.scope.on();const P=f.effect=new il(M);f.scope.off();const S=f.update=P.run.bind(P),N=f.job=P.runIfDirty.bind(P);N.i=f,N.id=f.uid,P.scheduler=()=>xi(N),Uo(f,!0),S()},V=(f,m,x)=>{m.component=f;const H=f.vnode.props;f.vnode=m,f.next=null,gu(f,m.props,H,x),vu(f,m.children,x),jo(),ji(f),No()},re=(f,m,x,H,T,$,R,M,P=!1)=>{const S=f&&f.children,N=f?f.shapeFlag:0,z=m.children,{patchFlag:G,shapeFlag:J}=m;if(G>0){if(G&128){Ze(S,z,x,H,T,$,R,M,P);return}else if(G&256){Ne(S,z,x,H,T,$,R,M,P);return}}J&8?(N&16&&ue(S,T,$),z!==S&&d(x,z)):N&16?J&16?Ze(S,z,x,H,T,$,R,M,P):ue(S,T,$,!0):(N&8&&d(x,""),J&16&&K(z,x,H,T,$,R,M,P))},Ne=(f,m,x,H,T,$,R,M,P)=>{f=f||ft,m=m||ft;const S=f.length,N=m.length,z=Math.min(S,N);let G;for(G=0;GN?ue(f,T,$,!0,!1,z):K(m,x,H,T,$,R,M,P,z)},Ze=(f,m,x,H,T,$,R,M,P)=>{let S=0;const N=m.length;let z=f.length-1,G=N-1;for(;S<=z&&S<=G;){const J=f[S],te=m[S]=P?Lo(m[S]):fo(m[S]);if(Jo(J,te))b(J,te,x,null,T,$,R,M,P);else break;S++}for(;S<=z&&S<=G;){const J=f[z],te=m[G]=P?Lo(m[G]):fo(m[G]);if(Jo(J,te))b(J,te,x,null,T,$,R,M,P);else break;z--,G--}if(S>z){if(S<=G){const J=G+1,te=JG)for(;S<=z;)Ve(f[S],T,$,!0),S++;else{const J=S,te=S,pe=new Map;for(S=te;S<=G;S++){const Ge=m[S]=P?Lo(m[S]):fo(m[S]);Ge.key!=null&&pe.set(Ge.key,S)}let ce,Ue=0;const ze=G-te+1;let no=!1,io=0;const Ft=new Array(ze);for(S=0;S=ze){Ve(Ge,T,$,!0);continue}let ao;if(Ge.key!=null)ao=pe.get(Ge.key);else for(ce=te;ce<=G;ce++)if(Ft[ce-te]===0&&Jo(Ge,m[ce])){ao=ce;break}ao===void 0?Ve(Ge,T,$,!0):(Ft[ao-te]=S+1,ao>=io?io=ao:no=!0,b(Ge,m[ao],x,null,T,$,R,M,P),Ue++)}const ki=no?Pu(Ft):ft;for(ce=ki.length-1,S=ze-1;S>=0;S--){const Ge=te+S,ao=m[Ge],zi=Ge+1{const{el:$,type:R,transition:M,children:P,shapeFlag:S}=f;if(S&6){Co(f.component.subTree,m,x,H);return}if(S&128){f.suspense.move(m,x,H);return}if(S&64){R.move(f,m,x,vo);return}if(R===Fe){r($,m,x);for(let z=0;zM.enter($),T);else{const{leave:z,delayLeave:G,afterLeave:J}=M,te=()=>r($,m,x),pe=()=>{z($,()=>{te(),J&&J()})};G?G($,te,pe):pe()}else r($,m,x)},Ve=(f,m,x,H=!1,T=!1)=>{const{type:$,props:R,ref:M,children:P,dynamicChildren:S,shapeFlag:N,patchFlag:z,dirs:G,cacheIndex:J}=f;if(z===-2&&(T=!1),M!=null&&Mr(M,null,x,f,!0),J!=null&&(m.renderCache[J]=void 0),N&256){m.ctx.deactivate(f);return}const te=N&1&&G,pe=!gt(f);let ce;if(pe&&(ce=R&&R.onVnodeBeforeUnmount)&&lo(ce,m,f),N&6)mn(f.component,x,H);else{if(N&128){f.suspense.unmount(x,H);return}te&&Vo(f,null,m,"beforeUnmount"),N&64?f.type.remove(f,m,x,vo,H):S&&!S.hasOnce&&($!==Fe||z>0&&z&64)?ue(S,m,x,!1,!0):($===Fe&&z&384||!T&&N&16)&&ue(P,m,x),H&&dr(f)}(pe&&(ce=R&&R.onVnodeUnmounted)||te)&&Le(()=>{ce&&lo(ce,m,f),te&&Vo(f,null,m,"unmounted")},x)},dr=f=>{const{type:m,el:x,anchor:H,transition:T}=f;if(m===Fe){hn(x,H);return}if(m===Pr){v(f);return}const $=()=>{n(x),T&&!T.persisted&&T.afterLeave&&T.afterLeave()};if(f.shapeFlag&1&&T&&!T.persisted){const{leave:R,delayLeave:M}=T,P=()=>R(x,$);M?M(f.el,$,P):P()}else $()},hn=(f,m)=>{let x;for(;f!==m;)x=p(f),n(f),f=x;n(m)},mn=(f,m,x)=>{const{bum:H,scope:T,job:$,subTree:R,um:M,m:P,a:S}=f;Qi(P),Qi(S),H&&yr(H),T.stop(),$&&($.flags|=8,Ve(R,f,m,x)),M&&Le(M,m),Le(()=>{f.isUnmounted=!0},m),m&&m.pendingBranch&&!m.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===m.pendingId&&(m.deps--,m.deps===0&&m.resolve())},ue=(f,m,x,H=!1,T=!1,$=0)=>{for(let R=$;R{if(f.shapeFlag&6)return xo(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const m=p(f.anchor||f.el),x=m&&m[Hl];return x?p(x):m};let st=!1;const le=(f,m,x)=>{f==null?m._vnode&&Ve(m._vnode,null,null,!0):b(m._vnode||null,f,m,null,null,null,x),m._vnode=f,st||(st=!0,ji(),Tl(),st=!1)},vo={p:b,um:Ve,m:Co,r:dr,mt:ae,mc:K,pc:re,pbc:j,n:xo,o:e};return{render:le,hydrate:void 0,createApp:hu(le)}}function wn({type:e,props:o},t){return t==="svg"&&e==="foreignObject"||t==="mathml"&&e==="annotation-xml"&&o&&o.encoding&&o.encoding.includes("html")?void 0:t}function Uo({effect:e,job:o},t){t?(e.flags|=32,o.flags|=4):(e.flags&=-33,o.flags&=-5)}function wu(e,o){return(!e||e&&!e.pendingBranch)&&o&&!o.persisted}function Si(e,o,t=!1){const r=e.children,n=o.children;if(Y(r)&&Y(n))for(let i=0;i>1,e[t[l]]0&&(o[r]=t[i-1]),t[i]=r)}}for(i=t.length,a=t[i-1];i-- >0;)t[i]=a,a=o[a];return t}function es(e){const o=e.subTree.component;if(o)return o.asyncDep&&!o.asyncResolved?o:es(o)}function Qi(e){if(e)for(let o=0;oEe(Tu);function os(e,o){return wi(e,null,o)}function wr(e,o,t){return wi(e,o,t)}function wi(e,o,t=fe){const{immediate:r,deep:n,flush:i,once:a}=t,l=we({},t),s=o&&r||!o&&i!=="post";let c;if(Jt){if(i==="sync"){const g=$u();c=g.__watcherHandles||(g.__watcherHandles=[])}else if(!s){const g=()=>{};return g.stop=mo,g.resume=mo,g.pause=mo,g}}const d=De;l.call=(g,h,b)=>ro(g,d,h,b);let u=!1;i==="post"?l.scheduler=g=>{Le(g,d&&d.suspense)}:i!=="sync"&&(u=!0,l.scheduler=(g,h)=>{h?g():xi(g)}),l.augmentJob=g=>{o&&(g.flags|=4),u&&(g.flags|=2,d&&(g.id=d.uid,g.i=d))};const p=Nd(e,o,l);return Jt&&(c?c.push(p):s&&p()),p}function Iu(e,o,t){const r=this.proxy,n=ve(e)?e.includes(".")?ts(r,e):()=>r[e]:e.bind(r,r);let i;X(o)?i=o:(i=o.handler,t=o);const a=tr(this),l=wi(n,i.bind(r),t);return a(),l}function ts(e,o){const t=o.split(".");return()=>{let r=e;for(let n=0;no==="modelValue"||o==="model-value"?e.modelModifiers:e[`${o}Modifiers`]||e[`${Oo(o)}Modifiers`]||e[`${nt(o)}Modifiers`];function Fu(e,o,...t){if(e.isUnmounted)return;const r=e.vnode.props||fe;let n=t;const i=o.startsWith("update:"),a=i&&Hu(r,o.slice(7));a&&(a.trim&&(n=t.map(d=>ve(d)?d.trim():d)),a.number&&(n=t.map(Dn)));let l,s=r[l=gn(o)]||r[l=gn(Oo(o))];!s&&i&&(s=r[l=gn(nt(o))]),s&&ro(s,e,6,n);const c=r[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ro(c,e,6,n)}}function rs(e,o,t=!1){const r=o.emitsCache,n=r.get(e);if(n!==void 0)return n;const i=e.emits;let a={},l=!1;if(!X(e)){const s=c=>{const d=rs(c,o,!0);d&&(l=!0,we(a,d))};!t&&o.mixins.length&&o.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!i&&!l?(me(e)&&r.set(e,null),null):(Y(i)?i.forEach(s=>a[s]=null):we(a,i),me(e)&&r.set(e,a),a)}function en(e,o){return!e||!Wr(o)?!1:(o=o.slice(2).replace(/Once$/,""),se(e,o[0].toLowerCase()+o.slice(1))||se(e,nt(o))||se(e,o))}function Xi(e){const{type:o,vnode:t,proxy:r,withProxy:n,propsOptions:[i],slots:a,attrs:l,emit:s,render:c,renderCache:d,props:u,data:p,setupState:g,ctx:h,inheritAttrs:b}=e,y=Ar(e);let C,I;try{if(t.shapeFlag&4){const v=n||r,L=v;C=fo(c.call(L,v,d,u,g,p,h)),I=l}else{const v=o;C=fo(v.length>1?v(u,{attrs:l,slots:a,emit:s}):v(u,null)),I=o.props?l:Au(l)}}catch(v){jt.length=0,Kr(v,e,1),C=_e(Me)}let E=C;if(I&&b!==!1){const v=Object.keys(I),{shapeFlag:L}=E;v.length&&L&7&&(i&&v.some(ai)&&(I=Mu(I,i)),E=Bo(E,I,!1,!0))}return t.dirs&&(E=Bo(E,null,!1,!0),E.dirs=E.dirs?E.dirs.concat(t.dirs):t.dirs),t.transition&&tt(E,t.transition),C=E,Ar(y),C}const Au=e=>{let o;for(const t in e)(t==="class"||t==="style"||Wr(t))&&((o||(o={}))[t]=e[t]);return o},Mu=(e,o)=>{const t={};for(const r in e)(!ai(r)||!(r.slice(9)in o))&&(t[r]=e[r]);return t};function Du(e,o,t){const{props:r,children:n,component:i}=e,{props:a,children:l,patchFlag:s}=o,c=i.emitsOptions;if(o.dirs||o.transition)return!0;if(t&&s>=0){if(s&1024)return!0;if(s&16)return r?ea(r,a,c):!!a;if(s&8){const d=o.dynamicProps;for(let u=0;ue.__isSuspense;function Eu(e,o){o&&o.pendingBranch?Y(e)?o.effects.push(...e):o.effects.push(e):Gd(e)}const Fe=Symbol.for("v-fgt"),on=Symbol.for("v-txt"),Me=Symbol.for("v-cmt"),Pr=Symbol.for("v-stc"),jt=[];let Ke=null;function Nn(e=!1){jt.push(Ke=e?null:[])}function Ru(){jt.pop(),Ke=jt[jt.length-1]||null}let Yt=1;function oa(e,o=!1){Yt+=e,e<0&&Ke&&o&&(Ke.hasOnce=!0)}function is(e){return e.dynamicChildren=Yt>0?Ke||ft:null,Ru(),Yt>0&&Ke&&Ke.push(e),e}function zv(e,o,t,r,n,i){return is(ls(e,o,t,r,n,i,!0))}function Vn(e,o,t,r,n){return is(_e(e,o,t,r,n,!0))}function xt(e){return e?e.__v_isVNode===!0:!1}function Jo(e,o){return e.type===o.type&&e.key===o.key}const as=({key:e})=>e??null,Tr=({ref:e,ref_key:o,ref_for:t})=>(typeof e=="number"&&(e=""+e),e!=null?ve(e)||Pe(e)||X(e)?{i:Te,r:e,k:o,f:!!t}:e:null);function ls(e,o=null,t=null,r=0,n=null,i=e===Fe?0:1,a=!1,l=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:o,key:o&&as(o),ref:o&&Tr(o),scopeId:Il,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:Te};return l?(Pi(s,t),i&128&&e.normalize(s)):t&&(s.shapeFlag|=ve(t)?8:16),Yt>0&&!a&&Ke&&(s.patchFlag>0||i&6)&&s.patchFlag!==32&&Ke.push(s),s}const _e=Lu;function Lu(e,o=null,t=null,r=0,n=null,i=!1){if((!e||e===au)&&(e=Me),xt(e)){const l=Bo(e,o,!0);return t&&Pi(l,t),Yt>0&&!i&&Ke&&(l.shapeFlag&6?Ke[Ke.indexOf(e)]=l:Ke.push(l)),l.patchFlag=-2,l}if(Gu(e)&&(e=e.__vccOpts),o){o=ku(o);let{class:l,style:s}=o;l&&!ve(l)&&(o.class=di(l)),me(s)&&(Ci(s)&&!Y(s)&&(s=we({},s)),o.style=ci(s))}const a=ve(e)?1:ns(e)?128:Fl(e)?64:me(e)?4:X(e)?2:0;return ls(e,o,t,r,n,a,i,!0)}function ku(e){return e?Ci(e)||ql(e)?we({},e):e:null}function Bo(e,o,t=!1,r=!1){const{props:n,ref:i,patchFlag:a,children:l,transition:s}=e,c=o?zu(n||{},o):n,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&as(c),ref:o&&o.ref?t&&i?Y(i)?i.concat(Tr(o)):[i,Tr(o)]:Tr(o):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:o&&e.type!==Fe?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:s,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Bo(e.ssContent),ssFallback:e.ssFallback&&Bo(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return s&&r&&tt(d,s.clone(d)),d}function Un(e=" ",o=0){return _e(on,null,e,o)}function Ov(e,o){const t=_e(Pr,null,e);return t.staticCount=o,t}function Bv(e="",o=!1){return o?(Nn(),Vn(Me,null,e)):_e(Me,null,e)}function fo(e){return e==null||typeof e=="boolean"?_e(Me):Y(e)?_e(Fe,null,e.slice()):xt(e)?Lo(e):_e(on,null,String(e))}function Lo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Bo(e)}function Pi(e,o){let t=0;const{shapeFlag:r}=e;if(o==null)o=null;else if(Y(o))t=16;else if(typeof o=="object")if(r&65){const n=o.default;n&&(n._c&&(n._d=!1),Pi(e,n()),n._c&&(n._d=!0));return}else{t=32;const n=o._;!n&&!ql(o)?o._ctx=Te:n===3&&Te&&(Te.slots._===1?o._=1:(o._=2,e.patchFlag|=1024))}else X(o)?(o={default:o,_ctx:Te},t=32):(o=String(o),r&64?(t=16,o=[Un(o)]):t=8);e.children=o,e.shapeFlag|=t}function zu(...e){const o={};for(let t=0;tDe||Te;let _r,Gn;{const e=Vr(),o=(t,r)=>{let n;return(n=e[t])||(n=e[t]=[]),n.push(r),i=>{n.length>1?n.forEach(a=>a(i)):n[0](i)}};_r=o("__VUE_INSTANCE_SETTERS__",t=>De=t),Gn=o("__VUE_SSR_SETTERS__",t=>Jt=t)}const tr=e=>{const o=De;return _r(e),e.scope.on(),()=>{e.scope.off(),_r(o)}},ta=()=>{De&&De.scope.off(),_r(null)};function cs(e){return e.vnode.shapeFlag&4}let Jt=!1;function ju(e,o=!1,t=!1){o&&Gn(o);const{props:r,children:n}=e.vnode,i=cs(e);mu(e,r,i,o),xu(e,n,t);const a=i?Nu(e,o):void 0;return o&&Gn(!1),a}function Nu(e,o){const t=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lu);const{setup:r}=t;if(r){jo();const n=e.setupContext=r.length>1?Uu(e):null,i=tr(e),a=or(r,e,0,[e.props,n]),l=Za(a);if(No(),i(),(l||e.sp)&&!gt(e)&&kl(e),l){if(a.then(ta,ta),o)return a.then(s=>{ra(e,s)}).catch(s=>{Kr(s,e,0)});e.asyncDep=a}else ra(e,a)}else ds(e)}function ra(e,o,t){X(o)?e.type.__ssrInlineRender?e.ssrRender=o:e.render=o:me(o)&&(e.setupState=yl(o)),ds(e)}function ds(e,o,t){const r=e.type;e.render||(e.render=r.render||mo);{const n=tr(e);jo();try{su(e)}finally{No(),n()}}}const Vu={get(e,o){return Ie(e,"get",""),e[o]}};function Uu(e){const o=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,Vu),slots:e.slots,emit:e.emit,expose:o}}function tn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(yl(Ln(e.exposed)),{get(o,t){if(t in o)return o[t];if(t in Wt)return Wt[t](e)},has(o,t){return t in o||t in Wt}})):e.proxy}function Gu(e){return X(e)&&"__vccOpts"in e}const de=(e,o)=>Wd(e,o,Jt);function O(e,o,t){const r=arguments.length;return r===2?me(o)&&!Y(o)?xt(o)?_e(e,null,[o]):_e(e,o):_e(e,null,o):(r>3?t=Array.prototype.slice.call(arguments,2):r===3&&xt(t)&&(t=[t]),_e(e,o,t))}const qu="3.5.13";/** +**/function or(e,o,t,r){try{return r?e(...r):e()}catch(n){Kr(n,o,t)}}function ro(e,o,t,r){if(X(e)){const n=or(e,o,t,r);return n&&Za(n)&&n.catch(i=>{Kr(i,o,t)}),n}if(Y(e)){const n=[];for(let i=0;i>>1,n=ke[r],i=Gt(n);i=Gt(t)?ke.push(e):ke.splice(Ud(o),0,e),e.flags|=1,Pl()}}function Pl(){Fr||(Fr=Sl.then($l))}function Gd(e){Y(e)?mt.push(...e):Eo&&e.id===-1?Eo.splice(dt+1,0,e):e.flags&1||(mt.push(e),e.flags|=1),Pl()}function ji(e,o,t=uo+1){for(;tGt(t)-Gt(r));if(mt.length=0,Eo){Eo.push(...o);return}for(Eo=o,dt=0;dte.id==null?e.flags&2?-1:1/0:e.id;function $l(e){try{for(uo=0;uo{r._d&&oa(-1);const i=Ar(o);let a;try{a=e(...n)}finally{Ar(i),r._d&&oa(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Rv(e,o){if(Te===null)return e;const t=tn(Te),r=e.dirs||(e.dirs=[]);for(let n=0;ne.__isTeleport,Bt=e=>e&&(e.disabled||e.disabled===""),Ni=e=>e&&(e.defer||e.defer===""),Vi=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Ui=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,On=(e,o)=>{const t=e&&e.to;return ve(t)?o?o(t):null:t},Al={name:"Teleport",__isTeleport:!0,process(e,o,t,r,n,i,a,l,s,c){const{mc:d,pc:u,pbc:p,o:{insert:g,querySelector:h,createText:b,createComment:y}}=c,C=Bt(o.props);let{shapeFlag:I,children:E,dynamicChildren:v}=o;if(e==null){const L=o.el=b(""),W=o.anchor=b("");g(L,t,r),g(W,t,r);const w=(D,j)=>{I&16&&(n&&n.isCE&&(n.ce._teleportTarget=D),d(E,D,j,n,i,a,l,s))},K=()=>{const D=o.target=On(o.props,h),j=Ml(D,o,b,g);D&&(a!=="svg"&&Vi(D)?a="svg":a!=="mathml"&&Ui(D)&&(a="mathml"),C||(w(D,j),Sr(o,!1)))};C&&(w(t,W),Sr(o,!0)),Ni(o.props)?Le(()=>{K(),o.el.__isMounted=!0},i):K()}else{if(Ni(o.props)&&!e.el.__isMounted){Le(()=>{Al.process(e,o,t,r,n,i,a,l,s,c),delete e.el.__isMounted},i);return}o.el=e.el,o.targetStart=e.targetStart;const L=o.anchor=e.anchor,W=o.target=e.target,w=o.targetAnchor=e.targetAnchor,K=Bt(e.props),D=K?t:W,j=K?L:w;if(a==="svg"||Vi(W)?a="svg":(a==="mathml"||Ui(W))&&(a="mathml"),v?(p(e.dynamicChildren,v,D,n,i,a,l),Si(e,o,!0)):s||u(e,o,D,j,n,i,a,l,!1),C)K?o.props&&e.props&&o.props.to!==e.props.to&&(o.props.to=e.props.to):mr(o,t,L,c,1);else if((o.props&&o.props.to)!==(e.props&&e.props.to)){const q=o.target=On(o.props,h);q&&mr(o,q,null,c,0)}else K&&mr(o,W,w,c,1);Sr(o,C)}},remove(e,o,t,{um:r,o:{remove:n}},i){const{shapeFlag:a,children:l,anchor:s,targetStart:c,targetAnchor:d,target:u,props:p}=e;if(u&&(n(c),n(d)),i&&n(s),a&16){const g=i||!Bt(p);for(let h=0;h{e.isMounted=!0}),Xr(()=>{e.isUnmounting=!0}),e}const Qe=[Function,Array],_l={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Qe,onEnter:Qe,onAfterEnter:Qe,onEnterCancelled:Qe,onBeforeLeave:Qe,onLeave:Qe,onAfterLeave:Qe,onLeaveCancelled:Qe,onBeforeAppear:Qe,onAppear:Qe,onAfterAppear:Qe,onAppearCancelled:Qe},El=e=>{const o=e.subTree;return o.component?El(o.component):o},Jd={name:"BaseTransition",props:_l,setup(e,{slots:o}){const t=ss(),r=Dl();return()=>{const n=o.default&&vi(o.default(),!0);if(!n||!n.length)return;const i=Rl(n),a=ie(e),{mode:l}=a;if(r.isLeaving)return yn(i);const s=Gi(i);if(!s)return yn(i);let c=qt(s,a,r,t,u=>c=u);s.type!==Me&&tt(s,c);let d=t.subTree&&Gi(t.subTree);if(d&&d.type!==Me&&!Jo(s,d)&&El(t).type!==Me){let u=qt(d,a,r,t);if(tt(d,u),l==="out-in"&&s.type!==Me)return r.isLeaving=!0,u.afterLeave=()=>{r.isLeaving=!1,t.job.flags&8||t.update(),delete u.afterLeave,d=void 0},yn(i);l==="in-out"&&s.type!==Me?u.delayLeave=(p,g,h)=>{const b=Ll(r,d);b[String(d.key)]=d,p[Ro]=()=>{g(),p[Ro]=void 0,delete c.delayedLeave,d=void 0},c.delayedLeave=()=>{h(),delete c.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return i}}};function Rl(e){let o=e[0];if(e.length>1){for(const t of e)if(t.type!==Me){o=t;break}}return o}const Zd=Jd;function Ll(e,o){const{leavingVNodes:t}=e;let r=t.get(o.type);return r||(r=Object.create(null),t.set(o.type,r)),r}function qt(e,o,t,r,n){const{appear:i,mode:a,persisted:l=!1,onBeforeEnter:s,onEnter:c,onAfterEnter:d,onEnterCancelled:u,onBeforeLeave:p,onLeave:g,onAfterLeave:h,onLeaveCancelled:b,onBeforeAppear:y,onAppear:C,onAfterAppear:I,onAppearCancelled:E}=o,v=String(e.key),L=Ll(t,e),W=(D,j)=>{D&&ro(D,r,9,j)},w=(D,j)=>{const q=j[1];W(D,j),Y(D)?D.every(F=>F.length<=1)&&q():D.length<=1&&q()},K={mode:a,persisted:l,beforeEnter(D){let j=s;if(!t.isMounted)if(i)j=y||s;else return;D[Ro]&&D[Ro](!0);const q=L[v];q&&Jo(e,q)&&q.el[Ro]&&q.el[Ro](),W(j,[D])},enter(D){let j=c,q=d,F=u;if(!t.isMounted)if(i)j=C||c,q=I||d,F=E||u;else return;let ee=!1;const ae=D[gr]=xe=>{ee||(ee=!0,xe?W(F,[D]):W(q,[D]),K.delayedLeave&&K.delayedLeave(),D[gr]=void 0)};j?w(j,[D,ae]):ae()},leave(D,j){const q=String(e.key);if(D[gr]&&D[gr](!0),t.isUnmounting)return j();W(p,[D]);let F=!1;const ee=D[Ro]=ae=>{F||(F=!0,j(),ae?W(b,[D]):W(h,[D]),D[Ro]=void 0,L[q]===e&&delete L[q])};L[q]=e,g?w(g,[D,ee]):ee()},clone(D){const j=qt(D,o,t,r,n);return n&&n(j),j}};return K}function yn(e){if(Yr(e))return e=Bo(e),e.children=null,e}function Gi(e){if(!Yr(e))return Fl(e.type)&&e.children?Rl(e.children):e;const{shapeFlag:o,children:t}=e;if(t){if(o&16)return t[0];if(o&32&&X(t.default))return t.default()}}function tt(e,o){e.shapeFlag&6&&e.component?(e.transition=o,tt(e.component.subTree,o)):e.shapeFlag&128?(e.ssContent.transition=o.clone(e.ssContent),e.ssFallback.transition=o.clone(e.ssFallback)):e.transition=o}function vi(e,o=!1,t){let r=[],n=0;for(let i=0;i1)for(let i=0;iMr(h,o&&(Y(o)?o[b]:o),t,r,n));return}if(gt(r)&&!n){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Mr(e,o,t,r.component.subTree);return}const i=r.shapeFlag&4?tn(r.component):r.el,a=n?null:i,{i:l,r:s}=e,c=o&&o.r,d=l.refs===fe?l.refs={}:l.refs,u=l.setupState,p=ie(u),g=u===fe?()=>!1:h=>se(p,h);if(c!=null&&c!==s&&(ve(c)?(d[c]=null,g(c)&&(u[c]=null)):Pe(c)&&(c.value=null)),X(s))or(s,l,12,[a,d]);else{const h=ve(s),b=Pe(s);if(h||b){const y=()=>{if(e.f){const C=h?g(s)?u[s]:d[s]:s.value;n?Y(C)&&li(C,i):Y(C)?C.includes(i)||C.push(i):h?(d[s]=[i],g(s)&&(u[s]=d[s])):(s.value=[i],e.k&&(d[e.k]=s.value))}else h?(d[s]=a,g(s)&&(u[s]=a)):b&&(s.value=a,e.k&&(d[e.k]=a))};a?(y.id=-1,Le(y,t)):y()}}}Vr().requestIdleCallback;Vr().cancelIdleCallback;const gt=e=>!!e.type.__asyncLoader,Yr=e=>e.type.__isKeepAlive;function Qd(e,o){Ol(e,"a",o)}function Xd(e,o){Ol(e,"da",o)}function Ol(e,o,t=De){const r=e.__wdc||(e.__wdc=()=>{let n=t;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(Jr(o,r,t),t){let n=t.parent;for(;n&&n.parent;)Yr(n.parent.vnode)&&eu(r,o,t,n),n=n.parent}}function eu(e,o,t,r){const n=Jr(o,e,r,!0);Bl(()=>{li(r[o],n)},t)}function Jr(e,o,t=De,r=!1){if(t){const n=t[e]||(t[e]=[]),i=o.__weh||(o.__weh=(...a)=>{jo();const l=tr(t),s=ro(o,t,e,a);return l(),No(),s});return r?n.unshift(i):n.push(i),i}}const Fo=e=>(o,t=De)=>{(!Jt||e==="sp")&&Jr(e,(...r)=>o(...r),t)},Zr=Fo("bm"),Qr=Fo("m"),ou=Fo("bu"),zl=Fo("u"),Xr=Fo("bum"),Bl=Fo("um"),tu=Fo("sp"),ru=Fo("rtg"),nu=Fo("rtc");function iu(e,o=De){Jr("ec",e,o)}const au=Symbol.for("v-ndc");function Lv(e,o,t,r){let n;const i=t,a=Y(e);if(a||ve(e)){const l=a&&ht(e);let s=!1;l&&(s=!Xe(e),e=Ur(e)),n=new Array(e.length);for(let c=0,d=e.length;co(l,s,void 0,i));else{const l=Object.keys(e);n=new Array(l.length);for(let s=0,c=l.length;sxt(o)?!(o.type===Me||o.type===Fe&&!Wl(o.children)):!0)?e:null}const zn=e=>e?cs(e)?tn(e):zn(e.parent):null,Wt=we(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>zn(e.parent),$root:e=>zn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Nl(e),$forceUpdate:e=>e.f||(e.f=()=>{xi(e.update)}),$nextTick:e=>e.n||(e.n=wl.bind(e.proxy)),$watch:e=>Iu.bind(e)}),Sn=(e,o)=>e!==fe&&!e.__isScriptSetup&&se(e,o),lu={get({_:e},o){if(o==="__v_skip")return!0;const{ctx:t,setupState:r,data:n,props:i,accessCache:a,type:l,appContext:s}=e;let c;if(o[0]!=="$"){const g=a[o];if(g!==void 0)switch(g){case 1:return r[o];case 2:return n[o];case 4:return t[o];case 3:return i[o]}else{if(Sn(r,o))return a[o]=1,r[o];if(n!==fe&&se(n,o))return a[o]=2,n[o];if((c=e.propsOptions[0])&&se(c,o))return a[o]=3,i[o];if(t!==fe&&se(t,o))return a[o]=4,t[o];Bn&&(a[o]=0)}}const d=Wt[o];let u,p;if(d)return o==="$attrs"&&Ie(e.attrs,"get",""),d(e);if((u=l.__cssModules)&&(u=u[o]))return u;if(t!==fe&&se(t,o))return a[o]=4,t[o];if(p=s.config.globalProperties,se(p,o))return p[o]},set({_:e},o,t){const{data:r,setupState:n,ctx:i}=e;return Sn(n,o)?(n[o]=t,!0):r!==fe&&se(r,o)?(r[o]=t,!0):se(e.props,o)||o[0]==="$"&&o.slice(1)in e?!1:(i[o]=t,!0)},has({_:{data:e,setupState:o,accessCache:t,ctx:r,appContext:n,propsOptions:i}},a){let l;return!!t[a]||e!==fe&&se(e,a)||Sn(o,a)||(l=i[0])&&se(l,a)||se(r,a)||se(Wt,a)||se(n.config.globalProperties,a)},defineProperty(e,o,t){return t.get!=null?e._.accessCache[o]=0:se(t,"value")&&this.set(e,o,t.value,null),Reflect.defineProperty(e,o,t)}};function qi(e){return Y(e)?e.reduce((o,t)=>(o[t]=null,o),{}):e}let Bn=!0;function su(e){const o=Nl(e),t=e.proxy,r=e.ctx;Bn=!1,o.beforeCreate&&Ki(o.beforeCreate,e,"bc");const{data:n,computed:i,methods:a,watch:l,provide:s,inject:c,created:d,beforeMount:u,mounted:p,beforeUpdate:g,updated:h,activated:b,deactivated:y,beforeDestroy:C,beforeUnmount:I,destroyed:E,unmounted:v,render:L,renderTracked:W,renderTriggered:w,errorCaptured:K,serverPrefetch:D,expose:j,inheritAttrs:q,components:F,directives:ee,filters:ae}=o;if(c&&cu(c,r,null),a)for(const V in a){const re=a[V];X(re)&&(r[V]=re.bind(t))}if(n){const V=n.call(t,t);me(V)&&(e.data=Gr(V))}if(Bn=!0,i)for(const V in i){const re=i[V],Ne=X(re)?re.bind(t,t):X(re.get)?re.get.bind(t,t):mo,Ze=!X(re)&&X(re.set)?re.set.bind(t):mo,Co=de({get:Ne,set:Ze});Object.defineProperty(r,V,{enumerable:!0,configurable:!0,get:()=>Co.value,set:Ve=>Co.value=Ve})}if(l)for(const V in l)jl(l[V],r,t,V);if(s){const V=X(s)?s.call(t):s;Reflect.ownKeys(V).forEach(re=>{Kt(re,V[re])})}d&&Ki(d,e,"c");function oe(V,re){Y(re)?re.forEach(Ne=>V(Ne.bind(t))):re&&V(re.bind(t))}if(oe(Zr,u),oe(Qr,p),oe(ou,g),oe(zl,h),oe(Qd,b),oe(Xd,y),oe(iu,K),oe(nu,W),oe(ru,w),oe(Xr,I),oe(Bl,v),oe(tu,D),Y(j))if(j.length){const V=e.exposed||(e.exposed={});j.forEach(re=>{Object.defineProperty(V,re,{get:()=>t[re],set:Ne=>t[re]=Ne})})}else e.exposed||(e.exposed={});L&&e.render===mo&&(e.render=L),q!=null&&(e.inheritAttrs=q),F&&(e.components=F),ee&&(e.directives=ee),D&&kl(e)}function cu(e,o,t=mo){Y(e)&&(e=Wn(e));for(const r in e){const n=e[r];let i;me(n)?"default"in n?i=Ee(n.from||r,n.default,!0):i=Ee(n.from||r):i=Ee(n),Pe(i)?Object.defineProperty(o,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):o[r]=i}}function Ki(e,o,t){ro(Y(e)?e.map(r=>r.bind(o.proxy)):e.bind(o.proxy),o,t)}function jl(e,o,t,r){let n=r.includes(".")?ts(t,r):()=>t[r];if(ve(e)){const i=o[e];X(i)&&wr(n,i)}else if(X(e))wr(n,e.bind(t));else if(me(e))if(Y(e))e.forEach(i=>jl(i,o,t,r));else{const i=X(e.handler)?e.handler.bind(t):o[e.handler];X(i)&&wr(n,i,e)}}function Nl(e){const o=e.type,{mixins:t,extends:r}=o,{mixins:n,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,l=i.get(o);let s;return l?s=l:!n.length&&!t&&!r?s=o:(s={},n.length&&n.forEach(c=>Dr(s,c,a,!0)),Dr(s,o,a)),me(o)&&i.set(o,s),s}function Dr(e,o,t,r=!1){const{mixins:n,extends:i}=o;i&&Dr(e,i,t,!0),n&&n.forEach(a=>Dr(e,a,t,!0));for(const a in o)if(!(r&&a==="expose")){const l=du[a]||t&&t[a];e[a]=l?l(e[a],o[a]):o[a]}return e}const du={data:Yi,props:Ji,emits:Ji,methods:Rt,computed:Rt,beforeCreate:Re,created:Re,beforeMount:Re,mounted:Re,beforeUpdate:Re,updated:Re,beforeDestroy:Re,beforeUnmount:Re,destroyed:Re,unmounted:Re,activated:Re,deactivated:Re,errorCaptured:Re,serverPrefetch:Re,components:Rt,directives:Rt,watch:fu,provide:Yi,inject:uu};function Yi(e,o){return o?e?function(){return we(X(e)?e.call(this,this):e,X(o)?o.call(this,this):o)}:o:e}function uu(e,o){return Rt(Wn(e),Wn(o))}function Wn(e){if(Y(e)){const o={};for(let t=0;t1)return t&&X(o)?o.call(r&&r.proxy):o}}const Ul={},Gl=()=>Object.create(Ul),ql=e=>Object.getPrototypeOf(e)===Ul;function mu(e,o,t,r=!1){const n={},i=Gl();e.propsDefaults=Object.create(null),Kl(e,o,n,i);for(const a in e.propsOptions[0])a in n||(n[a]=void 0);t?e.props=r?n:_d(n):e.type.props?e.props=n:e.props=i,e.attrs=i}function gu(e,o,t,r){const{props:n,attrs:i,vnode:{patchFlag:a}}=e,l=ie(n),[s]=e.propsOptions;let c=!1;if((r||a>0)&&!(a&16)){if(a&8){const d=e.vnode.dynamicProps;for(let u=0;u{s=!0;const[p,g]=Yl(u,o,!0);we(a,p),g&&l.push(...g)};!t&&o.mixins.length&&o.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!s)return me(e)&&r.set(e,ft),ft;if(Y(i))for(let d=0;de[0]==="_"||e==="$stable",yi=e=>Y(e)?e.map(fo):[fo(e)],Cu=(e,o,t)=>{if(o._n)return o;const r=qd((...n)=>yi(o(...n)),t);return r._c=!1,r},Zl=(e,o,t)=>{const r=e._ctx;for(const n in e){if(Jl(n))continue;const i=e[n];if(X(i))o[n]=Cu(n,i,r);else if(i!=null){const a=yi(i);o[n]=()=>a}}},Ql=(e,o)=>{const t=yi(o);e.slots.default=()=>t},Xl=(e,o,t)=>{for(const r in o)(t||r!=="_")&&(e[r]=o[r])},xu=(e,o,t)=>{const r=e.slots=Gl();if(e.vnode.shapeFlag&32){const n=o._;n?(Xl(r,o,t),t&&ol(r,"_",n,!0)):Zl(o,r)}else o&&Ql(e,o)},vu=(e,o,t)=>{const{vnode:r,slots:n}=e;let i=!0,a=fe;if(r.shapeFlag&32){const l=o._;l?t&&l===1?i=!1:Xl(n,o,t):(i=!o.$stable,Zl(o,n)),a=o}else o&&(Ql(e,o),a={default:1});if(i)for(const l in n)!Jl(l)&&a[l]==null&&delete n[l]},Le=Eu;function yu(e){return Su(e)}function Su(e,o){const t=Vr();t.__VUE__=!0;const{insert:r,remove:n,patchProp:i,createElement:a,createText:l,createComment:s,setText:c,setElementText:d,parentNode:u,nextSibling:p,setScopeId:g=mo,insertStaticContent:h}=e,b=(f,m,x,H=null,T=null,$=null,R=void 0,M=null,P=!!m.dynamicChildren)=>{if(f===m)return;f&&!Jo(f,m)&&(H=xo(f),Ve(f,T,$,!0),f=null),m.patchFlag===-2&&(P=!1,m.dynamicChildren=null);const{type:S,ref:N,shapeFlag:O}=m;switch(S){case on:y(f,m,x,H);break;case Me:C(f,m,x,H);break;case Pr:f==null&&I(m,x,H,R);break;case Fe:F(f,m,x,H,T,$,R,M,P);break;default:O&1?L(f,m,x,H,T,$,R,M,P):O&6?ee(f,m,x,H,T,$,R,M,P):(O&64||O&128)&&S.process(f,m,x,H,T,$,R,M,P,vo)}N!=null&&T&&Mr(N,f&&f.ref,$,m||f,!m)},y=(f,m,x,H)=>{if(f==null)r(m.el=l(m.children),x,H);else{const T=m.el=f.el;m.children!==f.children&&c(T,m.children)}},C=(f,m,x,H)=>{f==null?r(m.el=s(m.children||""),x,H):m.el=f.el},I=(f,m,x,H)=>{[f.el,f.anchor]=h(f.children,m,x,H,f.el,f.anchor)},E=({el:f,anchor:m},x,H)=>{let T;for(;f&&f!==m;)T=p(f),r(f,x,H),f=T;r(m,x,H)},v=({el:f,anchor:m})=>{let x;for(;f&&f!==m;)x=p(f),n(f),f=x;n(m)},L=(f,m,x,H,T,$,R,M,P)=>{m.type==="svg"?R="svg":m.type==="math"&&(R="mathml"),f==null?W(m,x,H,T,$,R,M,P):D(f,m,T,$,R,M,P)},W=(f,m,x,H,T,$,R,M)=>{let P,S;const{props:N,shapeFlag:O,transition:G,dirs:J}=f;if(P=f.el=a(f.type,$,N&&N.is,N),O&8?d(P,f.children):O&16&&K(f.children,P,null,H,T,wn(f,$),R,M),J&&Vo(f,null,H,"created"),w(P,f,f.scopeId,R,H),N){for(const pe in N)pe!=="value"&&!kt(pe)&&i(P,pe,null,N[pe],$,H);"value"in N&&i(P,"value",null,N.value,$),(S=N.onVnodeBeforeMount)&&lo(S,H,f)}J&&Vo(f,null,H,"beforeMount");const te=wu(T,G);te&&G.beforeEnter(P),r(P,m,x),((S=N&&N.onVnodeMounted)||te||J)&&Le(()=>{S&&lo(S,H,f),te&&G.enter(P),J&&Vo(f,null,H,"mounted")},T)},w=(f,m,x,H,T)=>{if(x&&g(f,x),H)for(let $=0;${for(let S=P;S{const M=m.el=f.el;let{patchFlag:P,dynamicChildren:S,dirs:N}=m;P|=f.patchFlag&16;const O=f.props||fe,G=m.props||fe;let J;if(x&&Uo(x,!1),(J=G.onVnodeBeforeUpdate)&&lo(J,x,m,f),N&&Vo(m,f,x,"beforeUpdate"),x&&Uo(x,!0),(O.innerHTML&&G.innerHTML==null||O.textContent&&G.textContent==null)&&d(M,""),S?j(f.dynamicChildren,S,M,x,H,wn(m,T),$):R||re(f,m,M,null,x,H,wn(m,T),$,!1),P>0){if(P&16)q(M,O,G,x,T);else if(P&2&&O.class!==G.class&&i(M,"class",null,G.class,T),P&4&&i(M,"style",O.style,G.style,T),P&8){const te=m.dynamicProps;for(let pe=0;pe{J&&lo(J,x,m,f),N&&Vo(m,f,x,"updated")},H)},j=(f,m,x,H,T,$,R)=>{for(let M=0;M{if(m!==x){if(m!==fe)for(const $ in m)!kt($)&&!($ in x)&&i(f,$,m[$],null,T,H);for(const $ in x){if(kt($))continue;const R=x[$],M=m[$];R!==M&&$!=="value"&&i(f,$,M,R,T,H)}"value"in x&&i(f,"value",m.value,x.value,T)}},F=(f,m,x,H,T,$,R,M,P)=>{const S=m.el=f?f.el:l(""),N=m.anchor=f?f.anchor:l("");let{patchFlag:O,dynamicChildren:G,slotScopeIds:J}=m;J&&(M=M?M.concat(J):J),f==null?(r(S,x,H),r(N,x,H),K(m.children||[],x,N,T,$,R,M,P)):O>0&&O&64&&G&&f.dynamicChildren?(j(f.dynamicChildren,G,x,T,$,R,M),(m.key!=null||T&&m===T.subTree)&&Si(f,m,!0)):re(f,m,x,N,T,$,R,M,P)},ee=(f,m,x,H,T,$,R,M,P)=>{m.slotScopeIds=M,f==null?m.shapeFlag&512?T.ctx.activate(m,x,H,R,P):ae(m,x,H,T,$,R,P):xe(f,m,P)},ae=(f,m,x,H,T,$,R)=>{const M=f.component=Wu(f,H,T);if(Yr(f)&&(M.ctx.renderer=vo),ju(M,!1,R),M.asyncDep){if(T&&T.registerDep(M,oe,R),!f.el){const P=M.subTree=_e(Me);C(null,P,m,x)}}else oe(M,f,m,x,T,$,R)},xe=(f,m,x)=>{const H=m.component=f.component;if(Du(f,m,x))if(H.asyncDep&&!H.asyncResolved){V(H,m,x);return}else H.next=m,H.update();else m.el=f.el,H.vnode=m},oe=(f,m,x,H,T,$,R)=>{const M=()=>{if(f.isMounted){let{next:O,bu:G,u:J,parent:te,vnode:pe}=f;{const io=es(f);if(io){O&&(O.el=pe.el,V(f,O,R)),io.asyncDep.then(()=>{f.isUnmounted||M()});return}}let ce=O,Ue;Uo(f,!1),O?(O.el=pe.el,V(f,O,R)):O=pe,G&&yr(G),(Ue=O.props&&O.props.onVnodeBeforeUpdate)&&lo(Ue,te,O,pe),Uo(f,!0);const Oe=Xi(f),no=f.subTree;f.subTree=Oe,b(no,Oe,u(no.el),xo(no),f,T,$),O.el=Oe.el,ce===null&&_u(f,Oe.el),J&&Le(J,T),(Ue=O.props&&O.props.onVnodeUpdated)&&Le(()=>lo(Ue,te,O,pe),T)}else{let O;const{el:G,props:J}=m,{bm:te,m:pe,parent:ce,root:Ue,type:Oe}=f,no=gt(m);Uo(f,!1),te&&yr(te),!no&&(O=J&&J.onVnodeBeforeMount)&&lo(O,ce,m),Uo(f,!0);{Ue.ce&&Ue.ce._injectChildStyle(Oe);const io=f.subTree=Xi(f);b(null,io,x,H,f,T,$),m.el=io.el}if(pe&&Le(pe,T),!no&&(O=J&&J.onVnodeMounted)){const io=m;Le(()=>lo(O,ce,io),T)}(m.shapeFlag&256||ce&>(ce.vnode)&&ce.vnode.shapeFlag&256)&&f.a&&Le(f.a,T),f.isMounted=!0,m=x=H=null}};f.scope.on();const P=f.effect=new il(M);f.scope.off();const S=f.update=P.run.bind(P),N=f.job=P.runIfDirty.bind(P);N.i=f,N.id=f.uid,P.scheduler=()=>xi(N),Uo(f,!0),S()},V=(f,m,x)=>{m.component=f;const H=f.vnode.props;f.vnode=m,f.next=null,gu(f,m.props,H,x),vu(f,m.children,x),jo(),ji(f),No()},re=(f,m,x,H,T,$,R,M,P=!1)=>{const S=f&&f.children,N=f?f.shapeFlag:0,O=m.children,{patchFlag:G,shapeFlag:J}=m;if(G>0){if(G&128){Ze(S,O,x,H,T,$,R,M,P);return}else if(G&256){Ne(S,O,x,H,T,$,R,M,P);return}}J&8?(N&16&&ue(S,T,$),O!==S&&d(x,O)):N&16?J&16?Ze(S,O,x,H,T,$,R,M,P):ue(S,T,$,!0):(N&8&&d(x,""),J&16&&K(O,x,H,T,$,R,M,P))},Ne=(f,m,x,H,T,$,R,M,P)=>{f=f||ft,m=m||ft;const S=f.length,N=m.length,O=Math.min(S,N);let G;for(G=0;GN?ue(f,T,$,!0,!1,O):K(m,x,H,T,$,R,M,P,O)},Ze=(f,m,x,H,T,$,R,M,P)=>{let S=0;const N=m.length;let O=f.length-1,G=N-1;for(;S<=O&&S<=G;){const J=f[S],te=m[S]=P?Lo(m[S]):fo(m[S]);if(Jo(J,te))b(J,te,x,null,T,$,R,M,P);else break;S++}for(;S<=O&&S<=G;){const J=f[O],te=m[G]=P?Lo(m[G]):fo(m[G]);if(Jo(J,te))b(J,te,x,null,T,$,R,M,P);else break;O--,G--}if(S>O){if(S<=G){const J=G+1,te=JG)for(;S<=O;)Ve(f[S],T,$,!0),S++;else{const J=S,te=S,pe=new Map;for(S=te;S<=G;S++){const Ge=m[S]=P?Lo(m[S]):fo(m[S]);Ge.key!=null&&pe.set(Ge.key,S)}let ce,Ue=0;const Oe=G-te+1;let no=!1,io=0;const Ft=new Array(Oe);for(S=0;S=Oe){Ve(Ge,T,$,!0);continue}let ao;if(Ge.key!=null)ao=pe.get(Ge.key);else for(ce=te;ce<=G;ce++)if(Ft[ce-te]===0&&Jo(Ge,m[ce])){ao=ce;break}ao===void 0?Ve(Ge,T,$,!0):(Ft[ao-te]=S+1,ao>=io?io=ao:no=!0,b(Ge,m[ao],x,null,T,$,R,M,P),Ue++)}const ki=no?Pu(Ft):ft;for(ce=ki.length-1,S=Oe-1;S>=0;S--){const Ge=te+S,ao=m[Ge],Oi=Ge+1{const{el:$,type:R,transition:M,children:P,shapeFlag:S}=f;if(S&6){Co(f.component.subTree,m,x,H);return}if(S&128){f.suspense.move(m,x,H);return}if(S&64){R.move(f,m,x,vo);return}if(R===Fe){r($,m,x);for(let O=0;OM.enter($),T);else{const{leave:O,delayLeave:G,afterLeave:J}=M,te=()=>r($,m,x),pe=()=>{O($,()=>{te(),J&&J()})};G?G($,te,pe):pe()}else r($,m,x)},Ve=(f,m,x,H=!1,T=!1)=>{const{type:$,props:R,ref:M,children:P,dynamicChildren:S,shapeFlag:N,patchFlag:O,dirs:G,cacheIndex:J}=f;if(O===-2&&(T=!1),M!=null&&Mr(M,null,x,f,!0),J!=null&&(m.renderCache[J]=void 0),N&256){m.ctx.deactivate(f);return}const te=N&1&&G,pe=!gt(f);let ce;if(pe&&(ce=R&&R.onVnodeBeforeUnmount)&&lo(ce,m,f),N&6)mn(f.component,x,H);else{if(N&128){f.suspense.unmount(x,H);return}te&&Vo(f,null,m,"beforeUnmount"),N&64?f.type.remove(f,m,x,vo,H):S&&!S.hasOnce&&($!==Fe||O>0&&O&64)?ue(S,m,x,!1,!0):($===Fe&&O&384||!T&&N&16)&&ue(P,m,x),H&&dr(f)}(pe&&(ce=R&&R.onVnodeUnmounted)||te)&&Le(()=>{ce&&lo(ce,m,f),te&&Vo(f,null,m,"unmounted")},x)},dr=f=>{const{type:m,el:x,anchor:H,transition:T}=f;if(m===Fe){hn(x,H);return}if(m===Pr){v(f);return}const $=()=>{n(x),T&&!T.persisted&&T.afterLeave&&T.afterLeave()};if(f.shapeFlag&1&&T&&!T.persisted){const{leave:R,delayLeave:M}=T,P=()=>R(x,$);M?M(f.el,$,P):P()}else $()},hn=(f,m)=>{let x;for(;f!==m;)x=p(f),n(f),f=x;n(m)},mn=(f,m,x)=>{const{bum:H,scope:T,job:$,subTree:R,um:M,m:P,a:S}=f;Qi(P),Qi(S),H&&yr(H),T.stop(),$&&($.flags|=8,Ve(R,f,m,x)),M&&Le(M,m),Le(()=>{f.isUnmounted=!0},m),m&&m.pendingBranch&&!m.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===m.pendingId&&(m.deps--,m.deps===0&&m.resolve())},ue=(f,m,x,H=!1,T=!1,$=0)=>{for(let R=$;R{if(f.shapeFlag&6)return xo(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const m=p(f.anchor||f.el),x=m&&m[Hl];return x?p(x):m};let st=!1;const le=(f,m,x)=>{f==null?m._vnode&&Ve(m._vnode,null,null,!0):b(m._vnode||null,f,m,null,null,null,x),m._vnode=f,st||(st=!0,ji(),Tl(),st=!1)},vo={p:b,um:Ve,m:Co,r:dr,mt:ae,mc:K,pc:re,pbc:j,n:xo,o:e};return{render:le,hydrate:void 0,createApp:hu(le)}}function wn({type:e,props:o},t){return t==="svg"&&e==="foreignObject"||t==="mathml"&&e==="annotation-xml"&&o&&o.encoding&&o.encoding.includes("html")?void 0:t}function Uo({effect:e,job:o},t){t?(e.flags|=32,o.flags|=4):(e.flags&=-33,o.flags&=-5)}function wu(e,o){return(!e||e&&!e.pendingBranch)&&o&&!o.persisted}function Si(e,o,t=!1){const r=e.children,n=o.children;if(Y(r)&&Y(n))for(let i=0;i>1,e[t[l]]0&&(o[r]=t[i-1]),t[i]=r)}}for(i=t.length,a=t[i-1];i-- >0;)t[i]=a,a=o[a];return t}function es(e){const o=e.subTree.component;if(o)return o.asyncDep&&!o.asyncResolved?o:es(o)}function Qi(e){if(e)for(let o=0;oEe(Tu);function os(e,o){return wi(e,null,o)}function wr(e,o,t){return wi(e,o,t)}function wi(e,o,t=fe){const{immediate:r,deep:n,flush:i,once:a}=t,l=we({},t),s=o&&r||!o&&i!=="post";let c;if(Jt){if(i==="sync"){const g=$u();c=g.__watcherHandles||(g.__watcherHandles=[])}else if(!s){const g=()=>{};return g.stop=mo,g.resume=mo,g.pause=mo,g}}const d=De;l.call=(g,h,b)=>ro(g,d,h,b);let u=!1;i==="post"?l.scheduler=g=>{Le(g,d&&d.suspense)}:i!=="sync"&&(u=!0,l.scheduler=(g,h)=>{h?g():xi(g)}),l.augmentJob=g=>{o&&(g.flags|=4),u&&(g.flags|=2,d&&(g.id=d.uid,g.i=d))};const p=Nd(e,o,l);return Jt&&(c?c.push(p):s&&p()),p}function Iu(e,o,t){const r=this.proxy,n=ve(e)?e.includes(".")?ts(r,e):()=>r[e]:e.bind(r,r);let i;X(o)?i=o:(i=o.handler,t=o);const a=tr(this),l=wi(n,i.bind(r),t);return a(),l}function ts(e,o){const t=o.split(".");return()=>{let r=e;for(let n=0;no==="modelValue"||o==="model-value"?e.modelModifiers:e[`${o}Modifiers`]||e[`${zo(o)}Modifiers`]||e[`${nt(o)}Modifiers`];function Fu(e,o,...t){if(e.isUnmounted)return;const r=e.vnode.props||fe;let n=t;const i=o.startsWith("update:"),a=i&&Hu(r,o.slice(7));a&&(a.trim&&(n=t.map(d=>ve(d)?d.trim():d)),a.number&&(n=t.map(Dn)));let l,s=r[l=gn(o)]||r[l=gn(zo(o))];!s&&i&&(s=r[l=gn(nt(o))]),s&&ro(s,e,6,n);const c=r[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ro(c,e,6,n)}}function rs(e,o,t=!1){const r=o.emitsCache,n=r.get(e);if(n!==void 0)return n;const i=e.emits;let a={},l=!1;if(!X(e)){const s=c=>{const d=rs(c,o,!0);d&&(l=!0,we(a,d))};!t&&o.mixins.length&&o.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!i&&!l?(me(e)&&r.set(e,null),null):(Y(i)?i.forEach(s=>a[s]=null):we(a,i),me(e)&&r.set(e,a),a)}function en(e,o){return!e||!Wr(o)?!1:(o=o.slice(2).replace(/Once$/,""),se(e,o[0].toLowerCase()+o.slice(1))||se(e,nt(o))||se(e,o))}function Xi(e){const{type:o,vnode:t,proxy:r,withProxy:n,propsOptions:[i],slots:a,attrs:l,emit:s,render:c,renderCache:d,props:u,data:p,setupState:g,ctx:h,inheritAttrs:b}=e,y=Ar(e);let C,I;try{if(t.shapeFlag&4){const v=n||r,L=v;C=fo(c.call(L,v,d,u,g,p,h)),I=l}else{const v=o;C=fo(v.length>1?v(u,{attrs:l,slots:a,emit:s}):v(u,null)),I=o.props?l:Au(l)}}catch(v){jt.length=0,Kr(v,e,1),C=_e(Me)}let E=C;if(I&&b!==!1){const v=Object.keys(I),{shapeFlag:L}=E;v.length&&L&7&&(i&&v.some(ai)&&(I=Mu(I,i)),E=Bo(E,I,!1,!0))}return t.dirs&&(E=Bo(E,null,!1,!0),E.dirs=E.dirs?E.dirs.concat(t.dirs):t.dirs),t.transition&&tt(E,t.transition),C=E,Ar(y),C}const Au=e=>{let o;for(const t in e)(t==="class"||t==="style"||Wr(t))&&((o||(o={}))[t]=e[t]);return o},Mu=(e,o)=>{const t={};for(const r in e)(!ai(r)||!(r.slice(9)in o))&&(t[r]=e[r]);return t};function Du(e,o,t){const{props:r,children:n,component:i}=e,{props:a,children:l,patchFlag:s}=o,c=i.emitsOptions;if(o.dirs||o.transition)return!0;if(t&&s>=0){if(s&1024)return!0;if(s&16)return r?ea(r,a,c):!!a;if(s&8){const d=o.dynamicProps;for(let u=0;ue.__isSuspense;function Eu(e,o){o&&o.pendingBranch?Y(e)?o.effects.push(...e):o.effects.push(e):Gd(e)}const Fe=Symbol.for("v-fgt"),on=Symbol.for("v-txt"),Me=Symbol.for("v-cmt"),Pr=Symbol.for("v-stc"),jt=[];let Ke=null;function Nn(e=!1){jt.push(Ke=e?null:[])}function Ru(){jt.pop(),Ke=jt[jt.length-1]||null}let Yt=1;function oa(e,o=!1){Yt+=e,e<0&&Ke&&o&&(Ke.hasOnce=!0)}function is(e){return e.dynamicChildren=Yt>0?Ke||ft:null,Ru(),Yt>0&&Ke&&Ke.push(e),e}function Ov(e,o,t,r,n,i){return is(ls(e,o,t,r,n,i,!0))}function Vn(e,o,t,r,n){return is(_e(e,o,t,r,n,!0))}function xt(e){return e?e.__v_isVNode===!0:!1}function Jo(e,o){return e.type===o.type&&e.key===o.key}const as=({key:e})=>e??null,Tr=({ref:e,ref_key:o,ref_for:t})=>(typeof e=="number"&&(e=""+e),e!=null?ve(e)||Pe(e)||X(e)?{i:Te,r:e,k:o,f:!!t}:e:null);function ls(e,o=null,t=null,r=0,n=null,i=e===Fe?0:1,a=!1,l=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:o,key:o&&as(o),ref:o&&Tr(o),scopeId:Il,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:Te};return l?(Pi(s,t),i&128&&e.normalize(s)):t&&(s.shapeFlag|=ve(t)?8:16),Yt>0&&!a&&Ke&&(s.patchFlag>0||i&6)&&s.patchFlag!==32&&Ke.push(s),s}const _e=Lu;function Lu(e,o=null,t=null,r=0,n=null,i=!1){if((!e||e===au)&&(e=Me),xt(e)){const l=Bo(e,o,!0);return t&&Pi(l,t),Yt>0&&!i&&Ke&&(l.shapeFlag&6?Ke[Ke.indexOf(e)]=l:Ke.push(l)),l.patchFlag=-2,l}if(Gu(e)&&(e=e.__vccOpts),o){o=ku(o);let{class:l,style:s}=o;l&&!ve(l)&&(o.class=di(l)),me(s)&&(Ci(s)&&!Y(s)&&(s=we({},s)),o.style=ci(s))}const a=ve(e)?1:ns(e)?128:Fl(e)?64:me(e)?4:X(e)?2:0;return ls(e,o,t,r,n,a,i,!0)}function ku(e){return e?Ci(e)||ql(e)?we({},e):e:null}function Bo(e,o,t=!1,r=!1){const{props:n,ref:i,patchFlag:a,children:l,transition:s}=e,c=o?Ou(n||{},o):n,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&as(c),ref:o&&o.ref?t&&i?Y(i)?i.concat(Tr(o)):[i,Tr(o)]:Tr(o):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:o&&e.type!==Fe?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:s,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Bo(e.ssContent),ssFallback:e.ssFallback&&Bo(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return s&&r&&tt(d,s.clone(d)),d}function Un(e=" ",o=0){return _e(on,null,e,o)}function zv(e,o){const t=_e(Pr,null,e);return t.staticCount=o,t}function Bv(e="",o=!1){return o?(Nn(),Vn(Me,null,e)):_e(Me,null,e)}function fo(e){return e==null||typeof e=="boolean"?_e(Me):Y(e)?_e(Fe,null,e.slice()):xt(e)?Lo(e):_e(on,null,String(e))}function Lo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Bo(e)}function Pi(e,o){let t=0;const{shapeFlag:r}=e;if(o==null)o=null;else if(Y(o))t=16;else if(typeof o=="object")if(r&65){const n=o.default;n&&(n._c&&(n._d=!1),Pi(e,n()),n._c&&(n._d=!0));return}else{t=32;const n=o._;!n&&!ql(o)?o._ctx=Te:n===3&&Te&&(Te.slots._===1?o._=1:(o._=2,e.patchFlag|=1024))}else X(o)?(o={default:o,_ctx:Te},t=32):(o=String(o),r&64?(t=16,o=[Un(o)]):t=8);e.children=o,e.shapeFlag|=t}function Ou(...e){const o={};for(let t=0;tDe||Te;let _r,Gn;{const e=Vr(),o=(t,r)=>{let n;return(n=e[t])||(n=e[t]=[]),n.push(r),i=>{n.length>1?n.forEach(a=>a(i)):n[0](i)}};_r=o("__VUE_INSTANCE_SETTERS__",t=>De=t),Gn=o("__VUE_SSR_SETTERS__",t=>Jt=t)}const tr=e=>{const o=De;return _r(e),e.scope.on(),()=>{e.scope.off(),_r(o)}},ta=()=>{De&&De.scope.off(),_r(null)};function cs(e){return e.vnode.shapeFlag&4}let Jt=!1;function ju(e,o=!1,t=!1){o&&Gn(o);const{props:r,children:n}=e.vnode,i=cs(e);mu(e,r,i,o),xu(e,n,t);const a=i?Nu(e,o):void 0;return o&&Gn(!1),a}function Nu(e,o){const t=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lu);const{setup:r}=t;if(r){jo();const n=e.setupContext=r.length>1?Uu(e):null,i=tr(e),a=or(r,e,0,[e.props,n]),l=Za(a);if(No(),i(),(l||e.sp)&&!gt(e)&&kl(e),l){if(a.then(ta,ta),o)return a.then(s=>{ra(e,s)}).catch(s=>{Kr(s,e,0)});e.asyncDep=a}else ra(e,a)}else ds(e)}function ra(e,o,t){X(o)?e.type.__ssrInlineRender?e.ssrRender=o:e.render=o:me(o)&&(e.setupState=yl(o)),ds(e)}function ds(e,o,t){const r=e.type;e.render||(e.render=r.render||mo);{const n=tr(e);jo();try{su(e)}finally{No(),n()}}}const Vu={get(e,o){return Ie(e,"get",""),e[o]}};function Uu(e){const o=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,Vu),slots:e.slots,emit:e.emit,expose:o}}function tn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(yl(Ln(e.exposed)),{get(o,t){if(t in o)return o[t];if(t in Wt)return Wt[t](e)},has(o,t){return t in o||t in Wt}})):e.proxy}function Gu(e){return X(e)&&"__vccOpts"in e}const de=(e,o)=>Wd(e,o,Jt);function z(e,o,t){const r=arguments.length;return r===2?me(o)&&!Y(o)?xt(o)?_e(e,null,[o]):_e(e,o):_e(e,null,o):(r>3?t=Array.prototype.slice.call(arguments,2):r===3&&xt(t)&&(t=[t]),_e(e,o,t))}const qu="3.5.13";/** * @vue/runtime-dom v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let qn;const na=typeof window<"u"&&window.trustedTypes;if(na)try{qn=na.createPolicy("vue",{createHTML:e=>e})}catch{}const us=qn?e=>qn.createHTML(e):e=>e,Ku="http://www.w3.org/2000/svg",Yu="http://www.w3.org/1998/Math/MathML",So=typeof document<"u"?document:null,ia=So&&So.createElement("template"),Ju={insert:(e,o,t)=>{o.insertBefore(e,t||null)},remove:e=>{const o=e.parentNode;o&&o.removeChild(e)},createElement:(e,o,t,r)=>{const n=o==="svg"?So.createElementNS(Ku,e):o==="mathml"?So.createElementNS(Yu,e):t?So.createElement(e,{is:t}):So.createElement(e);return e==="select"&&r&&r.multiple!=null&&n.setAttribute("multiple",r.multiple),n},createText:e=>So.createTextNode(e),createComment:e=>So.createComment(e),setText:(e,o)=>{e.nodeValue=o},setElementText:(e,o)=>{e.textContent=o},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>So.querySelector(e),setScopeId(e,o){e.setAttribute(o,"")},insertStaticContent(e,o,t,r,n,i){const a=t?t.previousSibling:o.lastChild;if(n&&(n===i||n.nextSibling))for(;o.insertBefore(n.cloneNode(!0),t),!(n===i||!(n=n.nextSibling)););else{ia.innerHTML=us(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const l=ia.content;if(r==="svg"||r==="mathml"){const s=l.firstChild;for(;s.firstChild;)l.appendChild(s.firstChild);l.removeChild(s)}o.insertBefore(l,t)}return[a?a.nextSibling:o.firstChild,t?t.previousSibling:o.lastChild]}},Mo="transition",Mt="animation",vt=Symbol("_vtc"),fs={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ps=we({},_l,fs),Zu=e=>(e.displayName="Transition",e.props=ps,e),hs=Zu((e,{slots:o})=>O(Zd,ms(e),o)),Go=(e,o=[])=>{Y(e)?e.forEach(t=>t(...o)):e&&e(...o)},aa=e=>e?Y(e)?e.some(o=>o.length>1):e.length>1:!1;function ms(e){const o={};for(const F in e)F in fs||(o[F]=e[F]);if(e.css===!1)return o;const{name:t="v",type:r,duration:n,enterFromClass:i=`${t}-enter-from`,enterActiveClass:a=`${t}-enter-active`,enterToClass:l=`${t}-enter-to`,appearFromClass:s=i,appearActiveClass:c=a,appearToClass:d=l,leaveFromClass:u=`${t}-leave-from`,leaveActiveClass:p=`${t}-leave-active`,leaveToClass:g=`${t}-leave-to`}=e,h=Qu(n),b=h&&h[0],y=h&&h[1],{onBeforeEnter:C,onEnter:I,onEnterCancelled:E,onLeave:v,onLeaveCancelled:L,onBeforeAppear:W=C,onAppear:w=I,onAppearCancelled:K=E}=o,D=(F,ee,ae,xe)=>{F._enterCancelled=xe,_o(F,ee?d:l),_o(F,ee?c:a),ae&&ae()},j=(F,ee)=>{F._isLeaving=!1,_o(F,u),_o(F,g),_o(F,p),ee&&ee()},q=F=>(ee,ae)=>{const xe=F?w:I,oe=()=>D(ee,F,ae);Go(xe,[ee,oe]),la(()=>{_o(ee,F?s:i),co(ee,F?d:l),aa(xe)||sa(ee,r,b,oe)})};return we(o,{onBeforeEnter(F){Go(C,[F]),co(F,i),co(F,a)},onBeforeAppear(F){Go(W,[F]),co(F,s),co(F,c)},onEnter:q(!1),onAppear:q(!0),onLeave(F,ee){F._isLeaving=!0;const ae=()=>j(F,ee);co(F,u),F._enterCancelled?(co(F,p),Kn()):(Kn(),co(F,p)),la(()=>{F._isLeaving&&(_o(F,u),co(F,g),aa(v)||sa(F,r,y,ae))}),Go(v,[F,ae])},onEnterCancelled(F){D(F,!1,void 0,!0),Go(E,[F])},onAppearCancelled(F){D(F,!0,void 0,!0),Go(K,[F])},onLeaveCancelled(F){j(F),Go(L,[F])}})}function Qu(e){if(e==null)return null;if(me(e))return[Pn(e.enter),Pn(e.leave)];{const o=Pn(e);return[o,o]}}function Pn(e){return nd(e)}function co(e,o){o.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[vt]||(e[vt]=new Set)).add(o)}function _o(e,o){o.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const t=e[vt];t&&(t.delete(o),t.size||(e[vt]=void 0))}function la(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Xu=0;function sa(e,o,t,r){const n=e._endId=++Xu,i=()=>{n===e._endId&&r()};if(t!=null)return setTimeout(i,t);const{type:a,timeout:l,propCount:s}=gs(e,o);if(!a)return r();const c=a+"end";let d=0;const u=()=>{e.removeEventListener(c,p),i()},p=g=>{g.target===e&&++d>=s&&u()};setTimeout(()=>{d(t[h]||"").split(", "),n=r(`${Mo}Delay`),i=r(`${Mo}Duration`),a=ca(n,i),l=r(`${Mt}Delay`),s=r(`${Mt}Duration`),c=ca(l,s);let d=null,u=0,p=0;o===Mo?a>0&&(d=Mo,u=a,p=i.length):o===Mt?c>0&&(d=Mt,u=c,p=s.length):(u=Math.max(a,c),d=u>0?a>c?Mo:Mt:null,p=d?d===Mo?i.length:s.length:0);const g=d===Mo&&/\b(transform|all)(,|$)/.test(r(`${Mo}Property`).toString());return{type:d,timeout:u,propCount:p,hasTransform:g}}function ca(e,o){for(;e.lengthda(t)+da(e[r])))}function da(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Kn(){return document.body.offsetHeight}function ef(e,o,t){const r=e[vt];r&&(o=(o?[o,...r]:[...r]).join(" ")),o==null?e.removeAttribute("class"):t?e.setAttribute("class",o):e.className=o}const Er=Symbol("_vod"),bs=Symbol("_vsh"),Wv={beforeMount(e,{value:o},{transition:t}){e[Er]=e.style.display==="none"?"":e.style.display,t&&o?t.beforeEnter(e):Dt(e,o)},mounted(e,{value:o},{transition:t}){t&&o&&t.enter(e)},updated(e,{value:o,oldValue:t},{transition:r}){!o!=!t&&(r?o?(r.beforeEnter(e),Dt(e,!0),r.enter(e)):r.leave(e,()=>{Dt(e,!1)}):Dt(e,o))},beforeUnmount(e,{value:o}){Dt(e,o)}};function Dt(e,o){e.style.display=o?e[Er]:"none",e[bs]=!o}const of=Symbol(""),tf=/(^|;)\s*display\s*:/;function rf(e,o,t){const r=e.style,n=ve(t);let i=!1;if(t&&!n){if(o)if(ve(o))for(const a of o.split(";")){const l=a.slice(0,a.indexOf(":")).trim();t[l]==null&&$r(r,l,"")}else for(const a in o)t[a]==null&&$r(r,a,"");for(const a in t)a==="display"&&(i=!0),$r(r,a,t[a])}else if(n){if(o!==t){const a=r[of];a&&(t+=";"+a),r.cssText=t,i=tf.test(t)}}else o&&e.removeAttribute("style");Er in e&&(e[Er]=i?r.display:"",e[bs]&&(r.display="none"))}const ua=/\s*!important$/;function $r(e,o,t){if(Y(t))t.forEach(r=>$r(e,o,r));else if(t==null&&(t=""),o.startsWith("--"))e.setProperty(o,t);else{const r=nf(e,o);ua.test(t)?e.setProperty(nt(r),t.replace(ua,""),"important"):e[r]=t}}const fa=["Webkit","Moz","ms"],Tn={};function nf(e,o){const t=Tn[o];if(t)return t;let r=Oo(o);if(r!=="filter"&&r in e)return Tn[o]=r;r=el(r);for(let n=0;n$n||(cf.then(()=>$n=0),$n=Date.now());function uf(e,o){const t=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=t.attached)return;ro(ff(r,t.value),o,5,[r])};return t.value=e,t.attached=df(),t}function ff(e,o){if(Y(o)){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{t.call(e),e._stopped=!0},o.map(r=>n=>!n._stopped&&r&&r(n))}else return o}const Ca=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,pf=(e,o,t,r,n,i)=>{const a=n==="svg";o==="class"?ef(e,r,a):o==="style"?rf(e,t,r):Wr(o)?ai(o)||lf(e,o,t,r,i):(o[0]==="."?(o=o.slice(1),!0):o[0]==="^"?(o=o.slice(1),!1):hf(e,o,r,a))?(ma(e,o,r),!e.tagName.includes("-")&&(o==="value"||o==="checked"||o==="selected")&&ha(e,o,r,a,i,o!=="value")):e._isVueCE&&(/[A-Z]/.test(o)||!ve(r))?ma(e,Oo(o),r,i,o):(o==="true-value"?e._trueValue=r:o==="false-value"&&(e._falseValue=r),ha(e,o,r,a))};function hf(e,o,t,r){if(r)return!!(o==="innerHTML"||o==="textContent"||o in e&&Ca(o)&&X(t));if(o==="spellcheck"||o==="draggable"||o==="translate"||o==="form"||o==="list"&&e.tagName==="INPUT"||o==="type"&&e.tagName==="TEXTAREA")return!1;if(o==="width"||o==="height"){const n=e.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return Ca(o)&&ve(t)?!1:o in e}const Cs=new WeakMap,xs=new WeakMap,Rr=Symbol("_moveCb"),xa=Symbol("_enterCb"),mf=e=>(delete e.props.mode,e),gf=mf({name:"TransitionGroup",props:we({},ps,{tag:String,moveClass:String}),setup(e,{slots:o}){const t=ss(),r=Dl();let n,i;return Ol(()=>{if(!n.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!yf(n[0].el,t.vnode.el,a))return;n.forEach(Cf),n.forEach(xf);const l=n.filter(vf);Kn(),l.forEach(s=>{const c=s.el,d=c.style;co(c,a),d.transform=d.webkitTransform=d.transitionDuration="";const u=c[Rr]=p=>{p&&p.target!==c||(!p||/transform$/.test(p.propertyName))&&(c.removeEventListener("transitionend",u),c[Rr]=null,_o(c,a))};c.addEventListener("transitionend",u)})}),()=>{const a=ie(e),l=ms(a);let s=a.tag||Fe;if(n=[],i)for(let c=0;c{l.split(/\s+/).forEach(s=>s&&r.classList.remove(s))}),t.split(/\s+/).forEach(l=>l&&r.classList.add(l)),r.style.display="none";const i=o.nodeType===1?o:o.parentNode;i.appendChild(r);const{hasTransform:a}=gs(r);return i.removeChild(r),a}const va=e=>{const o=e.props["onUpdate:modelValue"]||!1;return Y(o)?t=>yr(o,t):o};function Sf(e){e.target.composing=!0}function ya(e){const o=e.target;o.composing&&(o.composing=!1,o.dispatchEvent(new Event("input")))}const In=Symbol("_assign"),jv={created(e,{modifiers:{lazy:o,trim:t,number:r}},n){e[In]=va(n);const i=r||n.props&&n.props.type==="number";ut(e,o?"change":"input",a=>{if(a.target.composing)return;let l=e.value;t&&(l=l.trim()),i&&(l=Dn(l)),e[In](l)}),t&&ut(e,"change",()=>{e.value=e.value.trim()}),o||(ut(e,"compositionstart",Sf),ut(e,"compositionend",ya),ut(e,"change",ya))},mounted(e,{value:o}){e.value=o??""},beforeUpdate(e,{value:o,oldValue:t,modifiers:{lazy:r,trim:n,number:i}},a){if(e[In]=va(a),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Dn(e.value):e.value,s=o??"";l!==s&&(document.activeElement===e&&e.type!=="range"&&(r&&o===t||n&&e.value.trim()===s)||(e.value=s))}},wf=["ctrl","shift","alt","meta"],Pf={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,o)=>wf.some(t=>e[`${t}Key`]&&!o.includes(t))},Nv=(e,o)=>{const t=e._withMods||(e._withMods={}),r=o.join(".");return t[r]||(t[r]=(n,...i)=>{for(let a=0;a{const o=$f().createApp(...e),{mount:t}=o;return o.mount=r=>{const n=Hf(r);if(!n)return;const i=o._component;!X(i)&&!i.render&&!i.template&&(i.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const a=t(n,!1,If(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},o};function If(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Hf(e){return ve(e)?document.querySelector(e):e}function Ff(e){let o=".",t="__",r="--",n;if(e){let h=e.blockPrefix;h&&(o=h),h=e.elementPrefix,h&&(t=h),h=e.modifierPrefix,h&&(r=h)}const i={install(h){n=h.c;const b=h.context;b.bem={},b.bem.b=null,b.bem.els=null}};function a(h){let b,y;return{before(C){b=C.bem.b,y=C.bem.els,C.bem.els=null},after(C){C.bem.b=b,C.bem.els=y},$({context:C,props:I}){return h=typeof h=="string"?h:h({context:C,props:I}),C.bem.b=h,`${(I==null?void 0:I.bPrefix)||o}${C.bem.b}`}}}function l(h){let b;return{before(y){b=y.bem.els},after(y){y.bem.els=b},$({context:y,props:C}){return h=typeof h=="string"?h:h({context:y,props:C}),y.bem.els=h.split(",").map(I=>I.trim()),y.bem.els.map(I=>`${(C==null?void 0:C.bPrefix)||o}${y.bem.b}${t}${I}`).join(", ")}}}function s(h){return{$({context:b,props:y}){h=typeof h=="string"?h:h({context:b,props:y});const C=h.split(",").map(v=>v.trim());function I(v){return C.map(L=>`&${(y==null?void 0:y.bPrefix)||o}${b.bem.b}${v!==void 0?`${t}${v}`:""}${r}${L}`).join(", ")}const E=b.bem.els;return E!==null?I(E[0]):I()}}}function c(h){return{$({context:b,props:y}){h=typeof h=="string"?h:h({context:b,props:y});const C=b.bem.els;return`&:not(${(y==null?void 0:y.bPrefix)||o}${b.bem.b}${C!==null&&C.length>0?`${t}${C[0]}`:""}${r}${h})`}}}return Object.assign(i,{cB:(...h)=>n(a(h[0]),h[1],h[2]),cE:(...h)=>n(l(h[0]),h[1],h[2]),cM:(...h)=>n(s(h[0]),h[1],h[2]),cNotM:(...h)=>n(c(h[0]),h[1],h[2])}),i}function Af(e){let o=0;for(let t=0;t{let n=Af(r);if(n){if(n===1){e.forEach(a=>{t.push(r.replace("&",a))});return}}else{e.forEach(a=>{t.push((a&&a+" ")+r)});return}let i=[r];for(;n--;){const a=[];i.forEach(l=>{e.forEach(s=>{a.push(l.replace("&",s))})}),i=a}i.forEach(a=>t.push(a))}),t}function _f(e,o){const t=[];return o.split(vs).forEach(r=>{e.forEach(n=>{t.push((n&&n+" ")+r)})}),t}function Ef(e){let o=[""];return e.forEach(t=>{t=t&&t.trim(),t&&(t.includes("&")?o=Df(o,t):o=_f(o,t))}),o.join(", ").replace(Mf," ")}function wa(e){if(!e)return;const o=e.parentElement;o&&o.removeChild(e)}function rn(e,o){return(o??document.head).querySelector(`style[cssr-id="${e}"]`)}function Rf(e){const o=document.createElement("style");return o.setAttribute("cssr-id",e),o}function br(e){return e?/^\s*@(s|m)/.test(e):!1}const Lf=/[A-Z]/g;function ys(e){return e.replace(Lf,o=>"-"+o.toLowerCase())}function kf(e,o=" "){return typeof e=="object"&&e!==null?` { +**/let qn;const na=typeof window<"u"&&window.trustedTypes;if(na)try{qn=na.createPolicy("vue",{createHTML:e=>e})}catch{}const us=qn?e=>qn.createHTML(e):e=>e,Ku="http://www.w3.org/2000/svg",Yu="http://www.w3.org/1998/Math/MathML",So=typeof document<"u"?document:null,ia=So&&So.createElement("template"),Ju={insert:(e,o,t)=>{o.insertBefore(e,t||null)},remove:e=>{const o=e.parentNode;o&&o.removeChild(e)},createElement:(e,o,t,r)=>{const n=o==="svg"?So.createElementNS(Ku,e):o==="mathml"?So.createElementNS(Yu,e):t?So.createElement(e,{is:t}):So.createElement(e);return e==="select"&&r&&r.multiple!=null&&n.setAttribute("multiple",r.multiple),n},createText:e=>So.createTextNode(e),createComment:e=>So.createComment(e),setText:(e,o)=>{e.nodeValue=o},setElementText:(e,o)=>{e.textContent=o},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>So.querySelector(e),setScopeId(e,o){e.setAttribute(o,"")},insertStaticContent(e,o,t,r,n,i){const a=t?t.previousSibling:o.lastChild;if(n&&(n===i||n.nextSibling))for(;o.insertBefore(n.cloneNode(!0),t),!(n===i||!(n=n.nextSibling)););else{ia.innerHTML=us(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const l=ia.content;if(r==="svg"||r==="mathml"){const s=l.firstChild;for(;s.firstChild;)l.appendChild(s.firstChild);l.removeChild(s)}o.insertBefore(l,t)}return[a?a.nextSibling:o.firstChild,t?t.previousSibling:o.lastChild]}},Mo="transition",Mt="animation",vt=Symbol("_vtc"),fs={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ps=we({},_l,fs),Zu=e=>(e.displayName="Transition",e.props=ps,e),hs=Zu((e,{slots:o})=>z(Zd,ms(e),o)),Go=(e,o=[])=>{Y(e)?e.forEach(t=>t(...o)):e&&e(...o)},aa=e=>e?Y(e)?e.some(o=>o.length>1):e.length>1:!1;function ms(e){const o={};for(const F in e)F in fs||(o[F]=e[F]);if(e.css===!1)return o;const{name:t="v",type:r,duration:n,enterFromClass:i=`${t}-enter-from`,enterActiveClass:a=`${t}-enter-active`,enterToClass:l=`${t}-enter-to`,appearFromClass:s=i,appearActiveClass:c=a,appearToClass:d=l,leaveFromClass:u=`${t}-leave-from`,leaveActiveClass:p=`${t}-leave-active`,leaveToClass:g=`${t}-leave-to`}=e,h=Qu(n),b=h&&h[0],y=h&&h[1],{onBeforeEnter:C,onEnter:I,onEnterCancelled:E,onLeave:v,onLeaveCancelled:L,onBeforeAppear:W=C,onAppear:w=I,onAppearCancelled:K=E}=o,D=(F,ee,ae,xe)=>{F._enterCancelled=xe,_o(F,ee?d:l),_o(F,ee?c:a),ae&&ae()},j=(F,ee)=>{F._isLeaving=!1,_o(F,u),_o(F,g),_o(F,p),ee&&ee()},q=F=>(ee,ae)=>{const xe=F?w:I,oe=()=>D(ee,F,ae);Go(xe,[ee,oe]),la(()=>{_o(ee,F?s:i),co(ee,F?d:l),aa(xe)||sa(ee,r,b,oe)})};return we(o,{onBeforeEnter(F){Go(C,[F]),co(F,i),co(F,a)},onBeforeAppear(F){Go(W,[F]),co(F,s),co(F,c)},onEnter:q(!1),onAppear:q(!0),onLeave(F,ee){F._isLeaving=!0;const ae=()=>j(F,ee);co(F,u),F._enterCancelled?(co(F,p),Kn()):(Kn(),co(F,p)),la(()=>{F._isLeaving&&(_o(F,u),co(F,g),aa(v)||sa(F,r,y,ae))}),Go(v,[F,ae])},onEnterCancelled(F){D(F,!1,void 0,!0),Go(E,[F])},onAppearCancelled(F){D(F,!0,void 0,!0),Go(K,[F])},onLeaveCancelled(F){j(F),Go(L,[F])}})}function Qu(e){if(e==null)return null;if(me(e))return[Pn(e.enter),Pn(e.leave)];{const o=Pn(e);return[o,o]}}function Pn(e){return nd(e)}function co(e,o){o.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[vt]||(e[vt]=new Set)).add(o)}function _o(e,o){o.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const t=e[vt];t&&(t.delete(o),t.size||(e[vt]=void 0))}function la(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Xu=0;function sa(e,o,t,r){const n=e._endId=++Xu,i=()=>{n===e._endId&&r()};if(t!=null)return setTimeout(i,t);const{type:a,timeout:l,propCount:s}=gs(e,o);if(!a)return r();const c=a+"end";let d=0;const u=()=>{e.removeEventListener(c,p),i()},p=g=>{g.target===e&&++d>=s&&u()};setTimeout(()=>{d(t[h]||"").split(", "),n=r(`${Mo}Delay`),i=r(`${Mo}Duration`),a=ca(n,i),l=r(`${Mt}Delay`),s=r(`${Mt}Duration`),c=ca(l,s);let d=null,u=0,p=0;o===Mo?a>0&&(d=Mo,u=a,p=i.length):o===Mt?c>0&&(d=Mt,u=c,p=s.length):(u=Math.max(a,c),d=u>0?a>c?Mo:Mt:null,p=d?d===Mo?i.length:s.length:0);const g=d===Mo&&/\b(transform|all)(,|$)/.test(r(`${Mo}Property`).toString());return{type:d,timeout:u,propCount:p,hasTransform:g}}function ca(e,o){for(;e.lengthda(t)+da(e[r])))}function da(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Kn(){return document.body.offsetHeight}function ef(e,o,t){const r=e[vt];r&&(o=(o?[o,...r]:[...r]).join(" ")),o==null?e.removeAttribute("class"):t?e.setAttribute("class",o):e.className=o}const Er=Symbol("_vod"),bs=Symbol("_vsh"),Wv={beforeMount(e,{value:o},{transition:t}){e[Er]=e.style.display==="none"?"":e.style.display,t&&o?t.beforeEnter(e):Dt(e,o)},mounted(e,{value:o},{transition:t}){t&&o&&t.enter(e)},updated(e,{value:o,oldValue:t},{transition:r}){!o!=!t&&(r?o?(r.beforeEnter(e),Dt(e,!0),r.enter(e)):r.leave(e,()=>{Dt(e,!1)}):Dt(e,o))},beforeUnmount(e,{value:o}){Dt(e,o)}};function Dt(e,o){e.style.display=o?e[Er]:"none",e[bs]=!o}const of=Symbol(""),tf=/(^|;)\s*display\s*:/;function rf(e,o,t){const r=e.style,n=ve(t);let i=!1;if(t&&!n){if(o)if(ve(o))for(const a of o.split(";")){const l=a.slice(0,a.indexOf(":")).trim();t[l]==null&&$r(r,l,"")}else for(const a in o)t[a]==null&&$r(r,a,"");for(const a in t)a==="display"&&(i=!0),$r(r,a,t[a])}else if(n){if(o!==t){const a=r[of];a&&(t+=";"+a),r.cssText=t,i=tf.test(t)}}else o&&e.removeAttribute("style");Er in e&&(e[Er]=i?r.display:"",e[bs]&&(r.display="none"))}const ua=/\s*!important$/;function $r(e,o,t){if(Y(t))t.forEach(r=>$r(e,o,r));else if(t==null&&(t=""),o.startsWith("--"))e.setProperty(o,t);else{const r=nf(e,o);ua.test(t)?e.setProperty(nt(r),t.replace(ua,""),"important"):e[r]=t}}const fa=["Webkit","Moz","ms"],Tn={};function nf(e,o){const t=Tn[o];if(t)return t;let r=zo(o);if(r!=="filter"&&r in e)return Tn[o]=r;r=el(r);for(let n=0;n$n||(cf.then(()=>$n=0),$n=Date.now());function uf(e,o){const t=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=t.attached)return;ro(ff(r,t.value),o,5,[r])};return t.value=e,t.attached=df(),t}function ff(e,o){if(Y(o)){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{t.call(e),e._stopped=!0},o.map(r=>n=>!n._stopped&&r&&r(n))}else return o}const Ca=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,pf=(e,o,t,r,n,i)=>{const a=n==="svg";o==="class"?ef(e,r,a):o==="style"?rf(e,t,r):Wr(o)?ai(o)||lf(e,o,t,r,i):(o[0]==="."?(o=o.slice(1),!0):o[0]==="^"?(o=o.slice(1),!1):hf(e,o,r,a))?(ma(e,o,r),!e.tagName.includes("-")&&(o==="value"||o==="checked"||o==="selected")&&ha(e,o,r,a,i,o!=="value")):e._isVueCE&&(/[A-Z]/.test(o)||!ve(r))?ma(e,zo(o),r,i,o):(o==="true-value"?e._trueValue=r:o==="false-value"&&(e._falseValue=r),ha(e,o,r,a))};function hf(e,o,t,r){if(r)return!!(o==="innerHTML"||o==="textContent"||o in e&&Ca(o)&&X(t));if(o==="spellcheck"||o==="draggable"||o==="translate"||o==="form"||o==="list"&&e.tagName==="INPUT"||o==="type"&&e.tagName==="TEXTAREA")return!1;if(o==="width"||o==="height"){const n=e.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return Ca(o)&&ve(t)?!1:o in e}const Cs=new WeakMap,xs=new WeakMap,Rr=Symbol("_moveCb"),xa=Symbol("_enterCb"),mf=e=>(delete e.props.mode,e),gf=mf({name:"TransitionGroup",props:we({},ps,{tag:String,moveClass:String}),setup(e,{slots:o}){const t=ss(),r=Dl();let n,i;return zl(()=>{if(!n.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!yf(n[0].el,t.vnode.el,a))return;n.forEach(Cf),n.forEach(xf);const l=n.filter(vf);Kn(),l.forEach(s=>{const c=s.el,d=c.style;co(c,a),d.transform=d.webkitTransform=d.transitionDuration="";const u=c[Rr]=p=>{p&&p.target!==c||(!p||/transform$/.test(p.propertyName))&&(c.removeEventListener("transitionend",u),c[Rr]=null,_o(c,a))};c.addEventListener("transitionend",u)})}),()=>{const a=ie(e),l=ms(a);let s=a.tag||Fe;if(n=[],i)for(let c=0;c{l.split(/\s+/).forEach(s=>s&&r.classList.remove(s))}),t.split(/\s+/).forEach(l=>l&&r.classList.add(l)),r.style.display="none";const i=o.nodeType===1?o:o.parentNode;i.appendChild(r);const{hasTransform:a}=gs(r);return i.removeChild(r),a}const va=e=>{const o=e.props["onUpdate:modelValue"]||!1;return Y(o)?t=>yr(o,t):o};function Sf(e){e.target.composing=!0}function ya(e){const o=e.target;o.composing&&(o.composing=!1,o.dispatchEvent(new Event("input")))}const In=Symbol("_assign"),jv={created(e,{modifiers:{lazy:o,trim:t,number:r}},n){e[In]=va(n);const i=r||n.props&&n.props.type==="number";ut(e,o?"change":"input",a=>{if(a.target.composing)return;let l=e.value;t&&(l=l.trim()),i&&(l=Dn(l)),e[In](l)}),t&&ut(e,"change",()=>{e.value=e.value.trim()}),o||(ut(e,"compositionstart",Sf),ut(e,"compositionend",ya),ut(e,"change",ya))},mounted(e,{value:o}){e.value=o??""},beforeUpdate(e,{value:o,oldValue:t,modifiers:{lazy:r,trim:n,number:i}},a){if(e[In]=va(a),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Dn(e.value):e.value,s=o??"";l!==s&&(document.activeElement===e&&e.type!=="range"&&(r&&o===t||n&&e.value.trim()===s)||(e.value=s))}},wf=["ctrl","shift","alt","meta"],Pf={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,o)=>wf.some(t=>e[`${t}Key`]&&!o.includes(t))},Nv=(e,o)=>{const t=e._withMods||(e._withMods={}),r=o.join(".");return t[r]||(t[r]=(n,...i)=>{for(let a=0;a{const o=$f().createApp(...e),{mount:t}=o;return o.mount=r=>{const n=Hf(r);if(!n)return;const i=o._component;!X(i)&&!i.render&&!i.template&&(i.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const a=t(n,!1,If(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},o};function If(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Hf(e){return ve(e)?document.querySelector(e):e}function Ff(e){let o=".",t="__",r="--",n;if(e){let h=e.blockPrefix;h&&(o=h),h=e.elementPrefix,h&&(t=h),h=e.modifierPrefix,h&&(r=h)}const i={install(h){n=h.c;const b=h.context;b.bem={},b.bem.b=null,b.bem.els=null}};function a(h){let b,y;return{before(C){b=C.bem.b,y=C.bem.els,C.bem.els=null},after(C){C.bem.b=b,C.bem.els=y},$({context:C,props:I}){return h=typeof h=="string"?h:h({context:C,props:I}),C.bem.b=h,`${(I==null?void 0:I.bPrefix)||o}${C.bem.b}`}}}function l(h){let b;return{before(y){b=y.bem.els},after(y){y.bem.els=b},$({context:y,props:C}){return h=typeof h=="string"?h:h({context:y,props:C}),y.bem.els=h.split(",").map(I=>I.trim()),y.bem.els.map(I=>`${(C==null?void 0:C.bPrefix)||o}${y.bem.b}${t}${I}`).join(", ")}}}function s(h){return{$({context:b,props:y}){h=typeof h=="string"?h:h({context:b,props:y});const C=h.split(",").map(v=>v.trim());function I(v){return C.map(L=>`&${(y==null?void 0:y.bPrefix)||o}${b.bem.b}${v!==void 0?`${t}${v}`:""}${r}${L}`).join(", ")}const E=b.bem.els;return E!==null?I(E[0]):I()}}}function c(h){return{$({context:b,props:y}){h=typeof h=="string"?h:h({context:b,props:y});const C=b.bem.els;return`&:not(${(y==null?void 0:y.bPrefix)||o}${b.bem.b}${C!==null&&C.length>0?`${t}${C[0]}`:""}${r}${h})`}}}return Object.assign(i,{cB:(...h)=>n(a(h[0]),h[1],h[2]),cE:(...h)=>n(l(h[0]),h[1],h[2]),cM:(...h)=>n(s(h[0]),h[1],h[2]),cNotM:(...h)=>n(c(h[0]),h[1],h[2])}),i}function Af(e){let o=0;for(let t=0;t{let n=Af(r);if(n){if(n===1){e.forEach(a=>{t.push(r.replace("&",a))});return}}else{e.forEach(a=>{t.push((a&&a+" ")+r)});return}let i=[r];for(;n--;){const a=[];i.forEach(l=>{e.forEach(s=>{a.push(l.replace("&",s))})}),i=a}i.forEach(a=>t.push(a))}),t}function _f(e,o){const t=[];return o.split(vs).forEach(r=>{e.forEach(n=>{t.push((n&&n+" ")+r)})}),t}function Ef(e){let o=[""];return e.forEach(t=>{t=t&&t.trim(),t&&(t.includes("&")?o=Df(o,t):o=_f(o,t))}),o.join(", ").replace(Mf," ")}function wa(e){if(!e)return;const o=e.parentElement;o&&o.removeChild(e)}function rn(e,o){return(o??document.head).querySelector(`style[cssr-id="${e}"]`)}function Rf(e){const o=document.createElement("style");return o.setAttribute("cssr-id",e),o}function br(e){return e?/^\s*@(s|m)/.test(e):!1}const Lf=/[A-Z]/g;function ys(e){return e.replace(Lf,o=>"-"+o.toLowerCase())}function kf(e,o=" "){return typeof e=="object"&&e!==null?` { `+Object.entries(e).map(t=>o+` ${ys(t[0])}: ${t[1]};`).join(` `)+` -`+o+"}":`: ${e};`}function zf(e,o,t){return typeof e=="function"?e({context:o.context,props:t}):e}function Pa(e,o,t,r){if(!o)return"";const n=zf(o,t,r);if(!n)return"";if(typeof n=="string")return`${e} { +`+o+"}":`: ${e};`}function Of(e,o,t){return typeof e=="function"?e({context:o.context,props:t}):e}function Pa(e,o,t,r){if(!o)return"";const n=Of(o,t,r);if(!n)return"";if(typeof n=="string")return`${e} { ${n} }`;const i=Object.keys(n);if(i.length===0)return t.config.keepEmptyBlock?e+` { }`:"";const a=e?[e+" {"]:[];return i.forEach(l=>{const s=n[l];if(l==="raw"){a.push(` `+s+` `);return}l=ys(l),s!=null&&a.push(` ${l}${kf(s)}`)}),e&&a.push("}"),a.join(` -`)}function Yn(e,o,t){e&&e.forEach(r=>{if(Array.isArray(r))Yn(r,o,t);else if(typeof r=="function"){const n=r(o);Array.isArray(n)?Yn(n,o,t):n&&t(n)}else r&&t(r)})}function Ss(e,o,t,r,n){const i=e.$;let a="";if(!i||typeof i=="string")br(i)?a=i:o.push(i);else if(typeof i=="function"){const c=i({context:r.context,props:n});br(c)?a=c:o.push(c)}else if(i.before&&i.before(r.context),!i.$||typeof i.$=="string")br(i.$)?a=i.$:o.push(i.$);else if(i.$){const c=i.$({context:r.context,props:n});br(c)?a=c:o.push(c)}const l=Ef(o),s=Pa(l,e.props,r,n);a?t.push(`${a} {`):s.length&&t.push(s),e.children&&Yn(e.children,{context:r.context,props:n},c=>{if(typeof c=="string"){const d=Pa(l,{raw:c},r,n);t.push(d)}else Ss(c,o,t,r,n)}),o.pop(),a&&t.push("}"),i&&i.after&&i.after(r.context)}function Of(e,o,t){const r=[];return Ss(e,[],r,o,t),r.join(` +`)}function Yn(e,o,t){e&&e.forEach(r=>{if(Array.isArray(r))Yn(r,o,t);else if(typeof r=="function"){const n=r(o);Array.isArray(n)?Yn(n,o,t):n&&t(n)}else r&&t(r)})}function Ss(e,o,t,r,n){const i=e.$;let a="";if(!i||typeof i=="string")br(i)?a=i:o.push(i);else if(typeof i=="function"){const c=i({context:r.context,props:n});br(c)?a=c:o.push(c)}else if(i.before&&i.before(r.context),!i.$||typeof i.$=="string")br(i.$)?a=i.$:o.push(i.$);else if(i.$){const c=i.$({context:r.context,props:n});br(c)?a=c:o.push(c)}const l=Ef(o),s=Pa(l,e.props,r,n);a?t.push(`${a} {`):s.length&&t.push(s),e.children&&Yn(e.children,{context:r.context,props:n},c=>{if(typeof c=="string"){const d=Pa(l,{raw:c},r,n);t.push(d)}else Ss(c,o,t,r,n)}),o.pop(),a&&t.push("}"),i&&i.after&&i.after(r.context)}function zf(e,o,t){const r=[];return Ss(e,[],r,o,t),r.join(` -`)}function Zt(e){for(var o=0,t,r=0,n=e.length;n>=4;++r,n-=4)t=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,o=(t&65535)*1540483477+((t>>>16)*59797<<16)^(o&65535)*1540483477+((o>>>16)*59797<<16);switch(n){case 3:o^=(e.charCodeAt(r+2)&255)<<16;case 2:o^=(e.charCodeAt(r+1)&255)<<8;case 1:o^=e.charCodeAt(r)&255,o=(o&65535)*1540483477+((o>>>16)*59797<<16)}return o^=o>>>13,o=(o&65535)*1540483477+((o>>>16)*59797<<16),((o^o>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function Bf(e,o,t,r){const{els:n}=o;if(t===void 0)n.forEach(wa),o.els=[];else{const i=rn(t,r);i&&n.includes(i)&&(wa(i),o.els=n.filter(a=>a!==i))}}function Ta(e,o){e.push(o)}function Wf(e,o,t,r,n,i,a,l,s){let c;if(t===void 0&&(c=o.render(r),t=Zt(c)),s){s.adapter(t,c??o.render(r));return}l===void 0&&(l=document.head);const d=rn(t,l);if(d!==null&&!i)return d;const u=d??Rf(t);if(c===void 0&&(c=o.render(r)),u.textContent=c,d!==null)return d;if(a){const p=l.querySelector(`meta[name="${a}"]`);if(p)return l.insertBefore(u,p),Ta(o.els,u),u}return n?l.insertBefore(u,l.querySelector("style, link")):l.appendChild(u),Ta(o.els,u),u}function jf(e){return Of(this,this.instance,e)}function Nf(e={}){const{id:o,ssr:t,props:r,head:n=!1,force:i=!1,anchorMetaName:a,parent:l}=e;return Wf(this.instance,this,o,r,n,i,a,l,t)}function Vf(e={}){const{id:o,parent:t}=e;Bf(this.instance,this,o,t)}const Cr=function(e,o,t,r){return{instance:e,$:o,props:t,children:r,els:[],render:jf,mount:Nf,unmount:Vf}},Uf=function(e,o,t,r){return Array.isArray(o)?Cr(e,{$:null},null,o):Array.isArray(t)?Cr(e,o,null,t):Array.isArray(r)?Cr(e,o,t,r):Cr(e,o,t,null)};function Gf(e={}){const o={c:(...t)=>Uf(o,...t),use:(t,...r)=>t.install(o,...r),find:rn,context:{},config:e};return o}function qf(e,o){if(e===void 0)return!1;if(o){const{context:{ids:t}}=o;return t.has(e)}return rn(e)!==null}const Kf="n",Qt=`.${Kf}-`,Yf="__",Jf="--",ws=Gf(),Ps=Ff({blockPrefix:Qt,elementPrefix:Yf,modifierPrefix:Jf});ws.use(Ps);const{c:Q,find:Uv}=ws,{cB:to,cE:be,cM:Se,cNotM:Jn}=Ps;function Gv(e){return Q(({props:{bPrefix:o}})=>`${o||Qt}modal, ${o||Qt}drawer`,[e])}function qv(e){return Q(({props:{bPrefix:o}})=>`${o||Qt}popover`,[e])}function Kv(e){return Q(({props:{bPrefix:o}})=>`&${o||Qt}modal`,e)}const Yv=(...e)=>Q(">",[to(...e)]);function Z(e,o){return e+(o==="default"?"":o.replace(/^[a-z]/,t=>t.toUpperCase()))}function Jv(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function Zv(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function Qv(e,o){const t=e.trim().split(/\s+/g),r={top:t[0]};switch(t.length){case 1:r.right=t[0],r.bottom=t[0],r.left=t[0];break;case 2:r.right=t[1],r.left=t[1],r.bottom=t[0];break;case 3:r.right=t[1],r.bottom=t[2],r.left=t[1];break;case 4:r.right=t[1],r.bottom=t[2],r.left=t[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return o===void 0?r:r[o]}function Xv(e,o){const[t,r]=e.split(" ");return{row:t,col:r||t}}const $a={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#0FF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000",blanchedalmond:"#FFEBCD",blue:"#00F",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#0FF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#F0F",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#0F0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#F0F",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#F00",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFF",whitesmoke:"#F5F5F5",yellow:"#FF0",yellowgreen:"#9ACD32",transparent:"#0000"};function Zf(e,o,t){o/=100,t/=100;let r=(n,i=(n+e/60)%6)=>t-t*o*Math.max(Math.min(i,4-i,1),0);return[r(5)*255,r(3)*255,r(1)*255]}function Qf(e,o,t){o/=100,t/=100;let r=o*Math.min(t,1-t),n=(i,a=(i+e/30)%12)=>t-r*Math.max(Math.min(a-3,9-a,1),-1);return[n(0)*255,n(8)*255,n(4)*255]}const go="^\\s*",bo="\\s*$",Wo="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",Ye="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",Zo="([0-9A-Fa-f])",Qo="([0-9A-Fa-f]{2})",Ts=new RegExp(`${go}hsl\\s*\\(${Ye},${Wo},${Wo}\\)${bo}`),$s=new RegExp(`${go}hsv\\s*\\(${Ye},${Wo},${Wo}\\)${bo}`),Is=new RegExp(`${go}hsla\\s*\\(${Ye},${Wo},${Wo},${Ye}\\)${bo}`),Hs=new RegExp(`${go}hsva\\s*\\(${Ye},${Wo},${Wo},${Ye}\\)${bo}`),Xf=new RegExp(`${go}rgb\\s*\\(${Ye},${Ye},${Ye}\\)${bo}`),ep=new RegExp(`${go}rgba\\s*\\(${Ye},${Ye},${Ye},${Ye}\\)${bo}`),op=new RegExp(`${go}#${Zo}${Zo}${Zo}${bo}`),tp=new RegExp(`${go}#${Qo}${Qo}${Qo}${bo}`),rp=new RegExp(`${go}#${Zo}${Zo}${Zo}${Zo}${bo}`),np=new RegExp(`${go}#${Qo}${Qo}${Qo}${Qo}${bo}`);function Oe(e){return parseInt(e,16)}function ip(e){try{let o;if(o=Is.exec(e))return[Lr(o[1]),ko(o[5]),ko(o[9]),et(o[13])];if(o=Ts.exec(e))return[Lr(o[1]),ko(o[5]),ko(o[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(o){throw o}}function ap(e){try{let o;if(o=Hs.exec(e))return[Lr(o[1]),ko(o[5]),ko(o[9]),et(o[13])];if(o=$s.exec(e))return[Lr(o[1]),ko(o[5]),ko(o[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(o){throw o}}function $o(e){try{let o;if(o=tp.exec(e))return[Oe(o[1]),Oe(o[2]),Oe(o[3]),1];if(o=Xf.exec(e))return[Ae(o[1]),Ae(o[5]),Ae(o[9]),1];if(o=ep.exec(e))return[Ae(o[1]),Ae(o[5]),Ae(o[9]),et(o[13])];if(o=op.exec(e))return[Oe(o[1]+o[1]),Oe(o[2]+o[2]),Oe(o[3]+o[3]),1];if(o=np.exec(e))return[Oe(o[1]),Oe(o[2]),Oe(o[3]),et(Oe(o[4])/255)];if(o=rp.exec(e))return[Oe(o[1]+o[1]),Oe(o[2]+o[2]),Oe(o[3]+o[3]),et(Oe(o[4]+o[4])/255)];if(e in $a)return $o($a[e]);if(Ts.test(e)||Is.test(e)){const[t,r,n,i]=ip(e);return[...Qf(t,r,n),i]}else if($s.test(e)||Hs.test(e)){const[t,r,n,i]=ap(e);return[...Zf(t,r,n),i]}throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(o){throw o}}function lp(e){return e>1?1:e<0?0:e}function Zn(e,o,t,r){return`rgba(${Ae(e)}, ${Ae(o)}, ${Ae(t)}, ${lp(r)})`}function Hn(e,o,t,r,n){return Ae((e*o*(1-r)+t*r)/n)}function B(e,o){Array.isArray(e)||(e=$o(e)),Array.isArray(o)||(o=$o(o));const t=e[3],r=o[3],n=et(t+r-t*r);return Zn(Hn(e[0],t,o[0],r,n),Hn(e[1],t,o[1],r,n),Hn(e[2],t,o[2],r,n),n)}function _(e,o){const[t,r,n,i=1]=Array.isArray(e)?e:$o(e);return typeof o.alpha=="number"?Zn(t,r,n,o.alpha):Zn(t,r,n,i)}function ye(e,o){const[t,r,n,i=1]=Array.isArray(e)?e:$o(e),{lightness:a=1,alpha:l=1}=o;return sp([t*a,r*a,n*a,i*l])}function et(e){const o=Math.round(Number(e)*100)/100;return o>1?1:o<0?0:o}function Lr(e){const o=Math.round(Number(e));return o>=360||o<0?0:o}function Ae(e){const o=Math.round(Number(e));return o>255?255:o<0?0:o}function ko(e){const o=Math.round(Number(e));return o>100?100:o<0?0:o}function sp(e){const[o,t,r]=e;return 3 in e?`rgba(${Ae(o)}, ${Ae(t)}, ${Ae(r)}, ${et(e[3])})`:`rgba(${Ae(o)}, ${Ae(t)}, ${Ae(r)}, 1)`}function cp(e=8){return Math.random().toString(16).slice(2,2+e)}function ey(e,o){const t=[];for(let r=0;r{t.value=r}),typeof e=="function"?t:{__v_isRef:!0,get value(){return t.value},set value(r){e.set(r)}}}function dp(){const e=Be(!1);return Qr(()=>{e.value=!0}),gi(e)}function oy(e){return e}const nn=typeof document<"u"&&typeof window<"u",up="@css-render/vue3-ssr";function fp(e,o){return``}function pp(e,o,t){const{styles:r,ids:n}=t;n.has(e)||r!==null&&(n.add(e),r.push(fp(e,o)))}const hp=typeof document<"u";function an(){if(hp)return;const e=Ee(up,null);if(e!==null)return{adapter:(o,t)=>pp(o,t,e),context:e}}function Ia(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}function mp(e,o){console.error(`[naive/${e}]: ${o}`)}function gp(e,o){throw new Error(`[naive/${e}]: ${o}`)}function Fs(e,...o){if(Array.isArray(e))e.forEach(t=>Fs(t,...o));else return e(...o)}function bp(e,o=[],t){const r={};return Object.getOwnPropertyNames(e).forEach(i=>{o.includes(i)||(r[i]=e[i])}),Object.assign(r,t)}function Cp(e,...o){return typeof e=="function"?e(...o):typeof e=="string"?Un(e):typeof e=="number"?Un(String(e)):null}function rr(e){return e.some(o=>xt(o)?!(o.type===Me||o.type===Fe&&!rr(o.children)):!0)?e:null}function ty(e,o){return e&&rr(e())||o()}function ry(e,o,t){return e&&rr(e(o))||t(o)}function Ha(e,o){const t=e&&rr(e());return o(t||null)}function xp(e){return!(e&&rr(e()))}const Io="n-config-provider",kr="n";function Ti(e={},o={defaultBordered:!0}){const t=Ee(Io,null);return{inlineThemeDisabled:t==null?void 0:t.inlineThemeDisabled,mergedRtlRef:t==null?void 0:t.mergedRtlRef,mergedComponentPropsRef:t==null?void 0:t.mergedComponentPropsRef,mergedBreakpointsRef:t==null?void 0:t.mergedBreakpointsRef,mergedBorderedRef:de(()=>{var r,n;const{bordered:i}=e;return i!==void 0?i:(n=(r=t==null?void 0:t.mergedBorderedRef.value)!==null&&r!==void 0?r:o.defaultBordered)!==null&&n!==void 0?n:!0}),mergedClsPrefixRef:t?t.mergedClsPrefixRef:xl(kr),namespaceRef:de(()=>t==null?void 0:t.mergedNamespaceRef.value)}}function ny(){const e=Ee(Io,null);return e?e.mergedClsPrefixRef:xl(kr)}function As(e,o,t,r){t||gp("useThemeClass","cssVarsRef is not passed");const n=Ee(Io,null),i=n==null?void 0:n.mergedThemeHashRef,a=n==null?void 0:n.styleMountTarget,l=Be(""),s=an();let c;const d=`__${e}`,u=()=>{let p=d;const g=o?o.value:void 0,h=i==null?void 0:i.value;h&&(p+=`-${h}`),g&&(p+=`-${g}`);const{themeOverrides:b,builtinThemeOverrides:y}=r;b&&(p+=`-${Zt(JSON.stringify(b))}`),y&&(p+=`-${Zt(JSON.stringify(y))}`),l.value=p,c=()=>{const C=t.value;let I="";for(const E in C)I+=`${E}: ${C[E]};`;Q(`.${p}`,I).mount({id:p,ssr:s,parent:a}),c=void 0}};return os(()=>{u()}),{themeClass:l,onRender:()=>{c==null||c()}}}const Fa="n-form-item";function vp(e,{defaultSize:o="medium",mergedSize:t,mergedDisabled:r}={}){const n=Ee(Fa,null);Kt(Fa,null);const i=de(t?()=>t(n):()=>{const{size:s}=e;if(s)return s;if(n){const{mergedSize:c}=n;if(c.value!==void 0)return c.value}return o}),a=de(r?()=>r(n):()=>{const{disabled:s}=e;return s!==void 0?s:n?n.disabled.value:!1}),l=de(()=>{const{status:s}=e;return s||(n==null?void 0:n.mergedValidationStatus.value)});return Xr(()=>{n&&n.restoreValidation()}),{mergedSizeRef:i,mergedDisabledRef:a,mergedStatusRef:l,nTriggerFormBlur(){n&&n.handleContentBlur()},nTriggerFormChange(){n&&n.handleContentChange()},nTriggerFormFocus(){n&&n.handleContentFocus()},nTriggerFormInput(){n&&n.handleContentInput()}}}const yp={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}},Sp={name:"zh-CN",global:{undo:"撤销",redo:"重做",confirm:"确认",clear:"清除"},Popconfirm:{positiveText:"确认",negativeText:"取消"},Cascader:{placeholder:"请选择",loading:"加载中",loadingRequiredMessage:e=>`加载全部 ${e} 的子节点后才可选中`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy年",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w周",clear:"清除",now:"此刻",confirm:"确认",selectTime:"选择时间",selectDate:"选择日期",datePlaceholder:"选择日期",datetimePlaceholder:"选择日期时间",monthPlaceholder:"选择月份",yearPlaceholder:"选择年份",quarterPlaceholder:"选择季度",weekPlaceholder:"选择周",startDatePlaceholder:"开始日期",endDatePlaceholder:"结束日期",startDatetimePlaceholder:"开始日期时间",endDatetimePlaceholder:"结束日期时间",startMonthPlaceholder:"开始月份",endMonthPlaceholder:"结束月份",monthBeforeYear:!1,firstDayOfWeek:0,today:"今天"},DataTable:{checkTableAll:"选择全部表格数据",uncheckTableAll:"取消选择全部表格数据",confirm:"确认",clear:"重置"},LegacyTransfer:{sourceTitle:"源项",targetTitle:"目标项"},Transfer:{selectAll:"全选",clearAll:"清除",unselectAll:"取消全选",total:e=>`共 ${e} 项`,selected:e=>`已选 ${e} 项`},Empty:{description:"无数据"},Select:{placeholder:"请选择"},TimePicker:{placeholder:"请选择时间",positiveText:"确认",negativeText:"取消",now:"此刻",clear:"清除"},Pagination:{goto:"跳至",selectionSuffix:"页"},DynamicTags:{add:"添加"},Log:{loading:"加载中"},Input:{placeholder:"请输入"},InputNumber:{placeholder:"请输入"},DynamicInput:{create:"添加"},ThemeEditor:{title:"主题编辑器",clearAllVars:"清除全部变量",clearSearch:"清除搜索",filterCompName:"过滤组件名",filterVarName:"过滤变量名",import:"导入",export:"导出",restore:"恢复默认"},Image:{tipPrevious:"上一张(←)",tipNext:"下一张(→)",tipCounterclockwise:"向左旋转",tipClockwise:"向右旋转",tipZoomOut:"缩小",tipZoomIn:"放大",tipDownload:"下载",tipClose:"关闭(Esc)",tipOriginalSize:"缩放到原始尺寸"}};function Ct(e){return(o={})=>{const t=o.width?String(o.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}function po(e){return(o,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let n;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=t!=null&&t.width?String(t.width):a;n=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=t!=null&&t.width?String(t.width):e.defaultWidth;n=e.values[l]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(o):o;return n[i]}}function ho(e){return(o,t={})=>{const r=t.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=o.match(n);if(!i)return null;const a=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?Pp(l,u=>u.test(a)):wp(l,u=>u.test(a));let c;c=e.valueCallback?e.valueCallback(s):s,c=t.valueCallback?t.valueCallback(c):c;const d=o.slice(a.length);return{value:c,rest:d}}}function wp(e,o){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&o(e[t]))return t}function Pp(e,o){for(let t=0;t{const r=o.match(e.matchPattern);if(!r)return null;const n=r[0],i=o.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=t.valueCallback?t.valueCallback(a):a;const l=o.slice(n.length);return{value:a,rest:l}}}function Tp(e){const o=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&o==="[object Date]"?new e.constructor(+e):typeof e=="number"||o==="[object Number]"||typeof e=="string"||o==="[object String]"?new Date(e):new Date(NaN)}let $p={};function Ip(){return $p}function Aa(e,o){var l,s,c,d;const t=Ip(),r=(o==null?void 0:o.weekStartsOn)??((s=(l=o==null?void 0:o.locale)==null?void 0:l.options)==null?void 0:s.weekStartsOn)??t.weekStartsOn??((d=(c=t.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,n=Tp(e),i=n.getDay(),a=(i{let r;const n=Fp[e];return typeof n=="string"?r=n:o===1?r=n.one:r=n.other.replace("{{count}}",o.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r},Mp={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Dp=(e,o,t,r)=>Mp[e],_p={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ep={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Rp={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Lp={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},kp={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},zp={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Op=(e,o)=>{const t=Number(e),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},Bp={ordinalNumber:Op,era:po({values:_p,defaultWidth:"wide"}),quarter:po({values:Ep,defaultWidth:"wide",argumentCallback:e=>e-1}),month:po({values:Rp,defaultWidth:"wide"}),day:po({values:Lp,defaultWidth:"wide"}),dayPeriod:po({values:kp,defaultWidth:"wide",formattingValues:zp,defaultFormattingWidth:"wide"})},Wp=/^(\d+)(th|st|nd|rd)?/i,jp=/\d+/i,Np={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Vp={any:[/^b/i,/^(a|c)/i]},Up={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gp={any:[/1/i,/2/i,/3/i,/4/i]},qp={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Kp={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Yp={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Jp={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Zp={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Qp={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Xp={ordinalNumber:Ms({matchPattern:Wp,parsePattern:jp,valueCallback:e=>parseInt(e,10)}),era:ho({matchPatterns:Np,defaultMatchWidth:"wide",parsePatterns:Vp,defaultParseWidth:"any"}),quarter:ho({matchPatterns:Up,defaultMatchWidth:"wide",parsePatterns:Gp,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ho({matchPatterns:qp,defaultMatchWidth:"wide",parsePatterns:Kp,defaultParseWidth:"any"}),day:ho({matchPatterns:Yp,defaultMatchWidth:"wide",parsePatterns:Jp,defaultParseWidth:"any"}),dayPeriod:ho({matchPatterns:Zp,defaultMatchWidth:"any",parsePatterns:Qp,defaultParseWidth:"any"})},eh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},oh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},th={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},rh={date:Ct({formats:eh,defaultWidth:"full"}),time:Ct({formats:oh,defaultWidth:"full"}),dateTime:Ct({formats:th,defaultWidth:"full"})},nh={code:"en-US",formatDistance:Ap,formatLong:rh,formatRelative:Dp,localize:Bp,match:Xp,options:{weekStartsOn:0,firstWeekContainsDate:1}},ih={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},ah=(e,o,t)=>{let r;const n=ih[e];return typeof n=="string"?r=n:o===1?r=n.one:r=n.other.replace("{{count}}",String(o)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?r+"内":r+"前":r},lh={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},sh={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},ch={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},dh={date:Ct({formats:lh,defaultWidth:"full"}),time:Ct({formats:sh,defaultWidth:"full"}),dateTime:Ct({formats:ch,defaultWidth:"full"})};function Ma(e,o,t){const r="eeee p";return Hp(e,o,t)?r:e.getTime()>o.getTime()?"'下个'"+r:"'上个'"+r}const uh={lastWeek:Ma,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:Ma,other:"PP p"},fh=(e,o,t,r)=>{const n=uh[e];return typeof n=="function"?n(o,t,r):n},ph={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},hh={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},mh={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},gh={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},bh={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},Ch={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},xh=(e,o)=>{const t=Number(e);switch(o==null?void 0:o.unit){case"date":return t.toString()+"日";case"hour":return t.toString()+"时";case"minute":return t.toString()+"分";case"second":return t.toString()+"秒";default:return"第 "+t.toString()}},vh={ordinalNumber:xh,era:po({values:ph,defaultWidth:"wide"}),quarter:po({values:hh,defaultWidth:"wide",argumentCallback:e=>e-1}),month:po({values:mh,defaultWidth:"wide"}),day:po({values:gh,defaultWidth:"wide"}),dayPeriod:po({values:bh,defaultWidth:"wide",formattingValues:Ch,defaultFormattingWidth:"wide"})},yh=/^(第\s*)?\d+(日|时|分|秒)?/i,Sh=/\d+/i,wh={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},Ph={any:[/^(前)/i,/^(公元)/i]},Th={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},$h={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},Ih={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},Hh={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},Fh={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},Ah={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},Mh={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},Dh={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},_h={ordinalNumber:Ms({matchPattern:yh,parsePattern:Sh,valueCallback:e=>parseInt(e,10)}),era:ho({matchPatterns:wh,defaultMatchWidth:"wide",parsePatterns:Ph,defaultParseWidth:"any"}),quarter:ho({matchPatterns:Th,defaultMatchWidth:"wide",parsePatterns:$h,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ho({matchPatterns:Ih,defaultMatchWidth:"wide",parsePatterns:Hh,defaultParseWidth:"any"}),day:ho({matchPatterns:Fh,defaultMatchWidth:"wide",parsePatterns:Ah,defaultParseWidth:"any"}),dayPeriod:ho({matchPatterns:Mh,defaultMatchWidth:"any",parsePatterns:Dh,defaultParseWidth:"any"})},Eh={code:"zh-CN",formatDistance:ah,formatLong:dh,formatRelative:fh,localize:vh,match:_h,options:{weekStartsOn:1,firstWeekContainsDate:4}},Rh={name:"en-US",locale:nh},Lh={name:"zh-CN",locale:Eh};var Ds=typeof global=="object"&&global&&global.Object===Object&&global,kh=typeof self=="object"&&self&&self.Object===Object&&self,St=Ds||kh||Function("return this")(),yt=St.Symbol,_s=Object.prototype,zh=_s.hasOwnProperty,Oh=_s.toString,_t=yt?yt.toStringTag:void 0;function Bh(e){var o=zh.call(e,_t),t=e[_t];try{e[_t]=void 0;var r=!0}catch{}var n=Oh.call(e);return r&&(o?e[_t]=t:delete e[_t]),n}var Wh=Object.prototype,jh=Wh.toString;function Nh(e){return jh.call(e)}var Vh="[object Null]",Uh="[object Undefined]",Da=yt?yt.toStringTag:void 0;function nr(e){return e==null?e===void 0?Uh:Vh:Da&&Da in Object(e)?Bh(e):Nh(e)}function wt(e){return e!=null&&typeof e=="object"}var Gh="[object Symbol]";function qh(e){return typeof e=="symbol"||wt(e)&&nr(e)==Gh}function Kh(e,o){for(var t=-1,r=e==null?0:e.length,n=Array(r);++t0){if(++o>=mm)return arguments[0]}else o=0;return e.apply(void 0,arguments)}}function xm(e){return function(){return e}}var Or=function(){try{var e=Ii(Object,"defineProperty");return e({},"",{}),e}catch{}}(),vm=Or?function(e,o){return Or(e,"toString",{configurable:!0,enumerable:!1,value:xm(o),writable:!0})}:Rs,ym=Cm(vm),Sm=9007199254740991,wm=/^(?:0|[1-9]\d*)$/;function Ls(e,o){var t=typeof e;return o=o??Sm,!!o&&(t=="number"||t!="symbol"&&wm.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Am}function Fi(e){return e!=null&&ks(e.length)&&!$i(e)}function Mm(e,o,t){if(!it(t))return!1;var r=typeof o;return(r=="number"?Fi(t)&&Ls(o,t.length):r=="string"&&o in t)?ln(t[o],e):!1}function Dm(e){return Fm(function(o,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,a=n>2?t[2]:void 0;for(i=e.length>3&&typeof i=="function"?(n--,i):void 0,a&&Mm(t[0],t[1],a)&&(i=n<3?void 0:i,n=1),o=Object(o);++r-1}function Og(e,o){var t=this.__data__,r=sn(t,e);return r<0?(++this.size,t.push([e,o])):t[r][1]=o,this}function Ao(e){var o=-1,t=e==null?0:e.length;for(this.clear();++on?0:n+o),t=t>n?n:t,t<0&&(t+=n),n=o>t?0:t-o>>>0,o>>>=0;for(var i=Array(n);++r=r?e:Xg(e,o,t)}var ob="\\ud800-\\udfff",tb="\\u0300-\\u036f",rb="\\ufe20-\\ufe2f",nb="\\u20d0-\\u20ff",ib=tb+rb+nb,ab="\\ufe0e\\ufe0f",lb="\\u200d",sb=RegExp("["+lb+ob+ib+ab+"]");function Ks(e){return sb.test(e)}function cb(e){return e.split("")}var Ys="\\ud800-\\udfff",db="\\u0300-\\u036f",ub="\\ufe20-\\ufe2f",fb="\\u20d0-\\u20ff",pb=db+ub+fb,hb="\\ufe0e\\ufe0f",mb="["+Ys+"]",ei="["+pb+"]",oi="\\ud83c[\\udffb-\\udfff]",gb="(?:"+ei+"|"+oi+")",Js="[^"+Ys+"]",Zs="(?:\\ud83c[\\udde6-\\uddff]){2}",Qs="[\\ud800-\\udbff][\\udc00-\\udfff]",bb="\\u200d",Xs=gb+"?",ec="["+hb+"]?",Cb="(?:"+bb+"(?:"+[Js,Zs,Qs].join("|")+")"+ec+Xs+")*",xb=ec+Xs+Cb,vb="(?:"+[Js+ei+"?",ei,Zs,Qs,mb].join("|")+")",yb=RegExp(oi+"(?="+oi+")|"+vb+xb,"g");function Sb(e){return e.match(yb)||[]}function wb(e){return Ks(e)?Sb(e):cb(e)}function Pb(e){return function(o){o=Gg(o);var t=Ks(o)?wb(o):void 0,r=t?t[0]:o.charAt(0),n=t?eb(t,1).join(""):o.slice(1);return r[e]()+n}}var Tb=Pb("toUpperCase");function $b(){this.__data__=new Ao,this.size=0}function Ib(e){var o=this.__data__,t=o.delete(e);return this.size=o.size,t}function Hb(e){return this.__data__.get(e)}function Fb(e){return this.__data__.has(e)}var Ab=200;function Mb(e,o){var t=this.__data__;if(t instanceof Ao){var r=t.__data__;if(!Us||r.length{const{value:l}=o;if(!l)return;const s=l[e];if(s)return s}),i=Ee(Io,null),a=()=>{os(()=>{const{value:l}=t,s=`${l}${e}Rtl`;if(qf(s,r))return;const{value:c}=n;c&&c.style.mount({id:s,head:!0,anchorMetaName:er,props:{bPrefix:l?`.${l}-`:void 0},ssr:r,parent:i==null?void 0:i.styleMountTarget})})};return r?a():Zr(a),n}const $t={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:jb,fontFamily:Nb,lineHeight:Vb}=$t,nc=Q("body",` +`}function pp(e,o,t){const{styles:r,ids:n}=t;n.has(e)||r!==null&&(n.add(e),r.push(fp(e,o)))}const hp=typeof document<"u";function an(){if(hp)return;const e=Ee(up,null);if(e!==null)return{adapter:(o,t)=>pp(o,t,e),context:e}}function Ia(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}function mp(e,o){console.error(`[naive/${e}]: ${o}`)}function gp(e,o){throw new Error(`[naive/${e}]: ${o}`)}function Fs(e,...o){if(Array.isArray(e))e.forEach(t=>Fs(t,...o));else return e(...o)}function bp(e,o=[],t){const r={};return Object.getOwnPropertyNames(e).forEach(i=>{o.includes(i)||(r[i]=e[i])}),Object.assign(r,t)}function Cp(e,...o){return typeof e=="function"?e(...o):typeof e=="string"?Un(e):typeof e=="number"?Un(String(e)):null}function rr(e){return e.some(o=>xt(o)?!(o.type===Me||o.type===Fe&&!rr(o.children)):!0)?e:null}function ty(e,o){return e&&rr(e())||o()}function ry(e,o,t){return e&&rr(e(o))||t(o)}function Ha(e,o){const t=e&&rr(e());return o(t||null)}function xp(e){return!(e&&rr(e()))}const Io="n-config-provider",kr="n";function Ti(e={},o={defaultBordered:!0}){const t=Ee(Io,null);return{inlineThemeDisabled:t==null?void 0:t.inlineThemeDisabled,mergedRtlRef:t==null?void 0:t.mergedRtlRef,mergedComponentPropsRef:t==null?void 0:t.mergedComponentPropsRef,mergedBreakpointsRef:t==null?void 0:t.mergedBreakpointsRef,mergedBorderedRef:de(()=>{var r,n;const{bordered:i}=e;return i!==void 0?i:(n=(r=t==null?void 0:t.mergedBorderedRef.value)!==null&&r!==void 0?r:o.defaultBordered)!==null&&n!==void 0?n:!0}),mergedClsPrefixRef:t?t.mergedClsPrefixRef:xl(kr),namespaceRef:de(()=>t==null?void 0:t.mergedNamespaceRef.value)}}function ny(){const e=Ee(Io,null);return e?e.mergedClsPrefixRef:xl(kr)}function As(e,o,t,r){t||gp("useThemeClass","cssVarsRef is not passed");const n=Ee(Io,null),i=n==null?void 0:n.mergedThemeHashRef,a=n==null?void 0:n.styleMountTarget,l=Be(""),s=an();let c;const d=`__${e}`,u=()=>{let p=d;const g=o?o.value:void 0,h=i==null?void 0:i.value;h&&(p+=`-${h}`),g&&(p+=`-${g}`);const{themeOverrides:b,builtinThemeOverrides:y}=r;b&&(p+=`-${Zt(JSON.stringify(b))}`),y&&(p+=`-${Zt(JSON.stringify(y))}`),l.value=p,c=()=>{const C=t.value;let I="";for(const E in C)I+=`${E}: ${C[E]};`;Q(`.${p}`,I).mount({id:p,ssr:s,parent:a}),c=void 0}};return os(()=>{u()}),{themeClass:l,onRender:()=>{c==null||c()}}}const Fa="n-form-item";function vp(e,{defaultSize:o="medium",mergedSize:t,mergedDisabled:r}={}){const n=Ee(Fa,null);Kt(Fa,null);const i=de(t?()=>t(n):()=>{const{size:s}=e;if(s)return s;if(n){const{mergedSize:c}=n;if(c.value!==void 0)return c.value}return o}),a=de(r?()=>r(n):()=>{const{disabled:s}=e;return s!==void 0?s:n?n.disabled.value:!1}),l=de(()=>{const{status:s}=e;return s||(n==null?void 0:n.mergedValidationStatus.value)});return Xr(()=>{n&&n.restoreValidation()}),{mergedSizeRef:i,mergedDisabledRef:a,mergedStatusRef:l,nTriggerFormBlur(){n&&n.handleContentBlur()},nTriggerFormChange(){n&&n.handleContentChange()},nTriggerFormFocus(){n&&n.handleContentFocus()},nTriggerFormInput(){n&&n.handleContentInput()}}}const yp={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}},Sp={name:"zh-CN",global:{undo:"撤销",redo:"重做",confirm:"确认",clear:"清除"},Popconfirm:{positiveText:"确认",negativeText:"取消"},Cascader:{placeholder:"请选择",loading:"加载中",loadingRequiredMessage:e=>`加载全部 ${e} 的子节点后才可选中`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy年",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w周",clear:"清除",now:"此刻",confirm:"确认",selectTime:"选择时间",selectDate:"选择日期",datePlaceholder:"选择日期",datetimePlaceholder:"选择日期时间",monthPlaceholder:"选择月份",yearPlaceholder:"选择年份",quarterPlaceholder:"选择季度",weekPlaceholder:"选择周",startDatePlaceholder:"开始日期",endDatePlaceholder:"结束日期",startDatetimePlaceholder:"开始日期时间",endDatetimePlaceholder:"结束日期时间",startMonthPlaceholder:"开始月份",endMonthPlaceholder:"结束月份",monthBeforeYear:!1,firstDayOfWeek:0,today:"今天"},DataTable:{checkTableAll:"选择全部表格数据",uncheckTableAll:"取消选择全部表格数据",confirm:"确认",clear:"重置"},LegacyTransfer:{sourceTitle:"源项",targetTitle:"目标项"},Transfer:{selectAll:"全选",clearAll:"清除",unselectAll:"取消全选",total:e=>`共 ${e} 项`,selected:e=>`已选 ${e} 项`},Empty:{description:"无数据"},Select:{placeholder:"请选择"},TimePicker:{placeholder:"请选择时间",positiveText:"确认",negativeText:"取消",now:"此刻",clear:"清除"},Pagination:{goto:"跳至",selectionSuffix:"页"},DynamicTags:{add:"添加"},Log:{loading:"加载中"},Input:{placeholder:"请输入"},InputNumber:{placeholder:"请输入"},DynamicInput:{create:"添加"},ThemeEditor:{title:"主题编辑器",clearAllVars:"清除全部变量",clearSearch:"清除搜索",filterCompName:"过滤组件名",filterVarName:"过滤变量名",import:"导入",export:"导出",restore:"恢复默认"},Image:{tipPrevious:"上一张(←)",tipNext:"下一张(→)",tipCounterclockwise:"向左旋转",tipClockwise:"向右旋转",tipZoomOut:"缩小",tipZoomIn:"放大",tipDownload:"下载",tipClose:"关闭(Esc)",tipOriginalSize:"缩放到原始尺寸"}};function Ct(e){return(o={})=>{const t=o.width?String(o.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}function po(e){return(o,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let n;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=t!=null&&t.width?String(t.width):a;n=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=t!=null&&t.width?String(t.width):e.defaultWidth;n=e.values[l]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(o):o;return n[i]}}function ho(e){return(o,t={})=>{const r=t.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=o.match(n);if(!i)return null;const a=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?Pp(l,u=>u.test(a)):wp(l,u=>u.test(a));let c;c=e.valueCallback?e.valueCallback(s):s,c=t.valueCallback?t.valueCallback(c):c;const d=o.slice(a.length);return{value:c,rest:d}}}function wp(e,o){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&o(e[t]))return t}function Pp(e,o){for(let t=0;t{const r=o.match(e.matchPattern);if(!r)return null;const n=r[0],i=o.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=t.valueCallback?t.valueCallback(a):a;const l=o.slice(n.length);return{value:a,rest:l}}}function Tp(e){const o=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&o==="[object Date]"?new e.constructor(+e):typeof e=="number"||o==="[object Number]"||typeof e=="string"||o==="[object String]"?new Date(e):new Date(NaN)}let $p={};function Ip(){return $p}function Aa(e,o){var l,s,c,d;const t=Ip(),r=(o==null?void 0:o.weekStartsOn)??((s=(l=o==null?void 0:o.locale)==null?void 0:l.options)==null?void 0:s.weekStartsOn)??t.weekStartsOn??((d=(c=t.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,n=Tp(e),i=n.getDay(),a=(i{let r;const n=Fp[e];return typeof n=="string"?r=n:o===1?r=n.one:r=n.other.replace("{{count}}",o.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r},Mp={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Dp=(e,o,t,r)=>Mp[e],_p={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ep={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Rp={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Lp={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},kp={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Op={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},zp=(e,o)=>{const t=Number(e),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},Bp={ordinalNumber:zp,era:po({values:_p,defaultWidth:"wide"}),quarter:po({values:Ep,defaultWidth:"wide",argumentCallback:e=>e-1}),month:po({values:Rp,defaultWidth:"wide"}),day:po({values:Lp,defaultWidth:"wide"}),dayPeriod:po({values:kp,defaultWidth:"wide",formattingValues:Op,defaultFormattingWidth:"wide"})},Wp=/^(\d+)(th|st|nd|rd)?/i,jp=/\d+/i,Np={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Vp={any:[/^b/i,/^(a|c)/i]},Up={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gp={any:[/1/i,/2/i,/3/i,/4/i]},qp={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Kp={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Yp={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Jp={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Zp={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Qp={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Xp={ordinalNumber:Ms({matchPattern:Wp,parsePattern:jp,valueCallback:e=>parseInt(e,10)}),era:ho({matchPatterns:Np,defaultMatchWidth:"wide",parsePatterns:Vp,defaultParseWidth:"any"}),quarter:ho({matchPatterns:Up,defaultMatchWidth:"wide",parsePatterns:Gp,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ho({matchPatterns:qp,defaultMatchWidth:"wide",parsePatterns:Kp,defaultParseWidth:"any"}),day:ho({matchPatterns:Yp,defaultMatchWidth:"wide",parsePatterns:Jp,defaultParseWidth:"any"}),dayPeriod:ho({matchPatterns:Zp,defaultMatchWidth:"any",parsePatterns:Qp,defaultParseWidth:"any"})},eh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},oh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},th={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},rh={date:Ct({formats:eh,defaultWidth:"full"}),time:Ct({formats:oh,defaultWidth:"full"}),dateTime:Ct({formats:th,defaultWidth:"full"})},nh={code:"en-US",formatDistance:Ap,formatLong:rh,formatRelative:Dp,localize:Bp,match:Xp,options:{weekStartsOn:0,firstWeekContainsDate:1}},ih={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},ah=(e,o,t)=>{let r;const n=ih[e];return typeof n=="string"?r=n:o===1?r=n.one:r=n.other.replace("{{count}}",String(o)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?r+"内":r+"前":r},lh={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},sh={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},ch={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},dh={date:Ct({formats:lh,defaultWidth:"full"}),time:Ct({formats:sh,defaultWidth:"full"}),dateTime:Ct({formats:ch,defaultWidth:"full"})};function Ma(e,o,t){const r="eeee p";return Hp(e,o,t)?r:e.getTime()>o.getTime()?"'下个'"+r:"'上个'"+r}const uh={lastWeek:Ma,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:Ma,other:"PP p"},fh=(e,o,t,r)=>{const n=uh[e];return typeof n=="function"?n(o,t,r):n},ph={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},hh={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},mh={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},gh={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},bh={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},Ch={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},xh=(e,o)=>{const t=Number(e);switch(o==null?void 0:o.unit){case"date":return t.toString()+"日";case"hour":return t.toString()+"时";case"minute":return t.toString()+"分";case"second":return t.toString()+"秒";default:return"第 "+t.toString()}},vh={ordinalNumber:xh,era:po({values:ph,defaultWidth:"wide"}),quarter:po({values:hh,defaultWidth:"wide",argumentCallback:e=>e-1}),month:po({values:mh,defaultWidth:"wide"}),day:po({values:gh,defaultWidth:"wide"}),dayPeriod:po({values:bh,defaultWidth:"wide",formattingValues:Ch,defaultFormattingWidth:"wide"})},yh=/^(第\s*)?\d+(日|时|分|秒)?/i,Sh=/\d+/i,wh={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},Ph={any:[/^(前)/i,/^(公元)/i]},Th={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},$h={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},Ih={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},Hh={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},Fh={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},Ah={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},Mh={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},Dh={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},_h={ordinalNumber:Ms({matchPattern:yh,parsePattern:Sh,valueCallback:e=>parseInt(e,10)}),era:ho({matchPatterns:wh,defaultMatchWidth:"wide",parsePatterns:Ph,defaultParseWidth:"any"}),quarter:ho({matchPatterns:Th,defaultMatchWidth:"wide",parsePatterns:$h,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ho({matchPatterns:Ih,defaultMatchWidth:"wide",parsePatterns:Hh,defaultParseWidth:"any"}),day:ho({matchPatterns:Fh,defaultMatchWidth:"wide",parsePatterns:Ah,defaultParseWidth:"any"}),dayPeriod:ho({matchPatterns:Mh,defaultMatchWidth:"any",parsePatterns:Dh,defaultParseWidth:"any"})},Eh={code:"zh-CN",formatDistance:ah,formatLong:dh,formatRelative:fh,localize:vh,match:_h,options:{weekStartsOn:1,firstWeekContainsDate:4}},Rh={name:"en-US",locale:nh},Lh={name:"zh-CN",locale:Eh};var Ds=typeof global=="object"&&global&&global.Object===Object&&global,kh=typeof self=="object"&&self&&self.Object===Object&&self,St=Ds||kh||Function("return this")(),yt=St.Symbol,_s=Object.prototype,Oh=_s.hasOwnProperty,zh=_s.toString,_t=yt?yt.toStringTag:void 0;function Bh(e){var o=Oh.call(e,_t),t=e[_t];try{e[_t]=void 0;var r=!0}catch{}var n=zh.call(e);return r&&(o?e[_t]=t:delete e[_t]),n}var Wh=Object.prototype,jh=Wh.toString;function Nh(e){return jh.call(e)}var Vh="[object Null]",Uh="[object Undefined]",Da=yt?yt.toStringTag:void 0;function nr(e){return e==null?e===void 0?Uh:Vh:Da&&Da in Object(e)?Bh(e):Nh(e)}function wt(e){return e!=null&&typeof e=="object"}var Gh="[object Symbol]";function qh(e){return typeof e=="symbol"||wt(e)&&nr(e)==Gh}function Kh(e,o){for(var t=-1,r=e==null?0:e.length,n=Array(r);++t0){if(++o>=mm)return arguments[0]}else o=0;return e.apply(void 0,arguments)}}function xm(e){return function(){return e}}var zr=function(){try{var e=Ii(Object,"defineProperty");return e({},"",{}),e}catch{}}(),vm=zr?function(e,o){return zr(e,"toString",{configurable:!0,enumerable:!1,value:xm(o),writable:!0})}:Rs,ym=Cm(vm),Sm=9007199254740991,wm=/^(?:0|[1-9]\d*)$/;function Ls(e,o){var t=typeof e;return o=o??Sm,!!o&&(t=="number"||t!="symbol"&&wm.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Am}function Fi(e){return e!=null&&ks(e.length)&&!$i(e)}function Mm(e,o,t){if(!it(t))return!1;var r=typeof o;return(r=="number"?Fi(t)&&Ls(o,t.length):r=="string"&&o in t)?ln(t[o],e):!1}function Dm(e){return Fm(function(o,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,a=n>2?t[2]:void 0;for(i=e.length>3&&typeof i=="function"?(n--,i):void 0,a&&Mm(t[0],t[1],a)&&(i=n<3?void 0:i,n=1),o=Object(o);++r-1}function zg(e,o){var t=this.__data__,r=sn(t,e);return r<0?(++this.size,t.push([e,o])):t[r][1]=o,this}function Ao(e){var o=-1,t=e==null?0:e.length;for(this.clear();++on?0:n+o),t=t>n?n:t,t<0&&(t+=n),n=o>t?0:t-o>>>0,o>>>=0;for(var i=Array(n);++r=r?e:Xg(e,o,t)}var ob="\\ud800-\\udfff",tb="\\u0300-\\u036f",rb="\\ufe20-\\ufe2f",nb="\\u20d0-\\u20ff",ib=tb+rb+nb,ab="\\ufe0e\\ufe0f",lb="\\u200d",sb=RegExp("["+lb+ob+ib+ab+"]");function Ks(e){return sb.test(e)}function cb(e){return e.split("")}var Ys="\\ud800-\\udfff",db="\\u0300-\\u036f",ub="\\ufe20-\\ufe2f",fb="\\u20d0-\\u20ff",pb=db+ub+fb,hb="\\ufe0e\\ufe0f",mb="["+Ys+"]",ei="["+pb+"]",oi="\\ud83c[\\udffb-\\udfff]",gb="(?:"+ei+"|"+oi+")",Js="[^"+Ys+"]",Zs="(?:\\ud83c[\\udde6-\\uddff]){2}",Qs="[\\ud800-\\udbff][\\udc00-\\udfff]",bb="\\u200d",Xs=gb+"?",ec="["+hb+"]?",Cb="(?:"+bb+"(?:"+[Js,Zs,Qs].join("|")+")"+ec+Xs+")*",xb=ec+Xs+Cb,vb="(?:"+[Js+ei+"?",ei,Zs,Qs,mb].join("|")+")",yb=RegExp(oi+"(?="+oi+")|"+vb+xb,"g");function Sb(e){return e.match(yb)||[]}function wb(e){return Ks(e)?Sb(e):cb(e)}function Pb(e){return function(o){o=Gg(o);var t=Ks(o)?wb(o):void 0,r=t?t[0]:o.charAt(0),n=t?eb(t,1).join(""):o.slice(1);return r[e]()+n}}var Tb=Pb("toUpperCase");function $b(){this.__data__=new Ao,this.size=0}function Ib(e){var o=this.__data__,t=o.delete(e);return this.size=o.size,t}function Hb(e){return this.__data__.get(e)}function Fb(e){return this.__data__.has(e)}var Ab=200;function Mb(e,o){var t=this.__data__;if(t instanceof Ao){var r=t.__data__;if(!Us||r.length{const{value:l}=o;if(!l)return;const s=l[e];if(s)return s}),i=Ee(Io,null),a=()=>{os(()=>{const{value:l}=t,s=`${l}${e}Rtl`;if(qf(s,r))return;const{value:c}=n;c&&c.style.mount({id:s,head:!0,anchorMetaName:er,props:{bPrefix:l?`.${l}-`:void 0},ssr:r,parent:i==null?void 0:i.styleMountTarget})})};return r?a():Zr(a),n}const $t={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:jb,fontFamily:Nb,lineHeight:Vb}=$t,nc=Q("body",` margin: 0; font-size: ${jb}; font-family: ${Nb}; @@ -50,7 +50,7 @@ ${o} `,[Q("svg",` height: 1em; width: 1em; - `)]),ic=Je({name:"BaseIcon",props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){dn("-base-icon",Ub,qr(e,"clsPrefix"))},render(){return O("i",{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}}),Ai=Je({name:"BaseIconSwitchTransition",setup(e,{slots:o}){const t=dp();return()=>O(hs,{name:"icon-switch-transition",appear:t.value},o)}});function ar(e,o){const t=Je({render(){return o()}});return Je({name:Tb(e),setup(){var r;const n=(r=Ee(Io,null))===null||r===void 0?void 0:r.mergedIconsRef;return()=>{var i;const a=(i=n==null?void 0:n.value)===null||i===void 0?void 0:i[e];return a?a():O(t,null)}}})}const Gb=ar("close",()=>O("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},O("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},O("g",{fill:"currentColor","fill-rule":"nonzero"},O("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),qb=ar("error",()=>O("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},O("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},O("g",{"fill-rule":"nonzero"},O("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),Kb=ar("info",()=>O("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},O("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},O("g",{"fill-rule":"nonzero"},O("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),Yb=ar("success",()=>O("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},O("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},O("g",{"fill-rule":"nonzero"},O("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z"}))))),Jb=ar("warning",()=>O("svg",{viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},O("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},O("g",{"fill-rule":"nonzero"},O("path",{d:"M12,2 C17.523,2 22,6.478 22,12 C22,17.522 17.523,22 12,22 C6.477,22 2,17.522 2,12 C2,6.478 6.477,2 12,2 Z M12.0018002,15.0037242 C11.450254,15.0037242 11.0031376,15.4508407 11.0031376,16.0023869 C11.0031376,16.553933 11.450254,17.0010495 12.0018002,17.0010495 C12.5533463,17.0010495 13.0004628,16.553933 13.0004628,16.0023869 C13.0004628,15.4508407 12.5533463,15.0037242 12.0018002,15.0037242 Z M11.99964,7 C11.4868042,7.00018474 11.0642719,7.38637706 11.0066858,7.8837365 L11,8.00036004 L11.0018003,13.0012393 L11.00857,13.117858 C11.0665141,13.6151758 11.4893244,14.0010638 12.0021602,14.0008793 C12.514996,14.0006946 12.9375283,13.6145023 12.9951144,13.1171428 L13.0018002,13.0005193 L13,7.99964009 L12.9932303,7.8830214 C12.9352861,7.38570354 12.5124758,6.99981552 11.99964,7 Z"}))))),{cubicBezierEaseInOut:Zb}=$t;function Br({originalTransform:e="",left:o=0,top:t=0,transition:r=`all .3s ${Zb} !important`}={}){return[Q("&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to",{transform:`${e} scale(0.75)`,left:o,top:t,opacity:0}),Q("&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from",{transform:`scale(1) ${e}`,left:o,top:t,opacity:1}),Q("&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active",{transformOrigin:"center",position:"absolute",left:o,top:t,transition:r})]}const Qb=to("base-close",` + `)]),ic=Je({name:"BaseIcon",props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){dn("-base-icon",Ub,qr(e,"clsPrefix"))},render(){return z("i",{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}}),Ai=Je({name:"BaseIconSwitchTransition",setup(e,{slots:o}){const t=dp();return()=>z(hs,{name:"icon-switch-transition",appear:t.value},o)}});function ar(e,o){const t=Je({render(){return o()}});return Je({name:Tb(e),setup(){var r;const n=(r=Ee(Io,null))===null||r===void 0?void 0:r.mergedIconsRef;return()=>{var i;const a=(i=n==null?void 0:n.value)===null||i===void 0?void 0:i[e];return a?a():z(t,null)}}})}const Gb=ar("close",()=>z("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},z("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},z("g",{fill:"currentColor","fill-rule":"nonzero"},z("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),qb=ar("error",()=>z("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},z("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},z("g",{"fill-rule":"nonzero"},z("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),Kb=ar("info",()=>z("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},z("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},z("g",{"fill-rule":"nonzero"},z("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),Yb=ar("success",()=>z("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},z("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},z("g",{"fill-rule":"nonzero"},z("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z"}))))),Jb=ar("warning",()=>z("svg",{viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},z("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},z("g",{"fill-rule":"nonzero"},z("path",{d:"M12,2 C17.523,2 22,6.478 22,12 C22,17.522 17.523,22 12,22 C6.477,22 2,17.522 2,12 C2,6.478 6.477,2 12,2 Z M12.0018002,15.0037242 C11.450254,15.0037242 11.0031376,15.4508407 11.0031376,16.0023869 C11.0031376,16.553933 11.450254,17.0010495 12.0018002,17.0010495 C12.5533463,17.0010495 13.0004628,16.553933 13.0004628,16.0023869 C13.0004628,15.4508407 12.5533463,15.0037242 12.0018002,15.0037242 Z M11.99964,7 C11.4868042,7.00018474 11.0642719,7.38637706 11.0066858,7.8837365 L11,8.00036004 L11.0018003,13.0012393 L11.00857,13.117858 C11.0665141,13.6151758 11.4893244,14.0010638 12.0021602,14.0008793 C12.514996,14.0006946 12.9375283,13.6145023 12.9951144,13.1171428 L13.0018002,13.0005193 L13,7.99964009 L12.9932303,7.8830214 C12.9352861,7.38570354 12.5124758,6.99981552 11.99964,7 Z"}))))),{cubicBezierEaseInOut:Zb}=$t;function Br({originalTransform:e="",left:o=0,top:t=0,transition:r=`all .3s ${Zb} !important`}={}){return[Q("&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to",{transform:`${e} scale(0.75)`,left:o,top:t,opacity:0}),Q("&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from",{transform:`scale(1) ${e}`,left:o,top:t,opacity:1}),Q("&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active",{transformOrigin:"center",position:"absolute",left:o,top:t,transition:r})]}const Qb=to("base-close",` display: flex; align-items: center; justify-content: center; @@ -94,7 +94,7 @@ ${o} background-color: transparent; `),Se("round",[Q("&::before",` border-radius: 50%; - `)])]),Xb=Je({name:"BaseClose",props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return dn("-base-close",Qb,qr(e,"clsPrefix")),()=>{const{clsPrefix:o,disabled:t,absolute:r,round:n,isButtonTag:i}=e;return O(i?"button":"div",{type:i?"button":void 0,tabindex:t||!e.focusable?-1:0,"aria-disabled":t,"aria-label":"close",role:i?void 0:"button",disabled:t,class:[`${o}-base-close`,r&&`${o}-base-close--absolute`,t&&`${o}-base-close--disabled`,n&&`${o}-base-close--round`],onMousedown:l=>{e.focusable||l.preventDefault()},onClick:e.onClick},O(ic,{clsPrefix:o},{default:()=>O(Gb,null)}))}}}),ac=Je({name:"FadeInExpandTransition",props:{appear:Boolean,group:Boolean,mode:String,onLeave:Function,onAfterLeave:Function,onAfterEnter:Function,width:Boolean,reverse:Boolean},setup(e,{slots:o}){function t(l){e.width?l.style.maxWidth=`${l.offsetWidth}px`:l.style.maxHeight=`${l.offsetHeight}px`,l.offsetWidth}function r(l){e.width?l.style.maxWidth="0":l.style.maxHeight="0",l.offsetWidth;const{onLeave:s}=e;s&&s()}function n(l){e.width?l.style.maxWidth="":l.style.maxHeight="";const{onAfterLeave:s}=e;s&&s()}function i(l){if(l.style.transition="none",e.width){const s=l.offsetWidth;l.style.maxWidth="0",l.offsetWidth,l.style.transition="",l.style.maxWidth=`${s}px`}else if(e.reverse)l.style.maxHeight=`${l.offsetHeight}px`,l.offsetHeight,l.style.transition="",l.style.maxHeight="0";else{const s=l.offsetHeight;l.style.maxHeight="0",l.offsetWidth,l.style.transition="",l.style.maxHeight=`${s}px`}l.offsetWidth}function a(l){var s;e.width?l.style.maxWidth="":e.reverse||(l.style.maxHeight=""),(s=e.onAfterEnter)===null||s===void 0||s.call(e)}return()=>{const{group:l,width:s,appear:c,mode:d}=e,u=l?bf:hs,p={name:s?"fade-in-width-expand-transition":"fade-in-height-expand-transition",appear:c,onEnter:i,onAfterEnter:a,onBeforeLeave:t,onLeave:r,onAfterLeave:n};return l||(p.mode=d),O(u,p,o)}}}),e0=Q([Q("@keyframes rotator",` + `)])]),Xb=Je({name:"BaseClose",props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return dn("-base-close",Qb,qr(e,"clsPrefix")),()=>{const{clsPrefix:o,disabled:t,absolute:r,round:n,isButtonTag:i}=e;return z(i?"button":"div",{type:i?"button":void 0,tabindex:t||!e.focusable?-1:0,"aria-disabled":t,"aria-label":"close",role:i?void 0:"button",disabled:t,class:[`${o}-base-close`,r&&`${o}-base-close--absolute`,t&&`${o}-base-close--disabled`,n&&`${o}-base-close--round`],onMousedown:l=>{e.focusable||l.preventDefault()},onClick:e.onClick},z(ic,{clsPrefix:o},{default:()=>z(Gb,null)}))}}}),ac=Je({name:"FadeInExpandTransition",props:{appear:Boolean,group:Boolean,mode:String,onLeave:Function,onAfterLeave:Function,onAfterEnter:Function,width:Boolean,reverse:Boolean},setup(e,{slots:o}){function t(l){e.width?l.style.maxWidth=`${l.offsetWidth}px`:l.style.maxHeight=`${l.offsetHeight}px`,l.offsetWidth}function r(l){e.width?l.style.maxWidth="0":l.style.maxHeight="0",l.offsetWidth;const{onLeave:s}=e;s&&s()}function n(l){e.width?l.style.maxWidth="":l.style.maxHeight="";const{onAfterLeave:s}=e;s&&s()}function i(l){if(l.style.transition="none",e.width){const s=l.offsetWidth;l.style.maxWidth="0",l.offsetWidth,l.style.transition="",l.style.maxWidth=`${s}px`}else if(e.reverse)l.style.maxHeight=`${l.offsetHeight}px`,l.offsetHeight,l.style.transition="",l.style.maxHeight="0";else{const s=l.offsetHeight;l.style.maxHeight="0",l.offsetWidth,l.style.transition="",l.style.maxHeight=`${s}px`}l.offsetWidth}function a(l){var s;e.width?l.style.maxWidth="":e.reverse||(l.style.maxHeight=""),(s=e.onAfterEnter)===null||s===void 0||s.call(e)}return()=>{const{group:l,width:s,appear:c,mode:d}=e,u=l?bf:hs,p={name:s?"fade-in-width-expand-transition":"fade-in-height-expand-transition",appear:c,onEnter:i,onAfterEnter:a,onBeforeLeave:t,onLeave:r,onAfterLeave:n};return l||(p.mode=d),z(u,p,o)}}}),e0=Q([Q("@keyframes rotator",` 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); @@ -121,7 +121,7 @@ ${o} `,[be("icon",` height: 1em; width: 1em; - `)])])]),Mn="1.6s",o0={strokeWidth:{type:Number,default:28},stroke:{type:String,default:void 0}},lc=Je({name:"BaseLoading",props:Object.assign({clsPrefix:{type:String,required:!0},show:{type:Boolean,default:!0},scale:{type:Number,default:1},radius:{type:Number,default:100}},o0),setup(e){dn("-base-loading",e0,qr(e,"clsPrefix"))},render(){const{clsPrefix:e,radius:o,strokeWidth:t,stroke:r,scale:n}=this,i=o/n;return O("div",{class:`${e}-base-loading`,role:"img","aria-label":"loading"},O(Ai,null,{default:()=>this.show?O("div",{key:"icon",class:`${e}-base-loading__transition-wrapper`},O("div",{class:`${e}-base-loading__container`},O("svg",{class:`${e}-base-loading__icon`,viewBox:`0 0 ${2*i} ${2*i}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},O("g",null,O("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${i} ${i};270 ${i} ${i}`,begin:"0s",dur:Mn,fill:"freeze",repeatCount:"indefinite"}),O("circle",{class:`${e}-base-loading__icon`,fill:"none",stroke:"currentColor","stroke-width":t,"stroke-linecap":"round",cx:i,cy:i,r:o-t/2,"stroke-dasharray":5.67*o,"stroke-dashoffset":18.48*o},O("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${i} ${i};135 ${i} ${i};450 ${i} ${i}`,begin:"0s",dur:Mn,fill:"freeze",repeatCount:"indefinite"}),O("animate",{attributeName:"stroke-dashoffset",values:`${5.67*o};${1.42*o};${5.67*o}`,begin:"0s",dur:Mn,fill:"freeze",repeatCount:"indefinite"})))))):O("div",{key:"placeholder",class:`${e}-base-loading__placeholder`},this.$slots)}))}}),k={neutralBase:"#000",neutralInvertBase:"#fff",neutralTextBase:"#fff",neutralPopover:"rgb(72, 72, 78)",neutralCard:"rgb(24, 24, 28)",neutralModal:"rgb(44, 44, 50)",neutralBody:"rgb(16, 16, 20)",alpha1:"0.9",alpha2:"0.82",alpha3:"0.52",alpha4:"0.38",alpha5:"0.28",alphaClose:"0.52",alphaDisabled:"0.38",alphaDisabledInput:"0.06",alphaPending:"0.09",alphaTablePending:"0.06",alphaTableStriped:"0.05",alphaPressed:"0.05",alphaAvatar:"0.18",alphaRail:"0.2",alphaProgressRail:"0.12",alphaBorder:"0.24",alphaDivider:"0.09",alphaInput:"0.1",alphaAction:"0.06",alphaTab:"0.04",alphaScrollbar:"0.2",alphaScrollbarHover:"0.3",alphaCode:"0.12",alphaTag:"0.2",primaryHover:"#7fe7c4",primaryDefault:"#63e2b7",primaryActive:"#5acea7",primarySuppl:"rgb(42, 148, 125)",infoHover:"#8acbec",infoDefault:"#70c0e8",infoActive:"#66afd3",infoSuppl:"rgb(56, 137, 197)",errorHover:"#e98b8b",errorDefault:"#e88080",errorActive:"#e57272",errorSuppl:"rgb(208, 58, 82)",warningHover:"#f5d599",warningDefault:"#f2c97d",warningActive:"#e6c260",warningSuppl:"rgb(240, 138, 0)",successHover:"#7fe7c4",successDefault:"#63e2b7",successActive:"#5acea7",successSuppl:"rgb(42, 148, 125)"},t0=$o(k.neutralBase),sc=$o(k.neutralInvertBase),r0=`rgba(${sc.slice(0,3).join(", ")}, `;function ne(e){return`${r0+String(e)})`}function n0(e){const o=Array.from(sc);return o[3]=Number(e),B(t0,o)}const A=Object.assign(Object.assign({name:"common"},$t),{baseColor:k.neutralBase,primaryColor:k.primaryDefault,primaryColorHover:k.primaryHover,primaryColorPressed:k.primaryActive,primaryColorSuppl:k.primarySuppl,infoColor:k.infoDefault,infoColorHover:k.infoHover,infoColorPressed:k.infoActive,infoColorSuppl:k.infoSuppl,successColor:k.successDefault,successColorHover:k.successHover,successColorPressed:k.successActive,successColorSuppl:k.successSuppl,warningColor:k.warningDefault,warningColorHover:k.warningHover,warningColorPressed:k.warningActive,warningColorSuppl:k.warningSuppl,errorColor:k.errorDefault,errorColorHover:k.errorHover,errorColorPressed:k.errorActive,errorColorSuppl:k.errorSuppl,textColorBase:k.neutralTextBase,textColor1:ne(k.alpha1),textColor2:ne(k.alpha2),textColor3:ne(k.alpha3),textColorDisabled:ne(k.alpha4),placeholderColor:ne(k.alpha4),placeholderColorDisabled:ne(k.alpha5),iconColor:ne(k.alpha4),iconColorDisabled:ne(k.alpha5),iconColorHover:ne(Number(k.alpha4)*1.25),iconColorPressed:ne(Number(k.alpha4)*.8),opacity1:k.alpha1,opacity2:k.alpha2,opacity3:k.alpha3,opacity4:k.alpha4,opacity5:k.alpha5,dividerColor:ne(k.alphaDivider),borderColor:ne(k.alphaBorder),closeIconColorHover:ne(Number(k.alphaClose)),closeIconColor:ne(Number(k.alphaClose)),closeIconColorPressed:ne(Number(k.alphaClose)),closeColorHover:"rgba(255, 255, 255, .12)",closeColorPressed:"rgba(255, 255, 255, .08)",clearColor:ne(k.alpha4),clearColorHover:ye(ne(k.alpha4),{alpha:1.25}),clearColorPressed:ye(ne(k.alpha4),{alpha:.8}),scrollbarColor:ne(k.alphaScrollbar),scrollbarColorHover:ne(k.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:ne(k.alphaProgressRail),railColor:ne(k.alphaRail),popoverColor:k.neutralPopover,tableColor:k.neutralCard,cardColor:k.neutralCard,modalColor:k.neutralModal,bodyColor:k.neutralBody,tagColor:n0(k.alphaTag),avatarColor:ne(k.alphaAvatar),invertedColor:k.neutralBase,inputColor:ne(k.alphaInput),codeColor:ne(k.alphaCode),tabColor:ne(k.alphaTab),actionColor:ne(k.alphaAction),tableHeaderColor:ne(k.alphaAction),hoverColor:ne(k.alphaPending),tableColorHover:ne(k.alphaTablePending),tableColorStriped:ne(k.alphaTableStriped),pressedColor:ne(k.alphaPressed),opacityDisabled:k.alphaDisabled,inputColorDisabled:ne(k.alphaDisabledInput),buttonColor2:"rgba(255, 255, 255, .08)",buttonColor2Hover:"rgba(255, 255, 255, .12)",buttonColor2Pressed:"rgba(255, 255, 255, .08)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .24), 0 3px 6px 0 rgba(0, 0, 0, .18), 0 5px 12px 4px rgba(0, 0, 0, .12)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .24), 0 6px 12px 0 rgba(0, 0, 0, .16), 0 9px 18px 8px rgba(0, 0, 0, .10)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),U={neutralBase:"#FFF",neutralInvertBase:"#000",neutralTextBase:"#000",neutralPopover:"#fff",neutralCard:"#fff",neutralModal:"#fff",neutralBody:"#fff",alpha1:"0.82",alpha2:"0.72",alpha3:"0.38",alpha4:"0.24",alpha5:"0.18",alphaClose:"0.6",alphaDisabled:"0.5",alphaAvatar:"0.2",alphaProgressRail:".08",alphaInput:"0",alphaScrollbar:"0.25",alphaScrollbarHover:"0.4",primaryHover:"#36ad6a",primaryDefault:"#18a058",primaryActive:"#0c7a43",primarySuppl:"#36ad6a",infoHover:"#4098fc",infoDefault:"#2080f0",infoActive:"#1060c9",infoSuppl:"#4098fc",errorHover:"#de576d",errorDefault:"#d03050",errorActive:"#ab1f3f",errorSuppl:"#de576d",warningHover:"#fcb040",warningDefault:"#f0a020",warningActive:"#c97c10",warningSuppl:"#fcb040",successHover:"#36ad6a",successDefault:"#18a058",successActive:"#0c7a43",successSuppl:"#36ad6a"},i0=$o(U.neutralBase),cc=$o(U.neutralInvertBase),a0=`rgba(${cc.slice(0,3).join(", ")}, `;function Ga(e){return`${a0+String(e)})`}function $e(e){const o=Array.from(cc);return o[3]=Number(e),B(i0,o)}const ge=Object.assign(Object.assign({name:"common"},$t),{baseColor:U.neutralBase,primaryColor:U.primaryDefault,primaryColorHover:U.primaryHover,primaryColorPressed:U.primaryActive,primaryColorSuppl:U.primarySuppl,infoColor:U.infoDefault,infoColorHover:U.infoHover,infoColorPressed:U.infoActive,infoColorSuppl:U.infoSuppl,successColor:U.successDefault,successColorHover:U.successHover,successColorPressed:U.successActive,successColorSuppl:U.successSuppl,warningColor:U.warningDefault,warningColorHover:U.warningHover,warningColorPressed:U.warningActive,warningColorSuppl:U.warningSuppl,errorColor:U.errorDefault,errorColorHover:U.errorHover,errorColorPressed:U.errorActive,errorColorSuppl:U.errorSuppl,textColorBase:U.neutralTextBase,textColor1:"rgb(31, 34, 37)",textColor2:"rgb(51, 54, 57)",textColor3:"rgb(118, 124, 130)",textColorDisabled:$e(U.alpha4),placeholderColor:$e(U.alpha4),placeholderColorDisabled:$e(U.alpha5),iconColor:$e(U.alpha4),iconColorHover:ye($e(U.alpha4),{lightness:.75}),iconColorPressed:ye($e(U.alpha4),{lightness:.9}),iconColorDisabled:$e(U.alpha5),opacity1:U.alpha1,opacity2:U.alpha2,opacity3:U.alpha3,opacity4:U.alpha4,opacity5:U.alpha5,dividerColor:"rgb(239, 239, 245)",borderColor:"rgb(224, 224, 230)",closeIconColor:$e(Number(U.alphaClose)),closeIconColorHover:$e(Number(U.alphaClose)),closeIconColorPressed:$e(Number(U.alphaClose)),closeColorHover:"rgba(0, 0, 0, .09)",closeColorPressed:"rgba(0, 0, 0, .13)",clearColor:$e(U.alpha4),clearColorHover:ye($e(U.alpha4),{lightness:.75}),clearColorPressed:ye($e(U.alpha4),{lightness:.9}),scrollbarColor:Ga(U.alphaScrollbar),scrollbarColorHover:Ga(U.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:$e(U.alphaProgressRail),railColor:"rgb(219, 219, 223)",popoverColor:U.neutralPopover,tableColor:U.neutralCard,cardColor:U.neutralCard,modalColor:U.neutralModal,bodyColor:U.neutralBody,tagColor:"#eee",avatarColor:$e(U.alphaAvatar),invertedColor:"rgb(0, 20, 40)",inputColor:$e(U.alphaInput),codeColor:"rgb(244, 244, 248)",tabColor:"rgb(247, 247, 250)",actionColor:"rgb(250, 250, 252)",tableHeaderColor:"rgb(250, 250, 252)",hoverColor:"rgb(243, 243, 245)",tableColorHover:"rgba(0, 0, 100, 0.03)",tableColorStriped:"rgba(0, 0, 100, 0.02)",pressedColor:"rgb(237, 237, 239)",opacityDisabled:U.alphaDisabled,inputColorDisabled:"rgb(250, 250, 252)",buttonColor2:"rgba(46, 51, 56, .05)",buttonColor2Hover:"rgba(46, 51, 56, .09)",buttonColor2Pressed:"rgba(46, 51, 56, .13)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),l0={railInsetHorizontalBottom:"auto 2px 4px 2px",railInsetHorizontalTop:"4px 2px auto 2px",railInsetVerticalRight:"2px 4px 2px auto",railInsetVerticalLeft:"2px auto 2px 4px",railColor:"transparent"};function dc(e){const{scrollbarColor:o,scrollbarColorHover:t,scrollbarHeight:r,scrollbarWidth:n,scrollbarBorderRadius:i}=e;return Object.assign(Object.assign({},l0),{height:r,width:n,borderRadius:i,color:o,colorHover:t})}const un={name:"Scrollbar",common:ge,self:dc},We={name:"Scrollbar",common:A,self:dc},s0={iconSizeTiny:"28px",iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"};function uc(e){const{textColorDisabled:o,iconColor:t,textColor2:r,fontSizeTiny:n,fontSizeSmall:i,fontSizeMedium:a,fontSizeLarge:l,fontSizeHuge:s}=e;return Object.assign(Object.assign({},s0),{fontSizeTiny:n,fontSizeSmall:i,fontSizeMedium:a,fontSizeLarge:l,fontSizeHuge:s,textColor:o,iconColor:t,extraTextColor:r})}const Mi={name:"Empty",common:ge,self:uc},at={name:"Empty",common:A,self:uc},c0={height:"calc(var(--n-option-height) * 7.6)",paddingTiny:"4px 0",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingTiny:"0 12px",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};function fc(e){const{borderRadius:o,popoverColor:t,textColor3:r,dividerColor:n,textColor2:i,primaryColorPressed:a,textColorDisabled:l,primaryColor:s,opacityDisabled:c,hoverColor:d,fontSizeTiny:u,fontSizeSmall:p,fontSizeMedium:g,fontSizeLarge:h,fontSizeHuge:b,heightTiny:y,heightSmall:C,heightMedium:I,heightLarge:E,heightHuge:v}=e;return Object.assign(Object.assign({},c0),{optionFontSizeTiny:u,optionFontSizeSmall:p,optionFontSizeMedium:g,optionFontSizeLarge:h,optionFontSizeHuge:b,optionHeightTiny:y,optionHeightSmall:C,optionHeightMedium:I,optionHeightLarge:E,optionHeightHuge:v,borderRadius:o,color:t,groupHeaderTextColor:r,actionDividerColor:n,optionTextColor:i,optionTextColorPressed:a,optionTextColorDisabled:l,optionTextColorActive:s,optionOpacityDisabled:c,optionCheckColor:s,optionColorPending:d,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:d,actionTextColor:i,loadingColor:s})}const pc={name:"InternalSelectMenu",common:ge,peers:{Scrollbar:un,Empty:Mi},self:fc},lr={name:"InternalSelectMenu",common:A,peers:{Scrollbar:We,Empty:at},self:fc},d0={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"};function hc(e){const{boxShadow2:o,popoverColor:t,textColor2:r,borderRadius:n,fontSize:i,dividerColor:a}=e;return Object.assign(Object.assign({},d0),{fontSize:i,borderRadius:n,color:t,dividerColor:a,textColor:r,boxShadow:o})}const It={name:"Popover",common:ge,self:hc},lt={name:"Popover",common:A,self:hc},u0={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px"},mc={name:"Tag",common:A,self(e){const{textColor2:o,primaryColorHover:t,primaryColorPressed:r,primaryColor:n,infoColor:i,successColor:a,warningColor:l,errorColor:s,baseColor:c,borderColor:d,tagColor:u,opacityDisabled:p,closeIconColor:g,closeIconColorHover:h,closeIconColorPressed:b,closeColorHover:y,closeColorPressed:C,borderRadiusSmall:I,fontSizeMini:E,fontSizeTiny:v,fontSizeSmall:L,fontSizeMedium:W,heightMini:w,heightTiny:K,heightSmall:D,heightMedium:j,buttonColor2Hover:q,buttonColor2Pressed:F,fontWeightStrong:ee}=e;return Object.assign(Object.assign({},u0),{closeBorderRadius:I,heightTiny:w,heightSmall:K,heightMedium:D,heightLarge:j,borderRadius:I,opacityDisabled:p,fontSizeTiny:E,fontSizeSmall:v,fontSizeMedium:L,fontSizeLarge:W,fontWeightStrong:ee,textColorCheckable:o,textColorHoverCheckable:o,textColorPressedCheckable:o,textColorChecked:c,colorCheckable:"#0000",colorHoverCheckable:q,colorPressedCheckable:F,colorChecked:n,colorCheckedHover:t,colorCheckedPressed:r,border:`1px solid ${d}`,textColor:o,color:u,colorBordered:"#0000",closeIconColor:g,closeIconColorHover:h,closeIconColorPressed:b,closeColorHover:y,closeColorPressed:C,borderPrimary:`1px solid ${_(n,{alpha:.3})}`,textColorPrimary:n,colorPrimary:_(n,{alpha:.16}),colorBorderedPrimary:"#0000",closeIconColorPrimary:ye(n,{lightness:.7}),closeIconColorHoverPrimary:ye(n,{lightness:.7}),closeIconColorPressedPrimary:ye(n,{lightness:.7}),closeColorHoverPrimary:_(n,{alpha:.16}),closeColorPressedPrimary:_(n,{alpha:.12}),borderInfo:`1px solid ${_(i,{alpha:.3})}`,textColorInfo:i,colorInfo:_(i,{alpha:.16}),colorBorderedInfo:"#0000",closeIconColorInfo:ye(i,{alpha:.7}),closeIconColorHoverInfo:ye(i,{alpha:.7}),closeIconColorPressedInfo:ye(i,{alpha:.7}),closeColorHoverInfo:_(i,{alpha:.16}),closeColorPressedInfo:_(i,{alpha:.12}),borderSuccess:`1px solid ${_(a,{alpha:.3})}`,textColorSuccess:a,colorSuccess:_(a,{alpha:.16}),colorBorderedSuccess:"#0000",closeIconColorSuccess:ye(a,{alpha:.7}),closeIconColorHoverSuccess:ye(a,{alpha:.7}),closeIconColorPressedSuccess:ye(a,{alpha:.7}),closeColorHoverSuccess:_(a,{alpha:.16}),closeColorPressedSuccess:_(a,{alpha:.12}),borderWarning:`1px solid ${_(l,{alpha:.3})}`,textColorWarning:l,colorWarning:_(l,{alpha:.16}),colorBorderedWarning:"#0000",closeIconColorWarning:ye(l,{alpha:.7}),closeIconColorHoverWarning:ye(l,{alpha:.7}),closeIconColorPressedWarning:ye(l,{alpha:.7}),closeColorHoverWarning:_(l,{alpha:.16}),closeColorPressedWarning:_(l,{alpha:.11}),borderError:`1px solid ${_(s,{alpha:.3})}`,textColorError:s,colorError:_(s,{alpha:.16}),colorBorderedError:"#0000",closeIconColorError:ye(s,{alpha:.7}),closeIconColorHoverError:ye(s,{alpha:.7}),closeIconColorPressedError:ye(s,{alpha:.7}),closeColorHoverError:_(s,{alpha:.16}),closeColorPressedError:_(s,{alpha:.12})})}},gc={paddingSingle:"0 26px 0 12px",paddingMultiple:"3px 26px 0 12px",clearSize:"16px",arrowSize:"16px"},Di={name:"InternalSelection",common:A,peers:{Popover:lt},self(e){const{borderRadius:o,textColor2:t,textColorDisabled:r,inputColor:n,inputColorDisabled:i,primaryColor:a,primaryColorHover:l,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,iconColor:p,iconColorDisabled:g,clearColor:h,clearColorHover:b,clearColorPressed:y,placeholderColor:C,placeholderColorDisabled:I,fontSizeTiny:E,fontSizeSmall:v,fontSizeMedium:L,fontSizeLarge:W,heightTiny:w,heightSmall:K,heightMedium:D,heightLarge:j,fontWeight:q}=e;return Object.assign(Object.assign({},gc),{fontWeight:q,fontSizeTiny:E,fontSizeSmall:v,fontSizeMedium:L,fontSizeLarge:W,heightTiny:w,heightSmall:K,heightMedium:D,heightLarge:j,borderRadius:o,textColor:t,textColorDisabled:r,placeholderColor:C,placeholderColorDisabled:I,color:n,colorDisabled:i,colorActive:_(a,{alpha:.1}),border:"1px solid #0000",borderHover:`1px solid ${l}`,borderActive:`1px solid ${a}`,borderFocus:`1px solid ${l}`,boxShadowHover:"none",boxShadowActive:`0 0 8px 0 ${_(a,{alpha:.4})}`,boxShadowFocus:`0 0 8px 0 ${_(a,{alpha:.4})}`,caretColor:a,arrowColor:p,arrowColorDisabled:g,loadingColor:a,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,borderActiveWarning:`1px solid ${s}`,borderFocusWarning:`1px solid ${c}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 8px 0 ${_(s,{alpha:.4})}`,boxShadowFocusWarning:`0 0 8px 0 ${_(s,{alpha:.4})}`,colorActiveWarning:_(s,{alpha:.1}),caretColorWarning:s,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,borderActiveError:`1px solid ${d}`,borderFocusError:`1px solid ${u}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 8px 0 ${_(d,{alpha:.4})}`,boxShadowFocusError:`0 0 8px 0 ${_(d,{alpha:.4})}`,colorActiveError:_(d,{alpha:.1}),caretColorError:d,clearColor:h,clearColorHover:b,clearColorPressed:y})}};function f0(e){const{borderRadius:o,textColor2:t,textColorDisabled:r,inputColor:n,inputColorDisabled:i,primaryColor:a,primaryColorHover:l,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,borderColor:p,iconColor:g,iconColorDisabled:h,clearColor:b,clearColorHover:y,clearColorPressed:C,placeholderColor:I,placeholderColorDisabled:E,fontSizeTiny:v,fontSizeSmall:L,fontSizeMedium:W,fontSizeLarge:w,heightTiny:K,heightSmall:D,heightMedium:j,heightLarge:q,fontWeight:F}=e;return Object.assign(Object.assign({},gc),{fontSizeTiny:v,fontSizeSmall:L,fontSizeMedium:W,fontSizeLarge:w,heightTiny:K,heightSmall:D,heightMedium:j,heightLarge:q,borderRadius:o,fontWeight:F,textColor:t,textColorDisabled:r,placeholderColor:I,placeholderColorDisabled:E,color:n,colorDisabled:i,colorActive:n,border:`1px solid ${p}`,borderHover:`1px solid ${l}`,borderActive:`1px solid ${a}`,borderFocus:`1px solid ${l}`,boxShadowHover:"none",boxShadowActive:`0 0 0 2px ${_(a,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${_(a,{alpha:.2})}`,caretColor:a,arrowColor:g,arrowColorDisabled:h,loadingColor:a,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,borderActiveWarning:`1px solid ${s}`,borderFocusWarning:`1px solid ${c}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 0 2px ${_(s,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${_(s,{alpha:.2})}`,colorActiveWarning:n,caretColorWarning:s,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,borderActiveError:`1px solid ${d}`,borderFocusError:`1px solid ${u}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 0 2px ${_(d,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${_(d,{alpha:.2})}`,colorActiveError:n,caretColorError:d,clearColor:b,clearColorHover:y,clearColorPressed:C})}const p0={name:"InternalSelection",common:ge,peers:{Popover:It},self:f0},{cubicBezierEaseInOut:Do}=$t;function h0({duration:e=".2s",delay:o=".1s"}={}){return[Q("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),Q("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",` + `)])])]),Mn="1.6s",o0={strokeWidth:{type:Number,default:28},stroke:{type:String,default:void 0}},lc=Je({name:"BaseLoading",props:Object.assign({clsPrefix:{type:String,required:!0},show:{type:Boolean,default:!0},scale:{type:Number,default:1},radius:{type:Number,default:100}},o0),setup(e){dn("-base-loading",e0,qr(e,"clsPrefix"))},render(){const{clsPrefix:e,radius:o,strokeWidth:t,stroke:r,scale:n}=this,i=o/n;return z("div",{class:`${e}-base-loading`,role:"img","aria-label":"loading"},z(Ai,null,{default:()=>this.show?z("div",{key:"icon",class:`${e}-base-loading__transition-wrapper`},z("div",{class:`${e}-base-loading__container`},z("svg",{class:`${e}-base-loading__icon`,viewBox:`0 0 ${2*i} ${2*i}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},z("g",null,z("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${i} ${i};270 ${i} ${i}`,begin:"0s",dur:Mn,fill:"freeze",repeatCount:"indefinite"}),z("circle",{class:`${e}-base-loading__icon`,fill:"none",stroke:"currentColor","stroke-width":t,"stroke-linecap":"round",cx:i,cy:i,r:o-t/2,"stroke-dasharray":5.67*o,"stroke-dashoffset":18.48*o},z("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${i} ${i};135 ${i} ${i};450 ${i} ${i}`,begin:"0s",dur:Mn,fill:"freeze",repeatCount:"indefinite"}),z("animate",{attributeName:"stroke-dashoffset",values:`${5.67*o};${1.42*o};${5.67*o}`,begin:"0s",dur:Mn,fill:"freeze",repeatCount:"indefinite"})))))):z("div",{key:"placeholder",class:`${e}-base-loading__placeholder`},this.$slots)}))}}),k={neutralBase:"#000",neutralInvertBase:"#fff",neutralTextBase:"#fff",neutralPopover:"rgb(72, 72, 78)",neutralCard:"rgb(24, 24, 28)",neutralModal:"rgb(44, 44, 50)",neutralBody:"rgb(16, 16, 20)",alpha1:"0.9",alpha2:"0.82",alpha3:"0.52",alpha4:"0.38",alpha5:"0.28",alphaClose:"0.52",alphaDisabled:"0.38",alphaDisabledInput:"0.06",alphaPending:"0.09",alphaTablePending:"0.06",alphaTableStriped:"0.05",alphaPressed:"0.05",alphaAvatar:"0.18",alphaRail:"0.2",alphaProgressRail:"0.12",alphaBorder:"0.24",alphaDivider:"0.09",alphaInput:"0.1",alphaAction:"0.06",alphaTab:"0.04",alphaScrollbar:"0.2",alphaScrollbarHover:"0.3",alphaCode:"0.12",alphaTag:"0.2",primaryHover:"#7fe7c4",primaryDefault:"#63e2b7",primaryActive:"#5acea7",primarySuppl:"rgb(42, 148, 125)",infoHover:"#8acbec",infoDefault:"#70c0e8",infoActive:"#66afd3",infoSuppl:"rgb(56, 137, 197)",errorHover:"#e98b8b",errorDefault:"#e88080",errorActive:"#e57272",errorSuppl:"rgb(208, 58, 82)",warningHover:"#f5d599",warningDefault:"#f2c97d",warningActive:"#e6c260",warningSuppl:"rgb(240, 138, 0)",successHover:"#7fe7c4",successDefault:"#63e2b7",successActive:"#5acea7",successSuppl:"rgb(42, 148, 125)"},t0=$o(k.neutralBase),sc=$o(k.neutralInvertBase),r0=`rgba(${sc.slice(0,3).join(", ")}, `;function ne(e){return`${r0+String(e)})`}function n0(e){const o=Array.from(sc);return o[3]=Number(e),B(t0,o)}const A=Object.assign(Object.assign({name:"common"},$t),{baseColor:k.neutralBase,primaryColor:k.primaryDefault,primaryColorHover:k.primaryHover,primaryColorPressed:k.primaryActive,primaryColorSuppl:k.primarySuppl,infoColor:k.infoDefault,infoColorHover:k.infoHover,infoColorPressed:k.infoActive,infoColorSuppl:k.infoSuppl,successColor:k.successDefault,successColorHover:k.successHover,successColorPressed:k.successActive,successColorSuppl:k.successSuppl,warningColor:k.warningDefault,warningColorHover:k.warningHover,warningColorPressed:k.warningActive,warningColorSuppl:k.warningSuppl,errorColor:k.errorDefault,errorColorHover:k.errorHover,errorColorPressed:k.errorActive,errorColorSuppl:k.errorSuppl,textColorBase:k.neutralTextBase,textColor1:ne(k.alpha1),textColor2:ne(k.alpha2),textColor3:ne(k.alpha3),textColorDisabled:ne(k.alpha4),placeholderColor:ne(k.alpha4),placeholderColorDisabled:ne(k.alpha5),iconColor:ne(k.alpha4),iconColorDisabled:ne(k.alpha5),iconColorHover:ne(Number(k.alpha4)*1.25),iconColorPressed:ne(Number(k.alpha4)*.8),opacity1:k.alpha1,opacity2:k.alpha2,opacity3:k.alpha3,opacity4:k.alpha4,opacity5:k.alpha5,dividerColor:ne(k.alphaDivider),borderColor:ne(k.alphaBorder),closeIconColorHover:ne(Number(k.alphaClose)),closeIconColor:ne(Number(k.alphaClose)),closeIconColorPressed:ne(Number(k.alphaClose)),closeColorHover:"rgba(255, 255, 255, .12)",closeColorPressed:"rgba(255, 255, 255, .08)",clearColor:ne(k.alpha4),clearColorHover:ye(ne(k.alpha4),{alpha:1.25}),clearColorPressed:ye(ne(k.alpha4),{alpha:.8}),scrollbarColor:ne(k.alphaScrollbar),scrollbarColorHover:ne(k.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:ne(k.alphaProgressRail),railColor:ne(k.alphaRail),popoverColor:k.neutralPopover,tableColor:k.neutralCard,cardColor:k.neutralCard,modalColor:k.neutralModal,bodyColor:k.neutralBody,tagColor:n0(k.alphaTag),avatarColor:ne(k.alphaAvatar),invertedColor:k.neutralBase,inputColor:ne(k.alphaInput),codeColor:ne(k.alphaCode),tabColor:ne(k.alphaTab),actionColor:ne(k.alphaAction),tableHeaderColor:ne(k.alphaAction),hoverColor:ne(k.alphaPending),tableColorHover:ne(k.alphaTablePending),tableColorStriped:ne(k.alphaTableStriped),pressedColor:ne(k.alphaPressed),opacityDisabled:k.alphaDisabled,inputColorDisabled:ne(k.alphaDisabledInput),buttonColor2:"rgba(255, 255, 255, .08)",buttonColor2Hover:"rgba(255, 255, 255, .12)",buttonColor2Pressed:"rgba(255, 255, 255, .08)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .24), 0 3px 6px 0 rgba(0, 0, 0, .18), 0 5px 12px 4px rgba(0, 0, 0, .12)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .24), 0 6px 12px 0 rgba(0, 0, 0, .16), 0 9px 18px 8px rgba(0, 0, 0, .10)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),U={neutralBase:"#FFF",neutralInvertBase:"#000",neutralTextBase:"#000",neutralPopover:"#fff",neutralCard:"#fff",neutralModal:"#fff",neutralBody:"#fff",alpha1:"0.82",alpha2:"0.72",alpha3:"0.38",alpha4:"0.24",alpha5:"0.18",alphaClose:"0.6",alphaDisabled:"0.5",alphaAvatar:"0.2",alphaProgressRail:".08",alphaInput:"0",alphaScrollbar:"0.25",alphaScrollbarHover:"0.4",primaryHover:"#36ad6a",primaryDefault:"#18a058",primaryActive:"#0c7a43",primarySuppl:"#36ad6a",infoHover:"#4098fc",infoDefault:"#2080f0",infoActive:"#1060c9",infoSuppl:"#4098fc",errorHover:"#de576d",errorDefault:"#d03050",errorActive:"#ab1f3f",errorSuppl:"#de576d",warningHover:"#fcb040",warningDefault:"#f0a020",warningActive:"#c97c10",warningSuppl:"#fcb040",successHover:"#36ad6a",successDefault:"#18a058",successActive:"#0c7a43",successSuppl:"#36ad6a"},i0=$o(U.neutralBase),cc=$o(U.neutralInvertBase),a0=`rgba(${cc.slice(0,3).join(", ")}, `;function Ga(e){return`${a0+String(e)})`}function $e(e){const o=Array.from(cc);return o[3]=Number(e),B(i0,o)}const ge=Object.assign(Object.assign({name:"common"},$t),{baseColor:U.neutralBase,primaryColor:U.primaryDefault,primaryColorHover:U.primaryHover,primaryColorPressed:U.primaryActive,primaryColorSuppl:U.primarySuppl,infoColor:U.infoDefault,infoColorHover:U.infoHover,infoColorPressed:U.infoActive,infoColorSuppl:U.infoSuppl,successColor:U.successDefault,successColorHover:U.successHover,successColorPressed:U.successActive,successColorSuppl:U.successSuppl,warningColor:U.warningDefault,warningColorHover:U.warningHover,warningColorPressed:U.warningActive,warningColorSuppl:U.warningSuppl,errorColor:U.errorDefault,errorColorHover:U.errorHover,errorColorPressed:U.errorActive,errorColorSuppl:U.errorSuppl,textColorBase:U.neutralTextBase,textColor1:"rgb(31, 34, 37)",textColor2:"rgb(51, 54, 57)",textColor3:"rgb(118, 124, 130)",textColorDisabled:$e(U.alpha4),placeholderColor:$e(U.alpha4),placeholderColorDisabled:$e(U.alpha5),iconColor:$e(U.alpha4),iconColorHover:ye($e(U.alpha4),{lightness:.75}),iconColorPressed:ye($e(U.alpha4),{lightness:.9}),iconColorDisabled:$e(U.alpha5),opacity1:U.alpha1,opacity2:U.alpha2,opacity3:U.alpha3,opacity4:U.alpha4,opacity5:U.alpha5,dividerColor:"rgb(239, 239, 245)",borderColor:"rgb(224, 224, 230)",closeIconColor:$e(Number(U.alphaClose)),closeIconColorHover:$e(Number(U.alphaClose)),closeIconColorPressed:$e(Number(U.alphaClose)),closeColorHover:"rgba(0, 0, 0, .09)",closeColorPressed:"rgba(0, 0, 0, .13)",clearColor:$e(U.alpha4),clearColorHover:ye($e(U.alpha4),{lightness:.75}),clearColorPressed:ye($e(U.alpha4),{lightness:.9}),scrollbarColor:Ga(U.alphaScrollbar),scrollbarColorHover:Ga(U.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:$e(U.alphaProgressRail),railColor:"rgb(219, 219, 223)",popoverColor:U.neutralPopover,tableColor:U.neutralCard,cardColor:U.neutralCard,modalColor:U.neutralModal,bodyColor:U.neutralBody,tagColor:"#eee",avatarColor:$e(U.alphaAvatar),invertedColor:"rgb(0, 20, 40)",inputColor:$e(U.alphaInput),codeColor:"rgb(244, 244, 248)",tabColor:"rgb(247, 247, 250)",actionColor:"rgb(250, 250, 252)",tableHeaderColor:"rgb(250, 250, 252)",hoverColor:"rgb(243, 243, 245)",tableColorHover:"rgba(0, 0, 100, 0.03)",tableColorStriped:"rgba(0, 0, 100, 0.02)",pressedColor:"rgb(237, 237, 239)",opacityDisabled:U.alphaDisabled,inputColorDisabled:"rgb(250, 250, 252)",buttonColor2:"rgba(46, 51, 56, .05)",buttonColor2Hover:"rgba(46, 51, 56, .09)",buttonColor2Pressed:"rgba(46, 51, 56, .13)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),l0={railInsetHorizontalBottom:"auto 2px 4px 2px",railInsetHorizontalTop:"4px 2px auto 2px",railInsetVerticalRight:"2px 4px 2px auto",railInsetVerticalLeft:"2px auto 2px 4px",railColor:"transparent"};function dc(e){const{scrollbarColor:o,scrollbarColorHover:t,scrollbarHeight:r,scrollbarWidth:n,scrollbarBorderRadius:i}=e;return Object.assign(Object.assign({},l0),{height:r,width:n,borderRadius:i,color:o,colorHover:t})}const un={name:"Scrollbar",common:ge,self:dc},We={name:"Scrollbar",common:A,self:dc},s0={iconSizeTiny:"28px",iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"};function uc(e){const{textColorDisabled:o,iconColor:t,textColor2:r,fontSizeTiny:n,fontSizeSmall:i,fontSizeMedium:a,fontSizeLarge:l,fontSizeHuge:s}=e;return Object.assign(Object.assign({},s0),{fontSizeTiny:n,fontSizeSmall:i,fontSizeMedium:a,fontSizeLarge:l,fontSizeHuge:s,textColor:o,iconColor:t,extraTextColor:r})}const Mi={name:"Empty",common:ge,self:uc},at={name:"Empty",common:A,self:uc},c0={height:"calc(var(--n-option-height) * 7.6)",paddingTiny:"4px 0",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingTiny:"0 12px",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};function fc(e){const{borderRadius:o,popoverColor:t,textColor3:r,dividerColor:n,textColor2:i,primaryColorPressed:a,textColorDisabled:l,primaryColor:s,opacityDisabled:c,hoverColor:d,fontSizeTiny:u,fontSizeSmall:p,fontSizeMedium:g,fontSizeLarge:h,fontSizeHuge:b,heightTiny:y,heightSmall:C,heightMedium:I,heightLarge:E,heightHuge:v}=e;return Object.assign(Object.assign({},c0),{optionFontSizeTiny:u,optionFontSizeSmall:p,optionFontSizeMedium:g,optionFontSizeLarge:h,optionFontSizeHuge:b,optionHeightTiny:y,optionHeightSmall:C,optionHeightMedium:I,optionHeightLarge:E,optionHeightHuge:v,borderRadius:o,color:t,groupHeaderTextColor:r,actionDividerColor:n,optionTextColor:i,optionTextColorPressed:a,optionTextColorDisabled:l,optionTextColorActive:s,optionOpacityDisabled:c,optionCheckColor:s,optionColorPending:d,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:d,actionTextColor:i,loadingColor:s})}const pc={name:"InternalSelectMenu",common:ge,peers:{Scrollbar:un,Empty:Mi},self:fc},lr={name:"InternalSelectMenu",common:A,peers:{Scrollbar:We,Empty:at},self:fc},d0={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"};function hc(e){const{boxShadow2:o,popoverColor:t,textColor2:r,borderRadius:n,fontSize:i,dividerColor:a}=e;return Object.assign(Object.assign({},d0),{fontSize:i,borderRadius:n,color:t,dividerColor:a,textColor:r,boxShadow:o})}const It={name:"Popover",common:ge,self:hc},lt={name:"Popover",common:A,self:hc},u0={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px"},mc={name:"Tag",common:A,self(e){const{textColor2:o,primaryColorHover:t,primaryColorPressed:r,primaryColor:n,infoColor:i,successColor:a,warningColor:l,errorColor:s,baseColor:c,borderColor:d,tagColor:u,opacityDisabled:p,closeIconColor:g,closeIconColorHover:h,closeIconColorPressed:b,closeColorHover:y,closeColorPressed:C,borderRadiusSmall:I,fontSizeMini:E,fontSizeTiny:v,fontSizeSmall:L,fontSizeMedium:W,heightMini:w,heightTiny:K,heightSmall:D,heightMedium:j,buttonColor2Hover:q,buttonColor2Pressed:F,fontWeightStrong:ee}=e;return Object.assign(Object.assign({},u0),{closeBorderRadius:I,heightTiny:w,heightSmall:K,heightMedium:D,heightLarge:j,borderRadius:I,opacityDisabled:p,fontSizeTiny:E,fontSizeSmall:v,fontSizeMedium:L,fontSizeLarge:W,fontWeightStrong:ee,textColorCheckable:o,textColorHoverCheckable:o,textColorPressedCheckable:o,textColorChecked:c,colorCheckable:"#0000",colorHoverCheckable:q,colorPressedCheckable:F,colorChecked:n,colorCheckedHover:t,colorCheckedPressed:r,border:`1px solid ${d}`,textColor:o,color:u,colorBordered:"#0000",closeIconColor:g,closeIconColorHover:h,closeIconColorPressed:b,closeColorHover:y,closeColorPressed:C,borderPrimary:`1px solid ${_(n,{alpha:.3})}`,textColorPrimary:n,colorPrimary:_(n,{alpha:.16}),colorBorderedPrimary:"#0000",closeIconColorPrimary:ye(n,{lightness:.7}),closeIconColorHoverPrimary:ye(n,{lightness:.7}),closeIconColorPressedPrimary:ye(n,{lightness:.7}),closeColorHoverPrimary:_(n,{alpha:.16}),closeColorPressedPrimary:_(n,{alpha:.12}),borderInfo:`1px solid ${_(i,{alpha:.3})}`,textColorInfo:i,colorInfo:_(i,{alpha:.16}),colorBorderedInfo:"#0000",closeIconColorInfo:ye(i,{alpha:.7}),closeIconColorHoverInfo:ye(i,{alpha:.7}),closeIconColorPressedInfo:ye(i,{alpha:.7}),closeColorHoverInfo:_(i,{alpha:.16}),closeColorPressedInfo:_(i,{alpha:.12}),borderSuccess:`1px solid ${_(a,{alpha:.3})}`,textColorSuccess:a,colorSuccess:_(a,{alpha:.16}),colorBorderedSuccess:"#0000",closeIconColorSuccess:ye(a,{alpha:.7}),closeIconColorHoverSuccess:ye(a,{alpha:.7}),closeIconColorPressedSuccess:ye(a,{alpha:.7}),closeColorHoverSuccess:_(a,{alpha:.16}),closeColorPressedSuccess:_(a,{alpha:.12}),borderWarning:`1px solid ${_(l,{alpha:.3})}`,textColorWarning:l,colorWarning:_(l,{alpha:.16}),colorBorderedWarning:"#0000",closeIconColorWarning:ye(l,{alpha:.7}),closeIconColorHoverWarning:ye(l,{alpha:.7}),closeIconColorPressedWarning:ye(l,{alpha:.7}),closeColorHoverWarning:_(l,{alpha:.16}),closeColorPressedWarning:_(l,{alpha:.11}),borderError:`1px solid ${_(s,{alpha:.3})}`,textColorError:s,colorError:_(s,{alpha:.16}),colorBorderedError:"#0000",closeIconColorError:ye(s,{alpha:.7}),closeIconColorHoverError:ye(s,{alpha:.7}),closeIconColorPressedError:ye(s,{alpha:.7}),closeColorHoverError:_(s,{alpha:.16}),closeColorPressedError:_(s,{alpha:.12})})}},gc={paddingSingle:"0 26px 0 12px",paddingMultiple:"3px 26px 0 12px",clearSize:"16px",arrowSize:"16px"},Di={name:"InternalSelection",common:A,peers:{Popover:lt},self(e){const{borderRadius:o,textColor2:t,textColorDisabled:r,inputColor:n,inputColorDisabled:i,primaryColor:a,primaryColorHover:l,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,iconColor:p,iconColorDisabled:g,clearColor:h,clearColorHover:b,clearColorPressed:y,placeholderColor:C,placeholderColorDisabled:I,fontSizeTiny:E,fontSizeSmall:v,fontSizeMedium:L,fontSizeLarge:W,heightTiny:w,heightSmall:K,heightMedium:D,heightLarge:j,fontWeight:q}=e;return Object.assign(Object.assign({},gc),{fontWeight:q,fontSizeTiny:E,fontSizeSmall:v,fontSizeMedium:L,fontSizeLarge:W,heightTiny:w,heightSmall:K,heightMedium:D,heightLarge:j,borderRadius:o,textColor:t,textColorDisabled:r,placeholderColor:C,placeholderColorDisabled:I,color:n,colorDisabled:i,colorActive:_(a,{alpha:.1}),border:"1px solid #0000",borderHover:`1px solid ${l}`,borderActive:`1px solid ${a}`,borderFocus:`1px solid ${l}`,boxShadowHover:"none",boxShadowActive:`0 0 8px 0 ${_(a,{alpha:.4})}`,boxShadowFocus:`0 0 8px 0 ${_(a,{alpha:.4})}`,caretColor:a,arrowColor:p,arrowColorDisabled:g,loadingColor:a,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,borderActiveWarning:`1px solid ${s}`,borderFocusWarning:`1px solid ${c}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 8px 0 ${_(s,{alpha:.4})}`,boxShadowFocusWarning:`0 0 8px 0 ${_(s,{alpha:.4})}`,colorActiveWarning:_(s,{alpha:.1}),caretColorWarning:s,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,borderActiveError:`1px solid ${d}`,borderFocusError:`1px solid ${u}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 8px 0 ${_(d,{alpha:.4})}`,boxShadowFocusError:`0 0 8px 0 ${_(d,{alpha:.4})}`,colorActiveError:_(d,{alpha:.1}),caretColorError:d,clearColor:h,clearColorHover:b,clearColorPressed:y})}};function f0(e){const{borderRadius:o,textColor2:t,textColorDisabled:r,inputColor:n,inputColorDisabled:i,primaryColor:a,primaryColorHover:l,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,borderColor:p,iconColor:g,iconColorDisabled:h,clearColor:b,clearColorHover:y,clearColorPressed:C,placeholderColor:I,placeholderColorDisabled:E,fontSizeTiny:v,fontSizeSmall:L,fontSizeMedium:W,fontSizeLarge:w,heightTiny:K,heightSmall:D,heightMedium:j,heightLarge:q,fontWeight:F}=e;return Object.assign(Object.assign({},gc),{fontSizeTiny:v,fontSizeSmall:L,fontSizeMedium:W,fontSizeLarge:w,heightTiny:K,heightSmall:D,heightMedium:j,heightLarge:q,borderRadius:o,fontWeight:F,textColor:t,textColorDisabled:r,placeholderColor:I,placeholderColorDisabled:E,color:n,colorDisabled:i,colorActive:n,border:`1px solid ${p}`,borderHover:`1px solid ${l}`,borderActive:`1px solid ${a}`,borderFocus:`1px solid ${l}`,boxShadowHover:"none",boxShadowActive:`0 0 0 2px ${_(a,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${_(a,{alpha:.2})}`,caretColor:a,arrowColor:g,arrowColorDisabled:h,loadingColor:a,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,borderActiveWarning:`1px solid ${s}`,borderFocusWarning:`1px solid ${c}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 0 2px ${_(s,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${_(s,{alpha:.2})}`,colorActiveWarning:n,caretColorWarning:s,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,borderActiveError:`1px solid ${d}`,borderFocusError:`1px solid ${u}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 0 2px ${_(d,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${_(d,{alpha:.2})}`,colorActiveError:n,caretColorError:d,clearColor:b,clearColorHover:y,clearColorPressed:C})}const p0={name:"InternalSelection",common:ge,peers:{Popover:It},self:f0},{cubicBezierEaseInOut:Do}=$t;function h0({duration:e=".2s",delay:o=".1s"}={}){return[Q("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),Q("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",` opacity: 0!important; margin-left: 0!important; margin-right: 0!important; @@ -146,7 +146,7 @@ ${o} top: 0; bottom: 0; border-radius: inherit; -`),g0=Je({name:"BaseWave",props:{clsPrefix:{type:String,required:!0}},setup(e){dn("-base-wave",m0,qr(e,"clsPrefix"));const o=Be(null),t=Be(!1);let r=null;return Xr(()=>{r!==null&&window.clearTimeout(r)}),{active:t,selfRef:o,play(){r!==null&&(window.clearTimeout(r),t.value=!1,r=null),wl(()=>{var n;(n=o.value)===null||n===void 0||n.offsetHeight,t.value=!0,r=window.setTimeout(()=>{t.value=!1,r=null},1e3)})}}},render(){const{clsPrefix:e}=this;return O("div",{ref:"selfRef","aria-hidden":!0,class:[`${e}-base-wave`,this.active&&`${e}-base-wave--active`]})}}),b0={iconMargin:"11px 8px 0 12px",iconMarginRtl:"11px 12px 0 8px",iconSize:"24px",closeIconSize:"16px",closeSize:"20px",closeMargin:"13px 14px 0 0",closeMarginRtl:"13px 0 0 14px",padding:"13px"},C0={name:"Alert",common:A,self(e){const{lineHeight:o,borderRadius:t,fontWeightStrong:r,dividerColor:n,inputColor:i,textColor1:a,textColor2:l,closeColorHover:s,closeColorPressed:c,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,infoColorSuppl:g,successColorSuppl:h,warningColorSuppl:b,errorColorSuppl:y,fontSize:C}=e;return Object.assign(Object.assign({},b0),{fontSize:C,lineHeight:o,titleFontWeight:r,borderRadius:t,border:`1px solid ${n}`,color:i,titleTextColor:a,iconColor:l,contentTextColor:l,closeBorderRadius:t,closeColorHover:s,closeColorPressed:c,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,borderInfo:`1px solid ${_(g,{alpha:.35})}`,colorInfo:_(g,{alpha:.25}),titleTextColorInfo:a,iconColorInfo:g,contentTextColorInfo:l,closeColorHoverInfo:s,closeColorPressedInfo:c,closeIconColorInfo:d,closeIconColorHoverInfo:u,closeIconColorPressedInfo:p,borderSuccess:`1px solid ${_(h,{alpha:.35})}`,colorSuccess:_(h,{alpha:.25}),titleTextColorSuccess:a,iconColorSuccess:h,contentTextColorSuccess:l,closeColorHoverSuccess:s,closeColorPressedSuccess:c,closeIconColorSuccess:d,closeIconColorHoverSuccess:u,closeIconColorPressedSuccess:p,borderWarning:`1px solid ${_(b,{alpha:.35})}`,colorWarning:_(b,{alpha:.25}),titleTextColorWarning:a,iconColorWarning:b,contentTextColorWarning:l,closeColorHoverWarning:s,closeColorPressedWarning:c,closeIconColorWarning:d,closeIconColorHoverWarning:u,closeIconColorPressedWarning:p,borderError:`1px solid ${_(y,{alpha:.35})}`,colorError:_(y,{alpha:.25}),titleTextColorError:a,iconColorError:y,contentTextColorError:l,closeColorHoverError:s,closeColorPressedError:c,closeIconColorError:d,closeIconColorHoverError:u,closeIconColorPressedError:p})}},{cubicBezierEaseInOut:so,cubicBezierEaseOut:x0,cubicBezierEaseIn:v0}=$t;function y0({overflow:e="hidden",duration:o=".3s",originalTransition:t="",leavingDelay:r="0s",foldPadding:n=!1,enterToProps:i=void 0,leaveToProps:a=void 0,reverse:l=!1}={}){const s=l?"leave":"enter",c=l?"enter":"leave";return[Q(`&.fade-in-height-expand-transition-${c}-from, +`),g0=Je({name:"BaseWave",props:{clsPrefix:{type:String,required:!0}},setup(e){dn("-base-wave",m0,qr(e,"clsPrefix"));const o=Be(null),t=Be(!1);let r=null;return Xr(()=>{r!==null&&window.clearTimeout(r)}),{active:t,selfRef:o,play(){r!==null&&(window.clearTimeout(r),t.value=!1,r=null),wl(()=>{var n;(n=o.value)===null||n===void 0||n.offsetHeight,t.value=!0,r=window.setTimeout(()=>{t.value=!1,r=null},1e3)})}}},render(){const{clsPrefix:e}=this;return z("div",{ref:"selfRef","aria-hidden":!0,class:[`${e}-base-wave`,this.active&&`${e}-base-wave--active`]})}}),b0={iconMargin:"11px 8px 0 12px",iconMarginRtl:"11px 12px 0 8px",iconSize:"24px",closeIconSize:"16px",closeSize:"20px",closeMargin:"13px 14px 0 0",closeMarginRtl:"13px 0 0 14px",padding:"13px"},C0={name:"Alert",common:A,self(e){const{lineHeight:o,borderRadius:t,fontWeightStrong:r,dividerColor:n,inputColor:i,textColor1:a,textColor2:l,closeColorHover:s,closeColorPressed:c,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,infoColorSuppl:g,successColorSuppl:h,warningColorSuppl:b,errorColorSuppl:y,fontSize:C}=e;return Object.assign(Object.assign({},b0),{fontSize:C,lineHeight:o,titleFontWeight:r,borderRadius:t,border:`1px solid ${n}`,color:i,titleTextColor:a,iconColor:l,contentTextColor:l,closeBorderRadius:t,closeColorHover:s,closeColorPressed:c,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,borderInfo:`1px solid ${_(g,{alpha:.35})}`,colorInfo:_(g,{alpha:.25}),titleTextColorInfo:a,iconColorInfo:g,contentTextColorInfo:l,closeColorHoverInfo:s,closeColorPressedInfo:c,closeIconColorInfo:d,closeIconColorHoverInfo:u,closeIconColorPressedInfo:p,borderSuccess:`1px solid ${_(h,{alpha:.35})}`,colorSuccess:_(h,{alpha:.25}),titleTextColorSuccess:a,iconColorSuccess:h,contentTextColorSuccess:l,closeColorHoverSuccess:s,closeColorPressedSuccess:c,closeIconColorSuccess:d,closeIconColorHoverSuccess:u,closeIconColorPressedSuccess:p,borderWarning:`1px solid ${_(b,{alpha:.35})}`,colorWarning:_(b,{alpha:.25}),titleTextColorWarning:a,iconColorWarning:b,contentTextColorWarning:l,closeColorHoverWarning:s,closeColorPressedWarning:c,closeIconColorWarning:d,closeIconColorHoverWarning:u,closeIconColorPressedWarning:p,borderError:`1px solid ${_(y,{alpha:.35})}`,colorError:_(y,{alpha:.25}),titleTextColorError:a,iconColorError:y,contentTextColorError:l,closeColorHoverError:s,closeColorPressedError:c,closeIconColorError:d,closeIconColorHoverError:u,closeIconColorPressedError:p})}},{cubicBezierEaseInOut:so,cubicBezierEaseOut:x0,cubicBezierEaseIn:v0}=$t;function y0({overflow:e="hidden",duration:o=".3s",originalTransition:t="",leavingDelay:r="0s",foldPadding:n=!1,enterToProps:i=void 0,leaveToProps:a=void 0,reverse:l=!1}={}){const s=l?"leave":"enter",c=l?"enter":"leave";return[Q(`&.fade-in-height-expand-transition-${c}-from, &.fade-in-height-expand-transition-${s}-to`,Object.assign(Object.assign({},i),{opacity:1})),Q(`&.fade-in-height-expand-transition-${c}-to, &.fade-in-height-expand-transition-${s}-from`,Object.assign(Object.assign({},a),{opacity:0,marginTop:"0 !important",marginBottom:"0 !important",paddingTop:n?"0 !important":void 0,paddingBottom:n?"0 !important":void 0})),Q(`&.fade-in-height-expand-transition-${c}-active`,` overflow: ${e}; @@ -168,7 +168,7 @@ ${o} padding-top ${o} ${so}, padding-bottom ${o} ${so} ${t?`,${t}`:""} - `)]}const S0={linkFontSize:"13px",linkPadding:"0 0 0 16px",railWidth:"4px"};function w0(e){const{borderRadius:o,railColor:t,primaryColor:r,primaryColorHover:n,primaryColorPressed:i,textColor2:a}=e;return Object.assign(Object.assign({},S0),{borderRadius:o,railColor:t,railColorActive:r,linkColor:_(r,{alpha:.15}),linkTextColor:a,linkTextColorHover:n,linkTextColorPressed:i,linkTextColorActive:r})}const P0={name:"Anchor",common:A,self:w0},T0=nn&&"chrome"in window;nn&&navigator.userAgent.includes("Firefox");const $0=nn&&navigator.userAgent.includes("Safari")&&!T0,bc={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"},eo={name:"Input",common:A,self(e){const{textColor2:o,textColor3:t,textColorDisabled:r,primaryColor:n,primaryColorHover:i,inputColor:a,inputColorDisabled:l,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,borderRadius:p,lineHeight:g,fontSizeTiny:h,fontSizeSmall:b,fontSizeMedium:y,fontSizeLarge:C,heightTiny:I,heightSmall:E,heightMedium:v,heightLarge:L,clearColor:W,clearColorHover:w,clearColorPressed:K,placeholderColor:D,placeholderColorDisabled:j,iconColor:q,iconColorDisabled:F,iconColorHover:ee,iconColorPressed:ae,fontWeight:xe}=e;return Object.assign(Object.assign({},bc),{fontWeight:xe,countTextColorDisabled:r,countTextColor:t,heightTiny:I,heightSmall:E,heightMedium:v,heightLarge:L,fontSizeTiny:h,fontSizeSmall:b,fontSizeMedium:y,fontSizeLarge:C,lineHeight:g,lineHeightTextarea:g,borderRadius:p,iconSize:"16px",groupLabelColor:a,textColor:o,textColorDisabled:r,textDecorationColor:o,groupLabelTextColor:o,caretColor:n,placeholderColor:D,placeholderColorDisabled:j,color:a,colorDisabled:l,colorFocus:_(n,{alpha:.1}),groupLabelBorder:"1px solid #0000",border:"1px solid #0000",borderHover:`1px solid ${i}`,borderDisabled:"1px solid #0000",borderFocus:`1px solid ${i}`,boxShadowFocus:`0 0 8px 0 ${_(n,{alpha:.3})}`,loadingColor:n,loadingColorWarning:s,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,colorFocusWarning:_(s,{alpha:.1}),borderFocusWarning:`1px solid ${c}`,boxShadowFocusWarning:`0 0 8px 0 ${_(s,{alpha:.3})}`,caretColorWarning:s,loadingColorError:d,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,colorFocusError:_(d,{alpha:.1}),borderFocusError:`1px solid ${u}`,boxShadowFocusError:`0 0 8px 0 ${_(d,{alpha:.3})}`,caretColorError:d,clearColor:W,clearColorHover:w,clearColorPressed:K,iconColor:q,iconColorDisabled:F,iconColorHover:ee,iconColorPressed:ae,suffixTextColor:o})}};function I0(e){const{textColor2:o,textColor3:t,textColorDisabled:r,primaryColor:n,primaryColorHover:i,inputColor:a,inputColorDisabled:l,borderColor:s,warningColor:c,warningColorHover:d,errorColor:u,errorColorHover:p,borderRadius:g,lineHeight:h,fontSizeTiny:b,fontSizeSmall:y,fontSizeMedium:C,fontSizeLarge:I,heightTiny:E,heightSmall:v,heightMedium:L,heightLarge:W,actionColor:w,clearColor:K,clearColorHover:D,clearColorPressed:j,placeholderColor:q,placeholderColorDisabled:F,iconColor:ee,iconColorDisabled:ae,iconColorHover:xe,iconColorPressed:oe,fontWeight:V}=e;return Object.assign(Object.assign({},bc),{fontWeight:V,countTextColorDisabled:r,countTextColor:t,heightTiny:E,heightSmall:v,heightMedium:L,heightLarge:W,fontSizeTiny:b,fontSizeSmall:y,fontSizeMedium:C,fontSizeLarge:I,lineHeight:h,lineHeightTextarea:h,borderRadius:g,iconSize:"16px",groupLabelColor:w,groupLabelTextColor:o,textColor:o,textColorDisabled:r,textDecorationColor:o,caretColor:n,placeholderColor:q,placeholderColorDisabled:F,color:a,colorDisabled:l,colorFocus:a,groupLabelBorder:`1px solid ${s}`,border:`1px solid ${s}`,borderHover:`1px solid ${i}`,borderDisabled:`1px solid ${s}`,borderFocus:`1px solid ${i}`,boxShadowFocus:`0 0 0 2px ${_(n,{alpha:.2})}`,loadingColor:n,loadingColorWarning:c,borderWarning:`1px solid ${c}`,borderHoverWarning:`1px solid ${d}`,colorFocusWarning:a,borderFocusWarning:`1px solid ${d}`,boxShadowFocusWarning:`0 0 0 2px ${_(c,{alpha:.2})}`,caretColorWarning:c,loadingColorError:u,borderError:`1px solid ${u}`,borderHoverError:`1px solid ${p}`,colorFocusError:a,borderFocusError:`1px solid ${p}`,boxShadowFocusError:`0 0 0 2px ${_(u,{alpha:.2})}`,caretColorError:u,clearColor:K,clearColorHover:D,clearColorPressed:j,iconColor:ee,iconColorDisabled:ae,iconColorHover:xe,iconColorPressed:oe,suffixTextColor:o})}const _i={name:"Input",common:ge,self:I0};function H0(e){const{boxShadow2:o}=e;return{menuBoxShadow:o}}const F0={name:"AutoComplete",common:A,peers:{InternalSelectMenu:lr,Input:eo},self:H0};function A0(e){const{borderRadius:o,avatarColor:t,cardColor:r,fontSize:n,heightTiny:i,heightSmall:a,heightMedium:l,heightLarge:s,heightHuge:c,modalColor:d,popoverColor:u}=e;return{borderRadius:o,fontSize:n,border:`2px solid ${r}`,heightTiny:i,heightSmall:a,heightMedium:l,heightLarge:s,heightHuge:c,color:B(r,t),colorModal:B(d,t),colorPopover:B(u,t)}}const Cc={name:"Avatar",common:A,self:A0};function M0(){return{gap:"-12px"}}const D0={name:"AvatarGroup",common:A,peers:{Avatar:Cc},self:M0},_0={width:"44px",height:"44px",borderRadius:"22px",iconSize:"26px"},E0={name:"BackTop",common:A,self(e){const{popoverColor:o,textColor2:t,primaryColorHover:r,primaryColorPressed:n}=e;return Object.assign(Object.assign({},_0),{color:o,textColor:t,iconColor:t,iconColorHover:r,iconColorPressed:n,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)",boxShadowHover:"0 2px 12px 0px rgba(0, 0, 0, .18)",boxShadowPressed:"0 2px 12px 0px rgba(0, 0, 0, .18)"})}},R0={name:"Badge",common:A,self(e){const{errorColorSuppl:o,infoColorSuppl:t,successColorSuppl:r,warningColorSuppl:n,fontFamily:i}=e;return{color:o,colorInfo:t,colorSuccess:r,colorError:o,colorWarning:n,fontSize:"12px",fontFamily:i}}},L0={fontWeightActive:"400"};function k0(e){const{fontSize:o,textColor3:t,textColor2:r,borderRadius:n,buttonColor2Hover:i,buttonColor2Pressed:a}=e;return Object.assign(Object.assign({},L0),{fontSize:o,itemLineHeight:"1.25",itemTextColor:t,itemTextColorHover:r,itemTextColorPressed:r,itemTextColorActive:r,itemBorderRadius:n,itemColorHover:i,itemColorPressed:a,separatorColor:t})}const z0={name:"Breadcrumb",common:A,self:k0};function qo(e){return B(e,[255,255,255,.16])}function xr(e){return B(e,[0,0,0,.12])}const O0="n-button-group",B0={paddingTiny:"0 6px",paddingSmall:"0 10px",paddingMedium:"0 14px",paddingLarge:"0 18px",paddingRoundTiny:"0 10px",paddingRoundSmall:"0 14px",paddingRoundMedium:"0 18px",paddingRoundLarge:"0 22px",iconMarginTiny:"6px",iconMarginSmall:"6px",iconMarginMedium:"6px",iconMarginLarge:"6px",iconSizeTiny:"14px",iconSizeSmall:"18px",iconSizeMedium:"18px",iconSizeLarge:"20px",rippleDuration:".6s"};function xc(e){const{heightTiny:o,heightSmall:t,heightMedium:r,heightLarge:n,borderRadius:i,fontSizeTiny:a,fontSizeSmall:l,fontSizeMedium:s,fontSizeLarge:c,opacityDisabled:d,textColor2:u,textColor3:p,primaryColorHover:g,primaryColorPressed:h,borderColor:b,primaryColor:y,baseColor:C,infoColor:I,infoColorHover:E,infoColorPressed:v,successColor:L,successColorHover:W,successColorPressed:w,warningColor:K,warningColorHover:D,warningColorPressed:j,errorColor:q,errorColorHover:F,errorColorPressed:ee,fontWeight:ae,buttonColor2:xe,buttonColor2Hover:oe,buttonColor2Pressed:V,fontWeightStrong:re}=e;return Object.assign(Object.assign({},B0),{heightTiny:o,heightSmall:t,heightMedium:r,heightLarge:n,borderRadiusTiny:i,borderRadiusSmall:i,borderRadiusMedium:i,borderRadiusLarge:i,fontSizeTiny:a,fontSizeSmall:l,fontSizeMedium:s,fontSizeLarge:c,opacityDisabled:d,colorOpacitySecondary:"0.16",colorOpacitySecondaryHover:"0.22",colorOpacitySecondaryPressed:"0.28",colorSecondary:xe,colorSecondaryHover:oe,colorSecondaryPressed:V,colorTertiary:xe,colorTertiaryHover:oe,colorTertiaryPressed:V,colorQuaternary:"#0000",colorQuaternaryHover:oe,colorQuaternaryPressed:V,color:"#0000",colorHover:"#0000",colorPressed:"#0000",colorFocus:"#0000",colorDisabled:"#0000",textColor:u,textColorTertiary:p,textColorHover:g,textColorPressed:h,textColorFocus:g,textColorDisabled:u,textColorText:u,textColorTextHover:g,textColorTextPressed:h,textColorTextFocus:g,textColorTextDisabled:u,textColorGhost:u,textColorGhostHover:g,textColorGhostPressed:h,textColorGhostFocus:g,textColorGhostDisabled:u,border:`1px solid ${b}`,borderHover:`1px solid ${g}`,borderPressed:`1px solid ${h}`,borderFocus:`1px solid ${g}`,borderDisabled:`1px solid ${b}`,rippleColor:y,colorPrimary:y,colorHoverPrimary:g,colorPressedPrimary:h,colorFocusPrimary:g,colorDisabledPrimary:y,textColorPrimary:C,textColorHoverPrimary:C,textColorPressedPrimary:C,textColorFocusPrimary:C,textColorDisabledPrimary:C,textColorTextPrimary:y,textColorTextHoverPrimary:g,textColorTextPressedPrimary:h,textColorTextFocusPrimary:g,textColorTextDisabledPrimary:u,textColorGhostPrimary:y,textColorGhostHoverPrimary:g,textColorGhostPressedPrimary:h,textColorGhostFocusPrimary:g,textColorGhostDisabledPrimary:y,borderPrimary:`1px solid ${y}`,borderHoverPrimary:`1px solid ${g}`,borderPressedPrimary:`1px solid ${h}`,borderFocusPrimary:`1px solid ${g}`,borderDisabledPrimary:`1px solid ${y}`,rippleColorPrimary:y,colorInfo:I,colorHoverInfo:E,colorPressedInfo:v,colorFocusInfo:E,colorDisabledInfo:I,textColorInfo:C,textColorHoverInfo:C,textColorPressedInfo:C,textColorFocusInfo:C,textColorDisabledInfo:C,textColorTextInfo:I,textColorTextHoverInfo:E,textColorTextPressedInfo:v,textColorTextFocusInfo:E,textColorTextDisabledInfo:u,textColorGhostInfo:I,textColorGhostHoverInfo:E,textColorGhostPressedInfo:v,textColorGhostFocusInfo:E,textColorGhostDisabledInfo:I,borderInfo:`1px solid ${I}`,borderHoverInfo:`1px solid ${E}`,borderPressedInfo:`1px solid ${v}`,borderFocusInfo:`1px solid ${E}`,borderDisabledInfo:`1px solid ${I}`,rippleColorInfo:I,colorSuccess:L,colorHoverSuccess:W,colorPressedSuccess:w,colorFocusSuccess:W,colorDisabledSuccess:L,textColorSuccess:C,textColorHoverSuccess:C,textColorPressedSuccess:C,textColorFocusSuccess:C,textColorDisabledSuccess:C,textColorTextSuccess:L,textColorTextHoverSuccess:W,textColorTextPressedSuccess:w,textColorTextFocusSuccess:W,textColorTextDisabledSuccess:u,textColorGhostSuccess:L,textColorGhostHoverSuccess:W,textColorGhostPressedSuccess:w,textColorGhostFocusSuccess:W,textColorGhostDisabledSuccess:L,borderSuccess:`1px solid ${L}`,borderHoverSuccess:`1px solid ${W}`,borderPressedSuccess:`1px solid ${w}`,borderFocusSuccess:`1px solid ${W}`,borderDisabledSuccess:`1px solid ${L}`,rippleColorSuccess:L,colorWarning:K,colorHoverWarning:D,colorPressedWarning:j,colorFocusWarning:D,colorDisabledWarning:K,textColorWarning:C,textColorHoverWarning:C,textColorPressedWarning:C,textColorFocusWarning:C,textColorDisabledWarning:C,textColorTextWarning:K,textColorTextHoverWarning:D,textColorTextPressedWarning:j,textColorTextFocusWarning:D,textColorTextDisabledWarning:u,textColorGhostWarning:K,textColorGhostHoverWarning:D,textColorGhostPressedWarning:j,textColorGhostFocusWarning:D,textColorGhostDisabledWarning:K,borderWarning:`1px solid ${K}`,borderHoverWarning:`1px solid ${D}`,borderPressedWarning:`1px solid ${j}`,borderFocusWarning:`1px solid ${D}`,borderDisabledWarning:`1px solid ${K}`,rippleColorWarning:K,colorError:q,colorHoverError:F,colorPressedError:ee,colorFocusError:F,colorDisabledError:q,textColorError:C,textColorHoverError:C,textColorPressedError:C,textColorFocusError:C,textColorDisabledError:C,textColorTextError:q,textColorTextHoverError:F,textColorTextPressedError:ee,textColorTextFocusError:F,textColorTextDisabledError:u,textColorGhostError:q,textColorGhostHoverError:F,textColorGhostPressedError:ee,textColorGhostFocusError:F,textColorGhostDisabledError:q,borderError:`1px solid ${q}`,borderHoverError:`1px solid ${F}`,borderPressedError:`1px solid ${ee}`,borderFocusError:`1px solid ${F}`,borderDisabledError:`1px solid ${q}`,rippleColorError:q,waveOpacity:"0.6",fontWeight:ae,fontWeightStrong:re})}const sr={name:"Button",common:ge,self:xc},je={name:"Button",common:A,self(e){const o=xc(e);return o.waveOpacity="0.8",o.colorOpacitySecondary="0.16",o.colorOpacitySecondaryHover="0.2",o.colorOpacitySecondaryPressed="0.12",o}},W0=Q([to("button",` + `)]}const S0={linkFontSize:"13px",linkPadding:"0 0 0 16px",railWidth:"4px"};function w0(e){const{borderRadius:o,railColor:t,primaryColor:r,primaryColorHover:n,primaryColorPressed:i,textColor2:a}=e;return Object.assign(Object.assign({},S0),{borderRadius:o,railColor:t,railColorActive:r,linkColor:_(r,{alpha:.15}),linkTextColor:a,linkTextColorHover:n,linkTextColorPressed:i,linkTextColorActive:r})}const P0={name:"Anchor",common:A,self:w0},T0=nn&&"chrome"in window;nn&&navigator.userAgent.includes("Firefox");const $0=nn&&navigator.userAgent.includes("Safari")&&!T0,bc={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"},eo={name:"Input",common:A,self(e){const{textColor2:o,textColor3:t,textColorDisabled:r,primaryColor:n,primaryColorHover:i,inputColor:a,inputColorDisabled:l,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,borderRadius:p,lineHeight:g,fontSizeTiny:h,fontSizeSmall:b,fontSizeMedium:y,fontSizeLarge:C,heightTiny:I,heightSmall:E,heightMedium:v,heightLarge:L,clearColor:W,clearColorHover:w,clearColorPressed:K,placeholderColor:D,placeholderColorDisabled:j,iconColor:q,iconColorDisabled:F,iconColorHover:ee,iconColorPressed:ae,fontWeight:xe}=e;return Object.assign(Object.assign({},bc),{fontWeight:xe,countTextColorDisabled:r,countTextColor:t,heightTiny:I,heightSmall:E,heightMedium:v,heightLarge:L,fontSizeTiny:h,fontSizeSmall:b,fontSizeMedium:y,fontSizeLarge:C,lineHeight:g,lineHeightTextarea:g,borderRadius:p,iconSize:"16px",groupLabelColor:a,textColor:o,textColorDisabled:r,textDecorationColor:o,groupLabelTextColor:o,caretColor:n,placeholderColor:D,placeholderColorDisabled:j,color:a,colorDisabled:l,colorFocus:_(n,{alpha:.1}),groupLabelBorder:"1px solid #0000",border:"1px solid #0000",borderHover:`1px solid ${i}`,borderDisabled:"1px solid #0000",borderFocus:`1px solid ${i}`,boxShadowFocus:`0 0 8px 0 ${_(n,{alpha:.3})}`,loadingColor:n,loadingColorWarning:s,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,colorFocusWarning:_(s,{alpha:.1}),borderFocusWarning:`1px solid ${c}`,boxShadowFocusWarning:`0 0 8px 0 ${_(s,{alpha:.3})}`,caretColorWarning:s,loadingColorError:d,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,colorFocusError:_(d,{alpha:.1}),borderFocusError:`1px solid ${u}`,boxShadowFocusError:`0 0 8px 0 ${_(d,{alpha:.3})}`,caretColorError:d,clearColor:W,clearColorHover:w,clearColorPressed:K,iconColor:q,iconColorDisabled:F,iconColorHover:ee,iconColorPressed:ae,suffixTextColor:o})}};function I0(e){const{textColor2:o,textColor3:t,textColorDisabled:r,primaryColor:n,primaryColorHover:i,inputColor:a,inputColorDisabled:l,borderColor:s,warningColor:c,warningColorHover:d,errorColor:u,errorColorHover:p,borderRadius:g,lineHeight:h,fontSizeTiny:b,fontSizeSmall:y,fontSizeMedium:C,fontSizeLarge:I,heightTiny:E,heightSmall:v,heightMedium:L,heightLarge:W,actionColor:w,clearColor:K,clearColorHover:D,clearColorPressed:j,placeholderColor:q,placeholderColorDisabled:F,iconColor:ee,iconColorDisabled:ae,iconColorHover:xe,iconColorPressed:oe,fontWeight:V}=e;return Object.assign(Object.assign({},bc),{fontWeight:V,countTextColorDisabled:r,countTextColor:t,heightTiny:E,heightSmall:v,heightMedium:L,heightLarge:W,fontSizeTiny:b,fontSizeSmall:y,fontSizeMedium:C,fontSizeLarge:I,lineHeight:h,lineHeightTextarea:h,borderRadius:g,iconSize:"16px",groupLabelColor:w,groupLabelTextColor:o,textColor:o,textColorDisabled:r,textDecorationColor:o,caretColor:n,placeholderColor:q,placeholderColorDisabled:F,color:a,colorDisabled:l,colorFocus:a,groupLabelBorder:`1px solid ${s}`,border:`1px solid ${s}`,borderHover:`1px solid ${i}`,borderDisabled:`1px solid ${s}`,borderFocus:`1px solid ${i}`,boxShadowFocus:`0 0 0 2px ${_(n,{alpha:.2})}`,loadingColor:n,loadingColorWarning:c,borderWarning:`1px solid ${c}`,borderHoverWarning:`1px solid ${d}`,colorFocusWarning:a,borderFocusWarning:`1px solid ${d}`,boxShadowFocusWarning:`0 0 0 2px ${_(c,{alpha:.2})}`,caretColorWarning:c,loadingColorError:u,borderError:`1px solid ${u}`,borderHoverError:`1px solid ${p}`,colorFocusError:a,borderFocusError:`1px solid ${p}`,boxShadowFocusError:`0 0 0 2px ${_(u,{alpha:.2})}`,caretColorError:u,clearColor:K,clearColorHover:D,clearColorPressed:j,iconColor:ee,iconColorDisabled:ae,iconColorHover:xe,iconColorPressed:oe,suffixTextColor:o})}const _i={name:"Input",common:ge,self:I0};function H0(e){const{boxShadow2:o}=e;return{menuBoxShadow:o}}const F0={name:"AutoComplete",common:A,peers:{InternalSelectMenu:lr,Input:eo},self:H0};function A0(e){const{borderRadius:o,avatarColor:t,cardColor:r,fontSize:n,heightTiny:i,heightSmall:a,heightMedium:l,heightLarge:s,heightHuge:c,modalColor:d,popoverColor:u}=e;return{borderRadius:o,fontSize:n,border:`2px solid ${r}`,heightTiny:i,heightSmall:a,heightMedium:l,heightLarge:s,heightHuge:c,color:B(r,t),colorModal:B(d,t),colorPopover:B(u,t)}}const Cc={name:"Avatar",common:A,self:A0};function M0(){return{gap:"-12px"}}const D0={name:"AvatarGroup",common:A,peers:{Avatar:Cc},self:M0},_0={width:"44px",height:"44px",borderRadius:"22px",iconSize:"26px"},E0={name:"BackTop",common:A,self(e){const{popoverColor:o,textColor2:t,primaryColorHover:r,primaryColorPressed:n}=e;return Object.assign(Object.assign({},_0),{color:o,textColor:t,iconColor:t,iconColorHover:r,iconColorPressed:n,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)",boxShadowHover:"0 2px 12px 0px rgba(0, 0, 0, .18)",boxShadowPressed:"0 2px 12px 0px rgba(0, 0, 0, .18)"})}},R0={name:"Badge",common:A,self(e){const{errorColorSuppl:o,infoColorSuppl:t,successColorSuppl:r,warningColorSuppl:n,fontFamily:i}=e;return{color:o,colorInfo:t,colorSuccess:r,colorError:o,colorWarning:n,fontSize:"12px",fontFamily:i}}},L0={fontWeightActive:"400"};function k0(e){const{fontSize:o,textColor3:t,textColor2:r,borderRadius:n,buttonColor2Hover:i,buttonColor2Pressed:a}=e;return Object.assign(Object.assign({},L0),{fontSize:o,itemLineHeight:"1.25",itemTextColor:t,itemTextColorHover:r,itemTextColorPressed:r,itemTextColorActive:r,itemBorderRadius:n,itemColorHover:i,itemColorPressed:a,separatorColor:t})}const O0={name:"Breadcrumb",common:A,self:k0};function qo(e){return B(e,[255,255,255,.16])}function xr(e){return B(e,[0,0,0,.12])}const z0="n-button-group",B0={paddingTiny:"0 6px",paddingSmall:"0 10px",paddingMedium:"0 14px",paddingLarge:"0 18px",paddingRoundTiny:"0 10px",paddingRoundSmall:"0 14px",paddingRoundMedium:"0 18px",paddingRoundLarge:"0 22px",iconMarginTiny:"6px",iconMarginSmall:"6px",iconMarginMedium:"6px",iconMarginLarge:"6px",iconSizeTiny:"14px",iconSizeSmall:"18px",iconSizeMedium:"18px",iconSizeLarge:"20px",rippleDuration:".6s"};function xc(e){const{heightTiny:o,heightSmall:t,heightMedium:r,heightLarge:n,borderRadius:i,fontSizeTiny:a,fontSizeSmall:l,fontSizeMedium:s,fontSizeLarge:c,opacityDisabled:d,textColor2:u,textColor3:p,primaryColorHover:g,primaryColorPressed:h,borderColor:b,primaryColor:y,baseColor:C,infoColor:I,infoColorHover:E,infoColorPressed:v,successColor:L,successColorHover:W,successColorPressed:w,warningColor:K,warningColorHover:D,warningColorPressed:j,errorColor:q,errorColorHover:F,errorColorPressed:ee,fontWeight:ae,buttonColor2:xe,buttonColor2Hover:oe,buttonColor2Pressed:V,fontWeightStrong:re}=e;return Object.assign(Object.assign({},B0),{heightTiny:o,heightSmall:t,heightMedium:r,heightLarge:n,borderRadiusTiny:i,borderRadiusSmall:i,borderRadiusMedium:i,borderRadiusLarge:i,fontSizeTiny:a,fontSizeSmall:l,fontSizeMedium:s,fontSizeLarge:c,opacityDisabled:d,colorOpacitySecondary:"0.16",colorOpacitySecondaryHover:"0.22",colorOpacitySecondaryPressed:"0.28",colorSecondary:xe,colorSecondaryHover:oe,colorSecondaryPressed:V,colorTertiary:xe,colorTertiaryHover:oe,colorTertiaryPressed:V,colorQuaternary:"#0000",colorQuaternaryHover:oe,colorQuaternaryPressed:V,color:"#0000",colorHover:"#0000",colorPressed:"#0000",colorFocus:"#0000",colorDisabled:"#0000",textColor:u,textColorTertiary:p,textColorHover:g,textColorPressed:h,textColorFocus:g,textColorDisabled:u,textColorText:u,textColorTextHover:g,textColorTextPressed:h,textColorTextFocus:g,textColorTextDisabled:u,textColorGhost:u,textColorGhostHover:g,textColorGhostPressed:h,textColorGhostFocus:g,textColorGhostDisabled:u,border:`1px solid ${b}`,borderHover:`1px solid ${g}`,borderPressed:`1px solid ${h}`,borderFocus:`1px solid ${g}`,borderDisabled:`1px solid ${b}`,rippleColor:y,colorPrimary:y,colorHoverPrimary:g,colorPressedPrimary:h,colorFocusPrimary:g,colorDisabledPrimary:y,textColorPrimary:C,textColorHoverPrimary:C,textColorPressedPrimary:C,textColorFocusPrimary:C,textColorDisabledPrimary:C,textColorTextPrimary:y,textColorTextHoverPrimary:g,textColorTextPressedPrimary:h,textColorTextFocusPrimary:g,textColorTextDisabledPrimary:u,textColorGhostPrimary:y,textColorGhostHoverPrimary:g,textColorGhostPressedPrimary:h,textColorGhostFocusPrimary:g,textColorGhostDisabledPrimary:y,borderPrimary:`1px solid ${y}`,borderHoverPrimary:`1px solid ${g}`,borderPressedPrimary:`1px solid ${h}`,borderFocusPrimary:`1px solid ${g}`,borderDisabledPrimary:`1px solid ${y}`,rippleColorPrimary:y,colorInfo:I,colorHoverInfo:E,colorPressedInfo:v,colorFocusInfo:E,colorDisabledInfo:I,textColorInfo:C,textColorHoverInfo:C,textColorPressedInfo:C,textColorFocusInfo:C,textColorDisabledInfo:C,textColorTextInfo:I,textColorTextHoverInfo:E,textColorTextPressedInfo:v,textColorTextFocusInfo:E,textColorTextDisabledInfo:u,textColorGhostInfo:I,textColorGhostHoverInfo:E,textColorGhostPressedInfo:v,textColorGhostFocusInfo:E,textColorGhostDisabledInfo:I,borderInfo:`1px solid ${I}`,borderHoverInfo:`1px solid ${E}`,borderPressedInfo:`1px solid ${v}`,borderFocusInfo:`1px solid ${E}`,borderDisabledInfo:`1px solid ${I}`,rippleColorInfo:I,colorSuccess:L,colorHoverSuccess:W,colorPressedSuccess:w,colorFocusSuccess:W,colorDisabledSuccess:L,textColorSuccess:C,textColorHoverSuccess:C,textColorPressedSuccess:C,textColorFocusSuccess:C,textColorDisabledSuccess:C,textColorTextSuccess:L,textColorTextHoverSuccess:W,textColorTextPressedSuccess:w,textColorTextFocusSuccess:W,textColorTextDisabledSuccess:u,textColorGhostSuccess:L,textColorGhostHoverSuccess:W,textColorGhostPressedSuccess:w,textColorGhostFocusSuccess:W,textColorGhostDisabledSuccess:L,borderSuccess:`1px solid ${L}`,borderHoverSuccess:`1px solid ${W}`,borderPressedSuccess:`1px solid ${w}`,borderFocusSuccess:`1px solid ${W}`,borderDisabledSuccess:`1px solid ${L}`,rippleColorSuccess:L,colorWarning:K,colorHoverWarning:D,colorPressedWarning:j,colorFocusWarning:D,colorDisabledWarning:K,textColorWarning:C,textColorHoverWarning:C,textColorPressedWarning:C,textColorFocusWarning:C,textColorDisabledWarning:C,textColorTextWarning:K,textColorTextHoverWarning:D,textColorTextPressedWarning:j,textColorTextFocusWarning:D,textColorTextDisabledWarning:u,textColorGhostWarning:K,textColorGhostHoverWarning:D,textColorGhostPressedWarning:j,textColorGhostFocusWarning:D,textColorGhostDisabledWarning:K,borderWarning:`1px solid ${K}`,borderHoverWarning:`1px solid ${D}`,borderPressedWarning:`1px solid ${j}`,borderFocusWarning:`1px solid ${D}`,borderDisabledWarning:`1px solid ${K}`,rippleColorWarning:K,colorError:q,colorHoverError:F,colorPressedError:ee,colorFocusError:F,colorDisabledError:q,textColorError:C,textColorHoverError:C,textColorPressedError:C,textColorFocusError:C,textColorDisabledError:C,textColorTextError:q,textColorTextHoverError:F,textColorTextPressedError:ee,textColorTextFocusError:F,textColorTextDisabledError:u,textColorGhostError:q,textColorGhostHoverError:F,textColorGhostPressedError:ee,textColorGhostFocusError:F,textColorGhostDisabledError:q,borderError:`1px solid ${q}`,borderHoverError:`1px solid ${F}`,borderPressedError:`1px solid ${ee}`,borderFocusError:`1px solid ${F}`,borderDisabledError:`1px solid ${q}`,rippleColorError:q,waveOpacity:"0.6",fontWeight:ae,fontWeightStrong:re})}const sr={name:"Button",common:ge,self:xc},je={name:"Button",common:A,self(e){const o=xc(e);return o.waveOpacity="0.8",o.colorOpacitySecondary="0.16",o.colorOpacitySecondaryHover="0.2",o.colorOpacitySecondaryPressed="0.12",o}},W0=Q([to("button",` margin: 0; font-weight: var(--n-font-weight); line-height: 1; @@ -245,7 +245,7 @@ ${o} `,[Q("~",[be("icon",{margin:"var(--n-icon-margin)",marginRight:0})])]),Se("block",` display: flex; width: 100%; - `),Se("dashed",[be("border, state-border",{borderStyle:"dashed !important"})]),Se("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),Q("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),Q("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),j0=Object.assign(Object.assign({},ir.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!$0}}),N0=Je({name:"Button",props:j0,setup(e){const o=Be(null),t=Be(null),r=Be(!1),n=Qn(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),i=Ee(O0,{}),{mergedSizeRef:a}=vp({},{defaultSize:"medium",mergedSize:v=>{const{size:L}=e;if(L)return L;const{size:W}=i;if(W)return W;const{mergedSize:w}=v||{};return w?w.value:"medium"}}),l=de(()=>e.focusable&&!e.disabled),s=v=>{var L;l.value||v.preventDefault(),!e.nativeFocusBehavior&&(v.preventDefault(),!e.disabled&&l.value&&((L=o.value)===null||L===void 0||L.focus({preventScroll:!0})))},c=v=>{var L;if(!e.disabled&&!e.loading){const{onClick:W}=e;W&&Fs(W,v),e.text||(L=t.value)===null||L===void 0||L.play()}},d=v=>{switch(v.key){case"Enter":if(!e.keyboard)return;r.value=!1}},u=v=>{switch(v.key){case"Enter":if(!e.keyboard||e.loading){v.preventDefault();return}r.value=!0}},p=()=>{r.value=!1},{inlineThemeDisabled:g,mergedClsPrefixRef:h,mergedRtlRef:b}=Ti(e),y=ir("Button","-button",W0,sr,e,h),C=rc("Button",b,h),I=de(()=>{const v=y.value,{common:{cubicBezierEaseInOut:L,cubicBezierEaseOut:W},self:w}=v,{rippleDuration:K,opacityDisabled:D,fontWeight:j,fontWeightStrong:q}=w,F=a.value,{dashed:ee,type:ae,ghost:xe,text:oe,color:V,round:re,circle:Ne,textColor:Ze,secondary:Co,tertiary:Ve,quaternary:dr,strong:hn}=e,mn={"--n-font-weight":hn?q:j};let ue={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const xo=ae==="tertiary",st=ae==="default",le=xo?"default":ae;if(oe){const P=Ze||V;ue={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":P||w[Z("textColorText",le)],"--n-text-color-hover":P?qo(P):w[Z("textColorTextHover",le)],"--n-text-color-pressed":P?xr(P):w[Z("textColorTextPressed",le)],"--n-text-color-focus":P?qo(P):w[Z("textColorTextHover",le)],"--n-text-color-disabled":P||w[Z("textColorTextDisabled",le)]}}else if(xe||ee){const P=Ze||V;ue={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":V||w[Z("rippleColor",le)],"--n-text-color":P||w[Z("textColorGhost",le)],"--n-text-color-hover":P?qo(P):w[Z("textColorGhostHover",le)],"--n-text-color-pressed":P?xr(P):w[Z("textColorGhostPressed",le)],"--n-text-color-focus":P?qo(P):w[Z("textColorGhostHover",le)],"--n-text-color-disabled":P||w[Z("textColorGhostDisabled",le)]}}else if(Co){const P=st?w.textColor:xo?w.textColorTertiary:w[Z("color",le)],S=V||P,N=ae!=="default"&&ae!=="tertiary";ue={"--n-color":N?_(S,{alpha:Number(w.colorOpacitySecondary)}):w.colorSecondary,"--n-color-hover":N?_(S,{alpha:Number(w.colorOpacitySecondaryHover)}):w.colorSecondaryHover,"--n-color-pressed":N?_(S,{alpha:Number(w.colorOpacitySecondaryPressed)}):w.colorSecondaryPressed,"--n-color-focus":N?_(S,{alpha:Number(w.colorOpacitySecondaryHover)}):w.colorSecondaryHover,"--n-color-disabled":w.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":S,"--n-text-color-hover":S,"--n-text-color-pressed":S,"--n-text-color-focus":S,"--n-text-color-disabled":S}}else if(Ve||dr){const P=st?w.textColor:xo?w.textColorTertiary:w[Z("color",le)],S=V||P;Ve?(ue["--n-color"]=w.colorTertiary,ue["--n-color-hover"]=w.colorTertiaryHover,ue["--n-color-pressed"]=w.colorTertiaryPressed,ue["--n-color-focus"]=w.colorSecondaryHover,ue["--n-color-disabled"]=w.colorTertiary):(ue["--n-color"]=w.colorQuaternary,ue["--n-color-hover"]=w.colorQuaternaryHover,ue["--n-color-pressed"]=w.colorQuaternaryPressed,ue["--n-color-focus"]=w.colorQuaternaryHover,ue["--n-color-disabled"]=w.colorQuaternary),ue["--n-ripple-color"]="#0000",ue["--n-text-color"]=S,ue["--n-text-color-hover"]=S,ue["--n-text-color-pressed"]=S,ue["--n-text-color-focus"]=S,ue["--n-text-color-disabled"]=S}else ue={"--n-color":V||w[Z("color",le)],"--n-color-hover":V?qo(V):w[Z("colorHover",le)],"--n-color-pressed":V?xr(V):w[Z("colorPressed",le)],"--n-color-focus":V?qo(V):w[Z("colorFocus",le)],"--n-color-disabled":V||w[Z("colorDisabled",le)],"--n-ripple-color":V||w[Z("rippleColor",le)],"--n-text-color":Ze||(V?w.textColorPrimary:xo?w.textColorTertiary:w[Z("textColor",le)]),"--n-text-color-hover":Ze||(V?w.textColorHoverPrimary:w[Z("textColorHover",le)]),"--n-text-color-pressed":Ze||(V?w.textColorPressedPrimary:w[Z("textColorPressed",le)]),"--n-text-color-focus":Ze||(V?w.textColorFocusPrimary:w[Z("textColorFocus",le)]),"--n-text-color-disabled":Ze||(V?w.textColorDisabledPrimary:w[Z("textColorDisabled",le)])};let vo={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};oe?vo={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:vo={"--n-border":w[Z("border",le)],"--n-border-hover":w[Z("borderHover",le)],"--n-border-pressed":w[Z("borderPressed",le)],"--n-border-focus":w[Z("borderFocus",le)],"--n-border-disabled":w[Z("borderDisabled",le)]};const{[Z("height",F)]:ur,[Z("fontSize",F)]:f,[Z("padding",F)]:m,[Z("paddingRound",F)]:x,[Z("iconSize",F)]:H,[Z("borderRadius",F)]:T,[Z("iconMargin",F)]:$,waveOpacity:R}=w,M={"--n-width":Ne&&!oe?ur:"initial","--n-height":oe?"initial":ur,"--n-font-size":f,"--n-padding":Ne||oe?"initial":re?x:m,"--n-icon-size":H,"--n-icon-margin":$,"--n-border-radius":oe?"initial":Ne||re?ur:T};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":L,"--n-bezier-ease-out":W,"--n-ripple-duration":K,"--n-opacity-disabled":D,"--n-wave-opacity":R},mn),ue),vo),M)}),E=g?As("button",de(()=>{let v="";const{dashed:L,type:W,ghost:w,text:K,color:D,round:j,circle:q,textColor:F,secondary:ee,tertiary:ae,quaternary:xe,strong:oe}=e;L&&(v+="a"),w&&(v+="b"),K&&(v+="c"),j&&(v+="d"),q&&(v+="e"),ee&&(v+="f"),ae&&(v+="g"),xe&&(v+="h"),oe&&(v+="i"),D&&(v+=`j${Ia(D)}`),F&&(v+=`k${Ia(F)}`);const{value:V}=a;return v+=`l${V[0]}`,v+=`m${W[0]}`,v}),I,e):void 0;return{selfElRef:o,waveElRef:t,mergedClsPrefix:h,mergedFocusable:l,mergedSize:a,showBorder:n,enterPressed:r,rtlEnabled:C,handleMousedown:s,handleKeydown:u,handleBlur:p,handleKeyup:d,handleClick:c,customColorCssVars:de(()=>{const{color:v}=e;if(!v)return null;const L=qo(v);return{"--n-border-color":v,"--n-border-color-hover":L,"--n-border-color-pressed":xr(v),"--n-border-color-focus":L,"--n-border-color-disabled":v}}),cssVars:g?void 0:I,themeClass:E==null?void 0:E.themeClass,onRender:E==null?void 0:E.onRender}},render(){const{mergedClsPrefix:e,tag:o,onRender:t}=this;t==null||t();const r=Ha(this.$slots.default,n=>n&&O("span",{class:`${e}-button__content`},n));return O(o,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,O(ac,{width:!0},{default:()=>Ha(this.$slots.icon,n=>(this.loading||this.renderIcon||n)&&O("span",{class:`${e}-button__icon`,style:{margin:xp(this.$slots.default)?"0":""}},O(Ai,null,{default:()=>this.loading?O(lc,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):O("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():n)})))}),this.iconPlacement==="left"&&r,this.text?null:O(g0,{ref:"waveElRef",clsPrefix:e}),this.showBorder?O("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?O("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),ay=N0,V0={titleFontSize:"22px"};function U0(e){const{borderRadius:o,fontSize:t,lineHeight:r,textColor2:n,textColor1:i,textColorDisabled:a,dividerColor:l,fontWeightStrong:s,primaryColor:c,baseColor:d,hoverColor:u,cardColor:p,modalColor:g,popoverColor:h}=e;return Object.assign(Object.assign({},V0),{borderRadius:o,borderColor:B(p,l),borderColorModal:B(g,l),borderColorPopover:B(h,l),textColor:n,titleFontWeight:s,titleTextColor:i,dayTextColor:a,fontSize:t,lineHeight:r,dateColorCurrent:c,dateTextColorCurrent:d,cellColorHover:B(p,u),cellColorHoverModal:B(g,u),cellColorHoverPopover:B(h,u),cellColor:p,cellColorModal:g,cellColorPopover:h,barColor:c})}const G0={name:"Calendar",common:A,peers:{Button:je},self:U0},q0={paddingSmall:"12px 16px 12px",paddingMedium:"19px 24px 20px",paddingLarge:"23px 32px 24px",paddingHuge:"27px 40px 28px",titleFontSizeSmall:"16px",titleFontSizeMedium:"18px",titleFontSizeLarge:"18px",titleFontSizeHuge:"18px",closeIconSize:"18px",closeSize:"22px"};function vc(e){const{primaryColor:o,borderRadius:t,lineHeight:r,fontSize:n,cardColor:i,textColor2:a,textColor1:l,dividerColor:s,fontWeightStrong:c,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,closeColorHover:g,closeColorPressed:h,modalColor:b,boxShadow1:y,popoverColor:C,actionColor:I}=e;return Object.assign(Object.assign({},q0),{lineHeight:r,color:i,colorModal:b,colorPopover:C,colorTarget:o,colorEmbedded:I,colorEmbeddedModal:I,colorEmbeddedPopover:I,textColor:a,titleTextColor:l,borderColor:s,actionColor:I,titleFontWeight:c,closeColorHover:g,closeColorPressed:h,closeBorderRadius:t,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,fontSizeSmall:n,fontSizeMedium:n,fontSizeLarge:n,fontSizeHuge:n,boxShadow:y,borderRadius:t})}const ly={common:ge,self:vc},yc={name:"Card",common:A,self(e){const o=vc(e),{cardColor:t,modalColor:r,popoverColor:n}=e;return o.colorEmbedded=t,o.colorEmbeddedModal=r,o.colorEmbeddedPopover=n,o}};function K0(){return{dotSize:"8px",dotColor:"rgba(255, 255, 255, .3)",dotColorActive:"rgba(255, 255, 255, 1)",dotColorFocus:"rgba(255, 255, 255, .5)",dotLineWidth:"16px",dotLineWidthActive:"24px",arrowColor:"#eee"}}const Y0={name:"Carousel",common:A,self:K0},J0={sizeSmall:"14px",sizeMedium:"16px",sizeLarge:"18px",labelPadding:"0 8px",labelFontWeight:"400"};function Sc(e){const{baseColor:o,inputColorDisabled:t,cardColor:r,modalColor:n,popoverColor:i,textColorDisabled:a,borderColor:l,primaryColor:s,textColor2:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,borderRadiusSmall:g,lineHeight:h}=e;return Object.assign(Object.assign({},J0),{labelLineHeight:h,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,borderRadius:g,color:o,colorChecked:s,colorDisabled:t,colorDisabledChecked:t,colorTableHeader:r,colorTableHeaderModal:n,colorTableHeaderPopover:i,checkMarkColor:o,checkMarkColorDisabled:a,checkMarkColorDisabledChecked:a,border:`1px solid ${l}`,borderDisabled:`1px solid ${l}`,borderDisabledChecked:`1px solid ${l}`,borderChecked:`1px solid ${s}`,borderFocus:`1px solid ${s}`,boxShadowFocus:`0 0 0 2px ${_(s,{alpha:.3})}`,textColor:c,textColorDisabled:a})}const Z0={name:"Checkbox",common:ge,self:Sc},Ht={name:"Checkbox",common:A,self(e){const{cardColor:o}=e,t=Sc(e);return t.color="#0000",t.checkMarkColor=o,t}};function Q0(e){const{borderRadius:o,boxShadow2:t,popoverColor:r,textColor2:n,textColor3:i,primaryColor:a,textColorDisabled:l,dividerColor:s,hoverColor:c,fontSizeMedium:d,heightMedium:u}=e;return{menuBorderRadius:o,menuColor:r,menuBoxShadow:t,menuDividerColor:s,menuHeight:"calc(var(--n-option-height) * 6.6)",optionArrowColor:i,optionHeight:u,optionFontSize:d,optionColorHover:c,optionTextColor:n,optionTextColorActive:a,optionTextColorDisabled:l,optionCheckMarkColor:a,loadingColor:a,columnWidth:"180px"}}const X0={name:"Cascader",common:A,peers:{InternalSelectMenu:lr,InternalSelection:Di,Scrollbar:We,Checkbox:Ht,Empty:Mi},self:Q0},wc={name:"Code",common:A,self(e){const{textColor2:o,fontSize:t,fontWeightStrong:r,textColor3:n}=e;return{textColor:o,fontSize:t,fontWeightStrong:r,"mono-3":"#5c6370","hue-1":"#56b6c2","hue-2":"#61aeee","hue-3":"#c678dd","hue-4":"#98c379","hue-5":"#e06c75","hue-5-2":"#be5046","hue-6":"#d19a66","hue-6-2":"#e6c07b",lineNumberTextColor:n}}};function eC(e){const{fontWeight:o,textColor1:t,textColor2:r,textColorDisabled:n,dividerColor:i,fontSize:a}=e;return{titleFontSize:a,titleFontWeight:o,dividerColor:i,titleTextColor:t,titleTextColorDisabled:n,fontSize:a,textColor:r,arrowColor:r,arrowColorDisabled:n,itemMargin:"16px 0 0 0",titlePadding:"16px 0 0 0"}}const oC={name:"Collapse",common:A,self:eC};function tC(e){const{cubicBezierEaseInOut:o}=e;return{bezier:o}}const rC={name:"CollapseTransition",common:A,self:tC};function nC(e){const{fontSize:o,boxShadow2:t,popoverColor:r,textColor2:n,borderRadius:i,borderColor:a,heightSmall:l,heightMedium:s,heightLarge:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,dividerColor:g}=e;return{panelFontSize:o,boxShadow:t,color:r,textColor:n,borderRadius:i,border:`1px solid ${a}`,heightSmall:l,heightMedium:s,heightLarge:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,dividerColor:g}}const iC={name:"ColorPicker",common:A,peers:{Input:eo,Button:je},self:nC},aC={abstract:Boolean,bordered:{type:Boolean,default:void 0},clsPrefix:String,locale:Object,dateLocale:Object,namespace:String,rtl:Array,tag:{type:String,default:"div"},hljs:Object,katex:Object,theme:Object,themeOverrides:Object,componentOptions:Object,icons:Object,breakpoints:Object,preflightStyleDisabled:Boolean,styleMountTarget:Object,inlineThemeDisabled:{type:Boolean,default:void 0},as:{type:String,validator:()=>(mp("config-provider","`as` is deprecated, please use `tag` instead."),!0),default:void 0}},sy=Je({name:"ConfigProvider",alias:["App"],props:aC,setup(e){const o=Ee(Io,null),t=de(()=>{const{theme:b}=e;if(b===null)return;const y=o==null?void 0:o.mergedThemeRef.value;return b===void 0?y:y===void 0?b:Object.assign({},y,b)}),r=de(()=>{const{themeOverrides:b}=e;if(b!==null){if(b===void 0)return o==null?void 0:o.mergedThemeOverridesRef.value;{const y=o==null?void 0:o.mergedThemeOverridesRef.value;return y===void 0?b:Lt({},y,b)}}}),n=Qn(()=>{const{namespace:b}=e;return b===void 0?o==null?void 0:o.mergedNamespaceRef.value:b}),i=Qn(()=>{const{bordered:b}=e;return b===void 0?o==null?void 0:o.mergedBorderedRef.value:b}),a=de(()=>{const{icons:b}=e;return b===void 0?o==null?void 0:o.mergedIconsRef.value:b}),l=de(()=>{const{componentOptions:b}=e;return b!==void 0?b:o==null?void 0:o.mergedComponentPropsRef.value}),s=de(()=>{const{clsPrefix:b}=e;return b!==void 0?b:o?o.mergedClsPrefixRef.value:kr}),c=de(()=>{var b;const{rtl:y}=e;if(y===void 0)return o==null?void 0:o.mergedRtlRef.value;const C={};for(const I of y)C[I.name]=Ln(I),(b=I.peers)===null||b===void 0||b.forEach(E=>{E.name in C||(C[E.name]=Ln(E))});return C}),d=de(()=>e.breakpoints||(o==null?void 0:o.mergedBreakpointsRef.value)),u=e.inlineThemeDisabled||(o==null?void 0:o.inlineThemeDisabled),p=e.preflightStyleDisabled||(o==null?void 0:o.preflightStyleDisabled),g=e.styleMountTarget||(o==null?void 0:o.styleMountTarget),h=de(()=>{const{value:b}=t,{value:y}=r,C=y&&Object.keys(y).length!==0,I=b==null?void 0:b.name;return I?C?`${I}-${Zt(JSON.stringify(r.value))}`:I:C?Zt(JSON.stringify(r.value)):""});return Kt(Io,{mergedThemeHashRef:h,mergedBreakpointsRef:d,mergedRtlRef:c,mergedIconsRef:a,mergedComponentPropsRef:l,mergedBorderedRef:i,mergedNamespaceRef:n,mergedClsPrefixRef:s,mergedLocaleRef:de(()=>{const{locale:b}=e;if(b!==null)return b===void 0?o==null?void 0:o.mergedLocaleRef.value:b}),mergedDateLocaleRef:de(()=>{const{dateLocale:b}=e;if(b!==null)return b===void 0?o==null?void 0:o.mergedDateLocaleRef.value:b}),mergedHljsRef:de(()=>{const{hljs:b}=e;return b===void 0?o==null?void 0:o.mergedHljsRef.value:b}),mergedKatexRef:de(()=>{const{katex:b}=e;return b===void 0?o==null?void 0:o.mergedKatexRef.value:b}),mergedThemeRef:t,mergedThemeOverridesRef:r,inlineThemeDisabled:u||!1,preflightStyleDisabled:p||!1,styleMountTarget:g}),{mergedClsPrefix:s,mergedBordered:i,mergedNamespace:n,mergedTheme:t,mergedThemeOverrides:r}},render(){var e,o,t,r;return this.abstract?(r=(t=this.$slots).default)===null||r===void 0?void 0:r.call(t):O(this.as||this.tag,{class:`${this.mergedClsPrefix||kr}-config-provider`},(o=(e=this.$slots).default)===null||o===void 0?void 0:o.call(e))}}),Pc={name:"Popselect",common:A,peers:{Popover:lt,InternalSelectMenu:lr}};function lC(e){const{boxShadow2:o}=e;return{menuBoxShadow:o}}const sC={name:"Popselect",common:ge,peers:{Popover:It,InternalSelectMenu:pc},self:lC};function Tc(e){const{boxShadow2:o}=e;return{menuBoxShadow:o}}const cC={name:"Select",common:ge,peers:{InternalSelection:p0,InternalSelectMenu:pc},self:Tc},$c={name:"Select",common:A,peers:{InternalSelection:Di,InternalSelectMenu:lr},self:Tc},dC={itemPaddingSmall:"0 4px",itemMarginSmall:"0 0 0 8px",itemMarginSmallRtl:"0 8px 0 0",itemPaddingMedium:"0 4px",itemMarginMedium:"0 0 0 8px",itemMarginMediumRtl:"0 8px 0 0",itemPaddingLarge:"0 4px",itemMarginLarge:"0 0 0 8px",itemMarginLargeRtl:"0 8px 0 0",buttonIconSizeSmall:"14px",buttonIconSizeMedium:"16px",buttonIconSizeLarge:"18px",inputWidthSmall:"60px",selectWidthSmall:"unset",inputMarginSmall:"0 0 0 8px",inputMarginSmallRtl:"0 8px 0 0",selectMarginSmall:"0 0 0 8px",prefixMarginSmall:"0 8px 0 0",suffixMarginSmall:"0 0 0 8px",inputWidthMedium:"60px",selectWidthMedium:"unset",inputMarginMedium:"0 0 0 8px",inputMarginMediumRtl:"0 8px 0 0",selectMarginMedium:"0 0 0 8px",prefixMarginMedium:"0 8px 0 0",suffixMarginMedium:"0 0 0 8px",inputWidthLarge:"60px",selectWidthLarge:"unset",inputMarginLarge:"0 0 0 8px",inputMarginLargeRtl:"0 8px 0 0",selectMarginLarge:"0 0 0 8px",prefixMarginLarge:"0 8px 0 0",suffixMarginLarge:"0 0 0 8px"};function Ic(e){const{textColor2:o,primaryColor:t,primaryColorHover:r,primaryColorPressed:n,inputColorDisabled:i,textColorDisabled:a,borderColor:l,borderRadius:s,fontSizeTiny:c,fontSizeSmall:d,fontSizeMedium:u,heightTiny:p,heightSmall:g,heightMedium:h}=e;return Object.assign(Object.assign({},dC),{buttonColor:"#0000",buttonColorHover:"#0000",buttonColorPressed:"#0000",buttonBorder:`1px solid ${l}`,buttonBorderHover:`1px solid ${l}`,buttonBorderPressed:`1px solid ${l}`,buttonIconColor:o,buttonIconColorHover:o,buttonIconColorPressed:o,itemTextColor:o,itemTextColorHover:r,itemTextColorPressed:n,itemTextColorActive:t,itemTextColorDisabled:a,itemColor:"#0000",itemColorHover:"#0000",itemColorPressed:"#0000",itemColorActive:"#0000",itemColorActiveHover:"#0000",itemColorDisabled:i,itemBorder:"1px solid #0000",itemBorderHover:"1px solid #0000",itemBorderPressed:"1px solid #0000",itemBorderActive:`1px solid ${t}`,itemBorderDisabled:`1px solid ${l}`,itemBorderRadius:s,itemSizeSmall:p,itemSizeMedium:g,itemSizeLarge:h,itemFontSizeSmall:c,itemFontSizeMedium:d,itemFontSizeLarge:u,jumperFontSizeSmall:c,jumperFontSizeMedium:d,jumperFontSizeLarge:u,jumperTextColor:o,jumperTextColorDisabled:a})}const uC={name:"Pagination",common:ge,peers:{Select:cC,Input:_i,Popselect:sC},self:Ic},Hc={name:"Pagination",common:A,peers:{Select:$c,Input:eo,Popselect:Pc},self(e){const{primaryColor:o,opacity3:t}=e,r=_(o,{alpha:Number(t)}),n=Ic(e);return n.itemBorderActive=`1px solid ${r}`,n.itemBorderDisabled="1px solid #0000",n}},fC={padding:"4px 0",optionIconSizeSmall:"14px",optionIconSizeMedium:"16px",optionIconSizeLarge:"16px",optionIconSizeHuge:"18px",optionSuffixWidthSmall:"14px",optionSuffixWidthMedium:"14px",optionSuffixWidthLarge:"16px",optionSuffixWidthHuge:"16px",optionIconSuffixWidthSmall:"32px",optionIconSuffixWidthMedium:"32px",optionIconSuffixWidthLarge:"36px",optionIconSuffixWidthHuge:"36px",optionPrefixWidthSmall:"14px",optionPrefixWidthMedium:"14px",optionPrefixWidthLarge:"16px",optionPrefixWidthHuge:"16px",optionIconPrefixWidthSmall:"36px",optionIconPrefixWidthMedium:"36px",optionIconPrefixWidthLarge:"40px",optionIconPrefixWidthHuge:"40px"};function Fc(e){const{primaryColor:o,textColor2:t,dividerColor:r,hoverColor:n,popoverColor:i,invertedColor:a,borderRadius:l,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:d,fontSizeHuge:u,heightSmall:p,heightMedium:g,heightLarge:h,heightHuge:b,textColor3:y,opacityDisabled:C}=e;return Object.assign(Object.assign({},fC),{optionHeightSmall:p,optionHeightMedium:g,optionHeightLarge:h,optionHeightHuge:b,borderRadius:l,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:d,fontSizeHuge:u,optionTextColor:t,optionTextColorHover:t,optionTextColorActive:o,optionTextColorChildActive:o,color:i,dividerColor:r,suffixColor:t,prefixColor:t,optionColorHover:n,optionColorActive:_(o,{alpha:.1}),groupHeaderTextColor:y,optionTextColorInverted:"#BBB",optionTextColorHoverInverted:"#FFF",optionTextColorActiveInverted:"#FFF",optionTextColorChildActiveInverted:"#FFF",colorInverted:a,dividerColorInverted:"#BBB",suffixColorInverted:"#BBB",prefixColorInverted:"#BBB",optionColorHoverInverted:o,optionColorActiveInverted:o,groupHeaderTextColorInverted:"#AAA",optionOpacityDisabled:C})}const pC={name:"Dropdown",common:ge,peers:{Popover:It},self:Fc},Ei={name:"Dropdown",common:A,peers:{Popover:lt},self(e){const{primaryColorSuppl:o,primaryColor:t,popoverColor:r}=e,n=Fc(e);return n.colorInverted=r,n.optionColorActive=_(t,{alpha:.15}),n.optionColorActiveInverted=o,n.optionColorHoverInverted=o,n}},Ac={padding:"8px 14px"},fn={name:"Tooltip",common:A,peers:{Popover:lt},self(e){const{borderRadius:o,boxShadow2:t,popoverColor:r,textColor2:n}=e;return Object.assign(Object.assign({},Ac),{borderRadius:o,boxShadow:t,color:r,textColor:n})}};function hC(e){const{borderRadius:o,boxShadow2:t,baseColor:r}=e;return Object.assign(Object.assign({},Ac),{borderRadius:o,boxShadow:t,color:B(r,"rgba(0, 0, 0, .85)"),textColor:r})}const mC={name:"Tooltip",common:ge,peers:{Popover:It},self:hC},Mc={name:"Ellipsis",common:A,peers:{Tooltip:fn}},gC={name:"Ellipsis",common:ge,peers:{Tooltip:mC}},Dc={radioSizeSmall:"14px",radioSizeMedium:"16px",radioSizeLarge:"18px",labelPadding:"0 8px",labelFontWeight:"400"},_c={name:"Radio",common:A,self(e){const{borderColor:o,primaryColor:t,baseColor:r,textColorDisabled:n,inputColorDisabled:i,textColor2:a,opacityDisabled:l,borderRadius:s,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,heightSmall:p,heightMedium:g,heightLarge:h,lineHeight:b}=e;return Object.assign(Object.assign({},Dc),{labelLineHeight:b,buttonHeightSmall:p,buttonHeightMedium:g,buttonHeightLarge:h,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,boxShadow:`inset 0 0 0 1px ${o}`,boxShadowActive:`inset 0 0 0 1px ${t}`,boxShadowFocus:`inset 0 0 0 1px ${t}, 0 0 0 2px ${_(t,{alpha:.3})}`,boxShadowHover:`inset 0 0 0 1px ${t}`,boxShadowDisabled:`inset 0 0 0 1px ${o}`,color:"#0000",colorDisabled:i,colorActive:"#0000",textColor:a,textColorDisabled:n,dotColorActive:t,dotColorDisabled:o,buttonBorderColor:o,buttonBorderColorActive:t,buttonBorderColorHover:t,buttonColor:"#0000",buttonColorActive:t,buttonTextColor:a,buttonTextColorActive:r,buttonTextColorHover:t,opacityDisabled:l,buttonBoxShadowFocus:`inset 0 0 0 1px ${t}, 0 0 0 2px ${_(t,{alpha:.3})}`,buttonBoxShadowHover:`inset 0 0 0 1px ${t}`,buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:s})}};function bC(e){const{borderColor:o,primaryColor:t,baseColor:r,textColorDisabled:n,inputColorDisabled:i,textColor2:a,opacityDisabled:l,borderRadius:s,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,heightSmall:p,heightMedium:g,heightLarge:h,lineHeight:b}=e;return Object.assign(Object.assign({},Dc),{labelLineHeight:b,buttonHeightSmall:p,buttonHeightMedium:g,buttonHeightLarge:h,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,boxShadow:`inset 0 0 0 1px ${o}`,boxShadowActive:`inset 0 0 0 1px ${t}`,boxShadowFocus:`inset 0 0 0 1px ${t}, 0 0 0 2px ${_(t,{alpha:.2})}`,boxShadowHover:`inset 0 0 0 1px ${t}`,boxShadowDisabled:`inset 0 0 0 1px ${o}`,color:r,colorDisabled:i,colorActive:"#0000",textColor:a,textColorDisabled:n,dotColorActive:t,dotColorDisabled:o,buttonBorderColor:o,buttonBorderColorActive:t,buttonBorderColorHover:o,buttonColor:r,buttonColorActive:r,buttonTextColor:a,buttonTextColorActive:t,buttonTextColorHover:t,opacityDisabled:l,buttonBoxShadowFocus:`inset 0 0 0 1px ${t}, 0 0 0 2px ${_(t,{alpha:.3})}`,buttonBoxShadowHover:"inset 0 0 0 1px #0000",buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:s})}const CC={name:"Radio",common:ge,self:bC},xC={thPaddingSmall:"8px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"8px",tdPaddingMedium:"12px",tdPaddingLarge:"12px",sorterSize:"15px",resizableContainerSize:"8px",resizableSize:"2px",filterSize:"15px",paginationMargin:"12px 0 0 0",emptyPadding:"48px 0",actionPadding:"8px 12px",actionButtonMargin:"0 8px 0 0"};function Ec(e){const{cardColor:o,modalColor:t,popoverColor:r,textColor2:n,textColor1:i,tableHeaderColor:a,tableColorHover:l,iconColor:s,primaryColor:c,fontWeightStrong:d,borderRadius:u,lineHeight:p,fontSizeSmall:g,fontSizeMedium:h,fontSizeLarge:b,dividerColor:y,heightSmall:C,opacityDisabled:I,tableColorStriped:E}=e;return Object.assign(Object.assign({},xC),{actionDividerColor:y,lineHeight:p,borderRadius:u,fontSizeSmall:g,fontSizeMedium:h,fontSizeLarge:b,borderColor:B(o,y),tdColorHover:B(o,l),tdColorSorting:B(o,l),tdColorStriped:B(o,E),thColor:B(o,a),thColorHover:B(B(o,a),l),thColorSorting:B(B(o,a),l),tdColor:o,tdTextColor:n,thTextColor:i,thFontWeight:d,thButtonColorHover:l,thIconColor:s,thIconColorActive:c,borderColorModal:B(t,y),tdColorHoverModal:B(t,l),tdColorSortingModal:B(t,l),tdColorStripedModal:B(t,E),thColorModal:B(t,a),thColorHoverModal:B(B(t,a),l),thColorSortingModal:B(B(t,a),l),tdColorModal:t,borderColorPopover:B(r,y),tdColorHoverPopover:B(r,l),tdColorSortingPopover:B(r,l),tdColorStripedPopover:B(r,E),thColorPopover:B(r,a),thColorHoverPopover:B(B(r,a),l),thColorSortingPopover:B(B(r,a),l),tdColorPopover:r,boxShadowBefore:"inset -12px 0 8px -12px rgba(0, 0, 0, .18)",boxShadowAfter:"inset 12px 0 8px -12px rgba(0, 0, 0, .18)",loadingColor:c,loadingSize:C,opacityLoading:I})}const cy={name:"DataTable",common:ge,peers:{Button:sr,Checkbox:Z0,Radio:CC,Pagination:uC,Scrollbar:un,Empty:Mi,Popover:It,Ellipsis:gC,Dropdown:pC},self:Ec},vC={name:"DataTable",common:A,peers:{Button:je,Checkbox:Ht,Radio:_c,Pagination:Hc,Scrollbar:We,Empty:at,Popover:lt,Ellipsis:Mc,Dropdown:Ei},self(e){const o=Ec(e);return o.boxShadowAfter="inset 12px 0 8px -12px rgba(0, 0, 0, .36)",o.boxShadowBefore="inset -12px 0 8px -12px rgba(0, 0, 0, .36)",o}};function Rc(e){const{textColorBase:o,opacity1:t,opacity2:r,opacity3:n,opacity4:i,opacity5:a}=e;return{color:o,opacity1Depth:t,opacity2Depth:r,opacity3Depth:n,opacity4Depth:i,opacity5Depth:a}}const dy={common:ge,self:Rc},yC={name:"Icon",common:A,self:Rc},SC={itemFontSize:"12px",itemHeight:"36px",itemWidth:"52px",panelActionPadding:"8px 0"};function Lc(e){const{popoverColor:o,textColor2:t,primaryColor:r,hoverColor:n,dividerColor:i,opacityDisabled:a,boxShadow2:l,borderRadius:s,iconColor:c,iconColorDisabled:d}=e;return Object.assign(Object.assign({},SC),{panelColor:o,panelBoxShadow:l,panelDividerColor:i,itemTextColor:t,itemTextColorActive:r,itemColorHover:n,itemOpacityDisabled:a,itemBorderRadius:s,borderRadius:s,iconColor:c,iconColorDisabled:d})}const wC={name:"TimePicker",common:ge,peers:{Scrollbar:un,Button:sr,Input:_i},self:Lc},kc={name:"TimePicker",common:A,peers:{Scrollbar:We,Button:je,Input:eo},self:Lc},PC={itemSize:"24px",itemCellWidth:"38px",itemCellHeight:"32px",scrollItemWidth:"80px",scrollItemHeight:"40px",panelExtraFooterPadding:"8px 12px",panelActionPadding:"8px 12px",calendarTitlePadding:"0",calendarTitleHeight:"28px",arrowSize:"14px",panelHeaderPadding:"8px 12px",calendarDaysHeight:"32px",calendarTitleGridTempateColumns:"28px 28px 1fr 28px 28px",calendarLeftPaddingDate:"6px 12px 4px 12px",calendarLeftPaddingDatetime:"4px 12px",calendarLeftPaddingDaterange:"6px 12px 4px 12px",calendarLeftPaddingDatetimerange:"4px 12px",calendarLeftPaddingMonth:"0",calendarLeftPaddingYear:"0",calendarLeftPaddingQuarter:"0",calendarLeftPaddingMonthrange:"0",calendarLeftPaddingQuarterrange:"0",calendarLeftPaddingYearrange:"0",calendarLeftPaddingWeek:"6px 12px 4px 12px",calendarRightPaddingDate:"6px 12px 4px 12px",calendarRightPaddingDatetime:"4px 12px",calendarRightPaddingDaterange:"6px 12px 4px 12px",calendarRightPaddingDatetimerange:"4px 12px",calendarRightPaddingMonth:"0",calendarRightPaddingYear:"0",calendarRightPaddingQuarter:"0",calendarRightPaddingMonthrange:"0",calendarRightPaddingQuarterrange:"0",calendarRightPaddingYearrange:"0",calendarRightPaddingWeek:"0"};function zc(e){const{hoverColor:o,fontSize:t,textColor2:r,textColorDisabled:n,popoverColor:i,primaryColor:a,borderRadiusSmall:l,iconColor:s,iconColorDisabled:c,textColor1:d,dividerColor:u,boxShadow2:p,borderRadius:g,fontWeightStrong:h}=e;return Object.assign(Object.assign({},PC),{itemFontSize:t,calendarDaysFontSize:t,calendarTitleFontSize:t,itemTextColor:r,itemTextColorDisabled:n,itemTextColorActive:i,itemTextColorCurrent:a,itemColorIncluded:_(a,{alpha:.1}),itemColorHover:o,itemColorDisabled:o,itemColorActive:a,itemBorderRadius:l,panelColor:i,panelTextColor:r,arrowColor:s,calendarTitleTextColor:d,calendarTitleColorHover:o,calendarDaysTextColor:r,panelHeaderDividerColor:u,calendarDaysDividerColor:u,calendarDividerColor:u,panelActionDividerColor:u,panelBoxShadow:p,panelBorderRadius:g,calendarTitleFontWeight:h,scrollItemBorderRadius:g,iconColor:s,iconColorDisabled:c})}const uy={name:"DatePicker",common:ge,peers:{Input:_i,Button:sr,TimePicker:wC,Scrollbar:un},self:zc},TC={name:"DatePicker",common:A,peers:{Input:eo,Button:je,TimePicker:kc,Scrollbar:We},self(e){const{popoverColor:o,hoverColor:t,primaryColor:r}=e,n=zc(e);return n.itemColorDisabled=B(o,t),n.itemColorIncluded=_(r,{alpha:.15}),n.itemColorHover=B(o,t),n}},$C={thPaddingBorderedSmall:"8px 12px",thPaddingBorderedMedium:"12px 16px",thPaddingBorderedLarge:"16px 24px",thPaddingSmall:"0",thPaddingMedium:"0",thPaddingLarge:"0",tdPaddingBorderedSmall:"8px 12px",tdPaddingBorderedMedium:"12px 16px",tdPaddingBorderedLarge:"16px 24px",tdPaddingSmall:"0 0 8px 0",tdPaddingMedium:"0 0 12px 0",tdPaddingLarge:"0 0 16px 0"};function IC(e){const{tableHeaderColor:o,textColor2:t,textColor1:r,cardColor:n,modalColor:i,popoverColor:a,dividerColor:l,borderRadius:s,fontWeightStrong:c,lineHeight:d,fontSizeSmall:u,fontSizeMedium:p,fontSizeLarge:g}=e;return Object.assign(Object.assign({},$C),{lineHeight:d,fontSizeSmall:u,fontSizeMedium:p,fontSizeLarge:g,titleTextColor:r,thColor:B(n,o),thColorModal:B(i,o),thColorPopover:B(a,o),thTextColor:r,thFontWeight:c,tdTextColor:t,tdColor:n,tdColorModal:i,tdColorPopover:a,borderColor:B(n,l),borderColorModal:B(i,l),borderColorPopover:B(a,l),borderRadius:s})}const HC={name:"Descriptions",common:A,self:IC},FC={titleFontSize:"18px",padding:"16px 28px 20px 28px",iconSize:"28px",actionSpace:"12px",contentMargin:"8px 0 16px 0",iconMargin:"0 4px 0 0",iconMarginIconTop:"4px 0 8px 0",closeSize:"22px",closeIconSize:"18px",closeMargin:"20px 26px 0 0",closeMarginIconTop:"10px 16px 0 0"};function AC(e){const{textColor1:o,textColor2:t,modalColor:r,closeIconColor:n,closeIconColorHover:i,closeIconColorPressed:a,closeColorHover:l,closeColorPressed:s,infoColor:c,successColor:d,warningColor:u,errorColor:p,primaryColor:g,dividerColor:h,borderRadius:b,fontWeightStrong:y,lineHeight:C,fontSize:I}=e;return Object.assign(Object.assign({},FC),{fontSize:I,lineHeight:C,border:`1px solid ${h}`,titleTextColor:o,textColor:t,color:r,closeColorHover:l,closeColorPressed:s,closeIconColor:n,closeIconColorHover:i,closeIconColorPressed:a,closeBorderRadius:b,iconColor:g,iconColorInfo:c,iconColorSuccess:d,iconColorWarning:u,iconColorError:p,borderRadius:b,titleFontWeight:y})}const Oc={name:"Dialog",common:A,peers:{Button:je},self:AC};function MC(e){const{modalColor:o,textColor2:t,boxShadow3:r}=e;return{color:o,textColor:t,boxShadow:r}}const DC={name:"Modal",common:A,peers:{Scrollbar:We,Dialog:Oc,Card:yc},self:MC},_C={name:"LoadingBar",common:A,self(e){const{primaryColor:o}=e;return{colorError:"red",colorLoading:o,height:"2px"}}},EC="n-message-api",Bc="n-message-provider",RC={margin:"0 0 8px 0",padding:"10px 20px",maxWidth:"720px",minWidth:"420px",iconMargin:"0 10px 0 0",closeMargin:"0 0 0 10px",closeSize:"20px",closeIconSize:"16px",iconSize:"20px",fontSize:"14px"};function Wc(e){const{textColor2:o,closeIconColor:t,closeIconColorHover:r,closeIconColorPressed:n,infoColor:i,successColor:a,errorColor:l,warningColor:s,popoverColor:c,boxShadow2:d,primaryColor:u,lineHeight:p,borderRadius:g,closeColorHover:h,closeColorPressed:b}=e;return Object.assign(Object.assign({},RC),{closeBorderRadius:g,textColor:o,textColorInfo:o,textColorSuccess:o,textColorError:o,textColorWarning:o,textColorLoading:o,color:c,colorInfo:c,colorSuccess:c,colorError:c,colorWarning:c,colorLoading:c,boxShadow:d,boxShadowInfo:d,boxShadowSuccess:d,boxShadowError:d,boxShadowWarning:d,boxShadowLoading:d,iconColor:o,iconColorInfo:i,iconColorSuccess:a,iconColorWarning:s,iconColorError:l,iconColorLoading:u,closeColorHover:h,closeColorPressed:b,closeIconColor:t,closeIconColorHover:r,closeIconColorPressed:n,closeColorHoverInfo:h,closeColorPressedInfo:b,closeIconColorInfo:t,closeIconColorHoverInfo:r,closeIconColorPressedInfo:n,closeColorHoverSuccess:h,closeColorPressedSuccess:b,closeIconColorSuccess:t,closeIconColorHoverSuccess:r,closeIconColorPressedSuccess:n,closeColorHoverError:h,closeColorPressedError:b,closeIconColorError:t,closeIconColorHoverError:r,closeIconColorPressedError:n,closeColorHoverWarning:h,closeColorPressedWarning:b,closeIconColorWarning:t,closeIconColorHoverWarning:r,closeIconColorPressedWarning:n,closeColorHoverLoading:h,closeColorPressedLoading:b,closeIconColorLoading:t,closeIconColorHoverLoading:r,closeIconColorPressedLoading:n,loadingColor:u,lineHeight:p,borderRadius:g})}const LC={common:ge,self:Wc},kC={name:"Message",common:A,self:Wc},jc={icon:Function,type:{type:String,default:"info"},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,onClose:Function,onMouseenter:Function,onMouseleave:Function},zC=Q([to("message-wrapper",` + `),Se("dashed",[be("border, state-border",{borderStyle:"dashed !important"})]),Se("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),Q("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),Q("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),j0=Object.assign(Object.assign({},ir.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!$0}}),N0=Je({name:"Button",props:j0,setup(e){const o=Be(null),t=Be(null),r=Be(!1),n=Qn(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),i=Ee(z0,{}),{mergedSizeRef:a}=vp({},{defaultSize:"medium",mergedSize:v=>{const{size:L}=e;if(L)return L;const{size:W}=i;if(W)return W;const{mergedSize:w}=v||{};return w?w.value:"medium"}}),l=de(()=>e.focusable&&!e.disabled),s=v=>{var L;l.value||v.preventDefault(),!e.nativeFocusBehavior&&(v.preventDefault(),!e.disabled&&l.value&&((L=o.value)===null||L===void 0||L.focus({preventScroll:!0})))},c=v=>{var L;if(!e.disabled&&!e.loading){const{onClick:W}=e;W&&Fs(W,v),e.text||(L=t.value)===null||L===void 0||L.play()}},d=v=>{switch(v.key){case"Enter":if(!e.keyboard)return;r.value=!1}},u=v=>{switch(v.key){case"Enter":if(!e.keyboard||e.loading){v.preventDefault();return}r.value=!0}},p=()=>{r.value=!1},{inlineThemeDisabled:g,mergedClsPrefixRef:h,mergedRtlRef:b}=Ti(e),y=ir("Button","-button",W0,sr,e,h),C=rc("Button",b,h),I=de(()=>{const v=y.value,{common:{cubicBezierEaseInOut:L,cubicBezierEaseOut:W},self:w}=v,{rippleDuration:K,opacityDisabled:D,fontWeight:j,fontWeightStrong:q}=w,F=a.value,{dashed:ee,type:ae,ghost:xe,text:oe,color:V,round:re,circle:Ne,textColor:Ze,secondary:Co,tertiary:Ve,quaternary:dr,strong:hn}=e,mn={"--n-font-weight":hn?q:j};let ue={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const xo=ae==="tertiary",st=ae==="default",le=xo?"default":ae;if(oe){const P=Ze||V;ue={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":P||w[Z("textColorText",le)],"--n-text-color-hover":P?qo(P):w[Z("textColorTextHover",le)],"--n-text-color-pressed":P?xr(P):w[Z("textColorTextPressed",le)],"--n-text-color-focus":P?qo(P):w[Z("textColorTextHover",le)],"--n-text-color-disabled":P||w[Z("textColorTextDisabled",le)]}}else if(xe||ee){const P=Ze||V;ue={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":V||w[Z("rippleColor",le)],"--n-text-color":P||w[Z("textColorGhost",le)],"--n-text-color-hover":P?qo(P):w[Z("textColorGhostHover",le)],"--n-text-color-pressed":P?xr(P):w[Z("textColorGhostPressed",le)],"--n-text-color-focus":P?qo(P):w[Z("textColorGhostHover",le)],"--n-text-color-disabled":P||w[Z("textColorGhostDisabled",le)]}}else if(Co){const P=st?w.textColor:xo?w.textColorTertiary:w[Z("color",le)],S=V||P,N=ae!=="default"&&ae!=="tertiary";ue={"--n-color":N?_(S,{alpha:Number(w.colorOpacitySecondary)}):w.colorSecondary,"--n-color-hover":N?_(S,{alpha:Number(w.colorOpacitySecondaryHover)}):w.colorSecondaryHover,"--n-color-pressed":N?_(S,{alpha:Number(w.colorOpacitySecondaryPressed)}):w.colorSecondaryPressed,"--n-color-focus":N?_(S,{alpha:Number(w.colorOpacitySecondaryHover)}):w.colorSecondaryHover,"--n-color-disabled":w.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":S,"--n-text-color-hover":S,"--n-text-color-pressed":S,"--n-text-color-focus":S,"--n-text-color-disabled":S}}else if(Ve||dr){const P=st?w.textColor:xo?w.textColorTertiary:w[Z("color",le)],S=V||P;Ve?(ue["--n-color"]=w.colorTertiary,ue["--n-color-hover"]=w.colorTertiaryHover,ue["--n-color-pressed"]=w.colorTertiaryPressed,ue["--n-color-focus"]=w.colorSecondaryHover,ue["--n-color-disabled"]=w.colorTertiary):(ue["--n-color"]=w.colorQuaternary,ue["--n-color-hover"]=w.colorQuaternaryHover,ue["--n-color-pressed"]=w.colorQuaternaryPressed,ue["--n-color-focus"]=w.colorQuaternaryHover,ue["--n-color-disabled"]=w.colorQuaternary),ue["--n-ripple-color"]="#0000",ue["--n-text-color"]=S,ue["--n-text-color-hover"]=S,ue["--n-text-color-pressed"]=S,ue["--n-text-color-focus"]=S,ue["--n-text-color-disabled"]=S}else ue={"--n-color":V||w[Z("color",le)],"--n-color-hover":V?qo(V):w[Z("colorHover",le)],"--n-color-pressed":V?xr(V):w[Z("colorPressed",le)],"--n-color-focus":V?qo(V):w[Z("colorFocus",le)],"--n-color-disabled":V||w[Z("colorDisabled",le)],"--n-ripple-color":V||w[Z("rippleColor",le)],"--n-text-color":Ze||(V?w.textColorPrimary:xo?w.textColorTertiary:w[Z("textColor",le)]),"--n-text-color-hover":Ze||(V?w.textColorHoverPrimary:w[Z("textColorHover",le)]),"--n-text-color-pressed":Ze||(V?w.textColorPressedPrimary:w[Z("textColorPressed",le)]),"--n-text-color-focus":Ze||(V?w.textColorFocusPrimary:w[Z("textColorFocus",le)]),"--n-text-color-disabled":Ze||(V?w.textColorDisabledPrimary:w[Z("textColorDisabled",le)])};let vo={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};oe?vo={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:vo={"--n-border":w[Z("border",le)],"--n-border-hover":w[Z("borderHover",le)],"--n-border-pressed":w[Z("borderPressed",le)],"--n-border-focus":w[Z("borderFocus",le)],"--n-border-disabled":w[Z("borderDisabled",le)]};const{[Z("height",F)]:ur,[Z("fontSize",F)]:f,[Z("padding",F)]:m,[Z("paddingRound",F)]:x,[Z("iconSize",F)]:H,[Z("borderRadius",F)]:T,[Z("iconMargin",F)]:$,waveOpacity:R}=w,M={"--n-width":Ne&&!oe?ur:"initial","--n-height":oe?"initial":ur,"--n-font-size":f,"--n-padding":Ne||oe?"initial":re?x:m,"--n-icon-size":H,"--n-icon-margin":$,"--n-border-radius":oe?"initial":Ne||re?ur:T};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":L,"--n-bezier-ease-out":W,"--n-ripple-duration":K,"--n-opacity-disabled":D,"--n-wave-opacity":R},mn),ue),vo),M)}),E=g?As("button",de(()=>{let v="";const{dashed:L,type:W,ghost:w,text:K,color:D,round:j,circle:q,textColor:F,secondary:ee,tertiary:ae,quaternary:xe,strong:oe}=e;L&&(v+="a"),w&&(v+="b"),K&&(v+="c"),j&&(v+="d"),q&&(v+="e"),ee&&(v+="f"),ae&&(v+="g"),xe&&(v+="h"),oe&&(v+="i"),D&&(v+=`j${Ia(D)}`),F&&(v+=`k${Ia(F)}`);const{value:V}=a;return v+=`l${V[0]}`,v+=`m${W[0]}`,v}),I,e):void 0;return{selfElRef:o,waveElRef:t,mergedClsPrefix:h,mergedFocusable:l,mergedSize:a,showBorder:n,enterPressed:r,rtlEnabled:C,handleMousedown:s,handleKeydown:u,handleBlur:p,handleKeyup:d,handleClick:c,customColorCssVars:de(()=>{const{color:v}=e;if(!v)return null;const L=qo(v);return{"--n-border-color":v,"--n-border-color-hover":L,"--n-border-color-pressed":xr(v),"--n-border-color-focus":L,"--n-border-color-disabled":v}}),cssVars:g?void 0:I,themeClass:E==null?void 0:E.themeClass,onRender:E==null?void 0:E.onRender}},render(){const{mergedClsPrefix:e,tag:o,onRender:t}=this;t==null||t();const r=Ha(this.$slots.default,n=>n&&z("span",{class:`${e}-button__content`},n));return z(o,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,z(ac,{width:!0},{default:()=>Ha(this.$slots.icon,n=>(this.loading||this.renderIcon||n)&&z("span",{class:`${e}-button__icon`,style:{margin:xp(this.$slots.default)?"0":""}},z(Ai,null,{default:()=>this.loading?z(lc,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):z("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():n)})))}),this.iconPlacement==="left"&&r,this.text?null:z(g0,{ref:"waveElRef",clsPrefix:e}),this.showBorder?z("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?z("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),ay=N0,V0={titleFontSize:"22px"};function U0(e){const{borderRadius:o,fontSize:t,lineHeight:r,textColor2:n,textColor1:i,textColorDisabled:a,dividerColor:l,fontWeightStrong:s,primaryColor:c,baseColor:d,hoverColor:u,cardColor:p,modalColor:g,popoverColor:h}=e;return Object.assign(Object.assign({},V0),{borderRadius:o,borderColor:B(p,l),borderColorModal:B(g,l),borderColorPopover:B(h,l),textColor:n,titleFontWeight:s,titleTextColor:i,dayTextColor:a,fontSize:t,lineHeight:r,dateColorCurrent:c,dateTextColorCurrent:d,cellColorHover:B(p,u),cellColorHoverModal:B(g,u),cellColorHoverPopover:B(h,u),cellColor:p,cellColorModal:g,cellColorPopover:h,barColor:c})}const G0={name:"Calendar",common:A,peers:{Button:je},self:U0},q0={paddingSmall:"12px 16px 12px",paddingMedium:"19px 24px 20px",paddingLarge:"23px 32px 24px",paddingHuge:"27px 40px 28px",titleFontSizeSmall:"16px",titleFontSizeMedium:"18px",titleFontSizeLarge:"18px",titleFontSizeHuge:"18px",closeIconSize:"18px",closeSize:"22px"};function vc(e){const{primaryColor:o,borderRadius:t,lineHeight:r,fontSize:n,cardColor:i,textColor2:a,textColor1:l,dividerColor:s,fontWeightStrong:c,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,closeColorHover:g,closeColorPressed:h,modalColor:b,boxShadow1:y,popoverColor:C,actionColor:I}=e;return Object.assign(Object.assign({},q0),{lineHeight:r,color:i,colorModal:b,colorPopover:C,colorTarget:o,colorEmbedded:I,colorEmbeddedModal:I,colorEmbeddedPopover:I,textColor:a,titleTextColor:l,borderColor:s,actionColor:I,titleFontWeight:c,closeColorHover:g,closeColorPressed:h,closeBorderRadius:t,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,fontSizeSmall:n,fontSizeMedium:n,fontSizeLarge:n,fontSizeHuge:n,boxShadow:y,borderRadius:t})}const ly={common:ge,self:vc},yc={name:"Card",common:A,self(e){const o=vc(e),{cardColor:t,modalColor:r,popoverColor:n}=e;return o.colorEmbedded=t,o.colorEmbeddedModal=r,o.colorEmbeddedPopover=n,o}};function K0(){return{dotSize:"8px",dotColor:"rgba(255, 255, 255, .3)",dotColorActive:"rgba(255, 255, 255, 1)",dotColorFocus:"rgba(255, 255, 255, .5)",dotLineWidth:"16px",dotLineWidthActive:"24px",arrowColor:"#eee"}}const Y0={name:"Carousel",common:A,self:K0},J0={sizeSmall:"14px",sizeMedium:"16px",sizeLarge:"18px",labelPadding:"0 8px",labelFontWeight:"400"};function Sc(e){const{baseColor:o,inputColorDisabled:t,cardColor:r,modalColor:n,popoverColor:i,textColorDisabled:a,borderColor:l,primaryColor:s,textColor2:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,borderRadiusSmall:g,lineHeight:h}=e;return Object.assign(Object.assign({},J0),{labelLineHeight:h,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,borderRadius:g,color:o,colorChecked:s,colorDisabled:t,colorDisabledChecked:t,colorTableHeader:r,colorTableHeaderModal:n,colorTableHeaderPopover:i,checkMarkColor:o,checkMarkColorDisabled:a,checkMarkColorDisabledChecked:a,border:`1px solid ${l}`,borderDisabled:`1px solid ${l}`,borderDisabledChecked:`1px solid ${l}`,borderChecked:`1px solid ${s}`,borderFocus:`1px solid ${s}`,boxShadowFocus:`0 0 0 2px ${_(s,{alpha:.3})}`,textColor:c,textColorDisabled:a})}const Z0={name:"Checkbox",common:ge,self:Sc},Ht={name:"Checkbox",common:A,self(e){const{cardColor:o}=e,t=Sc(e);return t.color="#0000",t.checkMarkColor=o,t}};function Q0(e){const{borderRadius:o,boxShadow2:t,popoverColor:r,textColor2:n,textColor3:i,primaryColor:a,textColorDisabled:l,dividerColor:s,hoverColor:c,fontSizeMedium:d,heightMedium:u}=e;return{menuBorderRadius:o,menuColor:r,menuBoxShadow:t,menuDividerColor:s,menuHeight:"calc(var(--n-option-height) * 6.6)",optionArrowColor:i,optionHeight:u,optionFontSize:d,optionColorHover:c,optionTextColor:n,optionTextColorActive:a,optionTextColorDisabled:l,optionCheckMarkColor:a,loadingColor:a,columnWidth:"180px"}}const X0={name:"Cascader",common:A,peers:{InternalSelectMenu:lr,InternalSelection:Di,Scrollbar:We,Checkbox:Ht,Empty:Mi},self:Q0},wc={name:"Code",common:A,self(e){const{textColor2:o,fontSize:t,fontWeightStrong:r,textColor3:n}=e;return{textColor:o,fontSize:t,fontWeightStrong:r,"mono-3":"#5c6370","hue-1":"#56b6c2","hue-2":"#61aeee","hue-3":"#c678dd","hue-4":"#98c379","hue-5":"#e06c75","hue-5-2":"#be5046","hue-6":"#d19a66","hue-6-2":"#e6c07b",lineNumberTextColor:n}}};function eC(e){const{fontWeight:o,textColor1:t,textColor2:r,textColorDisabled:n,dividerColor:i,fontSize:a}=e;return{titleFontSize:a,titleFontWeight:o,dividerColor:i,titleTextColor:t,titleTextColorDisabled:n,fontSize:a,textColor:r,arrowColor:r,arrowColorDisabled:n,itemMargin:"16px 0 0 0",titlePadding:"16px 0 0 0"}}const oC={name:"Collapse",common:A,self:eC};function tC(e){const{cubicBezierEaseInOut:o}=e;return{bezier:o}}const rC={name:"CollapseTransition",common:A,self:tC};function nC(e){const{fontSize:o,boxShadow2:t,popoverColor:r,textColor2:n,borderRadius:i,borderColor:a,heightSmall:l,heightMedium:s,heightLarge:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,dividerColor:g}=e;return{panelFontSize:o,boxShadow:t,color:r,textColor:n,borderRadius:i,border:`1px solid ${a}`,heightSmall:l,heightMedium:s,heightLarge:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,dividerColor:g}}const iC={name:"ColorPicker",common:A,peers:{Input:eo,Button:je},self:nC},aC={abstract:Boolean,bordered:{type:Boolean,default:void 0},clsPrefix:String,locale:Object,dateLocale:Object,namespace:String,rtl:Array,tag:{type:String,default:"div"},hljs:Object,katex:Object,theme:Object,themeOverrides:Object,componentOptions:Object,icons:Object,breakpoints:Object,preflightStyleDisabled:Boolean,styleMountTarget:Object,inlineThemeDisabled:{type:Boolean,default:void 0},as:{type:String,validator:()=>(mp("config-provider","`as` is deprecated, please use `tag` instead."),!0),default:void 0}},sy=Je({name:"ConfigProvider",alias:["App"],props:aC,setup(e){const o=Ee(Io,null),t=de(()=>{const{theme:b}=e;if(b===null)return;const y=o==null?void 0:o.mergedThemeRef.value;return b===void 0?y:y===void 0?b:Object.assign({},y,b)}),r=de(()=>{const{themeOverrides:b}=e;if(b!==null){if(b===void 0)return o==null?void 0:o.mergedThemeOverridesRef.value;{const y=o==null?void 0:o.mergedThemeOverridesRef.value;return y===void 0?b:Lt({},y,b)}}}),n=Qn(()=>{const{namespace:b}=e;return b===void 0?o==null?void 0:o.mergedNamespaceRef.value:b}),i=Qn(()=>{const{bordered:b}=e;return b===void 0?o==null?void 0:o.mergedBorderedRef.value:b}),a=de(()=>{const{icons:b}=e;return b===void 0?o==null?void 0:o.mergedIconsRef.value:b}),l=de(()=>{const{componentOptions:b}=e;return b!==void 0?b:o==null?void 0:o.mergedComponentPropsRef.value}),s=de(()=>{const{clsPrefix:b}=e;return b!==void 0?b:o?o.mergedClsPrefixRef.value:kr}),c=de(()=>{var b;const{rtl:y}=e;if(y===void 0)return o==null?void 0:o.mergedRtlRef.value;const C={};for(const I of y)C[I.name]=Ln(I),(b=I.peers)===null||b===void 0||b.forEach(E=>{E.name in C||(C[E.name]=Ln(E))});return C}),d=de(()=>e.breakpoints||(o==null?void 0:o.mergedBreakpointsRef.value)),u=e.inlineThemeDisabled||(o==null?void 0:o.inlineThemeDisabled),p=e.preflightStyleDisabled||(o==null?void 0:o.preflightStyleDisabled),g=e.styleMountTarget||(o==null?void 0:o.styleMountTarget),h=de(()=>{const{value:b}=t,{value:y}=r,C=y&&Object.keys(y).length!==0,I=b==null?void 0:b.name;return I?C?`${I}-${Zt(JSON.stringify(r.value))}`:I:C?Zt(JSON.stringify(r.value)):""});return Kt(Io,{mergedThemeHashRef:h,mergedBreakpointsRef:d,mergedRtlRef:c,mergedIconsRef:a,mergedComponentPropsRef:l,mergedBorderedRef:i,mergedNamespaceRef:n,mergedClsPrefixRef:s,mergedLocaleRef:de(()=>{const{locale:b}=e;if(b!==null)return b===void 0?o==null?void 0:o.mergedLocaleRef.value:b}),mergedDateLocaleRef:de(()=>{const{dateLocale:b}=e;if(b!==null)return b===void 0?o==null?void 0:o.mergedDateLocaleRef.value:b}),mergedHljsRef:de(()=>{const{hljs:b}=e;return b===void 0?o==null?void 0:o.mergedHljsRef.value:b}),mergedKatexRef:de(()=>{const{katex:b}=e;return b===void 0?o==null?void 0:o.mergedKatexRef.value:b}),mergedThemeRef:t,mergedThemeOverridesRef:r,inlineThemeDisabled:u||!1,preflightStyleDisabled:p||!1,styleMountTarget:g}),{mergedClsPrefix:s,mergedBordered:i,mergedNamespace:n,mergedTheme:t,mergedThemeOverrides:r}},render(){var e,o,t,r;return this.abstract?(r=(t=this.$slots).default)===null||r===void 0?void 0:r.call(t):z(this.as||this.tag,{class:`${this.mergedClsPrefix||kr}-config-provider`},(o=(e=this.$slots).default)===null||o===void 0?void 0:o.call(e))}}),Pc={name:"Popselect",common:A,peers:{Popover:lt,InternalSelectMenu:lr}};function lC(e){const{boxShadow2:o}=e;return{menuBoxShadow:o}}const sC={name:"Popselect",common:ge,peers:{Popover:It,InternalSelectMenu:pc},self:lC};function Tc(e){const{boxShadow2:o}=e;return{menuBoxShadow:o}}const cC={name:"Select",common:ge,peers:{InternalSelection:p0,InternalSelectMenu:pc},self:Tc},$c={name:"Select",common:A,peers:{InternalSelection:Di,InternalSelectMenu:lr},self:Tc},dC={itemPaddingSmall:"0 4px",itemMarginSmall:"0 0 0 8px",itemMarginSmallRtl:"0 8px 0 0",itemPaddingMedium:"0 4px",itemMarginMedium:"0 0 0 8px",itemMarginMediumRtl:"0 8px 0 0",itemPaddingLarge:"0 4px",itemMarginLarge:"0 0 0 8px",itemMarginLargeRtl:"0 8px 0 0",buttonIconSizeSmall:"14px",buttonIconSizeMedium:"16px",buttonIconSizeLarge:"18px",inputWidthSmall:"60px",selectWidthSmall:"unset",inputMarginSmall:"0 0 0 8px",inputMarginSmallRtl:"0 8px 0 0",selectMarginSmall:"0 0 0 8px",prefixMarginSmall:"0 8px 0 0",suffixMarginSmall:"0 0 0 8px",inputWidthMedium:"60px",selectWidthMedium:"unset",inputMarginMedium:"0 0 0 8px",inputMarginMediumRtl:"0 8px 0 0",selectMarginMedium:"0 0 0 8px",prefixMarginMedium:"0 8px 0 0",suffixMarginMedium:"0 0 0 8px",inputWidthLarge:"60px",selectWidthLarge:"unset",inputMarginLarge:"0 0 0 8px",inputMarginLargeRtl:"0 8px 0 0",selectMarginLarge:"0 0 0 8px",prefixMarginLarge:"0 8px 0 0",suffixMarginLarge:"0 0 0 8px"};function Ic(e){const{textColor2:o,primaryColor:t,primaryColorHover:r,primaryColorPressed:n,inputColorDisabled:i,textColorDisabled:a,borderColor:l,borderRadius:s,fontSizeTiny:c,fontSizeSmall:d,fontSizeMedium:u,heightTiny:p,heightSmall:g,heightMedium:h}=e;return Object.assign(Object.assign({},dC),{buttonColor:"#0000",buttonColorHover:"#0000",buttonColorPressed:"#0000",buttonBorder:`1px solid ${l}`,buttonBorderHover:`1px solid ${l}`,buttonBorderPressed:`1px solid ${l}`,buttonIconColor:o,buttonIconColorHover:o,buttonIconColorPressed:o,itemTextColor:o,itemTextColorHover:r,itemTextColorPressed:n,itemTextColorActive:t,itemTextColorDisabled:a,itemColor:"#0000",itemColorHover:"#0000",itemColorPressed:"#0000",itemColorActive:"#0000",itemColorActiveHover:"#0000",itemColorDisabled:i,itemBorder:"1px solid #0000",itemBorderHover:"1px solid #0000",itemBorderPressed:"1px solid #0000",itemBorderActive:`1px solid ${t}`,itemBorderDisabled:`1px solid ${l}`,itemBorderRadius:s,itemSizeSmall:p,itemSizeMedium:g,itemSizeLarge:h,itemFontSizeSmall:c,itemFontSizeMedium:d,itemFontSizeLarge:u,jumperFontSizeSmall:c,jumperFontSizeMedium:d,jumperFontSizeLarge:u,jumperTextColor:o,jumperTextColorDisabled:a})}const uC={name:"Pagination",common:ge,peers:{Select:cC,Input:_i,Popselect:sC},self:Ic},Hc={name:"Pagination",common:A,peers:{Select:$c,Input:eo,Popselect:Pc},self(e){const{primaryColor:o,opacity3:t}=e,r=_(o,{alpha:Number(t)}),n=Ic(e);return n.itemBorderActive=`1px solid ${r}`,n.itemBorderDisabled="1px solid #0000",n}},fC={padding:"4px 0",optionIconSizeSmall:"14px",optionIconSizeMedium:"16px",optionIconSizeLarge:"16px",optionIconSizeHuge:"18px",optionSuffixWidthSmall:"14px",optionSuffixWidthMedium:"14px",optionSuffixWidthLarge:"16px",optionSuffixWidthHuge:"16px",optionIconSuffixWidthSmall:"32px",optionIconSuffixWidthMedium:"32px",optionIconSuffixWidthLarge:"36px",optionIconSuffixWidthHuge:"36px",optionPrefixWidthSmall:"14px",optionPrefixWidthMedium:"14px",optionPrefixWidthLarge:"16px",optionPrefixWidthHuge:"16px",optionIconPrefixWidthSmall:"36px",optionIconPrefixWidthMedium:"36px",optionIconPrefixWidthLarge:"40px",optionIconPrefixWidthHuge:"40px"};function Fc(e){const{primaryColor:o,textColor2:t,dividerColor:r,hoverColor:n,popoverColor:i,invertedColor:a,borderRadius:l,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:d,fontSizeHuge:u,heightSmall:p,heightMedium:g,heightLarge:h,heightHuge:b,textColor3:y,opacityDisabled:C}=e;return Object.assign(Object.assign({},fC),{optionHeightSmall:p,optionHeightMedium:g,optionHeightLarge:h,optionHeightHuge:b,borderRadius:l,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:d,fontSizeHuge:u,optionTextColor:t,optionTextColorHover:t,optionTextColorActive:o,optionTextColorChildActive:o,color:i,dividerColor:r,suffixColor:t,prefixColor:t,optionColorHover:n,optionColorActive:_(o,{alpha:.1}),groupHeaderTextColor:y,optionTextColorInverted:"#BBB",optionTextColorHoverInverted:"#FFF",optionTextColorActiveInverted:"#FFF",optionTextColorChildActiveInverted:"#FFF",colorInverted:a,dividerColorInverted:"#BBB",suffixColorInverted:"#BBB",prefixColorInverted:"#BBB",optionColorHoverInverted:o,optionColorActiveInverted:o,groupHeaderTextColorInverted:"#AAA",optionOpacityDisabled:C})}const pC={name:"Dropdown",common:ge,peers:{Popover:It},self:Fc},Ei={name:"Dropdown",common:A,peers:{Popover:lt},self(e){const{primaryColorSuppl:o,primaryColor:t,popoverColor:r}=e,n=Fc(e);return n.colorInverted=r,n.optionColorActive=_(t,{alpha:.15}),n.optionColorActiveInverted=o,n.optionColorHoverInverted=o,n}},Ac={padding:"8px 14px"},fn={name:"Tooltip",common:A,peers:{Popover:lt},self(e){const{borderRadius:o,boxShadow2:t,popoverColor:r,textColor2:n}=e;return Object.assign(Object.assign({},Ac),{borderRadius:o,boxShadow:t,color:r,textColor:n})}};function hC(e){const{borderRadius:o,boxShadow2:t,baseColor:r}=e;return Object.assign(Object.assign({},Ac),{borderRadius:o,boxShadow:t,color:B(r,"rgba(0, 0, 0, .85)"),textColor:r})}const mC={name:"Tooltip",common:ge,peers:{Popover:It},self:hC},Mc={name:"Ellipsis",common:A,peers:{Tooltip:fn}},gC={name:"Ellipsis",common:ge,peers:{Tooltip:mC}},Dc={radioSizeSmall:"14px",radioSizeMedium:"16px",radioSizeLarge:"18px",labelPadding:"0 8px",labelFontWeight:"400"},_c={name:"Radio",common:A,self(e){const{borderColor:o,primaryColor:t,baseColor:r,textColorDisabled:n,inputColorDisabled:i,textColor2:a,opacityDisabled:l,borderRadius:s,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,heightSmall:p,heightMedium:g,heightLarge:h,lineHeight:b}=e;return Object.assign(Object.assign({},Dc),{labelLineHeight:b,buttonHeightSmall:p,buttonHeightMedium:g,buttonHeightLarge:h,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,boxShadow:`inset 0 0 0 1px ${o}`,boxShadowActive:`inset 0 0 0 1px ${t}`,boxShadowFocus:`inset 0 0 0 1px ${t}, 0 0 0 2px ${_(t,{alpha:.3})}`,boxShadowHover:`inset 0 0 0 1px ${t}`,boxShadowDisabled:`inset 0 0 0 1px ${o}`,color:"#0000",colorDisabled:i,colorActive:"#0000",textColor:a,textColorDisabled:n,dotColorActive:t,dotColorDisabled:o,buttonBorderColor:o,buttonBorderColorActive:t,buttonBorderColorHover:t,buttonColor:"#0000",buttonColorActive:t,buttonTextColor:a,buttonTextColorActive:r,buttonTextColorHover:t,opacityDisabled:l,buttonBoxShadowFocus:`inset 0 0 0 1px ${t}, 0 0 0 2px ${_(t,{alpha:.3})}`,buttonBoxShadowHover:`inset 0 0 0 1px ${t}`,buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:s})}};function bC(e){const{borderColor:o,primaryColor:t,baseColor:r,textColorDisabled:n,inputColorDisabled:i,textColor2:a,opacityDisabled:l,borderRadius:s,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,heightSmall:p,heightMedium:g,heightLarge:h,lineHeight:b}=e;return Object.assign(Object.assign({},Dc),{labelLineHeight:b,buttonHeightSmall:p,buttonHeightMedium:g,buttonHeightLarge:h,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,boxShadow:`inset 0 0 0 1px ${o}`,boxShadowActive:`inset 0 0 0 1px ${t}`,boxShadowFocus:`inset 0 0 0 1px ${t}, 0 0 0 2px ${_(t,{alpha:.2})}`,boxShadowHover:`inset 0 0 0 1px ${t}`,boxShadowDisabled:`inset 0 0 0 1px ${o}`,color:r,colorDisabled:i,colorActive:"#0000",textColor:a,textColorDisabled:n,dotColorActive:t,dotColorDisabled:o,buttonBorderColor:o,buttonBorderColorActive:t,buttonBorderColorHover:o,buttonColor:r,buttonColorActive:r,buttonTextColor:a,buttonTextColorActive:t,buttonTextColorHover:t,opacityDisabled:l,buttonBoxShadowFocus:`inset 0 0 0 1px ${t}, 0 0 0 2px ${_(t,{alpha:.3})}`,buttonBoxShadowHover:"inset 0 0 0 1px #0000",buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:s})}const CC={name:"Radio",common:ge,self:bC},xC={thPaddingSmall:"8px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"8px",tdPaddingMedium:"12px",tdPaddingLarge:"12px",sorterSize:"15px",resizableContainerSize:"8px",resizableSize:"2px",filterSize:"15px",paginationMargin:"12px 0 0 0",emptyPadding:"48px 0",actionPadding:"8px 12px",actionButtonMargin:"0 8px 0 0"};function Ec(e){const{cardColor:o,modalColor:t,popoverColor:r,textColor2:n,textColor1:i,tableHeaderColor:a,tableColorHover:l,iconColor:s,primaryColor:c,fontWeightStrong:d,borderRadius:u,lineHeight:p,fontSizeSmall:g,fontSizeMedium:h,fontSizeLarge:b,dividerColor:y,heightSmall:C,opacityDisabled:I,tableColorStriped:E}=e;return Object.assign(Object.assign({},xC),{actionDividerColor:y,lineHeight:p,borderRadius:u,fontSizeSmall:g,fontSizeMedium:h,fontSizeLarge:b,borderColor:B(o,y),tdColorHover:B(o,l),tdColorSorting:B(o,l),tdColorStriped:B(o,E),thColor:B(o,a),thColorHover:B(B(o,a),l),thColorSorting:B(B(o,a),l),tdColor:o,tdTextColor:n,thTextColor:i,thFontWeight:d,thButtonColorHover:l,thIconColor:s,thIconColorActive:c,borderColorModal:B(t,y),tdColorHoverModal:B(t,l),tdColorSortingModal:B(t,l),tdColorStripedModal:B(t,E),thColorModal:B(t,a),thColorHoverModal:B(B(t,a),l),thColorSortingModal:B(B(t,a),l),tdColorModal:t,borderColorPopover:B(r,y),tdColorHoverPopover:B(r,l),tdColorSortingPopover:B(r,l),tdColorStripedPopover:B(r,E),thColorPopover:B(r,a),thColorHoverPopover:B(B(r,a),l),thColorSortingPopover:B(B(r,a),l),tdColorPopover:r,boxShadowBefore:"inset -12px 0 8px -12px rgba(0, 0, 0, .18)",boxShadowAfter:"inset 12px 0 8px -12px rgba(0, 0, 0, .18)",loadingColor:c,loadingSize:C,opacityLoading:I})}const cy={name:"DataTable",common:ge,peers:{Button:sr,Checkbox:Z0,Radio:CC,Pagination:uC,Scrollbar:un,Empty:Mi,Popover:It,Ellipsis:gC,Dropdown:pC},self:Ec},vC={name:"DataTable",common:A,peers:{Button:je,Checkbox:Ht,Radio:_c,Pagination:Hc,Scrollbar:We,Empty:at,Popover:lt,Ellipsis:Mc,Dropdown:Ei},self(e){const o=Ec(e);return o.boxShadowAfter="inset 12px 0 8px -12px rgba(0, 0, 0, .36)",o.boxShadowBefore="inset -12px 0 8px -12px rgba(0, 0, 0, .36)",o}};function Rc(e){const{textColorBase:o,opacity1:t,opacity2:r,opacity3:n,opacity4:i,opacity5:a}=e;return{color:o,opacity1Depth:t,opacity2Depth:r,opacity3Depth:n,opacity4Depth:i,opacity5Depth:a}}const dy={common:ge,self:Rc},yC={name:"Icon",common:A,self:Rc},SC={itemFontSize:"12px",itemHeight:"36px",itemWidth:"52px",panelActionPadding:"8px 0"};function Lc(e){const{popoverColor:o,textColor2:t,primaryColor:r,hoverColor:n,dividerColor:i,opacityDisabled:a,boxShadow2:l,borderRadius:s,iconColor:c,iconColorDisabled:d}=e;return Object.assign(Object.assign({},SC),{panelColor:o,panelBoxShadow:l,panelDividerColor:i,itemTextColor:t,itemTextColorActive:r,itemColorHover:n,itemOpacityDisabled:a,itemBorderRadius:s,borderRadius:s,iconColor:c,iconColorDisabled:d})}const wC={name:"TimePicker",common:ge,peers:{Scrollbar:un,Button:sr,Input:_i},self:Lc},kc={name:"TimePicker",common:A,peers:{Scrollbar:We,Button:je,Input:eo},self:Lc},PC={itemSize:"24px",itemCellWidth:"38px",itemCellHeight:"32px",scrollItemWidth:"80px",scrollItemHeight:"40px",panelExtraFooterPadding:"8px 12px",panelActionPadding:"8px 12px",calendarTitlePadding:"0",calendarTitleHeight:"28px",arrowSize:"14px",panelHeaderPadding:"8px 12px",calendarDaysHeight:"32px",calendarTitleGridTempateColumns:"28px 28px 1fr 28px 28px",calendarLeftPaddingDate:"6px 12px 4px 12px",calendarLeftPaddingDatetime:"4px 12px",calendarLeftPaddingDaterange:"6px 12px 4px 12px",calendarLeftPaddingDatetimerange:"4px 12px",calendarLeftPaddingMonth:"0",calendarLeftPaddingYear:"0",calendarLeftPaddingQuarter:"0",calendarLeftPaddingMonthrange:"0",calendarLeftPaddingQuarterrange:"0",calendarLeftPaddingYearrange:"0",calendarLeftPaddingWeek:"6px 12px 4px 12px",calendarRightPaddingDate:"6px 12px 4px 12px",calendarRightPaddingDatetime:"4px 12px",calendarRightPaddingDaterange:"6px 12px 4px 12px",calendarRightPaddingDatetimerange:"4px 12px",calendarRightPaddingMonth:"0",calendarRightPaddingYear:"0",calendarRightPaddingQuarter:"0",calendarRightPaddingMonthrange:"0",calendarRightPaddingQuarterrange:"0",calendarRightPaddingYearrange:"0",calendarRightPaddingWeek:"0"};function Oc(e){const{hoverColor:o,fontSize:t,textColor2:r,textColorDisabled:n,popoverColor:i,primaryColor:a,borderRadiusSmall:l,iconColor:s,iconColorDisabled:c,textColor1:d,dividerColor:u,boxShadow2:p,borderRadius:g,fontWeightStrong:h}=e;return Object.assign(Object.assign({},PC),{itemFontSize:t,calendarDaysFontSize:t,calendarTitleFontSize:t,itemTextColor:r,itemTextColorDisabled:n,itemTextColorActive:i,itemTextColorCurrent:a,itemColorIncluded:_(a,{alpha:.1}),itemColorHover:o,itemColorDisabled:o,itemColorActive:a,itemBorderRadius:l,panelColor:i,panelTextColor:r,arrowColor:s,calendarTitleTextColor:d,calendarTitleColorHover:o,calendarDaysTextColor:r,panelHeaderDividerColor:u,calendarDaysDividerColor:u,calendarDividerColor:u,panelActionDividerColor:u,panelBoxShadow:p,panelBorderRadius:g,calendarTitleFontWeight:h,scrollItemBorderRadius:g,iconColor:s,iconColorDisabled:c})}const uy={name:"DatePicker",common:ge,peers:{Input:_i,Button:sr,TimePicker:wC,Scrollbar:un},self:Oc},TC={name:"DatePicker",common:A,peers:{Input:eo,Button:je,TimePicker:kc,Scrollbar:We},self(e){const{popoverColor:o,hoverColor:t,primaryColor:r}=e,n=Oc(e);return n.itemColorDisabled=B(o,t),n.itemColorIncluded=_(r,{alpha:.15}),n.itemColorHover=B(o,t),n}},$C={thPaddingBorderedSmall:"8px 12px",thPaddingBorderedMedium:"12px 16px",thPaddingBorderedLarge:"16px 24px",thPaddingSmall:"0",thPaddingMedium:"0",thPaddingLarge:"0",tdPaddingBorderedSmall:"8px 12px",tdPaddingBorderedMedium:"12px 16px",tdPaddingBorderedLarge:"16px 24px",tdPaddingSmall:"0 0 8px 0",tdPaddingMedium:"0 0 12px 0",tdPaddingLarge:"0 0 16px 0"};function IC(e){const{tableHeaderColor:o,textColor2:t,textColor1:r,cardColor:n,modalColor:i,popoverColor:a,dividerColor:l,borderRadius:s,fontWeightStrong:c,lineHeight:d,fontSizeSmall:u,fontSizeMedium:p,fontSizeLarge:g}=e;return Object.assign(Object.assign({},$C),{lineHeight:d,fontSizeSmall:u,fontSizeMedium:p,fontSizeLarge:g,titleTextColor:r,thColor:B(n,o),thColorModal:B(i,o),thColorPopover:B(a,o),thTextColor:r,thFontWeight:c,tdTextColor:t,tdColor:n,tdColorModal:i,tdColorPopover:a,borderColor:B(n,l),borderColorModal:B(i,l),borderColorPopover:B(a,l),borderRadius:s})}const HC={name:"Descriptions",common:A,self:IC},FC={titleFontSize:"18px",padding:"16px 28px 20px 28px",iconSize:"28px",actionSpace:"12px",contentMargin:"8px 0 16px 0",iconMargin:"0 4px 0 0",iconMarginIconTop:"4px 0 8px 0",closeSize:"22px",closeIconSize:"18px",closeMargin:"20px 26px 0 0",closeMarginIconTop:"10px 16px 0 0"};function AC(e){const{textColor1:o,textColor2:t,modalColor:r,closeIconColor:n,closeIconColorHover:i,closeIconColorPressed:a,closeColorHover:l,closeColorPressed:s,infoColor:c,successColor:d,warningColor:u,errorColor:p,primaryColor:g,dividerColor:h,borderRadius:b,fontWeightStrong:y,lineHeight:C,fontSize:I}=e;return Object.assign(Object.assign({},FC),{fontSize:I,lineHeight:C,border:`1px solid ${h}`,titleTextColor:o,textColor:t,color:r,closeColorHover:l,closeColorPressed:s,closeIconColor:n,closeIconColorHover:i,closeIconColorPressed:a,closeBorderRadius:b,iconColor:g,iconColorInfo:c,iconColorSuccess:d,iconColorWarning:u,iconColorError:p,borderRadius:b,titleFontWeight:y})}const zc={name:"Dialog",common:A,peers:{Button:je},self:AC};function MC(e){const{modalColor:o,textColor2:t,boxShadow3:r}=e;return{color:o,textColor:t,boxShadow:r}}const DC={name:"Modal",common:A,peers:{Scrollbar:We,Dialog:zc,Card:yc},self:MC},_C={name:"LoadingBar",common:A,self(e){const{primaryColor:o}=e;return{colorError:"red",colorLoading:o,height:"2px"}}},EC="n-message-api",Bc="n-message-provider",RC={margin:"0 0 8px 0",padding:"10px 20px",maxWidth:"720px",minWidth:"420px",iconMargin:"0 10px 0 0",closeMargin:"0 0 0 10px",closeSize:"20px",closeIconSize:"16px",iconSize:"20px",fontSize:"14px"};function Wc(e){const{textColor2:o,closeIconColor:t,closeIconColorHover:r,closeIconColorPressed:n,infoColor:i,successColor:a,errorColor:l,warningColor:s,popoverColor:c,boxShadow2:d,primaryColor:u,lineHeight:p,borderRadius:g,closeColorHover:h,closeColorPressed:b}=e;return Object.assign(Object.assign({},RC),{closeBorderRadius:g,textColor:o,textColorInfo:o,textColorSuccess:o,textColorError:o,textColorWarning:o,textColorLoading:o,color:c,colorInfo:c,colorSuccess:c,colorError:c,colorWarning:c,colorLoading:c,boxShadow:d,boxShadowInfo:d,boxShadowSuccess:d,boxShadowError:d,boxShadowWarning:d,boxShadowLoading:d,iconColor:o,iconColorInfo:i,iconColorSuccess:a,iconColorWarning:s,iconColorError:l,iconColorLoading:u,closeColorHover:h,closeColorPressed:b,closeIconColor:t,closeIconColorHover:r,closeIconColorPressed:n,closeColorHoverInfo:h,closeColorPressedInfo:b,closeIconColorInfo:t,closeIconColorHoverInfo:r,closeIconColorPressedInfo:n,closeColorHoverSuccess:h,closeColorPressedSuccess:b,closeIconColorSuccess:t,closeIconColorHoverSuccess:r,closeIconColorPressedSuccess:n,closeColorHoverError:h,closeColorPressedError:b,closeIconColorError:t,closeIconColorHoverError:r,closeIconColorPressedError:n,closeColorHoverWarning:h,closeColorPressedWarning:b,closeIconColorWarning:t,closeIconColorHoverWarning:r,closeIconColorPressedWarning:n,closeColorHoverLoading:h,closeColorPressedLoading:b,closeIconColorLoading:t,closeIconColorHoverLoading:r,closeIconColorPressedLoading:n,loadingColor:u,lineHeight:p,borderRadius:g})}const LC={common:ge,self:Wc},kC={name:"Message",common:A,self:Wc},jc={icon:Function,type:{type:String,default:"info"},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,onClose:Function,onMouseenter:Function,onMouseleave:Function},OC=Q([to("message-wrapper",` margin: var(--n-margin); z-index: 0; transform-origin: top center; @@ -338,4 +338,6 @@ ${o} right: 12px; justify-content: flex-end; align-items: flex-end; - `)])]),OC={info:()=>O(Kb,null),success:()=>O(Yb,null),warning:()=>O(Jb,null),error:()=>O(qb,null),default:()=>null},BC=Je({name:"Message",props:Object.assign(Object.assign({},jc),{render:Function}),setup(e){const{inlineThemeDisabled:o,mergedRtlRef:t}=Ti(e),{props:r,mergedClsPrefixRef:n}=Ee(Bc),i=rc("Message",t,n),a=ir("Message","-message",zC,LC,r,n),l=de(()=>{const{type:c}=e,{common:{cubicBezierEaseInOut:d},self:{padding:u,margin:p,maxWidth:g,iconMargin:h,closeMargin:b,closeSize:y,iconSize:C,fontSize:I,lineHeight:E,borderRadius:v,iconColorInfo:L,iconColorSuccess:W,iconColorWarning:w,iconColorError:K,iconColorLoading:D,closeIconSize:j,closeBorderRadius:q,[Z("textColor",c)]:F,[Z("boxShadow",c)]:ee,[Z("color",c)]:ae,[Z("closeColorHover",c)]:xe,[Z("closeColorPressed",c)]:oe,[Z("closeIconColor",c)]:V,[Z("closeIconColorPressed",c)]:re,[Z("closeIconColorHover",c)]:Ne}}=a.value;return{"--n-bezier":d,"--n-margin":p,"--n-padding":u,"--n-max-width":g,"--n-font-size":I,"--n-icon-margin":h,"--n-icon-size":C,"--n-close-icon-size":j,"--n-close-border-radius":q,"--n-close-size":y,"--n-close-margin":b,"--n-text-color":F,"--n-color":ae,"--n-box-shadow":ee,"--n-icon-color-info":L,"--n-icon-color-success":W,"--n-icon-color-warning":w,"--n-icon-color-error":K,"--n-icon-color-loading":D,"--n-close-color-hover":xe,"--n-close-color-pressed":oe,"--n-close-icon-color":V,"--n-close-icon-color-pressed":re,"--n-close-icon-color-hover":Ne,"--n-line-height":E,"--n-border-radius":v}}),s=o?As("message",de(()=>e.type[0]),l,{}):void 0;return{mergedClsPrefix:n,rtlEnabled:i,messageProviderProps:r,handleClose(){var c;(c=e.onClose)===null||c===void 0||c.call(e)},cssVars:o?void 0:l,themeClass:s==null?void 0:s.themeClass,onRender:s==null?void 0:s.onRender,placement:r.placement}},render(){const{render:e,type:o,closable:t,content:r,mergedClsPrefix:n,cssVars:i,themeClass:a,onRender:l,icon:s,handleClose:c,showIcon:d}=this;l==null||l();let u;return O("div",{class:[`${n}-message-wrapper`,a],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith("top")?"flex-start":"flex-end"},i]},e?e(this.$props):O("div",{class:[`${n}-message ${n}-message--${o}-type`,this.rtlEnabled&&`${n}-message--rtl`]},(u=WC(s,o,n))&&d?O("div",{class:`${n}-message__icon ${n}-message__icon--${o}-type`},O(Ai,null,{default:()=>u})):null,O("div",{class:`${n}-message__content`},Cp(r)),t?O(Xb,{clsPrefix:n,class:`${n}-message__close`,onClick:c,absolute:!0}):null))}});function WC(e,o,t){if(typeof e=="function")return e();{const r=o==="loading"?O(lc,{clsPrefix:t,strokeWidth:24,scale:.85}):OC[o]();return r?O(ic,{clsPrefix:t,key:o},{default:()=>r}):null}}const jC=Je({name:"MessageEnvironment",props:Object.assign(Object.assign({},jc),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(e){let o=null;const t=Be(!0);Qr(()=>{r()});function r(){const{duration:d}=e;d&&(o=window.setTimeout(a,d))}function n(d){d.currentTarget===d.target&&o!==null&&(window.clearTimeout(o),o=null)}function i(d){d.currentTarget===d.target&&r()}function a(){const{onHide:d}=e;t.value=!1,o&&(window.clearTimeout(o),o=null),d&&d()}function l(){const{onClose:d}=e;d&&d(),a()}function s(){const{onAfterLeave:d,onInternalAfterLeave:u,onAfterHide:p,internalKey:g}=e;d&&d(),u&&u(g),p&&p()}function c(){a()}return{show:t,hide:a,handleClose:l,handleAfterLeave:s,handleMouseleave:i,handleMouseenter:n,deactivate:c}},render(){return O(ac,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?O(BC,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),NC=Object.assign(Object.assign({},ir.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:"top"},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),fy=Je({name:"MessageProvider",props:NC,setup(e){const{mergedClsPrefixRef:o}=Ti(e),t=Be([]),r=Be({}),n={create(s,c){return i(s,Object.assign({type:"default"},c))},info(s,c){return i(s,Object.assign(Object.assign({},c),{type:"info"}))},success(s,c){return i(s,Object.assign(Object.assign({},c),{type:"success"}))},warning(s,c){return i(s,Object.assign(Object.assign({},c),{type:"warning"}))},error(s,c){return i(s,Object.assign(Object.assign({},c),{type:"error"}))},loading(s,c){return i(s,Object.assign(Object.assign({},c),{type:"loading"}))},destroyAll:l};Kt(Bc,{props:e,mergedClsPrefixRef:o}),Kt(EC,n);function i(s,c){const d=cp(),u=Gr(Object.assign(Object.assign({},c),{content:s,key:d,destroy:()=>{var g;(g=r.value[d])===null||g===void 0||g.hide()}})),{max:p}=e;return p&&t.value.length>=p&&t.value.shift(),t.value.push(u),u}function a(s){t.value.splice(t.value.findIndex(c=>c.key===s),1),delete r.value[s]}function l(){Object.values(r.value).forEach(s=>{s.hide()})}return Object.assign({mergedClsPrefix:o,messageRefs:r,messageList:t,handleAfterLeave:a},n)},render(){var e,o,t;return O(Fe,null,(o=(e=this.$slots).default)===null||o===void 0?void 0:o.call(e),this.messageList.length?O(Yd,{to:(t=this.to)!==null&&t!==void 0?t:"body"},O("div",{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:"message-container",style:this.containerStyle},this.messageList.map(r=>O(jC,Object.assign({ref:n=>{n&&(this.messageRefs[r.key]=n)},internalKey:r.key,onInternalAfterLeave:this.handleAfterLeave},bp(r,["destroy"],void 0),{duration:r.duration===void 0?this.duration:r.duration,keepAliveOnHover:r.keepAliveOnHover===void 0?this.keepAliveOnHover:r.keepAliveOnHover,closable:r.closable===void 0?this.closable:r.closable}))))):null)}}),VC={closeMargin:"16px 12px",closeSize:"20px",closeIconSize:"16px",width:"365px",padding:"16px",titleFontSize:"16px",metaFontSize:"12px",descriptionFontSize:"12px"};function UC(e){const{textColor2:o,successColor:t,infoColor:r,warningColor:n,errorColor:i,popoverColor:a,closeIconColor:l,closeIconColorHover:s,closeIconColorPressed:c,closeColorHover:d,closeColorPressed:u,textColor1:p,textColor3:g,borderRadius:h,fontWeightStrong:b,boxShadow2:y,lineHeight:C,fontSize:I}=e;return Object.assign(Object.assign({},VC),{borderRadius:h,lineHeight:C,fontSize:I,headerFontWeight:b,iconColor:o,iconColorSuccess:t,iconColorInfo:r,iconColorWarning:n,iconColorError:i,color:a,textColor:o,closeIconColor:l,closeIconColorHover:s,closeIconColorPressed:c,closeBorderRadius:h,closeColorHover:d,closeColorPressed:u,headerTextColor:p,descriptionTextColor:g,actionTextColor:o,boxShadow:y})}const GC={name:"Notification",common:A,peers:{Scrollbar:We},self:UC};function qC(e){const{textColor1:o,dividerColor:t,fontWeightStrong:r}=e;return{textColor:o,color:t,fontWeight:r}}const KC={name:"Divider",common:A,self:qC};function YC(e){const{modalColor:o,textColor1:t,textColor2:r,boxShadow3:n,lineHeight:i,fontWeightStrong:a,dividerColor:l,closeColorHover:s,closeColorPressed:c,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,borderRadius:g,primaryColorHover:h}=e;return{bodyPadding:"16px 24px",borderRadius:g,headerPadding:"16px 24px",footerPadding:"16px 24px",color:o,textColor:r,titleTextColor:t,titleFontSize:"18px",titleFontWeight:a,boxShadow:n,lineHeight:i,headerBorderBottom:`1px solid ${l}`,footerBorderTop:`1px solid ${l}`,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,closeSize:"22px",closeIconSize:"18px",closeColorHover:s,closeColorPressed:c,closeBorderRadius:g,resizableTriggerColorHover:h}}const JC={name:"Drawer",common:A,peers:{Scrollbar:We},self:YC},ZC={actionMargin:"0 0 0 20px",actionMarginRtl:"0 20px 0 0"},QC={name:"DynamicInput",common:A,peers:{Input:eo,Button:je},self(){return ZC}},XC={gapSmall:"4px 8px",gapMedium:"8px 12px",gapLarge:"12px 16px"},Nc={name:"Space",self(){return XC}},ex={name:"DynamicTags",common:A,peers:{Input:eo,Button:je,Tag:mc,Space:Nc},self(){return{inputWidth:"64px"}}},ox={name:"Element",common:A},tx={gapSmall:"4px 8px",gapMedium:"8px 12px",gapLarge:"12px 16px"},rx={name:"Flex",self(){return tx}},nx={name:"ButtonGroup",common:A},ix={feedbackPadding:"4px 0 0 2px",feedbackHeightSmall:"24px",feedbackHeightMedium:"24px",feedbackHeightLarge:"26px",feedbackFontSizeSmall:"13px",feedbackFontSizeMedium:"14px",feedbackFontSizeLarge:"14px",labelFontSizeLeftSmall:"14px",labelFontSizeLeftMedium:"14px",labelFontSizeLeftLarge:"15px",labelFontSizeTopSmall:"13px",labelFontSizeTopMedium:"14px",labelFontSizeTopLarge:"14px",labelHeightSmall:"24px",labelHeightMedium:"26px",labelHeightLarge:"28px",labelPaddingVertical:"0 0 6px 2px",labelPaddingHorizontal:"0 12px 0 0",labelTextAlignVertical:"left",labelTextAlignHorizontal:"right",labelFontWeight:"400"};function Vc(e){const{heightSmall:o,heightMedium:t,heightLarge:r,textColor1:n,errorColor:i,warningColor:a,lineHeight:l,textColor3:s}=e;return Object.assign(Object.assign({},ix),{blankHeightSmall:o,blankHeightMedium:t,blankHeightLarge:r,lineHeight:l,labelTextColor:n,asteriskColor:i,feedbackTextColorError:i,feedbackTextColorWarning:a,feedbackTextColor:s})}const py={common:ge,self:Vc},ax={name:"Form",common:A,self:Vc},lx={name:"GradientText",common:A,self(e){const{primaryColor:o,successColor:t,warningColor:r,errorColor:n,infoColor:i,primaryColorSuppl:a,successColorSuppl:l,warningColorSuppl:s,errorColorSuppl:c,infoColorSuppl:d,fontWeightStrong:u}=e;return{fontWeight:u,rotate:"252deg",colorStartPrimary:o,colorEndPrimary:a,colorStartInfo:i,colorEndInfo:d,colorStartWarning:r,colorEndWarning:s,colorStartError:n,colorEndError:c,colorStartSuccess:t,colorEndSuccess:l}}},sx={name:"InputNumber",common:A,peers:{Button:je,Input:eo},self(e){const{textColorDisabled:o}=e;return{iconColorDisabled:o}}},cx={name:"Layout",common:A,peers:{Scrollbar:We},self(e){const{textColor2:o,bodyColor:t,popoverColor:r,cardColor:n,dividerColor:i,scrollbarColor:a,scrollbarColorHover:l}=e;return{textColor:o,textColorInverted:o,color:t,colorEmbedded:t,headerColor:n,headerColorInverted:n,footerColor:n,footerColorInverted:n,headerBorderColor:i,headerBorderColorInverted:i,footerBorderColor:i,footerBorderColorInverted:i,siderBorderColor:i,siderBorderColorInverted:i,siderColor:n,siderColorInverted:n,siderToggleButtonBorder:"1px solid transparent",siderToggleButtonColor:r,siderToggleButtonIconColor:o,siderToggleButtonIconColorInverted:o,siderToggleBarColor:B(t,a),siderToggleBarColorHover:B(t,l),__invertScrollbar:"false"}}},dx={name:"Row",common:A};function Uc(e){const{textColor2:o,cardColor:t,modalColor:r,popoverColor:n,dividerColor:i,borderRadius:a,fontSize:l,hoverColor:s}=e;return{textColor:o,color:t,colorHover:s,colorModal:r,colorHoverModal:B(r,s),colorPopover:n,colorHoverPopover:B(n,s),borderColor:i,borderColorModal:B(r,i),borderColorPopover:B(n,i),borderRadius:a,fontSize:l}}const hy={common:ge,self:Uc},ux={name:"List",common:A,self:Uc},fx={name:"Log",common:A,peers:{Scrollbar:We,Code:wc},self(e){const{textColor2:o,inputColor:t,fontSize:r,primaryColor:n}=e;return{loaderFontSize:r,loaderTextColor:o,loaderColor:t,loaderBorder:"1px solid #0000",loadingColor:n}}},px={name:"Mention",common:A,peers:{InternalSelectMenu:lr,Input:eo},self(e){const{boxShadow2:o}=e;return{menuBoxShadow:o}}};function hx(e,o,t,r){return{itemColorHoverInverted:"#0000",itemColorActiveInverted:o,itemColorActiveHoverInverted:o,itemColorActiveCollapsedInverted:o,itemTextColorInverted:e,itemTextColorHoverInverted:t,itemTextColorChildActiveInverted:t,itemTextColorChildActiveHoverInverted:t,itemTextColorActiveInverted:t,itemTextColorActiveHoverInverted:t,itemTextColorHorizontalInverted:e,itemTextColorHoverHorizontalInverted:t,itemTextColorChildActiveHorizontalInverted:t,itemTextColorChildActiveHoverHorizontalInverted:t,itemTextColorActiveHorizontalInverted:t,itemTextColorActiveHoverHorizontalInverted:t,itemIconColorInverted:e,itemIconColorHoverInverted:t,itemIconColorActiveInverted:t,itemIconColorActiveHoverInverted:t,itemIconColorChildActiveInverted:t,itemIconColorChildActiveHoverInverted:t,itemIconColorCollapsedInverted:e,itemIconColorHorizontalInverted:e,itemIconColorHoverHorizontalInverted:t,itemIconColorActiveHorizontalInverted:t,itemIconColorActiveHoverHorizontalInverted:t,itemIconColorChildActiveHorizontalInverted:t,itemIconColorChildActiveHoverHorizontalInverted:t,arrowColorInverted:e,arrowColorHoverInverted:t,arrowColorActiveInverted:t,arrowColorActiveHoverInverted:t,arrowColorChildActiveInverted:t,arrowColorChildActiveHoverInverted:t,groupTextColorInverted:r}}function mx(e){const{borderRadius:o,textColor3:t,primaryColor:r,textColor2:n,textColor1:i,fontSize:a,dividerColor:l,hoverColor:s,primaryColorHover:c}=e;return Object.assign({borderRadius:o,color:"#0000",groupTextColor:t,itemColorHover:s,itemColorActive:_(r,{alpha:.1}),itemColorActiveHover:_(r,{alpha:.1}),itemColorActiveCollapsed:_(r,{alpha:.1}),itemTextColor:n,itemTextColorHover:n,itemTextColorActive:r,itemTextColorActiveHover:r,itemTextColorChildActive:r,itemTextColorChildActiveHover:r,itemTextColorHorizontal:n,itemTextColorHoverHorizontal:c,itemTextColorActiveHorizontal:r,itemTextColorActiveHoverHorizontal:r,itemTextColorChildActiveHorizontal:r,itemTextColorChildActiveHoverHorizontal:r,itemIconColor:i,itemIconColorHover:i,itemIconColorActive:r,itemIconColorActiveHover:r,itemIconColorChildActive:r,itemIconColorChildActiveHover:r,itemIconColorCollapsed:i,itemIconColorHorizontal:i,itemIconColorHoverHorizontal:c,itemIconColorActiveHorizontal:r,itemIconColorActiveHoverHorizontal:r,itemIconColorChildActiveHorizontal:r,itemIconColorChildActiveHoverHorizontal:r,itemHeight:"42px",arrowColor:n,arrowColorHover:n,arrowColorActive:r,arrowColorActiveHover:r,arrowColorChildActive:r,arrowColorChildActiveHover:r,colorInverted:"#0000",borderColorHorizontal:"#0000",fontSize:a,dividerColor:l},hx("#BBB",r,"#FFF","#AAA"))}const gx={name:"Menu",common:A,peers:{Tooltip:fn,Dropdown:Ei},self(e){const{primaryColor:o,primaryColorSuppl:t}=e,r=mx(e);return r.itemColorActive=_(o,{alpha:.15}),r.itemColorActiveHover=_(o,{alpha:.15}),r.itemColorActiveCollapsed=_(o,{alpha:.15}),r.itemColorActiveInverted=t,r.itemColorActiveHoverInverted=t,r.itemColorActiveCollapsedInverted=t,r}},bx={titleFontSize:"18px",backSize:"22px"};function Cx(e){const{textColor1:o,textColor2:t,textColor3:r,fontSize:n,fontWeightStrong:i,primaryColorHover:a,primaryColorPressed:l}=e;return Object.assign(Object.assign({},bx),{titleFontWeight:i,fontSize:n,titleTextColor:o,backColor:t,backColorHover:a,backColorPressed:l,subtitleTextColor:r})}const xx={name:"PageHeader",common:A,self:Cx},vx={iconSize:"22px"};function Gc(e){const{fontSize:o,warningColor:t}=e;return Object.assign(Object.assign({},vx),{fontSize:o,iconColor:t})}const my={name:"Popconfirm",common:ge,peers:{Button:sr,Popover:It},self:Gc},yx={name:"Popconfirm",common:A,peers:{Button:je,Popover:lt},self:Gc};function Sx(e){const{infoColor:o,successColor:t,warningColor:r,errorColor:n,textColor2:i,progressRailColor:a,fontSize:l,fontWeight:s}=e;return{fontSize:l,fontSizeCircle:"28px",fontWeightCircle:s,railColor:a,railHeight:"8px",iconSizeCircle:"36px",iconSizeLine:"18px",iconColor:o,iconColorInfo:o,iconColorSuccess:t,iconColorWarning:r,iconColorError:n,textColorCircle:i,textColorLineInner:"rgb(255, 255, 255)",textColorLineOuter:i,fillColor:o,fillColorInfo:o,fillColorSuccess:t,fillColorWarning:r,fillColorError:n,lineBgProcessing:"linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)"}}const qc={name:"Progress",common:A,self(e){const o=Sx(e);return o.textColorLineInner="rgb(0, 0, 0)",o.lineBgProcessing="linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)",o}},wx={name:"Rate",common:A,self(e){const{railColor:o}=e;return{itemColor:o,itemColorActive:"#CCAA33",itemSize:"20px",sizeSmall:"16px",sizeMedium:"20px",sizeLarge:"24px"}}},Px={titleFontSizeSmall:"26px",titleFontSizeMedium:"32px",titleFontSizeLarge:"40px",titleFontSizeHuge:"48px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",iconSizeSmall:"64px",iconSizeMedium:"80px",iconSizeLarge:"100px",iconSizeHuge:"125px",iconColor418:void 0,iconColor404:void 0,iconColor403:void 0,iconColor500:void 0};function Tx(e){const{textColor2:o,textColor1:t,errorColor:r,successColor:n,infoColor:i,warningColor:a,lineHeight:l,fontWeightStrong:s}=e;return Object.assign(Object.assign({},Px),{lineHeight:l,titleFontWeight:s,titleTextColor:t,textColor:o,iconColorError:r,iconColorSuccess:n,iconColorInfo:i,iconColorWarning:a})}const $x={name:"Result",common:A,self:Tx},Ix={railHeight:"4px",railWidthVertical:"4px",handleSize:"18px",dotHeight:"8px",dotWidth:"8px",dotBorderRadius:"4px"},Hx={name:"Slider",common:A,self(e){const o="0 2px 8px 0 rgba(0, 0, 0, 0.12)",{railColor:t,modalColor:r,primaryColorSuppl:n,popoverColor:i,textColor2:a,cardColor:l,borderRadius:s,fontSize:c,opacityDisabled:d}=e;return Object.assign(Object.assign({},Ix),{fontSize:c,markFontSize:c,railColor:t,railColorHover:t,fillColor:n,fillColorHover:n,opacityDisabled:d,handleColor:"#FFF",dotColor:l,dotColorModal:r,dotColorPopover:i,handleBoxShadow:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowHover:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowActive:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowFocus:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",indicatorColor:i,indicatorBoxShadow:o,indicatorTextColor:a,indicatorBorderRadius:s,dotBorder:`2px solid ${t}`,dotBorderActive:`2px solid ${n}`,dotBoxShadow:""})}};function Fx(e){const{opacityDisabled:o,heightTiny:t,heightSmall:r,heightMedium:n,heightLarge:i,heightHuge:a,primaryColor:l,fontSize:s}=e;return{fontSize:s,textColor:l,sizeTiny:t,sizeSmall:r,sizeMedium:n,sizeLarge:i,sizeHuge:a,color:l,opacitySpinning:o}}const Ax={name:"Spin",common:A,self:Fx};function Mx(e){const{textColor2:o,textColor3:t,fontSize:r,fontWeight:n}=e;return{labelFontSize:r,labelFontWeight:n,valueFontWeight:n,valueFontSize:"24px",labelTextColor:t,valuePrefixTextColor:o,valueSuffixTextColor:o,valueTextColor:o}}const Dx={name:"Statistic",common:A,self:Mx},_x={stepHeaderFontSizeSmall:"14px",stepHeaderFontSizeMedium:"16px",indicatorIndexFontSizeSmall:"14px",indicatorIndexFontSizeMedium:"16px",indicatorSizeSmall:"22px",indicatorSizeMedium:"28px",indicatorIconSizeSmall:"14px",indicatorIconSizeMedium:"18px"};function Ex(e){const{fontWeightStrong:o,baseColor:t,textColorDisabled:r,primaryColor:n,errorColor:i,textColor1:a,textColor2:l}=e;return Object.assign(Object.assign({},_x),{stepHeaderFontWeight:o,indicatorTextColorProcess:t,indicatorTextColorWait:r,indicatorTextColorFinish:n,indicatorTextColorError:i,indicatorBorderColorProcess:n,indicatorBorderColorWait:r,indicatorBorderColorFinish:n,indicatorBorderColorError:i,indicatorColorProcess:n,indicatorColorWait:"#0000",indicatorColorFinish:"#0000",indicatorColorError:"#0000",splitorColorProcess:r,splitorColorWait:r,splitorColorFinish:n,splitorColorError:r,headerTextColorProcess:a,headerTextColorWait:r,headerTextColorFinish:r,headerTextColorError:i,descriptionTextColorProcess:l,descriptionTextColorWait:r,descriptionTextColorFinish:r,descriptionTextColorError:i})}const Rx={name:"Steps",common:A,self:Ex},Lx={buttonHeightSmall:"14px",buttonHeightMedium:"18px",buttonHeightLarge:"22px",buttonWidthSmall:"14px",buttonWidthMedium:"18px",buttonWidthLarge:"22px",buttonWidthPressedSmall:"20px",buttonWidthPressedMedium:"24px",buttonWidthPressedLarge:"28px",railHeightSmall:"18px",railHeightMedium:"22px",railHeightLarge:"26px",railWidthSmall:"32px",railWidthMedium:"40px",railWidthLarge:"48px"},kx={name:"Switch",common:A,self(e){const{primaryColorSuppl:o,opacityDisabled:t,borderRadius:r,primaryColor:n,textColor2:i,baseColor:a}=e;return Object.assign(Object.assign({},Lx),{iconColor:a,textColor:i,loadingColor:o,opacityDisabled:t,railColor:"rgba(255, 255, 255, .20)",railColorActive:o,buttonBoxShadow:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",buttonColor:"#FFF",railBorderRadiusSmall:r,railBorderRadiusMedium:r,railBorderRadiusLarge:r,buttonBorderRadiusSmall:r,buttonBorderRadiusMedium:r,buttonBorderRadiusLarge:r,boxShadowFocus:`0 0 8px 0 ${_(n,{alpha:.3})}`})}},zx={thPaddingSmall:"6px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"6px",tdPaddingMedium:"12px",tdPaddingLarge:"12px"};function Ox(e){const{dividerColor:o,cardColor:t,modalColor:r,popoverColor:n,tableHeaderColor:i,tableColorStriped:a,textColor1:l,textColor2:s,borderRadius:c,fontWeightStrong:d,lineHeight:u,fontSizeSmall:p,fontSizeMedium:g,fontSizeLarge:h}=e;return Object.assign(Object.assign({},zx),{fontSizeSmall:p,fontSizeMedium:g,fontSizeLarge:h,lineHeight:u,borderRadius:c,borderColor:B(t,o),borderColorModal:B(r,o),borderColorPopover:B(n,o),tdColor:t,tdColorModal:r,tdColorPopover:n,tdColorStriped:B(t,a),tdColorStripedModal:B(r,a),tdColorStripedPopover:B(n,a),thColor:B(t,i),thColorModal:B(r,i),thColorPopover:B(n,i),thTextColor:l,tdTextColor:s,thFontWeight:d})}const Bx={name:"Table",common:A,self:Ox},Wx={tabFontSizeSmall:"14px",tabFontSizeMedium:"14px",tabFontSizeLarge:"16px",tabGapSmallLine:"36px",tabGapMediumLine:"36px",tabGapLargeLine:"36px",tabGapSmallLineVertical:"8px",tabGapMediumLineVertical:"8px",tabGapLargeLineVertical:"8px",tabPaddingSmallLine:"6px 0",tabPaddingMediumLine:"10px 0",tabPaddingLargeLine:"14px 0",tabPaddingVerticalSmallLine:"6px 12px",tabPaddingVerticalMediumLine:"8px 16px",tabPaddingVerticalLargeLine:"10px 20px",tabGapSmallBar:"36px",tabGapMediumBar:"36px",tabGapLargeBar:"36px",tabGapSmallBarVertical:"8px",tabGapMediumBarVertical:"8px",tabGapLargeBarVertical:"8px",tabPaddingSmallBar:"4px 0",tabPaddingMediumBar:"6px 0",tabPaddingLargeBar:"10px 0",tabPaddingVerticalSmallBar:"6px 12px",tabPaddingVerticalMediumBar:"8px 16px",tabPaddingVerticalLargeBar:"10px 20px",tabGapSmallCard:"4px",tabGapMediumCard:"4px",tabGapLargeCard:"4px",tabGapSmallCardVertical:"4px",tabGapMediumCardVertical:"4px",tabGapLargeCardVertical:"4px",tabPaddingSmallCard:"8px 16px",tabPaddingMediumCard:"10px 20px",tabPaddingLargeCard:"12px 24px",tabPaddingSmallSegment:"4px 0",tabPaddingMediumSegment:"6px 0",tabPaddingLargeSegment:"8px 0",tabPaddingVerticalLargeSegment:"0 8px",tabPaddingVerticalSmallCard:"8px 12px",tabPaddingVerticalMediumCard:"10px 16px",tabPaddingVerticalLargeCard:"12px 20px",tabPaddingVerticalSmallSegment:"0 4px",tabPaddingVerticalMediumSegment:"0 6px",tabGapSmallSegment:"0",tabGapMediumSegment:"0",tabGapLargeSegment:"0",tabGapSmallSegmentVertical:"0",tabGapMediumSegmentVertical:"0",tabGapLargeSegmentVertical:"0",panePaddingSmall:"8px 0 0 0",panePaddingMedium:"12px 0 0 0",panePaddingLarge:"16px 0 0 0",closeSize:"18px",closeIconSize:"14px"};function Kc(e){const{textColor2:o,primaryColor:t,textColorDisabled:r,closeIconColor:n,closeIconColorHover:i,closeIconColorPressed:a,closeColorHover:l,closeColorPressed:s,tabColor:c,baseColor:d,dividerColor:u,fontWeight:p,textColor1:g,borderRadius:h,fontSize:b,fontWeightStrong:y}=e;return Object.assign(Object.assign({},Wx),{colorSegment:c,tabFontSizeCard:b,tabTextColorLine:g,tabTextColorActiveLine:t,tabTextColorHoverLine:t,tabTextColorDisabledLine:r,tabTextColorSegment:g,tabTextColorActiveSegment:o,tabTextColorHoverSegment:o,tabTextColorDisabledSegment:r,tabTextColorBar:g,tabTextColorActiveBar:t,tabTextColorHoverBar:t,tabTextColorDisabledBar:r,tabTextColorCard:g,tabTextColorHoverCard:g,tabTextColorActiveCard:t,tabTextColorDisabledCard:r,barColor:t,closeIconColor:n,closeIconColorHover:i,closeIconColorPressed:a,closeColorHover:l,closeColorPressed:s,closeBorderRadius:h,tabColor:c,tabColorSegment:d,tabBorderColor:u,tabFontWeightActive:p,tabFontWeight:p,tabBorderRadius:h,paneTextColor:o,fontWeightStrong:y})}const gy={common:ge,self:Kc},jx={name:"Tabs",common:A,self(e){const o=Kc(e),{inputColor:t}=e;return o.colorSegment=t,o.tabColorSegment=t,o}};function Yc(e){const{textColor1:o,textColor2:t,fontWeightStrong:r,fontSize:n}=e;return{fontSize:n,titleTextColor:o,textColor:t,titleFontWeight:r}}const by={common:ge,self:Yc},Nx={name:"Thing",common:A,self:Yc},Vx={titleMarginMedium:"0 0 6px 0",titleMarginLarge:"-2px 0 6px 0",titleFontSizeMedium:"14px",titleFontSizeLarge:"16px",iconSizeMedium:"14px",iconSizeLarge:"14px"},Ux={name:"Timeline",common:A,self(e){const{textColor3:o,infoColorSuppl:t,errorColorSuppl:r,successColorSuppl:n,warningColorSuppl:i,textColor1:a,textColor2:l,railColor:s,fontWeightStrong:c,fontSize:d}=e;return Object.assign(Object.assign({},Vx),{contentFontSize:d,titleFontWeight:c,circleBorder:`2px solid ${o}`,circleBorderInfo:`2px solid ${t}`,circleBorderError:`2px solid ${r}`,circleBorderSuccess:`2px solid ${n}`,circleBorderWarning:`2px solid ${i}`,iconColor:o,iconColorInfo:t,iconColorError:r,iconColorSuccess:n,iconColorWarning:i,titleTextColor:a,contentTextColor:l,metaTextColor:o,lineColor:s})}},Gx={extraFontSizeSmall:"12px",extraFontSizeMedium:"12px",extraFontSizeLarge:"14px",titleFontSizeSmall:"14px",titleFontSizeMedium:"16px",titleFontSizeLarge:"16px",closeSize:"20px",closeIconSize:"16px",headerHeightSmall:"44px",headerHeightMedium:"44px",headerHeightLarge:"50px"},qx={name:"Transfer",common:A,peers:{Checkbox:Ht,Scrollbar:We,Input:eo,Empty:at,Button:je},self(e){const{fontWeight:o,fontSizeLarge:t,fontSizeMedium:r,fontSizeSmall:n,heightLarge:i,heightMedium:a,borderRadius:l,inputColor:s,tableHeaderColor:c,textColor1:d,textColorDisabled:u,textColor2:p,textColor3:g,hoverColor:h,closeColorHover:b,closeColorPressed:y,closeIconColor:C,closeIconColorHover:I,closeIconColorPressed:E,dividerColor:v}=e;return Object.assign(Object.assign({},Gx),{itemHeightSmall:a,itemHeightMedium:a,itemHeightLarge:i,fontSizeSmall:n,fontSizeMedium:r,fontSizeLarge:t,borderRadius:l,dividerColor:v,borderColor:"#0000",listColor:s,headerColor:c,titleTextColor:d,titleTextColorDisabled:u,extraTextColor:g,extraTextColorDisabled:u,itemTextColor:p,itemTextColorDisabled:u,itemColorPending:h,titleFontWeight:o,closeColorHover:b,closeColorPressed:y,closeIconColor:C,closeIconColorHover:I,closeIconColorPressed:E})}};function Kx(e){const{borderRadiusSmall:o,dividerColor:t,hoverColor:r,pressedColor:n,primaryColor:i,textColor3:a,textColor2:l,textColorDisabled:s,fontSize:c}=e;return{fontSize:c,lineHeight:"1.5",nodeHeight:"30px",nodeWrapperPadding:"3px 0",nodeBorderRadius:o,nodeColorHover:r,nodeColorPressed:n,nodeColorActive:_(i,{alpha:.1}),arrowColor:a,nodeTextColor:l,nodeTextColorDisabled:s,loadingColor:i,dropMarkColor:i,lineColor:t}}const Jc={name:"Tree",common:A,peers:{Checkbox:Ht,Scrollbar:We,Empty:at},self(e){const{primaryColor:o}=e,t=Kx(e);return t.nodeColorActive=_(o,{alpha:.15}),t}},Yx={name:"TreeSelect",common:A,peers:{Tree:Jc,Empty:at,InternalSelection:Di}},Jx={headerFontSize1:"30px",headerFontSize2:"22px",headerFontSize3:"18px",headerFontSize4:"16px",headerFontSize5:"16px",headerFontSize6:"16px",headerMargin1:"28px 0 20px 0",headerMargin2:"28px 0 20px 0",headerMargin3:"28px 0 20px 0",headerMargin4:"28px 0 18px 0",headerMargin5:"28px 0 18px 0",headerMargin6:"28px 0 18px 0",headerPrefixWidth1:"16px",headerPrefixWidth2:"16px",headerPrefixWidth3:"12px",headerPrefixWidth4:"12px",headerPrefixWidth5:"12px",headerPrefixWidth6:"12px",headerBarWidth1:"4px",headerBarWidth2:"4px",headerBarWidth3:"3px",headerBarWidth4:"3px",headerBarWidth5:"3px",headerBarWidth6:"3px",pMargin:"16px 0 16px 0",liMargin:".25em 0 0 0",olPadding:"0 0 0 2em",ulPadding:"0 0 0 2em"};function Zx(e){const{primaryColor:o,textColor2:t,borderColor:r,lineHeight:n,fontSize:i,borderRadiusSmall:a,dividerColor:l,fontWeightStrong:s,textColor1:c,textColor3:d,infoColor:u,warningColor:p,errorColor:g,successColor:h,codeColor:b}=e;return Object.assign(Object.assign({},Jx),{aTextColor:o,blockquoteTextColor:t,blockquotePrefixColor:r,blockquoteLineHeight:n,blockquoteFontSize:i,codeBorderRadius:a,liTextColor:t,liLineHeight:n,liFontSize:i,hrColor:l,headerFontWeight:s,headerTextColor:c,pTextColor:t,pTextColor1Depth:c,pTextColor2Depth:t,pTextColor3Depth:d,pLineHeight:n,pFontSize:i,headerBarColor:o,headerBarColorPrimary:o,headerBarColorInfo:u,headerBarColorError:g,headerBarColorWarning:p,headerBarColorSuccess:h,textColor:t,textColor1Depth:c,textColor2Depth:t,textColor3Depth:d,textColorPrimary:o,textColorInfo:u,textColorSuccess:h,textColorWarning:p,textColorError:g,codeTextColor:t,codeColor:b,codeBorder:"1px solid #0000"})}const Qx={name:"Typography",common:A,self:Zx};function Xx(e){const{iconColor:o,primaryColor:t,errorColor:r,textColor2:n,successColor:i,opacityDisabled:a,actionColor:l,borderColor:s,hoverColor:c,lineHeight:d,borderRadius:u,fontSize:p}=e;return{fontSize:p,lineHeight:d,borderRadius:u,draggerColor:l,draggerBorder:`1px dashed ${s}`,draggerBorderHover:`1px dashed ${t}`,itemColorHover:c,itemColorHoverError:_(r,{alpha:.06}),itemTextColor:n,itemTextColorError:r,itemTextColorSuccess:i,itemIconColor:o,itemDisabledOpacity:a,itemBorderImageCardError:`1px solid ${r}`,itemBorderImageCard:`1px solid ${s}`}}const ev={name:"Upload",common:A,peers:{Button:je,Progress:qc},self(e){const{errorColor:o}=e,t=Xx(e);return t.itemColorHoverError=_(o,{alpha:.09}),t}},ov={name:"Watermark",common:A,self(e){const{fontFamily:o}=e;return{fontFamily:o}}},tv={name:"FloatButton",common:A,self(e){const{popoverColor:o,textColor2:t,buttonColor2Hover:r,buttonColor2Pressed:n,primaryColor:i,primaryColorHover:a,primaryColorPressed:l,baseColor:s,borderRadius:c}=e;return{color:o,textColor:t,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)",boxShadowHover:"0 2px 12px 0px rgba(0, 0, 0, .18)",boxShadowPressed:"0 2px 12px 0px rgba(0, 0, 0, .18)",colorHover:r,colorPressed:n,colorPrimary:i,colorPrimaryHover:a,colorPrimaryPressed:l,textColorPrimary:s,borderRadiusSquare:c}}};function rv(e){const{primaryColor:o,baseColor:t}=e;return{color:o,iconColor:t}}const nv={name:"IconWrapper",common:A,self:rv},iv={name:"Image",common:A,peers:{Tooltip:fn},self:e=>{const{textColor2:o}=e;return{toolbarIconColor:o,toolbarColor:"rgba(0, 0, 0, .35)",toolbarBoxShadow:"none",toolbarBorderRadius:"24px"}}},av={extraFontSize:"12px",width:"440px"},lv={name:"Transfer",common:A,peers:{Checkbox:Ht,Scrollbar:We,Input:eo,Empty:at,Button:je},self(e){const{iconColorDisabled:o,iconColor:t,fontWeight:r,fontSizeLarge:n,fontSizeMedium:i,fontSizeSmall:a,heightLarge:l,heightMedium:s,heightSmall:c,borderRadius:d,inputColor:u,tableHeaderColor:p,textColor1:g,textColorDisabled:h,textColor2:b,hoverColor:y}=e;return Object.assign(Object.assign({},av),{itemHeightSmall:c,itemHeightMedium:s,itemHeightLarge:l,fontSizeSmall:a,fontSizeMedium:i,fontSizeLarge:n,borderRadius:d,borderColor:"#0000",listColor:u,headerColor:p,titleTextColor:g,titleTextColorDisabled:h,extraTextColor:b,filterDividerColor:"#0000",itemTextColor:b,itemTextColorDisabled:h,itemColorPending:y,titleFontWeight:r,iconColor:t,iconColorDisabled:o})}};function sv(){return{}}const cv={name:"Marquee",common:A,self:sv},dv={name:"QrCode",common:A,self:e=>({borderRadius:e.borderRadius})},uv={name:"Skeleton",common:A,self(e){const{heightSmall:o,heightMedium:t,heightLarge:r,borderRadius:n}=e;return{color:"rgba(255, 255, 255, 0.12)",colorEnd:"rgba(255, 255, 255, 0.18)",borderRadius:n,heightSmall:o,heightMedium:t,heightLarge:r}}},fv={name:"Split",common:A},pv=()=>({}),hv={name:"Equation",common:A,self:pv},mv={name:"FloatButtonGroup",common:A,self(e){const{popoverColor:o,dividerColor:t,borderRadius:r}=e;return{color:o,buttonBorderColor:t,borderRadiusSquare:r,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)"}}},Cy={name:"dark",common:A,Alert:C0,Anchor:P0,AutoComplete:F0,Avatar:Cc,AvatarGroup:D0,BackTop:E0,Badge:R0,Breadcrumb:z0,Button:je,ButtonGroup:nx,Calendar:G0,Card:yc,Carousel:Y0,Cascader:X0,Checkbox:Ht,Code:wc,Collapse:oC,CollapseTransition:rC,ColorPicker:iC,DataTable:vC,DatePicker:TC,Descriptions:HC,Dialog:Oc,Divider:KC,Drawer:JC,Dropdown:Ei,DynamicInput:QC,DynamicTags:ex,Element:ox,Empty:at,Ellipsis:Mc,Equation:hv,Flex:rx,Form:ax,GradientText:lx,Icon:yC,IconWrapper:nv,Image:iv,Input:eo,InputNumber:sx,LegacyTransfer:lv,Layout:cx,List:ux,LoadingBar:_C,Log:fx,Menu:gx,Mention:px,Message:kC,Modal:DC,Notification:GC,PageHeader:xx,Pagination:Hc,Popconfirm:yx,Popover:lt,Popselect:Pc,Progress:qc,QrCode:dv,Radio:_c,Rate:wx,Result:$x,Row:dx,Scrollbar:We,Select:$c,Skeleton:uv,Slider:Hx,Space:Nc,Spin:Ax,Statistic:Dx,Steps:Rx,Switch:kx,Table:Bx,Tabs:jx,Tag:mc,Thing:Nx,TimePicker:kc,Timeline:Ux,Tooltip:fn,Transfer:qx,Tree:Jc,TreeSelect:Yx,Typography:Qx,Upload:ev,Watermark:ov,Split:fv,FloatButton:tv,FloatButtonGroup:mv,Marquee:cv};function Ko(e,o){return typeof document>"u"?o:getComputedStyle(document.documentElement).getPropertyValue(e).trim()||o}function xy(){const e=Ko("--bg","#0b1020"),o=Ko("--fg","#e2e8f0"),t=Ko("--fg-dim","#94a3b8"),r=Ko("--panel","#0f172a"),n=Ko("--border","#1e293b"),i=Ko("--accent","#60a5fa"),a=Ko("--bad","#f87171");return{common:{bodyColor:e,textColorBase:o,textColor1:o,textColor2:o,textColor3:t,primaryColor:i,primaryColorHover:i,primaryColorPressed:i,borderColor:n,cardColor:r,errorColor:a}}}const gv="modulepreload",bv=function(e){return"/"+e},qa={},Cv=function(o,t,r){let n=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));n=Promise.allSettled(t.map(s=>{if(s=bv(s),s in qa)return;qa[s]=!0;const c=s.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${d}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":gv,c||(u.as="script"),u.crossOrigin="",u.href=s,l&&u.setAttribute("nonce",l),document.head.appendChild(u),c)return new Promise((p,g)=>{u.addEventListener("load",p),u.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${s}`)))})}))}function i(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return n.then(a=>{for(const l of a||[])l.status==="rejected"&&i(l.reason);return o().catch(i)})},xv={common:{appName:"AT Term",cancel:"Cancel",confirm:"Confirm",copy:"Copy",create:"Create",created:"created",delete:"Delete",english:"English",language:"Language",loading:"Loading...",no:"no",optional:"optional",revoke:"Revoke",save:"Save",send:"send",simplifiedChinese:"Simplified Chinese",system:"System",unknown:"unknown",version:"Version",versionLabel:"version {version}",yes:"yes"},topbar:{admin:"Admin",home:"Home",main:"Sessions",primaryNav:"Primary",settings:"Settings",signOut:"Sign out"},auth:{alreadyHaveAccount:"Already have an account?",createAccount:"Create account",email:"Email",emailPlaceholder:"you@example.com",setup:{title:"First-run setup",hint:"No admin yet. Create the first admin account — use the email you set in ATTERM_BOOTSTRAP_ADMIN_EMAIL.",emailPlaceholder:"your ATTERM_BOOTSTRAP_ADMIN_EMAIL",confirmPassword:"Confirm password",createAdmin:"Create admin",passwordMismatch:"The two passwords do not match.",notAdmin:"Account created, but it is not an admin — make sure the email matches ATTERM_BOOTSTRAP_ADMIN_EMAIL.",failed:"Setup failed. Please try again."},errors:{emailTaken:"An account with that email already exists.",invalidCredentials:"Invalid email or password.",invalidEmail:"Please enter a valid email.",invalidRequest:"Please check your input.",inviteInvalid:"Invite code is invalid or already used.",passwordWeak:"Password must be at least 12 characters.",rateLimited:"Too many attempts. Please wait a few minutes.",rateLimitedShort:"Too many attempts. Please wait.",signInFailed:"Sign-in failed. Please try again.",signUpFailed:"Sign-up failed. Check your invite code and try again."},haveInviteCode:"Have an invite code?",inviteCode:"Invite code",password:"Password",signIn:"Sign in",signUp:"Sign up",signUpHere:"Sign up here"},setup:{allowInsecure:"Allow insecure HTTP/WS (non-loopback)",connect:"Connect",connectToRelay:"Connect to relay",disconnect:"Disconnect",errors:{cannotReachRelay:"Cannot reach relay: {message}",invalidRelayUrl:"invalid or malformed relay URL",originRejected:"Relay rejected the origin. Make sure the relay was started with ATTERM_ORIGINS containing capacitor://localhost.",relayHttp:"Relay returned HTTP {status}.",relayHttpCheckUrl:"Relay returned HTTP {status}. Check the URL and try again.",relayUrlMustBeHttp:"relay URL must start with http:// or https://",relayUrlNoPath:"relay URL must not contain a path, query, or fragment",relayUrlRequired:"relay URL is required",tokenInvalid:"API token is invalid. Generate a new one from Settings -> API Tokens on the relay web UI.",tokenInvalidSettings:"API token is invalid. Generate a new one from the relay web UI under Settings -> API Tokens.",tokenRequired:"API token is required",useInsecureForHttp:'enable "Allow insecure HTTP/WS" to use http:// with a non-loopback host'},reasonTokenInvalid:"Your API token is no longer valid. Please paste a fresh token to sign in again.",title:"Set up relay",relayUrl:"Relay URL",relayUrlPlaceholder:"https://relay.example.com",token:"API token",tokenPlaceholder:"atk_...",saved:"Saved."},main:{activeSessions:"active sessions",back:"back",backToSessions:"Back to sessions",empty:"No live sessions. Start one from the desktop app or",errors:{loadSessions:"Failed to load sessions."},install:{dismiss:"Dismiss install hint",text:"on iPhone, open this site with HTTPS, then tap Share -> Add to Home Screen.",title:"install AT Term"},reconnect:"Reconnect",refresh:"refresh",sessionCount:"{count} sessions",sessionCountOne:"{count} session",title:"Remote sessions",unknownCommand:"(unknown)",unknownHost:"unknown host",unlock:{action:"Sign in again",text:"This browser is signed in, but the in-memory encryption key is locked. Sign in again to decrypt session names, commands, and paths.",title:"Unlock encrypted session details"},viewOnlyNotice:"This session is view-only from this device. You can inspect output, but input is disabled.",taskTypes:{ai:"AI",test:"Test",build:"Build",deploy:"Deploy"}},terminal:{cannotReachRelay:"Cannot reach relay.",connecting:"Connecting...",disconnected:"Disconnected",ended:"session ended (exit {code})",loadingHistory:"loading history... {percent}%",paste:"Paste",pickImage:"pick image",pickFile:"pick file",remoteControl:"remote has taken control",statuses:{attached:"attached",connecting:"connecting",ended:"ended",lost:"lost",reconnecting:"reconnecting"},shortcuts:"terminal shortcuts",takeControl:"Take control",tapToChangeConfig:"Tap to change configuration.",templatePreviewTitle:"Send preview",templatePreviewSend:"Send"},sessions:{attach:"Attach",created:"Created",host:"Host"},settings:{changePassword:{current:"Current password",currentWrong:"Current password is incorrect.",failed:"Password change failed. Please try again.",invalidRequest:"Please check your input.",new:"New password (min 12 characters)",passwordWeak:"New password must be at least 12 characters.",update:"Update password"},danger:{confirmDelete:"Permanently delete this account? This cannot be undone.",currentPassword:"Current password",deleteAccount:"Delete my account",description:'Permanently delete this account. This cannot be undone. Web sessions and account data are removed. Invitations you have consumed stay (their "consumed by" field is cleared).',emailMismatch:"Email doesn't match - type your exact email.",failed:"Delete failed. Please try again.",invalidRequest:"Please check your input.",lastAdmin:"You're the last admin - promote another user first.",passwordIncorrect:"Password is incorrect.",typeEmail:"Confirm by typing your full email"},language:"Language",languageHint:"Choose the language used by this browser.",notifications:"Notifications",notificationsTab:{browserPermission:"Browser permission",disabled:"Notifications disabled.",disableFailed:"Failed to disable: {message}",disableNotifications:"Disable notifications",enableNotifications:"Enable notifications",enabled:"Notifications enabled.",errors:{denied:"Permission denied. Allow notifications in your browser settings and retry.",disabled:"Web push is disabled on this relay.",keyFailed:"Could not fetch the VAPID key from the relay.",subscribeFailed:"Browser refused to create a subscription.",subscribeRejected:"Relay refused the subscription.",fallback:"Failed to enable."},sendTest:"Send test notification",permissions:{default:"Ask",granted:"Allowed",denied:"Denied"},status:"Browser permission: {permission} - Subscribed: {subscribed}",subscribed:"Subscribed",testFailed:"Test notification failed.",testFailedWithCode:"Test notification failed ({code}).",testSent:"Test notification sent to {count} subscription(s).",unsupported:"This browser does not support service workers; push notifications are unavailable."},relay:"Relay",sessionsTab:{currentDevice:"this device",empty:"No active sessions.",hint:"Each row is a browser or PWA where this account is signed in.",ipUnknown:"ip unknown",loadFailed:"Failed to load sessions.",revokeConfirm:"Revoke this device? You'll need to sign in again on it.",revokeFailed:"Revoke failed.",signedIn:"signed in",signOutOthers:"Sign out everywhere except this device",signOutOthersConfirm:"Sign out every other device? They'll all need to sign in again.",signOutOthersFailed:"Sign-out-others failed.",signOutOthersSuccess:"Signed out {count} other device(s).",unknownDevice:"Unknown device"},tabs:{changePassword:"Change Password",danger:"Danger zone",notifications:"Notifications",relay:"Relay",sessions:"Signed-in devices"},title:"Settings"},admin:{actions:"Actions",config:{effective:"effective: {value}",effectiveDisabled:"effective: disabled",hint:'0 means "use the built-in default"; negative disables the limit entirely. Changes apply immediately and persist to the admin config file.',loadFailed:"Failed to load config.",maxConnections:"Max WS connections (per IP+token)",rateLimit:"Rate limit (requests/min per IP+token)",saveFailed:"Save failed.",runtimeLimits:"Runtime limits",debug:"Verbose logging",debugHint:"Logs relay frames. Applies immediately, no restart.",debugPayload:"Log payload bytes",debugPayloadWarn:"Logs terminal input/output — sensitive. Use only while debugging."},configTab:"Config",feishuTab:"Feishu",feishuConfig:{title:"Feishu integration",description:"Enable the Feishu bot bridge for this relay. The encrypt key protects Feishu app credentials stored on the server.",enabled:"Enable Feishu",encryptKey:"Encrypt key",generate:"Generate",keyGenerated:"Key generated — save to apply.",keyEmptyPlaceholder:"Paste or generate a 32-byte base64 key",keyKeepPlaceholder:"Key set (…{last4}). Leave blank to keep it.",keyCopyOnce:"Copy this key somewhere safe — it is shown only once and never again.",forceRotate:"Replace the existing key (existing Feishu bindings will stop working)",baseUrl:"Base URL",statusRunning:"Running",statusStopped:"Stopped",rotateConflict:'That changes the existing key. Enable "replace" to rotate it (existing bindings will break).',loadFailed:"Failed to load Feishu config.",saveFailed:"Save failed."},created:"Created",disabled:"disabled {when}",email:"Email",errors:{actionFailed:"Action failed.",cannotDemoteSelf:"You can't demote yourself.",lastAdmin:"Can't demote the last admin - promote another user first."},id:"ID",invitationsTab:{consumed:"Consumed",count:"Count",createFailed:"Create failed: {code}",copyNow:"Copy this invitation now{note} - it will not be shown again.",empty:"No invitations yet.",expires:"Expires",loadFailed:"Failed to load invitations.",note:"Note",prefix:"Prefix",unused:"unused"},loadUsersFailed:"Failed to load users.",promote:"Promote",promoteConfirm:"Promote this user to admin?",resetPassword:"Reset password",resetPasswordConfirm:"Reset password? A new temporary password is shown once.",secretCopyOnce:"{label} - copy it now, only shown once.",status:"Status",temporaryPasswordFor:"Temporary password for {email}",title:"Admin",userStatus:{active:"active",admin:"admin"},users:"Users",invitations:"Invitations",demote:"Demote",demoteConfirm:"Demote this admin?",disable:"Disable",disableConfirm:"Disable this user? They are signed out and cannot log in."},test:{interpolation:"{count} sessions"},connHealth:{pillLabelConnecting:"connecting…",pillLabelReconnecting:"reconnecting…",pillLabelOff:"off",drawerTitle:"Connection health",drawerRttNow:"RTT (now)",drawerRttP50P95:"p50 / p95 (5 min)",drawerBytesIn:"↓ in",drawerBytesOut:"↑ out",drawerState:"State",drawerReconnectsLastHour:"Reconnects (1 h)",drawerReconnectsTime:"time",drawerReconnectsReason:"reason",drawerReconnectsDowntime:"downtime",drawerSeqGaps:"Seq gaps observed:"}},vv={common:{appName:"AT Term",cancel:"取消",confirm:"确认",copy:"复制",create:"创建",created:"创建于",delete:"删除",english:"英语",language:"语言",loading:"正在加载...",no:"否",optional:"可选",revoke:"撤销",save:"保存",send:"发送",simplifiedChinese:"简体中文",system:"跟随系统",unknown:"未知",version:"版本",versionLabel:"版本 {version}",yes:"是"},topbar:{admin:"管理",home:"首页",main:"会话",primaryNav:"主导航",settings:"设置",signOut:"退出登录"},auth:{alreadyHaveAccount:"已有账号?",createAccount:"创建账号",email:"邮箱",emailPlaceholder:"you@example.com",setup:{title:"首次安装",hint:"还没有管理员。创建第一个管理员账号——请填写你在 ATTERM_BOOTSTRAP_ADMIN_EMAIL 配置的邮箱。",emailPlaceholder:"你配置的 ATTERM_BOOTSTRAP_ADMIN_EMAIL",confirmPassword:"确认密码",createAdmin:"创建管理员",passwordMismatch:"两次输入的密码不一致。",notAdmin:"账号已创建,但不是管理员——请确认邮箱与 ATTERM_BOOTSTRAP_ADMIN_EMAIL 一致。",failed:"初始化失败,请重试。"},errors:{emailTaken:"该邮箱已注册。",invalidCredentials:"邮箱或密码不正确。",invalidEmail:"请输入有效邮箱。",invalidRequest:"请检查输入。",inviteInvalid:"邀请码无效或已被使用。",passwordWeak:"密码至少需要 12 个字符。",rateLimited:"尝试次数过多,请等待几分钟。",rateLimitedShort:"尝试次数过多,请稍后再试。",signInFailed:"登录失败,请重试。",signUpFailed:"注册失败,请检查邀请码后重试。"},haveInviteCode:"有邀请码?",inviteCode:"邀请码",password:"密码",signIn:"登录",signUp:"注册",signUpHere:"在这里注册"},setup:{allowInsecure:"允许不安全的 HTTP/WS(非 loopback)",connect:"连接",connectToRelay:"连接到 relay",disconnect:"断开连接",errors:{cannotReachRelay:"无法连接 relay:{message}",invalidRelayUrl:"relay 地址无效或格式错误",originRejected:"relay 拒绝了该 Origin。请确认启动 relay 时 ATTERM_ORIGINS 包含 capacitor://localhost。",relayHttp:"relay 返回 HTTP {status}。",relayHttpCheckUrl:"relay 返回 HTTP {status}。请检查地址后重试。",relayUrlMustBeHttp:"relay 地址必须以 http:// 或 https:// 开头",relayUrlNoPath:"relay 地址不能包含 path、query 或 fragment",relayUrlRequired:"relay 地址必填",tokenInvalid:"API token 无效。请在 relay Web UI 的设置 -> API Tokens 中生成新 token。",tokenInvalidSettings:"API token 无效。请在 relay Web UI 的设置 -> API Tokens 中生成新 token。",tokenRequired:"API token 必填",useInsecureForHttp:"如需对非 loopback 主机使用 http://,请启用“允许不安全的 HTTP/WS”"},reasonTokenInvalid:"你的 API token 已失效。请粘贴新的 token 重新登录。",title:"设置 relay",relayUrl:"Relay 地址",relayUrlPlaceholder:"https://relay.example.com",token:"API token",tokenPlaceholder:"atk_...",saved:"已保存。"},main:{activeSessions:"活动会话",back:"返回",backToSessions:"返回会话列表",empty:"没有在线会话。请从桌面 app 或",errors:{loadSessions:"加载会话失败。"},install:{dismiss:"关闭安装提示",text:"在 iPhone 上,用 HTTPS 打开本站,然后点分享 -> 添加到主屏幕。",title:"安装 AT Term"},reconnect:"重新连接",refresh:"刷新",sessionCount:"{count} 个会话",sessionCountOne:"{count} 个会话",title:"远程会话",unknownCommand:"(未知)",unknownHost:"未知主机",unlock:{action:"重新登录",text:"此浏览器仍处于登录状态,但内存中的加密密钥已锁定。重新登录后才能解密会话名称、命令和路径。",title:"解锁加密会话信息"},viewOnlyNotice:"此设备只能查看该会话。你可以查看输出,但不能输入。",taskTypes:{ai:"AI",test:"测试",build:"构建",deploy:"部署"}},terminal:{cannotReachRelay:"无法连接 relay。",connecting:"正在连接...",disconnected:"连接已断开",ended:"会话已结束(退出码 {code})",loadingHistory:"正在加载历史... {percent}%",paste:"粘贴",pickImage:"选择图片",pickFile:"选择文件",remoteControl:"远端已接管控制",statuses:{attached:"已连接",connecting:"正在连接",ended:"已结束",lost:"连接丢失",reconnecting:"正在重连"},shortcuts:"终端快捷键",takeControl:"接管控制",tapToChangeConfig:"点击修改配置。",templatePreviewTitle:"发送预览",templatePreviewSend:"发送"},sessions:{attach:"接管",created:"创建时间",host:"主机"},settings:{changePassword:{current:"当前密码",currentWrong:"当前密码不正确。",failed:"修改密码失败,请重试。",invalidRequest:"请检查输入。",new:"新密码(至少 12 个字符)",passwordWeak:"新密码至少需要 12 个字符。",update:"更新密码"},danger:{confirmDelete:"永久删除此账号?此操作无法撤销。",currentPassword:"当前密码",deleteAccount:"删除我的账号",description:"永久删除此账号。此操作无法撤销。Web 会话和账号数据都会被删除。已使用的邀请码会保留(其”使用者”字段会被清空)。",emailMismatch:"邮箱不匹配,请输入完整且准确的邮箱。",failed:"删除失败,请重试。",invalidRequest:"请检查输入。",lastAdmin:"你是最后一个管理员,请先提升其他用户。",passwordIncorrect:"密码不正确。",typeEmail:"输入完整邮箱确认"},language:"语言",languageHint:"选择此浏览器使用的语言。",notifications:"通知",notificationsTab:{browserPermission:"浏览器权限",disabled:"通知已关闭。",disableFailed:"关闭失败:{message}",disableNotifications:"关闭通知",enableNotifications:"开启通知",enabled:"通知已开启。",errors:{denied:"权限被拒绝。请在浏览器设置中允许通知后重试。",disabled:"此 relay 已禁用 Web Push。",keyFailed:"无法从 relay 获取 VAPID key。",subscribeFailed:"浏览器拒绝创建订阅。",subscribeRejected:"relay 拒绝了订阅。",fallback:"开启失败。"},sendTest:"发送测试通知",permissions:{default:"询问",granted:"已允许",denied:"已拒绝"},status:"浏览器权限:{permission} - 已订阅:{subscribed}",subscribed:"已订阅",testFailed:"测试通知发送失败。",testFailedWithCode:"测试通知发送失败({code})。",testSent:"测试通知已发送到 {count} 个订阅。",unsupported:"此浏览器不支持 service worker,无法使用推送通知。"},relay:"Relay",sessionsTab:{currentDevice:"此设备",empty:"没有活动会话。",hint:"每一行都是此账号已登录的浏览器或 PWA。",ipUnknown:"IP 未知",loadFailed:"加载会话失败。",revokeConfirm:"撤销此设备?该设备需要重新登录。",revokeFailed:"撤销失败。",signedIn:"登录于",signOutOthers:"退出除本设备外的所有设备",signOutOthersConfirm:"退出所有其他设备?它们都需要重新登录。",signOutOthersFailed:"退出其他设备失败。",signOutOthersSuccess:"已退出 {count} 个其他设备。",unknownDevice:"未知设备"},tabs:{changePassword:"修改密码",danger:"危险区",notifications:"通知",relay:"Relay",sessions:"已登录设备"},title:"设置"},admin:{actions:"操作",config:{effective:"实际:{value}",effectiveDisabled:"实际:已禁用",hint:"0 表示使用内建默认值;负数表示完全禁用限制。修改会立即生效,并持久化到管理配置文件。",loadFailed:"加载配置失败。",maxConnections:"最大 WS 连接数(每 IP+token)",rateLimit:"速率限制(每 IP+token 每分钟请求数)",saveFailed:"保存失败。",runtimeLimits:"运行时限制",debug:"详细日志",debugHint:"记录 relay 帧。立即生效,无需重启。",debugPayload:"记录 payload 字节",debugPayloadWarn:"会记录终端输入/输出,属敏感信息,仅排查问题时临时开启。"},configTab:"配置",feishuTab:"飞书",feishuConfig:{title:"飞书集成",description:"为本 relay 启用飞书机器人桥接。加密密钥用于保护服务器上保存的飞书应用凭据。",enabled:"启用飞书",encryptKey:"加密密钥",generate:"生成",keyGenerated:"已生成密钥,保存后生效。",keyEmptyPlaceholder:"粘贴或生成一个 32 字节 base64 密钥",keyKeepPlaceholder:"已设置密钥(…{last4})。留空则保持不变。",keyCopyOnce:"请妥善复制保存此密钥——它只显示这一次,之后不再展示。",forceRotate:"替换现有密钥(现有飞书绑定将失效)",baseUrl:"Base URL",statusRunning:"运行中",statusStopped:"已停止",rotateConflict:"这会更改现有密钥。需勾选「替换」才能轮换(现有绑定会失效)。",loadFailed:"加载飞书配置失败。",saveFailed:"保存失败。"},created:"创建时间",disabled:"已禁用 {when}",email:"邮箱",errors:{actionFailed:"操作失败。",cannotDemoteSelf:"不能降级你自己。",lastAdmin:"不能降级最后一个管理员,请先提升其他用户。"},id:"ID",invitationsTab:{consumed:"已使用",count:"数量",createFailed:"创建失败:{code}",copyNow:"请立即复制此邀请{note},此后不会再次显示。",empty:"还没有邀请。",expires:"过期时间",loadFailed:"加载邀请失败。",note:"备注",prefix:"前缀",unused:"未使用"},loadUsersFailed:"加载用户失败。",promote:"提升",promoteConfirm:"将此用户提升为管理员?",resetPassword:"重置密码",resetPasswordConfirm:"重置密码?新的临时密码只会显示一次。",secretCopyOnce:"{label} - 请立即复制,仅显示一次。",status:"状态",temporaryPasswordFor:"{email} 的临时密码",title:"管理",userStatus:{active:"活跃",admin:"管理员"},users:"用户",invitations:"邀请",demote:"降级",demoteConfirm:"降级此管理员?",disable:"禁用",disableConfirm:"禁用此用户?该用户将被登出且无法登录。"},test:{interpolation:"{count} 个会话"},connHealth:{pillLabelConnecting:"连接中…",pillLabelReconnecting:"重连中…",pillLabelOff:"已关闭",drawerTitle:"连接质量",drawerRttNow:"RTT(当前)",drawerRttP50P95:"p50 / p95(最近 5 分钟)",drawerBytesIn:"↓ 接收",drawerBytesOut:"↑ 发送",drawerState:"状态",drawerReconnectsLastHour:"最近 1 小时重连",drawerReconnectsTime:"时间",drawerReconnectsReason:"原因",drawerReconnectsDowntime:"断开时长",drawerSeqGaps:"观察到的序号跳跃:"}},Zc="atterm.locale",Ka={en:xv,"zh-CN":vv},pn=Be("system"),cr=Be("en"),yv=de(()=>[{label:To("common.system"),value:"system"},{label:To("common.english"),value:"en"},{label:To("common.simplifiedChinese"),value:"zh-CN"}]);let Qc=Ri,Et;function vy(e={}){Et==null||Et(),Et=void 0,Qc=e.getLanguages??Ri;const o=Pv();pn.value=o,ni(),Et=(e.listenLanguageChange??Mv)(()=>{ni()})}function Sv(e){pn.value=e,ni();try{window.localStorage.setItem(Zc,e)}catch{}try{window.localStorage.setItem("atterm.locale_preference.value",JSON.stringify(e))}catch{}Cv(async()=>{const{notifyLocalChange:o}=await import("./prefsSync-C6s4W7Ql.js");return{notifyLocalChange:o}},__vite__mapDeps([0,1])).then(({notifyLocalChange:o})=>{o("locale_preference")}).catch(()=>{})}function wv(e,o=Ri()){if(e==="en"||e==="zh-CN")return e;for(const t of o){const r=t.trim().toLowerCase();if(r!==""){if(r==="zh"||r.startsWith("zh-"))return"zh-CN";if(r==="en"||r.startsWith("en-"))return"en"}}return"en"}function To(e,o={}){const t=Ya(Ka[cr.value],e)??Ya(Ka.en,e)??e;return Hv(t,o)}function yy(e){return Fv(e,{dateStyle:"medium",timeStyle:"short"})}function Pv(){try{const e=window.localStorage.getItem(Zc);return Tv(e)?e:"system"}catch{return"system"}}function Tv(e){return e==="system"||e==="en"||e==="zh-CN"}function ni(){$v(wv(pn.value,Qc()))}function $v(e){cr.value=e,Iv(e)}function Iv(e){typeof document>"u"||(document.documentElement.lang=e)}function Ya(e,o){let t=e;for(const r of o.split(".")){if(!Av(t))return;t=t[r]}return typeof t=="string"?t:void 0}function Hv(e,o){return e.replace(/\{([^{}]+)\}/g,(t,r)=>{const n=o[r];return n===void 0?t:String(n)})}function Fv(e,o){if(e===void 0||e==="")return"";try{return new Intl.DateTimeFormat(cr.value,o).format(new Date(e))}catch{return typeof e=="string"?e:""}}function Av(e){return typeof e=="object"&&e!==null}function Ri(){return typeof navigator>"u"?[]:navigator.languages.length>0?navigator.languages:navigator.language?[navigator.language]:[]}function Mv(e){return typeof window>"u"?()=>{}:(window.addEventListener("languagechange",e),()=>window.removeEventListener("languagechange",e))}const Li="atterm.relay";let vr=null;function Dv(){if(vr!==null)return vr;const e=globalThis.Capacitor;return vr=!!(e&&typeof e.isNativePlatform=="function"&&e.isNativePlatform()),vr}function _v(){if(typeof localStorage>"u")return null;const e=localStorage.getItem(Li);if(!e)return null;try{const o=JSON.parse(e);return typeof o!="object"||o===null?null:{baseURL:o.baseURL??o.base??"",sessionToken:o.sessionToken??o.token??null,expiresAt:o.expiresAt??null,allowInsecure:o.allowInsecure??o.allow_insecure??!1,...o.realmId!==void 0?{realmId:o.realmId}:{},...o.homeInstanceURL!==void 0?{homeInstanceURL:o.homeInstanceURL}:{}}}catch{return null}}function Sy(e){typeof localStorage>"u"||localStorage.setItem(Li,JSON.stringify(e))}function wy(){typeof localStorage>"u"||localStorage.removeItem(Li)}function Py(e,o){const t=e.trim();if(!t)return To("setup.errors.relayUrlRequired");let r;try{r=new URL(t)}catch{return To("setup.errors.invalidRelayUrl")}return r.protocol!=="http:"&&r.protocol!=="https:"?To("setup.errors.relayUrlMustBeHttp"):r.pathname!=="/"||r.search!==""||r.hash!==""?To("setup.errors.relayUrlNoPath"):r.protocol==="http:"&&!Ev(r.hostname)&&!o?To("setup.errors.useInsecureForHttp"):null}function Ev(e){const o=e.toLowerCase();return!!(o==="localhost"||o==="127.0.0.1"||o==="::1"||o.startsWith("127.")||o.startsWith("[")&&o.endsWith("]")&&o.slice(1,-1)==="::1")}function Ty(){return{t:To,languageOptions:yv,localePreference:pn,resolvedLocale:cr,setLocalePreference:Sv}}const $y=(e,o)=>{const t=e.__vccOpts||e;for(const[r,n]of o)t[r]=n;return t},Iy=de(()=>cr.value==="zh-CN"?{locale:Sp,dateLocale:Lh}:{locale:yp,dateLocale:Rh});function Hy(e){return Dv()?_v()!==null?e==="setup"||e==="login"||e==="signup"||e==="firstrun"?(location.replace("/"),!0):!1:e==="setup"?!1:(location.replace("/setup.html"),!0):!1}export{de as $,Jn as A,N0 as B,Me as C,Fs as D,qb as E,Fe as F,ly as G,_ as H,Kb as I,Z0 as J,wy as K,Bo as L,Us as M,Xb as N,Ia as O,$t as P,u0 as Q,XC as R,Tt as S,Yd as T,Ua as U,Lx as V,Jb as W,ay as X,b0 as Y,B as Z,Cv as _,Gf as a,xp as a$,Io as a0,Vv as a1,ls as a2,Vn as a3,Bv as a4,zv as a5,cp as a6,oy as a7,Z as a8,Ov as a9,xy as aA,Ii as aB,O as aC,dy as aD,Br as aE,Rs as aF,vy as aG,Ee as aH,_i as aI,Gv as aJ,qv as aK,pc as aL,p0 as aM,Xn as aN,zr as aO,Fi as aP,nn as aQ,Ws as aR,Ls as aS,ks as aT,Dv as aU,dp as aV,it as aW,wt as aX,zs as aY,$0 as aZ,Hp as a_,Un as aa,iy as ab,_e as ac,er as ad,Cy as ae,cy as af,Rh as ag,uy as ah,Je as ai,Jv as aj,ge as ak,pC as al,gC as am,Mi as an,nh as ao,yp as ap,rr as aq,ln as ar,y0 as as,Fa as at,py as au,yy as av,ss as aw,Ip as ax,Xv as ay,Qv as az,Pt as b,ir as b$,qh as b0,Ns as b1,hy as b2,_v as b3,zu as b4,EC as b5,Iy as b6,wl as b7,di as b8,ci as b9,Ha as bA,$o as bB,St as bC,Sy as bD,un as bE,cC as bF,Aa as bG,To as bH,gy as bI,by as bJ,gp as bK,wC as bL,Tp as bM,ud as bN,qr as bO,tm as bP,Gg as bQ,mC as bR,Rd as bS,Ti as bT,vp as bU,Ty as bV,Qn as bW,ny as bX,rc as bY,an as bZ,dn as b_,bp as ba,Qd as bb,Zr as bc,Xr as bd,Xd as be,Qr as bf,Bl as bg,Nn as bh,bg as bi,uC as bj,my as bk,It as bl,sC as bm,Kt as bn,Zv as bo,CC as bp,Gr as bq,gi as br,Be as bs,Cp as bt,Lv as bu,kv as bv,ey as bw,ar as bx,ty as by,ry as bz,ic as c,As as c0,jv as c1,Wv as c2,Py as c3,mp as c4,wr as c5,os as c6,qd as c7,Rv as c8,Nv as c9,lc as d,sy as e,ac as f,Ai as g,fy as h,Yb as i,yt as j,on as k,hs as l,bf as m,$y as n,Hy as o,gg as p,Kh as q,Kv as r,zb as s,nr as t,sr as u,Q as v,to as w,Yv as x,be as y,Se as z}; + `)])]),zC={info:()=>z(Kb,null),success:()=>z(Yb,null),warning:()=>z(Jb,null),error:()=>z(qb,null),default:()=>null},BC=Je({name:"Message",props:Object.assign(Object.assign({},jc),{render:Function}),setup(e){const{inlineThemeDisabled:o,mergedRtlRef:t}=Ti(e),{props:r,mergedClsPrefixRef:n}=Ee(Bc),i=rc("Message",t,n),a=ir("Message","-message",OC,LC,r,n),l=de(()=>{const{type:c}=e,{common:{cubicBezierEaseInOut:d},self:{padding:u,margin:p,maxWidth:g,iconMargin:h,closeMargin:b,closeSize:y,iconSize:C,fontSize:I,lineHeight:E,borderRadius:v,iconColorInfo:L,iconColorSuccess:W,iconColorWarning:w,iconColorError:K,iconColorLoading:D,closeIconSize:j,closeBorderRadius:q,[Z("textColor",c)]:F,[Z("boxShadow",c)]:ee,[Z("color",c)]:ae,[Z("closeColorHover",c)]:xe,[Z("closeColorPressed",c)]:oe,[Z("closeIconColor",c)]:V,[Z("closeIconColorPressed",c)]:re,[Z("closeIconColorHover",c)]:Ne}}=a.value;return{"--n-bezier":d,"--n-margin":p,"--n-padding":u,"--n-max-width":g,"--n-font-size":I,"--n-icon-margin":h,"--n-icon-size":C,"--n-close-icon-size":j,"--n-close-border-radius":q,"--n-close-size":y,"--n-close-margin":b,"--n-text-color":F,"--n-color":ae,"--n-box-shadow":ee,"--n-icon-color-info":L,"--n-icon-color-success":W,"--n-icon-color-warning":w,"--n-icon-color-error":K,"--n-icon-color-loading":D,"--n-close-color-hover":xe,"--n-close-color-pressed":oe,"--n-close-icon-color":V,"--n-close-icon-color-pressed":re,"--n-close-icon-color-hover":Ne,"--n-line-height":E,"--n-border-radius":v}}),s=o?As("message",de(()=>e.type[0]),l,{}):void 0;return{mergedClsPrefix:n,rtlEnabled:i,messageProviderProps:r,handleClose(){var c;(c=e.onClose)===null||c===void 0||c.call(e)},cssVars:o?void 0:l,themeClass:s==null?void 0:s.themeClass,onRender:s==null?void 0:s.onRender,placement:r.placement}},render(){const{render:e,type:o,closable:t,content:r,mergedClsPrefix:n,cssVars:i,themeClass:a,onRender:l,icon:s,handleClose:c,showIcon:d}=this;l==null||l();let u;return z("div",{class:[`${n}-message-wrapper`,a],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith("top")?"flex-start":"flex-end"},i]},e?e(this.$props):z("div",{class:[`${n}-message ${n}-message--${o}-type`,this.rtlEnabled&&`${n}-message--rtl`]},(u=WC(s,o,n))&&d?z("div",{class:`${n}-message__icon ${n}-message__icon--${o}-type`},z(Ai,null,{default:()=>u})):null,z("div",{class:`${n}-message__content`},Cp(r)),t?z(Xb,{clsPrefix:n,class:`${n}-message__close`,onClick:c,absolute:!0}):null))}});function WC(e,o,t){if(typeof e=="function")return e();{const r=o==="loading"?z(lc,{clsPrefix:t,strokeWidth:24,scale:.85}):zC[o]();return r?z(ic,{clsPrefix:t,key:o},{default:()=>r}):null}}const jC=Je({name:"MessageEnvironment",props:Object.assign(Object.assign({},jc),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(e){let o=null;const t=Be(!0);Qr(()=>{r()});function r(){const{duration:d}=e;d&&(o=window.setTimeout(a,d))}function n(d){d.currentTarget===d.target&&o!==null&&(window.clearTimeout(o),o=null)}function i(d){d.currentTarget===d.target&&r()}function a(){const{onHide:d}=e;t.value=!1,o&&(window.clearTimeout(o),o=null),d&&d()}function l(){const{onClose:d}=e;d&&d(),a()}function s(){const{onAfterLeave:d,onInternalAfterLeave:u,onAfterHide:p,internalKey:g}=e;d&&d(),u&&u(g),p&&p()}function c(){a()}return{show:t,hide:a,handleClose:l,handleAfterLeave:s,handleMouseleave:i,handleMouseenter:n,deactivate:c}},render(){return z(ac,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?z(BC,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),NC=Object.assign(Object.assign({},ir.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:"top"},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),fy=Je({name:"MessageProvider",props:NC,setup(e){const{mergedClsPrefixRef:o}=Ti(e),t=Be([]),r=Be({}),n={create(s,c){return i(s,Object.assign({type:"default"},c))},info(s,c){return i(s,Object.assign(Object.assign({},c),{type:"info"}))},success(s,c){return i(s,Object.assign(Object.assign({},c),{type:"success"}))},warning(s,c){return i(s,Object.assign(Object.assign({},c),{type:"warning"}))},error(s,c){return i(s,Object.assign(Object.assign({},c),{type:"error"}))},loading(s,c){return i(s,Object.assign(Object.assign({},c),{type:"loading"}))},destroyAll:l};Kt(Bc,{props:e,mergedClsPrefixRef:o}),Kt(EC,n);function i(s,c){const d=cp(),u=Gr(Object.assign(Object.assign({},c),{content:s,key:d,destroy:()=>{var g;(g=r.value[d])===null||g===void 0||g.hide()}})),{max:p}=e;return p&&t.value.length>=p&&t.value.shift(),t.value.push(u),u}function a(s){t.value.splice(t.value.findIndex(c=>c.key===s),1),delete r.value[s]}function l(){Object.values(r.value).forEach(s=>{s.hide()})}return Object.assign({mergedClsPrefix:o,messageRefs:r,messageList:t,handleAfterLeave:a},n)},render(){var e,o,t;return z(Fe,null,(o=(e=this.$slots).default)===null||o===void 0?void 0:o.call(e),this.messageList.length?z(Yd,{to:(t=this.to)!==null&&t!==void 0?t:"body"},z("div",{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:"message-container",style:this.containerStyle},this.messageList.map(r=>z(jC,Object.assign({ref:n=>{n&&(this.messageRefs[r.key]=n)},internalKey:r.key,onInternalAfterLeave:this.handleAfterLeave},bp(r,["destroy"],void 0),{duration:r.duration===void 0?this.duration:r.duration,keepAliveOnHover:r.keepAliveOnHover===void 0?this.keepAliveOnHover:r.keepAliveOnHover,closable:r.closable===void 0?this.closable:r.closable}))))):null)}}),VC={closeMargin:"16px 12px",closeSize:"20px",closeIconSize:"16px",width:"365px",padding:"16px",titleFontSize:"16px",metaFontSize:"12px",descriptionFontSize:"12px"};function UC(e){const{textColor2:o,successColor:t,infoColor:r,warningColor:n,errorColor:i,popoverColor:a,closeIconColor:l,closeIconColorHover:s,closeIconColorPressed:c,closeColorHover:d,closeColorPressed:u,textColor1:p,textColor3:g,borderRadius:h,fontWeightStrong:b,boxShadow2:y,lineHeight:C,fontSize:I}=e;return Object.assign(Object.assign({},VC),{borderRadius:h,lineHeight:C,fontSize:I,headerFontWeight:b,iconColor:o,iconColorSuccess:t,iconColorInfo:r,iconColorWarning:n,iconColorError:i,color:a,textColor:o,closeIconColor:l,closeIconColorHover:s,closeIconColorPressed:c,closeBorderRadius:h,closeColorHover:d,closeColorPressed:u,headerTextColor:p,descriptionTextColor:g,actionTextColor:o,boxShadow:y})}const GC={name:"Notification",common:A,peers:{Scrollbar:We},self:UC};function qC(e){const{textColor1:o,dividerColor:t,fontWeightStrong:r}=e;return{textColor:o,color:t,fontWeight:r}}const KC={name:"Divider",common:A,self:qC};function YC(e){const{modalColor:o,textColor1:t,textColor2:r,boxShadow3:n,lineHeight:i,fontWeightStrong:a,dividerColor:l,closeColorHover:s,closeColorPressed:c,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,borderRadius:g,primaryColorHover:h}=e;return{bodyPadding:"16px 24px",borderRadius:g,headerPadding:"16px 24px",footerPadding:"16px 24px",color:o,textColor:r,titleTextColor:t,titleFontSize:"18px",titleFontWeight:a,boxShadow:n,lineHeight:i,headerBorderBottom:`1px solid ${l}`,footerBorderTop:`1px solid ${l}`,closeIconColor:d,closeIconColorHover:u,closeIconColorPressed:p,closeSize:"22px",closeIconSize:"18px",closeColorHover:s,closeColorPressed:c,closeBorderRadius:g,resizableTriggerColorHover:h}}const JC={name:"Drawer",common:A,peers:{Scrollbar:We},self:YC},ZC={actionMargin:"0 0 0 20px",actionMarginRtl:"0 20px 0 0"},QC={name:"DynamicInput",common:A,peers:{Input:eo,Button:je},self(){return ZC}},XC={gapSmall:"4px 8px",gapMedium:"8px 12px",gapLarge:"12px 16px"},Nc={name:"Space",self(){return XC}},ex={name:"DynamicTags",common:A,peers:{Input:eo,Button:je,Tag:mc,Space:Nc},self(){return{inputWidth:"64px"}}},ox={name:"Element",common:A},tx={gapSmall:"4px 8px",gapMedium:"8px 12px",gapLarge:"12px 16px"},rx={name:"Flex",self(){return tx}},nx={name:"ButtonGroup",common:A},ix={feedbackPadding:"4px 0 0 2px",feedbackHeightSmall:"24px",feedbackHeightMedium:"24px",feedbackHeightLarge:"26px",feedbackFontSizeSmall:"13px",feedbackFontSizeMedium:"14px",feedbackFontSizeLarge:"14px",labelFontSizeLeftSmall:"14px",labelFontSizeLeftMedium:"14px",labelFontSizeLeftLarge:"15px",labelFontSizeTopSmall:"13px",labelFontSizeTopMedium:"14px",labelFontSizeTopLarge:"14px",labelHeightSmall:"24px",labelHeightMedium:"26px",labelHeightLarge:"28px",labelPaddingVertical:"0 0 6px 2px",labelPaddingHorizontal:"0 12px 0 0",labelTextAlignVertical:"left",labelTextAlignHorizontal:"right",labelFontWeight:"400"};function Vc(e){const{heightSmall:o,heightMedium:t,heightLarge:r,textColor1:n,errorColor:i,warningColor:a,lineHeight:l,textColor3:s}=e;return Object.assign(Object.assign({},ix),{blankHeightSmall:o,blankHeightMedium:t,blankHeightLarge:r,lineHeight:l,labelTextColor:n,asteriskColor:i,feedbackTextColorError:i,feedbackTextColorWarning:a,feedbackTextColor:s})}const py={common:ge,self:Vc},ax={name:"Form",common:A,self:Vc},lx={name:"GradientText",common:A,self(e){const{primaryColor:o,successColor:t,warningColor:r,errorColor:n,infoColor:i,primaryColorSuppl:a,successColorSuppl:l,warningColorSuppl:s,errorColorSuppl:c,infoColorSuppl:d,fontWeightStrong:u}=e;return{fontWeight:u,rotate:"252deg",colorStartPrimary:o,colorEndPrimary:a,colorStartInfo:i,colorEndInfo:d,colorStartWarning:r,colorEndWarning:s,colorStartError:n,colorEndError:c,colorStartSuccess:t,colorEndSuccess:l}}},sx={name:"InputNumber",common:A,peers:{Button:je,Input:eo},self(e){const{textColorDisabled:o}=e;return{iconColorDisabled:o}}},cx={name:"Layout",common:A,peers:{Scrollbar:We},self(e){const{textColor2:o,bodyColor:t,popoverColor:r,cardColor:n,dividerColor:i,scrollbarColor:a,scrollbarColorHover:l}=e;return{textColor:o,textColorInverted:o,color:t,colorEmbedded:t,headerColor:n,headerColorInverted:n,footerColor:n,footerColorInverted:n,headerBorderColor:i,headerBorderColorInverted:i,footerBorderColor:i,footerBorderColorInverted:i,siderBorderColor:i,siderBorderColorInverted:i,siderColor:n,siderColorInverted:n,siderToggleButtonBorder:"1px solid transparent",siderToggleButtonColor:r,siderToggleButtonIconColor:o,siderToggleButtonIconColorInverted:o,siderToggleBarColor:B(t,a),siderToggleBarColorHover:B(t,l),__invertScrollbar:"false"}}},dx={name:"Row",common:A};function Uc(e){const{textColor2:o,cardColor:t,modalColor:r,popoverColor:n,dividerColor:i,borderRadius:a,fontSize:l,hoverColor:s}=e;return{textColor:o,color:t,colorHover:s,colorModal:r,colorHoverModal:B(r,s),colorPopover:n,colorHoverPopover:B(n,s),borderColor:i,borderColorModal:B(r,i),borderColorPopover:B(n,i),borderRadius:a,fontSize:l}}const hy={common:ge,self:Uc},ux={name:"List",common:A,self:Uc},fx={name:"Log",common:A,peers:{Scrollbar:We,Code:wc},self(e){const{textColor2:o,inputColor:t,fontSize:r,primaryColor:n}=e;return{loaderFontSize:r,loaderTextColor:o,loaderColor:t,loaderBorder:"1px solid #0000",loadingColor:n}}},px={name:"Mention",common:A,peers:{InternalSelectMenu:lr,Input:eo},self(e){const{boxShadow2:o}=e;return{menuBoxShadow:o}}};function hx(e,o,t,r){return{itemColorHoverInverted:"#0000",itemColorActiveInverted:o,itemColorActiveHoverInverted:o,itemColorActiveCollapsedInverted:o,itemTextColorInverted:e,itemTextColorHoverInverted:t,itemTextColorChildActiveInverted:t,itemTextColorChildActiveHoverInverted:t,itemTextColorActiveInverted:t,itemTextColorActiveHoverInverted:t,itemTextColorHorizontalInverted:e,itemTextColorHoverHorizontalInverted:t,itemTextColorChildActiveHorizontalInverted:t,itemTextColorChildActiveHoverHorizontalInverted:t,itemTextColorActiveHorizontalInverted:t,itemTextColorActiveHoverHorizontalInverted:t,itemIconColorInverted:e,itemIconColorHoverInverted:t,itemIconColorActiveInverted:t,itemIconColorActiveHoverInverted:t,itemIconColorChildActiveInverted:t,itemIconColorChildActiveHoverInverted:t,itemIconColorCollapsedInverted:e,itemIconColorHorizontalInverted:e,itemIconColorHoverHorizontalInverted:t,itemIconColorActiveHorizontalInverted:t,itemIconColorActiveHoverHorizontalInverted:t,itemIconColorChildActiveHorizontalInverted:t,itemIconColorChildActiveHoverHorizontalInverted:t,arrowColorInverted:e,arrowColorHoverInverted:t,arrowColorActiveInverted:t,arrowColorActiveHoverInverted:t,arrowColorChildActiveInverted:t,arrowColorChildActiveHoverInverted:t,groupTextColorInverted:r}}function mx(e){const{borderRadius:o,textColor3:t,primaryColor:r,textColor2:n,textColor1:i,fontSize:a,dividerColor:l,hoverColor:s,primaryColorHover:c}=e;return Object.assign({borderRadius:o,color:"#0000",groupTextColor:t,itemColorHover:s,itemColorActive:_(r,{alpha:.1}),itemColorActiveHover:_(r,{alpha:.1}),itemColorActiveCollapsed:_(r,{alpha:.1}),itemTextColor:n,itemTextColorHover:n,itemTextColorActive:r,itemTextColorActiveHover:r,itemTextColorChildActive:r,itemTextColorChildActiveHover:r,itemTextColorHorizontal:n,itemTextColorHoverHorizontal:c,itemTextColorActiveHorizontal:r,itemTextColorActiveHoverHorizontal:r,itemTextColorChildActiveHorizontal:r,itemTextColorChildActiveHoverHorizontal:r,itemIconColor:i,itemIconColorHover:i,itemIconColorActive:r,itemIconColorActiveHover:r,itemIconColorChildActive:r,itemIconColorChildActiveHover:r,itemIconColorCollapsed:i,itemIconColorHorizontal:i,itemIconColorHoverHorizontal:c,itemIconColorActiveHorizontal:r,itemIconColorActiveHoverHorizontal:r,itemIconColorChildActiveHorizontal:r,itemIconColorChildActiveHoverHorizontal:r,itemHeight:"42px",arrowColor:n,arrowColorHover:n,arrowColorActive:r,arrowColorActiveHover:r,arrowColorChildActive:r,arrowColorChildActiveHover:r,colorInverted:"#0000",borderColorHorizontal:"#0000",fontSize:a,dividerColor:l},hx("#BBB",r,"#FFF","#AAA"))}const gx={name:"Menu",common:A,peers:{Tooltip:fn,Dropdown:Ei},self(e){const{primaryColor:o,primaryColorSuppl:t}=e,r=mx(e);return r.itemColorActive=_(o,{alpha:.15}),r.itemColorActiveHover=_(o,{alpha:.15}),r.itemColorActiveCollapsed=_(o,{alpha:.15}),r.itemColorActiveInverted=t,r.itemColorActiveHoverInverted=t,r.itemColorActiveCollapsedInverted=t,r}},bx={titleFontSize:"18px",backSize:"22px"};function Cx(e){const{textColor1:o,textColor2:t,textColor3:r,fontSize:n,fontWeightStrong:i,primaryColorHover:a,primaryColorPressed:l}=e;return Object.assign(Object.assign({},bx),{titleFontWeight:i,fontSize:n,titleTextColor:o,backColor:t,backColorHover:a,backColorPressed:l,subtitleTextColor:r})}const xx={name:"PageHeader",common:A,self:Cx},vx={iconSize:"22px"};function Gc(e){const{fontSize:o,warningColor:t}=e;return Object.assign(Object.assign({},vx),{fontSize:o,iconColor:t})}const my={name:"Popconfirm",common:ge,peers:{Button:sr,Popover:It},self:Gc},yx={name:"Popconfirm",common:A,peers:{Button:je,Popover:lt},self:Gc};function Sx(e){const{infoColor:o,successColor:t,warningColor:r,errorColor:n,textColor2:i,progressRailColor:a,fontSize:l,fontWeight:s}=e;return{fontSize:l,fontSizeCircle:"28px",fontWeightCircle:s,railColor:a,railHeight:"8px",iconSizeCircle:"36px",iconSizeLine:"18px",iconColor:o,iconColorInfo:o,iconColorSuccess:t,iconColorWarning:r,iconColorError:n,textColorCircle:i,textColorLineInner:"rgb(255, 255, 255)",textColorLineOuter:i,fillColor:o,fillColorInfo:o,fillColorSuccess:t,fillColorWarning:r,fillColorError:n,lineBgProcessing:"linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)"}}const qc={name:"Progress",common:A,self(e){const o=Sx(e);return o.textColorLineInner="rgb(0, 0, 0)",o.lineBgProcessing="linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)",o}},wx={name:"Rate",common:A,self(e){const{railColor:o}=e;return{itemColor:o,itemColorActive:"#CCAA33",itemSize:"20px",sizeSmall:"16px",sizeMedium:"20px",sizeLarge:"24px"}}},Px={titleFontSizeSmall:"26px",titleFontSizeMedium:"32px",titleFontSizeLarge:"40px",titleFontSizeHuge:"48px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",iconSizeSmall:"64px",iconSizeMedium:"80px",iconSizeLarge:"100px",iconSizeHuge:"125px",iconColor418:void 0,iconColor404:void 0,iconColor403:void 0,iconColor500:void 0};function Tx(e){const{textColor2:o,textColor1:t,errorColor:r,successColor:n,infoColor:i,warningColor:a,lineHeight:l,fontWeightStrong:s}=e;return Object.assign(Object.assign({},Px),{lineHeight:l,titleFontWeight:s,titleTextColor:t,textColor:o,iconColorError:r,iconColorSuccess:n,iconColorInfo:i,iconColorWarning:a})}const $x={name:"Result",common:A,self:Tx},Ix={railHeight:"4px",railWidthVertical:"4px",handleSize:"18px",dotHeight:"8px",dotWidth:"8px",dotBorderRadius:"4px"},Hx={name:"Slider",common:A,self(e){const o="0 2px 8px 0 rgba(0, 0, 0, 0.12)",{railColor:t,modalColor:r,primaryColorSuppl:n,popoverColor:i,textColor2:a,cardColor:l,borderRadius:s,fontSize:c,opacityDisabled:d}=e;return Object.assign(Object.assign({},Ix),{fontSize:c,markFontSize:c,railColor:t,railColorHover:t,fillColor:n,fillColorHover:n,opacityDisabled:d,handleColor:"#FFF",dotColor:l,dotColorModal:r,dotColorPopover:i,handleBoxShadow:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowHover:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowActive:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowFocus:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",indicatorColor:i,indicatorBoxShadow:o,indicatorTextColor:a,indicatorBorderRadius:s,dotBorder:`2px solid ${t}`,dotBorderActive:`2px solid ${n}`,dotBoxShadow:""})}};function Fx(e){const{opacityDisabled:o,heightTiny:t,heightSmall:r,heightMedium:n,heightLarge:i,heightHuge:a,primaryColor:l,fontSize:s}=e;return{fontSize:s,textColor:l,sizeTiny:t,sizeSmall:r,sizeMedium:n,sizeLarge:i,sizeHuge:a,color:l,opacitySpinning:o}}const Ax={name:"Spin",common:A,self:Fx};function Mx(e){const{textColor2:o,textColor3:t,fontSize:r,fontWeight:n}=e;return{labelFontSize:r,labelFontWeight:n,valueFontWeight:n,valueFontSize:"24px",labelTextColor:t,valuePrefixTextColor:o,valueSuffixTextColor:o,valueTextColor:o}}const Dx={name:"Statistic",common:A,self:Mx},_x={stepHeaderFontSizeSmall:"14px",stepHeaderFontSizeMedium:"16px",indicatorIndexFontSizeSmall:"14px",indicatorIndexFontSizeMedium:"16px",indicatorSizeSmall:"22px",indicatorSizeMedium:"28px",indicatorIconSizeSmall:"14px",indicatorIconSizeMedium:"18px"};function Ex(e){const{fontWeightStrong:o,baseColor:t,textColorDisabled:r,primaryColor:n,errorColor:i,textColor1:a,textColor2:l}=e;return Object.assign(Object.assign({},_x),{stepHeaderFontWeight:o,indicatorTextColorProcess:t,indicatorTextColorWait:r,indicatorTextColorFinish:n,indicatorTextColorError:i,indicatorBorderColorProcess:n,indicatorBorderColorWait:r,indicatorBorderColorFinish:n,indicatorBorderColorError:i,indicatorColorProcess:n,indicatorColorWait:"#0000",indicatorColorFinish:"#0000",indicatorColorError:"#0000",splitorColorProcess:r,splitorColorWait:r,splitorColorFinish:n,splitorColorError:r,headerTextColorProcess:a,headerTextColorWait:r,headerTextColorFinish:r,headerTextColorError:i,descriptionTextColorProcess:l,descriptionTextColorWait:r,descriptionTextColorFinish:r,descriptionTextColorError:i})}const Rx={name:"Steps",common:A,self:Ex},Lx={buttonHeightSmall:"14px",buttonHeightMedium:"18px",buttonHeightLarge:"22px",buttonWidthSmall:"14px",buttonWidthMedium:"18px",buttonWidthLarge:"22px",buttonWidthPressedSmall:"20px",buttonWidthPressedMedium:"24px",buttonWidthPressedLarge:"28px",railHeightSmall:"18px",railHeightMedium:"22px",railHeightLarge:"26px",railWidthSmall:"32px",railWidthMedium:"40px",railWidthLarge:"48px"},kx={name:"Switch",common:A,self(e){const{primaryColorSuppl:o,opacityDisabled:t,borderRadius:r,primaryColor:n,textColor2:i,baseColor:a}=e;return Object.assign(Object.assign({},Lx),{iconColor:a,textColor:i,loadingColor:o,opacityDisabled:t,railColor:"rgba(255, 255, 255, .20)",railColorActive:o,buttonBoxShadow:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",buttonColor:"#FFF",railBorderRadiusSmall:r,railBorderRadiusMedium:r,railBorderRadiusLarge:r,buttonBorderRadiusSmall:r,buttonBorderRadiusMedium:r,buttonBorderRadiusLarge:r,boxShadowFocus:`0 0 8px 0 ${_(n,{alpha:.3})}`})}},Ox={thPaddingSmall:"6px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"6px",tdPaddingMedium:"12px",tdPaddingLarge:"12px"};function zx(e){const{dividerColor:o,cardColor:t,modalColor:r,popoverColor:n,tableHeaderColor:i,tableColorStriped:a,textColor1:l,textColor2:s,borderRadius:c,fontWeightStrong:d,lineHeight:u,fontSizeSmall:p,fontSizeMedium:g,fontSizeLarge:h}=e;return Object.assign(Object.assign({},Ox),{fontSizeSmall:p,fontSizeMedium:g,fontSizeLarge:h,lineHeight:u,borderRadius:c,borderColor:B(t,o),borderColorModal:B(r,o),borderColorPopover:B(n,o),tdColor:t,tdColorModal:r,tdColorPopover:n,tdColorStriped:B(t,a),tdColorStripedModal:B(r,a),tdColorStripedPopover:B(n,a),thColor:B(t,i),thColorModal:B(r,i),thColorPopover:B(n,i),thTextColor:l,tdTextColor:s,thFontWeight:d})}const Bx={name:"Table",common:A,self:zx},Wx={tabFontSizeSmall:"14px",tabFontSizeMedium:"14px",tabFontSizeLarge:"16px",tabGapSmallLine:"36px",tabGapMediumLine:"36px",tabGapLargeLine:"36px",tabGapSmallLineVertical:"8px",tabGapMediumLineVertical:"8px",tabGapLargeLineVertical:"8px",tabPaddingSmallLine:"6px 0",tabPaddingMediumLine:"10px 0",tabPaddingLargeLine:"14px 0",tabPaddingVerticalSmallLine:"6px 12px",tabPaddingVerticalMediumLine:"8px 16px",tabPaddingVerticalLargeLine:"10px 20px",tabGapSmallBar:"36px",tabGapMediumBar:"36px",tabGapLargeBar:"36px",tabGapSmallBarVertical:"8px",tabGapMediumBarVertical:"8px",tabGapLargeBarVertical:"8px",tabPaddingSmallBar:"4px 0",tabPaddingMediumBar:"6px 0",tabPaddingLargeBar:"10px 0",tabPaddingVerticalSmallBar:"6px 12px",tabPaddingVerticalMediumBar:"8px 16px",tabPaddingVerticalLargeBar:"10px 20px",tabGapSmallCard:"4px",tabGapMediumCard:"4px",tabGapLargeCard:"4px",tabGapSmallCardVertical:"4px",tabGapMediumCardVertical:"4px",tabGapLargeCardVertical:"4px",tabPaddingSmallCard:"8px 16px",tabPaddingMediumCard:"10px 20px",tabPaddingLargeCard:"12px 24px",tabPaddingSmallSegment:"4px 0",tabPaddingMediumSegment:"6px 0",tabPaddingLargeSegment:"8px 0",tabPaddingVerticalLargeSegment:"0 8px",tabPaddingVerticalSmallCard:"8px 12px",tabPaddingVerticalMediumCard:"10px 16px",tabPaddingVerticalLargeCard:"12px 20px",tabPaddingVerticalSmallSegment:"0 4px",tabPaddingVerticalMediumSegment:"0 6px",tabGapSmallSegment:"0",tabGapMediumSegment:"0",tabGapLargeSegment:"0",tabGapSmallSegmentVertical:"0",tabGapMediumSegmentVertical:"0",tabGapLargeSegmentVertical:"0",panePaddingSmall:"8px 0 0 0",panePaddingMedium:"12px 0 0 0",panePaddingLarge:"16px 0 0 0",closeSize:"18px",closeIconSize:"14px"};function Kc(e){const{textColor2:o,primaryColor:t,textColorDisabled:r,closeIconColor:n,closeIconColorHover:i,closeIconColorPressed:a,closeColorHover:l,closeColorPressed:s,tabColor:c,baseColor:d,dividerColor:u,fontWeight:p,textColor1:g,borderRadius:h,fontSize:b,fontWeightStrong:y}=e;return Object.assign(Object.assign({},Wx),{colorSegment:c,tabFontSizeCard:b,tabTextColorLine:g,tabTextColorActiveLine:t,tabTextColorHoverLine:t,tabTextColorDisabledLine:r,tabTextColorSegment:g,tabTextColorActiveSegment:o,tabTextColorHoverSegment:o,tabTextColorDisabledSegment:r,tabTextColorBar:g,tabTextColorActiveBar:t,tabTextColorHoverBar:t,tabTextColorDisabledBar:r,tabTextColorCard:g,tabTextColorHoverCard:g,tabTextColorActiveCard:t,tabTextColorDisabledCard:r,barColor:t,closeIconColor:n,closeIconColorHover:i,closeIconColorPressed:a,closeColorHover:l,closeColorPressed:s,closeBorderRadius:h,tabColor:c,tabColorSegment:d,tabBorderColor:u,tabFontWeightActive:p,tabFontWeight:p,tabBorderRadius:h,paneTextColor:o,fontWeightStrong:y})}const gy={common:ge,self:Kc},jx={name:"Tabs",common:A,self(e){const o=Kc(e),{inputColor:t}=e;return o.colorSegment=t,o.tabColorSegment=t,o}};function Yc(e){const{textColor1:o,textColor2:t,fontWeightStrong:r,fontSize:n}=e;return{fontSize:n,titleTextColor:o,textColor:t,titleFontWeight:r}}const by={common:ge,self:Yc},Nx={name:"Thing",common:A,self:Yc},Vx={titleMarginMedium:"0 0 6px 0",titleMarginLarge:"-2px 0 6px 0",titleFontSizeMedium:"14px",titleFontSizeLarge:"16px",iconSizeMedium:"14px",iconSizeLarge:"14px"},Ux={name:"Timeline",common:A,self(e){const{textColor3:o,infoColorSuppl:t,errorColorSuppl:r,successColorSuppl:n,warningColorSuppl:i,textColor1:a,textColor2:l,railColor:s,fontWeightStrong:c,fontSize:d}=e;return Object.assign(Object.assign({},Vx),{contentFontSize:d,titleFontWeight:c,circleBorder:`2px solid ${o}`,circleBorderInfo:`2px solid ${t}`,circleBorderError:`2px solid ${r}`,circleBorderSuccess:`2px solid ${n}`,circleBorderWarning:`2px solid ${i}`,iconColor:o,iconColorInfo:t,iconColorError:r,iconColorSuccess:n,iconColorWarning:i,titleTextColor:a,contentTextColor:l,metaTextColor:o,lineColor:s})}},Gx={extraFontSizeSmall:"12px",extraFontSizeMedium:"12px",extraFontSizeLarge:"14px",titleFontSizeSmall:"14px",titleFontSizeMedium:"16px",titleFontSizeLarge:"16px",closeSize:"20px",closeIconSize:"16px",headerHeightSmall:"44px",headerHeightMedium:"44px",headerHeightLarge:"50px"},qx={name:"Transfer",common:A,peers:{Checkbox:Ht,Scrollbar:We,Input:eo,Empty:at,Button:je},self(e){const{fontWeight:o,fontSizeLarge:t,fontSizeMedium:r,fontSizeSmall:n,heightLarge:i,heightMedium:a,borderRadius:l,inputColor:s,tableHeaderColor:c,textColor1:d,textColorDisabled:u,textColor2:p,textColor3:g,hoverColor:h,closeColorHover:b,closeColorPressed:y,closeIconColor:C,closeIconColorHover:I,closeIconColorPressed:E,dividerColor:v}=e;return Object.assign(Object.assign({},Gx),{itemHeightSmall:a,itemHeightMedium:a,itemHeightLarge:i,fontSizeSmall:n,fontSizeMedium:r,fontSizeLarge:t,borderRadius:l,dividerColor:v,borderColor:"#0000",listColor:s,headerColor:c,titleTextColor:d,titleTextColorDisabled:u,extraTextColor:g,extraTextColorDisabled:u,itemTextColor:p,itemTextColorDisabled:u,itemColorPending:h,titleFontWeight:o,closeColorHover:b,closeColorPressed:y,closeIconColor:C,closeIconColorHover:I,closeIconColorPressed:E})}};function Kx(e){const{borderRadiusSmall:o,dividerColor:t,hoverColor:r,pressedColor:n,primaryColor:i,textColor3:a,textColor2:l,textColorDisabled:s,fontSize:c}=e;return{fontSize:c,lineHeight:"1.5",nodeHeight:"30px",nodeWrapperPadding:"3px 0",nodeBorderRadius:o,nodeColorHover:r,nodeColorPressed:n,nodeColorActive:_(i,{alpha:.1}),arrowColor:a,nodeTextColor:l,nodeTextColorDisabled:s,loadingColor:i,dropMarkColor:i,lineColor:t}}const Jc={name:"Tree",common:A,peers:{Checkbox:Ht,Scrollbar:We,Empty:at},self(e){const{primaryColor:o}=e,t=Kx(e);return t.nodeColorActive=_(o,{alpha:.15}),t}},Yx={name:"TreeSelect",common:A,peers:{Tree:Jc,Empty:at,InternalSelection:Di}},Jx={headerFontSize1:"30px",headerFontSize2:"22px",headerFontSize3:"18px",headerFontSize4:"16px",headerFontSize5:"16px",headerFontSize6:"16px",headerMargin1:"28px 0 20px 0",headerMargin2:"28px 0 20px 0",headerMargin3:"28px 0 20px 0",headerMargin4:"28px 0 18px 0",headerMargin5:"28px 0 18px 0",headerMargin6:"28px 0 18px 0",headerPrefixWidth1:"16px",headerPrefixWidth2:"16px",headerPrefixWidth3:"12px",headerPrefixWidth4:"12px",headerPrefixWidth5:"12px",headerPrefixWidth6:"12px",headerBarWidth1:"4px",headerBarWidth2:"4px",headerBarWidth3:"3px",headerBarWidth4:"3px",headerBarWidth5:"3px",headerBarWidth6:"3px",pMargin:"16px 0 16px 0",liMargin:".25em 0 0 0",olPadding:"0 0 0 2em",ulPadding:"0 0 0 2em"};function Zx(e){const{primaryColor:o,textColor2:t,borderColor:r,lineHeight:n,fontSize:i,borderRadiusSmall:a,dividerColor:l,fontWeightStrong:s,textColor1:c,textColor3:d,infoColor:u,warningColor:p,errorColor:g,successColor:h,codeColor:b}=e;return Object.assign(Object.assign({},Jx),{aTextColor:o,blockquoteTextColor:t,blockquotePrefixColor:r,blockquoteLineHeight:n,blockquoteFontSize:i,codeBorderRadius:a,liTextColor:t,liLineHeight:n,liFontSize:i,hrColor:l,headerFontWeight:s,headerTextColor:c,pTextColor:t,pTextColor1Depth:c,pTextColor2Depth:t,pTextColor3Depth:d,pLineHeight:n,pFontSize:i,headerBarColor:o,headerBarColorPrimary:o,headerBarColorInfo:u,headerBarColorError:g,headerBarColorWarning:p,headerBarColorSuccess:h,textColor:t,textColor1Depth:c,textColor2Depth:t,textColor3Depth:d,textColorPrimary:o,textColorInfo:u,textColorSuccess:h,textColorWarning:p,textColorError:g,codeTextColor:t,codeColor:b,codeBorder:"1px solid #0000"})}const Qx={name:"Typography",common:A,self:Zx};function Xx(e){const{iconColor:o,primaryColor:t,errorColor:r,textColor2:n,successColor:i,opacityDisabled:a,actionColor:l,borderColor:s,hoverColor:c,lineHeight:d,borderRadius:u,fontSize:p}=e;return{fontSize:p,lineHeight:d,borderRadius:u,draggerColor:l,draggerBorder:`1px dashed ${s}`,draggerBorderHover:`1px dashed ${t}`,itemColorHover:c,itemColorHoverError:_(r,{alpha:.06}),itemTextColor:n,itemTextColorError:r,itemTextColorSuccess:i,itemIconColor:o,itemDisabledOpacity:a,itemBorderImageCardError:`1px solid ${r}`,itemBorderImageCard:`1px solid ${s}`}}const ev={name:"Upload",common:A,peers:{Button:je,Progress:qc},self(e){const{errorColor:o}=e,t=Xx(e);return t.itemColorHoverError=_(o,{alpha:.09}),t}},ov={name:"Watermark",common:A,self(e){const{fontFamily:o}=e;return{fontFamily:o}}},tv={name:"FloatButton",common:A,self(e){const{popoverColor:o,textColor2:t,buttonColor2Hover:r,buttonColor2Pressed:n,primaryColor:i,primaryColorHover:a,primaryColorPressed:l,baseColor:s,borderRadius:c}=e;return{color:o,textColor:t,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)",boxShadowHover:"0 2px 12px 0px rgba(0, 0, 0, .18)",boxShadowPressed:"0 2px 12px 0px rgba(0, 0, 0, .18)",colorHover:r,colorPressed:n,colorPrimary:i,colorPrimaryHover:a,colorPrimaryPressed:l,textColorPrimary:s,borderRadiusSquare:c}}};function rv(e){const{primaryColor:o,baseColor:t}=e;return{color:o,iconColor:t}}const nv={name:"IconWrapper",common:A,self:rv},iv={name:"Image",common:A,peers:{Tooltip:fn},self:e=>{const{textColor2:o}=e;return{toolbarIconColor:o,toolbarColor:"rgba(0, 0, 0, .35)",toolbarBoxShadow:"none",toolbarBorderRadius:"24px"}}},av={extraFontSize:"12px",width:"440px"},lv={name:"Transfer",common:A,peers:{Checkbox:Ht,Scrollbar:We,Input:eo,Empty:at,Button:je},self(e){const{iconColorDisabled:o,iconColor:t,fontWeight:r,fontSizeLarge:n,fontSizeMedium:i,fontSizeSmall:a,heightLarge:l,heightMedium:s,heightSmall:c,borderRadius:d,inputColor:u,tableHeaderColor:p,textColor1:g,textColorDisabled:h,textColor2:b,hoverColor:y}=e;return Object.assign(Object.assign({},av),{itemHeightSmall:c,itemHeightMedium:s,itemHeightLarge:l,fontSizeSmall:a,fontSizeMedium:i,fontSizeLarge:n,borderRadius:d,borderColor:"#0000",listColor:u,headerColor:p,titleTextColor:g,titleTextColorDisabled:h,extraTextColor:b,filterDividerColor:"#0000",itemTextColor:b,itemTextColorDisabled:h,itemColorPending:y,titleFontWeight:r,iconColor:t,iconColorDisabled:o})}};function sv(){return{}}const cv={name:"Marquee",common:A,self:sv},dv={name:"QrCode",common:A,self:e=>({borderRadius:e.borderRadius})},uv={name:"Skeleton",common:A,self(e){const{heightSmall:o,heightMedium:t,heightLarge:r,borderRadius:n}=e;return{color:"rgba(255, 255, 255, 0.12)",colorEnd:"rgba(255, 255, 255, 0.18)",borderRadius:n,heightSmall:o,heightMedium:t,heightLarge:r}}},fv={name:"Split",common:A},pv=()=>({}),hv={name:"Equation",common:A,self:pv},mv={name:"FloatButtonGroup",common:A,self(e){const{popoverColor:o,dividerColor:t,borderRadius:r}=e;return{color:o,buttonBorderColor:t,borderRadiusSquare:r,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)"}}},Cy={name:"dark",common:A,Alert:C0,Anchor:P0,AutoComplete:F0,Avatar:Cc,AvatarGroup:D0,BackTop:E0,Badge:R0,Breadcrumb:O0,Button:je,ButtonGroup:nx,Calendar:G0,Card:yc,Carousel:Y0,Cascader:X0,Checkbox:Ht,Code:wc,Collapse:oC,CollapseTransition:rC,ColorPicker:iC,DataTable:vC,DatePicker:TC,Descriptions:HC,Dialog:zc,Divider:KC,Drawer:JC,Dropdown:Ei,DynamicInput:QC,DynamicTags:ex,Element:ox,Empty:at,Ellipsis:Mc,Equation:hv,Flex:rx,Form:ax,GradientText:lx,Icon:yC,IconWrapper:nv,Image:iv,Input:eo,InputNumber:sx,LegacyTransfer:lv,Layout:cx,List:ux,LoadingBar:_C,Log:fx,Menu:gx,Mention:px,Message:kC,Modal:DC,Notification:GC,PageHeader:xx,Pagination:Hc,Popconfirm:yx,Popover:lt,Popselect:Pc,Progress:qc,QrCode:dv,Radio:_c,Rate:wx,Result:$x,Row:dx,Scrollbar:We,Select:$c,Skeleton:uv,Slider:Hx,Space:Nc,Spin:Ax,Statistic:Dx,Steps:Rx,Switch:kx,Table:Bx,Tabs:jx,Tag:mc,Thing:Nx,TimePicker:kc,Timeline:Ux,Tooltip:fn,Transfer:qx,Tree:Jc,TreeSelect:Yx,Typography:Qx,Upload:ev,Watermark:ov,Split:fv,FloatButton:tv,FloatButtonGroup:mv,Marquee:cv};function Ko(e,o){return typeof document>"u"?o:getComputedStyle(document.documentElement).getPropertyValue(e).trim()||o}function xy(){const e=Ko("--bg","#0b1020"),o=Ko("--fg","#e2e8f0"),t=Ko("--fg-dim","#94a3b8"),r=Ko("--panel","#0f172a"),n=Ko("--border","#1e293b"),i=Ko("--accent","#60a5fa"),a=Ko("--bad","#f87171");return{common:{bodyColor:e,textColorBase:o,textColor1:o,textColor2:o,textColor3:t,primaryColor:i,primaryColorHover:i,primaryColorPressed:i,borderColor:n,cardColor:r,errorColor:a}}}const gv="modulepreload",bv=function(e){return"/"+e},qa={},Cv=function(o,t,r){let n=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));n=Promise.allSettled(t.map(s=>{if(s=bv(s),s in qa)return;qa[s]=!0;const c=s.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${d}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":gv,c||(u.as="script"),u.crossOrigin="",u.href=s,l&&u.setAttribute("nonce",l),document.head.appendChild(u),c)return new Promise((p,g)=>{u.addEventListener("load",p),u.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${s}`)))})}))}function i(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return n.then(a=>{for(const l of a||[])l.status==="rejected"&&i(l.reason);return o().catch(i)})},xv={common:{appName:"AT Term",cancel:"Cancel",confirm:"Confirm",copy:"Copy",create:"Create",created:"created",delete:"Delete",english:"English",language:"Language",loading:"Loading...",no:"no",optional:"optional",revoke:"Revoke",save:"Save",send:"send",simplifiedChinese:"Simplified Chinese",system:"System",unknown:"unknown",version:"Version",versionLabel:"version {version}",yes:"yes"},topbar:{admin:"Admin",home:"Home",main:"Sessions",primaryNav:"Primary",settings:"Settings",signOut:"Sign out"},auth:{alreadyHaveAccount:"Already have an account?",createAccount:"Create account",email:"Email",emailPlaceholder:"you@example.com",setup:{title:"First-run setup",hint:"No admin yet. Create the first admin account — use the email you set in ATTERM_BOOTSTRAP_ADMIN_EMAIL.",emailPlaceholder:"your ATTERM_BOOTSTRAP_ADMIN_EMAIL",confirmPassword:"Confirm password",createAdmin:"Create admin",passwordMismatch:"The two passwords do not match.",notAdmin:"Account created, but it is not an admin — make sure the email matches ATTERM_BOOTSTRAP_ADMIN_EMAIL.",failed:"Setup failed. Please try again."},errors:{emailTaken:"An account with that email already exists.",invalidCredentials:"Invalid email or password.",invalidEmail:"Please enter a valid email.",invalidRequest:"Please check your input.",inviteInvalid:"Invite code is invalid or already used.",passwordWeak:"Password must be at least 12 characters.",rateLimited:"Too many attempts. Please wait a few minutes.",rateLimitedShort:"Too many attempts. Please wait.",signInFailed:"Sign-in failed. Please try again.",signUpFailed:"Sign-up failed. Check your invite code and try again."},haveInviteCode:"Have an invite code?",inviteCode:"Invite code",password:"Password",signIn:"Sign in",signUp:"Sign up",signUpHere:"Sign up here"},setup:{allowInsecure:"Allow insecure HTTP/WS (non-loopback)",connect:"Connect",connectToRelay:"Connect to relay",disconnect:"Disconnect",errors:{cannotReachRelay:"Cannot reach relay: {message}",invalidRelayUrl:"invalid or malformed relay URL",originRejected:"Relay rejected the origin. Make sure the relay was started with ATTERM_ORIGINS containing capacitor://localhost.",relayHttp:"Relay returned HTTP {status}.",relayHttpCheckUrl:"Relay returned HTTP {status}. Check the URL and try again.",relayUrlMustBeHttp:"relay URL must start with http:// or https://",relayUrlNoPath:"relay URL must not contain a path, query, or fragment",relayUrlRequired:"relay URL is required",tokenInvalid:"API token is invalid. Generate a new one from Settings -> API Tokens on the relay web UI.",tokenInvalidSettings:"API token is invalid. Generate a new one from the relay web UI under Settings -> API Tokens.",tokenRequired:"API token is required",useInsecureForHttp:'enable "Allow insecure HTTP/WS" to use http:// with a non-loopback host'},reasonTokenInvalid:"Your API token is no longer valid. Please paste a fresh token to sign in again.",title:"Set up relay",relayUrl:"Relay URL",relayUrlPlaceholder:"https://relay.example.com",token:"API token",tokenPlaceholder:"atk_...",saved:"Saved."},main:{activeSessions:"active sessions",back:"back",backToSessions:"Back to sessions",empty:"No live sessions. Start one from the desktop app or",errors:{loadSessions:"Failed to load sessions."},install:{dismiss:"Dismiss install hint",text:"on iPhone, open this site with HTTPS, then tap Share -> Add to Home Screen.",title:"install AT Term"},reconnect:"Reconnect",refresh:"refresh",sessionCount:"{count} sessions",sessionCountOne:"{count} session",title:"Remote sessions",unknownCommand:"(unknown)",unknownHost:"unknown host",unlock:{action:"Sign in again",text:"This browser is signed in, but the in-memory encryption key is locked. Sign in again to decrypt session names, commands, and paths.",title:"Unlock encrypted session details"},viewOnlyNotice:"This session is view-only from this device. You can inspect output, but input is disabled.",taskTypes:{ai:"AI",test:"Test",build:"Build",deploy:"Deploy"}},terminal:{cannotReachRelay:"Cannot reach relay.",connecting:"Connecting...",disconnected:"Disconnected",ended:"session ended (exit {code})",loadingHistory:"loading history... {percent}%",paste:"Paste",pickImage:"pick image",pickFile:"pick file",remoteControl:"remote has taken control",statuses:{attached:"attached",connecting:"connecting",ended:"ended",lost:"lost",reconnecting:"reconnecting"},shortcuts:"terminal shortcuts",takeControl:"Take control",tapToChangeConfig:"Tap to change configuration.",templatePreviewTitle:"Send preview",templatePreviewSend:"Send"},sessions:{attach:"Attach",created:"Created",host:"Host"},settings:{changePassword:{current:"Current password",currentWrong:"Current password is incorrect.",failed:"Password change failed. Please try again.",invalidRequest:"Please check your input.",new:"New password (min 12 characters)",passwordWeak:"New password must be at least 12 characters.",update:"Update password"},danger:{confirmDelete:"Permanently delete this account? This cannot be undone.",currentPassword:"Current password",deleteAccount:"Delete my account",description:'Permanently delete this account. This cannot be undone. Web sessions and account data are removed. Invitations you have consumed stay (their "consumed by" field is cleared).',emailMismatch:"Email doesn't match - type your exact email.",failed:"Delete failed. Please try again.",invalidRequest:"Please check your input.",lastAdmin:"You're the last admin - promote another user first.",passwordIncorrect:"Password is incorrect.",typeEmail:"Confirm by typing your full email"},language:"Language",languageHint:"Choose the language used by this browser.",notifications:"Notifications",notificationsTab:{browserPermission:"Browser permission",disabled:"Notifications disabled.",disableFailed:"Failed to disable: {message}",disableNotifications:"Disable notifications",enableNotifications:"Enable notifications",enabled:"Notifications enabled.",errors:{denied:"Permission denied. Allow notifications in your browser settings and retry.",disabled:"Web push is disabled on this relay.",keyFailed:"Could not fetch the VAPID key from the relay.",subscribeFailed:"Browser refused to create a subscription.",subscribeRejected:"Relay refused the subscription.",fallback:"Failed to enable."},sendTest:"Send test notification",permissions:{default:"Ask",granted:"Allowed",denied:"Denied"},status:"Browser permission: {permission} - Subscribed: {subscribed}",subscribed:"Subscribed",testFailed:"Test notification failed.",testFailedWithCode:"Test notification failed ({code}).",testSent:"Test notification sent to {count} subscription(s).",unsupported:"This browser does not support service workers; push notifications are unavailable."},relay:"Relay",sessionsTab:{currentDevice:"this device",empty:"No active sessions.",hint:"Each row is a browser or PWA where this account is signed in.",ipUnknown:"ip unknown",loadFailed:"Failed to load sessions.",revokeConfirm:"Revoke this device? You'll need to sign in again on it.",revokeFailed:"Revoke failed.",signedIn:"signed in",signOutOthers:"Sign out everywhere except this device",signOutOthersConfirm:"Sign out every other device? They'll all need to sign in again.",signOutOthersFailed:"Sign-out-others failed.",signOutOthersSuccess:"Signed out {count} other device(s).",unknownDevice:"Unknown device"},tabs:{changePassword:"Change Password",danger:"Danger zone",notifications:"Notifications",relay:"Relay",sessions:"Signed-in devices"},title:"Settings"},admin:{actions:"Actions",config:{effective:"effective: {value}",effectiveDisabled:"effective: disabled",hint:'0 means "use the built-in default"; negative disables the limit entirely. Changes apply immediately and persist to the admin config file.',loadFailed:"Failed to load config.",maxConnections:"Max WS connections (per IP+token)",rateLimit:"Rate limit (requests/min per IP+token)",saveFailed:"Save failed.",runtimeLimits:"Runtime limits",debug:"Verbose logging",debugHint:"Logs relay frames. Applies immediately, no restart.",debugPayload:"Log payload bytes",debugPayloadWarn:"Logs terminal input/output — sensitive. Use only while debugging.",allowedOrigins:"Allowed Origins",allowedOriginsHint:'One per line. Mobile Capacitor clients need "capacitor://localhost". Empty = allow any origin (dev only).',allowedOriginsPlaceholder:`https://relay.example.com +capacitor://localhost`},configTab:"Config",feishuTab:"Feishu",feishuConfig:{title:"Feishu integration",description:"Enable the Feishu bot bridge for this relay. The encrypt key protects Feishu app credentials stored on the server.",enabled:"Enable Feishu",encryptKey:"Encrypt key",generate:"Generate",keyGenerated:"Key generated — save to apply.",keyEmptyPlaceholder:"Paste or generate a 32-byte base64 key",keyKeepPlaceholder:"Key set (…{last4}). Leave blank to keep it.",keyCopyOnce:"Copy this key somewhere safe — it is shown only once and never again.",forceRotate:"Replace the existing key (existing Feishu bindings will stop working)",baseUrl:"Base URL",statusRunning:"Running",statusStopped:"Stopped",rotateConflict:'That changes the existing key. Enable "replace" to rotate it (existing bindings will break).',loadFailed:"Failed to load Feishu config.",saveFailed:"Save failed."},created:"Created",disabled:"disabled {when}",email:"Email",errors:{actionFailed:"Action failed.",cannotDemoteSelf:"You can't demote yourself.",lastAdmin:"Can't demote the last admin - promote another user first."},id:"ID",invitationsTab:{consumed:"Consumed",count:"Count",createFailed:"Create failed: {code}",copyNow:"Copy this invitation now{note} - it will not be shown again.",empty:"No invitations yet.",expires:"Expires",loadFailed:"Failed to load invitations.",note:"Note",prefix:"Prefix",unused:"unused"},loadUsersFailed:"Failed to load users.",promote:"Promote",promoteConfirm:"Promote this user to admin?",resetPassword:"Reset password",resetPasswordConfirm:"Reset password? A new temporary password is shown once.",secretCopyOnce:"{label} - copy it now, only shown once.",status:"Status",temporaryPasswordFor:"Temporary password for {email}",title:"Admin",userStatus:{active:"active",admin:"admin"},users:"Users",invitations:"Invitations",demote:"Demote",demoteConfirm:"Demote this admin?",disable:"Disable",disableConfirm:"Disable this user? They are signed out and cannot log in."},test:{interpolation:"{count} sessions"},connHealth:{pillLabelConnecting:"connecting…",pillLabelReconnecting:"reconnecting…",pillLabelOff:"off",drawerTitle:"Connection health",drawerRttNow:"RTT (now)",drawerRttP50P95:"p50 / p95 (5 min)",drawerBytesIn:"↓ in",drawerBytesOut:"↑ out",drawerState:"State",drawerReconnectsLastHour:"Reconnects (1 h)",drawerReconnectsTime:"time",drawerReconnectsReason:"reason",drawerReconnectsDowntime:"downtime",drawerSeqGaps:"Seq gaps observed:"}},vv={common:{appName:"AT Term",cancel:"取消",confirm:"确认",copy:"复制",create:"创建",created:"创建于",delete:"删除",english:"英语",language:"语言",loading:"正在加载...",no:"否",optional:"可选",revoke:"撤销",save:"保存",send:"发送",simplifiedChinese:"简体中文",system:"跟随系统",unknown:"未知",version:"版本",versionLabel:"版本 {version}",yes:"是"},topbar:{admin:"管理",home:"首页",main:"会话",primaryNav:"主导航",settings:"设置",signOut:"退出登录"},auth:{alreadyHaveAccount:"已有账号?",createAccount:"创建账号",email:"邮箱",emailPlaceholder:"you@example.com",setup:{title:"首次安装",hint:"还没有管理员。创建第一个管理员账号——请填写你在 ATTERM_BOOTSTRAP_ADMIN_EMAIL 配置的邮箱。",emailPlaceholder:"你配置的 ATTERM_BOOTSTRAP_ADMIN_EMAIL",confirmPassword:"确认密码",createAdmin:"创建管理员",passwordMismatch:"两次输入的密码不一致。",notAdmin:"账号已创建,但不是管理员——请确认邮箱与 ATTERM_BOOTSTRAP_ADMIN_EMAIL 一致。",failed:"初始化失败,请重试。"},errors:{emailTaken:"该邮箱已注册。",invalidCredentials:"邮箱或密码不正确。",invalidEmail:"请输入有效邮箱。",invalidRequest:"请检查输入。",inviteInvalid:"邀请码无效或已被使用。",passwordWeak:"密码至少需要 12 个字符。",rateLimited:"尝试次数过多,请等待几分钟。",rateLimitedShort:"尝试次数过多,请稍后再试。",signInFailed:"登录失败,请重试。",signUpFailed:"注册失败,请检查邀请码后重试。"},haveInviteCode:"有邀请码?",inviteCode:"邀请码",password:"密码",signIn:"登录",signUp:"注册",signUpHere:"在这里注册"},setup:{allowInsecure:"允许不安全的 HTTP/WS(非 loopback)",connect:"连接",connectToRelay:"连接到 relay",disconnect:"断开连接",errors:{cannotReachRelay:"无法连接 relay:{message}",invalidRelayUrl:"relay 地址无效或格式错误",originRejected:"relay 拒绝了该 Origin。请确认启动 relay 时 ATTERM_ORIGINS 包含 capacitor://localhost。",relayHttp:"relay 返回 HTTP {status}。",relayHttpCheckUrl:"relay 返回 HTTP {status}。请检查地址后重试。",relayUrlMustBeHttp:"relay 地址必须以 http:// 或 https:// 开头",relayUrlNoPath:"relay 地址不能包含 path、query 或 fragment",relayUrlRequired:"relay 地址必填",tokenInvalid:"API token 无效。请在 relay Web UI 的设置 -> API Tokens 中生成新 token。",tokenInvalidSettings:"API token 无效。请在 relay Web UI 的设置 -> API Tokens 中生成新 token。",tokenRequired:"API token 必填",useInsecureForHttp:"如需对非 loopback 主机使用 http://,请启用“允许不安全的 HTTP/WS”"},reasonTokenInvalid:"你的 API token 已失效。请粘贴新的 token 重新登录。",title:"设置 relay",relayUrl:"Relay 地址",relayUrlPlaceholder:"https://relay.example.com",token:"API token",tokenPlaceholder:"atk_...",saved:"已保存。"},main:{activeSessions:"活动会话",back:"返回",backToSessions:"返回会话列表",empty:"没有在线会话。请从桌面 app 或",errors:{loadSessions:"加载会话失败。"},install:{dismiss:"关闭安装提示",text:"在 iPhone 上,用 HTTPS 打开本站,然后点分享 -> 添加到主屏幕。",title:"安装 AT Term"},reconnect:"重新连接",refresh:"刷新",sessionCount:"{count} 个会话",sessionCountOne:"{count} 个会话",title:"远程会话",unknownCommand:"(未知)",unknownHost:"未知主机",unlock:{action:"重新登录",text:"此浏览器仍处于登录状态,但内存中的加密密钥已锁定。重新登录后才能解密会话名称、命令和路径。",title:"解锁加密会话信息"},viewOnlyNotice:"此设备只能查看该会话。你可以查看输出,但不能输入。",taskTypes:{ai:"AI",test:"测试",build:"构建",deploy:"部署"}},terminal:{cannotReachRelay:"无法连接 relay。",connecting:"正在连接...",disconnected:"连接已断开",ended:"会话已结束(退出码 {code})",loadingHistory:"正在加载历史... {percent}%",paste:"粘贴",pickImage:"选择图片",pickFile:"选择文件",remoteControl:"远端已接管控制",statuses:{attached:"已连接",connecting:"正在连接",ended:"已结束",lost:"连接丢失",reconnecting:"正在重连"},shortcuts:"终端快捷键",takeControl:"接管控制",tapToChangeConfig:"点击修改配置。",templatePreviewTitle:"发送预览",templatePreviewSend:"发送"},sessions:{attach:"接管",created:"创建时间",host:"主机"},settings:{changePassword:{current:"当前密码",currentWrong:"当前密码不正确。",failed:"修改密码失败,请重试。",invalidRequest:"请检查输入。",new:"新密码(至少 12 个字符)",passwordWeak:"新密码至少需要 12 个字符。",update:"更新密码"},danger:{confirmDelete:"永久删除此账号?此操作无法撤销。",currentPassword:"当前密码",deleteAccount:"删除我的账号",description:"永久删除此账号。此操作无法撤销。Web 会话和账号数据都会被删除。已使用的邀请码会保留(其”使用者”字段会被清空)。",emailMismatch:"邮箱不匹配,请输入完整且准确的邮箱。",failed:"删除失败,请重试。",invalidRequest:"请检查输入。",lastAdmin:"你是最后一个管理员,请先提升其他用户。",passwordIncorrect:"密码不正确。",typeEmail:"输入完整邮箱确认"},language:"语言",languageHint:"选择此浏览器使用的语言。",notifications:"通知",notificationsTab:{browserPermission:"浏览器权限",disabled:"通知已关闭。",disableFailed:"关闭失败:{message}",disableNotifications:"关闭通知",enableNotifications:"开启通知",enabled:"通知已开启。",errors:{denied:"权限被拒绝。请在浏览器设置中允许通知后重试。",disabled:"此 relay 已禁用 Web Push。",keyFailed:"无法从 relay 获取 VAPID key。",subscribeFailed:"浏览器拒绝创建订阅。",subscribeRejected:"relay 拒绝了订阅。",fallback:"开启失败。"},sendTest:"发送测试通知",permissions:{default:"询问",granted:"已允许",denied:"已拒绝"},status:"浏览器权限:{permission} - 已订阅:{subscribed}",subscribed:"已订阅",testFailed:"测试通知发送失败。",testFailedWithCode:"测试通知发送失败({code})。",testSent:"测试通知已发送到 {count} 个订阅。",unsupported:"此浏览器不支持 service worker,无法使用推送通知。"},relay:"Relay",sessionsTab:{currentDevice:"此设备",empty:"没有活动会话。",hint:"每一行都是此账号已登录的浏览器或 PWA。",ipUnknown:"IP 未知",loadFailed:"加载会话失败。",revokeConfirm:"撤销此设备?该设备需要重新登录。",revokeFailed:"撤销失败。",signedIn:"登录于",signOutOthers:"退出除本设备外的所有设备",signOutOthersConfirm:"退出所有其他设备?它们都需要重新登录。",signOutOthersFailed:"退出其他设备失败。",signOutOthersSuccess:"已退出 {count} 个其他设备。",unknownDevice:"未知设备"},tabs:{changePassword:"修改密码",danger:"危险区",notifications:"通知",relay:"Relay",sessions:"已登录设备"},title:"设置"},admin:{actions:"操作",config:{effective:"实际:{value}",effectiveDisabled:"实际:已禁用",hint:"0 表示使用内建默认值;负数表示完全禁用限制。修改会立即生效,并持久化到管理配置文件。",loadFailed:"加载配置失败。",maxConnections:"最大 WS 连接数(每 IP+token)",rateLimit:"速率限制(每 IP+token 每分钟请求数)",saveFailed:"保存失败。",runtimeLimits:"运行时限制",debug:"详细日志",debugHint:"记录 relay 帧。立即生效,无需重启。",debugPayload:"记录 payload 字节",debugPayloadWarn:"会记录终端输入/输出,属敏感信息,仅排查问题时临时开启。",allowedOrigins:"允许的 Origin",allowedOriginsHint:'一行一个。手机 Capacitor 客户端必须包含 "capacitor://localhost"。留空 = 允许任意 origin(仅供开发)。',allowedOriginsPlaceholder:`https://relay.example.com +capacitor://localhost`},configTab:"配置",feishuTab:"飞书",feishuConfig:{title:"飞书集成",description:"为本 relay 启用飞书机器人桥接。加密密钥用于保护服务器上保存的飞书应用凭据。",enabled:"启用飞书",encryptKey:"加密密钥",generate:"生成",keyGenerated:"已生成密钥,保存后生效。",keyEmptyPlaceholder:"粘贴或生成一个 32 字节 base64 密钥",keyKeepPlaceholder:"已设置密钥(…{last4})。留空则保持不变。",keyCopyOnce:"请妥善复制保存此密钥——它只显示这一次,之后不再展示。",forceRotate:"替换现有密钥(现有飞书绑定将失效)",baseUrl:"Base URL",statusRunning:"运行中",statusStopped:"已停止",rotateConflict:"这会更改现有密钥。需勾选「替换」才能轮换(现有绑定会失效)。",loadFailed:"加载飞书配置失败。",saveFailed:"保存失败。"},created:"创建时间",disabled:"已禁用 {when}",email:"邮箱",errors:{actionFailed:"操作失败。",cannotDemoteSelf:"不能降级你自己。",lastAdmin:"不能降级最后一个管理员,请先提升其他用户。"},id:"ID",invitationsTab:{consumed:"已使用",count:"数量",createFailed:"创建失败:{code}",copyNow:"请立即复制此邀请{note},此后不会再次显示。",empty:"还没有邀请。",expires:"过期时间",loadFailed:"加载邀请失败。",note:"备注",prefix:"前缀",unused:"未使用"},loadUsersFailed:"加载用户失败。",promote:"提升",promoteConfirm:"将此用户提升为管理员?",resetPassword:"重置密码",resetPasswordConfirm:"重置密码?新的临时密码只会显示一次。",secretCopyOnce:"{label} - 请立即复制,仅显示一次。",status:"状态",temporaryPasswordFor:"{email} 的临时密码",title:"管理",userStatus:{active:"活跃",admin:"管理员"},users:"用户",invitations:"邀请",demote:"降级",demoteConfirm:"降级此管理员?",disable:"禁用",disableConfirm:"禁用此用户?该用户将被登出且无法登录。"},test:{interpolation:"{count} 个会话"},connHealth:{pillLabelConnecting:"连接中…",pillLabelReconnecting:"重连中…",pillLabelOff:"已关闭",drawerTitle:"连接质量",drawerRttNow:"RTT(当前)",drawerRttP50P95:"p50 / p95(最近 5 分钟)",drawerBytesIn:"↓ 接收",drawerBytesOut:"↑ 发送",drawerState:"状态",drawerReconnectsLastHour:"最近 1 小时重连",drawerReconnectsTime:"时间",drawerReconnectsReason:"原因",drawerReconnectsDowntime:"断开时长",drawerSeqGaps:"观察到的序号跳跃:"}},Zc="atterm.locale",Ka={en:xv,"zh-CN":vv},pn=Be("system"),cr=Be("en"),yv=de(()=>[{label:To("common.system"),value:"system"},{label:To("common.english"),value:"en"},{label:To("common.simplifiedChinese"),value:"zh-CN"}]);let Qc=Ri,Et;function vy(e={}){Et==null||Et(),Et=void 0,Qc=e.getLanguages??Ri;const o=Pv();pn.value=o,ni(),Et=(e.listenLanguageChange??Mv)(()=>{ni()})}function Sv(e){pn.value=e,ni();try{window.localStorage.setItem(Zc,e)}catch{}try{window.localStorage.setItem("atterm.locale_preference.value",JSON.stringify(e))}catch{}Cv(async()=>{const{notifyLocalChange:o}=await import("./prefsSync-BGOlzhJD.js");return{notifyLocalChange:o}},__vite__mapDeps([0,1])).then(({notifyLocalChange:o})=>{o("locale_preference")}).catch(()=>{})}function wv(e,o=Ri()){if(e==="en"||e==="zh-CN")return e;for(const t of o){const r=t.trim().toLowerCase();if(r!==""){if(r==="zh"||r.startsWith("zh-"))return"zh-CN";if(r==="en"||r.startsWith("en-"))return"en"}}return"en"}function To(e,o={}){const t=Ya(Ka[cr.value],e)??Ya(Ka.en,e)??e;return Hv(t,o)}function yy(e){return Fv(e,{dateStyle:"medium",timeStyle:"short"})}function Pv(){try{const e=window.localStorage.getItem(Zc);return Tv(e)?e:"system"}catch{return"system"}}function Tv(e){return e==="system"||e==="en"||e==="zh-CN"}function ni(){$v(wv(pn.value,Qc()))}function $v(e){cr.value=e,Iv(e)}function Iv(e){typeof document>"u"||(document.documentElement.lang=e)}function Ya(e,o){let t=e;for(const r of o.split(".")){if(!Av(t))return;t=t[r]}return typeof t=="string"?t:void 0}function Hv(e,o){return e.replace(/\{([^{}]+)\}/g,(t,r)=>{const n=o[r];return n===void 0?t:String(n)})}function Fv(e,o){if(e===void 0||e==="")return"";try{return new Intl.DateTimeFormat(cr.value,o).format(new Date(e))}catch{return typeof e=="string"?e:""}}function Av(e){return typeof e=="object"&&e!==null}function Ri(){return typeof navigator>"u"?[]:navigator.languages.length>0?navigator.languages:navigator.language?[navigator.language]:[]}function Mv(e){return typeof window>"u"?()=>{}:(window.addEventListener("languagechange",e),()=>window.removeEventListener("languagechange",e))}const Li="atterm.relay";let vr=null;function Dv(){if(vr!==null)return vr;const e=globalThis.Capacitor;return vr=!!(e&&typeof e.isNativePlatform=="function"&&e.isNativePlatform()),vr}function _v(){if(typeof localStorage>"u")return null;const e=localStorage.getItem(Li);if(!e)return null;try{const o=JSON.parse(e);return typeof o!="object"||o===null?null:{baseURL:o.baseURL??o.base??"",sessionToken:o.sessionToken??o.token??null,expiresAt:o.expiresAt??null,allowInsecure:o.allowInsecure??o.allow_insecure??!1,...o.realmId!==void 0?{realmId:o.realmId}:{},...o.homeInstanceURL!==void 0?{homeInstanceURL:o.homeInstanceURL}:{}}}catch{return null}}function Sy(e){typeof localStorage>"u"||localStorage.setItem(Li,JSON.stringify(e))}function wy(){typeof localStorage>"u"||localStorage.removeItem(Li)}function Py(e,o){const t=e.trim();if(!t)return To("setup.errors.relayUrlRequired");let r;try{r=new URL(t)}catch{return To("setup.errors.invalidRelayUrl")}return r.protocol!=="http:"&&r.protocol!=="https:"?To("setup.errors.relayUrlMustBeHttp"):r.pathname!=="/"||r.search!==""||r.hash!==""?To("setup.errors.relayUrlNoPath"):r.protocol==="http:"&&!Ev(r.hostname)&&!o?To("setup.errors.useInsecureForHttp"):null}function Ev(e){const o=e.toLowerCase();return!!(o==="localhost"||o==="127.0.0.1"||o==="::1"||o.startsWith("127.")||o.startsWith("[")&&o.endsWith("]")&&o.slice(1,-1)==="::1")}function Ty(){return{t:To,languageOptions:yv,localePreference:pn,resolvedLocale:cr,setLocalePreference:Sv}}const $y=(e,o)=>{const t=e.__vccOpts||e;for(const[r,n]of o)t[r]=n;return t},Iy=de(()=>cr.value==="zh-CN"?{locale:Sp,dateLocale:Lh}:{locale:yp,dateLocale:Rh});function Hy(e){return Dv()?_v()!==null?e==="setup"||e==="login"||e==="signup"||e==="firstrun"?(location.replace("/"),!0):!1:e==="setup"?!1:(location.replace("/setup.html"),!0):!1}export{de as $,Jn as A,N0 as B,Me as C,Fs as D,qb as E,Fe as F,ly as G,_ as H,Kb as I,Z0 as J,wy as K,Bo as L,Us as M,Xb as N,Ia as O,$t as P,u0 as Q,XC as R,Tt as S,Yd as T,Ua as U,Lx as V,Jb as W,ay as X,b0 as Y,B as Z,Cv as _,Gf as a,xp as a$,Io as a0,Vv as a1,ls as a2,Vn as a3,Bv as a4,Ov as a5,cp as a6,oy as a7,Z as a8,zv as a9,xy as aA,Ii as aB,z as aC,dy as aD,Br as aE,Rs as aF,vy as aG,Ee as aH,_i as aI,Gv as aJ,qv as aK,pc as aL,p0 as aM,Xn as aN,Or as aO,Fi as aP,nn as aQ,Ws as aR,Ls as aS,ks as aT,Dv as aU,dp as aV,it as aW,wt as aX,Os as aY,$0 as aZ,Hp as a_,Un as aa,iy as ab,_e as ac,er as ad,Cy as ae,cy as af,Rh as ag,uy as ah,Je as ai,Jv as aj,ge as ak,pC as al,gC as am,Mi as an,nh as ao,yp as ap,rr as aq,ln as ar,y0 as as,Fa as at,py as au,yy as av,ss as aw,Ip as ax,Xv as ay,Qv as az,Pt as b,ir as b$,qh as b0,Ns as b1,hy as b2,_v as b3,Ou as b4,EC as b5,Iy as b6,wl as b7,di as b8,ci as b9,Ha as bA,$o as bB,St as bC,Sy as bD,un as bE,cC as bF,Aa as bG,To as bH,gy as bI,by as bJ,gp as bK,wC as bL,Tp as bM,ud as bN,qr as bO,tm as bP,Gg as bQ,mC as bR,Rd as bS,Ti as bT,vp as bU,Ty as bV,Qn as bW,ny as bX,rc as bY,an as bZ,dn as b_,bp as ba,Qd as bb,Zr as bc,Xr as bd,Xd as be,Qr as bf,Bl as bg,Nn as bh,bg as bi,uC as bj,my as bk,It as bl,sC as bm,Kt as bn,Zv as bo,CC as bp,Gr as bq,gi as br,Be as bs,Cp as bt,Lv as bu,kv as bv,ey as bw,ar as bx,ty as by,ry as bz,ic as c,As as c0,jv as c1,Wv as c2,Py as c3,mp as c4,wr as c5,os as c6,qd as c7,Rv as c8,Nv as c9,lc as d,sy as e,ac as f,Ai as g,fy as h,Yb as i,yt as j,on as k,hs as l,bf as m,$y as n,Hy as o,gg as p,Kh as q,Kv as r,Ob as s,nr as t,sr as u,Q as v,to as w,Yv as x,be as y,Se as z}; diff --git a/internal/relay/web-dist/assets/prefsSync-C6s4W7Ql.js b/internal/relay/web-dist/assets/prefsSync-BGOlzhJD.js similarity index 93% rename from internal/relay/web-dist/assets/prefsSync-C6s4W7Ql.js rename to internal/relay/web-dist/assets/prefsSync-BGOlzhJD.js index f27caf03..832269b6 100644 --- a/internal/relay/web-dist/assets/prefsSync-C6s4W7Ql.js +++ b/internal/relay/web-dist/assets/prefsSync-BGOlzhJD.js @@ -1 +1 @@ -import{a as s}from"./client-Bd6vJHn4.js";import"./mobile-guard-CHHXRZ12.js";const c=["locale_preference","quick_templates","notifications_enabled","command_notify_threshold_seconds","shell_integration_enabled"];class u{constructor(a,t){this.adapter=a,this.relay=t}async pull(){const a=await this.relay.get();for(const t of a){const e=this.adapter.readMeta(t.key);if(t.updated_at>e.updatedAtLocal){if(e.dirty)continue;this.adapter.writeValue(t.key,t.value),this.adapter.writeMeta(t.key,{updatedAtLocal:t.updated_at,dirty:!1})}}}markDirty(a,t){this.adapter.writeMeta(a,{updatedAtLocal:t,dirty:!0})}async push(){const a=[];for(const e of this.adapter.keys()){const i=this.adapter.readMeta(e);if(!i.dirty)continue;const o=this.adapter.readValue(e);o!==void 0&&a.push({key:e,value:o,client_updated_at:i.updatedAtLocal})}if(a.length===0)return;const t=await this.relay.put(a);for(const e of t)this.adapter.writeValue(e.key,e.value),this.adapter.writeMeta(e.key,{updatedAtLocal:e.updated_at,dirty:!1})}}function p(){const r=t=>`atterm.${t}.value`,a=t=>`atterm.${t}.meta`;return{readValue(t){const e=localStorage.getItem(r(t));if(e!==null)try{return JSON.parse(e)}catch{return}},writeValue(t,e){localStorage.setItem(r(t),JSON.stringify(e))},readMeta(t){const e=localStorage.getItem(a(t));if(e===null)return{updatedAtLocal:0,dirty:!1};try{const i=JSON.parse(e);return{updatedAtLocal:Number((i==null?void 0:i.updatedAtLocal)??0),dirty:!!(i!=null&&i.dirty)}}catch{return{updatedAtLocal:0,dirty:!1}}},writeMeta(t,e){localStorage.setItem(a(t),JSON.stringify(e))},keys(){return[...c]}}}function y(){return{async get(){const{data:r}=await s("/api/me/preferences");return r.items??[]},async put(r){const{data:a}=await s("/api/me/preferences",{method:"PUT",body:JSON.stringify({items:r})});return a.items??[]}}}let n=null;function f(r){n=r}function h(r){n&&(n.markDirty(r,Date.now()),n.push().catch(()=>{}))}export{u as PrefsSyncEngine,c as SYNCED_KEYS,y as apiRelayClient,p as localStorageAdapter,h as notifyLocalChange,f as setSharedPrefsSync}; +import{a as s}from"./client-BRiQMdFT.js";import"./mobile-guard-BvFpjCXb.js";const c=["locale_preference","quick_templates","notifications_enabled","command_notify_threshold_seconds","shell_integration_enabled"];class u{constructor(a,t){this.adapter=a,this.relay=t}async pull(){const a=await this.relay.get();for(const t of a){const e=this.adapter.readMeta(t.key);if(t.updated_at>e.updatedAtLocal){if(e.dirty)continue;this.adapter.writeValue(t.key,t.value),this.adapter.writeMeta(t.key,{updatedAtLocal:t.updated_at,dirty:!1})}}}markDirty(a,t){this.adapter.writeMeta(a,{updatedAtLocal:t,dirty:!0})}async push(){const a=[];for(const e of this.adapter.keys()){const i=this.adapter.readMeta(e);if(!i.dirty)continue;const o=this.adapter.readValue(e);o!==void 0&&a.push({key:e,value:o,client_updated_at:i.updatedAtLocal})}if(a.length===0)return;const t=await this.relay.put(a);for(const e of t)this.adapter.writeValue(e.key,e.value),this.adapter.writeMeta(e.key,{updatedAtLocal:e.updated_at,dirty:!1})}}function p(){const r=t=>`atterm.${t}.value`,a=t=>`atterm.${t}.meta`;return{readValue(t){const e=localStorage.getItem(r(t));if(e!==null)try{return JSON.parse(e)}catch{return}},writeValue(t,e){localStorage.setItem(r(t),JSON.stringify(e))},readMeta(t){const e=localStorage.getItem(a(t));if(e===null)return{updatedAtLocal:0,dirty:!1};try{const i=JSON.parse(e);return{updatedAtLocal:Number((i==null?void 0:i.updatedAtLocal)??0),dirty:!!(i!=null&&i.dirty)}}catch{return{updatedAtLocal:0,dirty:!1}}},writeMeta(t,e){localStorage.setItem(a(t),JSON.stringify(e))},keys(){return[...c]}}}function y(){return{async get(){const{data:r}=await s("/api/me/preferences");return r.items??[]},async put(r){const{data:a}=await s("/api/me/preferences",{method:"PUT",body:JSON.stringify({items:r})});return a.items??[]}}}let n=null;function f(r){n=r}function h(r){n&&(n.markDirty(r,Date.now()),n.push().catch(()=>{}))}export{u as PrefsSyncEngine,c as SYNCED_KEYS,y as apiRelayClient,p as localStorageAdapter,h as notifyLocalChange,f as setSharedPrefsSync}; diff --git a/internal/relay/web-dist/assets/pwa-DV81pmUS.js b/internal/relay/web-dist/assets/pwa-BRtGQKIK.js similarity index 99% rename from internal/relay/web-dist/assets/pwa-DV81pmUS.js rename to internal/relay/web-dist/assets/pwa-BRtGQKIK.js index 5fe43b7d..9138e2a7 100644 --- a/internal/relay/web-dist/assets/pwa-DV81pmUS.js +++ b/internal/relay/web-dist/assets/pwa-BRtGQKIK.js @@ -1 +1 @@ -var ke=Object.defineProperty;var Ce=(e,t,n)=>t in e?ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var m=(e,t,n)=>Ce(e,typeof t!="symbol"?t+"":t,n);import{a as kt,A as Re}from"./client-Bd6vJHn4.js";import{_ as Xt,b3 as Me,bD as De,K as Pe,bH as Fe}from"./mobile-guard-CHHXRZ12.js";const vt=BigInt(2**32-1),ne=BigInt(32);function $e(e,t=!1){return t?{h:Number(e&vt),l:Number(e>>ne&vt)}:{h:Number(e>>ne&vt)|0,l:Number(e&vt)|0}}const It=(e,t,n)=>e>>>n|t<<32-n,St=(e,t,n)=>e<<32-n|t>>>n,ue=(e,t,n)=>e<<64-n|t>>>n-32,de=(e,t,n)=>e>>>n-32|t<<64-n,pe=(e,t)=>t,ye=(e,t)=>e;function ge(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:o|0}}const qt=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Jt=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;function Ne(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function ct(e,t=""){if(typeof e!="number"){const n=t&&`"${t}" `;throw new TypeError(`${n}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){const n=t&&`"${t}" `;throw new RangeError(`${n}expected integer >= 0, got ${e}`)}}function X(e,t,n=""){const r=Ne(e),o=e==null?void 0:e.length,s=t!==void 0;if(!r||s&&o!==t){const f=n&&`"${n}" `,i=s?` of length ${t}`:"",c=r?`length=${o}`:`type=${typeof e}`,h=f+"expected Uint8Array"+i+", got "+c;throw r?new RangeError(h):new TypeError(h)}return e}function Zt(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("Hash must wrapped by utils.createHasher");if(ct(e.outputLen),ct(e.blockLen),e.outputLen<1)throw new Error('"outputLen" must be >= 1');if(e.blockLen<1)throw new Error('"blockLen" must be >= 1')}function gt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Qt(e,t){X(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length='+n)}function Ot(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function wt(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function z(...e){for(let t=0;t>>t}const we=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function be(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const W=we?e=>e:e=>be(e)>>>0;function je(e){for(let t=0;te:je;function Lt(e){if(typeof e!="string")throw new TypeError("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Kt(e,t=""){return typeof e=="string"?Lt(e):X(e,void 0,t)}function xe(e,t={}){const n=(o,s)=>e(s).update(o).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=o=>e(o),Object.assign(n,t),Object.freeze(n)}function re(e=32){ct(e,"bytesLength");const t=typeof globalThis=="object"?globalThis.crypto:null;if(typeof(t==null?void 0:t.getRandomValues)!="function")throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}const Ke=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])}),Ve=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]);function Ye(e,t,n){return e&t^~e&n}function Ge(e,t,n){return e&t^e&n^t&n}class We{constructor(t,n,r,o){m(this,"blockLen");m(this,"outputLen");m(this,"canXOF",!1);m(this,"padOffset");m(this,"isLE");m(this,"buffer");m(this,"view");m(this,"finished",!1);m(this,"length",0);m(this,"pos",0);m(this,"destroyed",!1);this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Pt(this.buffer)}update(t){gt(this),X(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let f=0;fo-f&&(this.process(r,0),f=0);for(let l=f;la.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;ln)throw new Error("outputLen bigger than keyLen");const{key:s,salt:f,personalization:i}=t;if(s!==void 0&&(s.length<1||s.length>n))throw new Error('"key" expected to be undefined or of length=1..'+n);f!==void 0&&X(f,r,"salt"),i!==void 0&&X(i,o,"personalization")}class Xe{constructor(t,n){m(this,"buffer");m(this,"buffer32");m(this,"finished",!1);m(this,"destroyed",!1);m(this,"length",0);m(this,"pos",0);m(this,"blockLen");m(this,"outputLen");m(this,"canXOF",!1);ct(t),ct(n),this.blockLen=t,this.outputLen=n,this.buffer=new Uint8Array(t),this.buffer32=wt(this.buffer)}update(t){gt(this),X(t);const{blockLen:n,buffer:r,buffer32:o}=this,s=t.length,f=t.byteOffset,i=t.buffer;for(let c=0;c>>8*a}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){const{buffer:n,length:r,finished:o,destroyed:s,outputLen:f,pos:i}=this;return t||(t=new this.constructor({dkLen:f})),t.set(...this.get()),t.buffer.set(n),t.destroyed=s,t.finished=o,t.length=r,t.pos=i,t.outputLen=f,t}clone(){return this._cloneInto()}}class qe extends Xe{constructor(n={}){const r=n.dkLen===void 0?64:n.dkLen;super(128,r);m(this,"v0l",K[0]|0);m(this,"v0h",K[1]|0);m(this,"v1l",K[2]|0);m(this,"v1h",K[3]|0);m(this,"v2l",K[4]|0);m(this,"v2h",K[5]|0);m(this,"v3l",K[6]|0);m(this,"v3h",K[7]|0);m(this,"v4l",K[8]|0);m(this,"v4h",K[9]|0);m(this,"v5l",K[10]|0);m(this,"v5h",K[11]|0);m(this,"v6l",K[12]|0);m(this,"v6h",K[13]|0);m(this,"v7l",K[14]|0);m(this,"v7h",K[15]|0);ze(r,n,64,16,16);let{key:o,personalization:s,salt:f}=n,i=0;if(o!==void 0&&(X(o,void 0,"key"),i=o.length),this.v0l^=this.outputLen|i<<8|65536|1<<24,f!==void 0){X(f,void 0,"salt");const c=wt(f);this.v4l^=W(c[0]),this.v4h^=W(c[1]),this.v5l^=W(c[2]),this.v5h^=W(c[3])}if(s!==void 0){X(s,void 0,"personalization");const c=wt(s);this.v6l^=W(c[0]),this.v6h^=W(c[1]),this.v7l^=W(c[2]),this.v7h^=W(c[3])}if(o!==void 0){const c=new Uint8Array(this.blockLen);c.set(o),this.update(c)}}get(){let{v0l:n,v0h:r,v1l:o,v1h:s,v2l:f,v2h:i,v3l:c,v3h:h,v4l:a,v4h:l,v5l:y,v5h:g,v6l:u,v6h:d,v7l:b,v7h:x}=this;return[n,r,o,s,f,i,c,h,a,l,y,g,u,d,b,x]}set(n,r,o,s,f,i,c,h,a,l,y,g,u,d,b,x){this.v0l=n|0,this.v0h=r|0,this.v1l=o|0,this.v1h=s|0,this.v2l=f|0,this.v2h=i|0,this.v3l=c|0,this.v3h=h|0,this.v4l=a|0,this.v4h=l|0,this.v5l=y|0,this.v5h=g|0,this.v6l=u|0,this.v6h=d|0,this.v7l=b|0,this.v7h=x|0}compress(n,r,o){this.get().forEach((h,a)=>p[a]=h),p.set(K,16);let{h:s,l:f}=$e(BigInt(this.length));p[24]=K[8]^f,p[25]=K[9]^s,o&&(p[28]=~p[28],p[29]=~p[29]);let i=0;const c=Ve;for(let h=0;h<12;h++)et(0,4,8,12,n,r+2*c[i++]),nt(0,4,8,12,n,r+2*c[i++]),et(1,5,9,13,n,r+2*c[i++]),nt(1,5,9,13,n,r+2*c[i++]),et(2,6,10,14,n,r+2*c[i++]),nt(2,6,10,14,n,r+2*c[i++]),et(3,7,11,15,n,r+2*c[i++]),nt(3,7,11,15,n,r+2*c[i++]),et(0,5,10,15,n,r+2*c[i++]),nt(0,5,10,15,n,r+2*c[i++]),et(1,6,11,12,n,r+2*c[i++]),nt(1,6,11,12,n,r+2*c[i++]),et(2,7,8,13,n,r+2*c[i++]),nt(2,7,8,13,n,r+2*c[i++]),et(3,4,9,14,n,r+2*c[i++]),nt(3,4,9,14,n,r+2*c[i++]);this.v0l^=p[0]^p[16],this.v0h^=p[1]^p[17],this.v1l^=p[2]^p[18],this.v1h^=p[3]^p[19],this.v2l^=p[4]^p[20],this.v2h^=p[5]^p[21],this.v3l^=p[6]^p[22],this.v3h^=p[7]^p[23],this.v4l^=p[8]^p[24],this.v4h^=p[9]^p[25],this.v5l^=p[10]^p[26],this.v5h^=p[11]^p[27],this.v6l^=p[12]^p[28],this.v6h^=p[13]^p[29],this.v7l^=p[14]^p[30],this.v7h^=p[15]^p[31],z(p)}destroy(){this.destroyed=!0,z(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const xt=xe(e=>new qe(e)),me={Argond2d:0,Argon2i:1,Argon2id:2},mt=4,se=(e,t="")=>e===void 0?Uint8Array.of():Kt(e,t);function Vt(e,t){const n=e&65535,r=e>>>16,o=t&65535,s=t>>>16,f=Math.imul(n,o),i=Math.imul(r,o),c=Math.imul(n,s),h=Math.imul(r,s),a=(f>>>16)+(i&65535)+c,l=h+(i>>>16)+(a>>>16)|0,y=a<<16|f&65535;return{h:l,l:y}}function Je(e,t){const{h:n,l:r}=Vt(e,t);return{h:(n<<1|r>>>31)&4294967295,l:r<<1&4294967295}}function Ut(e,t,n,r){const{h:o,l:s}=Je(t,r),f=qt(t,r,s);return{h:Jt(f,e,n,o),l:f|0}}const j=new Uint32Array(256);function rt(e,t,n,r){let o=j[2*e],s=j[2*e+1],f=j[2*t],i=j[2*t+1],c=j[2*n],h=j[2*n+1],a=j[2*r],l=j[2*r+1];({h:s,l:o}=Ut(s,o,i,f)),{Dh:l,Dl:a}={Dh:l^s,Dl:a^o},{Dh:l,Dl:a}={Dh:pe(l,a),Dl:ye(l)},{h,l:c}=Ut(h,c,l,a),{Bh:i,Bl:f}={Bh:i^h,Bl:f^c},{Bh:i,Bl:f}={Bh:It(i,f,24),Bl:St(i,f,24)},{h:s,l:o}=Ut(s,o,i,f),{Dh:l,Dl:a}={Dh:l^s,Dl:a^o},{Dh:l,Dl:a}={Dh:It(l,a,16),Dl:St(l,a,16)},{h,l:c}=Ut(h,c,l,a),{Bh:i,Bl:f}={Bh:i^h,Bl:f^c},{Bh:i,Bl:f}={Bh:ue(i,f,63),Bl:de(i,f,63)},j[2*e]=o,j[2*e+1]=s,j[2*t]=f,j[2*t+1]=i,j[2*n]=c,j[2*n+1]=h,j[2*r]=a,j[2*r+1]=l}function oe(e,t,n,r,o,s,f,i,c,h,a,l,y,g,u,d){rt(e,o,c,y),rt(t,s,h,g),rt(n,f,a,u),rt(r,i,l,d),rt(e,s,a,d),rt(t,f,l,y),rt(n,i,c,g),rt(r,o,h,u)}function Et(e,t,n,r,o){for(let s=0;s<256;s++)j[s]=e[t+s]^e[n+s];for(let s=0;s<128;s+=16)oe(s,s+1,s+2,s+3,s+4,s+5,s+6,s+7,s+8,s+9,s+10,s+11,s+12,s+13,s+14,s+15);for(let s=0;s<16;s+=2)oe(s,s+1,s+16,s+17,s+32,s+33,s+48,s+49,s+64,s+65,s+80,s+81,s+96,s+97,s+112,s+113);if(o)for(let s=0;s<256;s++)e[r+s]^=j[s]^e[t+s]^e[n+s];else for(let s=0;s<256;s++)e[r+s]=j[s]^e[t+s]^e[n+s];z(j)}function Yt(e,t){const n=Ot(e),r=new Uint32Array(1),o=Ot(r);if(r[0]=W(t),t<=64)return xt.create({dkLen:t}).update(o).update(n).digest();const s=new Uint8Array(t);let f=xt.create({}).update(o).update(n).digest(),i=0;for(s.set(f.subarray(0,32)),i+=32;t-i>64;i+=32){const c=xt.create({}).update(f);c.digestInto(f),c.destroy(),s.set(f.subarray(0,32),i)}return s.set(xt(f,{dkLen:t-i}),i),z(f,r),s}function Ze(e,t,n,r,o,s,f=!1){let i;e===0?t===0?i=o-1:f?i=t*r+o-1:i=t*r+(o==0?-1:0):f?i=n-r+o-1:i=n-r+(o==0?-1:0);const c=e!==0&&t!==mt-1?(t+1)*r:0,h=i-1-Vt(i,Vt(s,s).h).h;return(c+h)%n}const Ee=Math.pow(2,32);function ot(e){return Number.isSafeInteger(e)&&e>=0&&e=Math.pow(2,24))throw new Error('"p" must be 1..2^24');if(!ot(o))throw new Error('"m" must be 0..2^32');if(!ot(s)||s<1)throw new Error('"t" (iterations) must be 1..2^32');if(i!==void 0&&typeof i!="function")throw new Error('"progressCb" must be a function');if(ct(c,"asyncTick"),!ot(o)||o<8*r)throw new Error('"m" (memory) must be at least 8*p bytes');if(f!==16&&f!==19)throw new Error('"version" must be 0x10 or 0x13, got '+f);return t}function tn(e,t,n,r){if(e=Kt(e,"password"),t=Kt(t,"salt"),!ot(e.length))throw new Error('"password" must be less of length 1..4Gb');if(!ot(t.length)||t.length<8)throw new Error('"salt" must be of length 8..4Gb');if(!Object.values(me).includes(n))throw new Error('"type" was invalid');let{p:o,dkLen:s,m:f,t:i,version:c,key:h,personalization:a,maxmem:l,onProgress:y,asyncTick:g}=Qe(r);h=se(h,"key"),a=se(a,"personalization");const u=xt.create(),d=new Uint32Array(1),b=Ot(d);for(let _ of[o,s,f,i,c,n])d[0]=W(_),u.update(b);for(let _ of[e,t,h,a])d[0]=W(_.length),u.update(b).update(_);const x=new Uint32Array(18),A=Ot(x);u.digestInto(A);const L=o,B=4*o*Math.floor(f/(mt*o)),D=Math.floor(B/o),P=Math.floor(D/mt),S=B*1024;if(!ot(l))throw new Error('"maxmem" expected <2**32, got '+l);if(S>l)throw new Error('"maxmem" limit was hit: memUsed(mP*1024)='+S+", maxmem="+l);const N=new Uint32Array(S/4);for(let _=0;_{};if(y){const _=i*mt*o*P-2*o,v=Math.max(Math.floor(_/1e4),1);let U=0;I=()=>{U++,y&&(!(U%v)||U===_)&&y(U/_)}}return z(d,x),{type:n,mP:B,p:o,t:i,version:c,B:N,laneLen:D,lanes:L,segmentLen:P,dkLen:s,perBlock:I,asyncTick:g}}function en(e,t,n,r){const o=new Uint32Array(256);for(let f=0;frn(me.Argon2id,e,t,n);/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function on(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function Gt(e){if(typeof e!="boolean")throw new TypeError(`boolean expected, not ${e}`)}function At(e){if(typeof e!="number")throw new TypeError("number expected, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError("positive integer expected, got "+e)}function G(e,t,n=""){const r=on(e),o=e==null?void 0:e.length,s=t!==void 0;if(!r||s&&o!==t){const f=n&&`"${n}" `,i=s?` of length ${t}`:"",c=r?`length=${o}`:`type=${typeof e}`,h=f+"expected Uint8Array"+i+", got "+c;throw r?new RangeError(h):new TypeError(h)}return e}function ie(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function fn(e,t,n=!1){G(e,void 0,"output");const r=t.outputLen;if(e.lengthe<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,Y=at?e=>e:e=>Ae(e)>>>0,an=e=>{for(let t=0;te:an;function ln(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function hn(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r[],s=(i,c)=>r(c,...o(i)).update(i).digest(),f=r(new Uint8Array(e),...o(new Uint8Array(0)));return s.outputLen=f.outputLen,s.blockLen=f.blockLen,s.create=(i,...c)=>r(i,...c),s}const dn=(e,t)=>{function n(r,...o){if(G(r,void 0,"key"),e.nonceLength!==void 0){const a=o[0];G(a,e.varSizeNonce?void 0:e.nonceLength,"nonce")}const s=e.tagLength;s&&o[1]!==void 0&&G(o[1],void 0,"AAD");const f=t(r,...o),i=(a,l)=>{if(l!==void 0){if(a!==2)throw new Error("cipher output not supported");G(l,void 0,"output")}};let c=!1;return{encrypt(a,l){if(c)throw new Error("cannot encrypt() twice with same key + nonce");return c=!0,G(a),i(f.encrypt.length,l),f.encrypt(a,l)},decrypt(a,l){if(G(a),s&&a.lengthUint8Array.from(e.split(""),t=>t.charCodeAt(0)),yn=it(Q(_e("expand 16-byte k"))),gn=it(Q(_e("expand 32-byte k")));function w(e,t){return e<>>32-t}const bt=64,wn=16,zt=2**32-1,fe=Uint32Array.of();function bn(e,t,n,r,o,s,f,i){const c=o.length,h=new Uint8Array(bt),a=Q(h),l=at&&_t(o)&&_t(s),y=l?Q(o):fe,g=l?Q(s):fe;if(!at){for(let u=0;u=zt)throw new Error("arx: counter overflow");const d=Math.min(bt,c-u);for(let b=0,x;b=zt)throw new Error("arx: counter overflow");const d=Math.min(bt,c-u);if(l&&d===bt){const b=u/4;if(u%4!==0)throw new Error("arx: invalid block position");for(let x=0,A;x{G(i,void 0,"key"),G(c,void 0,"nonce"),G(h,void 0,"data");const y=h.length;if(a=Wt(y,a,!1),At(l),l<0||l>=zt)throw new Error("arx: counter overflow");const g=[];let u=i.length,d,b;if(u===32)g.push(d=Tt(i)),b=gn;else if(u===16&&n)d=new Uint8Array(32),d.set(i),d.set(i,16),b=yn,g.push(d);else throw G(i,32,"arx key"),new Error("invalid key size");(!at||!_t(c))&&g.push(c=Tt(c));let x=Q(d);if(r){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");const B=c.subarray(0,16);if(at)r(b,x,Q(B),x);else{const D=it(Uint32Array.from(b));r(D,x,Q(B),x),ft(D),it(x)}c=c.subarray(16)}else at||it(x);const A=16-o;if(A!==c.length)throw new Error(`arx: nonce must be ${A} or 16 bytes`);if(A!==12){const B=new Uint8Array(12);B.set(c,s?0:12-c.length),c=B,g.push(c)}const L=it(Q(c));try{return bn(e,b,x,L,h,a,l,f),a}finally{ft(...g)}}}function V(e,t){return e[t++]&255|(e[t++]&255)<<8}class mn{constructor(t){m(this,"blockLen",16);m(this,"outputLen",16);m(this,"buffer",new Uint8Array(16));m(this,"r",new Uint16Array(10));m(this,"h",new Uint16Array(10));m(this,"pad",new Uint16Array(8));m(this,"pos",0);m(this,"finished",!1);m(this,"destroyed",!1);t=Tt(G(t,32,"key"));const n=V(t,0),r=V(t,2),o=V(t,4),s=V(t,6),f=V(t,8),i=V(t,10),c=V(t,12),h=V(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|o<<6)&7939,this.r[3]=(o>>>7|s<<9)&8191,this.r[4]=(s>>>4|f<<12)&255,this.r[5]=f>>>1&8190,this.r[6]=(f>>>14|i<<2)&8191,this.r[7]=(i>>>11|c<<5)&8065,this.r[8]=(c>>>8|h<<8)&8191,this.r[9]=h>>>5&127;for(let a=0;a<8;a++)this.pad[a]=V(t,16+2*a)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:f}=this,i=f[0],c=f[1],h=f[2],a=f[3],l=f[4],y=f[5],g=f[6],u=f[7],d=f[8],b=f[9],x=V(t,n+0),A=V(t,n+2),L=V(t,n+4),B=V(t,n+6),D=V(t,n+8),P=V(t,n+10),S=V(t,n+12),N=V(t,n+14);let I=s[0]+(x&8191),_=s[1]+((x>>>13|A<<3)&8191),v=s[2]+((A>>>10|L<<6)&8191),U=s[3]+((L>>>7|B<<9)&8191),O=s[4]+((B>>>4|D<<12)&8191),T=s[5]+(D>>>1&8191),H=s[6]+((D>>>14|P<<2)&8191),k=s[7]+((P>>>11|S<<5)&8191),C=s[8]+((S>>>8|N<<8)&8191),R=s[9]+(N>>>5|o),E=0,F=E+I*i+_*(5*b)+v*(5*d)+U*(5*u)+O*(5*g);E=F>>>13,F&=8191,F+=T*(5*y)+H*(5*l)+k*(5*a)+C*(5*h)+R*(5*c),E+=F>>>13,F&=8191;let $=E+I*c+_*i+v*(5*b)+U*(5*d)+O*(5*u);E=$>>>13,$&=8191,$+=T*(5*g)+H*(5*y)+k*(5*l)+C*(5*a)+R*(5*h),E+=$>>>13,$&=8191;let M=E+I*h+_*c+v*i+U*(5*b)+O*(5*d);E=M>>>13,M&=8191,M+=T*(5*u)+H*(5*g)+k*(5*y)+C*(5*l)+R*(5*a),E+=M>>>13,M&=8191;let J=E+I*a+_*h+v*c+U*i+O*(5*b);E=J>>>13,J&=8191,J+=T*(5*d)+H*(5*u)+k*(5*g)+C*(5*y)+R*(5*l),E+=J>>>13,J&=8191;let lt=E+I*l+_*a+v*h+U*c+O*i;E=lt>>>13,lt&=8191,lt+=T*(5*b)+H*(5*d)+k*(5*u)+C*(5*g)+R*(5*y),E+=lt>>>13,lt&=8191;let ht=E+I*y+_*l+v*a+U*h+O*c;E=ht>>>13,ht&=8191,ht+=T*i+H*(5*b)+k*(5*d)+C*(5*u)+R*(5*g),E+=ht>>>13,ht&=8191;let ut=E+I*g+_*y+v*l+U*a+O*h;E=ut>>>13,ut&=8191,ut+=T*c+H*i+k*(5*b)+C*(5*d)+R*(5*u),E+=ut>>>13,ut&=8191;let dt=E+I*u+_*g+v*y+U*l+O*a;E=dt>>>13,dt&=8191,dt+=T*h+H*c+k*i+C*(5*b)+R*(5*d),E+=dt>>>13,dt&=8191;let pt=E+I*d+_*u+v*g+U*y+O*l;E=pt>>>13,pt&=8191,pt+=T*a+H*h+k*c+C*i+R*(5*b),E+=pt>>>13,pt&=8191;let yt=E+I*b+_*d+v*u+U*g+O*y;E=yt>>>13,yt&=8191,yt+=T*l+H*a+k*h+C*c+R*i,E+=yt>>>13,yt&=8191,E=(E<<2)+E|0,E=E+F|0,F=E&8191,E=E>>>13,$+=E,s[0]=F,s[1]=$,s[2]=M,s[3]=J,s[4]=lt,s[5]=ht,s[6]=ut,s[7]=dt,s[8]=pt,s[9]=yt}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let i=2;i<10;i++)t[i]+=o,o=t[i]>>>13,t[i]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,r[0]=t[0]+5,o=r[0]>>>13,r[0]&=8191;for(let i=1;i<10;i++)r[i]=t[i]+o,o=r[i]>>>13,r[i]&=8191;r[9]-=8192;let s=(o^1)-1;for(let i=0;i<10;i++)r[i]&=s;s=~s;for(let i=0;i<10;i++)t[i]=t[i]&s|r[i];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let f=t[0]+n[0];t[0]=f&65535;for(let i=1;i<8;i++)f=(t[i]+n[i]|0)+(f>>>16)|0,t[i]=f&65535;ft(r)}update(t){ie(this),G(t),t=Tt(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s>>0,t[s++]=r[f]>>>8}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}const En=un(32,e=>new mn(e));function An(e,t,n,r,o,s=20){let f=e[0],i=e[1],c=e[2],h=e[3],a=t[0],l=t[1],y=t[2],g=t[3],u=t[4],d=t[5],b=t[6],x=t[7],A=o,L=n[0],B=n[1],D=n[2],P=f,S=i,N=c,I=h,_=a,v=l,U=y,O=g,T=u,H=d,k=b,C=x,R=A,E=L,F=B,$=D;for(let J=0;J{e.update(t);const n=t.length%16;n&&e.update(vn.subarray(n))},Un=new Uint8Array(32);function ae(e,t,n,r,o){o!==void 0&&G(o,void 0,"AAD");const s=e(t,n,Un),f=pn(r.length,o?o.length:0,!0),i=En.create(s);o&&ce(i,o),ce(i,r),i.update(f);const c=i.digest();return ft(s,f),c}const Bn=e=>(t,n,r)=>({encrypt(s,f){const i=s.length;f=Wt(i+16,f,!1),f.set(s);const c=f.subarray(0,-16);e(t,n,c,c,1);const h=ae(e,t,n,c,r);return f.set(h,i),ft(h),f},decrypt(s,f){f=Wt(s.length-16,f,!1);const i=s.subarray(0,-16),c=s.subarray(-16),h=ae(e,t,n,i,r);if(!hn(c,h))throw ft(h),new Error("invalid tag");return f.set(s.subarray(0,-16)),e(t,n,f,f,1),ft(h),f}}),Ct=dn({blockSize:64,nonceLength:24,tagLength:16},Bn(Ln));class le{constructor(t,n){m(this,"oHash");m(this,"iHash");m(this,"blockLen");m(this,"outputLen");m(this,"canXOF",!1);m(this,"finished",!1);m(this,"destroyed",!1);if(Zt(t),X(n,void 0,"key"),this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,o=new Uint8Array(r);o.set(n.length>r?t.create().update(n).digest():n);for(let s=0;s{const e=(t,n,r)=>new le(t,n).update(r).digest();return e.create=(t,n)=>new le(t,n),e})();function In(e,t,n){return Zt(e),n===void 0&&(n=new Uint8Array(e.outputLen)),Le(e,n,t)}const Ft=Uint8Array.of(0),he=Uint8Array.of();function Sn(e,t,n,r=32){Zt(e),ct(r,"length"),X(t,void 0,"prk");const o=e.outputLen;if(t.length255*o)throw new Error("Length must be <= 255*HashLen");const s=Math.ceil(r/o);n===void 0?n=he:X(n,void 0,"info");const f=new Uint8Array(s*o),i=Le.create(e,t),c=i._cloneInto(),h=new Uint8Array(i.outputLen);for(let a=0;aSn(e,In(e,t,n),r,o),Tn=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),st=new Uint32Array(64);class Hn extends We{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:r,D:o,E:s,F:f,G:i,H:c}=this;return[t,n,r,o,s,f,i,c]}set(t,n,r,o,s,f,i,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=f|0,this.G=i|0,this.H=c|0}process(t,n){for(let l=0;l<16;l++,n+=4)st[l]=t.getUint32(n,!1);for(let l=16;l<64;l++){const y=st[l-15],g=st[l-2],u=q(y,7)^q(y,18)^y>>>3,d=q(g,17)^q(g,19)^g>>>10;st[l]=d+st[l-7]+u+st[l-16]|0}let{A:r,B:o,C:s,D:f,E:i,F:c,G:h,H:a}=this;for(let l=0;l<64;l++){const y=q(i,6)^q(i,11)^q(i,25),g=a+y+Ye(i,c,h)+Tn[l]+st[l]|0,d=(q(r,2)^q(r,13)^q(r,22))+Ge(r,o,s)|0;a=h,h=c,c=i,i=f+g|0,f=s,s=o,o=r,r=g+d|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,f=f+this.D|0,i=i+this.E|0,c=c+this.F|0,h=h+this.G|0,a=a+this.H|0,this.set(r,o,s,f,i,c,h,a)}roundClean(){z(st)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),z(this.buffer)}}class kn extends Hn{constructor(){super(32);m(this,"A",tt[0]|0);m(this,"B",tt[1]|0);m(this,"C",tt[2]|0);m(this,"D",tt[3]|0);m(this,"E",tt[4]|0);m(this,"F",tt[5]|0);m(this,"G",tt[6]|0);m(this,"H",tt[7]|0)}}const Cn=xe(()=>new kn,Ke(1)),ve="atterm-relay",Ue=Lt("atterm-account-key-v1");function Be(){return{alg:"argon2id",m:64*1024,t:3,p:1}}function Ie(e,t,n){return sn(Lt(e),t,{m:n.m,t:n.t,p:n.p,dkLen:32})}function Rn(e,t,n=Be()){if(t.length!==32)throw new Error(`accountKey must be 32 bytes, got ${t.length}`);const r=re(16),o=Ie(e,r,n),s=re(24),i=Ct(o,s,Ue).encrypt(t);return{method:"password",wrapped:$t(i),nonce:$t(s),salt:$t(r),kdf_params:JSON.stringify(n)}}function Mn(e,t){const n=JSON.parse(t.kdf_params);if(n.alg!=="argon2id")throw new Error(`unsupported kdf alg: ${n.alg}`);const r=Nt(t.salt),o=Ie(e,r,n),s=Nt(t.nonce),f=Ct(o,s,Ue);try{return f.decrypt(Nt(t.wrapped))}catch{throw new Error("invalid password")}}function $t(e){return btoa(String.fromCharCode(...e))}function Nt(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.length%4===0?"":"=".repeat(4-t.length%4),r=atob(t+n),o=new Uint8Array(r.length);for(let s=0;s"u")throw new Error("opaque wasm: no DOM to load the Go runtime");const{default:e}=await Xt(async()=>{const{default:t}=await import("./wasm_exec-BVJFcdQq.js");return{default:t}},[]);await new Promise((t,n)=>{const r=document.createElement("script");r.src=e,r.onload=()=>t(),r.onerror=()=>n(new Error("opaque wasm: failed to load wasm_exec.js")),document.head.appendChild(r)})}function Rt(){return Bt||(Bt=(async()=>{await jn();const{default:e}=await Xt(async()=>{const{default:s}=await import("./opaque-CvN23u_6.js");return{default:s}},[]),t=globalThis.Go,n=new t;let r;try{r=await WebAssembly.instantiateStreaming(fetch(e),n.importObject)}catch{const s=await fetch(e);r=await WebAssembly.instantiate(await s.arrayBuffer(),n.importObject)}n.run(r.instance);const o=globalThis.attermOpaque;if(!o)throw new Error("opaque wasm did not initialize");return o})(),Bt)}function Mt(e){if(e&&typeof e=="object"&&"error"in e)throw new Error(e.error);return e}async function Kn(e){return Mt((await Rt()).registerInit(e))}async function Vn(e,t,n,r){return Mt((await Rt()).registerFinish(e,t,n,r))}async function Yn(e){return Mt((await Rt()).loginInit(e))}async function Gn(e,t,n,r){return Mt((await Rt()).loginFinish(e,t,n,r))}const Dt="atterm.account-key";function Wn(e){return btoa(String.fromCharCode(...e))}function zn(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r"u"||sessionStorage.setItem(Dt,Wn(e))}function Xn(){if(typeof sessionStorage>"u")return null;const e=sessionStorage.getItem(Dt);if(!e)return null;try{return zn(e)}catch{return null}}function qn(){typeof sessionStorage>"u"||sessionStorage.removeItem(Dt)}function lr(){return typeof sessionStorage>"u"?!1:sessionStorage.getItem(Dt)!==null}async function hr(){const{data:e}=await kt("/api/bootstrap/status");return e}function He(e,t,n){const r=Me(),o=t??(r==null?void 0:r.realmId),s=n??(r==null?void 0:r.homeInstanceURL);De({baseURL:(r==null?void 0:r.baseURL)??"",allowInsecure:(r==null?void 0:r.allowInsecure)??!1,sessionToken:e,expiresAt:null,...o!==void 0?{realmId:o}:{},...s!==void 0?{homeInstanceURL:s}:{}})}async function Ht(e,t){const{data:n}=await kt(e,{method:"POST",body:JSON.stringify(t)});return n}async function ur(e,t){const{handle:n,ke1:r}=await Yn(t),o=await Ht("/api/auth/login/init",{email:e,login_ke:r});let s;try{({ke3:s}=await Gn(n,o.login_response,ve,e))}catch{throw new Error("invalid credentials")}const f=await Ht("/api/auth/login/finalize",{email:e,session_id:o.session_id,login_ke3:s}),i=Mn(t,f.account_key_wrap);return Te(i),He(f.session_token,f.realm_id,f.home_instance_url),{user_id:f.user_id,email:e}}async function Jn(e,t,n=""){const{handle:r,ke1:o}=await Kn(t),s=await Ht("/api/auth/register/init",{email:e,registration_ke:o}),{record:f}=await Vn(r,s.registration_response,ve,e),i=new Uint8Array(32);crypto.getRandomValues(i);const c=Rn(t,i,Be()),h={email:e,registration_record:f,account_key_wrap:c};n&&(h.claim_token=n);const a=await Ht("/api/auth/register/finalize",h);return Te(i),He(a.session_token),{user_id:a.user_id,email:e,is_admin:a.is_admin}}async function dr(e,t,n=""){return Jn(e,t,n)}async function pr(){try{await kt("/api/auth/logout",{method:"POST"})}finally{qn(),Pe()}}function yr(e,t=Fe){return t("common.versionLabel",{version:e||"dev"})}async function gr(){try{const{data:e}=await kt("/api/version");return e.version}catch(e){if(!(e instanceof Re))throw e;return"dev"}}function Zn(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:o,onRegisteredSW:s,onRegisterError:f}=e;let i,c;const h=async(l=!0)=>{await c};async function a(){if("serviceWorker"in navigator){if(i=await Xt(async()=>{const{Workbox:l}=await import("./workbox-window.prod.es5-BqEJf4Xk.js");return{Workbox:l}},[]).then(({Workbox:l})=>new l("/sw.js",{scope:"/",type:"classic"})).catch(l=>{f==null||f(l)}),!i)return;i.addEventListener("activated",l=>{(l.isUpdate||l.isExternal)&&window.location.reload()}),i.addEventListener("installed",l=>{l.isUpdate||r==null||r()}),i.register({immediate:t}).then(l=>{s?s("/sw.js",l):o==null||o(l)}).catch(l=>{f==null||f(l)})}}return c=a(),h}const Qn="atterm-decrypt-sealed-body";function tr(e){try{const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.length%4===0?"":"=".repeat(4-t.length%4),r=atob(t+n),o=new Uint8Array(r.length);for(let s=0;s"u"||!("serviceWorker"in navigator))return;const e=navigator.serviceWorker;!e||typeof e.addEventListener!="function"||e.addEventListener("message",t=>{var s;const n=t.data;if(!nr(n))return;const r=(s=t.ports)==null?void 0:s[0];if(!r)return;let o;try{o=er(n)}catch{o={fields:null}}try{r.postMessage(o)}catch{}})}typeof navigator<"u"&&"serviceWorker"in navigator&&(Zn({immediate:!0}),rr());export{ve as S,yr as a,ur as b,pr as c,Yn as d,fr as e,gr as f,hr as g,lr as h,ar as i,cr as j,Xn as l,Gn as o,Jn as r,dr as s}; +var ke=Object.defineProperty;var Ce=(e,t,n)=>t in e?ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var m=(e,t,n)=>Ce(e,typeof t!="symbol"?t+"":t,n);import{a as kt,A as Re}from"./client-BRiQMdFT.js";import{_ as Xt,b3 as Me,bD as De,K as Pe,bH as Fe}from"./mobile-guard-BvFpjCXb.js";const vt=BigInt(2**32-1),ne=BigInt(32);function $e(e,t=!1){return t?{h:Number(e&vt),l:Number(e>>ne&vt)}:{h:Number(e>>ne&vt)|0,l:Number(e&vt)|0}}const It=(e,t,n)=>e>>>n|t<<32-n,St=(e,t,n)=>e<<32-n|t>>>n,ue=(e,t,n)=>e<<64-n|t>>>n-32,de=(e,t,n)=>e>>>n-32|t<<64-n,pe=(e,t)=>t,ye=(e,t)=>e;function ge(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:o|0}}const qt=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Jt=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;function Ne(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function ct(e,t=""){if(typeof e!="number"){const n=t&&`"${t}" `;throw new TypeError(`${n}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){const n=t&&`"${t}" `;throw new RangeError(`${n}expected integer >= 0, got ${e}`)}}function X(e,t,n=""){const r=Ne(e),o=e==null?void 0:e.length,s=t!==void 0;if(!r||s&&o!==t){const f=n&&`"${n}" `,i=s?` of length ${t}`:"",c=r?`length=${o}`:`type=${typeof e}`,h=f+"expected Uint8Array"+i+", got "+c;throw r?new RangeError(h):new TypeError(h)}return e}function Zt(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("Hash must wrapped by utils.createHasher");if(ct(e.outputLen),ct(e.blockLen),e.outputLen<1)throw new Error('"outputLen" must be >= 1');if(e.blockLen<1)throw new Error('"blockLen" must be >= 1')}function gt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Qt(e,t){X(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length='+n)}function Ot(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function wt(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function z(...e){for(let t=0;t>>t}const we=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function be(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const W=we?e=>e:e=>be(e)>>>0;function je(e){for(let t=0;te:je;function Lt(e){if(typeof e!="string")throw new TypeError("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Kt(e,t=""){return typeof e=="string"?Lt(e):X(e,void 0,t)}function xe(e,t={}){const n=(o,s)=>e(s).update(o).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=o=>e(o),Object.assign(n,t),Object.freeze(n)}function re(e=32){ct(e,"bytesLength");const t=typeof globalThis=="object"?globalThis.crypto:null;if(typeof(t==null?void 0:t.getRandomValues)!="function")throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}const Ke=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])}),Ve=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]);function Ye(e,t,n){return e&t^~e&n}function Ge(e,t,n){return e&t^e&n^t&n}class We{constructor(t,n,r,o){m(this,"blockLen");m(this,"outputLen");m(this,"canXOF",!1);m(this,"padOffset");m(this,"isLE");m(this,"buffer");m(this,"view");m(this,"finished",!1);m(this,"length",0);m(this,"pos",0);m(this,"destroyed",!1);this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Pt(this.buffer)}update(t){gt(this),X(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let f=0;fo-f&&(this.process(r,0),f=0);for(let l=f;la.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;ln)throw new Error("outputLen bigger than keyLen");const{key:s,salt:f,personalization:i}=t;if(s!==void 0&&(s.length<1||s.length>n))throw new Error('"key" expected to be undefined or of length=1..'+n);f!==void 0&&X(f,r,"salt"),i!==void 0&&X(i,o,"personalization")}class Xe{constructor(t,n){m(this,"buffer");m(this,"buffer32");m(this,"finished",!1);m(this,"destroyed",!1);m(this,"length",0);m(this,"pos",0);m(this,"blockLen");m(this,"outputLen");m(this,"canXOF",!1);ct(t),ct(n),this.blockLen=t,this.outputLen=n,this.buffer=new Uint8Array(t),this.buffer32=wt(this.buffer)}update(t){gt(this),X(t);const{blockLen:n,buffer:r,buffer32:o}=this,s=t.length,f=t.byteOffset,i=t.buffer;for(let c=0;c>>8*a}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){const{buffer:n,length:r,finished:o,destroyed:s,outputLen:f,pos:i}=this;return t||(t=new this.constructor({dkLen:f})),t.set(...this.get()),t.buffer.set(n),t.destroyed=s,t.finished=o,t.length=r,t.pos=i,t.outputLen=f,t}clone(){return this._cloneInto()}}class qe extends Xe{constructor(n={}){const r=n.dkLen===void 0?64:n.dkLen;super(128,r);m(this,"v0l",K[0]|0);m(this,"v0h",K[1]|0);m(this,"v1l",K[2]|0);m(this,"v1h",K[3]|0);m(this,"v2l",K[4]|0);m(this,"v2h",K[5]|0);m(this,"v3l",K[6]|0);m(this,"v3h",K[7]|0);m(this,"v4l",K[8]|0);m(this,"v4h",K[9]|0);m(this,"v5l",K[10]|0);m(this,"v5h",K[11]|0);m(this,"v6l",K[12]|0);m(this,"v6h",K[13]|0);m(this,"v7l",K[14]|0);m(this,"v7h",K[15]|0);ze(r,n,64,16,16);let{key:o,personalization:s,salt:f}=n,i=0;if(o!==void 0&&(X(o,void 0,"key"),i=o.length),this.v0l^=this.outputLen|i<<8|65536|1<<24,f!==void 0){X(f,void 0,"salt");const c=wt(f);this.v4l^=W(c[0]),this.v4h^=W(c[1]),this.v5l^=W(c[2]),this.v5h^=W(c[3])}if(s!==void 0){X(s,void 0,"personalization");const c=wt(s);this.v6l^=W(c[0]),this.v6h^=W(c[1]),this.v7l^=W(c[2]),this.v7h^=W(c[3])}if(o!==void 0){const c=new Uint8Array(this.blockLen);c.set(o),this.update(c)}}get(){let{v0l:n,v0h:r,v1l:o,v1h:s,v2l:f,v2h:i,v3l:c,v3h:h,v4l:a,v4h:l,v5l:y,v5h:g,v6l:u,v6h:d,v7l:b,v7h:x}=this;return[n,r,o,s,f,i,c,h,a,l,y,g,u,d,b,x]}set(n,r,o,s,f,i,c,h,a,l,y,g,u,d,b,x){this.v0l=n|0,this.v0h=r|0,this.v1l=o|0,this.v1h=s|0,this.v2l=f|0,this.v2h=i|0,this.v3l=c|0,this.v3h=h|0,this.v4l=a|0,this.v4h=l|0,this.v5l=y|0,this.v5h=g|0,this.v6l=u|0,this.v6h=d|0,this.v7l=b|0,this.v7h=x|0}compress(n,r,o){this.get().forEach((h,a)=>p[a]=h),p.set(K,16);let{h:s,l:f}=$e(BigInt(this.length));p[24]=K[8]^f,p[25]=K[9]^s,o&&(p[28]=~p[28],p[29]=~p[29]);let i=0;const c=Ve;for(let h=0;h<12;h++)et(0,4,8,12,n,r+2*c[i++]),nt(0,4,8,12,n,r+2*c[i++]),et(1,5,9,13,n,r+2*c[i++]),nt(1,5,9,13,n,r+2*c[i++]),et(2,6,10,14,n,r+2*c[i++]),nt(2,6,10,14,n,r+2*c[i++]),et(3,7,11,15,n,r+2*c[i++]),nt(3,7,11,15,n,r+2*c[i++]),et(0,5,10,15,n,r+2*c[i++]),nt(0,5,10,15,n,r+2*c[i++]),et(1,6,11,12,n,r+2*c[i++]),nt(1,6,11,12,n,r+2*c[i++]),et(2,7,8,13,n,r+2*c[i++]),nt(2,7,8,13,n,r+2*c[i++]),et(3,4,9,14,n,r+2*c[i++]),nt(3,4,9,14,n,r+2*c[i++]);this.v0l^=p[0]^p[16],this.v0h^=p[1]^p[17],this.v1l^=p[2]^p[18],this.v1h^=p[3]^p[19],this.v2l^=p[4]^p[20],this.v2h^=p[5]^p[21],this.v3l^=p[6]^p[22],this.v3h^=p[7]^p[23],this.v4l^=p[8]^p[24],this.v4h^=p[9]^p[25],this.v5l^=p[10]^p[26],this.v5h^=p[11]^p[27],this.v6l^=p[12]^p[28],this.v6h^=p[13]^p[29],this.v7l^=p[14]^p[30],this.v7h^=p[15]^p[31],z(p)}destroy(){this.destroyed=!0,z(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const xt=xe(e=>new qe(e)),me={Argond2d:0,Argon2i:1,Argon2id:2},mt=4,se=(e,t="")=>e===void 0?Uint8Array.of():Kt(e,t);function Vt(e,t){const n=e&65535,r=e>>>16,o=t&65535,s=t>>>16,f=Math.imul(n,o),i=Math.imul(r,o),c=Math.imul(n,s),h=Math.imul(r,s),a=(f>>>16)+(i&65535)+c,l=h+(i>>>16)+(a>>>16)|0,y=a<<16|f&65535;return{h:l,l:y}}function Je(e,t){const{h:n,l:r}=Vt(e,t);return{h:(n<<1|r>>>31)&4294967295,l:r<<1&4294967295}}function Ut(e,t,n,r){const{h:o,l:s}=Je(t,r),f=qt(t,r,s);return{h:Jt(f,e,n,o),l:f|0}}const j=new Uint32Array(256);function rt(e,t,n,r){let o=j[2*e],s=j[2*e+1],f=j[2*t],i=j[2*t+1],c=j[2*n],h=j[2*n+1],a=j[2*r],l=j[2*r+1];({h:s,l:o}=Ut(s,o,i,f)),{Dh:l,Dl:a}={Dh:l^s,Dl:a^o},{Dh:l,Dl:a}={Dh:pe(l,a),Dl:ye(l)},{h,l:c}=Ut(h,c,l,a),{Bh:i,Bl:f}={Bh:i^h,Bl:f^c},{Bh:i,Bl:f}={Bh:It(i,f,24),Bl:St(i,f,24)},{h:s,l:o}=Ut(s,o,i,f),{Dh:l,Dl:a}={Dh:l^s,Dl:a^o},{Dh:l,Dl:a}={Dh:It(l,a,16),Dl:St(l,a,16)},{h,l:c}=Ut(h,c,l,a),{Bh:i,Bl:f}={Bh:i^h,Bl:f^c},{Bh:i,Bl:f}={Bh:ue(i,f,63),Bl:de(i,f,63)},j[2*e]=o,j[2*e+1]=s,j[2*t]=f,j[2*t+1]=i,j[2*n]=c,j[2*n+1]=h,j[2*r]=a,j[2*r+1]=l}function oe(e,t,n,r,o,s,f,i,c,h,a,l,y,g,u,d){rt(e,o,c,y),rt(t,s,h,g),rt(n,f,a,u),rt(r,i,l,d),rt(e,s,a,d),rt(t,f,l,y),rt(n,i,c,g),rt(r,o,h,u)}function Et(e,t,n,r,o){for(let s=0;s<256;s++)j[s]=e[t+s]^e[n+s];for(let s=0;s<128;s+=16)oe(s,s+1,s+2,s+3,s+4,s+5,s+6,s+7,s+8,s+9,s+10,s+11,s+12,s+13,s+14,s+15);for(let s=0;s<16;s+=2)oe(s,s+1,s+16,s+17,s+32,s+33,s+48,s+49,s+64,s+65,s+80,s+81,s+96,s+97,s+112,s+113);if(o)for(let s=0;s<256;s++)e[r+s]^=j[s]^e[t+s]^e[n+s];else for(let s=0;s<256;s++)e[r+s]=j[s]^e[t+s]^e[n+s];z(j)}function Yt(e,t){const n=Ot(e),r=new Uint32Array(1),o=Ot(r);if(r[0]=W(t),t<=64)return xt.create({dkLen:t}).update(o).update(n).digest();const s=new Uint8Array(t);let f=xt.create({}).update(o).update(n).digest(),i=0;for(s.set(f.subarray(0,32)),i+=32;t-i>64;i+=32){const c=xt.create({}).update(f);c.digestInto(f),c.destroy(),s.set(f.subarray(0,32),i)}return s.set(xt(f,{dkLen:t-i}),i),z(f,r),s}function Ze(e,t,n,r,o,s,f=!1){let i;e===0?t===0?i=o-1:f?i=t*r+o-1:i=t*r+(o==0?-1:0):f?i=n-r+o-1:i=n-r+(o==0?-1:0);const c=e!==0&&t!==mt-1?(t+1)*r:0,h=i-1-Vt(i,Vt(s,s).h).h;return(c+h)%n}const Ee=Math.pow(2,32);function ot(e){return Number.isSafeInteger(e)&&e>=0&&e=Math.pow(2,24))throw new Error('"p" must be 1..2^24');if(!ot(o))throw new Error('"m" must be 0..2^32');if(!ot(s)||s<1)throw new Error('"t" (iterations) must be 1..2^32');if(i!==void 0&&typeof i!="function")throw new Error('"progressCb" must be a function');if(ct(c,"asyncTick"),!ot(o)||o<8*r)throw new Error('"m" (memory) must be at least 8*p bytes');if(f!==16&&f!==19)throw new Error('"version" must be 0x10 or 0x13, got '+f);return t}function tn(e,t,n,r){if(e=Kt(e,"password"),t=Kt(t,"salt"),!ot(e.length))throw new Error('"password" must be less of length 1..4Gb');if(!ot(t.length)||t.length<8)throw new Error('"salt" must be of length 8..4Gb');if(!Object.values(me).includes(n))throw new Error('"type" was invalid');let{p:o,dkLen:s,m:f,t:i,version:c,key:h,personalization:a,maxmem:l,onProgress:y,asyncTick:g}=Qe(r);h=se(h,"key"),a=se(a,"personalization");const u=xt.create(),d=new Uint32Array(1),b=Ot(d);for(let _ of[o,s,f,i,c,n])d[0]=W(_),u.update(b);for(let _ of[e,t,h,a])d[0]=W(_.length),u.update(b).update(_);const x=new Uint32Array(18),A=Ot(x);u.digestInto(A);const L=o,B=4*o*Math.floor(f/(mt*o)),D=Math.floor(B/o),P=Math.floor(D/mt),S=B*1024;if(!ot(l))throw new Error('"maxmem" expected <2**32, got '+l);if(S>l)throw new Error('"maxmem" limit was hit: memUsed(mP*1024)='+S+", maxmem="+l);const N=new Uint32Array(S/4);for(let _=0;_{};if(y){const _=i*mt*o*P-2*o,v=Math.max(Math.floor(_/1e4),1);let U=0;I=()=>{U++,y&&(!(U%v)||U===_)&&y(U/_)}}return z(d,x),{type:n,mP:B,p:o,t:i,version:c,B:N,laneLen:D,lanes:L,segmentLen:P,dkLen:s,perBlock:I,asyncTick:g}}function en(e,t,n,r){const o=new Uint32Array(256);for(let f=0;frn(me.Argon2id,e,t,n);/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function on(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function Gt(e){if(typeof e!="boolean")throw new TypeError(`boolean expected, not ${e}`)}function At(e){if(typeof e!="number")throw new TypeError("number expected, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError("positive integer expected, got "+e)}function G(e,t,n=""){const r=on(e),o=e==null?void 0:e.length,s=t!==void 0;if(!r||s&&o!==t){const f=n&&`"${n}" `,i=s?` of length ${t}`:"",c=r?`length=${o}`:`type=${typeof e}`,h=f+"expected Uint8Array"+i+", got "+c;throw r?new RangeError(h):new TypeError(h)}return e}function ie(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function fn(e,t,n=!1){G(e,void 0,"output");const r=t.outputLen;if(e.lengthe<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,Y=at?e=>e:e=>Ae(e)>>>0,an=e=>{for(let t=0;te:an;function ln(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function hn(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r[],s=(i,c)=>r(c,...o(i)).update(i).digest(),f=r(new Uint8Array(e),...o(new Uint8Array(0)));return s.outputLen=f.outputLen,s.blockLen=f.blockLen,s.create=(i,...c)=>r(i,...c),s}const dn=(e,t)=>{function n(r,...o){if(G(r,void 0,"key"),e.nonceLength!==void 0){const a=o[0];G(a,e.varSizeNonce?void 0:e.nonceLength,"nonce")}const s=e.tagLength;s&&o[1]!==void 0&&G(o[1],void 0,"AAD");const f=t(r,...o),i=(a,l)=>{if(l!==void 0){if(a!==2)throw new Error("cipher output not supported");G(l,void 0,"output")}};let c=!1;return{encrypt(a,l){if(c)throw new Error("cannot encrypt() twice with same key + nonce");return c=!0,G(a),i(f.encrypt.length,l),f.encrypt(a,l)},decrypt(a,l){if(G(a),s&&a.lengthUint8Array.from(e.split(""),t=>t.charCodeAt(0)),yn=it(Q(_e("expand 16-byte k"))),gn=it(Q(_e("expand 32-byte k")));function w(e,t){return e<>>32-t}const bt=64,wn=16,zt=2**32-1,fe=Uint32Array.of();function bn(e,t,n,r,o,s,f,i){const c=o.length,h=new Uint8Array(bt),a=Q(h),l=at&&_t(o)&&_t(s),y=l?Q(o):fe,g=l?Q(s):fe;if(!at){for(let u=0;u=zt)throw new Error("arx: counter overflow");const d=Math.min(bt,c-u);for(let b=0,x;b=zt)throw new Error("arx: counter overflow");const d=Math.min(bt,c-u);if(l&&d===bt){const b=u/4;if(u%4!==0)throw new Error("arx: invalid block position");for(let x=0,A;x{G(i,void 0,"key"),G(c,void 0,"nonce"),G(h,void 0,"data");const y=h.length;if(a=Wt(y,a,!1),At(l),l<0||l>=zt)throw new Error("arx: counter overflow");const g=[];let u=i.length,d,b;if(u===32)g.push(d=Tt(i)),b=gn;else if(u===16&&n)d=new Uint8Array(32),d.set(i),d.set(i,16),b=yn,g.push(d);else throw G(i,32,"arx key"),new Error("invalid key size");(!at||!_t(c))&&g.push(c=Tt(c));let x=Q(d);if(r){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");const B=c.subarray(0,16);if(at)r(b,x,Q(B),x);else{const D=it(Uint32Array.from(b));r(D,x,Q(B),x),ft(D),it(x)}c=c.subarray(16)}else at||it(x);const A=16-o;if(A!==c.length)throw new Error(`arx: nonce must be ${A} or 16 bytes`);if(A!==12){const B=new Uint8Array(12);B.set(c,s?0:12-c.length),c=B,g.push(c)}const L=it(Q(c));try{return bn(e,b,x,L,h,a,l,f),a}finally{ft(...g)}}}function V(e,t){return e[t++]&255|(e[t++]&255)<<8}class mn{constructor(t){m(this,"blockLen",16);m(this,"outputLen",16);m(this,"buffer",new Uint8Array(16));m(this,"r",new Uint16Array(10));m(this,"h",new Uint16Array(10));m(this,"pad",new Uint16Array(8));m(this,"pos",0);m(this,"finished",!1);m(this,"destroyed",!1);t=Tt(G(t,32,"key"));const n=V(t,0),r=V(t,2),o=V(t,4),s=V(t,6),f=V(t,8),i=V(t,10),c=V(t,12),h=V(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|o<<6)&7939,this.r[3]=(o>>>7|s<<9)&8191,this.r[4]=(s>>>4|f<<12)&255,this.r[5]=f>>>1&8190,this.r[6]=(f>>>14|i<<2)&8191,this.r[7]=(i>>>11|c<<5)&8065,this.r[8]=(c>>>8|h<<8)&8191,this.r[9]=h>>>5&127;for(let a=0;a<8;a++)this.pad[a]=V(t,16+2*a)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:f}=this,i=f[0],c=f[1],h=f[2],a=f[3],l=f[4],y=f[5],g=f[6],u=f[7],d=f[8],b=f[9],x=V(t,n+0),A=V(t,n+2),L=V(t,n+4),B=V(t,n+6),D=V(t,n+8),P=V(t,n+10),S=V(t,n+12),N=V(t,n+14);let I=s[0]+(x&8191),_=s[1]+((x>>>13|A<<3)&8191),v=s[2]+((A>>>10|L<<6)&8191),U=s[3]+((L>>>7|B<<9)&8191),O=s[4]+((B>>>4|D<<12)&8191),T=s[5]+(D>>>1&8191),H=s[6]+((D>>>14|P<<2)&8191),k=s[7]+((P>>>11|S<<5)&8191),C=s[8]+((S>>>8|N<<8)&8191),R=s[9]+(N>>>5|o),E=0,F=E+I*i+_*(5*b)+v*(5*d)+U*(5*u)+O*(5*g);E=F>>>13,F&=8191,F+=T*(5*y)+H*(5*l)+k*(5*a)+C*(5*h)+R*(5*c),E+=F>>>13,F&=8191;let $=E+I*c+_*i+v*(5*b)+U*(5*d)+O*(5*u);E=$>>>13,$&=8191,$+=T*(5*g)+H*(5*y)+k*(5*l)+C*(5*a)+R*(5*h),E+=$>>>13,$&=8191;let M=E+I*h+_*c+v*i+U*(5*b)+O*(5*d);E=M>>>13,M&=8191,M+=T*(5*u)+H*(5*g)+k*(5*y)+C*(5*l)+R*(5*a),E+=M>>>13,M&=8191;let J=E+I*a+_*h+v*c+U*i+O*(5*b);E=J>>>13,J&=8191,J+=T*(5*d)+H*(5*u)+k*(5*g)+C*(5*y)+R*(5*l),E+=J>>>13,J&=8191;let lt=E+I*l+_*a+v*h+U*c+O*i;E=lt>>>13,lt&=8191,lt+=T*(5*b)+H*(5*d)+k*(5*u)+C*(5*g)+R*(5*y),E+=lt>>>13,lt&=8191;let ht=E+I*y+_*l+v*a+U*h+O*c;E=ht>>>13,ht&=8191,ht+=T*i+H*(5*b)+k*(5*d)+C*(5*u)+R*(5*g),E+=ht>>>13,ht&=8191;let ut=E+I*g+_*y+v*l+U*a+O*h;E=ut>>>13,ut&=8191,ut+=T*c+H*i+k*(5*b)+C*(5*d)+R*(5*u),E+=ut>>>13,ut&=8191;let dt=E+I*u+_*g+v*y+U*l+O*a;E=dt>>>13,dt&=8191,dt+=T*h+H*c+k*i+C*(5*b)+R*(5*d),E+=dt>>>13,dt&=8191;let pt=E+I*d+_*u+v*g+U*y+O*l;E=pt>>>13,pt&=8191,pt+=T*a+H*h+k*c+C*i+R*(5*b),E+=pt>>>13,pt&=8191;let yt=E+I*b+_*d+v*u+U*g+O*y;E=yt>>>13,yt&=8191,yt+=T*l+H*a+k*h+C*c+R*i,E+=yt>>>13,yt&=8191,E=(E<<2)+E|0,E=E+F|0,F=E&8191,E=E>>>13,$+=E,s[0]=F,s[1]=$,s[2]=M,s[3]=J,s[4]=lt,s[5]=ht,s[6]=ut,s[7]=dt,s[8]=pt,s[9]=yt}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let i=2;i<10;i++)t[i]+=o,o=t[i]>>>13,t[i]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,r[0]=t[0]+5,o=r[0]>>>13,r[0]&=8191;for(let i=1;i<10;i++)r[i]=t[i]+o,o=r[i]>>>13,r[i]&=8191;r[9]-=8192;let s=(o^1)-1;for(let i=0;i<10;i++)r[i]&=s;s=~s;for(let i=0;i<10;i++)t[i]=t[i]&s|r[i];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let f=t[0]+n[0];t[0]=f&65535;for(let i=1;i<8;i++)f=(t[i]+n[i]|0)+(f>>>16)|0,t[i]=f&65535;ft(r)}update(t){ie(this),G(t),t=Tt(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s>>0,t[s++]=r[f]>>>8}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}const En=un(32,e=>new mn(e));function An(e,t,n,r,o,s=20){let f=e[0],i=e[1],c=e[2],h=e[3],a=t[0],l=t[1],y=t[2],g=t[3],u=t[4],d=t[5],b=t[6],x=t[7],A=o,L=n[0],B=n[1],D=n[2],P=f,S=i,N=c,I=h,_=a,v=l,U=y,O=g,T=u,H=d,k=b,C=x,R=A,E=L,F=B,$=D;for(let J=0;J{e.update(t);const n=t.length%16;n&&e.update(vn.subarray(n))},Un=new Uint8Array(32);function ae(e,t,n,r,o){o!==void 0&&G(o,void 0,"AAD");const s=e(t,n,Un),f=pn(r.length,o?o.length:0,!0),i=En.create(s);o&&ce(i,o),ce(i,r),i.update(f);const c=i.digest();return ft(s,f),c}const Bn=e=>(t,n,r)=>({encrypt(s,f){const i=s.length;f=Wt(i+16,f,!1),f.set(s);const c=f.subarray(0,-16);e(t,n,c,c,1);const h=ae(e,t,n,c,r);return f.set(h,i),ft(h),f},decrypt(s,f){f=Wt(s.length-16,f,!1);const i=s.subarray(0,-16),c=s.subarray(-16),h=ae(e,t,n,i,r);if(!hn(c,h))throw ft(h),new Error("invalid tag");return f.set(s.subarray(0,-16)),e(t,n,f,f,1),ft(h),f}}),Ct=dn({blockSize:64,nonceLength:24,tagLength:16},Bn(Ln));class le{constructor(t,n){m(this,"oHash");m(this,"iHash");m(this,"blockLen");m(this,"outputLen");m(this,"canXOF",!1);m(this,"finished",!1);m(this,"destroyed",!1);if(Zt(t),X(n,void 0,"key"),this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,o=new Uint8Array(r);o.set(n.length>r?t.create().update(n).digest():n);for(let s=0;s{const e=(t,n,r)=>new le(t,n).update(r).digest();return e.create=(t,n)=>new le(t,n),e})();function In(e,t,n){return Zt(e),n===void 0&&(n=new Uint8Array(e.outputLen)),Le(e,n,t)}const Ft=Uint8Array.of(0),he=Uint8Array.of();function Sn(e,t,n,r=32){Zt(e),ct(r,"length"),X(t,void 0,"prk");const o=e.outputLen;if(t.length255*o)throw new Error("Length must be <= 255*HashLen");const s=Math.ceil(r/o);n===void 0?n=he:X(n,void 0,"info");const f=new Uint8Array(s*o),i=Le.create(e,t),c=i._cloneInto(),h=new Uint8Array(i.outputLen);for(let a=0;aSn(e,In(e,t,n),r,o),Tn=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),st=new Uint32Array(64);class Hn extends We{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:r,D:o,E:s,F:f,G:i,H:c}=this;return[t,n,r,o,s,f,i,c]}set(t,n,r,o,s,f,i,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=f|0,this.G=i|0,this.H=c|0}process(t,n){for(let l=0;l<16;l++,n+=4)st[l]=t.getUint32(n,!1);for(let l=16;l<64;l++){const y=st[l-15],g=st[l-2],u=q(y,7)^q(y,18)^y>>>3,d=q(g,17)^q(g,19)^g>>>10;st[l]=d+st[l-7]+u+st[l-16]|0}let{A:r,B:o,C:s,D:f,E:i,F:c,G:h,H:a}=this;for(let l=0;l<64;l++){const y=q(i,6)^q(i,11)^q(i,25),g=a+y+Ye(i,c,h)+Tn[l]+st[l]|0,d=(q(r,2)^q(r,13)^q(r,22))+Ge(r,o,s)|0;a=h,h=c,c=i,i=f+g|0,f=s,s=o,o=r,r=g+d|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,f=f+this.D|0,i=i+this.E|0,c=c+this.F|0,h=h+this.G|0,a=a+this.H|0,this.set(r,o,s,f,i,c,h,a)}roundClean(){z(st)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),z(this.buffer)}}class kn extends Hn{constructor(){super(32);m(this,"A",tt[0]|0);m(this,"B",tt[1]|0);m(this,"C",tt[2]|0);m(this,"D",tt[3]|0);m(this,"E",tt[4]|0);m(this,"F",tt[5]|0);m(this,"G",tt[6]|0);m(this,"H",tt[7]|0)}}const Cn=xe(()=>new kn,Ke(1)),ve="atterm-relay",Ue=Lt("atterm-account-key-v1");function Be(){return{alg:"argon2id",m:64*1024,t:3,p:1}}function Ie(e,t,n){return sn(Lt(e),t,{m:n.m,t:n.t,p:n.p,dkLen:32})}function Rn(e,t,n=Be()){if(t.length!==32)throw new Error(`accountKey must be 32 bytes, got ${t.length}`);const r=re(16),o=Ie(e,r,n),s=re(24),i=Ct(o,s,Ue).encrypt(t);return{method:"password",wrapped:$t(i),nonce:$t(s),salt:$t(r),kdf_params:JSON.stringify(n)}}function Mn(e,t){const n=JSON.parse(t.kdf_params);if(n.alg!=="argon2id")throw new Error(`unsupported kdf alg: ${n.alg}`);const r=Nt(t.salt),o=Ie(e,r,n),s=Nt(t.nonce),f=Ct(o,s,Ue);try{return f.decrypt(Nt(t.wrapped))}catch{throw new Error("invalid password")}}function $t(e){return btoa(String.fromCharCode(...e))}function Nt(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.length%4===0?"":"=".repeat(4-t.length%4),r=atob(t+n),o=new Uint8Array(r.length);for(let s=0;s"u")throw new Error("opaque wasm: no DOM to load the Go runtime");const{default:e}=await Xt(async()=>{const{default:t}=await import("./wasm_exec-BVJFcdQq.js");return{default:t}},[]);await new Promise((t,n)=>{const r=document.createElement("script");r.src=e,r.onload=()=>t(),r.onerror=()=>n(new Error("opaque wasm: failed to load wasm_exec.js")),document.head.appendChild(r)})}function Rt(){return Bt||(Bt=(async()=>{await jn();const{default:e}=await Xt(async()=>{const{default:s}=await import("./opaque-CvN23u_6.js");return{default:s}},[]),t=globalThis.Go,n=new t;let r;try{r=await WebAssembly.instantiateStreaming(fetch(e),n.importObject)}catch{const s=await fetch(e);r=await WebAssembly.instantiate(await s.arrayBuffer(),n.importObject)}n.run(r.instance);const o=globalThis.attermOpaque;if(!o)throw new Error("opaque wasm did not initialize");return o})(),Bt)}function Mt(e){if(e&&typeof e=="object"&&"error"in e)throw new Error(e.error);return e}async function Kn(e){return Mt((await Rt()).registerInit(e))}async function Vn(e,t,n,r){return Mt((await Rt()).registerFinish(e,t,n,r))}async function Yn(e){return Mt((await Rt()).loginInit(e))}async function Gn(e,t,n,r){return Mt((await Rt()).loginFinish(e,t,n,r))}const Dt="atterm.account-key";function Wn(e){return btoa(String.fromCharCode(...e))}function zn(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r"u"||sessionStorage.setItem(Dt,Wn(e))}function Xn(){if(typeof sessionStorage>"u")return null;const e=sessionStorage.getItem(Dt);if(!e)return null;try{return zn(e)}catch{return null}}function qn(){typeof sessionStorage>"u"||sessionStorage.removeItem(Dt)}function lr(){return typeof sessionStorage>"u"?!1:sessionStorage.getItem(Dt)!==null}async function hr(){const{data:e}=await kt("/api/bootstrap/status");return e}function He(e,t,n){const r=Me(),o=t??(r==null?void 0:r.realmId),s=n??(r==null?void 0:r.homeInstanceURL);De({baseURL:(r==null?void 0:r.baseURL)??"",allowInsecure:(r==null?void 0:r.allowInsecure)??!1,sessionToken:e,expiresAt:null,...o!==void 0?{realmId:o}:{},...s!==void 0?{homeInstanceURL:s}:{}})}async function Ht(e,t){const{data:n}=await kt(e,{method:"POST",body:JSON.stringify(t)});return n}async function ur(e,t){const{handle:n,ke1:r}=await Yn(t),o=await Ht("/api/auth/login/init",{email:e,login_ke:r});let s;try{({ke3:s}=await Gn(n,o.login_response,ve,e))}catch{throw new Error("invalid credentials")}const f=await Ht("/api/auth/login/finalize",{email:e,session_id:o.session_id,login_ke3:s}),i=Mn(t,f.account_key_wrap);return Te(i),He(f.session_token,f.realm_id,f.home_instance_url),{user_id:f.user_id,email:e}}async function Jn(e,t,n=""){const{handle:r,ke1:o}=await Kn(t),s=await Ht("/api/auth/register/init",{email:e,registration_ke:o}),{record:f}=await Vn(r,s.registration_response,ve,e),i=new Uint8Array(32);crypto.getRandomValues(i);const c=Rn(t,i,Be()),h={email:e,registration_record:f,account_key_wrap:c};n&&(h.claim_token=n);const a=await Ht("/api/auth/register/finalize",h);return Te(i),He(a.session_token),{user_id:a.user_id,email:e,is_admin:a.is_admin}}async function dr(e,t,n=""){return Jn(e,t,n)}async function pr(){try{await kt("/api/auth/logout",{method:"POST"})}finally{qn(),Pe()}}function yr(e,t=Fe){return t("common.versionLabel",{version:e||"dev"})}async function gr(){try{const{data:e}=await kt("/api/version");return e.version}catch(e){if(!(e instanceof Re))throw e;return"dev"}}function Zn(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:o,onRegisteredSW:s,onRegisterError:f}=e;let i,c;const h=async(l=!0)=>{await c};async function a(){if("serviceWorker"in navigator){if(i=await Xt(async()=>{const{Workbox:l}=await import("./workbox-window.prod.es5-BqEJf4Xk.js");return{Workbox:l}},[]).then(({Workbox:l})=>new l("/sw.js",{scope:"/",type:"classic"})).catch(l=>{f==null||f(l)}),!i)return;i.addEventListener("activated",l=>{(l.isUpdate||l.isExternal)&&window.location.reload()}),i.addEventListener("installed",l=>{l.isUpdate||r==null||r()}),i.register({immediate:t}).then(l=>{s?s("/sw.js",l):o==null||o(l)}).catch(l=>{f==null||f(l)})}}return c=a(),h}const Qn="atterm-decrypt-sealed-body";function tr(e){try{const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.length%4===0?"":"=".repeat(4-t.length%4),r=atob(t+n),o=new Uint8Array(r.length);for(let s=0;s"u"||!("serviceWorker"in navigator))return;const e=navigator.serviceWorker;!e||typeof e.addEventListener!="function"||e.addEventListener("message",t=>{var s;const n=t.data;if(!nr(n))return;const r=(s=t.ports)==null?void 0:s[0];if(!r)return;let o;try{o=er(n)}catch{o={fields:null}}try{r.postMessage(o)}catch{}})}typeof navigator<"u"&&"serviceWorker"in navigator&&(Zn({immediate:!0}),rr());export{ve as S,yr as a,ur as b,pr as c,Yn as d,fr as e,gr as f,hr as g,lr as h,ar as i,cr as j,Xn as l,Gn as o,Jn as r,dr as s}; diff --git a/internal/relay/web-dist/assets/settings-BDnHo3Kr.js b/internal/relay/web-dist/assets/settings-DSih4K8W.js similarity index 97% rename from internal/relay/web-dist/assets/settings-BDnHo3Kr.js rename to internal/relay/web-dist/assets/settings-DSih4K8W.js index 11f6d441..6de15498 100644 --- a/internal/relay/web-dist/assets/settings-BDnHo3Kr.js +++ b/internal/relay/web-dist/assets/settings-DSih4K8W.js @@ -1,4 +1,4 @@ -import{v as O,w as x,z as M,y as T,aJ as le,aK as ce,ai as E,aC as m,bT as Z,bY as Q,b$ as U,b2 as de,bn as ue,bO as fe,$ as B,c0 as X,a7 as ve,aH as ge,bK as be,bJ as he,F as V,bs as _,bh as y,a3 as k,bS as t,c7 as i,ac as c,B as N,aa as w,bN as g,a5 as P,a4 as R,bV as A,n as L,bf as W,a2 as C,bu as pe,av as me,b3 as ye,c3 as J,b4 as _e,c9 as we,bD as ke,K as xe,aU as Te,bg as $e,aA as Ce,h as Se,b6 as G,ae as Pe,e as Ne,o as Re,aG as Ee,a1 as Oe}from"./mobile-guard-CHHXRZ12.js";import{c as ze,N as Ie,l as De,r as Ae,s as Me,d as Fe,T as Le}from"./Topbar-qQtT5o6t.js";import{L as Ue}from"./LanguageSelect-DQdfalDe.js";import{A as I,a as j}from"./client-Bd6vJHn4.js";import{a as q,c as z,d as D,b as K}from"./FormItem-KX1KLzyv.js";import{s as ee,N as H,c as Be,b as F}from"./Tabs-BHw_WMcN.js";import{N as te,a as je}from"./Switch-_UDIVDNp.js";import{N as Y}from"./Alert-CTGJYwHC.js";import"./pwa-DV81pmUS.js";import{setSharedPrefsSync as qe,PrefsSyncEngine as He,localStorageAdapter as Ve,apiRelayClient as We}from"./prefsSync-C6s4W7Ql.js";const Ke=O([x("list",` +import{v as O,w as x,z as M,y as T,aJ as le,aK as ce,ai as E,aC as m,bT as Z,bY as Q,b$ as U,b2 as de,bn as ue,bO as fe,$ as B,c0 as X,a7 as ve,aH as ge,bK as be,bJ as he,F as V,bs as _,bh as y,a3 as k,bS as t,c7 as i,ac as c,B as N,aa as w,bN as g,a5 as P,a4 as R,bV as A,n as L,bf as W,a2 as C,bu as pe,av as me,b3 as ye,c3 as J,b4 as _e,c9 as we,bD as ke,K as xe,aU as Te,bg as $e,aA as Ce,h as Se,b6 as G,ae as Pe,e as Ne,o as Re,aG as Ee,a1 as Oe}from"./mobile-guard-BvFpjCXb.js";import{c as ze,N as Ie,l as De,r as Ae,s as Me,d as Fe,T as Le}from"./Topbar-Cz_j_mBL.js";import{L as Ue}from"./LanguageSelect-CXI-71aS.js";import{A as I,a as j}from"./client-BRiQMdFT.js";import{a as q,c as z,d as D,b as K}from"./FormItem-Biv8w1Bg.js";import{s as ee,N as H,c as Be,b as F}from"./Tabs-BsN_G19n.js";import{N as te,a as je}from"./Switch-CX4ypJCN.js";import{N as Y}from"./Alert-Dj-XqAz8.js";import"./pwa-BRtGQKIK.js";import{setSharedPrefsSync as qe,PrefsSyncEngine as He,localStorageAdapter as Ve,apiRelayClient as We}from"./prefsSync-BGOlzhJD.js";const Ke=O([x("list",` --n-merged-border-color: var(--n-border-color); --n-merged-color: var(--n-color); --n-merged-color-hover: var(--n-color-hover); diff --git a/internal/relay/web-dist/assets/setup-DUAzFJMr.js b/internal/relay/web-dist/assets/setup-E7dRmBVJ.js similarity index 92% rename from internal/relay/web-dist/assets/setup-DUAzFJMr.js rename to internal/relay/web-dist/assets/setup-E7dRmBVJ.js index ad404a34..8d0f0557 100644 --- a/internal/relay/web-dist/assets/setup-DUAzFJMr.js +++ b/internal/relay/web-dist/assets/setup-E7dRmBVJ.js @@ -1 +1 @@ -import{ai as U,bs as i,$ as A,c3 as _,aA as L,bh as v,a3 as m,c7 as s,ac as l,bS as e,h as P,a2 as T,aa as f,bN as b,a4 as N,c9 as x,b4 as V,B as E,b6 as w,ae as $,e as G,bV as M,bD as j,n as D,o as F,aG as q,a1 as z}from"./mobile-guard-CHHXRZ12.js";import{L as H}from"./LanguageSelect-DQdfalDe.js";import{a as O,b as J,c as h,d as I}from"./FormItem-KX1KLzyv.js";import{N as R}from"./Alert-CTGJYwHC.js";import{a as K,N as Q}from"./Switch-_UDIVDNp.js";const W={class:"setup-page"},X=U({__name:"App",setup(Z){const n=i("https://"),c=i(""),d=i(!1),o=i(null),u=i(!1),{t:a}=M();function B(){return new URLSearchParams(location.search).get("reason")==="token_invalid"?a("setup.reasonTokenInvalid"):null}const y=i(B()),g=A(()=>!n.value||n.value==="https://"?null:_(n.value,d.value));async function k(){o.value=null;const p=_(n.value,d.value);if(p){o.value=p;return}if(!c.value.trim()){o.value=a("setup.errors.tokenRequired");return}u.value=!0;try{const t=n.value.replace(/\/$/,"")+"/api/me",r=await fetch(t,{method:"GET",headers:{Authorization:`Bearer ${c.value.trim()}`},credentials:"omit"});if(r.status===401){o.value=a("setup.errors.tokenInvalid");return}if(r.status===403){o.value=a("setup.errors.originRejected");return}if(!r.ok){o.value=a("setup.errors.relayHttpCheckUrl",{status:r.status});return}const S={baseURL:n.value.replace(/\/$/,""),sessionToken:c.value.trim(),expiresAt:null,allowInsecure:d.value};j(S),location.replace("/")}catch(t){o.value=a("setup.errors.cannotReachRelay",{message:t instanceof Error?t.message:String(t)})}finally{u.value=!1}}const C=L();return(p,t)=>(v(),m(e(G),{theme:e($),"theme-overrides":e(C),locale:e(w).locale,"date-locale":e(w).dateLocale},{default:s(()=>[l(e(P),null,{default:s(()=>[T("main",W,[l(H,{class:"setup-language"}),l(e(O),{title:e(a)("setup.connectToRelay"),class:"setup-card"},{default:s(()=>[y.value?(v(),m(e(R),{key:0,type:"warning","show-icon":!0,style:{"margin-bottom":"1rem"}},{default:s(()=>[f(b(y.value),1)]),_:1})):N("",!0),l(e(J),{onSubmit:x(k,["prevent"])},{default:s(()=>[l(e(h),V({label:e(a)("setup.relayUrl"),feedback:g.value??""},g.value?{"validation-status":"error"}:{}),{default:s(()=>[l(e(I),{value:n.value,"onUpdate:value":t[0]||(t[0]=r=>n.value=r),placeholder:e(a)("setup.relayUrlPlaceholder"),"input-props":{name:"relay-base",autocomplete:"off"},disabled:u.value},null,8,["value","placeholder","disabled"])]),_:1},16,["label","feedback"]),l(e(h),{label:e(a)("setup.token")},{default:s(()=>[l(e(I),{value:c.value,"onUpdate:value":t[1]||(t[1]=r=>c.value=r),type:"password","show-password-on":"click",placeholder:e(a)("setup.tokenPlaceholder"),"input-props":{name:"relay-token",autocomplete:"off"},disabled:u.value},null,8,["value","placeholder","disabled"])]),_:1},8,["label"]),l(e(h),{label:e(a)("setup.allowInsecure")},{default:s(()=>[l(e(K),{value:d.value,"onUpdate:value":t[2]||(t[2]=r=>d.value=r),disabled:u.value},null,8,["value","disabled"])]),_:1},8,["label"]),o.value?(v(),m(e(R),{key:0,type:"error","show-icon":!0,style:{"margin-bottom":"1rem"}},{default:s(()=>[f(b(o.value),1)]),_:1})):N("",!0),l(e(Q),{justify:"end"},{default:s(()=>[l(e(E),{type:"primary",loading:u.value,disabled:u.value,"data-testid":"connect",onClick:k},{default:s(()=>[f(b(e(a)("setup.connect")),1)]),_:1},8,["loading","disabled"])]),_:1})]),_:1})]),_:1},8,["title"])])]),_:1})]),_:1},8,["theme","theme-overrides","locale","date-locale"]))}}),Y=D(X,[["__scopeId","data-v-adef5cda"]]);F("setup")||(q(),z(Y).mount("#app")); +import{ai as U,bs as i,$ as A,c3 as _,aA as L,bh as v,a3 as m,c7 as s,ac as l,bS as e,h as P,a2 as T,aa as f,bN as b,a4 as N,c9 as x,b4 as V,B as E,b6 as w,ae as $,e as G,bV as M,bD as j,n as D,o as F,aG as q,a1 as z}from"./mobile-guard-BvFpjCXb.js";import{L as H}from"./LanguageSelect-CXI-71aS.js";import{a as O,b as J,c as h,d as I}from"./FormItem-Biv8w1Bg.js";import{N as R}from"./Alert-Dj-XqAz8.js";import{a as K,N as Q}from"./Switch-CX4ypJCN.js";const W={class:"setup-page"},X=U({__name:"App",setup(Z){const n=i("https://"),c=i(""),d=i(!1),o=i(null),u=i(!1),{t:a}=M();function B(){return new URLSearchParams(location.search).get("reason")==="token_invalid"?a("setup.reasonTokenInvalid"):null}const y=i(B()),g=A(()=>!n.value||n.value==="https://"?null:_(n.value,d.value));async function k(){o.value=null;const p=_(n.value,d.value);if(p){o.value=p;return}if(!c.value.trim()){o.value=a("setup.errors.tokenRequired");return}u.value=!0;try{const t=n.value.replace(/\/$/,"")+"/api/me",r=await fetch(t,{method:"GET",headers:{Authorization:`Bearer ${c.value.trim()}`},credentials:"omit"});if(r.status===401){o.value=a("setup.errors.tokenInvalid");return}if(r.status===403){o.value=a("setup.errors.originRejected");return}if(!r.ok){o.value=a("setup.errors.relayHttpCheckUrl",{status:r.status});return}const S={baseURL:n.value.replace(/\/$/,""),sessionToken:c.value.trim(),expiresAt:null,allowInsecure:d.value};j(S),location.replace("/")}catch(t){o.value=a("setup.errors.cannotReachRelay",{message:t instanceof Error?t.message:String(t)})}finally{u.value=!1}}const C=L();return(p,t)=>(v(),m(e(G),{theme:e($),"theme-overrides":e(C),locale:e(w).locale,"date-locale":e(w).dateLocale},{default:s(()=>[l(e(P),null,{default:s(()=>[T("main",W,[l(H,{class:"setup-language"}),l(e(O),{title:e(a)("setup.connectToRelay"),class:"setup-card"},{default:s(()=>[y.value?(v(),m(e(R),{key:0,type:"warning","show-icon":!0,style:{"margin-bottom":"1rem"}},{default:s(()=>[f(b(y.value),1)]),_:1})):N("",!0),l(e(J),{onSubmit:x(k,["prevent"])},{default:s(()=>[l(e(h),V({label:e(a)("setup.relayUrl"),feedback:g.value??""},g.value?{"validation-status":"error"}:{}),{default:s(()=>[l(e(I),{value:n.value,"onUpdate:value":t[0]||(t[0]=r=>n.value=r),placeholder:e(a)("setup.relayUrlPlaceholder"),"input-props":{name:"relay-base",autocomplete:"off"},disabled:u.value},null,8,["value","placeholder","disabled"])]),_:1},16,["label","feedback"]),l(e(h),{label:e(a)("setup.token")},{default:s(()=>[l(e(I),{value:c.value,"onUpdate:value":t[1]||(t[1]=r=>c.value=r),type:"password","show-password-on":"click",placeholder:e(a)("setup.tokenPlaceholder"),"input-props":{name:"relay-token",autocomplete:"off"},disabled:u.value},null,8,["value","placeholder","disabled"])]),_:1},8,["label"]),l(e(h),{label:e(a)("setup.allowInsecure")},{default:s(()=>[l(e(K),{value:d.value,"onUpdate:value":t[2]||(t[2]=r=>d.value=r),disabled:u.value},null,8,["value","disabled"])]),_:1},8,["label"]),o.value?(v(),m(e(R),{key:0,type:"error","show-icon":!0,style:{"margin-bottom":"1rem"}},{default:s(()=>[f(b(o.value),1)]),_:1})):N("",!0),l(e(Q),{justify:"end"},{default:s(()=>[l(e(E),{type:"primary",loading:u.value,disabled:u.value,"data-testid":"connect",onClick:k},{default:s(()=>[f(b(e(a)("setup.connect")),1)]),_:1},8,["loading","disabled"])]),_:1})]),_:1})]),_:1},8,["title"])])]),_:1})]),_:1},8,["theme","theme-overrides","locale","date-locale"]))}}),Y=D(X,[["__scopeId","data-v-adef5cda"]]);F("setup")||(q(),z(Y).mount("#app")); diff --git a/internal/relay/web-dist/assets/signup-B_5kuQTe.js b/internal/relay/web-dist/assets/signup-BSLQr0nF.js similarity index 92% rename from internal/relay/web-dist/assets/signup-B_5kuQTe.js rename to internal/relay/web-dist/assets/signup-BSLQr0nF.js index c235e5fc..64bdffa1 100644 --- a/internal/relay/web-dist/assets/signup-B_5kuQTe.js +++ b/internal/relay/web-dist/assets/signup-BSLQr0nF.js @@ -1 +1 @@ -import{ai as A,bs as u,$ as L,bf as C,aA as I,bh as g,a3 as V,c7 as o,ac as s,bS as e,h as q,a2 as l,bN as n,B,aa as f,a5 as S,a4 as U,b6 as w,ae as E,e as P,bV as M,n as F,o as T,aG as D,a1 as G}from"./mobile-guard-CHHXRZ12.js";import{s as R,A as H}from"./client-Bd6vJHn4.js";import{a as O,f as W,s as $}from"./pwa-DV81pmUS.js";import{L as j}from"./LanguageSelect-DQdfalDe.js";import{a as z,b as J,c as h,d as b}from"./FormItem-KX1KLzyv.js";const K={class:"auth-page"},Q={class:"auth-title"},X={class:"auth-subtitle"},Y={key:0,class:"auth-error",role:"alert"},Z={class:"auth-alt"},ee={href:"/login.html"},ae={class:"auth-version"},te=A({__name:"App",setup(re){const p=u(""),m=u(""),v=u(""),i=u(!1),c=u(""),_=u("dev"),{t:a}=M(),y=L(()=>O(_.value,a));C(async()=>{_.value=await W()});function k(r){if(r instanceof H){if(r.code==="email_taken")return a("auth.errors.emailTaken");if(r.code==="invite_invalid")return a("auth.errors.inviteInvalid");if(r.code==="password_weak")return a("auth.errors.passwordWeak");if(r.code==="invalid_email")return a("auth.errors.invalidEmail");if(r.code==="rate_limited")return a("auth.errors.rateLimitedShort");if(r.code==="invalid_request")return a("auth.errors.invalidRequest")}return a("auth.errors.signUpFailed")}async function N(r){if(r.preventDefault(),!i.value){c.value="",i.value=!0;try{await $(p.value,m.value,v.value);const t=new URLSearchParams(location.search).get("next");location.assign(R(t))}catch(t){c.value=k(t)}finally{i.value=!1}}}const x=I();return(r,t)=>(g(),V(e(P),{theme:e(E),"theme-overrides":e(x),locale:e(w).locale,"date-locale":e(w).dateLocale},{default:o(()=>[s(e(q),null,{default:o(()=>[l("main",K,[s(j,{class:"auth-language"}),s(e(z),{class:"auth-card",bordered:!1},{default:o(()=>[l("header",Q,[l("h1",null,n(e(a)("common.appName")),1),l("p",X,n(e(a)("auth.signUp")),1)]),s(e(J),{"label-placement":"top","require-mark-placement":"right-hanging",autocomplete:"on",novalidate:"",onSubmit:N},{default:o(()=>[s(e(h),{label:e(a)("auth.email"),"show-feedback":!1},{default:o(()=>[s(e(b),{value:p.value,"onUpdate:value":t[0]||(t[0]=d=>p.value=d),type:"text",placeholder:e(a)("auth.emailPlaceholder"),"input-props":{type:"email",required:!0,autocomplete:"username"}},null,8,["value","placeholder"])]),_:1},8,["label"]),s(e(h),{label:e(a)("auth.password"),"show-feedback":!1},{default:o(()=>[s(e(b),{value:m.value,"onUpdate:value":t[1]||(t[1]=d=>m.value=d),type:"password","show-password-on":"click","input-props":{required:!0,autocomplete:"new-password",minlength:12}},null,8,["value"])]),_:1},8,["label"]),s(e(h),{label:e(a)("auth.inviteCode"),"show-feedback":!1},{default:o(()=>[s(e(b),{value:v.value,"onUpdate:value":t[2]||(t[2]=d=>v.value=d),type:"text","input-props":{required:!0,autocomplete:"off"}},null,8,["value"])]),_:1},8,["label"]),s(e(B),{class:"submit-btn",type:"primary","attr-type":"submit",loading:i.value,disabled:i.value,block:""},{default:o(()=>[f(n(e(a)("auth.createAccount")),1)]),_:1},8,["loading","disabled"]),c.value?(g(),S("p",Y,n(c.value),1)):U("",!0),l("p",Z,[f(n(e(a)("auth.alreadyHaveAccount"))+" ",1),l("a",ee,n(e(a)("auth.signIn")),1),t[3]||(t[3]=f(". "))])]),_:1})]),_:1}),l("p",ae,n(y.value),1)])]),_:1})]),_:1},8,["theme","theme-overrides","locale","date-locale"]))}}),se=F(te,[["__scopeId","data-v-04270efb"]]);T("signup")||(D(),G(se).mount("#app")); +import{ai as A,bs as u,$ as L,bf as C,aA as I,bh as g,a3 as V,c7 as o,ac as s,bS as e,h as q,a2 as l,bN as n,B,aa as f,a5 as S,a4 as U,b6 as w,ae as E,e as P,bV as M,n as F,o as T,aG as D,a1 as G}from"./mobile-guard-BvFpjCXb.js";import{s as R,A as H}from"./client-BRiQMdFT.js";import{a as O,f as W,s as $}from"./pwa-BRtGQKIK.js";import{L as j}from"./LanguageSelect-CXI-71aS.js";import{a as z,b as J,c as h,d as b}from"./FormItem-Biv8w1Bg.js";const K={class:"auth-page"},Q={class:"auth-title"},X={class:"auth-subtitle"},Y={key:0,class:"auth-error",role:"alert"},Z={class:"auth-alt"},ee={href:"/login.html"},ae={class:"auth-version"},te=A({__name:"App",setup(re){const p=u(""),m=u(""),v=u(""),i=u(!1),c=u(""),_=u("dev"),{t:a}=M(),y=L(()=>O(_.value,a));C(async()=>{_.value=await W()});function k(r){if(r instanceof H){if(r.code==="email_taken")return a("auth.errors.emailTaken");if(r.code==="invite_invalid")return a("auth.errors.inviteInvalid");if(r.code==="password_weak")return a("auth.errors.passwordWeak");if(r.code==="invalid_email")return a("auth.errors.invalidEmail");if(r.code==="rate_limited")return a("auth.errors.rateLimitedShort");if(r.code==="invalid_request")return a("auth.errors.invalidRequest")}return a("auth.errors.signUpFailed")}async function N(r){if(r.preventDefault(),!i.value){c.value="",i.value=!0;try{await $(p.value,m.value,v.value);const t=new URLSearchParams(location.search).get("next");location.assign(R(t))}catch(t){c.value=k(t)}finally{i.value=!1}}}const x=I();return(r,t)=>(g(),V(e(P),{theme:e(E),"theme-overrides":e(x),locale:e(w).locale,"date-locale":e(w).dateLocale},{default:o(()=>[s(e(q),null,{default:o(()=>[l("main",K,[s(j,{class:"auth-language"}),s(e(z),{class:"auth-card",bordered:!1},{default:o(()=>[l("header",Q,[l("h1",null,n(e(a)("common.appName")),1),l("p",X,n(e(a)("auth.signUp")),1)]),s(e(J),{"label-placement":"top","require-mark-placement":"right-hanging",autocomplete:"on",novalidate:"",onSubmit:N},{default:o(()=>[s(e(h),{label:e(a)("auth.email"),"show-feedback":!1},{default:o(()=>[s(e(b),{value:p.value,"onUpdate:value":t[0]||(t[0]=d=>p.value=d),type:"text",placeholder:e(a)("auth.emailPlaceholder"),"input-props":{type:"email",required:!0,autocomplete:"username"}},null,8,["value","placeholder"])]),_:1},8,["label"]),s(e(h),{label:e(a)("auth.password"),"show-feedback":!1},{default:o(()=>[s(e(b),{value:m.value,"onUpdate:value":t[1]||(t[1]=d=>m.value=d),type:"password","show-password-on":"click","input-props":{required:!0,autocomplete:"new-password",minlength:12}},null,8,["value"])]),_:1},8,["label"]),s(e(h),{label:e(a)("auth.inviteCode"),"show-feedback":!1},{default:o(()=>[s(e(b),{value:v.value,"onUpdate:value":t[2]||(t[2]=d=>v.value=d),type:"text","input-props":{required:!0,autocomplete:"off"}},null,8,["value"])]),_:1},8,["label"]),s(e(B),{class:"submit-btn",type:"primary","attr-type":"submit",loading:i.value,disabled:i.value,block:""},{default:o(()=>[f(n(e(a)("auth.createAccount")),1)]),_:1},8,["loading","disabled"]),c.value?(g(),S("p",Y,n(c.value),1)):U("",!0),l("p",Z,[f(n(e(a)("auth.alreadyHaveAccount"))+" ",1),l("a",ee,n(e(a)("auth.signIn")),1),t[3]||(t[3]=f(". "))])]),_:1})]),_:1}),l("p",ae,n(y.value),1)])]),_:1})]),_:1},8,["theme","theme-overrides","locale","date-locale"]))}}),se=F(te,[["__scopeId","data-v-04270efb"]]);T("signup")||(D(),G(se).mount("#app")); diff --git a/internal/relay/web-dist/firstrun.html b/internal/relay/web-dist/firstrun.html index 4d7bb4e2..1f081c88 100644 --- a/internal/relay/web-dist/firstrun.html +++ b/internal/relay/web-dist/firstrun.html @@ -7,12 +7,12 @@ AT Term · setup - - - - - - + + + + + + diff --git a/internal/relay/web-dist/index.html b/internal/relay/web-dist/index.html index 5b18249f..bbb8e8f1 100644 --- a/internal/relay/web-dist/index.html +++ b/internal/relay/web-dist/index.html @@ -11,13 +11,13 @@ AT Term - - - - - - - + + + + + + + diff --git a/internal/relay/web-dist/login.html b/internal/relay/web-dist/login.html index 72210c58..f45c9e47 100644 --- a/internal/relay/web-dist/login.html +++ b/internal/relay/web-dist/login.html @@ -7,12 +7,12 @@ AT Term · sign in - - - - - - + + + + + + diff --git a/internal/relay/web-dist/settings.html b/internal/relay/web-dist/settings.html index bead8f18..ba11e9ac 100644 --- a/internal/relay/web-dist/settings.html +++ b/internal/relay/web-dist/settings.html @@ -7,17 +7,17 @@ AT Term · settings - - - - - - - - - - - + + + + + + + + + + + diff --git a/internal/relay/web-dist/setup.html b/internal/relay/web-dist/setup.html index 311a69a4..46ce3ca0 100644 --- a/internal/relay/web-dist/setup.html +++ b/internal/relay/web-dist/setup.html @@ -10,12 +10,12 @@ AT Term · setup - - - - - - + + + + + + diff --git a/internal/relay/web-dist/signup.html b/internal/relay/web-dist/signup.html index 01ba283d..e6bd7d79 100644 --- a/internal/relay/web-dist/signup.html +++ b/internal/relay/web-dist/signup.html @@ -7,12 +7,12 @@ AT Term · sign up - - - - - - + + + + + + diff --git a/internal/relay/web-dist/sw.js b/internal/relay/web-dist/sw.js index f6b97503..6c9f0c2c 100644 --- a/internal/relay/web-dist/sw.js +++ b/internal/relay/web-dist/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).href,e[i]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()}).then(()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s}));self.define=(n,l)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const t=s=>i(s,r),o={module:{uri:r},exports:u,require:t};e[r]=Promise.all(n.map(s=>o[s]||t(s))).then(s=>(l(...s),u))}}define(["./workbox-0bb07689"],function(s){"use strict";importScripts("notification-click.js"),self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"signup.html",revision:"30185ec7565cc87662a78c61b47400c9"},{url:"setup.html",revision:"8b28488b495d139dca5e77609ef828b4"},{url:"settings.html",revision:"7503e209ab02288a5cce3121e1b2ff8e"},{url:"notification-click.js",revision:"bb04a6b8230e48578719120cf2c820cf"},{url:"manifest.webmanifest",revision:"ee62007ccffc3e46461d5812bb890bf8"},{url:"login.html",revision:"72ac078b5245f43bee151342c36d653f"},{url:"index.html",revision:"5a54a12f401fa5347aebdbdc2b881fc4"},{url:"icon.svg",revision:"2ef190cf56a973b4e843228dc551b92e"},{url:"icon.png",revision:"9ee6de251ff079b039219fb78a2a1776"},{url:"firstrun.html",revision:"e32fab04d36950b0f9bed4e771b04321"},{url:"assets/workbox-window.prod.es5-BqEJf4Xk.js",revision:null},{url:"assets/wasm_exec-vVX9mWnE.js",revision:null},{url:"assets/wasm_exec-BVJFcdQq.js",revision:null},{url:"assets/signup-zTxZ2Ho_.css",revision:null},{url:"assets/signup-B_5kuQTe.js",revision:null},{url:"assets/setup-DUAzFJMr.js",revision:null},{url:"assets/setup-BisxzT2E.css",revision:null},{url:"assets/settings-gzwTNsbG.css",revision:null},{url:"assets/settings-BDnHo3Kr.js",revision:null},{url:"assets/pwa-DV81pmUS.js",revision:null},{url:"assets/prefsSync-C6s4W7Ql.js",revision:null},{url:"assets/opaque-CvN23u_6.js",revision:null},{url:"assets/mobile-guard-CMCsLwt1.css",revision:null},{url:"assets/mobile-guard-CHHXRZ12.js",revision:null},{url:"assets/login-C9xn7txx.js",revision:null},{url:"assets/login-B2LUhNm2.css",revision:null},{url:"assets/index-ngF1pcJG.js",revision:null},{url:"assets/index-C4Mf6kgf.css",revision:null},{url:"assets/firstrun-dxEwnRB_.css",revision:null},{url:"assets/firstrun-Cty8GPtT.js",revision:null},{url:"assets/client-Bd6vJHn4.js",revision:null},{url:"assets/admin-C5VBGqPU.css",revision:null},{url:"assets/admin--XP86shj.js",revision:null},{url:"assets/Topbar-qQtT5o6t.js",revision:null},{url:"assets/Topbar-CxSILtQc.css",revision:null},{url:"assets/Tabs-BHw_WMcN.js",revision:null},{url:"assets/Switch-_UDIVDNp.js",revision:null},{url:"assets/LanguageSelect-Oy5NNtpr.css",revision:null},{url:"assets/LanguageSelect-DQdfalDe.js",revision:null},{url:"assets/FormItem-KX1KLzyv.js",revision:null},{url:"assets/Alert-CTGJYwHC.js",revision:null},{url:"admin/index.html",revision:"ea71538bf8d11e7d83c2250225297c27"},{url:"icon.png",revision:"9ee6de251ff079b039219fb78a2a1776"},{url:"icon.svg",revision:"2ef190cf56a973b4e843228dc551b92e"},{url:"manifest.webmanifest",revision:"ee62007ccffc3e46461d5812bb890bf8"}],{}),s.cleanupOutdatedCaches()}); +if(!self.define){let s,e={};const i=(i,l)=>(i=new URL(i+".js",l).href,e[i]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()}).then(()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s}));self.define=(l,n)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const t=s=>i(s,r),o={module:{uri:r},exports:u,require:t};e[r]=Promise.all(l.map(s=>o[s]||t(s))).then(s=>(n(...s),u))}}define(["./workbox-0bb07689"],function(s){"use strict";importScripts("notification-click.js"),self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"signup.html",revision:"01fbeaa0078d4827d97a0a4a29b613f0"},{url:"setup.html",revision:"73dd0966aa162dd8458232bbbb678b4d"},{url:"settings.html",revision:"0b8ae39f13b91f5a520e926777c6b917"},{url:"notification-click.js",revision:"bb04a6b8230e48578719120cf2c820cf"},{url:"manifest.webmanifest",revision:"ee62007ccffc3e46461d5812bb890bf8"},{url:"login.html",revision:"1208d7916bbd90e5b268a45a93bb0136"},{url:"index.html",revision:"7db4ef56e7796cdc345b543d0cf2b48b"},{url:"icon.svg",revision:"2ef190cf56a973b4e843228dc551b92e"},{url:"icon.png",revision:"9ee6de251ff079b039219fb78a2a1776"},{url:"firstrun.html",revision:"ce2871a1522cbd57fa2ccb3200dc8f89"},{url:"assets/workbox-window.prod.es5-BqEJf4Xk.js",revision:null},{url:"assets/wasm_exec-vVX9mWnE.js",revision:null},{url:"assets/wasm_exec-BVJFcdQq.js",revision:null},{url:"assets/signup-zTxZ2Ho_.css",revision:null},{url:"assets/signup-BSLQr0nF.js",revision:null},{url:"assets/setup-E7dRmBVJ.js",revision:null},{url:"assets/setup-BisxzT2E.css",revision:null},{url:"assets/settings-gzwTNsbG.css",revision:null},{url:"assets/settings-DSih4K8W.js",revision:null},{url:"assets/pwa-BRtGQKIK.js",revision:null},{url:"assets/prefsSync-BGOlzhJD.js",revision:null},{url:"assets/opaque-CvN23u_6.js",revision:null},{url:"assets/mobile-guard-CMCsLwt1.css",revision:null},{url:"assets/mobile-guard-BvFpjCXb.js",revision:null},{url:"assets/login-CwA4p5L1.js",revision:null},{url:"assets/login-B2LUhNm2.css",revision:null},{url:"assets/index-LmLtimRI.js",revision:null},{url:"assets/index-C4Mf6kgf.css",revision:null},{url:"assets/firstrun-dxEwnRB_.css",revision:null},{url:"assets/firstrun-Blv5VNhr.js",revision:null},{url:"assets/client-BRiQMdFT.js",revision:null},{url:"assets/admin-YJxcuJKk.js",revision:null},{url:"assets/admin-BHn3CSbt.css",revision:null},{url:"assets/Topbar-Cz_j_mBL.js",revision:null},{url:"assets/Topbar-CxSILtQc.css",revision:null},{url:"assets/Tabs-BsN_G19n.js",revision:null},{url:"assets/Switch-CX4ypJCN.js",revision:null},{url:"assets/LanguageSelect-Oy5NNtpr.css",revision:null},{url:"assets/LanguageSelect-CXI-71aS.js",revision:null},{url:"assets/FormItem-Biv8w1Bg.js",revision:null},{url:"assets/Alert-Dj-XqAz8.js",revision:null},{url:"admin/index.html",revision:"de526eb142257ccb820961b0fbf28c0d"},{url:"icon.png",revision:"9ee6de251ff079b039219fb78a2a1776"},{url:"icon.svg",revision:"2ef190cf56a973b4e843228dc551b92e"},{url:"manifest.webmanifest",revision:"ee62007ccffc3e46461d5812bb890bf8"}],{}),s.cleanupOutdatedCaches()}); diff --git a/web/src/admin/tabs/Config.vue b/web/src/admin/tabs/Config.vue index b490a3cc..bacd13f6 100644 --- a/web/src/admin/tabs/Config.vue +++ b/web/src/admin/tabs/Config.vue @@ -1,6 +1,6 @@