2023-05-26 00:30:09 +08:00
import { r as M , w as Te , o as Ge , a as nt , i as Na , c as D , b as Ha , h as ja , d as vn , e as Ie , f as Ua , g as Me , j as Xe , k as ue , m as Ar , l as Dr , p as tr , u as We , n as q , q as _e , s as Fr , t as Wa , v as wt , x as mo , C as Va , y as Ka , z as ee , A as Nr , B as c , D as Hr , L as gn , E as Xt , F as rr , G as or , H as qa , I as Ga , J as jr , K as Xa , M as rt , N as mn , O as Ur , P as Wr , Q as Ct , R as bn , S as Pr , T as bo , U as Ya , V as yo , W as wo , X as Gt , Y as Za , Z as xo , _ as Ja , $ as Qa , a0 as el , a1 as tl , a2 as rl , a3 as ol , a4 as nl , a5 as yn , a6 as Ye , a7 as Be , a8 as S , a9 as B , aa as L , ab as Re , ac as ae , ad as Fe , ae as ve , af as ne , ag as ze , ah as j , ai as il , aj as ft , ak as Rt , al as Co , am as wn , an as So , ao as ko , ap as al , aq as Lt , ar as Je , as as Ve , at as xn , au as Po , av as ll , aw as de , ax as Cn , ay as be , az as le , aA as St , aB as sl , aC as $o , aD as Sn , aE as kn , aF as Pn , aG as bt , aH as dl , aI as cl , aJ as ul , aK as $n , aL as fl , aM as hl , aN as pl , aO as Vr , aP as Et , aQ as Ae , aR as vl , aS as Kr , aT as Yt , aU as zn , aV as gl , aW as ml , aX as zo , aY as bl , aZ as To , a _ as yl , a$ as $r , b0 as Tn , b1 as In , b2 as kt , b3 as wl , b4 as qr , b5 as Gr , b6 as Xr , b7 as Yr , b8 as _n , b9 as ce , ba as Io , bb as xl , bc as Zr , bd as oe , be as Se , bf as Ue , bg as Pe , bh as Y , bi as ye , bj as G , bk as Cl , bl as E , bm as ut , bn as ot , bo as Sl , bp as Rn , bq as kl , br as zr , bs as On , bt as Qe , bu as Jr , bv as Pl , bw as $l } from "./index-2d8e434e.js" ; let Zt = [ ] ; const Mn = new WeakMap ; function zl ( ) { Zt . forEach ( e => e ( ... Mn . get ( e ) ) ) , Zt = [ ] } function Bn ( e , ... t ) { Mn . set ( e , t ) , ! Zt . includes ( e ) && Zt . push ( e ) === 1 && requestAnimationFrame ( zl ) } function _o ( e , t ) { let { target : r } = e ; for ( ; r ; ) { if ( r . dataset && r . dataset [ t ] !== void 0 ) return ! 0 ; r = r . parentElement } return ! 1 } function Tl ( e , t = "default" , r = [ ] ) { const n = e . $slots [ t ] ; return n === void 0 ? r : n ( ) } function Il ( e ) { return t => { t ? e . value = t . $el : e . value = null } } const _l = /^(\d|\.)+$/ , Ro = /(\d|\.)+/ ; function qe ( e , { c : t = 1 , offset : r = 0 , attachPx : o = ! 0 } = { } ) { if ( typeof e == "number" ) { const n = ( e + r ) * t ; return n === 0 ? "0" : ` ${ n } px ` } else if ( typeof e == "string" ) if ( _l . test ( e ) ) { const n = ( Number ( e ) + r ) * t ; return o ? n === 0 ? "0" : ` ${ n } px ` : ` ${ n } ` } else { const n = Ro . exec ( e ) ; return n ? e . replace ( Ro , String ( ( Number ( n [ 0 ] ) + r ) * t ) ) : e } return e } let ur ; function Rl ( ) { return ur === void 0 && ( ur = navigator . userAgent . includes ( "Node.js" ) || navigator . userAgent . includes ( "jsdom" ) ) , ur } function Ol ( e , t , r ) { if ( ! t ) return e ; const o = M ( e . value ) ; let n = null ; return Te ( e , i => { n !== null && window . clearTimeout ( n ) , i === ! 0 ? r && ! r . value ? o . value = ! 0 : n = window . setTimeout ( ( ) => { o . value = ! 0 } , t ) : o . value = ! 1 } ) , o } let yt , Ot ; const Ml = ( ) => { var e , t ; yt = Na ? ( t = ( e = document ) === null || e === void 0 ? void 0 : e . fonts ) === null || t === void 0 ? void 0 : t . ready : void 0 , Ot = ! 1 , yt !== void 0 ? yt . then ( ( ) => { Ot = ! 0 } ) : Ot = ! 0 } ; Ml ( ) ; function Bl ( e ) { if ( Ot ) return ; let t = ! 1 ; Ge ( ( ) => { Ot || yt == null || yt . then ( ( ) => { t || e ( ) } ) } ) , nt ( ( ) => { t = ! 0 } ) } function nr ( e , t ) { return Te ( e , r => { r !== void 0 && ( t . value = r ) } ) , D ( ( ) => e . value === void 0 ? t . value : e . value ) } function Ll ( e , t ) { return D ( ( ) => { for ( const r of t ) if ( e [ r ] !== void 0 ) return e [ r ] ; return e [ t [ t . length - 1 ] ] } ) } function El ( e = { } , t ) { const r = Ha ( { ctrl : ! 1 , command : ! 1 , win : ! 1 , shift : ! 1 , tab : ! 1 } ) , { keydown : o , keyup : n } = e , i = a => { switch ( a . key ) { case "Control" : r . ctrl = ! 0 ; break ; case "Meta" : r . command = ! 0 , r . win = ! 0 ; break ; case "Shift" : r . shift = ! 0 ; break ; case "Tab" : r . tab = ! 0 ; break } o !== void 0 && Object . keys ( o ) . forEach ( d => { if ( d !== a . key ) return ; const u = o [ d ] ; if ( typeof u == "function" ) u ( a ) ; else { const { stop : f = ! 1 , prevent : h = ! 1 } = u ; f && a . stopPropagation ( ) , h && a . preventDefault ( ) , u . handler ( a ) } } ) } , l = a => { switch ( a . key ) { case "Control" : r . ctrl = ! 1 ; break ; case "Meta" : r . command = ! 1 , r . win = ! 1 ; break ; case "Shift" : r . shift = ! 1 ; break ; case "Tab" : r . tab = ! 1 ; break } n !== void 0 && Object . keys ( n ) . forEach ( d => { if ( d !== a . key ) return ; const u = n [ d ] ; if ( typeof u == "function" ) u ( a ) ; else { const { stop : f = ! 1 , prevent : h = ! 1 } = u ; f && a . stopPropagation ( ) , h && a . preventDefault ( ) , u . handler ( a ) } } ) } , s = ( ) => { ( t === void 0 || t . value ) && ( Me ( "keydown" , document , i ) , Me ( "keyup" , document , l ) ) , t !== void 0 && Te ( t , a => { a ? ( Me ( "keydown" , document , i ) , Me ( "keyup" , document , l ) ) : ( Ie ( "keydown" , document , i ) , Ie ( "keyup" , document , l ) ) } ) } ; return ja ( ) ? ( vn ( s ) , nt ( ( ) => { ( t === void 0 || t . value ) && ( Ie ( "keydown" , document , i ) , Ie ( "keyup" , document , l ) ) } ) ) : s ( ) , Ua ( r ) } const Al = Xe ( "n-internal-select-menu-body" ) , Ln = "__disabled__" ; function xt ( e ) { const t = ue ( Ar , null ) , r = ue (
2023-05-25 18:09:32 +08:00
display : flex ;
flex - direction : column ;
align - items : center ;
font - size : var ( -- n - font - size ) ;
` ,[B("icon", `
width : var ( -- n - icon - size ) ;
height : var ( -- n - icon - size ) ;
font - size : var ( -- n - icon - size ) ;
line - height : var ( -- n - icon - size ) ;
color : var ( -- n - icon - color ) ;
transition :
color . 3 s var ( -- n - bezier ) ;
` ,[L("+",[B("description", `
margin - top : 8 px ;
` )])]),B("description", `
transition : color . 3 s var ( -- n - bezier ) ;
color : var ( -- n - text - color ) ;
` ),B("extra", `
text - align : center ;
transition : color . 3 s var ( -- n - bezier ) ;
margin - top : 12 px ;
color : var ( -- n - extra - text - color ) ;
` )]),ef=Object.assign(Object.assign({},ae.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),io=q({name:"Empty",props:ef,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=Re(e),o=ae("Empty","-empty",Qu,Ju,e,t),{localeRef:n}=oo("Empty"),i=ue(yn,null),l=D(()=>{var u,f,h;return(u=e.description)!==null&&u!==void 0?u:(h=(f=i==null?void 0:i.mergedComponentPropsRef.value)===null||f===void 0?void 0:f.Empty)===null||h===void 0?void 0:h.description}),s=D(()=>{var u,f;return((f=(u=i==null?void 0:i.mergedComponentPropsRef.value)===null||u===void 0?void 0:u.Empty)===null||f===void 0?void 0:f.renderIcon)||(()=>c(vu,null))}),a=D(()=>{const{size:u}=e,{common:{cubicBezierEaseInOut:f},self:{[ne("iconSize",u)]:h,[ne("fontSize",u)]:p,textColor:v,iconColor:y,extraTextColor:w}}=o.value;return{"--n-icon-size":h,"--n-font-size":p,"--n-bezier":f,"--n-text-color":v,"--n-icon-color":y,"--n-extra-text-color":w}}),d=r?Fe("empty",D(()=>{let u="";const{size:f}=e;return u+=f[0],u}),a,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:s,localizedDescription:D(()=>l.value||n.value.description),cssVars:r?void 0:a,themeClass:d==null?void 0:d.themeClass,onRender:d==null?void 0:d.onRender}},render(){const{ $ slots:e,mergedClsPrefix:t,onRender:r}=this;return r==null||r(),c("div",{class:[ ` $ { t } - empty ` ,this.themeClass],style:this.cssVars},this.showIcon?c("div",{class: ` $ { t } - empty _ _icon ` },e.icon?e.icon():c(ve,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?c("div",{class: ` $ { t } - empty _ _description ` },e.default?e.default():this.localizedDescription):null,e.extra?c("div",{class: ` $ { t } - empty _ _extra ` },e.extra()):null)}}),tf={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"},rf=e=>{const{boxShadow2:t,popoverColor:r,textColor2:o,borderRadius:n,fontSize:i,dividerColor:l}=e;return Object.assign(Object.assign({},tf),{fontSize:i,borderRadius:n,color:r,dividerColor:l,textColor:o,boxShadow:t})},of={name:"Popover",common:Be,self:rf},ao=of,yr={top:"bottom",bottom:"top",left:"right",right:"left"},ke="var(--n-arrow-height) * 1.414",nf=L([S("popover", `
transition :
box - shadow . 3 s var ( -- n - bezier ) ,
background - color . 3 s var ( -- n - bezier ) ,
color . 3 s var ( -- n - bezier ) ;
position : relative ;
font - size : var ( -- n - font - size ) ;
color : var ( -- n - text - color ) ;
box - shadow : var ( -- n - box - shadow ) ;
word - break : break - word ;
` ,[L(">",[S("scrollbar", `
height : inherit ;
max - height : inherit ;
` )]),ze("raw", `
background - color : var ( -- n - color ) ;
border - radius : var ( -- n - border - radius ) ;
` ,[ze("scrollable",[ze("show-header-or-footer","padding: var(--n-padding);")])]),B("header", `
padding : var ( -- n - padding ) ;
border - bottom : 1 px solid var ( -- n - divider - color ) ;
transition : border - color . 3 s var ( -- n - bezier ) ;
` ),B("footer", `
padding : var ( -- n - padding ) ;
border - top : 1 px solid var ( -- n - divider - color ) ;
transition : border - color . 3 s var ( -- n - bezier ) ;
` ),j("scrollable, show-header-or-footer",[B("content", `
padding : var ( -- n - padding ) ;
` )])]),S("popover-shared", `
transform - origin : inherit ;
` ,[S("popover-arrow-wrapper", `
position : absolute ;
overflow : hidden ;
pointer - events : none ;
` ,[S("popover-arrow", `
transition : background - color . 3 s var ( -- n - bezier ) ;
position : absolute ;
display : block ;
width : calc ( $ { ke } ) ;
height : calc ( $ { ke } ) ;
box - shadow : 0 0 8 px 0 rgba ( 0 , 0 , 0 , . 12 ) ;
transform : rotate ( 45 deg ) ;
background - color : var ( -- n - color ) ;
pointer - events : all ;
` )]),L("&.popover-transition-enter-from, &.popover-transition-leave-to", `
opacity : 0 ;
transform : scale ( . 85 ) ;
` ),L("&.popover-transition-enter-to, &.popover-transition-leave-from", `
transform : scale ( 1 ) ;
opacity : 1 ;
` ),L("&.popover-transition-enter-active", `
transition :
box - shadow . 3 s var ( -- n - bezier ) ,
background - color . 3 s var ( -- n - bezier ) ,
color . 3 s var ( -- n - bezier ) ,
opacity . 15 s var ( -- n - bezier - ease - out ) ,
transform . 15 s var ( -- n - bezier - ease - out ) ;
` ),L("&.popover-transition-leave-active", `
transition :
box - shadow . 3 s var ( -- n - bezier ) ,
background - color . 3 s var ( -- n - bezier ) ,
color . 3 s var ( -- n - bezier ) ,
opacity . 15 s var ( -- n - bezier - ease - in ) ,
transform . 15 s var ( -- n - bezier - ease - in ) ;
` )]),je("top-start", `
top : calc ( $ { ke } / - 2 ) ;
left : calc ( $ { Ze ( "top-start" ) } - var ( -- v - offset - left ) ) ;
` ),je("top", `
top : calc ( $ { ke } / - 2 ) ;
transform : translateX ( calc ( $ { ke } / - 2 ) ) rotate ( 45 deg ) ;
left : 50 % ;
` ),je("top-end", `
top : calc ( $ { ke } / - 2 ) ;
right : calc ( $ { Ze ( "top-end" ) } + var ( -- v - offset - left ) ) ;
` ),je("bottom-start", `
bottom : calc ( $ { ke } / - 2 ) ;
left : calc ( $ { Ze ( "bottom-start" ) } - var ( -- v - offset - left ) ) ;
` ),je("bottom", `
bottom : calc ( $ { ke } / - 2 ) ;
transform : translateX ( calc ( $ { ke } / - 2 ) ) rotate ( 45 deg ) ;
left : 50 % ;
` ),je("bottom-end", `
bottom : calc ( $ { ke } / - 2 ) ;
right : calc ( $ { Ze ( "bottom-end" ) } + var ( -- v - offset - left ) ) ;
` ),je("left-start", `
left : calc ( $ { ke } / - 2 ) ;
top : calc ( $ { Ze ( "left-start" ) } - var ( -- v - offset - top ) ) ;
` ),je("left", `
left : calc ( $ { ke } / - 2 ) ;
transform : translateY ( calc ( $ { ke } / - 2 ) ) rotate ( 45 deg ) ;
top : 50 % ;
` ),je("left-end", `
left : calc ( $ { ke } / - 2 ) ;
bottom : calc ( $ { Ze ( "left-end" ) } + var ( -- v - offset - top ) ) ;
` ),je("right-start", `
right : calc ( $ { ke } / - 2 ) ;
top : calc ( $ { Ze ( "right-start" ) } - var ( -- v - offset - top ) ) ;
` ),je("right", `
right : calc ( $ { ke } / - 2 ) ;
transform : translateY ( calc ( $ { ke } / - 2 ) ) rotate ( 45 deg ) ;
top : 50 % ;
` ),je("right-end", `
right : calc ( $ { ke } / - 2 ) ;
bottom : calc ( $ { Ze ( "right-end" ) } + var ( -- v - offset - top ) ) ;
` ),...mc({top:["right-start","left-start"],right:["top-end","bottom-end"],bottom:["right-end","left-end"],left:["top-start","bottom-start"]},(e,t)=>{const r=["right","left"].includes(t),o=r?"width":"height";return e.map(n=>{const i=n.split("-")[1]==="end",s= ` calc ( ( $ { ` var(--v-target- ${ o } , 0px) ` } - $ { ke } ) / 2 ) ` ,a=Ze(n);return L( ` [ v - placement = "${n}" ] > ` ,[S("popover-shared",[j("center-arrow",[S("popover-arrow", ` $ { t } : calc ( max ( $ { s } , $ { a } ) $ { i ? "+" : "-" } var ( -- v - offset - $ { r ? "left" : "top" } ) ) ; ` )])])])})})]);function Ze(e){return["top","bottom"].includes(e.split("-")[0])?"var(--n-arrow-offset)":"var(--n-arrow-offset-vertical)"}function je(e,t){const r=e.split("-")[0],o=["top","bottom"].includes(r)?"height: var(--n-space-arrow);":"width: var(--n-space-arrow);";return L( ` [ v - placement = "${e}" ] > ` ,[S("popover-shared", `
margin - $ { yr [ r ] } : var ( -- n - space ) ;
` ,[j("show-arrow", `
margin - $ { yr [ r ] } : var ( -- n - space - arrow ) ;
` ),j("overlap", `
margin : 0 ;
` ),il("popover-arrow-wrapper", `
right : 0 ;
left : 0 ;
top : 0 ;
bottom : 0 ;
$ { r } : 100 % ;
$ { yr [ r ] } : auto ;
$ { o }
` ,[S("popover-arrow",t)])])])}const si=Object.assign(Object.assign({},ae.props),{to:xt.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentStyle:[Object,String],headerStyle:[Object,String],footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number}),di=({arrowStyle:e,clsPrefix:t})=>c("div",{key:"__popover-arrow__",class: ` $ { t } - popover - arrow - wrapper ` },c("div",{class: ` $ { t } - popover - arrow ` ,style:e})),af=q({name:"PopoverBody",inheritAttrs:!1,props:si,setup(e,{slots:t,attrs:r}){const{namespaceRef:o,mergedClsPrefixRef:n,inlineThemeDisabled:i}=Re(e),l=ae("Popover","-popover",nf,ao,e,n),s=M(null),a=ue("NPopover"),d=M(null),u=M(e.show),f=M(!1);ft(()=>{const{show: $ }=e; $ &&!Rl()&&!e.internalDeactivateImmediately&&(f.value=!0)});const h=D(()=>{const{trigger: $ ,onClickoutside:A}=e,z=[],{positionManuallyRef:{value:_}}=a;return _||( $ ==="click"&&!A&&z.push([Co,b,void 0,{capture:!0}]), $ ==="hover"&&z.push([jl,k])),A&&z.push([Co,b,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&f.value)&&z.push([wn,e.show]),z}),p=D(()=>{const $ =e.width==="trigger"?void 0:qe(e.width),A=[]; $ &&A.push({width: $ });const{maxWidth:z,minWidth:_}=e;return z&&A.push({maxWidth:qe(z)}),_&&A.push({maxWidth:qe(_)}),i||A.push(v.value),A}),v=D(()=>{const{common:{cubicBezierEaseInOut: $ ,cubicBezierEaseIn:A,cubicBezierEaseOut:z},self:{space:_,spaceArrow:K,padding:F,fontSize:O,textColor:C,dividerColor:T,color:H,boxShadow:N,borderRadius:X,arrowHeight:te,arrowOffset:ge,arrowOffsetVertical:W}}=l.value;return{"--n-box-shadow":N,"--n-bezier": $ ,"--n-bezier-ease-in":A,"--n-bezier-ease-out":z,"--n-font-size":O,"--n-text-color":C,"--n-color":H,"--n-divider-color":T,"--n-border-radius":X,"--n-arrow-height":te,"--n-arrow-offset":ge,"--n-arrow-offset-vertical":W,"--n-padding":F,"--n-space":_,"--n-space-arrow":K}}),y=i?Fe("popover",void 0,v,e):void 0;a.setBodyInstance({syncPosition:w}),nt(()=>{a.setBodyInstance(null)}),Te(ee(e,"show"), $ =>{e.animated||( $ ?u.value=!0:u.value=!1)});function w(){var $ ;( $ =s.value)===null|| $ ===void 0|| $ .syncPosition()}function x( $ ){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&a.handleMouseEnter( $ )}function P( $ ){e.trigger==="hover"&&e.keepAliveOnHover&&a.handleMouseLeave( $ )}function k( $ ){e.trigger==="hover"&&!m().contains(So( $ ))&&a.handleMouseMoveOutside( $ )}function b( $ ){(e.trigger==="click"&&!m().contains(So( $ ))||e.onClickoutside)&&a.handleClickOutside( $ )}function m(){return a.getTriggerElement()}_e(tr,d),_e(Dr,null),_e(Ar,null);function R(){if(y==null||y.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&f.value))return null;let A;const z=a.internalRenderBodyRef.value,{value:_}=n;if(z)A=z([ ` $ { _ } - popover - shared ` ,y==null?void 0:y.themeClass.value,e.overlap&& ` $ { _ } - popover - shared -- overlap ` ,e.showArrow&& ` $ { _ } - popover - shared -- show - arrow ` ,e.arrowPointToCenter&& ` $ { _ } - popover - shared -- center - arrow ` ],d,p.value,x,P);else{const{value:K}=a.extraClassRef,{internalTrapFocus:F}=e,O=!ko(t.header)||!ko(t.footer),C=()=>{var T;const H=O?c(Ve,null,Je(t.header,te=>te?c("div",{class: ` $ { _ } - popover _ _header ` ,style:e.headerStyle},te):null),Je(t.default,te=>te?c("div",{class: ` $ { _ } - popover _ _content ` ,style:e.contentStyle},t):null),Je(t.footer,te=>te?c("div",{class: ` $ { _ } - popover _ _footer ` ,style:e.footerStyle},te):null)):e.scrollable?(T=t.default)===null||T===void 0?void 0:T.call(t):c("div",{class: ` $ { _ } - popover _ _content ` ,style:e.contentStyle},t),N=e.scrollable?c(xn,{contentClass:O?void 0: ` $ { _ } - popover _ _content ` ,contentStyle:O?void 0:e.contentStyle},{default:()=>H}):H,X=e.showArrow?di({arrowStyle:e.arrowStyle,clsPrefix:_}):null;return[N,X]};A=c("div",Lt({class:[ ` $ { _ } - popover ` , ` $ { _ } - popover - shared ` ,y==null?void 0:y.themeClass.value,K.map(T=> ` $ { _ } - $ { T } ` ),{[ ` $ { _ } - popover -- scrollable ` ]:
white - space : nowrap ;
position : relative ;
box - sizing : border - box ;
cursor : default ;
display : inline - flex ;
align - items : center ;
flex - wrap : nowrap ;
padding : var ( -- n - padding ) ;
border - radius : var ( -- n - border - radius ) ;
color : var ( -- n - text - color ) ;
background - color : var ( -- n - color ) ;
transition :
border - color . 3 s var ( -- n - bezier ) ,
background - color . 3 s var ( -- n - bezier ) ,
color . 3 s var ( -- n - bezier ) ,
box - shadow . 3 s var ( -- n - bezier ) ,
opacity . 3 s var ( -- n - bezier ) ;
line - height : 1 ;
height : var ( -- n - height ) ;
font - size : var ( -- n - font - size ) ;
` ,[j("strong", `
font - weight : var ( -- n - font - weight - strong ) ;
` ),B("border", `
pointer - events : none ;
position : absolute ;
left : 0 ;
right : 0 ;
top : 0 ;
bottom : 0 ;
border - radius : inherit ;
border : var ( -- n - border ) ;
transition : border - color . 3 s var ( -- n - bezier ) ;
` ),B("icon", `
display : flex ;
margin : 0 4 px 0 0 ;
color : var ( -- n - text - color ) ;
transition : color . 3 s var ( -- n - bezier ) ;
font - size : var ( -- n - avatar - size - override ) ;
` ),B("avatar", `
display : flex ;
margin : 0 6 px 0 0 ;
` ),B("close", `
margin : var ( -- n - close - margin ) ;
transition :
background - color . 3 s var ( -- n - bezier ) ,
color . 3 s var ( -- n - bezier ) ;
` ),j("round", `
padding : 0 calc ( var ( -- n - height ) / 3 ) ;
border - radius : calc ( var ( -- n - height ) / 2 ) ;
` ,[B("icon", `
margin : 0 4 px 0 calc ( ( var ( -- n - height ) - 8 px ) / - 2 ) ;
` ),B("avatar", `
margin : 0 6 px 0 calc ( ( var ( -- n - height ) - 8 px ) / - 2 ) ;
` ),j("closable", `
padding : 0 calc ( var ( -- n - height ) / 4 ) 0 calc ( var ( -- n - height ) / 3 ) ;
` )]),j("icon, avatar",[j("round", `
padding : 0 calc ( var ( -- n - height ) / 3 ) 0 calc ( var ( -- n - height ) / 2 ) ;
` )]),j("disabled", `
cursor : not - allowed ! important ;
opacity : var ( -- n - opacity - disabled ) ;
` ),j("checkable", `
cursor : pointer ;
box - shadow : none ;
color : var ( -- n - text - color - checkable ) ;
background - color : var ( -- n - color - checkable ) ;
` ,[ze("disabled",[L("&:hover","background-color: var(--n-color-hover-checkable);",[ze("checked","color: var(--n-text-color-hover-checkable);")]),L("&:active","background-color: var(--n-color-pressed-checkable);",[ze("checked","color: var(--n-text-color-pressed-checkable);")])]),j("checked", `
color : var ( -- n - text - color - checked ) ;
background - color : var ( -- n - color - checked ) ;
` ,[ze("disabled",[L("&:hover","background-color: var(--n-color-checked-hover);"),L("&:active","background-color: var(--n-color-checked-pressed);")])])])]),bf=Object.assign(Object.assign(Object.assign({},ae.props),gf),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),yf=Xe("n-tag"),er=q({name:"Tag",props:bf,setup(e){const t=M(null),{mergedBorderedRef:r,mergedClsPrefixRef:o,inlineThemeDisabled:n,mergedRtlRef:i}=Re(e),l=ae("Tag","-tag",mf,vf,e,o);_e(yf,{roundRef:ee(e,"round")});function s(p){if(!e.disabled&&e.checkable){const{checked:v,onCheckedChange:y,onUpdateChecked:w,"onUpdate:checked":x}=e;w&&w(!v),x&&x(!v),y&&y(!v)}}function a(p){if(e.triggerClickOnClose||p.stopPropagation(),!e.disabled){const{onClose:v}=e;v&&be(v,p)}}const d={setTextContent(p){const{value:v}=t;v&&(v.textContent=p)}},u=St("Tag",i,o),f=D(()=>{const{type:p,size:v,color:{color:y,textColor:w}={}}=e,{common:{cubicBezierEaseInOut:x},self:{padding:P,closeMargin:k,closeMarginRtl:b,borderRadius:m,opacityDisabled:R,textColorCheckable: $ ,textColorHoverCheckable:A,textColorPressedCheckable:z,textColorChecked:_,colorCheckable:K,colorHoverCheckable:F,colorPressedCheckable:O,colorChecked:C,colorCheckedHover:T,colorCheckedPressed:H,closeBorderRadius:N,fontWeightStrong:X,[ne("colorBordered",p)]:te,[ne("closeSize",v)]:ge,[ne("closeIconSize",v)]:W,[ne("fontSize",v)]:Q,[ne("height",v)]:se,[ne("color",p)]:ie,[ne("textColor",p)]:we,[ne("border",p)]:Ce,[ne("closeIconColor",p)]:re,[ne("closeIconColorHover",p)]:Le,[ne("closeIconColorPressed",p)]:Ne,[ne("closeColorHover",p)]:He,[ne("closeColorPressed",p)]:Ee}}=l.value;return{"--n-font-weight-strong":X,"--n-avatar-size-override": ` calc ( $ { se } - 8 px ) ` ,"--n-bezier":x,"--n-border-radius":m,"--n-border":Ce,"--n-close-icon-size":W,"--n-close-color-pressed":Ee,"--n-close-color-hover":He,"--n-close-border-radius":N,"--n-close-icon-color":re,"--n-close-icon-color-hover":Le,"--n-close-icon-color-pressed":Ne,"--n-close-icon-color-disabled":re,"--n-close-margin":k,"--n-close-margin-rtl":b,"--n-close-size":ge,"--n-color":y||(r.value?te:ie),"--n-color-checkable":K,"--n-color-checked":C,"--n-color-checked-hover":T,"--n-color-checked-pressed":H,"--n-color-hover-checkable":F,"--n-color-pressed-checkable":O,"--n-font-size":Q,"--n-height":se,"--n-opacity-disabled":R,"--n-padding":P,"--n-text-color":w||we,"--n-text-color-checkable": $ ,"--n-text-color-checked":_,"--n-text-color-hover-checkable":A,"--n-text-color-pressed-checkable":z}}),h=n?Fe("tag",D(()=>{let p="";const{type:v,size:y,color:{color:w,textColor:x}={}}=e;return p+=v[0],p+=y[0],w&&(p+= ` a$ { $o ( w ) } ` ),x&&(p+= ` b$ { $o ( x ) } ` ),r.value&&(p+="c"),p}),f,e):void 0;return Object.assign(Object.assign({},d),{rtlEnabled:u,mergedClsPrefix:o,contentRef:t,mergedBordered:r,handleClick:s,handleCloseClick:a,cssVars:n?void 0:f,themeClass:h==null?void 0:h.themeClass,onRender:h==null?void 0:h.onRender})},render(){var e,t;const{mergedClsPrefix:r,rtlEnabled:o,closable:n,color:{borderColor:i}={},round:l,onRender:s, $ slots:a}=this;s==null||s();const d=Je(a.avatar,f=>f&&c("div",{class: ` $ { r } - tag _ _avatar ` },f)),u=Je(a.icon,f=>f&&c("div",{class: ` $ { r } - tag _ _icon ` },f));return c("div",{class:[ ` $ { r } - tag ` ,this.themeClass,{[ ` $ { r } - tag -- rtl ` ]:o,[ ` $ { r } - tag -- strong ` ]:this.strong,[ ` $ { r } - tag -- disabled ` ]:this.disabled,[ ` $ { r } - tag -- checkable ` ]:this.checkable,[ ` $ { r } - tag -- checked ` ]:this.checkable&&this.checked,[ ` $ { r } - tag -- round ` ]:l,[ ` $ { r } - tag -- avatar ` ]:d,[ ` $ { r } - tag -- icon ` ]:u,[ ` $ { r } - tag -- closable ` ]:n}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},u||d,c("span",{class: ` $ { r } - tag _ _content ` ,ref:"contentRef"},(t=(e=this. $ slots).default)===null||t===void 0?void 0:t.call(e)),!this.checkable&&n?c(sl,{clsPrefix:r,class: ` $ { r } - tag _ _close ` ,disabled:this.disabled,onClick:this.handleCl
flex - shrink : 0 ;
height : 1 em ;
width : 1 em ;
position : relative ;
` ,[L(">",[B("clear", `
font - size : var ( -- n - clear - size ) ;
height : 1 em ;
width : 1 em ;
cursor : pointer ;
color : var ( -- n - clear - color ) ;
transition : color . 3 s var ( -- n - bezier ) ;
display : flex ;
` ,[L("&:hover", `
color : var ( -- n - clear - color - hover ) ! important ;
` ),L("&:active", `
color : var ( -- n - clear - color - pressed ) ! important ;
` )]),B("placeholder", `
display : flex ;
` ),B("clear, placeholder", `
position : absolute ;
left : 50 % ;
top : 50 % ;
transform : translateX ( - 50 % ) translateY ( - 50 % ) ;
` ,[Sn({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),Mr=q({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return kn("-base-clear",wf,ee(e,"clsPrefix")),{handleMouseDown(t){t.preventDefault()}}},render(){const{clsPrefix:e}=this;return c("div",{class: ` $ { e } - base - clear ` },c(Pn,null,{default:()=>{var t,r;return this.show?c("div",{key:"dismiss",class: ` $ { e } - base - clear _ _clear ` ,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},bt(this. $ slots.icon,()=>[c(ve,{clsPrefix:e},{default:()=>c(bu,null)})])):c("div",{key:"icon",class: ` $ { e } - base - clear _ _placeholder ` },(r=(t=this. $ slots).placeholder)===null||r===void 0?void 0:r.call(t))}}))}}),xf=q({name:"InternalSelectionSuffix",props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{const{clsPrefix:r}=e;return c(dl,{clsPrefix:r,class: ` $ { r } - base - suffix ` ,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?c(Mr,{clsPrefix:r,show:e.showClear,onClear:e.onClear},{placeholder:()=>c(ve,{clsPrefix:r,class: ` $ { r } - base - suffix _ _arrow ` },{default:()=>bt(t.default,()=>[c(mu,null)])})}):null})}}}),Cf={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"},Sf=e=>{const{textColor2:t,textColor3:r,textColorDisabled:o,primaryColor:n,primaryColorHover:i,inputColor:l,inputColorDisabled:s,borderColor:a,warningColor:d,warningColorHover:u,errorColor:f,errorColorHover:h,borderRadius:p,lineHeight:v,fontSizeTiny:y,fontSizeSmall:w,fontSizeMedium:x,fontSizeLarge:P,heightTiny:k,heightSmall:b,heightMedium:m,heightLarge:R,actionColor: $ ,clearColor:A,clearColorHover:z,clearColorPressed:_,placeholderColor:K,placeholderColorDisabled:F,iconColor:O,iconColorDisabled:C,iconColorHover:T,iconColorPressed:H}=e;return Object.assign(Object.assign({},Cf),{countTextColorDisabled:o,countTextColor:r,heightTiny:k,heightSmall:b,heightMedium:m,heightLarge:R,fontSizeTiny:y,fontSizeSmall:w,fontSizeMedium:x,fontSizeLarge:P,lineHeight:v,lineHeightTextarea:v,borderRadius:p,iconSize:"16px",groupLabelColor: $ ,groupLabelTextColor:t,textColor:t,textColorDisabled:o,textDecorationColor:t,caretColor:n,placeholderColor:K,placeholderColorDisabled:F,color:l,colorDisabled:s,colorFocus:l,groupLabelBorder: ` 1 px solid $ { a } ` ,border: ` 1 px solid $ { a } ` ,borderHover: ` 1 px solid $ { i } ` ,borderDisabled: ` 1 px solid $ { a } ` ,borderFocus: ` 1 px solid $ { i } ` ,boxShadowFocus: ` 0 0 0 2 px $ { le ( n , { alpha : . 2 } ) } ` ,loadingColor:n,loadingColorWarning:d,borderWarning: ` 1 px solid $ { d } ` ,borderHoverWarning: ` 1 px solid $ { u } ` ,colorFocusWarning:l,borderFocusWarning: ` 1 px solid $ { u } ` ,boxShadowFocusWarning: ` 0 0 0 2 px $ { le ( d , { alpha : . 2 } ) } ` ,caretColorWarning:d,loadingColorError:f,borderError: ` 1 px solid $ { f } ` ,borderHoverError: ` 1 px solid $ { h } ` ,colorFocusError:l,borderFocusError: ` 1 px solid $ { h } ` ,boxShadowFocusError: ` 0 0 0 2 px $ { le ( f , { alpha : . 2 } ) } ` ,caretColorError:f,clearColor:A,clearColorHover:z,clearColorPressed:_,iconColor:O,iconColorDisabled:C,iconColorHover:T,iconColorPressed:H,suffixTextColor:t})},kf={name:"Input",common:Be,self:Sf},Pf=kf,ui=Xe("n-input");function $ f(e){let t=0;for(const r of e)t++;return t}function Wt(e){return e===""||e==null}function zf(e){const t=M(null);function r(){const{value:i}=e;if(!(i!=null&&i.focus)){n();return}const{selectionStart:l,selectionEnd:s,value:a}=i;if(l==null||s==null){n();return}t.value={start:l,end:s,beforeText:a.slice(0,l),afterText:a.slice(s)}}function o(){var i;const{value:l}=t,{value:s}=e;if(!l||!s)return;const{value:a}=s,{start:d,beforeText:u,afterText:f}=l;let h=a.length;if(a.endsWith(f))h=a.length-f.length;else if(a.startsWith(u))h=u.length;else{const p=u[d-1],v=a.indexOf(p,d-1);v!==-1&&(h=v+1)}(i=s.setSelectionRange)===null||i===void 0||i.call(s,h,h)}function n(){t.value=null}return Te(e,n),{recordCursor:r,restoreCursor:o}}const Qo=q({name:"InputWordCount",setup(e,{slots:t}){const{mergedValueRef:r,maxlengthRef:o,mergedClsPrefixRef:n,countGrapheme
max - width : 100 % ;
cursor : text ;
line - height : 1.5 ;
z - index : auto ;
outline : none ;
box - sizing : border - box ;
position : relative ;
display : inline - flex ;
border - radius : var ( -- n - border - radius ) ;
background - color : var ( -- n - color ) ;
transition : background - color . 3 s var ( -- n - bezier ) ;
font - size : var ( -- n - font - size ) ;
-- n - padding - vertical : calc ( ( var ( -- n - height ) - 1.5 * var ( -- n - font - size ) ) / 2 ) ;
` ,[B("input, textarea", `
overflow : hidden ;
flex - grow : 1 ;
position : relative ;
` ),B("input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder", `
box - sizing : border - box ;
font - size : inherit ;
line - height : 1.5 ;
font - family : inherit ;
border : none ;
outline : none ;
background - color : # 0000 ;
text - align : inherit ;
transition :
- webkit - text - fill - color . 3 s var ( -- n - bezier ) ,
caret - color . 3 s var ( -- n - bezier ) ,
color . 3 s var ( -- n - bezier ) ,
text - decoration - color . 3 s var ( -- n - bezier ) ;
` ),B("input-el, textarea-el", `
- webkit - appearance : none ;
scrollbar - width : none ;
width : 100 % ;
min - width : 0 ;
text - decoration - color : var ( -- n - text - decoration - color ) ;
color : var ( -- n - text - color ) ;
caret - color : var ( -- n - caret - color ) ;
background - color : transparent ;
` ,[L("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb", `
width : 0 ;
height : 0 ;
display : none ;
` ),L("&::placeholder", `
color : # 0000 ;
- webkit - text - fill - color : transparent ! important ;
` ),L("&:-webkit-autofill ~",[B("placeholder","display: none;")])]),j("round",[ze("textarea","border-radius: calc(var(--n-height) / 2);")]),B("placeholder", `
pointer - events : none ;
position : absolute ;
left : 0 ;
right : 0 ;
top : 0 ;
bottom : 0 ;
overflow : hidden ;
color : var ( -- n - placeholder - color ) ;
` ,[L("span", `
width : 100 % ;
display : inline - block ;
` )]),j("textarea",[B("placeholder","overflow: visible;")]),ze("autosize","width: 100%;"),j("autosize",[B("textarea-el, input-el", `
position : absolute ;
top : 0 ;
left : 0 ;
height : 100 % ;
` )]),S("input-wrapper", `
overflow : hidden ;
display : inline - flex ;
flex - grow : 1 ;
position : relative ;
padding - left : var ( -- n - padding - left ) ;
padding - right : var ( -- n - padding - right ) ;
` ),B("input-mirror", `
padding : 0 ;
height : var ( -- n - height ) ;
line - height : var ( -- n - height ) ;
overflow : hidden ;
visibility : hidden ;
position : static ;
white - space : pre ;
pointer - events : none ;
` ),B("input-el", `
padding : 0 ;
height : var ( -- n - height ) ;
line - height : var ( -- n - height ) ;
` ,[L("+",[B("placeholder", `
display : flex ;
align - items : center ;
` )])]),ze("textarea",[B("placeholder","white-space: nowrap;")]),B("eye", `
transition : color . 3 s var ( -- n - bezier ) ;
` ),j("textarea","width: 100%;",[S("input-word-count", `
position : absolute ;
right : var ( -- n - padding - right ) ;
bottom : var ( -- n - padding - vertical ) ;
` ),j("resizable",[S("input-wrapper", `
resize : vertical ;
min - height : var ( -- n - height ) ;
` )]),B("textarea-el, textarea-mirror, placeholder", `
height : 100 % ;
padding - left : 0 ;
padding - right : 0 ;
padding - top : var ( -- n - padding - vertical ) ;
padding - bottom : var ( -- n - padding - vertical ) ;
word - break : break - word ;
display : inline - block ;
vertical - align : bottom ;
box - sizing : border - box ;
line - height : var ( -- n - line - height - textarea ) ;
margin : 0 ;
resize : none ;
white - space : pre - wrap ;
` ),B("textarea-mirror", `
width : 100 % ;
pointer - events : none ;
overflow : hidden ;
visibility : hidden ;
position : static ;
white - space : pre - wrap ;
overflow - wrap : break - word ;
` )]),j("pair",[B("input-el, placeholder","text-align: center;"),B("separator", `
display : flex ;
align - items : center ;
transition : color . 3 s var ( -- n - bezier ) ;
color : var ( -- n - text - color ) ;
white - space : nowrap ;
` ,[S("icon", `
color : var ( -- n - icon - color ) ;
` ),S("base-icon", `
color : var ( -- n - icon - color ) ;
` )])]),j("disabled", `
cursor : not - allowed ;
background - color : var ( -- n - color - disabled ) ;
` ,[B("border","border: var(--n-border-disabled);"),B("input-el, textarea-el", `
cursor : not - allowed ;
color : var ( -- n - text - color - disabled ) ;
text - decoration - color : var ( -- n - text - color - disabled ) ;
` ),B("placeholder","color: var(--n-placeholder-color-disabled);"),B("separator","color: var(--n-text-color-disabled);",[S("icon", `
color : var ( -- n - icon - color - disabled ) ;
` ),S("base-icon", `
color : var ( -- n - icon - color - disabled ) ;
` )]),S("input-word-count", `
color : var ( -- n - count - text - color - disabled ) ;
` ),B("suffix, prefix","color: var(--n-text-color-disabled);",[S("icon", `
color : var ( -- n - icon - color - disabled ) ;
` ),S("internal-icon", `
color : var ( -- n - icon - color - disabled ) ;
` )])]),ze("disabled",[B("eye", `
display : flex ;
align - items : center ;
justify - content : center ;
color : var ( -- n - icon - color ) ;
cursor : pointer ;
` ,[L("&:hover", `
color : var ( -- n - icon - color - hover ) ;
` ),L("&:active", `
color : var ( -- n - icon - color - pressed ) ;
` )]),L("&:hover",[B("state-border","border: var(--n-border-hover);")]),j("focus","background-color: var(--n-color-focus);",[B("state-border", `
border : var ( -- n - border - focus ) ;
box - shadow : var ( -- n - box - shadow - focus ) ;
` )])]),B("border, state-border", `
box - sizing : border - box ;
position : absolute ;
left : 0 ;
right : 0 ;
top : 0 ;
bottom : 0 ;
pointer - events : none ;
border - radius : inherit ;
border : var ( -- n - border ) ;
transition :
box - shadow . 3 s var ( -- n - bezier ) ,
border - color . 3 s var ( -- n - bezier ) ;
` ),B("state-border", `
border - color : # 0000 ;
z - index : 1 ;
` ),B("prefix","margin-right: 4px;"),B("suffix", `
margin - left : 4 px ;
` ),B("suffix, prefix", `
transition : color . 3 s var ( -- n - bezier ) ;
flex - wrap : nowrap ;
flex - shrink : 0 ;
line - height : var ( -- n - height ) ;
white - space : nowrap ;
display : inline - flex ;
align - items : center ;
justify - content : center ;
color : var ( -- n - suffix - text - color ) ;
` ,[S("base-loading", `
font - size : var ( -- n - icon - size ) ;
margin : 0 2 px ;
color : var ( -- n - loading - color ) ;
` ),S("base-clear", `
font - size : var ( -- n - icon - size ) ;
` ,[B("placeholder",[S("base-icon", `
transition : color . 3 s var ( -- n - bezier ) ;
color : var ( -- n - icon - color ) ;
font - size : var ( -- n - icon - size ) ;
` )])]),L(">",[S("icon", `
transition : color . 3 s var ( -- n - bezier ) ;
color : var ( -- n - icon - color ) ;
font - size : var ( -- n - icon - size ) ;
` )]),S("base-icon", `
font - size : var ( -- n - icon - size ) ;
` )]),S("input-word-count", `
pointer - events : none ;
line - height : 1.5 ;
font - size : . 85 em ;
color : var ( -- n - count - text - color ) ;
transition : color . 3 s var ( -- n - bezier ) ;
margin - left : 4 px ;
font - variant : tabular - nums ;
` ),["warning","error"].map(e=>j( ` $ { e } - status ` ,[ze("disabled",[S("base-loading", `
color : var ( -- n - loading - color - $ { e } )
` ),B("input-el, textarea-el", `
caret - color : var ( -- n - caret - color - $ { e } ) ;
` ),B("state-border", `
border : var ( -- n - border - $ { e } ) ;
` ),L("&:hover",[B("state-border", `
border : var ( -- n - border - hover - $ { e } ) ;
` )]),L("&:focus", `
background - color : var ( -- n - color - focus - $ { e } ) ;
` ,[B("state-border", `
box - shadow : var ( -- n - box - shadow - focus - $ { e } ) ;
border : var ( -- n - border - focus - $ { e } ) ;
` )]),j("focus", `
background - color : var ( -- n - color - focus - $ { e } ) ;
` ,[B("state-border", `
box - shadow : var ( -- n - box - shadow - focus - $ { e } ) ;
border : var ( -- n - border - focus - $ { e } ) ;
` )])])]))]),If=S("input",[j("disabled",[B("input-el, textarea-el", `
- webkit - text - fill - color : var ( -- n - text - color - disabled ) ;
` )])]),_f=Object.assign(Object.assign({},ae.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:Function,onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:Boolean,showPasswordToggle:Boolean}),et=q({name:"Input",props:_f,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:r,inlineThemeDisabled:o,mergedRtlRef:n}=Re(e),i=ae("Input","-input",Tf,Pf,e,t);ul&&kn("-input-safari",If,t);const l=M(null),s=M(null),a=M(null),d=M(null),u=M(null),f=M(null),h=M(null),p=zf(h),v=M(null),{localeRef:y}=oo("Input"),w=M(e.defaultValue),x=ee(e,"value"),P=nr(x,w),k= $ n(e),{mergedSizeRef:b,mergedDisabledRef:m,mergedStatusRef:R}=k, $ =M(!1),A=M(!1),z=M(!1),_=M(!1);let K=null;const F=D(()=>{const{placeholder:g,pair:I}=e;return I?Array.isArray(g)?g:g===void 0?["",""]:[g,g]:g===void 0?[y.value.placeholder]:[g]}),O=D(()=>{const{value:g}=z,{value:I}=P,{value:Z}=F;return!g&&(Wt(I)||Array.isArray(I)&&Wt(I[0]))&&Z[0]}),C=D(()=>{const{value:g}=z,{value:I}=P,{value:Z}=F;return!g&&Z[1]&&(Wt(I)||Array.isArray(I)&&Wt(I[1]))}),T=We(()=>e.internalForceFocus|| $ .value),H=We(()=>{if(m.value||e.readonly||!e.clearable||!T.value&&!A.value)return!1;const{value:g}=P,{value:I}=T;return e.pair?!!(Array.isArray(g)&&(g[0]||g[1]))&&(A.value||I):!!g&&(A.value||I)}),N=D(()=>{const{showPasswordOn:g}=e;if(g)return g;if(e.showPasswordToggle)return"click"}),X=M(!1),te=D(()=>{const{textDecoration:g}=e;return g?Array.isArray(g)?g.map(I=>({textDecoration:I})):[{textDecoration:g}]:["",""]}),ge=M(void 0),W=()=>{var g,I;if(e.type==="textarea"){const{autosize:Z}=e;if(Z&&(ge.value=(I=(g=v.value)===null||g===void 0?void 0:g. $ el)===null||I===void 0?void 0:I.offsetWidth),!s.value||typeof Z=="boolean")return;const{paddingTop:me,paddingBottom:xe,lineHeight:pe}=window.getComputedStyle(s.value),it=Number(me.slice(0,-2)),at=Number(xe.slice(0,-2)),lt=Number(pe.slice(0,-2)),{value:zt}=a;if(!zt)return;if(Z.minRows){const Tt=Math.max(Z.minRows,1),cr= ` $ { it + at + lt * Tt } px ` ;zt.style.minHeight=cr}if(Z.maxRows){const Tt= ` $ { it + at + lt * Z . maxRows } px ` ;zt.style.maxHeight=Tt}}},Q=D(()=>{const{maxlength:g}=e;return g===void 0?void 0:Number(g)});Ge(()=>{const{value:g}=P;Array.isArray(g)||dr(g)});const se=Fr().proxy;function ie(g){const{onUpdateValue:I,"onUpdate:value":Z,onInput:me}=e,{nTriggerFormInput:xe}=k;I&&be(I,g),Z&&be(Z,g),me&&be(me,g),w.value=g,xe()}function we(g){const{onChange:I}=e,{nTriggerFormChange:Z}=k;I&&be(I,g),w.value=g,Z()}function Ce(g){const{onBlur:I}=e,{nTriggerFormBlur:Z}=k;I&&be(I,g),Z()}function re(g){const{onFocus:I}=e,{nTriggerFormFocus:Z}=k;I&&be(I,g),Z()}function Le(g){const{onClear:I}=e;I&&be(I,g)}function Ne(g){const{onInputBlur:I}=e;I&&be(I,g)}function He(g){const{onInputFocus:I}=e;I&&be(I,g)}function Ee(){const{onDeactivate:g}=e;g&&be(g)}function U(){const{onActivate:g}=e;g&&be(g)}function J(g){const{onClick:I}=e;I&&be(I,g)}function V(g){const{onWrapperFoc
` )}else{const{value:xe}=d;xe&&(g?xe.textContent=g:xe.innerHTML=" ")}}function Ji(){W()}const vo=M({top:"0"});function Qi(g){var I;const{scrollTop:Z}=g.target;vo.value.top= ` $ { - Z } px ` ,(I=v.value)===null||I===void 0||I.syncUnifiedContainer()}let Ft=null;ft(()=>{const{autosize:g,type:I}=e;g&&I==="textarea"?Ft=Te(P,Z=>{!Array.isArray(Z)&&Z!==K&&dr(Z)}):Ft==null||Ft()});let Nt=null;ft(()=>{e.type==="textarea"?Nt=Te(P,g=>{var I;!Array.isArray(g)&&g!==K&&((I=v.value)===null||I===void 0||I.syncUnifiedContainer())}):Nt==null||Nt()}),_e(ui,{mergedValueRef:P,maxlengthRef:Q,mergedClsPrefixRef:t,countGraphemesRef:ee(e,"countGraphemes")});const ea={wrapperElRef:l,inputElRef:u,textareaElRef:s,isCompositing:z,focus:po,blur:qi,select:Gi,deactivate:Yi,activate:Xi,scrollTo:Zi},ta=St("Input",n,t),go=D(()=>{const{value:g}=b,{common:{cubicBezierEaseInOut:I},self:{color:Z,borderRadius:me,textColor:xe,caretColor:pe,caretColorError:it,caretColorWarning:at,textDecorationColor:lt,border:zt,borderDisabled:Tt,borderHover:cr,borderFocus:ra,placeholderColor:oa,placeholderColorDisabled:na,lineHeightTextarea:ia,colorDisabled:aa,colorFocus:la,textColorDisabled:sa,boxShadowFocus:da,iconSize:ca,colorFocusWarning:ua,boxShadowFocusWarning:fa,borderWarning:ha,borderFocusWarning:pa,borderHoverWarning:va,colorFocusError:ga,boxShadowFocusError:ma,borderError:ba,borderFocusError:ya,borderHoverError:wa,clearSize:xa,clearColor:Ca,clearColorHover:Sa,clearColorPressed:ka,iconColor:Pa,iconColorDisabled: $ a,suffixTextColor:za,countTextColor:Ta,countTextColorDisabled:Ia,iconColorHover:_a,iconColorPressed:Ra,loadingColor:Oa,loadingColorError:Ma,loadingColorWarning:Ba,[ne("padding",g)]:La,[ne("fontSize",g)]:Ea,[ne("height",g)]:Aa}}=i.value,{left:Da,right:Fa}=pl(La);return{"--n-bezier":I,"--n-count-text-color":Ta,"--n-count-text-color-disabled":Ia,"--n-color":Z,"--n-font-size":Ea,"--n-border-radius":me,"--n-height":Aa,"--n-padding-left":Da,"--n-padding-right":Fa,"--n-text-color":xe,"--n-caret-color":pe,"--n-text-decoration-color":lt,"--n-border":zt,"--n-border-disabled":Tt,"--n-border-hover":cr,"--n-border-focus":ra,"--n-placeholder-color":oa,"--n-placeholder-color-disabled":na,"--n-icon-size":ca,"--n-line-height-textarea":ia,"--n-color-disabled":aa,"--n-color-focus":la,"--n-text-color-disabled":sa,"--n-box-shadow-focus":da,"--n-loading-color":Oa,"--n-caret-color-warning":at,"--n-color-focus-warning":ua,"--n-box-shadow-focus-warning":fa,"--n-border-warning":ha,"--n-border-focus-warning":pa,"--n-border-hover-warning":va,"--n-loading-color-warning":Ba,"--n-caret-color-error":it,"--n-color-focus-error":ga,"--n-box-shadow-focus-error":ma,"--n-border-error":ba,"--n-border-focus-error":ya,"--n-border-hover-error":wa,"--n-loading-color-error":Ma,"--n-clear-color":Ca,"--n-clear-size":xa,"--n-clear-color-hover":Sa,"--n-clear-color-pressed":ka,"--n-icon-color":Pa,"--n-icon-color-hover":_a,"--n-icon-color-pressed":Ra,"--n-icon-color-disabled": $ a,"--n-suffix-text-color":za}}),ht=o?Fe("input",D(()=>{const{value:g}=b;return g[0]}),go,e):void 0;return Object.assign(Object.assign({},ea),{wrapperElRef:l,inputElRef:u,inputMirrorElRef:d,inputEl2Ref:f,textareaElRef:s,textareaMirrorElRef:a,textareaScrollbarInstRef:v,rtlEnabled:ta,uncontrolledValue:w,mergedValue:P,passwordVisible:X,mergedPlaceholder:F,showPlaceholder1:O,showPlaceholder2:C,mergedFocus:T,isComposing:z,activated:_,showClearButton:H,mergedSize:b,mergedDisabled:m,textDecorationStyle:te,mergedClsPrefix:t,mergedBordered:r,mergedShowPasswordOn:N,placeholderStyle:vo,mergedStatus:R,textAreaScrollContainerWidth:ge,handleTextAreaScroll:Qi,handleCompositionStart:he,handleCompositionEnd:Oe,handleInput: $ e,handleInputBlur:Ke,handleInputFocus:Bi,handleWrapperBlur:Li,handleWrapperFocus:Ei,handleMouseEnter:Hi,handleMouseLeave:ji,handleMouseDown:Ni,handleChange:Ai,handleClick:Di,handleClear:Fi,handlePasswordToggleClick:Ui,handlePasswordToggleMousedown:Wi,handleWrapperKeydown:Vi,handleTextAreaMirrorResize:Ji,getTextareaScrollContainer:()=>s.value,mergedTheme:i,cssVars:o?void 0:go,themeClass:ht==null?void 0:ht.themeClass,onRender:ht==null?void 0:
white - space : nowrap ;
display : inline - block ;
vertical - align : bottom ;
max - width : 100 % ;
` ),j("line-clamp", `
display : - webkit - inline - box ;
- webkit - box - orient : vertical ;
` ),j("cursor-pointer", `
cursor : pointer ;
` )]);function en(e){return ` $ { e } - ellipsis -- line - clamp ` }function tn(e,t){return ` $ { e } - ellipsis -- cursor - $ { t } ` }const Wf=Object.assign(Object.assign({},ae.props),{expandTrigger:String,lineClamp:[Number,String],tooltip:{type:[Boolean,Object],default:!0}}),hi=q({name:"Ellipsis",inheritAttrs:!1,props:Wf,setup(e,{slots:t,attrs:r}){const{mergedClsPrefixRef:o}=Re(e),n=ae("Ellipsis","-ellipsis",Uf,Af,e,o),i=M(null),l=M(null),s=M(null),a=M(!1),d=D(()=>{const{lineClamp:w}=e,{value:x}=a;return w!==void 0?{textOverflow:"","-webkit-line-clamp":x?"":w}:{textOverflow:x?"":"ellipsis","-webkit-line-clamp":""}});function u(){let w=!1;const{value:x}=a;if(x)return!0;const{value:P}=i;if(P){const{lineClamp:k}=e;if(p(P),k!==void 0)w=P.scrollHeight<=P.offsetHeight;else{const{value:b}=l;b&&(w=b.getBoundingClientRect().width<=P.getBoundingClientRect().width)}v(P,w)}return w}const f=D(()=>e.expandTrigger==="click"?()=>{var w;const{value:x}=a;x&&((w=s.value)===null||w===void 0||w.setShow(!1)),a.value=!x}:void 0);vl(()=>{var w;e.tooltip&&((w=s.value)===null||w===void 0||w.setShow(!1))});const h=()=>c("span",Object.assign({},Lt(r,{class:[ ` $ { o . value } - ellipsis ` ,e.lineClamp!==void 0?en(o.value):void 0,e.expandTrigger==="click"?tn(o.value,"pointer"):void 0],style:d.value}),{ref:"triggerRef",onClick:f.value,onMouseenter:e.expandTrigger==="click"?u:void 0}),e.lineClamp?t:c("span",{ref:"triggerInnerRef"},t));function p(w){if(!w)return;const x=d.value,P=en(o.value);e.lineClamp!==void 0?y(w,P,"add"):y(w,P,"remove");for(const k in x)w.style[k]!==x[k]&&(w.style[k]=x[k])}function v(w,x){const P=tn(o.value,"pointer");e.expandTrigger==="click"&&!x?y(w,P,"add"):y(w,P,"remove")}function y(w,x,P){P==="add"?w.classList.contains(x)||w.classList.add(x):w.classList.contains(x)&&w.classList.remove(x)}return{mergedTheme:n,triggerRef:i,triggerInnerRef:l,tooltipRef:s,handleClick:f,renderTrigger:h,getTooltipDisabled:u}},render(){var e;const{tooltip:t,renderTrigger:r, $ slots:o}=this;if(t){const{mergedTheme:n}=this;return c(fi,Object.assign({ref:"tooltipRef",placement:"top"},t,{getDisabled:this.getTooltipDisabled,theme:n.peers.Tooltip,themeOverrides:n.peerOverrides.Tooltip}),{trigger:r,default:(e=o.tooltip)!==null&&e!==void 0?e:o.default})}else return r()}}),pi=q({name:"DropdownDivider",props:{clsPrefix:{type:String,required:!0}},render(){return c("div",{class: ` $ { this . clsPrefix } - dropdown - divider ` })}}),Vf=e=>{const{textColorBase:t,opacity1:r,opacity2:o,opacity3:n,opacity4:i,opacity5:l}=e;return{color:t,opacity1Depth:r,opacity2Depth:o,opacity3Depth:n,opacity4Depth:i,opacity5Depth:l}},Kf={name:"Icon",common:Be,self:Vf},qf=Kf,Gf=S("icon", `
height : 1 em ;
width : 1 em ;
line - height : 1 em ;
text - align : center ;
display : inline - block ;
position : relative ;
fill : currentColor ;
transform : translateZ ( 0 ) ;
` ,[j("color-transition",{transition:"color .3s var(--n-bezier)"}),j("depth",{color:"var(--n-color)"},[L("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),L("svg",{height:"1em",width:"1em"})]),Xf=Object.assign(Object.assign({},ae.props),{depth:[String,Number],size:[Number,String],color:String,component:Object}),Yf=q({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:Xf,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=Re(e),o=ae("Icon","-icon",Gf,qf,e,t),n=D(()=>{const{depth:l}=e,{common:{cubicBezierEaseInOut:s},self:a}=o.value;if(l!==void 0){const{color:d,[ ` opacity$ { l } Depth ` ]:u}=a;return{"--n-bezier":s,"--n-color":d,"--n-opacity":u}}return{"--n-bezier":s,"--n-color":"","--n-opacity":""}}),i=r?Fe("icon",D(()=> ` $ { e . depth || "d" } ` ),n,e):void 0;return{mergedClsPrefix:t,mergedStyle:D(()=>{const{size:l,color:s}=e;return{fontSize:qe(l),color:s}}),cssVars:r?void 0:n,themeClass:i==null?void 0:i.themeClass,onRender:i==null?void 0:i.onRender}},render(){var e;const{ $ parent:t,depth:r,mergedClsPrefix:o,component:n,onRender:i,themeClass:l}=this;return!((e=t==null?void 0:t. $ options)===null||e===void 0)&&e._n_icon__&&Kr("icon","don't wrap ` n - icon ` inside ` n - icon ` "),i==null||i(),c("i",Lt(this. $ attrs,{role:"img",class:[ ` $ { o } - icon ` ,l,{[ ` $ { o } - icon -- depth ` ]:r,[ ` $ { o } - icon -- color - transition ` ]:r!==void 0}],style:[this.cssVars,this.mergedStyle]}),n?c(n):this. $ slots)}}),so=Xe("n-dropdown-menu"),lr=Xe("n-dropdown"),rn=Xe("n-dropdown-option");function Br(e,t){return e.type==="submenu"||e.type===void 0&&e[t]!==void 0}function Zf(e){return e.type==="group"}function vi(e){return e.type==="divider"}function Jf(e){return e.type==="render"}const gi=q({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 t=ue(lr),{hoverKeyRef:r,keyboardKeyRef:o,lastToggledSubmenuKeyRef:n,pendingKeyPathRef:i,activeKeyPathRef:l,animatedRef:s,mergedShowRef:a,renderLabelRef:d,renderIconRef:u,labelFieldRef:f,childrenFieldRef:h,renderOptionRef:p,nodePropsRef:v,menuPropsRef:y}=t,w=ue(rn,null),x=ue(so),P=ue(tr),k=D(()=>e.tmNode.rawNode),b=D(()=>{const{value:N}=h;return Br(e.tmNode.rawNode,N)}),m=D(()=>{const{disabled:N}=e.tmNode;return N}),R=D(()=>{if(!b.value)return!1;const{key:N,disabled:X}=e.tmNode;if(X)return!1;const{value:te}=r,{value:ge}=o,{value:W}=n,{value:Q}=i;return te!==null?Q.includes(N):ge!==null?Q.includes(N)&&Q[Q.length-1]!==N:W!==null?Q.includes(N):!1}), $ =D(()=>o.value===null&&!s.value),A=Ol(R,300, $ ),z=D(()=>!!(w!=null&&w.enteringSubmenuRef.value)),_=M(!1);_e(rn,{enteringSubmenuRef:_});function K(){_.value=!0}function F(){_.value=!1}function O(){const{parentKey:N,tmNode:X}=e;X.disabled||a.value&&(n.value=N,o.value=null,r.value=X.key)}function C(){const{tmNode:N}=e;N.disabled||a.value&&r.value!==N.key&&O()}function T(N){if(e.tmNode.disabled||!a.value)return;const{relatedTarget:X}=N;X&&!_o({target:X},"dropdownOption")&&!_o({target:X},"scrollbarRail")&&(r.value=null)}function H(){const{value:N}=b,{tmNode:X}=e;a.value&&!N&&!X.disabled&&(t.doSelect(X.key,X.rawNode),t.doUpdateShow(!1))}return{labelField:f,renderLabel:d,renderIcon:u,siblingHasIcon:x.showIconRef,siblingHasSubmenu:x.hasSubmenuRef,menuProps:y,popoverBody:P,animated:s,mergedShowSubmenu:D(()=>A.value&&!z.value),rawNode:k,hasSubmenu:b,pending:We(()=>{const{value:N}=i,{key:X}=e.tmNode;return N.includes(X)}),childActive:We(()=>{const{value:N}=l,{key:X}=e.tmNode,te=N.findIndex(ge=>X===ge);return te===-1?!1:te<N.length-1}),active:We(()=>{const{value:N}=l,{key:X}=e.tmNode,te=N.findIndex(ge=>X===ge);return te===-1?!1:te===N.length-1}),mergedDisabled:m,renderOption:p,nodeProps:v,handleClick:H,handleMouseMove:C,handleMouseEnter:O,handleMouseLeave:T,handleSubmenuBeforeEnter:K,handleSubmenuAfterEnter:F}},render(){var e,t;const{animated:r,rawNode:o,mergedShowSubmenu:n,clsPrefix:i,siblingHasIcon:l,siblingHasSubmenu:s,renderLabel:a,renderIcon:d,renderOption:u,nodeProps:f,props:h,scrollable:p}=this;let v=null;
transform - origin : var ( -- v - transform - origin ) ;
background - color : var ( -- n - color ) ;
border - radius : var ( -- n - border - radius ) ;
box - shadow : var ( -- n - box - shadow ) ;
position : relative ;
transition :
background - color . 3 s var ( -- n - bezier ) ,
box - shadow . 3 s var ( -- n - bezier ) ;
` ,[zn(),S("dropdown-option", `
position : relative ;
` ,[L("a", `
text - decoration : none ;
color : inherit ;
outline : none ;
` ,[L("&::before", `
content : "" ;
position : absolute ;
left : 0 ;
right : 0 ;
top : 0 ;
bottom : 0 ;
` )]),S("dropdown-option-body", `
display : flex ;
cursor : pointer ;
position : relative ;
height : var ( -- n - option - height ) ;
line - height : var ( -- n - option - height ) ;
font - size : var ( -- n - font - size ) ;
color : var ( -- n - option - text - color ) ;
transition : color . 3 s var ( -- n - bezier ) ;
` ,[L("&::before", `
content : "" ;
position : absolute ;
top : 0 ;
bottom : 0 ;
left : 4 px ;
right : 4 px ;
transition : background - color . 3 s var ( -- n - bezier ) ;
border - radius : var ( -- n - border - radius ) ;
` ),ze("disabled",[j("pending", `
color : var ( -- n - option - text - color - hover ) ;
` ,[B("prefix, suffix", `
color : var ( -- n - option - text - color - hover ) ;
` ),L("&::before","background-color: var(--n-option-color-hover);")]),j("active", `
color : var ( -- n - option - text - color - active ) ;
` ,[B("prefix, suffix", `
color : var ( -- n - option - text - color - active ) ;
` ),L("&::before","background-color: var(--n-option-color-active);")]),j("child-active", `
color : var ( -- n - option - text - color - child - active ) ;
` ,[B("prefix, suffix", `
color : var ( -- n - option - text - color - child - active ) ;
` )])]),j("disabled", `
cursor : not - allowed ;
opacity : var ( -- n - option - opacity - disabled ) ;
` ),j("group", `
font - size : calc ( var ( -- n - font - size ) - 1 px ) ;
color : var ( -- n - group - header - text - color ) ;
` ,[B("prefix", `
width : calc ( var ( -- n - option - prefix - width ) / 2 ) ;
` ,[j("show-icon", `
width : calc ( var ( -- n - option - icon - prefix - width ) / 2 ) ;
` )])]),B("prefix", `
width : var ( -- n - option - prefix - width ) ;
display : flex ;
justify - content : center ;
align - items : center ;
color : var ( -- n - prefix - color ) ;
transition : color . 3 s var ( -- n - bezier ) ;
z - index : 1 ;
` ,[j("show-icon", `
width : var ( -- n - option - icon - prefix - width ) ;
` ),S("icon", `
font - size : var ( -- n - option - icon - size ) ;
` )]),B("label", `
white - space : nowrap ;
flex : 1 ;
z - index : 1 ;
` ),B("suffix", `
box - sizing : border - box ;
flex - grow : 0 ;
flex - shrink : 0 ;
display : flex ;
justify - content : flex - end ;
align - items : center ;
min - width : var ( -- n - option - suffix - width ) ;
padding : 0 8 px ;
transition : color . 3 s var ( -- n - bezier ) ;
color : var ( -- n - suffix - color ) ;
z - index : 1 ;
` ,[j("has-submenu", `
width : var ( -- n - option - icon - suffix - width ) ;
` ),S("icon", `
font - size : var ( -- n - option - icon - size ) ;
` )]),S("dropdown-menu","pointer-events: all;")]),S("dropdown-offset-container", `
pointer - events : none ;
position : absolute ;
left : 0 ;
right : 0 ;
top : - 4 px ;
bottom : - 4 px ;
` )]),S("dropdown-divider", `
transition : background - color . 3 s var ( -- n - bezier ) ;
background - color : var ( -- n - divider - color ) ;
height : 1 px ;
margin : 4 px 0 ;
` ),S("dropdown-menu-wrapper", `
transform - origin : var ( -- v - transform - origin ) ;
width : fit - content ;
` ),L(">",[S("scrollbar", `
height : inherit ;
max - height : inherit ;
` )]),ze("scrollable", `
padding : var ( -- n - padding ) ;
` ),j("scrollable",[B("content", `
padding : var ( -- n - padding ) ;
` )])]),oh={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]},nh=Object.keys(ar),ih=Object.assign(Object.assign(Object.assign({},ar),oh),ae.props),on=q({name:"Dropdown",inheritAttrs:!1,props:ih,setup(e){const t=M(!1),r=nr(ee(e,"show"),t),o=D(()=>{const{keyField:F,childrenField:O}=e;return Gu(e.options,{getKey(C){return C[F]},getDisabled(C){return C.disabled===!0},getIgnored(C){return C.type==="divider"||C.type==="render"},getChildren(C){return C[O]}})}),n=D(()=>o.value.treeNodes),i=M(null),l=M(null),s=M(null),a=D(()=>{var F,O,C;return(C=(O=(F=i.value)!==null&&F!==void 0?F:l.value)!==null&&O!==void 0?O:s.value)!==null&&C!==void 0?C:null}),d=D(()=>o.value.getPath(a.value).keyPath),u=D(()=>o.value.getPath(e.value).keyPath),f=We(()=>e.keyboard&&r.value);El({keydown:{ArrowUp:{prevent:!0,handler:m},ArrowRight:{prevent:!0,handler:b},ArrowDown:{prevent:!0,handler:R},ArrowLeft:{prevent:!0,handler:k},Enter:{prevent:!0,handler: $ },Escape:P}},f);const{mergedClsPrefixRef:h,inlineThemeDisabled:p}=Re(e),v=ae("Dropdown","-dropdown",rh,Hf,e,h);_e(lr,{labelFieldRef:ee(e,"labelField"),childrenFieldRef:ee(e,"childrenField"),renderLabelRef:ee(e,"renderLabel"),renderIconRef:ee(e,"renderIcon"),hoverKeyRef:i,keyboardKeyRef:l,lastToggledSubmenuKeyRef:s,pendingKeyPathRef:d,activeKeyPathRef:u,animatedRef:ee(e,"animated"),mergedShowRef:r,nodePropsRef:ee(e,"nodeProps"),renderOptionRef:ee(e,"renderOption"),menuPropsRef:ee(e,"menuProps"),doSelect:y,doUpdateShow:w}),Te(r,F=>{!e.animated&&!F&&x()});function y(F,O){const{onSelect:C}=e;C&&be(C,F,O)}function w(F){const{"onUpdate:show":O,onUpdateShow:C}=e;O&&be(O,F),C&&be(C,F),t.value=F}function x(){i.value=null,l.value=null,s.value=null}function P(){w(!1)}function k(){z("left")}function b(){z("right")}function m(){z("up")}function R(){z("down")}function $ (){const F=A();F!=null&&F.isLeaf&&r.value&&(y(F.key,F.rawNode),w(!1))}function A(){var F;const{value:O}=o,{value:C}=a;return!O||C===null?null:(F=O.getNode(C))!==null&&F!==void 0?F:null}function z(F){const{value:O}=a,{value:{getFirstAvailableNode:C}}=o;let T=null;if(O===null){const H=C();H!==null&&(T=H.key)}else{const H=A();if(H){let N;switch(F){case"down":N=H.getNext();break;case"up":N=H.getPrev();break;case"right":N=H.getChild();break;case"left":N=H.getParent();break}N&&(T=N.key)}}T!==null&&(i.value=null,l.value=T)}const _=D(()=>{const{size:F,inverted:O}=e,{common:{cubicBezierEaseInOut:C},self:T}=v.value,{padding:H,dividerColor:N,borderRadius:X,optionOpacityDisabled:te,[ne("optionIconSuffixWidth",F)]:ge,[ne("optionSuffixWidth",F)]:W,[ne("optionIconPrefixWidth",F)]:Q,[ne("optionPrefixWidth",F)]:se,[ne("fontSize",F)]:ie,[ne("optionHeight",F)]:we,[ne("optionIconSize",F)]:Ce}=T,re={"--n-bezier":C,"--n-font-size":ie,"--n-padding":H,"--n-border-radius":X,"--n-option-height":we,"--n-option-prefix-width":se,"--n-option-icon-prefix-width":Q,"--n-option-suffix-width":W,"--n-option-icon-suffix-width":ge,"--n-option-icon-size":Ce,"--n-divider-color":N,"--n-option-opacity-disabled":te};return O?(re["--n-color"]=T.colorInverted,re["--n-option-color-hover"]=T.optionColorHoverInverted,re["--n-option-color-active"]=T.optionColorActiveInverted,re["--n-option-text-color"]=T.optionTextColorInverted,re["--n-option-text-color-hover"]=T.optionTextColorHoverInverted,re["--n-option-text-color-active"]=T.optionTextColorActiveInverted,re["--n-option-text-color-child-active"]=T.optionTextColorChildActiveInverted,re["--n-prefix-color"]=T.prefixColorInverted,re["--n-suffix-color"]=T.suffixColorInverted,re["--n-group-header-text-color"]=T.groupHeaderTextColorInverted):(re["--n-color"]=T.color,re["--n-option-color-hover"]=T.optionColorHover,re["--n-opt
position : fixed ;
left : 0 ;
right : 0 ;
top : 0 ;
bottom : 0 ;
display : flex ;
` ),S("image-preview-overlay", `
z - index : - 1 ;
position : absolute ;
left : 0 ;
right : 0 ;
top : 0 ;
bottom : 0 ;
background : rgba ( 0 , 0 , 0 , . 3 ) ;
` ,[To()]),S("image-preview-toolbar", `
z - index : 1 ;
position : absolute ;
left : 50 % ;
transform : translateX ( - 50 % ) ;
border - radius : var ( -- n - toolbar - border - radius ) ;
height : 48 px ;
bottom : 40 px ;
padding : 0 12 px ;
background : var ( -- n - toolbar - color ) ;
box - shadow : var ( -- n - toolbar - box - shadow ) ;
color : var ( -- n - toolbar - icon - color ) ;
transition : color . 3 s var ( -- n - bezier ) ;
display : flex ;
align - items : center ;
` ,[S("base-icon", `
padding : 0 8 px ;
font - size : 28 px ;
cursor : pointer ;
` ),To()]),S("image-preview-wrapper", `
position : absolute ;
left : 0 ;
right : 0 ;
top : 0 ;
bottom : 0 ;
display : flex ;
pointer - events : none ;
` ,[zn()]),S("image-preview", `
user - select : none ;
- webkit - user - select : none ;
pointer - events : all ;
margin : auto ;
max - height : calc ( 100 vh - 32 px ) ;
max - width : calc ( 100 vw - 32 px ) ;
transition : transform . 3 s var ( -- n - bezier ) ;
` ),S("image", `
display : inline - flex ;
max - height : 100 % ;
max - width : 100 % ;
` ,[ze("preview-disabled", `
cursor : pointer ;
` ),L("img", `
border - radius : inherit ;
` )])]),Vt=32,wi=q({name:"ImagePreview",props:Object.assign(Object.assign({},co),{onNext:Function,onPrev:Function,clsPrefix:{type:String,required:!0}}),setup(e){const t=ae("Image","-image",Ah,ph,e,ee(e,"clsPrefix"));let r=null;const o=M(null),n=M(null),i=M(void 0),l=M(!1),s=M(!1),{localeRef:a}=oo("Image");function d(){const{value:U}=n;if(!r||!U)return;const{style:J}=U,V=r.getBoundingClientRect(),fe=V.left+V.width/2,he=V.top+V.height/2;J.transformOrigin= ` $ { fe } px $ { he } px ` }function u(U){var J,V;switch(U.key){case" ":U.preventDefault();break;case"ArrowLeft":(J=e.onPrev)===null||J===void 0||J.call(e);break;case"ArrowRight":(V=e.onNext)===null||V===void 0||V.call(e);break;case"Escape":we();break}}Te(l,U=>{U?Me("keydown",document,u):Ie("keydown",document,u)}),nt(()=>{Ie("keydown",document,u)});let f=0,h=0,p=0,v=0,y=0,w=0,x=0,P=0,k=!1;function b(U){const{clientX:J,clientY:V}=U;p=J-f,v=V-h,Bn(ie)}function m(U){const{mouseUpClientX:J,mouseUpClientY:V,mouseDownClientX:fe,mouseDownClientY:he}=U,Oe=fe-J, $ e=he-V,De= ` vertical$ { $e > 0 ? "Top" : "Bottom" } ` ,Ke= ` horizontal$ { Oe > 0 ? "Left" : "Right" } ` ;return{moveVerticalDirection:De,moveHorizontalDirection:Ke,deltaHorizontal:Oe,deltaVertical: $ e}}function R(U){const{value:J}=o;if(!J)return{offsetX:0,offsetY:0};const V=J.getBoundingClientRect(),{moveVerticalDirection:fe,moveHorizontalDirection:he,deltaHorizontal:Oe,deltaVertical: $ e}=U||{};let De=0,Ke=0;return V.width<=window.innerWidth?De=0:V.left>0?De=(V.width-window.innerWidth)/2:V.right<window.innerWidth?De=-(V.width-window.innerWidth)/2:he==="horizontalRight"?De=Math.min((V.width-window.innerWidth)/2,y-(Oe??0)):De=Math.max(-((V.width-window.innerWidth)/2),y-(Oe??0)),V.height<=window.innerHeight?Ke=0:V.top>0?Ke=(V.height-window.innerHeight)/2:V.bottom<window.innerHeight?Ke=-(V.height-window.innerHeight)/2:fe==="verticalBottom"?Ke=Math.min((V.height-window.innerHeight)/2,w-( $ e??0)):Ke=Math.max(-((V.height-window.innerHeight)/2),w-( $ e??0)),{offsetX:De,offsetY:Ke}}function $ (U){Ie("mousemove",document,b),Ie("mouseup",document, $ );const{clientX:J,clientY:V}=U;k=!1;const fe=m({mouseUpClientX:J,mouseUpClientY:V,mouseDownClientX:x,mouseDownClientY:P}),he=R(fe);p=he.offsetX,v=he.offsetY,ie()}const A=ue(bi,null);function z(U){var J,V;if((V=(J=A==null?void 0:A.previewedImgPropsRef.value)===null||J===void 0?void 0:J.onMousedown)===null||V===void 0||V.call(J,U),U.button!==0)return;const{clientX:fe,clientY:he}=U;k=!0,f=fe-p,h=he-v,y=p,w=v,x=fe,P=he,ie(),Me("mousemove",document,b),Me("mouseup",document, $ )}function _(U){var J,V;(V=(J=A==null?void 0:A.previewedImgPropsRef.value)===null||J===void 0?void 0:J.onDblclick)===null||V===void 0||V.call(J,U);const fe=W();O=O===fe?1:fe,ie()}const K=1.5;let F=0,O=1,C=0;function T(){O=1,F=0}function H(){var U;T(),C=0,(U=e.onPrev)===null||U===void 0||U.call(e)}function N(){var U;T(),C=0,(U=e.onNext)===null||U===void 0||U.call(e)}function X(){C-=90,ie()}function te(){C+=90,ie()}function ge(){const{value:U}=o;if(!U)return 1;const{innerWidth:J,innerHeight:V}=window,fe=Math.max(1,U.naturalHeight/(V-Vt)),he=Math.max(1,U.naturalWidth/(J-Vt));return Math.max(3,fe*2,he*2)}function W(){const{value:U}=o;if(!U)return 1;const{innerWidth:J,innerHeight:V}=window,fe=U.naturalHeight/(V-Vt),he=U.naturalWidth/(J-Vt);return fe<1&&he<1?1:Math.max(fe,he)}function Q(){const U=ge();O<U&&(F+=1,O=Math.min(U,Math.pow(K,F)),ie())}function se(){if(O>.5){const U=O;F-=1,O=Math.max(.5,Math.pow(K,F));const J=U-O;ie(!1);const V=R();O+=J,ie(!1),O-=J,p=V.offsetX,v=V.offsetY,ie()}}function ie(U=!0){var J;const{value:V}=o;if(!V)return;const{style:fe}=V,he=yl((J=A==null?void 0:A.previewedImgPropsRef.value)===null||J===void 0?void 0:J.style);let Oe="";if(typeof he=="string")Oe=he+";";else for(const De in he)Oe+= ` $ { yc ( De ) } : $ { he [ De ] } ; ` ;const $ e= ` transform - origin : center ; transform : translateX ( $ { p } px ) translateY ( $ { v } px ) rotate ( $ { C } deg ) scale ( $ { O } ) ; ` ;k?fe.cssText=Oe+"cursor: grabbing; transition: none;"+ $ e:fe.cssText=Oe+"cursor: grab;"+ $ e+(U?"":"transition: none;"),U||V.offsetHeight}function we(){l.value=!l.value,s.value=!0}function Ce(){O=W(),F=Math.ceil(Math.log(O)/Ma
-- n - merged - border - color : var ( -- n - border - color ) ;
-- n - merged - color : var ( -- n - color ) ;
-- n - merged - color - hover : var ( -- n - color - hover ) ;
margin : 0 ;
font - size : var ( -- n - font - size ) ;
transition :
background - color . 3 s var ( -- n - bezier ) ,
color . 3 s var ( -- n - bezier ) ,
border - color . 3 s var ( -- n - bezier ) ;
padding : 0 ;
list - style - type : none ;
color : var ( -- n - text - color ) ;
background - color : var ( -- n - merged - color ) ;
` ,[j("show-divider",[S("list-item",[L("&:not(:last-child)",[B("divider", `
background - color : var ( -- n - merged - border - color ) ;
` )])])]),j("clickable",[S("list-item", `
cursor : pointer ;
` )]),j("bordered", `
border : 1 px solid var ( -- n - merged - border - color ) ;
border - radius : var ( -- n - border - radius ) ;
` ),j("hoverable",[S("list-item", `
border - radius : var ( -- n - border - radius ) ;
` ,[L("&:hover", `
background - color : var ( -- n - merged - color - hover ) ;
` ,[B("divider", `
background - color : transparent ;
` )])])]),j("bordered, hoverable",[S("list-item", `
padding : 12 px 20 px ;
` ),B("header, footer", `
padding : 12 px 20 px ;
` )]),B("header, footer", `
padding : 12 px 0 ;
box - sizing : border - box ;
transition : border - color . 3 s var ( -- n - bezier ) ;
` ,[L("&:not(:last-child)", `
border - bottom : 1 px solid var ( -- n - merged - border - color ) ;
` )]),S("list-item", `
position : relative ;
padding : 12 px 0 ;
box - sizing : border - box ;
display : flex ;
flex - wrap : nowrap ;
align - items : center ;
transition :
background - color . 3 s var ( -- n - bezier ) ,
border - color . 3 s var ( -- n - bezier ) ;
` ,[B("prefix", `
margin - right : 20 px ;
flex : 0 ;
` ),B("suffix", `
margin - left : 20 px ;
flex : 0 ;
` ),B("main", `
flex : 1 ;
` ),B("divider", `
height : 1 px ;
position : absolute ;
bottom : 0 ;
left : 0 ;
right : 0 ;
background - color : transparent ;
transition : background - color . 3 s var ( -- n - bezier ) ;
pointer - events : none ;
` )])]),Tn(S("list", `
-- n - merged - color - hover : var ( -- n - color - hover - modal ) ;
-- n - merged - color : var ( -- n - color - modal ) ;
-- n - merged - border - color : var ( -- n - border - color - modal ) ;
` )),In(S("list", `
-- n - merged - color - hover : var ( -- n - color - hover - popover ) ;
-- n - merged - color : var ( -- n - color - popover ) ;
-- n - merged - border - color : var ( -- n - border - color - popover ) ;
` ))]),jh=Object.assign(Object.assign({},ae.props),{size:{type:String,default:"medium"},bordered:Boolean,clickable:Boolean,hoverable:Boolean,showDivider:{type:Boolean,default:!0}}),Ci=Xe("n-list"),Uh=q({name:"List",props:jh,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r,mergedRtlRef:o}=Re(e),n=St("List",o,t),i=ae("List","-list",Hh,mh,e,t);_e(Ci,{showDividerRef:ee(e,"showDivider"),mergedClsPrefixRef:t});const l=D(()=>{const{common:{cubicBezierEaseInOut:a},self:{fontSize:d,textColor:u,color:f,colorModal:h,colorPopover:p,borderColor:v,borderColorModal:y,borderColorPopover:w,borderRadius:x,colorHover:P,colorHoverModal:k,colorHoverPopover:b}}=i.value;return{"--n-font-size":d,"--n-bezier":a,"--n-text-color":u,"--n-color":f,"--n-border-radius":x,"--n-border-color":v,"--n-border-color-modal":y,"--n-border-color-popover":w,"--n-color-modal":h,"--n-color-popover":p,"--n-color-hover":P,"--n-color-hover-modal":k,"--n-color-hover-popover":b}}),s=r?Fe("list",void 0,l,e):void 0;return{mergedClsPrefix:t,rtlEnabled:n,cssVars:r?void 0:l,themeClass:s==null?void 0:s.themeClass,onRender:s==null?void 0:s.onRender}},render(){var e;const{ $ slots:t,mergedClsPrefix:r,onRender:o}=this;return o==null||o(),c("ul",{class:[ ` $ { r } - list ` ,this.rtlEnabled&& ` $ { r } - list -- rtl ` ,this.bordered&& ` $ { r } - list -- bordered ` ,this.showDivider&& ` $ { r } - list -- show - divider ` ,this.hoverable&& ` $ { r } - list -- hoverable ` ,this.clickable&& ` $ { r } - list -- clickable ` ,this.themeClass],style:this.cssVars},t.header?c("div",{class: ` $ { r } - list _ _header ` },t.header()):null,(e=t.default)===null||e===void 0?void 0:e.call(t),t.footer?c("div",{class: ` $ { r } - list _ _footer ` },t.footer()):null)}}),Wh=q({name:"ListItem",setup(){const e=ue(Ci,null);return e||kt("list-item"," ` n - list - item ` must be placed in ` n - list ` ."),{showDivider:e.showDividerRef,mergedClsPrefix:e.mergedClsPrefixRef}},render(){const{ $ slots:e,mergedClsPrefix:t}=this;return c("li",{class: ` $ { t } - list - item ` },e.prefix?c("div",{class: ` $ { t } - list - item _ _prefix ` },e.prefix()):null,e.default?c("div",{class: ` $ { t } - list - item _ _main ` },e):null,e.suffix?c("div",{class: ` $ { t } - list - item _ _suffix ` },e.suffix()):null,this.showDivider&&c("div",{class: ` $ { t } - list - item _ _divider ` }))}});function Pt(){const e=ue(wl,null);return e===null&&kt("use-message","No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use ` useMessage ` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),e}const Vh=L([S("progress",{display:"inline-block"},[S("progress-icon", `
color : var ( -- n - icon - color ) ;
transition : color . 3 s var ( -- n - bezier ) ;
` ),j("line", `
width : 100 % ;
display : block ;
` ,[S("progress-content", `
display : flex ;
align - items : center ;
` ,[S("progress-graph",{flex:1})]),S("progress-custom-content",{marginLeft:"14px"}),S("progress-icon", `
width : 30 px ;
padding - left : 14 px ;
height : var ( -- n - icon - size - line ) ;
line - height : var ( -- n - icon - size - line ) ;
font - size : var ( -- n - icon - size - line ) ;
` ,[j("as-text", `
color : var ( -- n - text - color - line - outer ) ;
text - align : center ;
width : 40 px ;
font - size : var ( -- n - font - size ) ;
padding - left : 4 px ;
transition : color . 3 s var ( -- n - bezier ) ;
` )])]),j("circle, dashboard",{width:"120px"},[S("progress-custom-content", `
position : absolute ;
left : 50 % ;
top : 50 % ;
transform : translateX ( - 50 % ) translateY ( - 50 % ) ;
display : flex ;
align - items : center ;
justify - content : center ;
` ),S("progress-text", `
position : absolute ;
left : 50 % ;
top : 50 % ;
transform : translateX ( - 50 % ) translateY ( - 50 % ) ;
display : flex ;
align - items : center ;
color : inherit ;
font - size : var ( -- n - font - size - circle ) ;
color : var ( -- n - text - color - circle ) ;
font - weight : var ( -- n - font - weight - circle ) ;
transition : color . 3 s var ( -- n - bezier ) ;
white - space : nowrap ;
` ),S("progress-icon", `
position : absolute ;
left : 50 % ;
top : 50 % ;
transform : translateX ( - 50 % ) translateY ( - 50 % ) ;
display : flex ;
align - items : center ;
color : var ( -- n - icon - color ) ;
font - size : var ( -- n - icon - size - circle ) ;
` )]),j("multiple-circle", `
width : 200 px ;
color : inherit ;
` ,[S("progress-text", `
font - weight : var ( -- n - font - weight - circle ) ;
color : var ( -- n - text - color - circle ) ;
position : absolute ;
left : 50 % ;
top : 50 % ;
transform : translateX ( - 50 % ) translateY ( - 50 % ) ;
display : flex ;
align - items : center ;
justify - content : center ;
transition : color . 3 s var ( -- n - bezier ) ;
` )]),S("progress-content",{position:"relative"}),S("progress-graph",{position:"relative"},[S("progress-graph-circle",[L("svg",{verticalAlign:"bottom"}),S("progress-graph-circle-fill", `
stroke : var ( -- n - fill - color ) ;
transition :
opacity . 3 s var ( -- n - bezier ) ,
stroke . 3 s var ( -- n - bezier ) ,
stroke - dasharray . 3 s var ( -- n - bezier ) ;
` ,[j("empty",{opacity:0})]),S("progress-graph-circle-rail", `
transition : stroke . 3 s var ( -- n - bezier ) ;
overflow : hidden ;
stroke : var ( -- n - rail - color ) ;
` )]),S("progress-graph-line",[j("indicator-inside",[S("progress-graph-line-rail", `
height : 16 px ;
line - height : 16 px ;
border - radius : 10 px ;
` ,[S("progress-graph-line-fill", `
height : inherit ;
border - radius : 10 px ;
` ),S("progress-graph-line-indicator", `
background : # 0000 ;
white - space : nowrap ;
text - align : right ;
margin - left : 14 px ;
margin - right : 14 px ;
height : inherit ;
font - size : 12 px ;
color : var ( -- n - text - color - line - inner ) ;
transition : color . 3 s var ( -- n - bezier ) ;
` )])]),j("indicator-inside-label", `
height : 16 px ;
display : flex ;
align - items : center ;
` ,[S("progress-graph-line-rail", `
flex : 1 ;
transition : background - color . 3 s var ( -- n - bezier ) ;
` ),S("progress-graph-line-indicator", `
background : var ( -- n - fill - color ) ;
font - size : 12 px ;
transform : translateZ ( 0 ) ;
display : flex ;
vertical - align : middle ;
height : 16 px ;
line - height : 16 px ;
padding : 0 10 px ;
border - radius : 10 px ;
position : absolute ;
white - space : nowrap ;
color : var ( -- n - text - color - line - inner ) ;
transition :
right . 2 s var ( -- n - bezier ) ,
color . 3 s var ( -- n - bezier ) ,
background - color . 3 s var ( -- n - bezier ) ;
` )]),S("progress-graph-line-rail", `
position : relative ;
overflow : hidden ;
height : var ( -- n - rail - height ) ;
border - radius : 5 px ;
background - color : var ( -- n - rail - color ) ;
transition : background - color . 3 s var ( -- n - bezier ) ;
` ,[S("progress-graph-line-fill", `
background : var ( -- n - fill - color ) ;
position : relative ;
border - radius : 5 px ;
height : inherit ;
width : 100 % ;
max - width : 0 % ;
transition :
background - color . 3 s var ( -- n - bezier ) ,
max - width . 2 s var ( -- n - bezier ) ;
` ,[j("processing",[L("&::after", `
content : "" ;
background - image : var ( -- n - line - bg - processing ) ;
animation : progress - processing - animation 2 s var ( -- n - bezier ) infinite ;
` )])])])])])]),L("@keyframes progress-processing-animation", `
0 % {
position : absolute ;
left : 0 ;
top : 0 ;
bottom : 0 ;
right : 100 % ;
opacity : 1 ;
}
66 % {
position : absolute ;
left : 0 ;
top : 0 ;
bottom : 0 ;
right : 0 ;
opacity : 0 ;
}
100 % {
position : absolute ;
left : 0 ;
top : 0 ;
bottom : 0 ;
right : 0 ;
opacity : 0 ;
}
` )]),Kh={success:c(qr,null),error:c(Gr,null),warning:c(Xr,null),info:c(Yr,null)},qh=q({name:"ProgressLine",props:{clsPrefix:{type:String,required:!0},percentage:{type:Number,default:0},railColor:String,railStyle:[String,Object],fillColor:String,status:{type:String,required:!0},indicatorPlacement:{type:String,required:!0},indicatorTextColor:String,unit:{type:String,default:"%"},processing:{type:Boolean,required:!0},showIndicator:{type:Boolean,required:!0},height:[String,Number],railBorderRadius:[String,Number],fillBorderRadius:[String,Number]},setup(e,{slots:t}){const r=D(()=>qe(e.height)),o=D(()=>e.railBorderRadius!==void 0?qe(e.railBorderRadius):e.height!==void 0?qe(e.height,{c:.5}):""),n=D(()=>e.fillBorderRadius!==void 0?qe(e.fillBorderRadius):e.railBorderRadius!==void 0?qe(e.railBorderRadius):e.height!==void 0?qe(e.height,{c:.5}):"");return()=>{const{indicatorPlacement:i,railColor:l,railStyle:s,percentage:a,unit:d,indicatorTextColor:u,status:f,showIndicator:h,fillColor:p,processing:v,clsPrefix:y}=e;return c("div",{class: ` $ { y } - progress - content ` ,role:"none"},c("div",{class: ` $ { y } - progress - graph ` ,"aria-hidden":!0},c("div",{class:[ ` $ { y } - progress - graph - line ` ,{[ ` $ { y } - progress - graph - line -- indicator - $ { i } ` ]:!0}]},c("div",{class: ` $ { y } - progress - graph - line - rail ` ,style:[{backgroundColor:l,height:r.value,borderRadius:o.value},s]},c("div",{class:[ ` $ { y } - progress - graph - line - fill ` ,v&& ` $ { y } - progress - graph - line - fill -- processing ` ],style:{maxWidth: ` $ { e . percentage } % ` ,backgroundColor:p,height:r.value,lineHeight:r.value,borderRadius:n.value}},i==="inside"?c("div",{class: ` $ { y } - progress - graph - line - indicator ` ,style:{color:u}},a,d):null)))),h&&i==="outside"?c("div",null,t.default?c("div",{class: ` $ { y } - progress - custom - content ` ,style:{color:u},role:"none"},t.default()):f==="default"?c("div",{role:"none",class: ` $ { y } - progress - icon $ { y } - progress - icon -- as - text ` ,style:{color:u}},a,d):c("div",{class: ` $ { y } - progress - icon ` ,"aria-hidden":!0},c(ve,{clsPrefix:y},{default:()=>Kh[f]}))):null)}}}),Gh={success:c(qr,null),error:c(Gr,null),warning:c(Xr,null),info:c(Yr,null)},Xh=q({name:"ProgressCircle",props:{clsPrefix:{type:String,required:!0},status:{type:String,required:!0},strokeWidth:{type:Number,required:!0},fillColor:String,railColor:String,railStyle:[String,Object],percentage:{type:Number,default:0},offsetDegree:{type:Number,default:0},showIndicator:{type:Boolean,required:!0},indicatorTextColor:String,unit:String,viewBoxWidth:{type:Number,required:!0},gapDegree:{type:Number,required:!0},gapOffsetDegree:{type:Number,default:0}},setup(e,{slots:t}){function r(o,n,i){const{gapDegree:l,viewBoxWidth:s,strokeWidth:a}=e,d=50,u=0,f=d,h=0,p=2*d,v=50+a/2,y= ` M $ { v } , $ { v } m $ { u } , $ { f }
a $ { d } , $ { d } 0 1 1 $ { h } , $ { - p }
a $ { d } , $ { d } 0 1 1 $ { - h } , $ { p } ` ,w=Math.PI*2*d,x={stroke:i,strokeDasharray: ` $ { o / 100 * ( w - l ) } px $ { s * 8 } px ` ,strokeDashoffset: ` - $ { l / 2 } px ` ,transformOrigin:n?"center":void 0,transform:n? ` rotate ( $ { n } deg ) ` :void 0};return{pathString:y,pathStyle:x}}return()=>{const{fillColor:o,railColor:n,strokeWidth:i,offsetDegree:l,status:s,percentage:a,showIndicator:d,indicatorTextColor:u,unit:f,gapOffsetDegree:h,clsPrefix:p}=e,{pathString:v,pathStyle:y}=r(100,0,n),{pathString:w,pathStyle:x}=r(a,l,o),P=100+i;return c("div",{class: ` $ { p } - progress - content ` ,role:"none"},c("div",{class: ` $ { p } - progress - graph ` ,"aria-hidden":!0},c("div",{class: ` $ { p } - progress - graph - circle ` ,style:{transform:h? ` rotate ( $ { h } deg ) ` :void 0}},c("svg",{viewBox: ` 0 0 $ { P } $ { P } ` },c("g",null,c("path",{class: ` $ { p } - progress - graph - circle - rail ` ,d:v,"stroke-width":i,"stroke-linecap":"round",fill:"none",style:y})),c("g",null,c("path",{class:[ ` $ { p } - progress - graph - circle - fill ` ,a===0&& ` $ { p } - progress - graph - circle - fill -- empty ` ],d:w,"stroke-width":i,"stroke-linecap":"round",fill:"none",style:x}))))),d?c("div",null,t.default?c("div",{class: ` $ { p } - progress - custom - content ` ,role:"none"},t.default()):s!=="default"?c("div",{class: ` $ { p } - progress - icon ` ,"aria-hidden":!0},c(ve,{clsPrefix:p},{default:()=>Gh[s]})):c("div",{class: ` $ { p } - progress - text ` ,style:{color:u},role:"none"},c("span",{class: ` $ { p } - progress - text _ _percentage ` },a),c("span",{class: ` $ { p } - progress - text _ _unit ` },f))):null)}}});function nn(e,t,r=100){return ` m $ { r / 2 } $ { r / 2 - e } a $ { e } $ { e } 0 1 1 0 $ { 2 * e } a $ { e } $ { e } 0 1 1 0 - $ { 2 * e } ` }const Yh=q({name:"ProgressMultipleCircle",props:{clsPrefix:{type:String,required:!0},viewBoxWidth:{type:Number,required:!0},percentage:{type:Array,default:[0]},strokeWidth:{type:Number,required:!0},circleGap:{type:Number,required:!0},showIndicator:{type:Boolean,required:!0},fillColor:{type:Array,default:()=>[]},railColor:{type:Array,default:()=>[]},railStyle:{type:Array,default:()=>[]}},setup(e,{slots:t}){const r=D(()=>e.percentage.map((n,i)=> ` $ { Math . PI * n / 100 * ( e . viewBoxWidth / 2 - e . strokeWidth / 2 * ( 1 + 2 * i ) - e . circleGap * i ) * 2 } , $ { e . viewBoxWidth * 8 } ` ));return()=>{const{viewBoxWidth:o,strokeWidth:n,circleGap:i,showIndicator:l,fillColor:s,railColor:a,railStyle:d,percentage:u,clsPrefix:f}=e;return c("div",{class: ` $ { f } - progress - content ` ,role:"none"},c("div",{class: ` $ { f } - progress - graph ` ,"aria-hidden":!0},c("div",{class: ` $ { f } - progress - graph - circle ` },c("svg",{viewBox: ` 0 0 $ { o } $ { o } ` },u.map((h,p)=>c("g",{key:p},c("path",{class: ` $ { f } - progress - graph - circle - rail ` ,d:nn(o/2-n/2*(1+2*p)-i*p,n,o),"stroke-width":n,"stroke-linecap":"round",fill:"none",style:[{strokeDashoffset:0,stroke:a[p]},d[p]]}),c("path",{class:[ ` $ { f } - progress - graph - circle - fill ` ,h===0&& ` $ { f } - progress - graph - circle - fill -- empty ` ],d:nn(o/2-n/2*(1+2*p)-i*p,n,o),"stroke-width":n,"stroke-linecap":"round",fill:"none",style:{strokeDasharray:r.value[p],strokeDashoffset:0,stroke:s[p]}})))))),l&&t.default?c("div",null,c("div",{class: ` $ { f } - progress - text ` },t.default())):null)}}}),Zh=Object.assign(Object.assign({},ae.props),{processing:Boolean,type:{type:String,default:"line"},gapDegree:Number,gapOffsetDegree:Number,status:{type:String,default:"default"},railColor:[String,Array],railStyle:[String,Array],color:[String,Array],viewBoxWidth:{type:Number,default:100},strokeWidth:{type:Number,default:7},percentage:[Number,Array],unit:{type:String,default:"%"},showIndicator:{type:Boolean,default:!0},indicatorPosition:{type:String,default:"outside"},indicatorPlacement:{type:String,default:"outside"},indicatorTextColor:String,circleGap:{type:Number,default:1},height:Number,borderRadius:[String,Number],fillBorderRadius:[String,Number],offsetDegree:Number}),Jh=q({name:"Progress",props:Zh,setup(e){const t=D(()=>e.indicatorPlacement||e.indicatorPosition),r=D(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),{mergedClsPrefixRef:o,inlineThemeDisabled:n}=Re(e),i=ae("Progress","-progress",Vh,yi,e,o),l=D(()=>{const{status:a}=e,{common:{cubicBezierEaseInOut:d},self:{fontSize:u,fontSizeCircle:f,railColor:h,railHeight:p,iconSizeCircle:v,iconSizeLine:y,textColorCircle:w,tex
color : var ( -- n - text - color ) ;
line - height : var ( -- n - line - height ) ;
font - size : var ( -- n - font - size ) ;
transition :
color . 3 s var ( -- n - bezier ) ;
` ,[S("result-icon", `
display : flex ;
justify - content : center ;
transition : color . 3 s var ( -- n - bezier ) ;
` ,[B("status-image", `
font - size : var ( -- n - icon - size ) ;
width : 1 em ;
height : 1 em ;
` ),S("base-icon", `
color : var ( -- n - icon - color ) ;
font - size : var ( -- n - icon - size ) ;
` )]),S("result-content",{marginTop:"24px"}),S("result-footer", `
margin - top : 24 px ;
text - align : center ;
` ),S("result-header",[B("title", `
margin - top : 16 px ;
font - weight : var ( -- n - title - font - weight ) ;
transition : color . 3 s var ( -- n - bezier ) ;
text - align : center ;
color : var ( -- n - title - text - color ) ;
font - size : var ( -- n - title - font - size ) ;
` ),B("description", `
margin - top : 4 px ;
text - align : center ;
font - size : var ( -- n - font - size ) ;
` )])]),np={403:rp,404:Qh,418:tp,500:ep,info:c(Yr,null),success:c(qr,null),warning:c(Xr,null),error:c(Gr,null)},ip=Object.assign(Object.assign({},ae.props),{size:{type:String,default:"medium"},status:{type:String,default:"info"},title:String,description:String}),ap=q({name:"Result",props:ip,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=Re(e),o=ae("Result","-result",op,Sh,e,t),n=D(()=>{const{size:l,status:s}=e,{common:{cubicBezierEaseInOut:a},self:{textColor:d,lineHeight:u,titleTextColor:f,titleFontWeight:h,[ne("iconColor",s)]:p,[ne("fontSize",l)]:v,[ne("titleFontSize",l)]:y,[ne("iconSize",l)]:w}}=o.value;return{"--n-bezier":a,"--n-font-size":v,"--n-icon-size":w,"--n-line-height":u,"--n-text-color":d,"--n-title-font-size":y,"--n-title-font-weight":h,"--n-title-text-color":f,"--n-icon-color":p||""}}),i=r?Fe("result",D(()=>{const{size:l,status:s}=e;let a="";return l&&(a+=l[0]),s&&(a+=s[0]),a}),n,e):void 0;return{mergedClsPrefix:t,cssVars:r?void 0:n,themeClass:i==null?void 0:i.themeClass,onRender:i==null?void 0:i.onRender}},render(){var e;const{status:t, $ slots:r,mergedClsPrefix:o,onRender:n}=this;return n==null||n(),c("div",{class:[ ` $ { o } - result ` ,this.themeClass],style:this.cssVars},c("div",{class: ` $ { o } - result - icon ` },((e=r.icon)===null||e===void 0?void 0:e.call(r))||c(ve,{clsPrefix:o},{default:()=>np[t]})),c("div",{class: ` $ { o } - result - header ` },this.title?c("div",{class: ` $ { o } - result - header _ _title ` },this.title):null,this.description?c("div",{class: ` $ { o } - result - header _ _description ` },this.description):null),r.default&&c("div",{class: ` $ { o } - result - content ` },r),r.footer&&c("div",{class: ` $ { o } - result - footer ` },r.footer()))}}),lp=L([S("table", `
font - size : var ( -- n - font - size ) ;
font - variant - numeric : tabular - nums ;
line - height : var ( -- n - line - height ) ;
width : 100 % ;
border - radius : var ( -- n - border - radius ) var ( -- n - border - radius ) 0 0 ;
text - align : left ;
border - collapse : separate ;
border - spacing : 0 ;
overflow : hidden ;
background - color : var ( -- n - td - color ) ;
border - color : var ( -- n - merged - border - color ) ;
transition :
background - color . 3 s var ( -- n - bezier ) ,
border - color . 3 s var ( -- n - bezier ) ,
color . 3 s var ( -- n - bezier ) ;
-- n - merged - border - color : var ( -- n - border - color ) ;
` ,[L("th", `
white - space : nowrap ;
transition :
background - color . 3 s var ( -- n - bezier ) ,
border - color . 3 s var ( -- n - bezier ) ,
color . 3 s var ( -- n - bezier ) ;
text - align : inherit ;
padding : var ( -- n - th - padding ) ;
vertical - align : inherit ;
text - transform : none ;
border : 0 px solid var ( -- n - merged - border - color ) ;
font - weight : var ( -- n - th - font - weight ) ;
color : var ( -- n - th - text - color ) ;
background - color : var ( -- n - th - color ) ;
border - bottom : 1 px solid var ( -- n - merged - border - color ) ;
border - right : 1 px solid var ( -- n - merged - border - color ) ;
` ,[L("&:last-child", `
border - right : 0 px solid var ( -- n - merged - border - color ) ;
` )]),L("td", `
transition :
background - color . 3 s var ( -- n - bezier ) ,
border - color . 3 s var ( -- n - bezier ) ,
color . 3 s var ( -- n - bezier ) ;
padding : var ( -- n - td - padding ) ;
color : var ( -- n - td - text - color ) ;
background - color : var ( -- n - td - color ) ;
border : 0 px solid var ( -- n - merged - border - color ) ;
border - right : 1 px solid var ( -- n - merged - border - color ) ;
border - bottom : 1 px solid var ( -- n - merged - border - color ) ;
` ,[L("&:last-child", `
border - right : 0 px solid var ( -- n - merged - border - color ) ;
` )]),j("bordered", `
border : 1 px solid var ( -- n - merged - border - color ) ;
border - radius : var ( -- n - border - radius ) ;
` ,[L("tr",[L("&:last-child",[L("td", `
border - bottom : 0 solid var ( -- n - merged - border - color ) ;
` )])])]),j("single-line",[L("th", `
border - right : 0 px solid var ( -- n - merged - border - color ) ;
` ),L("td", `
border - right : 0 px solid var ( -- n - merged - border - color ) ;
` )]),j("single-column",[L("tr",[L("&:not(:last-child)",[L("td", `
border - bottom : 0 px solid var ( -- n - merged - border - color ) ;
` )])])]),j("striped",[L("tr:nth-of-type(even)",[L("td","background-color: var(--n-td-color-striped)")])]),ze("bottom-bordered",[L("tr",[L("&:last-child",[L("td", `
border - bottom : 0 px solid var ( -- n - merged - border - color ) ;
` )])])])]),Tn(S("table", `
background - color : var ( -- n - td - color - modal ) ;
-- n - merged - border - color : var ( -- n - border - color - modal ) ;
` ,[L("th", `
background - color : var ( -- n - th - color - modal ) ;
` ),L("td", `
background - color : var ( -- n - td - color - modal ) ;
` )])),In(S("table", `
background - color : var ( -- n - td - color - popover ) ;
-- n - merged - border - color : var ( -- n - border - color - popover ) ;
` ,[L("th", `
background - color : var ( -- n - th - color - popover ) ;
` ),L("td", `
background - color : var ( -- n - td - color - popover ) ;
` )]))]),sp=Object.assign(Object.assign({},ae.props),{bordered:{type:Boolean,default:!0},bottomBordered:{type:Boolean,default:!0},singleLine:{type:Boolean,default:!0},striped:Boolean,singleColumn:Boolean,size:{type:String,default:"medium"}}),dp=q({name:"Table",props:sp,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r,mergedRtlRef:o}=Re(e),n=ae("Table","-table",lp,zh,e,t),i=St("Table",o,t),l=D(()=>{const{size:a}=e,{self:{borderColor:d,tdColor:u,tdColorModal:f,tdColorPopover:h,thColor:p,thColorModal:v,thColorPopover:y,thTextColor:w,tdTextColor:x,borderRadius:P,thFontWeight:k,lineHeight:b,borderColorModal:m,borderColorPopover:R,tdColorStriped: $ ,tdColorStripedModal:A,tdColorStripedPopover:z,[ne("fontSize",a)]:_,[ne("tdPadding",a)]:K,[ne("thPadding",a)]:F},common:{cubicBezierEaseInOut:O}}=n.value;return{"--n-bezier":O,"--n-td-color":u,"--n-td-color-modal":f,"--n-td-color-popover":h,"--n-td-text-color":x,"--n-border-color":d,"--n-border-color-modal":m,"--n-border-color-popover":R,"--n-border-radius":P,"--n-font-size":_,"--n-th-color":p,"--n-th-color-modal":v,"--n-th-color-popover":y,"--n-th-font-weight":k,"--n-th-text-color":w,"--n-line-height":b,"--n-td-padding":K,"--n-th-padding":F,"--n-td-color-striped": $ ,"--n-td-color-striped-modal":A,"--n-td-color-striped-popover":z}}),s=r?Fe("table",D(()=>e.size[0]),l,e):void 0;return{rtlEnabled:i,mergedClsPrefix:t,cssVars:r?void 0:l,themeClass:s==null?void 0:s.themeClass,onRender:s==null?void 0:s.onRender}},render(){var e;const{mergedClsPrefix:t}=this;return(e=this.onRender)===null||e===void 0||e.call(this),c("table",{class:[ ` $ { t } - table ` ,this.themeClass,{[ ` $ { t } - table -- rtl ` ]:this.rtlEnabled,[ ` $ { t } - table -- bottom - bordered ` ]:this.bottomBordered,[ ` $ { t } - table -- bordered ` ]:this.bordered,[ ` $ { t } - table -- single - line ` ]:this.singleLine,[ ` $ { t } - table -- single - column ` ]:this.singleColumn,[ ` $ { t } - table -- striped ` ]:this.striped}],style:this.cssVars},this. $ slots)}}),cp=S("thing", `
display : flex ;
transition : color . 3 s var ( -- n - bezier ) ;
font - size : var ( -- n - font - size ) ;
color : var ( -- n - text - color ) ;
` ,[S("thing-avatar", `
margin - right : 12 px ;
margin - top : 2 px ;
` ),S("thing-avatar-header-wrapper", `
display : flex ;
flex - wrap : nowrap ;
` ,[S("thing-header-wrapper", `
flex : 1 ;
` )]),S("thing-main", `
flex - grow : 1 ;
` ,[S("thing-header", `
display : flex ;
margin - bottom : 4 px ;
justify - content : space - between ;
align - items : center ;
` ,[B("title", `
font - size : 16 px ;
font - weight : var ( -- n - title - font - weight ) ;
transition : color . 3 s var ( -- n - bezier ) ;
color : var ( -- n - title - text - color ) ;
` )]),B("description",[L("&:not(:last-child)", `
margin - bottom : 4 px ;
` )]),B("content",[L("&:not(:first-child)", `
margin - top : 12 px ;
` )]),B("footer",[L("&:not(:first-child)", `
margin - top : 12 px ;
` )]),B("action",[L("&:not(:first-child)", `
margin - top : 12 px ;
` )])])]),up=Object.assign(Object.assign({},ae.props),{title:String,titleExtra:String,description:String,descriptionStyle:[String,Object],content:String,contentStyle:[String,Object],contentIndented:Boolean}),Si=q({name:"Thing",props:up,setup(e,{slots:t}){const{mergedClsPrefixRef:r,inlineThemeDisabled:o,mergedRtlRef:n}=Re(e),i=ae("Thing","-thing",cp,_h,e,r),l=St("Thing",n,r),s=D(()=>{const{self:{titleTextColor:d,textColor:u,titleFontWeight:f,fontSize:h},common:{cubicBezierEaseInOut:p}}=i.value;return{"--n-bezier":p,"--n-font-size":h,"--n-text-color":u,"--n-title-font-weight":f,"--n-title-text-color":d}}),a=o?Fe("thing",void 0,s,e):void 0;return()=>{var d;const{value:u}=r,f=l?l.value:!1;return(d=a==null?void 0:a.onRender)===null||d===void 0||d.call(a),c("div",{class:[ ` $ { u } - thing ` ,a==null?void 0:a.themeClass,f&& ` $ { u } - thing -- rtl ` ],style:o?void 0:s.value},t.avatar&&e.contentIndented?c("div",{class: ` $ { u } - thing - avatar ` },t.avatar()):null,c("div",{class: ` $ { u } - thing - main ` },!e.contentIndented&&(t.header||e.title||t["header-extra"]||e.titleExtra||t.avatar)?c("div",{class: ` $ { u } - thing - avatar - header - wrapper ` },t.avatar?c("div",{class: ` $ { u } - thing - avatar ` },t.avatar()):null,t.header||e.title||t["header-extra"]||e.titleExtra?c("div",{class: ` $ { u } - thing - header - wrapper ` },c("div",{class: ` $ { u } - thing - header ` },t.header||e.title?c("div",{class: ` $ { u } - thing - header _ _title ` },t.header?t.header():e.title):null,t["header-extra"]||e.titleExtra?c("div",{class: ` $ { u } - thing - header _ _extra ` },t["header-extra"]?t["header-extra"]():e.titleExtra):null),t.description||e.description?c("div",{class: ` $ { u } - thing - main _ _description ` ,style:e.descriptionStyle},t.description?t.description():e.description):null):null):c(Ve,null,t.header||e.title||t["header-extra"]||e.titleExtra?c("div",{class: ` $ { u } - thing - header ` },t.header||e.title?c("div",{class: ` $ { u } - thing - header _ _title ` },t.header?t.header():e.title):null,t["header-extra"]||e.titleExtra?c("div",{class: ` $ { u } - thing - header _ _extra ` },t["header-extra"]?t["header-extra"]():e.titleExtra):null):null,t.description||e.description?c("div",{class: ` $ { u } - thing - main _ _description ` ,style:e.descriptionStyle},t.description?t.description():e.description):null),t.default||e.content?c("div",{class: ` $ { u } - thing - main _ _content ` ,style:e.contentStyle},t.default?t.default():e.content):null,t.footer?c("div",{class: ` $ { u } - thing - main _ _footer ` },t.footer()):null,t.action?c("div",{class: ` $ { u } - thing - main _ _action ` },t.action()):null))}}}), $ t=Xe("n-upload"),ki="__UPLOAD_DRAGGER__",fp=q({name:"UploadDragger",[ki]:!0,setup(e,{slots:t}){const r=ue( $ t,null);return r||kt("upload-dragger"," ` n - upload - dragger ` must be placed inside ` n - upload ` ."),()=>{const{mergedClsPrefixRef:{value:o},mergedDisabledRef:{value:n},maxReachedRef:{value:i}}=r;return c("div",{class:[ ` $ { o } - upload - dragger ` ,(n||i)&& ` $ { o } - upload - dragger -- disabled ` ]},t)}}});var Pi=globalThis&&globalThis.__awaiter||function(e,t,r,o){function n(i){return i instanceof r?i:new r(function(l){l(i)})}return new(r||(r=Promise))(function(i,l){function s(u){try{d(o.next(u))}catch(f){l(f)}}function a(u){try{d(o.throw(u))}catch(f){l(f)}}function d(u){u.done?i(u.value):n(u.value).then(s,a)}d((o=o.apply(e,t||[])).next())})};const $ i=e=>e.includes("image/"),an=(e="")=>{const t=e.split("/"),o=t[t.length-1].split(/#| \? /)[0];return(/ \. [^./ \\ ]* $ /.exec(o)||[""])[0]},ln=/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico) $ /i,zi=e=>{if(e.type)return $ i(e.type);const t=an(e.name||"");if(ln.test(t))return!0;const r=e.thumbnailUrl||e.url||"",o=an(r);return!!(/^data:image \/ /.test(r)||ln.test(o))};function hp(e){return Pi(this,void 0,void 0,function*(){return yield new Promise(t=>{if(!e.type||! $ i(e.type)){t("");return}t(window.URL.createObjectURL(e))})})}const pp=Vr&&window.FileReader&&window.File;function vp(e){return e.isDirectory}function gp(e){return e.isFile}function mp(e,t){return Pi(this,void 0,void 0,function*(){const r=[];let o,n=0;function i(){n++}function l(){n--,n||o(r)}function s(a){a.forEach(d=>{if(d){if(i(),t&&vp(d)){const u=d.createReader();i(),u.readEntries(f=>{s(f),l()},()=>{l()})}else gp(d)&&(i(),d.file(u=>{r.push({file:u,entry:d,
display : block ;
` )]),j("drag-over",[S("upload-dragger", `
border : var ( -- n - dragger - border - hover ) ;
` )])]),S("upload-dragger", `
cursor : pointer ;
box - sizing : border - box ;
width : 100 % ;
text - align : center ;
border - radius : var ( -- n - border - radius ) ;
padding : 24 px ;
opacity : 1 ;
transition :
opacity . 3 s var ( -- n - bezier ) ,
border - color . 3 s var ( -- n - bezier ) ,
background - color . 3 s var ( -- n - bezier ) ;
background - color : var ( -- n - dragger - color ) ;
border : var ( -- n - dragger - border ) ;
` ,[L("&:hover", `
border : var ( -- n - dragger - border - hover ) ;
` ),j("disabled", `
cursor : not - allowed ;
` )]),S("upload-trigger", `
display : inline - block ;
box - sizing : border - box ;
opacity : 1 ;
transition : opacity . 3 s var ( -- n - bezier ) ;
` ,[L("+",[S("upload-file-list","margin-top: 8px;")]),j("disabled", `
opacity : var ( -- n - item - disabled - opacity ) ;
cursor : not - allowed ;
` ),j("image-card", `
width : 96 px ;
height : 96 px ;
` ,[S("base-icon", `
font - size : 24 px ;
` ),S("upload-dragger", `
padding : 0 ;
height : 100 % ;
width : 100 % ;
display : flex ;
align - items : center ;
justify - content : center ;
` )])]),S("upload-file-list", `
line - height : var ( -- n - line - height ) ;
opacity : 1 ;
transition : opacity . 3 s var ( -- n - bezier ) ;
` ,[L("a, img","outline: none;"),j("disabled", `
opacity : var ( -- n - item - disabled - opacity ) ;
cursor : not - allowed ;
` ,[S("upload-file","cursor: not-allowed;")]),j("grid", `
display : grid ;
grid - template - columns : repeat ( auto - fill , 96 px ) ;
grid - gap : 8 px ;
margin - top : 0 ;
` ),S("upload-file", `
display : block ;
box - sizing : border - box ;
cursor : default ;
padding : 0 px 12 px 0 6 px ;
transition : background - color . 3 s var ( -- n - bezier ) ;
border - radius : var ( -- n - border - radius ) ;
` ,[Io(),S("progress",[Io({foldPadding:!0})]),L("&:hover", `
background - color : var ( -- n - item - color - hover ) ;
` ,[S("upload-file-info",[B("action", `
opacity : 1 ;
` )])]),j("image-type", `
border - radius : var ( -- n - border - radius ) ;
text - decoration : underline ;
text - decoration - color : # 0000 ;
` ,[S("upload-file-info", `
padding - top : 0 px ;
padding - bottom : 0 px ;
width : 100 % ;
height : 100 % ;
display : flex ;
justify - content : space - between ;
align - items : center ;
padding : 6 px 0 ;
` ,[S("progress", `
padding : 2 px 0 ;
margin - bottom : 0 ;
` ),B("name", `
padding : 0 8 px ;
` ),B("thumbnail", `
width : 32 px ;
height : 32 px ;
font - size : 28 px ;
display : flex ;
justify - content : center ;
align - items : center ;
` ,[L("img", `
width : 100 % ;
` )])])]),j("text-type",[S("progress", `
box - sizing : border - box ;
padding - bottom : 6 px ;
margin - bottom : 6 px ;
` )]),j("image-card-type", `
position : relative ;
width : 96 px ;
height : 96 px ;
border : var ( -- n - item - border - image - card ) ;
border - radius : var ( -- n - border - radius ) ;
padding : 0 ;
display : flex ;
align - items : center ;
justify - content : center ;
transition : border - color . 3 s var ( -- n - bezier ) , background - color . 3 s var ( -- n - bezier ) ;
border - radius : var ( -- n - border - radius ) ;
overflow : hidden ;
` ,[S("progress", `
position : absolute ;
left : 8 px ;
bottom : 8 px ;
right : 8 px ;
width : unset ;
` ),S("upload-file-info", `
padding : 0 ;
width : 100 % ;
height : 100 % ;
` ,[B("thumbnail", `
width : 100 % ;
height : 100 % ;
display : flex ;
flex - direction : column ;
align - items : center ;
justify - content : center ;
font - size : 36 px ;
` ,[L("img", `
width : 100 % ;
` )])]),L("&::before", `
position : absolute ;
z - index : 1 ;
left : 0 ;
right : 0 ;
top : 0 ;
bottom : 0 ;
border - radius : inherit ;
opacity : 0 ;
transition : opacity . 2 s var ( -- n - bezier ) ;
content : "" ;
` ),L("&:hover",[L("&::before","opacity: 1;"),S("upload-file-info",[B("thumbnail","opacity: .12;")])])]),j("error-status",[L("&:hover", `
background - color : var ( -- n - item - color - hover - error ) ;
` ),S("upload-file-info",[B("name","color: var(--n-item-text-color-error);"),B("thumbnail","color: var(--n-item-text-color-error);")]),j("image-card-type", `
border : var ( -- n - item - border - image - card - error ) ;
` )]),j("with-url", `
cursor : pointer ;
` ,[S("upload-file-info",[B("name", `
color : var ( -- n - item - text - color - success ) ;
text - decoration - color : var ( -- n - item - text - color - success ) ;
` ,[L("a", `
text - decoration : underline ;
` )])])]),S("upload-file-info", `
position : relative ;
padding - top : 6 px ;
padding - bottom : 6 px ;
display : flex ;
flex - wrap : nowrap ;
` ,[B("thumbnail", `
font - size : 18 px ;
opacity : 1 ;
transition : opacity . 2 s var ( -- n - bezier ) ;
color : var ( -- n - item - icon - color ) ;
` ,[S("base-icon", `
margin - right : 2 px ;
vertical - align : middle ;
transition : color . 3 s var ( -- n - bezier ) ;
` )]),B("action", `
padding - top : inherit ;
padding - bottom : inherit ;
position : absolute ;
right : 0 ;
top : 0 ;
bottom : 0 ;
width : 80 px ;
display : flex ;
align - items : center ;
transition : opacity . 2 s var ( -- n - bezier ) ;
justify - content : flex - end ;
opacity : 0 ;
` ,[S("button",[L("&:not(:last-child)",{marginRight:"4px"}),S("base-icon",[L("svg",[Sn()])])]),j("image-type", `
position : relative ;
max - width : 80 px ;
width : auto ;
` ),j("image-card-type", `
z - index : 2 ;
position : absolute ;
width : 100 % ;
height : 100 % ;
left : 0 ;
right : 0 ;
bottom : 0 ;
top : 0 ;
display : flex ;
justify - content : center ;
align - items : center ;
` )]),B("name", `
color : var ( -- n - item - text - color ) ;
flex : 1 ;
display : flex ;
justify - content : center ;
text - overflow : ellipsis ;
overflow : hidden ;
flex - direction : column ;
text - decoration - color : # 0000 ;
font - size : var ( -- n - font - size ) ;
transition :
color . 3 s var ( -- n - bezier ) ,
text - decoration - color . 3 s var ( -- n - bezier ) ;
` ,[L("a", `
color : inherit ;
text - decoration : underline ;
` )])])])]),S("upload-file-input", `
display : block ;
width : 0 ;
height : 0 ;
opacity : 0 ;
2023-05-26 00:30:09 +08:00
` )]);var sn=globalThis&&globalThis.__awaiter||function(e,t,r,o){function n(i){return i instanceof r?i:new r(function(l){l(i)})}return new(r||(r=Promise))(function(i,l){function s(u){try{d(o.next(u))}catch(f){l(f)}}function a(u){try{d(o.throw(u))}catch(f){l(f)}}function d(u){u.done?i(u.value):n(u.value).then(s,a)}d((o=o.apply(e,t||[])).next())})};function zp(e,t,r){const{doChange:o,xhrMap:n}=e;let i=0;function l(a){var d;let u=Object.assign({},t,{status:"error",percentage:i});n.delete(t.id),u=Bt(((d=e.onError)===null||d===void 0?void 0:d.call(e,{file:u,event:a}))||u),o(u,a)}function s(a){var d;if(e.isErrorState){if(e.isErrorState(r)){l(a);return}}else if(r.status<200||r.status>=300){l(a);return}let u=Object.assign({},t,{status:"finished",percentage:i});n.delete(t.id),u=Bt(((d=e.onFinish)===null||d===void 0?void 0:d.call(e,{file:u,event:a}))||u),o(u,a)}return{handleXHRLoad:s,handleXHRError:l,handleXHRAbort(a){const d=Object.assign({},t,{status:"removed",file:null,percentage:i});n.delete(t.id),o(d,a)},handleXHRProgress(a){const d=Object.assign({},t,{status:"uploading"});if(a.lengthComputable){const u=Math.ceil(a.loaded/a.total*100);d.percentage=u,i=u}o(d,a)}}}function Tp(e){const{inst:t,file:r,data:o,headers:n,withCredentials:i,action:l,customRequest:s}=e,{doChange:a}=e.inst;let d=0;s({file:r,data:o,headers:n,withCredentials:i,action:l,onProgress(u){const f=Object.assign({},r,{status:"uploading"}),h=u.percent;f.percentage=h,d=h,a(f)},onFinish(){var u;let f=Object.assign({},r,{status:"finished",percentage:d});f=Bt(((u=t.onFinish)===null||u===void 0?void 0:u.call(t,{file:f}))||f),a(f)},onError(){var u;let f=Object.assign({},r,{status:"error",percentage:d});f=Bt(((u=t.onError)===null||u===void 0?void 0:u.call(t,{file:f}))||f),a(f)}})}function Ip(e,t,r){const o=zp(e,t,r);r.onabort=o.handleXHRAbort,r.onerror=o.handleXHRError,r.onload=o.handleXHRLoad,r.upload&&(r.upload.onprogress=o.handleXHRProgress)}function Ii(e,t){return typeof e=="function"?e({file:t}):e||{}}function _p(e,t,r){const o=Ii(t,r);o&&Object.keys(o).forEach(n=>{e.setRequestHeader(n,o[n])})}function Rp(e,t,r){const o=Ii(t,r);o&&Object.keys(o).forEach(n=>{e.append(n,o[n])})}function Op(e,t,r,{method:o,action:n,withCredentials:i,responseType:l,headers:s,data:a}){const d=new XMLHttpRequest;d.responseType=l,e.xhrMap.set(r.id,d),d.withCredentials=i;const u=new FormData;if(Rp(u,a,r),u.append(t,r.file),Ip(e,r,d),n!==void 0){d.open(o.toUpperCase(),n),_p(d,s,r),d.send(u);const f=Object.assign({},r,{status:"uploading"});e.doChange(f)}}const Mp=Object.assign(Object.assign({},ae.props),{name:{type:String,default:"file"},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:"POST"},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:""},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:"text"},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>pp?zi(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerStyle:[String,Object],renderIcon:Object}),Bp=q({name:"Upload",props:Mp,setup(e){e.abstract&&e.listType==="image-card"&&kt("upload","when the list-type is image-card, abstract is not supported.");const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=Re(e),o=ae("Upload","-upload", $ p,Mh,e,t),n= $ n(e),i=D(()=>{const{max:z}=e;return z!==void
2023-05-25 18:09:32 +08:00
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}var vt={FRONT:"FRONT",BEHIND:"BEHIND"},dt={INIT:"INIT",FIXED:"FIXED",DYNAMIC:"DYNAMIC"},hn=2,iv=function(){function e(t,r){Zp(this,e),this.init(t,r)}return Jp(e,[{key:"init",value:function(r,o){this.param=r,this.callUpdate=o,this.sizes=new Map,this.firstRangeTotalSize=0,this.firstRangeAverageSize=0,this.lastCalcIndex=0,this.fixedSizeValue=0,this.calcType=dt.INIT,this.offset=0,this.direction="",this.range=Object.create(null),r&&this.checkRange(0,r.keeps-1)}},{key:"destroy",value:function(){this.init(null,null)}},{key:"getRange",value:function(){var r=Object.create(null);return r.start=this.range.start,r.end=this.range.end,r.padFront=this.range.padFront,r.padBehind=this.range.padBehind,r}},{key:"isBehind",value:function(){return this.direction===vt.BEHIND}},{key:"isFront",value:function(){return this.direction===vt.FRONT}},{key:"getOffset",value:function(r){return(r<1?0:this.getIndexOffset(r))+this.param.slotHeaderSize}},{key:"updateParam",value:function(r,o){var n=this;this.param&&r in this.param&&(r==="uniqueIds"&&this.sizes.forEach(function(i,l){o.includes(l)||n.sizes.delete(l)}),this.param[r]=o)}},{key:"saveSize",value:function(r,o){this.sizes.set(r,o),this.calcType===dt.INIT?(this.fixedSizeValue=o,this.calcType=dt.FIXED):this.calcType===dt.FIXED&&this.fixedSizeValue!==o&&(this.calcType=dt.DYNAMIC,delete this.fixedSizeValue),this.calcType!==dt.FIXED&&typeof this.firstRangeTotalSize<"u"&&(this.sizes.size<Math.min(this.param.keeps,this.param.uniqueIds.length)?(this.firstRangeTotalSize=ev(this.sizes.values()).reduce(function(n,i){return n+i},0),this.firstRangeAverageSize=Math.round(this.firstRangeTotalSize/this.sizes.size)):delete this.firstRangeTotalSize)}},{key:"handleDataSourcesChange",value:function(){var r=this.range.start;this.isFront()?r=r-hn:this.isBehind()&&(r=r+hn),r=Math.max(r,0),this.updateRange(this.range.start,this.getEndByStart(r))}},{key:"handleSlotSizeChange",value:function(){this.handleDataSourcesChange()}},{key:"handleScroll",value:function(r){this.direction=r<this.offset?vt.FRONT:vt.BEHIND,this.offset=r,this.param&&(this.direction===vt.FRONT?this.handleFront():this.direction===vt.BEHIND&&this.handleBehind())}},{key:"handleFront",value:function(){var r=this.getScrollOvers();if(!(r>this.range.start)){var o=Math.max(r-this.param.buffer,0);this.checkRange(o,this.getEndByStart(o))}}},{key:"handleBehind",value:function(){var r=this.getScrollOvers();r<this.range.start+this.param.buffer||this.checkRange(r,this.getEndByStart(r))}},{key:"getScrollOvers",value:function(){var r=this.offset-this.param.slotHeaderSize;if(r<=0)return 0;if(this.isFixedType())return Math.floor(r/this.fixedSizeValue);for(var o=0,n=0,i=0,l=this.param.uniqueIds.length;o<=l;){if(n=o+Math.floor((l-o)/2),i=this.getIndexOffset(n),i===r)return n;i<r?o=n+1:i>r&&(l=n-1)}return o>0?--o:0}},{key:"getIndexOffset",value:function(r){if(!r)return 0;for(var o=0,n=0,i=0;i<r;i++)n=this.sizes.get(this.param.uniqueIds[i]),o=o+(typeof n=="number"?n:this.getEstimateSize());return this.lastCalcIndex=Math.max(this.lastCalcIndex,r-1),this.lastCalcIndex=Math.min(this.lastCalcIndex,this.getLastIndex()),o}},{key:"isFixedType",value:function(){return this.calcType===dt.FIXED}},{key:"getLastIndex",value:function(){return this.param.uniqueIds.length-1}},{key:"checkRange",value:function(r,o){var n=this.param.keeps,i=this.param.uniqueIds.length;i<=n?(r=0,o=this.getLastIndex()):o-r<n-1&&(r=o-n+1),this.range.start!==r&&this.updateRange(r,o)}},{key:"updateRange",value:function(r,o){this.range.start=r,this.range.end=o,this.range.padFront=this.getPadFront(),this.range.padBehind=this.getPadBehind(),this.callUpdate(this.getRange())}},{key:"getEndByStart",value:function(r){var o=r+this.param.keeps-1,n=Math.min(o,this.getLastIndex());return n}},{key:"getPadFront",value:function(){return this.isFixedType()?this.fixedSizeValue*this.range.start:this.getIndexOffset(this.range.start)}},{key:"getPadBehind",value:function(){var r=this.range.end,o=this.getLastIndex();return this.isFixedType()?(o-r)*thi
` ).filter(A=>A).map(A=>{var _;const z=A.split('","');return{act:z[0].slice(1),prompt:(_=z[1])==null?void 0:_.slice(1)}}),b.shift()}else return k.isDownloading=!1,t.error("暂不支持下载此后缀的提示词");k.isDownloading=!1;const m=r.addPrompt(b);m.result?(t.info( ` 下载文件含 $ { b . length } 条数据 ` ),t.success( ` 成功导入 $ { ( R = m . data ) == null ? void 0 : R . successCount } 条有效数据 ` )):t.error(m.msg||"提示词格式有误")};return(k,b)=>(oe(),Se(Ve,null,[G(E(ut),{class:"w-11/12 xl:w-[900px]",show:E(n),"onUpdate:show":b[3]||(b[3]=m=>zr(n)?n.value=m:null),preset:"card",title:"提示词库"},{default:Y(()=>[ye("div",hv,[G(E(et),{class:"basis-full xl:basis-0 xl:min-w-[300px]",placeholder:"搜索提示词",value:E(l),"onUpdate:value":b[0]||(b[0]=m=>zr(l)?l.value=m:null),clearable:!0},null,8,["value"]),G(E(ce),{secondary:"",type:"info",onClick:b[1]||(b[1]=m=>d.value=!0)},{default:Y(()=>[de("下载")]),_:1}),G(E(ce),{secondary:"",type:"info",onClick:h},{default:Y(()=>[de("添加")]),_:1}),G(E(Bp),{class:"w-[56px] xl:w-auto",accept:".json","default-upload":!1,"show-file-list":!1,onChange:y},{default:Y(()=>[G(E(ce),{secondary:"",type:"success",loading:u.value},{default:Y(()=>[de("导入")]),_:1},8,["loading"])]),_:1}),G(E(ce),{secondary:"",type:"success",onClick:w,loading:f.value},{default:Y(()=>[de("导出")]),_:1},8,["loading"]),G(E(ce),{secondary:"",type:"error",onClick:x},{default:Y(()=>[de("清空")]),_:1})]),E(s).length>0?(oe(),Pe(E(Mi),{key:0,class:"h-[40vh] xl:h-[60vh] overflow-y-auto","data-key":"prompt","data-sources":E(s),"data-component":fv,keeps:10},null,8,["data-sources"])):(oe(),Pe(E(io),{key:1,class:"h-[40vh] xl:h-[60vh] flex justify-center items-center",description:"暂无数据"},{extra:Y(()=>[G(E(ce),{secondary:"",type:"info",onClick:b[2]||(b[2]=m=>d.value=!0)},{default:Y(()=>[de("下载提示词")]),_:1})]),_:1}))]),_:1},8,["show"]),G(E(ut),{class:"w-11/12 xl:w-[600px]",show:E(a).isShow,"onUpdate:show":b[6]||(b[6]=m=>E(a).isShow=m),preset:"card",title:E(a).title},{default:Y(()=>[G(E(fh),{vertical:""},{default:Y(()=>[de(" 标题 "),G(E(et),{placeholder:"请输入标题",value:E(a).newPrompt.act,"onUpdate:value":b[4]||(b[4]=m=>E(a).newPrompt.act=m)},null,8,["value"]),de(" 描述 "),G(E(et),{placeholder:"请输入描述",type:"textarea",value:E(a).newPrompt.prompt,"onUpdate:value":b[5]||(b[5]=m=>E(a).newPrompt.prompt=m)},null,8,["value"]),G(E(ce),{block:"",secondary:"",type:"info",onClick:p},{default:Y(()=>[de("保存")]),_:1})]),_:1})]),_:1},8,["show","title"]),G(E(ut),{class:"w-11/12 xl:w-[600px]",show:d.value,"onUpdate:show":b[7]||(b[7]=m=>d.value=m),preset:"card",title:"下载提示词"},{default:Y(()=>[G(E(Uh),{class:"overflow-y-auto rounded-lg",hoverable:"",clickable:""},{default:Y(()=>[(oe(!0),Se(Ve,null,On(E(o),(m,R)=>(oe(),Pe(E(Wh),{key:R},{suffix:Y(()=>[ye("div",vv,[m.type===1?(oe(),Se("a",{key:0,class:"no-underline",href:m.refer,target:"_blank",rel:"noopener noreferrer"},[G(E(ce),{secondary:""},{default:Y(()=>[de("来源")]),_:1})],8,gv)):Qe("",!0),G(E(ce),{secondary:"",type:"info",onClick: $ =>P(m),loading:m.isDownloading},{default:Y(()=>[de("下载")]),_:2},1032,["onClick","loading"])])]),default:Y(()=>[m.type===1?(oe(),Se("a",{key:0,class:"no-underline text-blue-500",href:m.url,target:"_blank",rel:"noopener noreferrer"},Ue(m.name),9,pv)):m.type===2?(oe(),Pe(E(et),{key:1,placeholder:"请输入下载链接,支持 json 及 csv ",value:m.url,"onUpdate:value": $ =>m.url= $ },null,8,["value","onUpdate:value"])):Qe("",!0)]),_:2},1024))),128))]),_:1})]),_:1},8,["show"])],64))}}),bv= ` /* 移除顶部背景遮挡 */ \ r
. scroller > . top { \ r
display : none ! important ; \ r
} \ r
\ r
/* 移除顶部边距 */ \ r
. scroller > . scroller - positioner > . content { \ r
padding - top : 0 ! important ; \ r
} \ r
\ r
/* 聊天记录 */ \ r
. scroller . side - panel { \ r
position : fixed ; \ r
right : 10 px ; \ r
} ` ,yv={class:"inline-block max-w-[310px] xl:max-w-[650px] overflow-hidden text-ellipsis"},wv=q({__name:"ChatPromptItem",props:{index:{},source:{}},setup(e){const t=At(),{selectedPromptIndex:r,isShowChatPrompt:o,keyword:n}=ot(t),i=l=>{l&&(n.value="",CIB.vm.actionBar.inputText=l.prompt,CIB.vm.actionBar.input.focus(),o.value=!1)};return(l,s)=>(oe(),Pe(E(Si),{class:Jr(["hover:bg-gray-100 cursor-pointer px-5 h-[130px] flex justify-start items-center",{"bg-gray-100":l.index===E(r)}]),onClick:s[0]||(s[0]=a=>i(l.source))},{description:Y(()=>[G(E(er),{type:"info"},{default:Y(()=>[ye("span",yv,Ue(l.source.act),1)]),_:1})]),default:Y(()=>[G(E(hi),{tooltip:!1,"line-clamp":2},{default:Y(()=>[de(Ue(l.source.prompt),1)]),_:1})]),_:1},8,["class"]))}}),ho=e=>(Pl("data-v-aff729bc"),e=e(), $ l(),e),xv=ho(()=>ye("div",{class:"bounce1"},null,-1)),Cv=ho(()=>ye("div",{class:"bounce2"},null,-1)),Sv=ho(()=>ye("div",{class:"bounce3"},null,-1)),kv=[xv,Cv,Sv],Pv=q({__name:"LoadingSpinner",props:{isShow:{type:Boolean}},setup(e){const t=M(!1),r=M();return Ge(()=>{r.value&&r.value.addEventListener("transitionend",()=>{t.value=!0})}),(o,n)=>t.value?Qe("",!0):(oe(),Se("div",{key:0,ref_key:"loadingRef",ref:r,class:Jr(["loading-spinner",{hidden:!o.isShow}])},kv,2))}});const $ v=(e,t)=>{const r=e.__vccOpts||e;for(const[o,n]of t)r[o]=n;return r},zv= $ v(Pv,[["__scopeId","data-v-aff729bc"]]),Tv={key:0,class:"hidden xl:block"},Iv={key:1},_v={class:"hidden xl:table-cell"},Rv={key:1},Ov={key:0,class:"flex justify-center items-center flex-wrap gap-2"},Mv=["onClick"],Bv={class:"flex justify-center items-center flex-wrap gap-2"},Lv=q({__name:"ChatServiceSelect",setup(e){const t=uo(),{isShowChatServiceSelectModal:r,sydneyConfigs:o,selectedSydneyBaseUrl:n}=ot(t),i=Pt(),l=async a=>{a.isUsable=void 0,a.delay=void 0;const d=await t.checkSydneyConfig(a);d.errorMsg&&i.error(d.errorMsg),a.isUsable=d.isUsable,a.delay=d.delay},s=a=>{n.value=a.baseUrl,CIB.config.sydney.baseUrl=a.baseUrl,r.value=!1};return(a,d)=>(oe(),Pe(E(ut),{class:"w-11/12 xl:w-[900px]",show:E(r),"onUpdate:show":d[0]||(d[0]=u=>zr(r)?r.value=u:null),preset:"card",title:"聊天服务器设置"},{default:Y(()=>[G(E(dp),{striped:""},{default:Y(()=>[ye("tbody",null,[(oe(!0),Se(Ve,null,On(E(o),(u,f)=>(oe(),Se("tr",{key:f},[ye("td",null,[u.isCus?(oe(),Se("span",Tv,Ue(u.label),1)):(oe(),Se("span",Iv,Ue(u.label),1)),u.isCus?(oe(),Pe(E(et),{key:2,class:"xl:hidden",value:u.baseUrl,"onUpdate:value":h=>u.baseUrl=h,placeholder:"自定义聊天服务器链接",onChange:h=>l(u)},null,8,["value","onUpdate:value","onChange"])):Qe("",!0)]),ye("td",_v,[u.isCus?(oe(),Pe(E(et),{key:0,value:u.baseUrl,"onUpdate:value":h=>u.baseUrl=h,placeholder:"自定义聊天服务器链接",onChange:h=>l(u)},null,8,["value","onUpdate:value","onChange"])):(oe(),Se("span",Rv,Ue(u.baseUrl),1))]),ye("td",null,[u.baseUrl&&u.isUsable===void 0&&u.delay===void 0?(oe(),Se("div",Ov,[G(E(ce),{tertiary:"",loading:!0,size:"small",type:"info"})])):u.baseUrl?(oe(),Se("div",{key:1,class:"flex justify-center items-center flex-wrap gap-2",onClick:h=>l(u)},[u.isUsable===!1?(oe(),Pe(E(er),{key:0,type:"error",class:"cursor-pointer"},{default:Y(()=>[de("不可用")]),_:1})):Qe("",!0),u.delay?(oe(),Pe(E(er),{key:1,type:"success",class:"cursor-pointer"},{default:Y(()=>[de(Ue(u.delay)+" ms",1)]),_:2},1024)):Qe("",!0)],8,Mv)):Qe("",!0)]),ye("td",null,[ye("div",Bv,[G(E(ce),{class:"hidden xl:table-cell",secondary:"",onClick:h=>l(u)},{default:Y(()=>[de("检测")]),_:2},1032,["onClick"]),u.baseUrl===E(n)?(oe(),Pe(E(ce),{key:0,secondary:"",type:"success"},{default:Y(()=>[de("当前")]),_:1})):(oe(),Pe(E(ce),{key:1,secondary:"",type:"info",onClick:h=>s(u)},{default:Y(()=>[de("选择")]),_:2},1032,["onClick"]))])])]))),128))])]),_:1})]),_:1},8,["show"]))}}),Ev=ye("div",{class:"w-0 md:w-[60px]"},null,-1),Av={key:0,class:"fixed top-0 left-0 w-screen h-screen flex justify-center items-center bg-black/40 z-50"},Dv=130,Fv=q({__name:"Chat",setup(e){const t=Pt(),r=M(!0),o=At(),{isShowPromptSotre:n,isShowChatPrompt:i,keyword:l,promptList:s,searchPromptList:a,selectedPromptIndex:d}=ot(o),