koishi-plugin-chat-patch 2.4.0 → 2.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import{defineComponent as J,createElementBlock as M,openBlock as v,createElementVNode as h,getCurrentInstance as Ye,inject as Ae,ref as B,computed as E,unref as s,isRef as yt,warn as Ma,provide as Fn,mergeProps as cn,renderSlot as ye,onMounted as at,watch as Me,toRef as dn,onUnmounted as gn,shallowRef as an,nextTick as de,useAttrs as Ta,useSlots as Vo,normalizeStyle as De,normalizeClass as z,createCommentVNode as N,Fragment as ve,createBlock as U,withCtx as I,resolveDynamicComponent as Be,withModifiers as Te,toDisplayString as j,onBeforeUnmount as Gt,createVNode as S,Transition as Hn,withDirectives as vt,createTextVNode as Q,vShow as mt,Text as La,reactive as At,h as ne,watchEffect as $a,onScopeDispose as Ba,shallowReactive as Fo,isVNode as bn,render as fn,markRaw as An,toRefs as Aa,resolveComponent as me,withKeys as Dt,renderList as qe}from"vue";import{send as $e,receive as Zt,icons as Pa}from"@koishijs/client";import{isClient as je,computedEager as Oa,useEventListener as sn,useResizeObserver as Ho,useTimeoutFn as Na}from"@vueuse/core";/*! Element Plus Icons Vue v2.3.2 */var za=J({name:"ChatLineRound",__name:"chat-line-round",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.06 461.06 0 0 1-206.912-48.384l-175.616 58.56z"}),h("path",{fill:"currentColor",d:"M352 576h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m32-192h256q32 0 32 32t-32 32H384q-32 0-32-32t32-32"})]))}}),ao=za,Ra=J({name:"CircleCheck",__name:"circle-check",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),h("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),Va=Ra,Fa=J({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),Dn=Fa,Ha=J({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),h("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Do=Ha,Da=J({name:"CirclePlus",__name:"circle-plus",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),h("path",{fill:"currentColor",d:"M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0"}),h("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Ua=Da,ja=J({name:"Close",__name:"close",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),Uo=ja,Ka=J({name:"Collection",__name:"collection",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M192 736h640V128H256a64 64 0 0 0-64 64zm64-672h608a32 32 0 0 1 32 32v672a32 32 0 0 1-32 32H160l-32 57.536V192A128 128 0 0 1 256 64"}),h("path",{fill:"currentColor",d:"M240 800a48 48 0 1 0 0 96h592v-96zm0-64h656v160a64 64 0 0 1-64 64H240a112 112 0 0 1 0-224m144-608v250.88l96-76.8 96 76.8V128zm-64-64h320v381.44a32 32 0 0 1-51.968 24.96L480 384l-108.032 86.4A32 32 0 0 1 320 445.44z"})]))}}),so=Ka,qa=J({name:"Delete",__name:"delete",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),Wa=qa,Ga=J({name:"DocumentCopy",__name:"document-copy",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M128 320v576h576V320zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32M960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32M256 672h320v64H256zm0-192h320v64H256z"})]))}}),Ya=Ga,Xa=J({name:"Download",__name:"download",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),Za=Xa,Ja=J({name:"Hide",__name:"hide",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176"}),h("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"})]))}}),Qa=Ja,es=J({name:"InfoFilled",__name:"info-filled",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Pn=es,ts=J({name:"Loading",__name:"loading",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),_t=ts,ns=J({name:"Picture",__name:"picture",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),h("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64-64-64 64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),ro=ns,os=J({name:"StarFilled",__name:"star-filled",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M313.6 924.48a70.4 70.4 0 0 1-74.152-5.365 70.4 70.4 0 0 1-27.992-68.875l37.888-220.928L88.96 472.96a70.4 70.4 0 0 1 3.788-104.225A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 100.246-28.595 70.4 70.4 0 0 1 25.962 28.595l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),lo=os,as=J({name:"Star",__name:"star",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),ss=as,rs=J({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),jo=rs,ls=J({name:"Top",__name:"top",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}}),is=ls,us=J({name:"View",__name:"view",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),cs=us,ds=J({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,n)=>(v(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),Ko=ds;const qo=Symbol(),rn="el",fs="is-",bt=(e,t,n,o,a)=>{let r=`${e}-${t}`;return n&&(r+=`-${n}`),o&&(r+=`__${o}`),a&&(r+=`--${a}`),r},Wo=Symbol("namespaceContextKey"),Go=e=>{const t=e||(Ye()?Ae(Wo,B(rn)):B(rn));return E(()=>s(t)||rn)},Xe=(e,t)=>{const n=Go(t);return{namespace:n,b:(u="")=>bt(n.value,e,u,"",""),e:u=>u?bt(n.value,e,"",u,""):"",m:u=>u?bt(n.value,e,"","",u):"",be:(u,C)=>u&&C?bt(n.value,e,u,C,""):"",em:(u,C)=>u&&C?bt(n.value,e,"",u,C):"",bm:(u,C)=>u&&C?bt(n.value,e,u,"",C):"",bem:(u,C,w)=>u&&C&&w?bt(n.value,e,u,C,w):"",is:(u,...C)=>{const w=C.length>=1?C[0]:true;return u&&w?`${fs}${u}`:""},cssVar:u=>{const C={};for(const w in u)u[w]&&(C[`--${n.value}-${w}`]=u[w]);return C},cssVarName:u=>`--${n.value}-${u}`,cssVarBlock:u=>{const C={};for(const w in u)u[w]&&(C[`--${n.value}-${e}-${w}`]=u[w]);return C},cssVarBlockName:u=>`--${n.value}-${e}-${u}`}};/**
1
+ import{defineComponent as ee,createElementBlock as T,openBlock as p,createElementVNode as h,getCurrentInstance as Ye,inject as Ae,ref as N,computed as E,unref as s,isRef as yt,warn as Ma,provide as Dn,mergeProps as cn,renderSlot as ye,onMounted as Ze,watch as Me,toRef as dn,onUnmounted as gn,shallowRef as an,nextTick as fe,useAttrs as Ta,useSlots as Vo,normalizeStyle as He,normalizeClass as D,createCommentVNode as V,Fragment as he,createBlock as K,withCtx as M,resolveDynamicComponent as Be,withModifiers as Te,toDisplayString as W,onBeforeUnmount as Gt,createVNode as S,Transition as Fn,withDirectives as vt,createTextVNode as ne,vShow as mt,Text as La,reactive as At,h as se,watchEffect as $a,onScopeDispose as Ba,shallowReactive as Do,isVNode as bn,render as fn,markRaw as An,toRefs as Aa,resolveComponent as ge,withKeys as Ht,renderList as qe}from"vue";import{send as Le,receive as Zt,icons as Pa}from"@koishijs/client";import{isClient as je,computedEager as Oa,useEventListener as sn,useResizeObserver as Fo,useTimeoutFn as Na}from"@vueuse/core";/*! Element Plus Icons Vue v2.3.2 */var za=ee({name:"ChatLineRound",__name:"chat-line-round",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.06 461.06 0 0 1-206.912-48.384l-175.616 58.56z"}),h("path",{fill:"currentColor",d:"M352 576h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m32-192h256q32 0 32 32t-32 32H384q-32 0-32-32t32-32"})]))}}),ao=za,Ra=ee({name:"CircleCheck",__name:"circle-check",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),h("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),Va=Ra,Da=ee({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),Hn=Da,Fa=ee({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),h("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Ho=Fa,Ha=ee({name:"CirclePlus",__name:"circle-plus",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),h("path",{fill:"currentColor",d:"M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0"}),h("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Ua=Ha,ja=ee({name:"Close",__name:"close",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),Uo=ja,Ka=ee({name:"Collection",__name:"collection",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M192 736h640V128H256a64 64 0 0 0-64 64zm64-672h608a32 32 0 0 1 32 32v672a32 32 0 0 1-32 32H160l-32 57.536V192A128 128 0 0 1 256 64"}),h("path",{fill:"currentColor",d:"M240 800a48 48 0 1 0 0 96h592v-96zm0-64h656v160a64 64 0 0 1-64 64H240a112 112 0 0 1 0-224m144-608v250.88l96-76.8 96 76.8V128zm-64-64h320v381.44a32 32 0 0 1-51.968 24.96L480 384l-108.032 86.4A32 32 0 0 1 320 445.44z"})]))}}),so=Ka,qa=ee({name:"Delete",__name:"delete",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),Wa=qa,Ga=ee({name:"DocumentCopy",__name:"document-copy",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M128 320v576h576V320zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32M960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32M256 672h320v64H256zm0-192h320v64H256z"})]))}}),Ya=Ga,Xa=ee({name:"Download",__name:"download",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),Za=Xa,Ja=ee({name:"Hide",__name:"hide",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176"}),h("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"})]))}}),Qa=Ja,es=ee({name:"InfoFilled",__name:"info-filled",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Pn=es,ts=ee({name:"Loading",__name:"loading",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),_t=ts,ns=ee({name:"Picture",__name:"picture",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),h("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64-64-64 64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),ro=ns,os=ee({name:"StarFilled",__name:"star-filled",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M313.6 924.48a70.4 70.4 0 0 1-74.152-5.365 70.4 70.4 0 0 1-27.992-68.875l37.888-220.928L88.96 472.96a70.4 70.4 0 0 1 3.788-104.225A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 100.246-28.595 70.4 70.4 0 0 1 25.962 28.595l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),lo=os,as=ee({name:"Star",__name:"star",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),ss=as,rs=ee({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),jo=rs,ls=ee({name:"Top",__name:"top",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}}),is=ls,us=ee({name:"View",__name:"view",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),cs=us,ds=ee({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,n)=>(p(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[h("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),Ko=ds;const qo=Symbol(),rn="el",fs="is-",bt=(e,t,n,o,a)=>{let r=`${e}-${t}`;return n&&(r+=`-${n}`),o&&(r+=`__${o}`),a&&(r+=`--${a}`),r},Wo=Symbol("namespaceContextKey"),Go=e=>{const t=e||(Ye()?Ae(Wo,N(rn)):N(rn));return E(()=>s(t)||rn)},Xe=(e,t)=>{const n=Go(t);return{namespace:n,b:(u="")=>bt(n.value,e,u,"",""),e:u=>u?bt(n.value,e,"",u,""):"",m:u=>u?bt(n.value,e,"","",u):"",be:(u,L)=>u&&L?bt(n.value,e,u,L,""):"",em:(u,L)=>u&&L?bt(n.value,e,"",u,L):"",bm:(u,L)=>u&&L?bt(n.value,e,u,"",L):"",bem:(u,L,_)=>u&&L&&_?bt(n.value,e,u,L,_):"",is:(u,...L)=>{const _=L.length>=1?L[0]:true;return u&&_?`${fs}${u}`:""},cssVar:u=>{const L={};for(const _ in u)u[_]&&(L[`--${n.value}-${_}`]=u[_]);return L},cssVarName:u=>`--${n.value}-${u}`,cssVarBlock:u=>{const L={};for(const _ in u)u[_]&&(L[`--${n.value}-${e}-${_}`]=u[_]);return L},cssVarBlockName:u=>`--${n.value}-${e}-${u}`}};/**
2
2
  * @vue/shared v3.5.25
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
- **/const Ct=()=>{},ps=Object.prototype.hasOwnProperty,Ut=(e,t)=>ps.call(e,t),vs=Array.isArray,nt=e=>typeof e=="function",Re=e=>typeof e=="string",Ot=e=>e!==null&&typeof e=="object",ms=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},hs=/-\w/g,gs=ms(e=>e.replace(hs,t=>t.slice(1).toUpperCase()));var bs=typeof global=="object"&&global&&global.Object===Object&&global,ys=typeof self=="object"&&self&&self.Object===Object&&self,Un=bs||ys||Function("return this")(),ht=Un.Symbol,Yo=Object.prototype,ws=Yo.hasOwnProperty,xs=Yo.toString,Ht=ht?ht.toStringTag:void 0;function _s(e){var t=ws.call(e,Ht),n=e[Ht];try{e[Ht]=void 0;var o=true}catch{}var a=xs.call(e);return o&&(t?e[Ht]=n:delete e[Ht]),a}var Cs=Object.prototype,ks=Cs.toString;function Es(e){return ks.call(e)}var Ss="[object Null]",Is="[object Undefined]",io=ht?ht.toStringTag:void 0;function jn(e){return e==null?e===void 0?Is:Ss:io&&io in Object(e)?_s(e):Es(e)}function Kn(e){return e!=null&&typeof e=="object"}var Ms="[object Symbol]";function qn(e){return typeof e=="symbol"||Kn(e)&&jn(e)==Ms}function Ts(e,t){for(var n=-1,o=e==null?0:e.length,a=Array(o);++n<o;)a[n]=t(e[n],n,e);return a}var Yt=Array.isArray,uo=ht?ht.prototype:void 0,co=uo?uo.toString:void 0;function Xo(e){if(typeof e=="string")return e;if(Yt(e))return Ts(e,Xo)+"";if(qn(e))return co?co.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function pn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ls(e){return e}var $s="[object AsyncFunction]",Bs="[object Function]",As="[object GeneratorFunction]",Ps="[object Proxy]";function Os(e){if(!pn(e))return false;var t=jn(e);return t==Bs||t==As||t==$s||t==Ps}var En=Un["__core-js_shared__"],fo=function(){var e=/[^.]+$/.exec(En&&En.keys&&En.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ns(e){return!!fo&&fo in e}var zs=Function.prototype,Rs=zs.toString;function Vs(e){if(e!=null){try{return Rs.call(e)}catch{}try{return e+""}catch{}}return""}var Fs=/[\\^$.*+?()[\]{}|]/g,Hs=/^\[object .+?Constructor\]$/,Ds=Function.prototype,Us=Object.prototype,js=Ds.toString,Ks=Us.hasOwnProperty,qs=RegExp("^"+js.call(Ks).replace(Fs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ws(e){if(!pn(e)||Ns(e))return false;var t=Os(e)?qs:Hs;return t.test(Vs(e))}function Gs(e,t){return e==null?void 0:e[t]}function Wn(e,t){var n=Gs(e,t);return Ws(n)?n:void 0}function Ys(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Xs=800,Zs=16,Js=Date.now;function Qs(e){var t=0,n=0;return function(){var o=Js(),a=Zs-(o-n);if(n=o,a>0){if(++t>=Xs)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function er(e){return function(){return e}}var vn=function(){try{var e=Wn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),tr=vn?function(e,t){return vn(e,"toString",{configurable:true,enumerable:false,value:er(t),writable:true})}:Ls,nr=Qs(tr),or=9007199254740991,ar=/^(?:0|[1-9]\d*)$/;function Zo(e,t){var n=typeof e;return t=t??or,!!t&&(n=="number"||n!="symbol"&&ar.test(e))&&e>-1&&e%1==0&&e<t}function sr(e,t,n){t=="__proto__"&&vn?vn(e,t,{configurable:true,enumerable:true,value:n,writable:true}):e[t]=n}function Jo(e,t){return e===t||e!==e&&t!==t}var rr=Object.prototype,lr=rr.hasOwnProperty;function ir(e,t,n){var o=e[t];(!(lr.call(e,t)&&Jo(o,n))||n===void 0&&!(t in e))&&sr(e,t,n)}var po=Math.max;function ur(e,t,n){return t=po(t===void 0?e.length-1:t,0),function(){for(var o=arguments,a=-1,r=po(o.length-t,0),l=Array(r);++a<r;)l[a]=o[t+a];a=-1;for(var i=Array(t+1);++a<t;)i[a]=o[a];return i[t]=n(l),Ys(e,this,i)}}var cr=9007199254740991;function dr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cr}var fr="[object Arguments]";function vo(e){return Kn(e)&&jn(e)==fr}var Qo=Object.prototype,pr=Qo.hasOwnProperty,vr=Qo.propertyIsEnumerable,ea=vo(function(){return arguments}())?vo:function(e){return Kn(e)&&pr.call(e,"callee")&&!vr.call(e,"callee")},mr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hr=/^\w*$/;function gr(e,t){if(Yt(e))return false;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||qn(e)?true:hr.test(e)||!mr.test(e)||t!=null&&e in Object(t)}var jt=Wn(Object,"create");function br(){this.__data__=jt?jt(null):{},this.size=0}function yr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var wr="__lodash_hash_undefined__",xr=Object.prototype,_r=xr.hasOwnProperty;function Cr(e){var t=this.__data__;if(jt){var n=t[e];return n===wr?void 0:n}return _r.call(t,e)?t[e]:void 0}var kr=Object.prototype,Er=kr.hasOwnProperty;function Sr(e){var t=this.__data__;return jt?t[e]!==void 0:Er.call(t,e)}var Ir="__lodash_hash_undefined__";function Mr(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=jt&&t===void 0?Ir:t,this}function kt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}kt.prototype.clear=br;kt.prototype.delete=yr;kt.prototype.get=Cr;kt.prototype.has=Sr;kt.prototype.set=Mr;function Tr(){this.__data__=[],this.size=0}function yn(e,t){for(var n=e.length;n--;)if(Jo(e[n][0],t))return n;return-1}var Lr=Array.prototype,$r=Lr.splice;function Br(e){var t=this.__data__,n=yn(t,e);if(n<0)return false;var o=t.length-1;return n==o?t.pop():$r.call(t,n,1),--this.size,true}function Ar(e){var t=this.__data__,n=yn(t,e);return n<0?void 0:t[n][1]}function Pr(e){return yn(this.__data__,e)>-1}function Or(e,t){var n=this.__data__,o=yn(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function zt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}zt.prototype.clear=Tr;zt.prototype.delete=Br;zt.prototype.get=Ar;zt.prototype.has=Pr;zt.prototype.set=Or;var Nr=Wn(Un,"Map");function zr(){this.size=0,this.__data__={hash:new kt,map:new(Nr||zt),string:new kt}}function Rr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function wn(e,t){var n=e.__data__;return Rr(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Vr(e){var t=wn(this,e).delete(e);return this.size-=t?1:0,t}function Fr(e){return wn(this,e).get(e)}function Hr(e){return wn(this,e).has(e)}function Dr(e,t){var n=wn(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}function St(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}St.prototype.clear=zr;St.prototype.delete=Vr;St.prototype.get=Fr;St.prototype.has=Hr;St.prototype.set=Dr;var Ur="Expected a function";function Gn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ur);var n=function(){var o=arguments,a=t?t.apply(this,o):o[0],r=n.cache;if(r.has(a))return r.get(a);var l=e.apply(this,o);return n.cache=r.set(a,l)||r,l};return n.cache=new(Gn.Cache||St),n}Gn.Cache=St;var jr=500;function Kr(e){var t=Gn(e,function(o){return n.size===jr&&n.clear(),o}),n=t.cache;return t}var qr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wr=/\\(\\)?/g,Gr=Kr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(qr,function(n,o,a,r){t.push(a?r.replace(Wr,"$1"):o||n)}),t});function Yr(e){return e==null?"":Xo(e)}function xn(e,t){return Yt(e)?e:gr(e,t)?[e]:Gr(Yr(e))}function Yn(e){if(typeof e=="string"||qn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ta(e,t){t=xn(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[Yn(t[n++])];return n&&n==o?e:void 0}function Xr(e,t,n){var o=e==null?void 0:ta(e,t);return o===void 0?n:o}function Zr(e,t){for(var n=-1,o=t.length,a=e.length;++n<o;)e[a+n]=t[n];return e}var mo=ht?ht.isConcatSpreadable:void 0;function Jr(e){return Yt(e)||ea(e)||!!(mo&&e&&e[mo])}function Qr(e,t,n,o,a){var r=-1,l=e.length;for(n||(n=Jr),a||(a=[]);++r<l;){var i=e[r];n(i)?Zr(a,i):a[a.length]=i}return a}function el(e){var t=e==null?0:e.length;return t?Qr(e):[]}function tl(e){return nr(ur(e,void 0,el),e+"")}function nl(e,t){return e!=null&&t in Object(e)}function ol(e,t,n){t=xn(t,e);for(var o=-1,a=t.length,r=false;++o<a;){var l=Yn(t[o]);if(!(r=e!=null&&n(e,l)))break;e=e[l]}return r||++o!=a?r:(a=e==null?0:e.length,!!a&&dr(a)&&Zo(l,a)&&(Yt(e)||ea(e)))}function al(e,t){return e!=null&&ol(e,t,nl)}function na(e){for(var t=-1,n=e==null?0:e.length,o={};++t<n;){var a=e[t];o[a[0]]=a[1]}return o}function oa(e){return e==null}function sl(e,t,n,o){if(!pn(e))return e;t=xn(t,e);for(var a=-1,r=t.length,l=r-1,i=e;i!=null&&++a<r;){var p=Yn(t[a]),f=n;if(p==="__proto__"||p==="constructor"||p==="prototype")return e;if(a!=l){var T=i[p];f=void 0,f===void 0&&(f=pn(T)?T:Zo(t[a+1])?[]:{})}ir(i,p,f),i=i[p]}return e}function rl(e,t,n){for(var o=-1,a=t.length,r={};++o<a;){var l=t[o],i=ta(e,l);n(i,l)&&sl(r,xn(l,e),i)}return r}function ll(e,t){return rl(e,t,function(n,o){return al(e,o)})}var il=tl(function(e,t){return e==null?{}:ll(e,t)});const ul=e=>e===void 0,Sn=e=>typeof e=="boolean",ot=e=>typeof e=="number",On=e=>typeof Element>"u"?false:e instanceof Element,cl=e=>Re(e)?!Number.isNaN(Number(e)):false;class dl extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function fl(e,t){throw new dl(`[${e}] ${t}`)}const ho={current:0},go=B(0),aa=2e3,bo=Symbol("elZIndexContextKey"),sa=Symbol("zIndexContextKey"),pl=e=>{const t=Ye()?Ae(bo,ho):ho,n=e||(Ye()?Ae(sa,void 0):void 0),o=E(()=>{const l=s(n);return ot(l)?l:aa}),a=E(()=>o.value+go.value),r=()=>(t.current++,go.value=t.current,a.value);return!je&&Ae(bo),{initialZIndex:o,currentZIndex:a,nextZIndex:r}};var vl={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const ml=e=>(t,n)=>hl(t,n,s(e)),hl=(e,t,n)=>Xr(n,e,e).replace(/\{(\w+)\}/g,(o,a)=>{var r;return`${(r=t==null?void 0:t[a])!=null?r:`{${a}}`}`}),gl=e=>{const t=E(()=>s(e).name),n=yt(e)?e:B(e);return{lang:t,locale:n,t:ml(e)}},ra=Symbol("localeContextKey"),bl=e=>{const t=e||Ae(ra,B());return gl(E(()=>t.value||vl))},la="__epPropKey",ue=e=>e,yl=e=>Ot(e)&&!!e[la],ia=(e,t)=>{if(!Ot(e)||yl(e))return e;const{values:n,required:o,default:a,type:r,validator:l}=e,p={type:r,required:!!o,validator:n||l?f=>{let T=false,k=[];if(n&&(k=Array.from(n),Ut(e,"default")&&k.push(a),T||(T=k.includes(f))),l&&(T||(T=l(f))),!T&&k.length>0){const P=[...new Set(k)].map(c=>JSON.stringify(c)).join(", ");Ma(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${P}], got value ${JSON.stringify(f)}.`)}return T}:void 0,[la]:true};return Ut(e,"default")&&(p.default=a),p},st=e=>na(Object.entries(e).map(([t,n])=>[t,ia(n,t)])),ua=["","default","small","large"],Xn=ia({type:String,values:ua,required:false}),ca=Symbol("size"),wl=()=>{const e=Ae(ca,{});return E(()=>s(e.size)||"")},xl=Symbol("emptyValuesContextKey"),_l=st({emptyValues:Array,valueOnClear:{type:ue([String,Number,Boolean,Function]),default:void 0,validator:e=>(e=nt(e)?e():e,vs(e)?e.every(t=>!t):!e)}}),yo=e=>Object.keys(e),mn=B();function Zn(e,t=void 0){const n=Ye()?Ae(qo,mn):mn;return e?E(()=>{var o,a;return(a=(o=n.value)==null?void 0:o[e])!=null?a:t}):n}function da(e,t){const n=Zn(),o=Xe(e,E(()=>{var i;return((i=n.value)==null?void 0:i.namespace)||rn})),a=bl(E(()=>{var i;return(i=n.value)==null?void 0:i.locale})),r=pl(E(()=>{var i;return((i=n.value)==null?void 0:i.zIndex)||aa})),l=E(()=>{var i;return s(t)||((i=n.value)==null?void 0:i.size)||""});return fa(E(()=>s(n)||{})),{ns:o,locale:a,zIndex:r,size:l}}const fa=(e,t,n=false)=>{var o;const a=!!Ye(),r=a?Zn():void 0,l=(o=void 0)!=null?o:a?Fn:void 0;if(!l)return;const i=E(()=>{const p=s(e);return r!=null&&r.value?Cl(r.value,p):p});return l(qo,i),l(ra,E(()=>i.value.locale)),l(Wo,E(()=>i.value.namespace)),l(sa,E(()=>i.value.zIndex)),l(ca,{size:E(()=>i.value.size||"")}),l(xl,E(()=>({emptyValues:i.value.emptyValues,valueOnClear:i.value.valueOnClear}))),(n||!mn.value)&&(mn.value=i.value),i},Cl=(e,t)=>{const n=[...new Set([...yo(e),...yo(t)])],o={};for(const a of n)o[a]=t[a]!==void 0?t[a]:e[a];return o};var gt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n};const _n=(e,t)=>{if(e.install=n=>{for(const o of[e,...Object.values(t??{})])n.component(o.name,o)},t)for(const[n,o]of Object.entries(t))e[n]=o;return e},kl=(e,t)=>(e.install=n=>{e._context=n._context,n.config.globalProperties[t]=e},e),El=e=>(e.install=Ct,e),ln="update:modelValue",wo="change",In="input",pa=(e="")=>e.split(" ").filter(t=>!!t.trim()),Sl=(e,t)=>{if(!e||!t)return false;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},Il=(e,t)=>{!e||!t.trim()||e.classList.add(...pa(t))},Ml=(e,t)=>{!e||!t.trim()||e.classList.remove(...pa(t))},Tl=(e,t)=>{var n;if(!je||!e||!t)return"";let o=gs(t);o==="float"&&(o="cssFloat");try{const a=e.style[o];if(a)return a;const r=(n=document.defaultView)==null?void 0:n.getComputedStyle(e,"");return r?r[o]:""}catch{return e.style[o]}};function Kt(e,t="px"){if(!e&&e!==0)return"";if(ot(e)||cl(e))return`${e}${t}`;if(Re(e))return e}let Jt;const Ll=e=>{var t;if(!je)return 0;if(Jt!==void 0)return Jt;const n=document.createElement("div");n.className=`${e}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const o=n.offsetWidth;n.style.overflow="scroll";const a=document.createElement("div");a.style.width="100%",n.appendChild(a);const r=a.offsetWidth;return(t=n.parentNode)==null||t.removeChild(n),Jt=o-r,Jt},$l=st({size:{type:ue([Number,String])},color:{type:String}}),Bl=J({name:"ElIcon",inheritAttrs:false,__name:"icon",props:$l,setup(e){const t=e,n=Xe("icon"),o=E(()=>{const{size:a,color:r}=t,l=Kt(a);return!l&&!r?{}:{fontSize:l,"--color":r}});return(a,r)=>(v(),M("i",cn({class:s(n).b(),style:o.value},a.$attrs),[ye(a.$slots,"default")],16))}});var Al=gt(Bl,[["__file","/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);const Ge=_n(Al),Pt=ue([String,Object,Function]),va={Close:Uo,SuccessFilled:jo,InfoFilled:Pn,WarningFilled:Ko,CircleCloseFilled:Dn},hn={primary:Pn,success:jo,warning:Ko,error:Dn,info:Pn},Pl={validating:_t,success:Va,error:Do},Ol=()=>je&&/firefox/i.test(window.navigator.userAgent),Nl=()=>je&&/android/i.test(window.navigator.userAgent);let Le;const zl={height:"0",visibility:"hidden",overflow:Ol()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Rl=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],xo=e=>{const t=Number.parseFloat(e);return Number.isNaN(t)?e:t};function Vl(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),o=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),a=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:Rl.map(l=>[l,t.getPropertyValue(l)]),paddingSize:o,borderSize:a,boxSizing:n}}function _o(e,t=1,n){var o,a;Le||(Le=document.createElement("textarea"),((o=e.parentNode)!=null?o:document.body).appendChild(Le));const{paddingSize:r,borderSize:l,boxSizing:i,contextStyle:p}=Vl(e);p.forEach(([P,c])=>Le==null?void 0:Le.style.setProperty(P,c)),Object.entries(zl).forEach(([P,c])=>Le==null?void 0:Le.style.setProperty(P,c,"important")),Le.value=e.value||e.placeholder||"";let f=Le.scrollHeight;const T={};i==="border-box"?f=f+l:i==="content-box"&&(f=f-r),Le.value="";const k=Le.scrollHeight-r;if(ot(t)){let P=k*t;i==="border-box"&&(P=P+r+l),f=Math.max(P,f),T.minHeight=`${P}px`}if(ot(n)){let P=k*n;i==="border-box"&&(P=P+r+l),f=Math.min(P,f)}return T.height=`${f}px`,(a=Le.parentNode)==null||a.removeChild(Le),Le=void 0,T}const ma=e=>e,Fl=st({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Hl=e=>il(Fl,e),Dl=st({id:{type:String,default:void 0},size:Xn,disabled:{type:Boolean,default:void 0},modelValue:{type:ue([String,Number,Object]),default:""},modelModifiers:{type:ue(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:ue(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:ue([Boolean,Object]),default:false},autocomplete:{type:ue(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:Pt,default:Do},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:Pt},prefixIcon:{type:Pt},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:true},inputStyle:{type:ue([Object,Array,String]),default:()=>ma({})},autofocus:Boolean,rows:{type:Number,default:2},...Hl(["ariaLabel"]),inputmode:{type:ue(String),default:void 0},name:String}),Ul={[ln]:e=>Re(e),input:e=>Re(e),change:(e,t)=>Re(e)&&(t instanceof Event||t===void 0),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>true,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},jl=["class","style"],Kl=/^on[A-Z]/,ql=(e={})=>{const{excludeListeners:t=false,excludeKeys:n}=e,o=E(()=>((n==null?void 0:n.value)||[]).concat(jl)),a=Ye();return a?E(()=>{var r;return na(Object.entries((r=a.proxy)==null?void 0:r.$attrs).filter(([l])=>!o.value.includes(l)&&!(t&&Kl.test(l))))}):E(()=>({}))},Co={prefix:Math.floor(Math.random()*1e4),current:0},Wl=Symbol("elIdInjection"),Gl=()=>Ye()?Ae(Wl,Co):Co,Nn=e=>{const t=Gl(),n=Go();return Oa(()=>s(e)||`${n.value}-id-${t.prefix}-${t.current++}`)},Jn=Symbol("formContextKey"),ha=Symbol("formItemContextKey"),ga=()=>{const e=Ae(Jn,void 0),t=Ae(ha,void 0);return{form:e,formItem:t}},Yl=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:o})=>{n||(n=B(false)),o||(o=B(false));const a=Ye(),r=()=>{let f=a==null?void 0:a.parent;for(;f;){if(f.type.name==="ElFormItem")return false;if(f.type.name==="ElLabelWrap")return true;f=f.parent}return false},l=B();let i;const p=E(()=>{var f;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((f=t.inputIds)==null?void 0:f.length)<=1)});return at(()=>{i=Me([dn(e,"id"),n],([f,T])=>{const k=f??(T?void 0:Nn().value);k!==l.value&&(t!=null&&t.removeInputId&&!r()&&(l.value&&t.removeInputId(l.value),!(o!=null&&o.value)&&!T&&k&&t.addInputId(k)),l.value=k)},{immediate:true})}),gn(()=>{i&&i(),t!=null&&t.removeInputId&&l.value&&t.removeInputId(l.value)}),{isLabeledByFormItem:p,inputId:l}},ba=e=>{const t=Ye();return E(()=>{var n,o;return(o=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:o[e]})},ya=(e,t={})=>{const n=B(void 0),o=t.prop?n:ba("size"),a=t.global?n:wl(),r=t.form?{size:void 0}:Ae(Jn,void 0),l=t.formItem?{size:void 0}:Ae(ha,void 0);return E(()=>o.value||s(e)||(l==null?void 0:l.size)||(r==null?void 0:r.size)||a.value||"")},Qn=e=>{const t=ba("disabled"),n=Ae(Jn,void 0);return E(()=>{var o,a,r;return(r=(a=(o=t.value)!=null?o:s(e))!=null?a:n==null?void 0:n.disabled)!=null?r:false})},Xl='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',ko=e=>typeof Element>"u"?false:e instanceof Element,Zl=e=>getComputedStyle(e).position==="fixed"?false:e.offsetParent!==null,Eo=e=>Array.from(e.querySelectorAll(Xl)).filter(t=>eo(t)&&Zl(t)),eo=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return true;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return false;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return true;default:return false}},Jl=(e,t)=>{if(!e||!e.focus)return;let n=false;ko(e)&&!eo(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),n=true),e.focus(t),ko(e)&&n&&e.removeAttribute("tabindex")};function Ql(e,{disabled:t,beforeFocus:n,afterFocus:o,beforeBlur:a,afterBlur:r}={}){const l=Ye(),{emit:i}=l,p=an(),f=B(false),T=c=>{const d=nt(n)?n(c):false;s(t)||f.value||d||(f.value=true,i("focus",c),o==null||o())},k=c=>{var d;const u=nt(a)?a(c):false;s(t)||c.relatedTarget&&((d=p.value)!=null&&d.contains(c.relatedTarget))||u||(f.value=false,i("blur",c),r==null||r())},P=c=>{var d,u;s(t)||eo(c.target)||(d=p.value)!=null&&d.contains(document.activeElement)&&p.value!==document.activeElement||(u=e.value)==null||u.focus()};return Me([p,()=>s(t)],([c,d])=>{c&&(d?c.removeAttribute("tabindex"):c.setAttribute("tabindex","-1"))}),sn(p,"focus",T,true),sn(p,"blur",k,true),sn(p,"click",P,true),{isFocused:f,wrapperRef:p,handleFocus:T,handleBlur:k}}const ei=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);function ti({afterComposition:e,emit:t}){const n=B(false),o=i=>{t==null||t("compositionstart",i),n.value=true},a=i=>{var p;t==null||t("compositionupdate",i);const f=(p=i.target)==null?void 0:p.value,T=f[f.length-1]||"";n.value=!ei(T)},r=i=>{t==null||t("compositionend",i),n.value&&(n.value=false,de(()=>e(i)))};return{isComposing:n,handleComposition:i=>{i.type==="compositionend"?r(i):a(i)},handleCompositionStart:o,handleCompositionUpdate:a,handleCompositionEnd:r}}function ni(e){let t;function n(){if(e.value==null)return;const{selectionStart:a,selectionEnd:r,value:l}=e.value;if(a==null||r==null)return;const i=l.slice(0,Math.max(0,a)),p=l.slice(Math.max(0,r));t={selectionStart:a,selectionEnd:r,value:l,beforeTxt:i,afterTxt:p}}function o(){if(e.value==null||t==null)return;const{value:a}=e.value,{beforeTxt:r,afterTxt:l,selectionStart:i}=t;if(r==null||l==null||i==null)return;let p=a.length;if(a.endsWith(l))p=a.length-l.length;else if(a.startsWith(r))p=r.length;else{const f=r[i-1],T=a.indexOf(f,i-1);T!==-1&&(p=T+1)}e.value.setSelectionRange(p,p)}return[n,o]}const oi=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],ai=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role"],si="ElInput",ri=J({name:si,inheritAttrs:false,__name:"input",props:Dl,emits:Ul,setup(e,{expose:t,emit:n}){const o=e,a=n,r=Ta(),l=ql(),i=Vo(),p=E(()=>[o.type==="textarea"?C.b():u.b(),u.m(c.value),u.is("disabled",d.value),u.is("exceed",Ve.value),{[u.b("group")]:i.prepend||i.append,[u.m("prefix")]:i.prefix||o.prefixIcon,[u.m("suffix")]:i.suffix||o.suffixIcon||o.clearable||o.showPassword,[u.bm("suffix","password-clear")]:pe.value&&_e.value,[u.b("hidden")]:o.type==="hidden"},r.class]),f=E(()=>[u.e("wrapper"),u.is("focus",K.value)]),{form:T,formItem:k}=ga(),{inputId:P}=Yl(o,{formItemContext:k}),c=ya(),d=Qn(),u=Xe("input"),C=Xe("textarea"),w=an(),_=an(),R=B(false),ee=B(false),D=B(),F=an(o.inputStyle),H=E(()=>w.value||_.value),{wrapperRef:le,isFocused:K,handleFocus:ce,handleBlur:he}=Ql(H,{disabled:d,afterBlur(){var g;o.validateEvent&&((g=k==null?void 0:k.validate)==null||g.call(k,"blur").catch(L=>void 0))}}),G=E(()=>{var g;return(g=T==null?void 0:T.statusIcon)!=null?g:false}),A=E(()=>(k==null?void 0:k.validateState)||""),be=E(()=>A.value&&Pl[A.value]),xe=E(()=>ee.value?cs:Qa),rt=E(()=>[r.style]),te=E(()=>[o.inputStyle,F.value,{resize:o.resize}]),ie=E(()=>oa(o.modelValue)?"":String(o.modelValue)),pe=E(()=>o.clearable&&!d.value&&!o.readonly&&!!ie.value&&(K.value||R.value)),_e=E(()=>o.showPassword&&!d.value&&!!ie.value),ze=E(()=>o.showWordLimit&&!!o.maxlength&&(o.type==="text"||o.type==="textarea")&&!d.value&&!o.readonly&&!o.showPassword),Ze=E(()=>ie.value.length),Ve=E(()=>!!ze.value&&Ze.value>Number(o.maxlength)),It=E(()=>!!i.suffix||!!o.suffixIcon||pe.value||o.showPassword||ze.value||!!A.value&&G.value),Mt=E(()=>!!Object.keys(o.modelModifiers).length),[Tt,lt]=ni(w);Ho(_,g=>{if(Vt(),!ze.value||o.resize!=="both"&&o.resize!=="horizontal")return;const L=g[0],{width:q}=L.contentRect;D.value={right:`calc(100% - ${q+22-10}px)`}});const Je=()=>{const{type:g,autosize:L}=o;if(!(!je||g!=="textarea"||!_.value))if(L){const q=Ot(L)?L.minRows:void 0,Z=Ot(L)?L.maxRows:void 0,fe=_o(_.value,q,Z);F.value={overflowY:"hidden",...fe},de(()=>{_.value.offsetHeight,F.value=fe})}else F.value={minHeight:_o(_.value).minHeight}},Vt=(g=>{let L=false;return()=>{var q;if(L||!o.autosize)return;((q=_.value)==null?void 0:q.offsetParent)===null||(setTimeout(g),L=true)}})(Je),Fe=()=>{const g=H.value,L=o.formatter?o.formatter(ie.value):ie.value;!g||g.value===L||o.type==="file"||(g.value=L)},Ke=g=>{const{trim:L,number:q}=o.modelModifiers;return L&&(g=g.trim()),q&&(g=`${xo(g)}`),o.formatter&&o.parser&&(g=o.parser(g)),g},it=async g=>{if(Lt.value)return;const{lazy:L}=o.modelModifiers;let{value:q}=g.target;if(L){a(In,q);return}if(q=Ke(q),String(q)===ie.value){o.formatter&&Fe();return}Tt(),a(ln,q),a(In,q),await de(),(o.formatter&&o.parser||!Mt.value)&&Fe(),lt()},Pe=async g=>{let{value:L}=g.target;L=Ke(L),o.modelModifiers.lazy&&a(ln,L),a(wo,L,g),await de(),Fe()},{isComposing:Lt,handleCompositionStart:ut,handleCompositionUpdate:Qe,handleCompositionEnd:Ce}=ti({emit:a,afterComposition:it}),et=()=>{ee.value=!ee.value},Ft=()=>{var g;return(g=H.value)==null?void 0:g.focus()},$t=()=>{var g;return(g=H.value)==null?void 0:g.blur()},X=g=>{R.value=false,a("mouseleave",g)},y=g=>{R.value=true,a("mouseenter",g)},ge=g=>{a("keydown",g)},ae=()=>{var g;(g=H.value)==null||g.select()},ke=()=>{a(ln,""),a(wo,""),a("clear"),a(In,"")};return Me(()=>o.modelValue,()=>{var g;de(()=>Je()),o.validateEvent&&((g=k==null?void 0:k.validate)==null||g.call(k,"change").catch(L=>void 0))}),Me(ie,g=>{if(!H.value)return;const{trim:L,number:q}=o.modelModifiers,Z=H.value.value,fe=(q||o.type==="number")&&!/^0\d/.test(Z)?`${xo(Z)}`:Z;fe!==g&&(document.activeElement===H.value&&H.value.type!=="range"&&L&&fe.trim()===g||Fe())}),Me(()=>o.type,async()=>{await de(),Fe(),Je()}),at(()=>{!o.formatter&&o.parser,Fe(),de(Je)}),t({input:w,textarea:_,ref:H,textareaStyle:te,autosize:dn(o,"autosize"),isComposing:Lt,focus:Ft,blur:$t,select:ae,clear:ke,resizeTextarea:Je}),(g,L)=>(v(),M("div",{class:z([p.value,{[s(u).bm("group","append")]:g.$slots.append,[s(u).bm("group","prepend")]:g.$slots.prepend}]),style:De(rt.value),onMouseenter:y,onMouseleave:X},[N(" input "),g.type!=="textarea"?(v(),M(ve,{key:0},[N(" prepend slot "),g.$slots.prepend?(v(),M("div",{key:0,class:z(s(u).be("group","prepend"))},[ye(g.$slots,"prepend")],2)):N("v-if",true),h("div",{ref_key:"wrapperRef",ref:le,class:z(f.value)},[N(" prefix slot "),g.$slots.prefix||g.prefixIcon?(v(),M("span",{key:0,class:z(s(u).e("prefix"))},[h("span",{class:z(s(u).e("prefix-inner"))},[ye(g.$slots,"prefix"),g.prefixIcon?(v(),U(s(Ge),{key:0,class:z(s(u).e("icon"))},{default:I(()=>[(v(),U(Be(g.prefixIcon)))]),_:1},8,["class"])):N("v-if",true)],2)],2)):N("v-if",true),h("input",cn({id:s(P),ref_key:"input",ref:w,class:s(u).e("inner")},s(l),{name:g.name,minlength:g.minlength,maxlength:g.maxlength,type:g.showPassword?ee.value?"text":"password":g.type,disabled:s(d),readonly:g.readonly,autocomplete:g.autocomplete,tabindex:g.tabindex,"aria-label":g.ariaLabel,placeholder:g.placeholder,style:g.inputStyle,form:g.form,autofocus:g.autofocus,role:g.containerRole,inputmode:g.inputmode,onCompositionstart:L[0]||(L[0]=(...q)=>s(ut)&&s(ut)(...q)),onCompositionupdate:L[1]||(L[1]=(...q)=>s(Qe)&&s(Qe)(...q)),onCompositionend:L[2]||(L[2]=(...q)=>s(Ce)&&s(Ce)(...q)),onInput:it,onChange:Pe,onKeydown:ge}),null,16,oi),N(" suffix slot "),It.value?(v(),M("span",{key:1,class:z(s(u).e("suffix"))},[h("span",{class:z(s(u).e("suffix-inner"))},[!pe.value||!_e.value||!ze.value?(v(),M(ve,{key:0},[ye(g.$slots,"suffix"),g.suffixIcon?(v(),U(s(Ge),{key:0,class:z(s(u).e("icon"))},{default:I(()=>[(v(),U(Be(g.suffixIcon)))]),_:1},8,["class"])):N("v-if",true)],64)):N("v-if",true),pe.value?(v(),U(s(Ge),{key:1,class:z([s(u).e("icon"),s(u).e("clear")]),onMousedown:Te(s(Ct),["prevent"]),onClick:ke},{default:I(()=>[(v(),U(Be(g.clearIcon)))]),_:1},8,["class","onMousedown"])):N("v-if",true),_e.value?(v(),U(s(Ge),{key:2,class:z([s(u).e("icon"),s(u).e("password")]),onClick:et,onMousedown:Te(s(Ct),["prevent"]),onMouseup:Te(s(Ct),["prevent"])},{default:I(()=>[(v(),U(Be(xe.value)))]),_:1},8,["class","onMousedown","onMouseup"])):N("v-if",true),ze.value?(v(),M("span",{key:3,class:z([s(u).e("count"),s(u).is("outside",g.wordLimitPosition==="outside")])},[h("span",{class:z(s(u).e("count-inner"))},j(Ze.value)+" / "+j(g.maxlength),3)],2)):N("v-if",true),A.value&&be.value&&G.value?(v(),U(s(Ge),{key:4,class:z([s(u).e("icon"),s(u).e("validateIcon"),s(u).is("loading",A.value==="validating")])},{default:I(()=>[(v(),U(Be(be.value)))]),_:1},8,["class"])):N("v-if",true)],2)],2)):N("v-if",true)],2),N(" append slot "),g.$slots.append?(v(),M("div",{key:1,class:z(s(u).be("group","append"))},[ye(g.$slots,"append")],2)):N("v-if",true)],64)):(v(),M(ve,{key:1},[N(" textarea "),h("textarea",cn({id:s(P),ref_key:"textarea",ref:_,class:[s(C).e("inner"),s(u).is("focus",s(K))]},s(l),{name:g.name,minlength:g.minlength,maxlength:g.maxlength,tabindex:g.tabindex,disabled:s(d),readonly:g.readonly,autocomplete:g.autocomplete,style:te.value,"aria-label":g.ariaLabel,placeholder:g.placeholder,form:g.form,autofocus:g.autofocus,rows:g.rows,role:g.containerRole,onCompositionstart:L[3]||(L[3]=(...q)=>s(ut)&&s(ut)(...q)),onCompositionupdate:L[4]||(L[4]=(...q)=>s(Qe)&&s(Qe)(...q)),onCompositionend:L[5]||(L[5]=(...q)=>s(Ce)&&s(Ce)(...q)),onInput:it,onFocus:L[6]||(L[6]=(...q)=>s(ce)&&s(ce)(...q)),onBlur:L[7]||(L[7]=(...q)=>s(he)&&s(he)(...q)),onChange:Pe,onKeydown:ge}),null,16,ai),ze.value?(v(),M("span",{key:0,style:De(D.value),class:z([s(u).e("count"),s(u).is("outside",g.wordLimitPosition==="outside")])},j(Ze.value)+" / "+j(g.maxlength),7)):N("v-if",true)],64))],38))}});var li=gt(ri,[["__file","/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]);const ii=_n(li),Mn="focus-trap.focus-after-trapped",Tn="focus-trap.focus-after-released",ui="focus-trap.focusout-prevented",So={cancelable:true,bubbles:false},ci={cancelable:true,bubbles:false},Io="focusAfterTrapped",Mo="focusAfterReleased",di=Symbol("elFocusTrap"),to=B(),Cn=B(0),no=B(0);let Qt=0;const wa=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0||o===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},To=(e,t)=>{for(const n of e)if(!fi(n,t))return n},fi=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return true;for(;e;){if(t&&e===t)return false;if(getComputedStyle(e).display==="none")return true;e=e.parentElement}return false},pi=e=>{const t=wa(e),n=To(t,e),o=To(t.reverse(),e);return[n,o]},vi=e=>e instanceof HTMLInputElement&&"select"in e,dt=(e,t)=>{if(e){const n=document.activeElement;Jl(e,{preventScroll:true}),no.value=window.performance.now(),e!==n&&vi(e)&&t&&e.select()}};function Lo(e,t){const n=[...e],o=e.indexOf(t);return o!==-1&&n.splice(o,1),n}const mi=()=>{let e=[];return{push:o=>{const a=e[0];a&&o!==a&&a.pause(),e=Lo(e,o),e.unshift(o)},remove:o=>{var a,r;e=Lo(e,o),(r=(a=e[0])==null?void 0:a.resume)==null||r.call(a)}}},hi=(e,t=false)=>{const n=document.activeElement;for(const o of e)if(dt(o,t),document.activeElement!==n)return},$o=mi(),gi=()=>Cn.value>no.value,en=()=>{to.value="pointer",Cn.value=window.performance.now()},Bo=()=>{to.value="keyboard",Cn.value=window.performance.now()},bi=()=>(at(()=>{Qt===0&&(document.addEventListener("mousedown",en),document.addEventListener("touchstart",en),document.addEventListener("keydown",Bo)),Qt++}),Gt(()=>{Qt--,Qt<=0&&(document.removeEventListener("mousedown",en),document.removeEventListener("touchstart",en),document.removeEventListener("keydown",Bo))}),{focusReason:to,lastUserFocusTimestamp:Cn,lastAutomatedFocusTimestamp:no}),tn=e=>new CustomEvent(ui,{...ci,detail:e}),Nt={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},kn=e=>{if(e.code&&e.code!=="Unidentified")return e.code;const t=yi(e);if(t){if(Object.values(Nt).includes(t))return t;switch(t){case" ":return Nt.space;default:return""}}return""},yi=e=>{let t=e.key&&e.key!=="Unidentified"?e.key:"";if(!t&&e.type==="keyup"&&Nl()){const n=e.target;t=n.value.charAt(n.selectionStart-1)}return t};let Bt=[];const Ao=e=>{kn(e)===Nt.esc&&Bt.forEach(n=>n(e))},wi=e=>{at(()=>{Bt.length===0&&document.addEventListener("keydown",Ao),je&&Bt.push(e)}),Gt(()=>{Bt=Bt.filter(t=>t!==e),Bt.length===0&&je&&document.removeEventListener("keydown",Ao)})},xi=J({name:"ElFocusTrap",inheritAttrs:false,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Io,Mo,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=B();let o,a;const{focusReason:r}=bi();wi(d=>{e.trapped&&!l.paused&&t("release-requested",d)});const l={paused:false,pause(){this.paused=true},resume(){this.paused=false}},i=d=>{if(!e.loop&&!e.trapped||l.paused)return;const{altKey:u,ctrlKey:C,metaKey:w,currentTarget:_,shiftKey:R}=d,{loop:ee}=e,F=kn(d)===Nt.tab&&!u&&!C&&!w,H=document.activeElement;if(F&&H){const le=_,[K,ce]=pi(le);if(K&&ce){if(!R&&H===ce){const G=tn({focusReason:r.value});t("focusout-prevented",G),G.defaultPrevented||(d.preventDefault(),ee&&dt(K,true))}else if(R&&[K,le].includes(H)){const G=tn({focusReason:r.value});t("focusout-prevented",G),G.defaultPrevented||(d.preventDefault(),ee&&dt(ce,true))}}else if(H===le){const G=tn({focusReason:r.value});t("focusout-prevented",G),G.defaultPrevented||d.preventDefault()}}};Fn(di,{focusTrapRef:n,onKeydown:i}),Me(()=>e.focusTrapEl,d=>{d&&(n.value=d)},{immediate:true}),Me([n],([d],[u])=>{d&&(d.addEventListener("keydown",i),d.addEventListener("focusin",T),d.addEventListener("focusout",k)),u&&(u.removeEventListener("keydown",i),u.removeEventListener("focusin",T),u.removeEventListener("focusout",k))});const p=d=>{t(Io,d)},f=d=>t(Mo,d),T=d=>{const u=s(n);if(!u)return;const C=d.target,w=d.relatedTarget,_=C&&u.contains(C);e.trapped||w&&u.contains(w)||(o=w),_&&t("focusin",d),!l.paused&&e.trapped&&(_?a=C:dt(a,true))},k=d=>{const u=s(n);if(!(l.paused||!u))if(e.trapped){const C=d.relatedTarget;!oa(C)&&!u.contains(C)&&setTimeout(()=>{if(!l.paused&&e.trapped){const w=tn({focusReason:r.value});t("focusout-prevented",w),w.defaultPrevented||dt(a,true)}},0)}else{const C=d.target;C&&u.contains(C)||t("focusout",d)}};async function P(){await de();const d=s(n);if(d){$o.push(l);const u=d.contains(document.activeElement)?o:document.activeElement;if(o=u,!d.contains(u)){const w=new Event(Mn,So);d.addEventListener(Mn,p),d.dispatchEvent(w),w.defaultPrevented||de(()=>{let _=e.focusStartEl;Re(_)||(dt(_),document.activeElement!==_&&(_="first")),_==="first"&&hi(wa(d),true),(document.activeElement===u||_==="container")&&dt(d)})}}}function c(){const d=s(n);if(d){d.removeEventListener(Mn,p);const u=new CustomEvent(Tn,{...So,detail:{focusReason:r.value}});d.addEventListener(Tn,f),d.dispatchEvent(u),!u.defaultPrevented&&(r.value=="keyboard"||!gi()||d.contains(document.activeElement))&&dt(o??document.body),d.removeEventListener(Tn,f),$o.remove(l),o=null,a=null}}return at(()=>{e.trapped&&P(),Me(()=>e.trapped,d=>{d?P():c()})}),Gt(()=>{e.trapped&&c(),n.value&&(n.value.removeEventListener("keydown",i),n.value.removeEventListener("focusin",T),n.value.removeEventListener("focusout",k),n.value=void 0),o=null,a=null}),{onKeydown:i}}});function _i(e,t,n,o,a,r){return ye(e.$slots,"default",{handleKeydown:e.onKeydown})}var Ci=gt(xi,[["render",_i],["__file","/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);const ki=st({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:true},color:String,badgeStyle:{type:ue([String,Object,Array])},offset:{type:ue(Array),default:[0,0]},badgeClass:{type:String}}),Ei=J({name:"ElBadge",__name:"badge",props:ki,setup(e,{expose:t}){const n=e,o=Xe("badge"),a=E(()=>n.isDot?"":ot(n.value)&&ot(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`),r=E(()=>{var l;return[{backgroundColor:n.color,marginRight:Kt(-n.offset[0]),marginTop:Kt(n.offset[1])},(l=n.badgeStyle)!=null?l:{}]});return t({content:a}),(l,i)=>(v(),M("div",{class:z(s(o).b())},[ye(l.$slots,"default"),S(Hn,{name:`${s(o).namespace.value}-zoom-in-center`,persisted:""},{default:I(()=>[vt(h("sup",{class:z([s(o).e("content"),s(o).em("content",l.type),s(o).is("fixed",!!l.$slots.default),s(o).is("dot",l.isDot),s(o).is("hide-zero",!l.showZero&&l.value===0),l.badgeClass]),style:De(r.value)},[ye(l.$slots,"content",{value:a.value},()=>[Q(j(a.value),1)])],6),[[mt,!l.hidden&&(a.value||l.isDot||l.$slots.content)]])]),_:3},8,["name"])],2))}});var Si=gt(Ei,[["__file","/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);const Ii=_n(Si),xa=Symbol("buttonGroupContextKey"),Mi=({from:e,replacement:t,scope:n,version:o,ref:a,type:r="API"},l)=>{Me(()=>s(l),i=>{},{immediate:true})},Ti=(e,t)=>{Mi({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},E(()=>e.type==="text"));const n=Ae(xa,void 0),o=Zn("button"),{form:a}=ga(),r=ya(E(()=>n==null?void 0:n.size)),l=Qn(),i=B(),p=Vo(),f=E(()=>{var w;return e.type||(n==null?void 0:n.type)||((w=o.value)==null?void 0:w.type)||""}),T=E(()=>{var w,_,R;return(R=(_=e.autoInsertSpace)!=null?_:(w=o.value)==null?void 0:w.autoInsertSpace)!=null?R:false}),k=E(()=>{var w,_,R;return(R=(_=e.plain)!=null?_:(w=o.value)==null?void 0:w.plain)!=null?R:false}),P=E(()=>{var w,_,R;return(R=(_=e.round)!=null?_:(w=o.value)==null?void 0:w.round)!=null?R:false}),c=E(()=>{var w,_,R;return(R=(_=e.text)!=null?_:(w=o.value)==null?void 0:w.text)!=null?R:false}),d=E(()=>e.tag==="button"?{ariaDisabled:l.value||e.loading,disabled:l.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),u=E(()=>{var w;const _=(w=p.default)==null?void 0:w.call(p);if(T.value&&(_==null?void 0:_.length)===1){const R=_[0];if((R==null?void 0:R.type)===La){const ee=R.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(ee.trim())}}return false});return{_disabled:l,_size:r,_type:f,_ref:i,_props:d,_plain:k,_round:P,_text:c,shouldAddSpace:u,handleClick:w=>{if(l.value||e.loading){w.stopPropagation();return}e.nativeType==="reset"&&(a==null||a.resetFields()),t("click",w)}}},Li=["default","primary","success","warning","info","danger","text",""],$i=["button","submit","reset"],zn=st({size:Xn,disabled:{type:Boolean,default:void 0},type:{type:String,values:Li,default:""},icon:{type:Pt},nativeType:{type:String,values:$i,default:"button"},loading:Boolean,loadingIcon:{type:Pt,default:()=>_t},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:ue([String,Object]),default:"button"}}),Bi={click:e=>e instanceof MouseEvent};function we(e,t){Ai(e)&&(e="100%");var n=Pi(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function nn(e){return Math.min(1,Math.max(0,e))}function Ai(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Pi(e){return typeof e=="string"&&e.indexOf("%")!==-1}function _a(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function on(e){return e<=1?"".concat(Number(e)*100,"%"):e}function wt(e){return e.length===1?"0"+e:String(e)}function Oi(e,t,n){return{r:we(e,255)*255,g:we(t,255)*255,b:we(n,255)*255}}function Po(e,t,n){e=we(e,255),t=we(t,255),n=we(n,255);var o=Math.max(e,t,n),a=Math.min(e,t,n),r=0,l=0,i=(o+a)/2;if(o===a)l=0,r=0;else{var p=o-a;switch(l=i>.5?p/(2-o-a):p/(o+a),o){case e:r=(t-n)/p+(t<n?6:0);break;case t:r=(n-e)/p+2;break;case n:r=(e-t)/p+4;break}r/=6}return{h:r,s:l,l:i}}function Ln(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ni(e,t,n){var o,a,r;if(e=we(e,360),t=we(t,100),n=we(n,100),t===0)a=n,r=n,o=n;else{var l=n<.5?n*(1+t):n+t-n*t,i=2*n-l;o=Ln(i,l,e+1/3),a=Ln(i,l,e),r=Ln(i,l,e-1/3)}return{r:o*255,g:a*255,b:r*255}}function Oo(e,t,n){e=we(e,255),t=we(t,255),n=we(n,255);var o=Math.max(e,t,n),a=Math.min(e,t,n),r=0,l=o,i=o-a,p=o===0?0:i/o;if(o===a)r=0;else{switch(o){case e:r=(t-n)/i+(t<n?6:0);break;case t:r=(n-e)/i+2;break;case n:r=(e-t)/i+4;break}r/=6}return{h:r,s:p,v:l}}function zi(e,t,n){e=we(e,360)*6,t=we(t,100),n=we(n,100);var o=Math.floor(e),a=e-o,r=n*(1-t),l=n*(1-a*t),i=n*(1-(1-a)*t),p=o%6,f=[n,l,r,r,i,n][p],T=[i,n,n,l,r,r][p],k=[r,r,i,n,n,l][p];return{r:f*255,g:T*255,b:k*255}}function No(e,t,n,o){var a=[wt(Math.round(e).toString(16)),wt(Math.round(t).toString(16)),wt(Math.round(n).toString(16))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Ri(e,t,n,o,a){var r=[wt(Math.round(e).toString(16)),wt(Math.round(t).toString(16)),wt(Math.round(n).toString(16)),wt(Vi(o))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))&&r[3].startsWith(r[3].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0)+r[3].charAt(0):r.join("")}function Vi(e){return Math.round(parseFloat(e)*255).toString(16)}function zo(e){return Ne(e)/255}function Ne(e){return parseInt(e,16)}function Fi(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Rn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Hi(e){var t={r:0,g:0,b:0},n=1,o=null,a=null,r=null,l=false,i=false;return typeof e=="string"&&(e=ji(e)),typeof e=="object"&&(tt(e.r)&&tt(e.g)&&tt(e.b)?(t=Oi(e.r,e.g,e.b),l=true,i=String(e.r).substr(-1)==="%"?"prgb":"rgb"):tt(e.h)&&tt(e.s)&&tt(e.v)?(o=on(e.s),a=on(e.v),t=zi(e.h,o,a),l=true,i="hsv"):tt(e.h)&&tt(e.s)&&tt(e.l)&&(o=on(e.s),r=on(e.l),t=Ni(e.h,o,r),l=true,i="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=_a(n),{ok:l,format:e.format||i,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Di="[-\\+]?\\d+%?",Ui="[-\\+]?\\d*\\.\\d+%?",pt="(?:".concat(Ui,")|(?:").concat(Di,")"),$n="[\\s|\\(]+(".concat(pt,")[,|\\s]+(").concat(pt,")[,|\\s]+(").concat(pt,")\\s*\\)?"),Bn="[\\s|\\(]+(".concat(pt,")[,|\\s]+(").concat(pt,")[,|\\s]+(").concat(pt,")[,|\\s]+(").concat(pt,")\\s*\\)?"),He={CSS_UNIT:new RegExp(pt),rgb:new RegExp("rgb"+$n),rgba:new RegExp("rgba"+Bn),hsl:new RegExp("hsl"+$n),hsla:new RegExp("hsla"+Bn),hsv:new RegExp("hsv"+$n),hsva:new RegExp("hsva"+Bn),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ji(e){if(e=e.trim().toLowerCase(),e.length===0)return false;var t=false;if(Rn[e])e=Rn[e],t=true;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=He.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=He.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=He.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=He.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=He.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=He.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=He.hex8.exec(e),n?{r:Ne(n[1]),g:Ne(n[2]),b:Ne(n[3]),a:zo(n[4]),format:t?"name":"hex8"}:(n=He.hex6.exec(e),n?{r:Ne(n[1]),g:Ne(n[2]),b:Ne(n[3]),format:t?"name":"hex"}:(n=He.hex4.exec(e),n?{r:Ne(n[1]+n[1]),g:Ne(n[2]+n[2]),b:Ne(n[3]+n[3]),a:zo(n[4]+n[4]),format:t?"name":"hex8"}:(n=He.hex3.exec(e),n?{r:Ne(n[1]+n[1]),g:Ne(n[2]+n[2]),b:Ne(n[3]+n[3]),format:t?"name":"hex"}:false)))))))))}function tt(e){return!!He.CSS_UNIT.exec(String(e))}var Ki=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var o;if(t instanceof e)return t;typeof t=="number"&&(t=Fi(t)),this.originalInput=t;var a=Hi(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(o=n.format)!==null&&o!==void 0?o:a.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,o,a,r=t.r/255,l=t.g/255,i=t.b/255;return r<=.03928?n=r/12.92:n=Math.pow((r+.055)/1.055,2.4),l<=.03928?o=l/12.92:o=Math.pow((l+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),.2126*n+.7152*o+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=_a(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Oo(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Oo(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),a=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(o,"%, ").concat(a,"%)"):"hsva(".concat(n,", ").concat(o,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Po(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Po(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),a=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(o,"%, ").concat(a,"%)"):"hsla(".concat(n,", ").concat(o,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=false),No(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=false),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=false),Ri(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=false),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=false),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),o=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(o,")"):"rgba(".concat(t,", ").concat(n,", ").concat(o,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(we(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(we(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return false;for(var t="#"+No(this.r,this.g,this.b,false),n=0,o=Object.entries(Rn);n<o.length;n++){var a=o[n],r=a[0],l=a[1];if(t===l)return r}return false},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var o=false,a=this.a<1&&this.a>=0,r=!n&&a&&(t.startsWith("hex")||t==="name");return r?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(true)),t==="hex4"&&(o=this.toHex8String(true)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=nn(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=nn(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=nn(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=nn(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var o=this.toRgb(),a=new e(t).toRgb(),r=n/100,l={r:(a.r-o.r)*r+o.r,g:(a.g-o.g)*r+o.g,b:(a.b-o.b)*r+o.b,a:(a.a-o.a)*r+o.a};return new e(l)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var o=this.toHsl(),a=360/n,r=[this];for(o.h=(o.h-(a*t>>1)+720)%360;--t;)o.h=(o.h+a)%360,r.push(new e(o));return r},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),o=n.h,a=n.s,r=n.v,l=[],i=1/t;t--;)l.push(new e({h:o,s:a,v:r})),r=(r+i)%1;return l},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),o=new e(t).toRgb(),a=n.a+o.a*(1-n.a);return new e({r:(n.r*n.a+o.r*o.a*(1-n.a))/a,g:(n.g*n.a+o.g*o.a*(1-n.a))/a,b:(n.b*n.a+o.b*o.a*(1-n.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),o=n.h,a=[this],r=360/t,l=1;l<t;l++)a.push(new e({h:(o+l*r)%360,s:n.s,l:n.l}));return a},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function ct(e,t=20){return e.mix("#141414",t).toString()}function qi(e){const t=Qn(),n=Xe("button");return E(()=>{let o={},a=e.color;if(a){const r=a.match(/var\((.*?)\)/);r&&(a=window.getComputedStyle(window.document.documentElement).getPropertyValue(r[1]));const l=new Ki(a),i=e.dark?l.tint(20).toString():ct(l,20);if(e.plain)o=n.cssVarBlock({"bg-color":e.dark?ct(l,90):l.tint(90).toString(),"text-color":a,"border-color":e.dark?ct(l,50):l.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":a,"hover-border-color":a,"active-bg-color":i,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":i}),t.value&&(o[n.cssVarBlockName("disabled-bg-color")]=e.dark?ct(l,90):l.tint(90).toString(),o[n.cssVarBlockName("disabled-text-color")]=e.dark?ct(l,50):l.tint(50).toString(),o[n.cssVarBlockName("disabled-border-color")]=e.dark?ct(l,80):l.tint(80).toString());else{const p=e.dark?ct(l,30):l.tint(30).toString(),f=l.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(o=n.cssVarBlock({"bg-color":a,"text-color":f,"border-color":a,"hover-bg-color":p,"hover-text-color":f,"hover-border-color":p,"active-bg-color":i,"active-border-color":i}),t.value){const T=e.dark?ct(l,50):l.tint(50).toString();o[n.cssVarBlockName("disabled-bg-color")]=T,o[n.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,o[n.cssVarBlockName("disabled-border-color")]=T}}}return o})}const Wi=J({name:"ElButton",__name:"button",props:zn,emits:Bi,setup(e,{expose:t,emit:n}){const o=e,a=n,r=qi(o),l=Xe("button"),{_ref:i,_size:p,_type:f,_disabled:T,_props:k,_plain:P,_round:c,_text:d,shouldAddSpace:u,handleClick:C}=Ti(o,a),w=E(()=>[l.b(),l.m(f.value),l.m(p.value),l.is("disabled",T.value),l.is("loading",o.loading),l.is("plain",P.value),l.is("round",c.value),l.is("circle",o.circle),l.is("text",d.value),l.is("link",o.link),l.is("has-bg",o.bg)]);return t({ref:i,size:p,type:f,disabled:T,shouldAddSpace:u}),(_,R)=>(v(),U(Be(_.tag),cn({ref_key:"_ref",ref:i},s(k),{class:w.value,style:s(r),onClick:s(C)}),{default:I(()=>[_.loading?(v(),M(ve,{key:0},[_.$slots.loading?ye(_.$slots,"loading",{key:0}):(v(),U(s(Ge),{key:1,class:z(s(l).is("loading"))},{default:I(()=>[(v(),U(Be(_.loadingIcon)))]),_:1},8,["class"]))],64)):_.icon||_.$slots.icon?(v(),U(s(Ge),{key:1},{default:I(()=>[_.icon?(v(),U(Be(_.icon),{key:0})):ye(_.$slots,"icon",{key:1})]),_:3})):N("v-if",true),_.$slots.default?(v(),M("span",{key:2,class:z({[s(l).em("text","expand")]:s(u)})},[ye(_.$slots,"default")],2)):N("v-if",true)]),_:3},16,["class","style","onClick"]))}});var Gi=gt(Wi,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);const Yi={size:zn.size,type:zn.type,direction:{type:ue(String),values:["horizontal","vertical"],default:"horizontal"}},Xi=J({name:"ElButtonGroup",__name:"button-group",props:Yi,setup(e){const t=e;Fn(xa,At({size:dn(t,"size"),type:dn(t,"type")}));const n=Xe("button");return(o,a)=>(v(),M("div",{class:z([s(n).b("group"),s(n).bm("group",t.direction)])},[ye(o.$slots,"default")],2))}});var Ca=gt(Xi,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);const Zi=_n(Gi,{ButtonGroup:Ca});El(Ca);var un=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(un||{});const Ji=st({a11y:{type:Boolean,default:true},locale:{type:ue(Object)},size:Xn,button:{type:ue(Object)},card:{type:ue(Object)},dialog:{type:ue(Object)},link:{type:ue(Object)},experimentalFeatures:{type:ue(Object)},keyboardNavigation:{type:Boolean,default:true},message:{type:ue(Object)},zIndex:Number,namespace:{type:String,default:"el"},..._l}),Ie={placement:"top"};J({name:"ElConfigProvider",props:Ji,setup(e,{slots:t}){const n=fa(e);return Me(()=>e.message,o=>{var a,r;Object.assign(Ie,(r=(a=n==null?void 0:n.value)==null?void 0:a.message)!=null?r:{},o??{})},{immediate:true,deep:true}),()=>ye(t,"default",{config:n==null?void 0:n.value})}});const ka=e=>{if(!e)return{onClick:Ct,onMousedown:Ct,onMouseup:Ct};let t=false,n=false;return{onClick:l=>{t&&n&&e(l),t=n=false},onMousedown:l=>{t=l.target===l.currentTarget},onMouseup:l=>{n=l.target===l.currentTarget}}},Qi=st({mask:{type:Boolean,default:true},customMaskEvent:Boolean,overlayClass:{type:ue([String,Array,Object])},zIndex:{type:ue([String,Number])}}),eu={click:e=>e instanceof MouseEvent},tu="overlay";var nu=J({name:"ElOverlay",props:Qi,emits:eu,setup(e,{slots:t,emit:n}){const o=Xe(tu),a=p=>{n("click",p)},{onClick:r,onMousedown:l,onMouseup:i}=ka(e.customMaskEvent?void 0:a);return()=>e.mask?S("div",{class:[o.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:r,onMousedown:l,onMouseup:i},[ye(t,"default")],un.STYLE|un.CLASS|un.PROPS,["onClick","onMouseup","onMousedown"]):ne("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[ye(t,"default")])}});const ou=nu,au=(e,t,n,o)=>{const a={offsetX:0,offsetY:0},r=B(false),l=(P,c)=>{if(e.value){const{offsetX:d,offsetY:u}=a,C=e.value.getBoundingClientRect(),w=C.left,_=C.top,R=C.width,ee=C.height,D=document.documentElement.clientWidth,F=document.documentElement.clientHeight,H=-w+d,le=-_+u,K=D-w-R+d,ce=F-_-(ee<F?ee:0)+u;o!=null&&o.value||(P=Math.min(Math.max(P,H),K),c=Math.min(Math.max(c,le),ce)),a.offsetX=P,a.offsetY=c,e.value.style.transform=`translate(${Kt(P)}, ${Kt(c)})`}},i=P=>{const c=P.clientX,d=P.clientY,{offsetX:u,offsetY:C}=a,w=R=>{r.value||(r.value=true);const ee=u+R.clientX-c,D=C+R.clientY-d;l(ee,D)},_=()=>{r.value=false,document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",_)};document.addEventListener("mousemove",w),document.addEventListener("mouseup",_)},p=()=>{t.value&&e.value&&(t.value.addEventListener("mousedown",i),window.addEventListener("resize",k))},f=()=>{t.value&&e.value&&(t.value.removeEventListener("mousedown",i),window.removeEventListener("resize",k))},T=()=>{a.offsetX=0,a.offsetY=0,e.value&&(e.value.style.transform="")},k=()=>{const{offsetX:P,offsetY:c}=a;l(P,c)};return at(()=>{$a(()=>{n.value?p():f()})}),Gt(()=>{f()}),{isDragging:r,resetPosition:T,updatePosition:k}},su=(e,t={})=>{yt(e)||fl("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||Xe("popup"),o=E(()=>n.bm("parent","hidden"));let a=0,r=false,l="0";const i=()=>{setTimeout(()=>{typeof document>"u"||r&&document&&(document.body.style.width=l,Ml(document.body,o.value))},200)};Me(e,p=>{if(!p){i();return}r=!Sl(document.body,o.value),r&&(l=document.body.style.width,Il(document.body,o.value)),a=Ll(n.namespace.value);const f=document.documentElement.clientHeight<document.body.scrollHeight,T=Tl(document.body,"overflowY");a>0&&(f||T==="scroll")&&r&&(document.body.style.width=`calc(100% - ${a}px)`)}),Ba(()=>i())},ru=e=>["",...ua].includes(e),Ea=["primary","success","info","warning","error"],Sa=["top","top-left","top-right","bottom","bottom-left","bottom-right"],qt="top",Se=ma({customClass:"",dangerouslyUseHTMLString:false,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:false,type:"info",plain:false,offset:16,placement:void 0,zIndex:0,grouping:false,repeatNum:1,appendTo:je?document.body:void 0}),lu=st({customClass:{type:String,default:Se.customClass},dangerouslyUseHTMLString:{type:Boolean,default:Se.dangerouslyUseHTMLString},duration:{type:Number,default:Se.duration},icon:{type:Pt,default:Se.icon},id:{type:String,default:Se.id},message:{type:ue([String,Object,Function]),default:Se.message},onClose:{type:ue(Function),default:Se.onClose},showClose:{type:Boolean,default:Se.showClose},type:{type:String,values:Ea,default:Se.type},plain:{type:Boolean,default:Se.plain},offset:{type:Number,default:Se.offset},placement:{type:String,values:Sa,default:Se.placement},zIndex:{type:Number,default:Se.zIndex},grouping:{type:Boolean,default:Se.grouping},repeatNum:{type:Number,default:Se.repeatNum}}),iu={destroy:()=>true},Ue=Fo({}),uu=e=>(Ue[e]||(Ue[e]=Fo([])),Ue[e]),cu=(e,t)=>{const n=Ue[t]||[],o=n.findIndex(l=>l.id===e),a=n[o];let r;return o>0&&(r=n[o-1]),{current:a,prev:r}},du=(e,t)=>{const{prev:n}=cu(e,t);return n?n.vm.exposed.bottom.value:0},fu=(e,t,n)=>(Ue[n]||[]).findIndex(r=>r.id===e)>0?16:t,pu=["id"],vu=["innerHTML"],mu=J({name:"ElMessage",__name:"message",props:lu,emits:iu,setup(e,{expose:t,emit:n}){const{Close:o}=va,a=e,r=n,l=B(false),{ns:i,zIndex:p}=da("message"),{currentZIndex:f,nextZIndex:T}=p,k=B(),P=B(false),c=B(0);let d;const u=E(()=>a.type?a.type==="error"?"danger":a.type:"info"),C=E(()=>{const A=a.type;return{[i.bm("icon",A)]:A&&hn[A]}}),w=E(()=>a.icon||hn[a.type]||""),_=E(()=>a.placement||qt),R=E(()=>du(a.id,_.value)),ee=E(()=>fu(a.id,a.offset,_.value)+R.value),D=E(()=>c.value+ee.value),F=E(()=>_.value.includes("left")?i.is("left"):_.value.includes("right")?i.is("right"):i.is("center")),H=E(()=>_.value.startsWith("top")?"top":"bottom"),le=E(()=>({[H.value]:`${ee.value}px`,zIndex:f.value}));function K(){a.duration!==0&&({stop:d}=Na(()=>{he()},a.duration))}function ce(){d==null||d()}function he(){P.value=false,de(()=>{var A;l.value||((A=a.onClose)==null||A.call(a),r("destroy"))})}function G(A){kn(A)===Nt.esc&&he()}return at(()=>{K(),T(),P.value=true}),Me(()=>a.repeatNum,()=>{ce(),K()}),sn(document,"keydown",G),Ho(k,()=>{c.value=k.value.getBoundingClientRect().height}),t({visible:P,bottom:D,close:he}),(A,be)=>(v(),U(Hn,{name:s(i).b("fade"),onBeforeEnter:be[0]||(be[0]=xe=>l.value=true),onBeforeLeave:A.onClose,onAfterLeave:be[1]||(be[1]=xe=>A.$emit("destroy")),persisted:""},{default:I(()=>[vt(h("div",{id:A.id,ref_key:"messageRef",ref:k,class:z([s(i).b(),{[s(i).m(A.type)]:A.type},s(i).is("closable",A.showClose),s(i).is("plain",A.plain),s(i).is("bottom",H.value==="bottom"),F.value,A.customClass]),style:De(le.value),role:"alert",onMouseenter:ce,onMouseleave:K},[A.repeatNum>1?(v(),U(s(Ii),{key:0,value:A.repeatNum,type:u.value,class:z(s(i).e("badge"))},null,8,["value","type","class"])):N("v-if",true),w.value?(v(),U(s(Ge),{key:1,class:z([s(i).e("icon"),C.value])},{default:I(()=>[(v(),U(Be(w.value)))]),_:1},8,["class"])):N("v-if",true),ye(A.$slots,"default",{},()=>[A.dangerouslyUseHTMLString?(v(),M(ve,{key:1},[N(" Caution here, message could've been compromised, never use user's input as message "),h("p",{class:z(s(i).e("content")),innerHTML:A.message},null,10,vu)],2112)):(v(),M("p",{key:0,class:z(s(i).e("content"))},j(A.message),3))]),A.showClose?(v(),U(s(Ge),{key:2,class:z(s(i).e("closeBtn")),onClick:Te(he,["stop"])},{default:I(()=>[S(s(o))]),_:1},8,["class"])):N("v-if",true)],46,pu),[[mt,P.value]])]),_:3},8,["name","onBeforeLeave"]))}});var hu=gt(mu,[["__file","/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);let gu=1;const bu=e=>{if(!e.appendTo)e.appendTo=document.body;else if(Re(e.appendTo)){let n=document.querySelector(e.appendTo);On(n)||(n=document.body),e.appendTo=n}},yu=e=>{!e.placement&&Re(Ie.placement)&&Ie.placement&&(e.placement=Ie.placement),e.placement||(e.placement=qt),Sa.includes(e.placement)||(e.placement=qt)},Ia=e=>{const t=!e||Re(e)||bn(e)||nt(e)?{message:e}:e,n={...Se,...t};return bu(n),yu(n),Sn(Ie.grouping)&&!n.grouping&&(n.grouping=Ie.grouping),ot(Ie.duration)&&n.duration===3e3&&(n.duration=Ie.duration),ot(Ie.offset)&&n.offset===16&&(n.offset=Ie.offset),Sn(Ie.showClose)&&!n.showClose&&(n.showClose=Ie.showClose),Sn(Ie.plain)&&!n.plain&&(n.plain=Ie.plain),n},wu=e=>{const t=e.props.placement||qt,n=Ue[t],o=n.indexOf(e);if(o===-1)return;n.splice(o,1);const{handler:a}=e;a.close()},xu=({appendTo:e,...t},n)=>{const o=`message_${gu++}`,a=t.onClose,r=document.createElement("div"),l={...t,id:o,onClose:()=>{a==null||a(),wu(T)},onDestroy:()=>{fn(null,r)}},i=S(hu,l,nt(l.message)||bn(l.message)?{default:nt(l.message)?l.message:()=>l.message}:null);i.appContext=n||Et._context,fn(i,r),e.appendChild(r.firstElementChild);const p=i.component,T={id:o,vnode:i,vm:p,handler:{close:()=>{p.exposed.close()}},props:i.component.props};return T},Et=(e={},t)=>{if(!je)return{close:()=>{}};const n=Ia(e),o=uu(n.placement||qt);if(n.grouping&&o.length){const r=o.find(({vnode:l})=>{var i;return((i=l.props)==null?void 0:i.message)===n.message});if(r)return r.props.repeatNum+=1,r.props.type=n.type,r.handler}if(ot(Ie.max)&&o.length>=Ie.max)return{close:()=>{}};const a=xu(n,t);return o.push(a),a.handler};Ea.forEach(e=>{Et[e]=(t={},n)=>{const o=Ia(t);return Et({...o,type:e},n)}});function _u(e){for(const t in Ue)if(Ut(Ue,t)){const n=[...Ue[t]];for(const o of n)(!e||e===o.props.type)&&o.handler.close()}}function Cu(e){if(!Ue[e])return;[...Ue[e]].forEach(n=>n.handler.close())}Et.closeAll=_u;Et.closeAllByPlacement=Cu;Et._context=null;const We=kl(Et,"$message"),Vn="_trap-focus-children",xt=[],Ro=e=>{if(xt.length===0)return;const t=kn(e),n=xt[xt.length-1][Vn];if(n.length>0&&t===Nt.tab){if(n.length===1){e.preventDefault(),document.activeElement!==n[0]&&n[0].focus();return}const o=e.shiftKey,a=e.target===n[0],r=e.target===n[n.length-1];a&&o&&(e.preventDefault(),n[n.length-1].focus()),r&&!o&&(e.preventDefault(),n[0].focus())}},ku={beforeMount(e){e[Vn]=Eo(e),xt.push(e),xt.length<=1&&document.addEventListener("keydown",Ro)},updated(e){de(()=>{e[Vn]=Eo(e)})},unmounted(){xt.shift(),xt.length===0&&document.removeEventListener("keydown",Ro)}},Eu=J({name:"ElMessageBox",directives:{TrapFocus:ku},components:{ElButton:Zi,ElFocusTrap:Ci,ElInput:ii,ElOverlay:ou,ElIcon:Ge,...va},inheritAttrs:false,props:{buttonSize:{type:String,validator:ru},modal:{type:Boolean,default:true},lockScroll:{type:Boolean,default:true},showClose:{type:Boolean,default:true},closeOnClickModal:{type:Boolean,default:true},closeOnPressEscape:{type:Boolean,default:true},closeOnHashChange:{type:Boolean,default:true},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:o,ns:a,size:r}=da("message-box",E(()=>e.buttonSize)),{t:l}=n,{nextZIndex:i}=o,p=B(false),f=At({autofocus:true,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:false,distinguishCancelAndClose:false,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:true,modalClass:"",showCancelButton:false,showConfirmButton:true,type:"",title:void 0,showInput:false,action:"",confirmButtonLoading:false,cancelButtonLoading:false,confirmButtonLoadingIcon:An(_t),cancelButtonLoadingIcon:An(_t),confirmButtonDisabled:false,editorErrorMessage:"",validateError:false,zIndex:i()}),T=E(()=>{const te=f.type;return{[a.bm("icon",te)]:te&&hn[te]}}),k=Nn(),P=Nn(),c=E(()=>{const te=f.type;return f.icon||te&&hn[te]||""}),d=E(()=>!!f.message),u=B(),C=B(),w=B(),_=B(),R=B(),ee=E(()=>f.confirmButtonClass);Me(()=>f.inputValue,async te=>{await de(),e.boxType==="prompt"&&te&&A()},{immediate:true}),Me(()=>p.value,te=>{var ie,pe;te&&(e.boxType!=="prompt"&&(f.autofocus?w.value=(pe=(ie=R.value)==null?void 0:ie.$el)!=null?pe:u.value:w.value=u.value),f.zIndex=i()),e.boxType==="prompt"&&(te?de().then(()=>{var _e;_.value&&_.value.$el&&(f.autofocus?w.value=(_e=be())!=null?_e:u.value:w.value=u.value)}):(f.editorErrorMessage="",f.validateError=false))});const D=E(()=>e.draggable),F=E(()=>e.overflow),{isDragging:H}=au(u,C,D,F);at(async()=>{await de(),e.closeOnHashChange&&window.addEventListener("hashchange",le)}),Gt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",le)});function le(){p.value&&(p.value=false,de(()=>{f.action&&t("action",f.action)}))}const K=()=>{e.closeOnClickModal&&G(f.distinguishCancelAndClose?"close":"cancel")},ce=ka(K),he=te=>{if(f.inputType!=="textarea")return te.preventDefault(),G("confirm")},G=te=>{var ie;e.boxType==="prompt"&&te==="confirm"&&!A()||(f.action=te,f.beforeClose?(ie=f.beforeClose)==null||ie.call(f,te,f,le):le())},A=()=>{if(e.boxType==="prompt"){const te=f.inputPattern;if(te&&!te.test(f.inputValue||""))return f.editorErrorMessage=f.inputErrorMessage||l("el.messagebox.error"),f.validateError=true,false;const ie=f.inputValidator;if(nt(ie)){const pe=ie(f.inputValue);if(pe===false)return f.editorErrorMessage=f.inputErrorMessage||l("el.messagebox.error"),f.validateError=true,false;if(Re(pe))return f.editorErrorMessage=pe,f.validateError=true,false}}return f.editorErrorMessage="",f.validateError=false,true},be=()=>{var te,ie;const pe=(te=_.value)==null?void 0:te.$refs;return(ie=pe==null?void 0:pe.input)!=null?ie:pe==null?void 0:pe.textarea},xe=()=>{G("close")},rt=()=>{e.closeOnPressEscape&&xe()};return e.lockScroll&&su(p,{ns:a}),{...Aa(f),ns:a,overlayEvent:ce,visible:p,hasMessage:d,typeClass:T,contentId:k,inputId:P,btnSize:r,iconComponent:c,confirmButtonClasses:ee,rootRef:u,focusStartRef:w,headerRef:C,inputRef:_,isDragging:H,confirmRef:R,doClose:le,handleClose:xe,onCloseRequested:rt,handleWrapperClick:K,handleInputEnter:he,handleAction:G,t:l}}}),Su=["aria-label","aria-describedby"],Iu=["aria-label"],Mu=["id"];function Tu(e,t,n,o,a,r){const l=me("el-icon"),i=me("el-input"),p=me("el-button"),f=me("el-focus-trap"),T=me("el-overlay");return v(),U(Hn,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=k=>e.$emit("vanish")),persisted:""},{default:I(()=>[vt(S(T,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:I(()=>[h("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:z(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...k)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...k)),onMousedown:t[9]||(t[9]=(...k)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...k)),onMouseup:t[10]||(t[10]=(...k)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...k))},[S(f,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:I(()=>[h("div",{ref:"rootRef",class:z([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:De(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Te(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(v(),M("div",{key:0,ref:"headerRef",class:z([e.ns.e("header"),{"show-close":e.showClose}])},[h("div",{class:z(e.ns.e("title"))},[e.iconComponent&&e.center?(v(),U(l,{key:0,class:z([e.ns.e("status"),e.typeClass])},{default:I(()=>[(v(),U(Be(e.iconComponent)))]),_:1},8,["class"])):N("v-if",true),h("span",null,j(e.title),1)],2),e.showClose?(v(),M("button",{key:0,type:"button",class:z(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=k=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=Dt(Te(k=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[S(l,{class:z(e.ns.e("close"))},{default:I(()=>[(v(),U(Be(e.closeIcon||"close")))]),_:1},8,["class"])],42,Iu)):N("v-if",true)],2)):N("v-if",true),h("div",{id:e.contentId,class:z(e.ns.e("content"))},[h("div",{class:z(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(v(),U(l,{key:0,class:z([e.ns.e("status"),e.typeClass])},{default:I(()=>[(v(),U(Be(e.iconComponent)))]),_:1},8,["class"])):N("v-if",true),e.hasMessage?(v(),M("div",{key:1,class:z(e.ns.e("message"))},[ye(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(v(),U(Be(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(v(),U(Be(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:j(e.message)},null,8,["for","textContent"]))])],2)):N("v-if",true)],2),vt(h("div",{class:z(e.ns.e("input"))},[S(i,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=k=>e.inputValue=k),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:z({invalid:e.validateError}),onKeydown:Dt(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),h("div",{class:z(e.ns.e("errormsg")),style:De({visibility:e.editorErrorMessage?"visible":"hidden"})},j(e.editorErrorMessage),7)],2),[[mt,e.showInput]])],10,Mu),h("div",{class:z(e.ns.e("btns"))},[e.showCancelButton?(v(),U(p,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:z([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=k=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=Dt(Te(k=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:I(()=>[Q(j(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size"])):N("v-if",true),vt(S(p,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:z([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=k=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=Dt(Te(k=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:I(()=>[Q(j(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size"]),[[mt,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,Su)]),_:3},8,["z-index","overlay-class","mask"]),[[mt,e.visible]])]),_:3})}var Lu=gt(Eu,[["render",Tu],["__file","/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]);const Wt=new Map,$u=e=>{let t=document.body;return e.appendTo&&(Re(e.appendTo)&&(t=document.querySelector(e.appendTo)),On(e.appendTo)&&(t=e.appendTo),On(t)||(t=document.body)),t},Bu=(e,t,n=null)=>{const o=S(Lu,e,nt(e.message)||bn(e.message)?{default:nt(e.message)?e.message:()=>e.message}:null);return o.appContext=n,fn(o,t),$u(e).appendChild(t.firstElementChild),o.component},Au=()=>document.createElement("div"),Pu=(e,t)=>{const n=Au();e.onVanish=()=>{fn(null,n),Wt.delete(a)},e.onAction=r=>{const l=Wt.get(a);let i;e.showInput?i={value:a.inputValue,action:r}:i=r,e.callback?e.callback(i,o.proxy):r==="cancel"||r==="close"?e.distinguishCancelAndClose&&r!=="cancel"?l.reject("close"):l.reject("cancel"):l.resolve(i)};const o=Bu(e,n,t),a=o.proxy;for(const r in e)Ut(e,r)&&!Ut(a.$props,r)&&(r==="closeIcon"&&Ot(e[r])?a[r]=An(e[r]):a[r]=e[r]);return a.visible=true,a};function Rt(e,t=null){if(!je)return Promise.reject();let n;return Re(e)||bn(e)?e={message:e}:n=e.callback,new Promise((o,a)=>{const r=Pu(e,t??Rt._context);Wt.set(r,{options:e,callback:n,resolve:o,reject:a})})}const Ou=["alert","confirm","prompt"],Nu={alert:{closeOnPressEscape:false,closeOnClickModal:false},confirm:{showCancelButton:true},prompt:{showCancelButton:true,showInput:true}};Ou.forEach(e=>{Rt[e]=zu(e)});function zu(e){return(t,n,o,a)=>{let r="";return Ot(n)?(o=n,r=""):ul(n)?r="":r=n,Rt(Object.assign({title:r,message:t,type:"",...Nu[e]},o,{boxType:e}),a)}}Rt.close=()=>{Wt.forEach((e,t)=>{t.doClose()}),Wt.clear()};Rt._context=null;const ft=Rt;ft.install=e=>{ft._context=e._context,e.config.globalProperties.$msgbox=ft,e.config.globalProperties.$messageBox=ft,e.config.globalProperties.$alert=ft.alert,e.config.globalProperties.$confirm=ft.confirm,e.config.globalProperties.$prompt=ft.prompt};const Ru=ft;function Vu(){const e=B({bots:{},channels:{},messages:{}}),t=B({maxMessagesPerChannel:1e3,keepMessagesOnClear:50,loggerinfo:false,blockedPlatforms:[],chatContainerHeight:80,clearIndexedDBOnStart:true}),n=B(new Set),o=B(new Set),a=B({}),r=E(()=>Object.values(e.value.bots).sort((c,d)=>{const u=n.value.has(c.selfId),C=n.value.has(d.selfId);return u===C?0:u?-1:1})),l=c=>!c||!e.value.channels[c]?[]:Object.values(e.value.channels[c]).sort((d,u)=>{const C=o.value.has(`${c}:${d.id}`),w=o.value.has(`${c}:${u.id}`);return C===w?0:C?-1:1}),i=(c,d)=>{const u=`${c}:${d}`;return e.value.messages[u]||[]},p=(c,d)=>{const u=`${c}:${d}`;return a.value[u]||{offset:0,hasMore:true}};async function f(){const c=await $e("get-chat-data");c.success&&c.data&&(e.value={bots:c.data.bots||{},channels:c.data.channels||{},messages:c.data.messages||{}},n.value=new Set(c.data.pinnedBots||[]),o.value=new Set(c.data.pinnedChannels||[]))}async function T(){const c=await $e("get-plugin-config");c.success&&c.config&&(t.value=c.config)}function k(c){var R,ee;const d=c.selfId,u=c.channelId,C=`${d}:${u}`;if(e.value.bots[d]||(e.value.bots[d]={selfId:d,platform:c.platform||"unknown",username:((R=c.bot)==null?void 0:R.name)||`Bot-${d}`,avatar:(ee=c.bot)==null?void 0:ee.avatar,status:"online"}),e.value.channels[d]||(e.value.channels[d]={}),!e.value.channels[d][u]){const D=c.isDirect||u.includes("private");e.value.channels[d][u]={id:u,name:D?`私聊(${c.username||u})`:c.guildName||u,type:c.channelType||0,isDirect:D}}e.value.messages[C]||(e.value.messages[C]=[]);const w=e.value.messages[C];if(!w.some(D=>!!(D.id===c.messageId||D.id===c.id||(c.type==="bot-message"||c.type==="bot-message-sent"||c.type==="bot")&&D.isBot&&Math.abs(D.timestamp-c.timestamp)<2e3&&D.content===c.content))){const D={id:c.messageId||c.id,content:c.content,userId:c.userId,username:c.username,avatar:c.avatar,timestamp:c.timestamp,channelId:u,selfId:d,elements:c.elements,isBot:c.isBot||c.type==="bot-message"||c.type==="bot",quote:c.quote};w.push(D),w.sort((F,H)=>F.timestamp-H.timestamp)}e.value={...e.value}}async function P(c,d,u=50){const C=`${c}:${d}`,w=p(c,d);if(!w.hasMore)return;const _=await $e("get-history-messages",{selfId:c,channelId:d,limit:u,offset:w.offset});if(_.success&&_.messages){e.value.messages[C]||(e.value.messages[C]=[]);const R=e.value.messages[C],ee=_.messages.filter(D=>!R.find(F=>F.id===D.id));return e.value.messages[C]=[...ee,...R].sort((D,F)=>D.timestamp-F.timestamp),a.value[C]={offset:w.offset+_.messages.length,hasMore:_.messages.length>=u&&_.total>w.offset+_.messages.length},e.value={...e.value},_.messages.length}return 0}return{chatData:e,pluginConfig:t,pinnedBots:n,pinnedChannels:o,bots:r,getChannels:l,getMessages:i,getPagination:p,loadInitialData:f,loadConfig:T,addMessage:k,loadHistory:P}}function Fu(){const e=B(false);async function t(i,p,f,T){if(!e.value){e.value=true;try{return await $e("send-message",{selfId:i,channelId:p,content:f,images:T.map(P=>({tempId:P.tempId,filename:P.filename}))})}finally{e.value=false}}}async function n(i){return await $e("delete-bot-data",{selfId:i})}async function o(i,p){return await $e("delete-channel-data",{selfId:i,channelId:p})}async function a(i,p){return await $e("clear-channel-history",{selfId:i,channelId:p})}async function r(i,p,f){p?f.delete(i):f.add(i),await $e("set-pinned-bots",{pinnedBots:Array.from(f)})}async function l(i,p,f,T){const k=`${i}:${p}`;f?T.delete(k):T.add(k),await $e("set-pinned-channels",{pinnedChannels:Array.from(T)})}return{isSending:e,sendMessage:t,deleteBotData:n,deleteChannelData:o,clearHistory:a,togglePinBot:r,togglePinChannel:l}}function Hu(){const e=B({}),t=new Map;let n=null;const o="ChatImageCache",a=2,r="images",l=12*1024*1024;async function i(){return new Promise(c=>{const d=indexedDB.open(o,a);d.onupgradeneeded=u=>{const C=u.target.result;if(!C.objectStoreNames.contains(r)){const w=C.createObjectStore(r,{keyPath:"url"});w.createIndex("channelKey","channelKey",{unique:false}),w.createIndex("timestamp","timestamp",{unique:false})}},d.onsuccess=()=>{n=d.result,c(true)},d.onerror=()=>c(false)})}async function p(c,d){if(e.value[d])return e.value[d];if(t.has(d))return t.get(d);const u=(async()=>{try{n||await i();const C=await f(d);if(C){const w=URL.createObjectURL(C.blob);return e.value[d]=w,w}return null}finally{t.delete(d)}})();return t.set(d,u),u}async function f(c){return n?new Promise(d=>{const w=n.transaction([r],"readonly").objectStore(r).get(c);w.onsuccess=()=>d(w.result||null),w.onerror=()=>d(null)}):null}async function T(c,d){const u=await p(c,d);if(u)return u;try{const C=await $e("fetch-image",{url:d});if(!C.success)return null;const _=await(await fetch(C.dataUrl)).blob();if(_.size>l)return null;const R={url:d,blob:_,timestamp:Date.now(),size:_.size,channelKey:c};await k(R);const ee=URL.createObjectURL(_);return e.value[d]=ee,ee}catch{return null}}async function k(c){if(!n)return;n.transaction([r],"readwrite").objectStore(r).put(c)}async function P(c){Object.keys(e.value).forEach(d=>{URL.revokeObjectURL(e.value[d]),delete e.value[d]})}return gn(()=>{Object.values(e.value).forEach(URL.revokeObjectURL),n&&n.close()}),{getCachedImageUrl:p,cacheImage:T,clearChannelCache:P}}function Du(){const e=B({}),t=B(new Set),n=B(null);async function o(i){if(e.value[i])return e.value[i];if(t.value.has(i))return new Promise(p=>{const f=setInterval(()=>{e.value[i]&&(clearInterval(f),p(e.value[i])),t.value.has(i)||(clearInterval(f),p(null))},100)});t.value.add(i);try{const p=await $e("fetch-video-temp",{url:i});if(p.success){n.value&&URL.revokeObjectURL(n.value);let f;if(p.dataUrl){const k=await(await fetch(p.dataUrl)).blob();f=URL.createObjectURL(k)}else if(p.fileUrl)try{const k=await(await fetch(p.fileUrl)).blob();f=URL.createObjectURL(k)}catch{f=p.fileUrl}else return null;return n.value=f,e.value[i]=f,f}return null}catch(p){return console.error("加载视频失败:",p),null}finally{t.value.delete(i)}}function a(i){return t.value.has(i)}function r(i){return!!e.value[i]}function l(){Object.values(e.value).forEach(i=>{i.startsWith("blob:")&&URL.revokeObjectURL(i)}),e.value={},n.value=null}return gn(()=>{l()}),{loadVideo:o,isVideoLoading:a,isVideoLoaded:r,clearAllVideos:l}}function Uu(){const{bots:e,pinnedBots:t,pinnedChannels:n,getChannels:o,getMessages:a,loadInitialData:r,loadConfig:l,addMessage:i,loadHistory:p,getPagination:f}=Vu(),{isSending:T,sendMessage:k,deleteBotData:P,deleteChannelData:c,togglePinBot:d,togglePinChannel:u}=Fu(),{getCachedImageUrl:C,cacheImage:w}=Hu(),{loadVideo:_,isVideoLoading:R,isVideoLoaded:ee}=Du(),D=B({show:false,x:0,y:0,type:"",id:"",isPinned:false,hasMedia:false}),F=B(""),H=B(""),le=B(""),K=B([]),ce=B(null),he=B(null),G=B(false),A=B("bots"),be=B(false),xe=B(0),rt=At({messages:[]}),te=B(false),ie=At({url:""}),pe=B(false),_e=B(1),ze=At({content:""}),Ze=B(false),Ve=B(null),It=At({data:null}),Mt=B(false),Tt=E(()=>o(F.value)),lt=E(()=>a(F.value,H.value)),Je=E(()=>{const b=Tt.value.find(x=>x.id===H.value);return b?b.name:""}),Xt=E(()=>{const b=e.value.find(x=>x.selfId===F.value);return(b==null?void 0:b.platform)||"unknown"}),Vt=b=>{F.value=b,H.value="",G.value&&(A.value="channels")},Fe=async b=>{H.value=b,G.value&&(A.value="messages"),lt.value.length===0&&await p(F.value,b),await de(),Ce(),setTimeout(Ce,300),setTimeout(Ce,800)},Ke=()=>{G.value&&A.value!=="bots"?window.history.back():A.value==="image"?(A.value="messages",_e.value=1):A.value==="forward"||A.value==="profile"||A.value==="raw"?A.value="messages":A.value==="messages"?A.value="channels":A.value==="channels"&&(A.value="bots")},it=b=>{G.value&&(b.state&&b.state.view?A.value=b.state.view:A.value="bots")};Me(A,(b,x)=>{var O;G.value&&((O=window.history.state)==null?void 0:O.view)!==b&&window.history.pushState({view:b},"")});const Pe=b=>{rt.messages=b.filter(x=>x.type==="message"),G.value?A.value="forward":te.value=true},Lt=b=>{ie.url=b,_e.value=1,G.value?A.value="image":pe.value=true},ut=b=>{b.deltaY<0?_e.value=Math.min(_e.value+.1,3):_e.value=Math.max(_e.value-.1,.5)},Qe=b=>{const x=document.createElement("a");x.href=b,x.download=`chat-image-${Date.now()}.png`,x.click()},Ce=()=>{if(ce.value){const b=ce.value.wrapRef;b&&(b.scrollTop=b.scrollHeight)}},et=async({scrollTop:b})=>{var x;if(b<=10&&!be.value&&F.value&&H.value&&f(F.value,H.value).hasMore){be.value=true;const V=(x=ce.value)==null?void 0:x.wrapRef,m=(V==null?void 0:V.scrollHeight)||0;await p(F.value,H.value),await de(),V&&(V.scrollTop=V.scrollHeight-m),be.value=false}},Ft=async()=>{if(!F.value||!H.value||!le.value.trim()&&!K.value.length)return;let b=le.value;Ve.value&&(b=`<quote id="${Ve.value.realId||Ve.value.id}"/>${b}`);const x=await k(F.value,H.value,b,K.value);x!=null&&x.success?(le.value="",K.value=[],Ve.value=null,Ce()):We.error((x==null?void 0:x.error)||"发送失败")},$t=async b=>{if(!F.value||!H.value)return;let x=b.content;if(b.quote){const V=b.quote.id;V&&!V.startsWith("bot-msg-")?x=`<quote id="${V}"/>${x}`:x=b.content}else if(b.isBot||b.userId===F.value){const V=b.realId||b.id;V&&V.startsWith("bot-msg-")?x=b.content:V?x=`<quote id="${V}"/>${x}`:x=b.content}const O=await k(F.value,H.value,x,[]);O!=null&&O.success?Ce():We.error((O==null?void 0:O.error)||"复读失败")},X=(b,x)=>{b.preventDefault(),b.stopPropagation(),D.value={show:true,x:b.clientX,y:b.clientY,type:"bot",id:x.selfId,isPinned:t.value.has(x.selfId),hasMedia:false}},y=(b,x)=>{b.preventDefault(),b.stopPropagation(),D.value={show:true,x:b.clientX,y:b.clientY,type:"channel",id:x.id,isPinned:n.value.has(`${F.value}:${x.id}`),hasMedia:false}},ge=(b,x)=>{var V;if(D.value.show&&D.value.type==="message"&&D.value.id===x.id){D.value.show=false;return}b.preventDefault(),b.stopPropagation();const O=(V=x.elements)==null?void 0:V.some(m=>["image","img","mface","audio","video"].includes(m.type));D.value={show:true,x:b.clientX,y:b.clientY,type:"message",id:x.id,isPinned:false,data:x,hasMedia:O}},ae=async b=>{const x=D.value.type,O=D.value.id,V=D.value.isPinned;D.value.show=false,b==="pin"?x==="bot"?await d(O,V,t.value):await u(F.value,O,V,n.value):b==="delete"&&(x==="bot"?await P(O):await c(F.value,O),location.reload())},ke=b=>{if(!b)return We.warning("未复制任何内容"),Promise.resolve();if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(b);{const x=document.createElement("textarea");return x.value=b,x.style.position="fixed",x.style.left="-999999px",x.style.top="-999999px",document.body.appendChild(x),x.focus(),x.select(),new Promise((O,V)=>{document.execCommand("copy")?O():V(),x.remove()})}},g=async b=>{var O,V,m,W;const x=D.value.data;if(D.value.show=false,!!x){if(b==="copy"){const $=(x.content||"").replace(/<[^>]+>/g,"");$?ke($).then(()=>We.success("已复制到剪贴板")):We.warning("未复制任何内容")}else if(b==="copy-raw"){let $=x.content||"";x.quote&&($=`<quote id="${x.quote.id}"/>${$}`),ze.content=$,G.value?A.value="raw":Ze.value=true}else if(b==="plus1")await $t(x);else if(b==="reply")Ve.value=x,de(()=>{var re,Y,oe,Ee,oo;const $=((Y=(re=he.value)==null?void 0:re.$el)==null?void 0:Y.querySelector("textarea"))||((oe=he.value)==null?void 0:oe.ref);$?$.focus():(oo=(Ee=he.value)==null?void 0:Ee.focus)==null||oo.call(Ee)});else if(b==="download"){const $=(O=x.elements)==null?void 0:O.find(Y=>["image","img","mface","audio","video"].includes(Y.type)),re=((V=$==null?void 0:$.attrs)==null?void 0:V.src)||((m=$==null?void 0:$.attrs)==null?void 0:m.url)||((W=$==null?void 0:$.attrs)==null?void 0:W.file);re&&Qe(re)}}},L=async b=>{if(!F.value)return;const x=await $e("get-user-info",{selfId:F.value,userId:b.userId,guildId:b.guildId});x.success?(It.data=x.data,G.value?A.value="profile":Mt.value=true):We.error(x.error||"获取用户信息失败")},q=async b=>{let x=document.querySelector(`[data-id="${b}"]`)||document.getElementById(b);if(!x){if(be.value)return;We.info("正在向上查找历史消息...");for(let O=0;O<3&&(await p(F.value,H.value),await new Promise(V=>setTimeout(V,150)),x=document.querySelector(`[data-id="${b}"]`)||document.getElementById(b),!x);O++);}if(x){x.scrollIntoView({behavior:"smooth",block:"center"});const O=x.querySelector(".cursor-context-menu")||x;O.classList.add("message-highlight"),setTimeout(()=>O.classList.remove("message-highlight"),1500)}else We.warning("消息太久远,已不在当前列表中")},Z=async b=>{var O;const x=(O=b.clipboardData)==null?void 0:O.items;if(x){for(let V=0;V<x.length;V++)if(x[V].type.indexOf("image")!==-1){const m=x[V].getAsFile();if(m){const W=new FileReader;W.onload=async $=>{var oe;const re=(oe=$.target)==null?void 0:oe.result,Y=await $e("upload-image",{file:re,filename:`pasted_image_${Date.now()}.png`,mimeType:m.type});Y.success&&K.value.push({tempId:Y.tempId,preview:URL.createObjectURL(m),filename:`pasted_image_${Date.now()}.png`})},W.readAsDataURL(m)}}}},fe=()=>{G.value=window.innerWidth<=768},Oe=()=>{if(!G.value){xe.value=0;return}if(window.visualViewport){const b=window.visualViewport.height,x=window.innerHeight,O=Math.max(0,x-b);Math.abs(O-xe.value)>50&&(xe.value=O)}else xe.value=0};let se=[];return at(async()=>{fe(),window.addEventListener("resize",fe),window.addEventListener("click",()=>D.value.show=false),window.addEventListener("popstate",it),window.visualViewport&&(window.visualViewport.addEventListener("resize",Oe),window.visualViewport.addEventListener("scroll",Oe)),window.addEventListener("resize",Oe);const b=()=>{setTimeout(Oe,300)},x=()=>{setTimeout(()=>{xe.value=0},100)};de(()=>{var re,Y;const $=(Y=(re=he.value)==null?void 0:re.$el)==null?void 0:Y.querySelector("textarea");$&&($.addEventListener("focus",b),$.addEventListener("blur",x),se.push(()=>{$.removeEventListener("focus",b),$.removeEventListener("blur",x)}))}),G.value&&window.history.replaceState({view:A.value},""),await l(),await r();const O=Zt("chat-message-event",$=>{var re;if(i($),$.selfId===F.value&&$.channelId===H.value){const Y=(re=ce.value)==null?void 0:re.wrapRef;Y&&Y.scrollHeight-Y.scrollTop-Y.clientHeight<100&&de(Ce)}});typeof O=="function"&&se.push(O);const V=Zt("bot-message-sent-event",$=>{i($),$.selfId===F.value&&$.channelId===H.value&&de(Ce)});typeof V=="function"&&se.push(V);const m=Zt("chat-bot-message-event",$=>{i($),$.selfId===F.value&&$.channelId===H.value&&de(Ce)});typeof m=="function"&&se.push(m);const W=Zt("bot-message-updated",$=>{const re=`${F.value}:${H.value}`;if($.channelKey!==re)return;const Y=lt.value.find(oe=>oe.id===$.tempId);Y&&(Y.sending=false,Y.realId=$.realId)});typeof W=="function"&&se.push(W)}),gn(()=>{window.removeEventListener("resize",fe),window.removeEventListener("popstate",it),window.removeEventListener("resize",Oe),window.visualViewport&&(window.visualViewport.removeEventListener("resize",Oe),window.visualViewport.removeEventListener("scroll",Oe)),se.forEach(b=>b==null?void 0:b())}),{bots:e,selectedBot:F,selectedChannel:H,currentChannels:Tt,currentMessages:lt,currentChannelName:Je,inputText:le,uploadedImages:K,isSending:T,pinnedBots:t,pinnedChannels:n,scrollRef:ce,isMobile:G,mobileView:A,forwardData:rt,imageViewer:ie,imageZoom:_e,rawMessage:ze,isLoadingHistory:be,forwardDialogVisible:te,imageViewerVisible:pe,rawMessageVisible:Ze,replyingTo:Ve,userProfile:It,userProfileVisible:Mt,selectedBotPlatform:Xt,menu:D,keyboardHeight:xe,selectBot:Vt,selectChannel:Fe,handleSend:Ft,togglePinBot:d,togglePinChannel:u,deleteBotData:P,deleteChannelData:c,getCachedImageUrl:C,cacheImage:w,loadVideo:_,isVideoLoading:R,isVideoLoaded:ee,getMessages:a,goBack:Ke,showForward:Pe,openImageViewer:Lt,handleImageWheel:ut,downloadImage:Qe,handleScroll:et,repeatMessage:$t,handlePaste:Z,copyToClipboard:ke,onBotMenu:X,onChannelMenu:y,onMessageMenu:ge,handleMenuAction:ae,handleMessageAction:g,showUserProfile:L,inputRef:he,scrollToMessage:q}}const ju={key:0,class:"p-10 text-center opacity-40 text-sm"},Ku=["onClick","onContextmenu"],qu={class:"ml-3 flex-1 overflow-hidden"},Wu={class:"flex items-center gap-1 text-sm font-bold truncate"},Gu={class:"text-xs text-[var(--k-text-color-secondary)] truncate opacity-80"},Yu={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] text-lg text-[var(--k-text-color)] flex-shrink-0"},Xu={key:0,class:"p-10 text-center opacity-40 text-sm"},Zu=["onClick","onContextmenu"],Ju={class:"flex-1 overflow-hidden"},Qu={class:"flex items-center gap-1 text-sm font-medium truncate"},ec={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm z-10 text-[var(--k-text-color)]"},tc={class:"truncate"},nc={key:1,class:"ml-2 text-xs opacity-40 font-mono hidden md:inline"},oc={class:"flex-1 overflow-hidden relative bg-opacity-50 bg-gray-100 dark:bg-black/20"},ac={key:0,class:"flex justify-center py-4"},sc=["data-id"],rc={class:"flex items-center gap-2 mb-1.5 text-xs text-[var(--k-text-color-secondary)]"},lc={class:"font-bold"},ic={class:"opacity-60"},uc=["onClick"],cc={key:0,class:"w-8 h-8 flex items-center justify-center"},dc={key:1,class:"w-8 h-8 rounded-full border-2 border-blue-500 flex items-center justify-center font-bold text-xs bg-blue-50/10"},fc=["onContextmenu"],pc={key:0,class:"mb-2.5 p-2.5 text-sm bg-black/5 dark:bg-white/5 rounded-lg border-l-4 border-gray-400/50 text-left relative group/quote"},vc={class:"font-bold opacity-70 mb-1 text-xs"},mc={class:"opacity-90"},hc=["onClick"],gc={class:"text-left min-w-[20px]"},bc={key:0,class:"flex gap-3 mb-3 overflow-x-auto pb-2 scrollbar-hide"},yc={key:1,class:"mb-2 px-3 py-1.5 bg-black/5 dark:bg-white/5 rounded-lg flex items-center justify-between text-xs"},wc={class:"flex items-center gap-2 truncate opacity-70"},xc={class:"flex gap-3 items-end"},_c={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm"},Cc={class:"p-4 space-y-6"},kc={class:"flex-1 overflow-hidden"},Ec={class:"text-xs text-[var(--k-text-color-secondary)] mb-1 font-bold"},Sc={class:"p-3 bg-[var(--k-card-bg)] rounded-2xl rounded-tl-none shadow-sm text-sm break-all border border-[var(--k-border-color)]"},Ic={class:"flex h-14 items-center px-4 font-bold border-b border-white/10 bg-black text-white shadow-sm flex-shrink-0"},Mc=["src"],Tc={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm"},Lc={class:"p-4 flex flex-col gap-4 h-full overflow-hidden"},$c={class:"flex gap-3 pb-8"},Bc={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm"},Ac={class:"p-8 flex flex-col items-center gap-6"},Pc={class:"text-center"},Oc={class:"text-2xl font-bold mb-2"},Nc={class:"text-sm opacity-60 font-mono"},zc={class:"flex flex-col items-center gap-4 py-4"},Rc={class:"text-center"},Vc={class:"text-xl font-bold"},Fc={class:"text-xs opacity-50 mt-1 font-mono"},Hc={class:"p-6 space-y-6 bg-gray-50 dark:bg-black/10"},Dc={class:"flex-1 overflow-hidden"},Uc={class:"text-xs text-[var(--k-text-color-secondary)] mb-1 font-bold"},jc={class:"p-3 bg-[var(--k-card-bg)] rounded-2xl rounded-tl-none shadow-sm text-sm break-all border border-[var(--k-border-color)]"},Kc={class:"flex flex-col items-center gap-4"},qc=["src"],Wc={class:"flex flex-col gap-4"},Gc={class:"flex justify-center gap-3"},Yc=J({__name:"index",setup(e){const{bots:t,selectedBot:n,selectedChannel:o,currentChannels:a,currentMessages:r,currentChannelName:l,inputText:i,uploadedImages:p,isSending:f,pinnedBots:T,pinnedChannels:k,scrollRef:P,isMobile:c,mobileView:d,goBack:u,forwardData:C,imageViewer:w,imageZoom:_,rawMessage:R,isLoadingHistory:ee,forwardDialogVisible:D,imageViewerVisible:F,rawMessageVisible:H,replyingTo:le,userProfile:K,userProfileVisible:ce,selectedBotPlatform:he,keyboardHeight:G,selectBot:A,selectChannel:be,handleSend:xe,getCachedImageUrl:rt,cacheImage:te,loadVideo:ie,isVideoLoaded:pe,showForward:_e,openImageViewer:ze,handleImageWheel:Ze,downloadImage:Ve,handleScroll:It,repeatMessage:Mt,handlePaste:Tt,copyToClipboard:lt,onBotMenu:Je,onChannelMenu:Xt,onMessageMenu:Vt,handleMenuAction:Fe,handleMessageAction:Ke,showUserProfile:it,menu:Pe,inputRef:Lt,scrollToMessage:ut}=Uu(),Qe=X=>new Date(X).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),Ce=async X=>{if(X==="delete")try{await Ru.confirm("确定删除所有数据吗?此操作不可恢复。","警告",{type:"warning",confirmButtonClass:"el-button--danger"}),await Fe(X)}catch{}else await Fe(X)},et=J({props:["element","botId","channelId","inQuote"],setup(X){const y=B(""),ge=B(""),ae=B(false),ke=["img","image","mface","audio","video"].includes(X.element.type),g=async()=>{const Z=X.element.attrs.src||X.element.attrs.url||X.element.attrs.file;if(Z){if(X.element.type==="video"){ge.value=Z;return}const fe=await rt(`${X.botId}:${X.channelId}`,Z);if(fe)y.value=fe;else{const Oe=await te(`${X.botId}:${X.channelId}`,Z);y.value=Oe||Z}}};ke&&g(),Me(()=>X.element.attrs.src||X.element.attrs.url||X.element.attrs.file,g);const L=async()=>{if(!ge.value||ae.value)return;if(pe(ge.value)){const fe=await ie(ge.value);fe&&(y.value=fe);return}ae.value=true;const Z=await ie(ge.value);Z&&(y.value=Z),ae.value=false},q=()=>{if(X.inQuote)return;const Z=document.querySelector(".el-main .el-scrollbar__wrap");Z&&Z.scrollHeight-Z.scrollTop-Z.clientHeight<150&&de(()=>{Z.scrollTop=Z.scrollHeight})};return()=>{var x;const{element:Z,botId:fe,channelId:Oe}=X,se=Z.type,b=Z.attrs;if(se==="text")return ne("span",b.content);if(se==="img"||se==="image"||se==="mface"){if(X.inQuote)return ne("span",{class:"opacity-60 italic mx-1"},"[图片]");const O=se==="mface";return ne("div",{class:"block my-1.5"},[ne("img",{src:y.value,class:["rounded-lg shadow-sm border border-black/5 block cursor-pointer hover:opacity-90 transition-opacity",O?"max-w-[100px] max-h-[100px]":"max-w-full max-h-[400px]"],style:`min-width: ${O?"30px":"50px"}; min-height: ${O?"30px":"50px"}; object-fit: contain; background: rgba(0,0,0,0.05)`,onClick:V=>{V.stopPropagation(),ze(y.value)},onLoad:q,onError:V=>{V.target.src="",V.target.alt="图片加载失败"}})])}return se==="audio"?ne("audio",{src:y.value,controls:true,class:"max-w-full my-1.5 block"}):se==="video"?y.value?ne("video",{src:y.value,controls:true,class:"max-w-full my-1.5 rounded-lg shadow-sm block"}):ne("div",{class:"my-1.5 p-4 bg-black/5 dark:bg-white/5 rounded-lg border border-black/10 dark:border-white/10 cursor-pointer hover:bg-black/10 dark:hover:bg-white/10 transition-colors flex items-center justify-center gap-2",onClick:L},[ae.value?ne("el-icon",{class:"is-loading"},{default:()=>ne(_t)}):ne("el-icon",null,{default:()=>ne(ro)}),ne("span",{class:"text-sm"},ae.value?"加载中...":"点击加载视频")]):se==="at"?ne("span",{class:"text-blue-500 font-bold hover:underline cursor-default mx-0.5"},`@${b.name||b.id}`):se==="p"?ne("div",{class:"my-1 block min-h-[1em]"},(Z.children||[]).map((O,V)=>ne(et,{key:V,element:O,botId:fe,channelId:Oe}))):se==="i18n"?ne("span",{class:"opacity-80 italic"},`[${b.path||"i18n"}]`):se==="figure"||se==="forward"?ne("div",{class:"my-2 p-3 bg-black/5 dark:bg-white/5 rounded-xl border border-black/10 dark:border-white/10 max-w-[300px] cursor-pointer hover:bg-black/10 dark:hover:bg-white/10 transition-colors",onClick:O=>{O.stopPropagation(),_e(Z.children||[])}},[ne("div",{class:"flex items-center gap-2 mb-2 font-bold text-sm opacity-80"},[ne("el-icon",null,{default:()=>ne(so)}),ne("span","合并转发记录")]),ne("div",{class:"space-y-1.5"},(Z.children||[]).filter(O=>O.type==="message").slice(0,4).map(O=>{var V,m,W,$;return ne("div",{class:"text-xs truncate opacity-70"},[ne("span",{class:"font-bold mr-1"},`${((V=O.attrs)==null?void 0:V.nickname)||"用户"}:`),ne("span",(($=(W=(m=O.children)==null?void 0:m[0])==null?void 0:W.attrs)==null?void 0:$.content)||"[富媒体内容]")])})),((x=Z.children)==null?void 0:x.length)>4?ne("div",{class:"mt-2 pt-2 border-t border-black/5 dark:border-white/5 text-[10px] opacity-50"},`查看更多 ${Z.children.length} 条内容...`):null]):se==="quote"?null:ne("span",{class:"text-gray-400 italic text-xs"},`[${se}]`)}}}),Ft=async X=>{const y=new FileReader;y.onload=async ge=>{var g;const ae=(g=ge.target)==null?void 0:g.result,ke=await $e("upload-image",{file:ae,filename:X.name,mimeType:X.raw.type});ke.success&&p.value.push({tempId:ke.tempId,preview:URL.createObjectURL(X.raw),filename:X.name})},y.readAsDataURL(X.raw)},$t=X=>{p.value=p.value.filter(y=>y.tempId!==X)};return(X,y)=>{const ge=me("el-avatar"),ae=me("el-icon"),ke=me("el-scrollbar"),g=me("el-aside"),L=me("el-button"),q=me("el-image"),Z=me("el-upload"),fe=me("el-input"),Oe=me("el-empty"),se=me("el-main"),b=me("el-descriptions-item"),x=me("el-descriptions"),O=me("el-container"),V=me("el-dialog");return v(),M("div",{class:"chat-patch-wrapper absolute inset-0 flex overflow-hidden bg-[var(--k-page-bg)] text-[var(--k-text-color)] font-sans",style:De(s(c)?"height: 100dvh; width: 100vw; position: fixed; top: 0; left: 0;":"height: 100%; width: 100%;")},[S(O,{class:"h-full w-full overflow-hidden"},{default:I(()=>[vt(S(g,{width:s(c)?"100%":"280px",class:"flex flex-col border-r border-[var(--k-border-color)] bg-[var(--k-page-bg)] brightness-95 dark:brightness-90 h-full overflow-hidden"},{default:I(()=>[y[21]||(y[21]=h("div",{class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] text-lg text-[var(--k-text-color)] flex-shrink-0"}," 机器人",-1)),S(ke,{class:"flex-1 overflow-auto"},{default:I(()=>[s(t).length===0?(v(),M("div",ju,"暂无机器人数据")):N("",true),(v(true),M(ve,null,qe(s(t),m=>(v(),M("div",{key:m.selfId,class:z(["flex items-center p-4 cursor-pointer transition-all hover:bg-[var(--k-button-hover-bg)] border-l-4 border-transparent",{"!border-[var(--k-color-primary)] bg-[var(--k-button-active-bg)] text-[var(--k-color-primary)]":s(n)===m.selfId}]),onClick:W=>s(A)(m.selfId),onContextmenu:Te(W=>s(Je)(W,m),["prevent"])},[S(ge,{size:44,src:m.avatar,class:"flex-shrink-0 shadow-sm"},{default:I(()=>[Q(j(m.username[0]),1)]),_:2},1032,["src"]),h("div",qu,[h("div",Wu,[Q(j(m.username)+" ",1),s(T).has(m.selfId)?(v(),U(ae,{key:0,class:"text-orange-400"},{default:I(()=>[S(s(lo))]),_:1})):N("",true)]),h("div",Gu,j(m.platform),1)]),h("div",{class:z(["w-2.5 h-2.5 rounded-full ml-2 shadow-inner",m.status==="online"?"bg-green-500":"bg-gray-400"])},null,2)],42,Ku))),128))]),_:1})]),_:1},8,["width"]),[[mt,!s(c)||s(d)==="bots"]]),vt(S(g,{width:s(c)?"100%":"260px",class:"flex flex-col border-r border-[var(--k-border-color)] bg-[var(--k-page-bg)] brightness-100 dark:brightness-95 h-full overflow-hidden"},{default:I(()=>[h("div",Yu,[s(c)?(v(),U(L,{key:0,icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(u)},null,8,["onClick"])):N("",true),y[22]||(y[22]=Q(" 频道 ",-1))]),S(ke,{class:"flex-1 overflow-auto"},{default:I(()=>[s(a).length===0?(v(),M("div",Xu,"暂无频道数据")):N("",true),(v(true),M(ve,null,qe(s(a),m=>(v(),M("div",{key:m.id,class:z(["flex items-center p-4 cursor-pointer transition-all hover:bg-[var(--k-button-hover-bg)] border-l-4 border-transparent",{"!border-[var(--k-color-primary)] bg-[var(--k-button-active-bg)] text-[var(--k-color-primary)]":s(o)===m.id}]),onClick:W=>s(be)(m.id),onContextmenu:Te(W=>s(Xt)(W,m),["prevent"])},[h("div",Ju,[h("div",Qu,[Q(j(m.name)+" ",1),s(k).has(`${s(n)}:${m.id}`)?(v(),U(ae,{key:0,class:"text-orange-400"},{default:I(()=>[S(s(lo))]),_:1})):N("",true)])])],42,Zu))),128))]),_:1})]),_:1},8,["width"]),[[mt,!s(c)&&s(n)||s(c)&&s(d)==="channels"]]),vt(S(se,{class:"flex flex-col p-0 bg-[var(--k-page-bg)] relative brightness-105 dark:brightness-100 h-full overflow-hidden"},{default:I(()=>[s(n)&&s(o)?(v(),M(ve,{key:0},[h("div",ec,[s(c)?(v(),U(L,{key:0,icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(u)},null,8,["onClick"])):N("",true),h("span",tc,j(s(l)),1),s(o)?(v(),M("span",nc,"("+j(s(o))+")",1)):N("",true)]),h("div",oc,[S(ke,{ref_key:"scrollRef",ref:P,onScroll:s(It),class:"h-full"},{default:I(()=>[h("div",{class:"p-6 flex flex-col",style:De(s(c)?{paddingBottom:"calc(180px + env(safe-area-inset-bottom))"}:{minHeight:"100%"})},[s(ee)?(v(),M("div",ac,[S(ae,{class:"is-loading text-[var(--k-color-primary)]"},{default:I(()=>[S(s(_t))]),_:1})])):N("",true),(v(true),M(ve,null,qe(s(r),m=>(v(),M("div",{key:m.id,"data-id":m.id,class:z(["flex mb-6 gap-3 group",m.isBot||m.userId===s(n)?"flex-row-reverse":"flex-row"])},[S(ge,{size:40,src:m.avatar,class:"flex-shrink-0 shadow-sm cursor-pointer hover:brightness-90",onClick:W=>s(it)(m)},{default:I(()=>[Q(j(m.username[0]),1)]),_:2},1032,["src","onClick"]),h("div",{class:z(["max-w-[85%] md:max-w-[75%] flex flex-col",m.isBot||m.userId===s(n)?"items-end":"items-start"])},[h("div",rc,[h("span",lc,j(m.username),1),h("span",ic,j(Qe(m.timestamp)),1)]),h("div",{class:z(["flex items-end gap-2 group/msg",m.isBot||m.userId===s(n)?"flex-row":"flex-row-reverse"])},[h("div",{class:z(["transition-opacity cursor-pointer text-blue-500 hover:scale-110 active:scale-95 mb-1",s(c)?"opacity-100":"opacity-0 group-hover/msg:opacity-100"]),title:"复读这条消息",onClick:Te(W=>s(Mt)(m),["stop"])},[m.sending?(v(),M("div",cc,[S(ae,{class:"is-loading"},{default:I(()=>[S(s(_t))]),_:1})])):(v(),M("div",dc," +1"))],10,uc),h("div",{class:z(["p-3.5 rounded-2xl shadow-sm text-[15px] leading-relaxed break-all relative cursor-context-menu",m.isBot||m.userId===s(n)?"bg-[#95ec69] text-black rounded-tr-none":"bg-[var(--k-card-bg)] text-[var(--k-text-color)] rounded-tl-none border border-[var(--k-border-color)]"]),onContextmenu:Te(W=>s(Vt)(W,m),["stop"])},[m.quote?(v(),M("div",pc,[h("div",vc,j(m.quote.user.username)+":",1),h("div",mc,[m.quote.elements&&m.quote.elements.length?(v(true),M(ve,{key:0},qe(m.quote.elements,(W,$)=>(v(),U(s(et),{key:$,element:W,"bot-id":s(n),"channel-id":s(o),"in-quote":true},null,8,["element","bot-id","channel-id"]))),128)):(v(),M(ve,{key:1},[Q(j(m.quote.content),1)],64))]),h("div",{class:"absolute top-1 right-1 cursor-pointer text-[var(--k-color-primary)] hover:scale-110 transition-transform",title:"定位到原消息",onClick:Te(W=>s(ut)(m.quote.id),["stop"])},[S(ae,null,{default:I(()=>[S(s(is))]),_:1})],8,hc)])):N("",true),h("div",gc,[m.elements&&m.elements.length?(v(true),M(ve,{key:0},qe(m.elements,(W,$)=>(v(),U(s(et),{key:$,element:W,"bot-id":s(n),"channel-id":s(o)},null,8,["element","bot-id","channel-id"]))),128)):m.content?(v(),M(ve,{key:1},[Q(j(m.content),1)],64)):N("",true)])],42,fc)],2)],2)],10,sc))),128))],4)]),_:1},8,["onScroll"])]),h("div",{class:z(["p-4 border-t border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-[0_-2px_10px_rgba(0,0,0,0.05)]",s(c)?"fixed left-0 right-0 z-50 transition-all duration-200":""]),style:De(s(c)?{bottom:s(G)>0?`${s(G)}px`:"0",paddingBottom:"max(env(safe-area-inset-bottom), 16px)"}:{})},[s(p).length?(v(),M("div",bc,[(v(true),M(ve,null,qe(s(p),m=>(v(),M("div",{key:m.tempId,class:"relative w-20 h-20 flex-shrink-0 group"},[S(q,{src:m.preview,fit:"cover",class:"w-full h-full rounded-lg border-2 border-[var(--k-border-color)] shadow-sm cursor-pointer hover:brightness-90",onClick:W=>s(ze)(m.preview)},null,8,["src","onClick"]),S(ae,{class:"absolute -top-1.5 -right-1.5 cursor-pointer text-red-500 bg-white rounded-full shadow-md opacity-0 group-hover:opacity-100 transition-opacity z-10",onClick:Te(W=>$t(m.tempId),["stop"])},{default:I(()=>[S(s(Dn))]),_:1},8,["onClick"])]))),128))])):N("",true),s(le)?(v(),M("div",yc,[h("div",wc,[S(ae,null,{default:I(()=>[S(s(ao))]),_:1}),h("span",null,"回复 "+j(s(le).username)+": "+j(s(le).content.slice(0,20))+j(s(le).content.length>20?"...":""),1)]),S(ae,{class:"cursor-pointer hover:text-red-500",onClick:y[0]||(y[0]=m=>le.value=null)},{default:I(()=>[S(s(Uo))]),_:1})])):N("",true),h("div",xc,[S(Z,{action:"#","auto-upload":false,"show-file-list":false,"on-change":Ft,multiple:""},{default:I(()=>[S(L,{circle:"",class:"!w-10 !h-10 !text-xl shadow-sm hover:scale-105 transition-transform"},{default:I(()=>[S(ae,null,{default:I(()=>[S(s(ro))]),_:1})]),_:1})]),_:1}),S(fe,{ref_key:"inputRef",ref:Lt,modelValue:s(i),"onUpdate:modelValue":y[1]||(y[1]=m=>yt(i)?i.value=m:null),type:"textarea",autosize:{minRows:1,maxRows:4},placeholder:"输入消息...",class:"flex-1 !text-base",onKeydown:Dt(Te(s(xe),["prevent"]),["enter"]),onPaste:s(Tt)},null,8,["modelValue","onKeydown","onPaste"]),S(L,{type:"primary",loading:s(f),onClick:s(xe),class:"px-6 h-10 !text-base font-bold shadow-md"},{default:I(()=>[...y[23]||(y[23]=[Q("发送",-1)])]),_:1},8,["loading","onClick"])])],6)],64)):(v(),U(Oe,{key:1,description:"请选择频道开始对话",class:"h-full flex items-center justify-center opacity-60"}))]),_:1},512),[[mt,!s(c)&&s(n)&&s(o)||s(c)&&s(d)==="messages"]]),s(c)&&s(d)==="forward"?(v(),U(se,{key:0,class:"flex flex-col p-0 bg-[var(--k-page-bg)] absolute inset-0 z-50 overflow-hidden",style:{height:"100dvh"}},{default:I(()=>[h("div",_c,[S(L,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(u)},null,8,["onClick"]),y[24]||(y[24]=h("span",null,"聊天记录",-1))]),S(ke,{class:"flex-1 bg-gray-50 dark:bg-black/10"},{default:I(()=>[h("div",Cc,[(v(true),M(ve,null,qe(s(C).messages,(m,W)=>{var $,re;return v(),M("div",{key:W,class:"flex gap-3"},[S(ge,{size:36,src:($=m.attrs)==null?void 0:$.avatar,class:"flex-shrink-0 shadow-sm"},{default:I(()=>{var Y,oe;return[Q(j((oe=(Y=m.attrs)==null?void 0:Y.nickname)==null?void 0:oe[0]),1)]}),_:2},1032,["src"]),h("div",kc,[h("div",Ec,j((re=m.attrs)==null?void 0:re.nickname),1),h("div",Sc,[(v(true),M(ve,null,qe(m.children,(Y,oe)=>(v(),U(s(et),{key:oe,element:Y,"bot-id":s(n),"channel-id":s(o)},null,8,["element","bot-id","channel-id"]))),128))])])])}),128))])]),_:1})]),_:1})):N("",true),s(c)&&s(d)==="image"?(v(),U(se,{key:1,class:"flex flex-col p-0 bg-black absolute inset-0 z-[60] overflow-hidden",style:{height:"100dvh"}},{default:I(()=>[h("div",Ic,[S(L,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3 !bg-white/10 !border-none !text-white",onClick:s(u)},null,8,["onClick"]),y[26]||(y[26]=h("span",{class:"truncate mr-2"},"查看图片",-1)),y[27]||(y[27]=h("div",{class:"flex-1"},null,-1)),S(L,{type:"primary",icon:"Download",size:"small",onClick:y[2]||(y[2]=m=>s(Ve)(s(w).url))},{default:I(()=>[...y[25]||(y[25]=[Q("下载",-1)])]),_:1})]),h("div",{class:"flex-1 overflow-hidden relative flex items-center justify-center",onWheel:y[3]||(y[3]=(...m)=>s(Ze)&&s(Ze)(...m))},[h("img",{src:s(w).url,class:"max-w-full max-h-full object-contain transition-transform duration-200 ease-out will-change-transform",style:De({transform:`scale(${s(_)})`})},null,12,Mc)],32)]),_:1})):N("",true),s(c)&&s(d)==="raw"?(v(),U(se,{key:2,class:"flex flex-col p-0 bg-[var(--k-page-bg)] absolute inset-0 z-[80] overflow-hidden",style:{height:"100dvh"}},{default:I(()=>[h("div",Tc,[S(L,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(u)},null,8,["onClick"]),y[28]||(y[28]=h("div",{class:"flex-1 text-center pr-8"},"原始消息",-1))]),h("div",Lc,[S(fe,{modelValue:s(R).content,"onUpdate:modelValue":y[4]||(y[4]=m=>s(R).content=m),type:"textarea",rows:15,readonly:"",class:"flex-1 raw-content-area"},null,8,["modelValue"]),h("div",$c,[S(L,{type:"primary",class:"flex-1",onClick:y[5]||(y[5]=m=>s(lt)(s(R).content).then(()=>s(We).success("已复制")))},{default:I(()=>[...y[29]||(y[29]=[Q("复制内容",-1)])]),_:1}),S(L,{class:"flex-1",onClick:s(u)},{default:I(()=>[...y[30]||(y[30]=[Q("返回",-1)])]),_:1},8,["onClick"])])])]),_:1})):N("",true),s(c)&&s(d)==="profile"?(v(),U(se,{key:3,class:"flex flex-col p-0 bg-[var(--k-page-bg)] absolute inset-0 z-[70] overflow-hidden",style:{height:"100dvh"}},{default:I(()=>{var m,W,$,re,Y;return[h("div",Bc,[S(L,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(u)},null,8,["onClick"]),y[31]||(y[31]=h("div",{class:"flex-1 text-center pr-8"},"用户资料",-1))]),h("div",Ac,[S(ge,{size:120,src:(m=s(K).data)==null?void 0:m.avatar,class:"shadow-lg"},{default:I(()=>{var oe,Ee;return[Q(j((Ee=(oe=s(K).data)==null?void 0:oe.username)==null?void 0:Ee[0]),1)]}),_:1},8,["src"]),h("div",Pc,[h("div",Oc,j(((W=s(K).data)==null?void 0:W.username)||(($=s(K).data)==null?void 0:$.name)||"未知用户"),1),h("div",Nc,"ID: "+j(((re=s(K).data)==null?void 0:re.userId)||((Y=s(K).data)==null?void 0:Y.id)),1)]),S(x,{column:1,border:"",class:"w-full mt-4"},{default:I(()=>[S(b,{label:"昵称"},{default:I(()=>{var oe,Ee;return[Q(j(((oe=s(K).data)==null?void 0:oe.username)||((Ee=s(K).data)==null?void 0:Ee.name)),1)]}),_:1}),S(b,{label:"平台"},{default:I(()=>[Q(j(s(he)),1)]),_:1})]),_:1})])]}),_:1})):N("",true)]),_:1}),s(c)?N("",true):(v(),U(V,{key:0,modelValue:s(ce),"onUpdate:modelValue":y[6]||(y[6]=m=>yt(ce)?ce.value=m:null),title:"用户资料",width:"400px",center:"",teleported:"","align-center":""},{default:I(()=>{var m,W,$,re,Y;return[h("div",zc,[S(ge,{size:80,src:(m=s(K).data)==null?void 0:m.avatar,class:"shadow"},{default:I(()=>{var oe,Ee;return[Q(j((Ee=(oe=s(K).data)==null?void 0:oe.username)==null?void 0:Ee[0]),1)]}),_:1},8,["src"]),h("div",Rc,[h("div",Vc,j(((W=s(K).data)==null?void 0:W.username)||(($=s(K).data)==null?void 0:$.name)||"未知用户"),1),h("div",Fc,"ID: "+j(((re=s(K).data)==null?void 0:re.userId)||((Y=s(K).data)==null?void 0:Y.id)),1)]),S(x,{column:1,border:"",class:"w-full mt-4"},{default:I(()=>[S(b,{label:"昵称"},{default:I(()=>{var oe,Ee;return[Q(j(((oe=s(K).data)==null?void 0:oe.username)||((Ee=s(K).data)==null?void 0:Ee.name)),1)]}),_:1}),S(b,{label:"平台"},{default:I(()=>[Q(j(s(he)),1)]),_:1})]),_:1})])]}),_:1},8,["modelValue"])),s(c)?N("",true):(v(),U(V,{key:1,modelValue:s(D),"onUpdate:modelValue":y[7]||(y[7]=m=>yt(D)?D.value=m:null),title:"聊天记录",width:"550px",class:"forward-dialog",teleported:""},{default:I(()=>[S(ke,{"max-height":"70vh"},{default:I(()=>[h("div",Hc,[(v(true),M(ve,null,qe(s(C).messages,(m,W)=>{var $,re;return v(),M("div",{key:W,class:"flex gap-3"},[S(ge,{size:36,src:($=m.attrs)==null?void 0:$.avatar,class:"flex-shrink-0 shadow-sm"},{default:I(()=>{var Y,oe;return[Q(j((oe=(Y=m.attrs)==null?void 0:Y.nickname)==null?void 0:oe[0]),1)]}),_:2},1032,["src"]),h("div",Dc,[h("div",Uc,j((re=m.attrs)==null?void 0:re.nickname),1),h("div",jc,[(v(true),M(ve,null,qe(m.children,(Y,oe)=>(v(),U(s(et),{key:oe,element:Y,"bot-id":s(n),"channel-id":s(o)},null,8,["element","bot-id","channel-id"]))),128))])])])}),128))])]),_:1})]),_:1},8,["modelValue"])),s(c)?N("",true):(v(),U(V,{key:2,modelValue:s(F),"onUpdate:modelValue":y[9]||(y[9]=m=>yt(F)?F.value=m:null),title:"查看图片",width:"fit-content",class:"image-viewer-dialog",teleported:"",center:""},{default:I(()=>[h("div",Kc,[h("img",{src:s(w).url,class:"max-w-full max-h-[70vh] rounded shadow-lg"},null,8,qc),S(L,{type:"primary",icon:"Download",onClick:y[8]||(y[8]=m=>s(Ve)(s(w).url))},{default:I(()=>[...y[32]||(y[32]=[Q("下载图片",-1)])]),_:1})])]),_:1},8,["modelValue"])),s(c)?N("",true):(v(),U(V,{key:3,modelValue:s(H),"onUpdate:modelValue":y[13]||(y[13]=m=>yt(H)?H.value=m:null),title:"原始消息内容",width:"600px",center:"",teleported:"","align-center":""},{default:I(()=>[h("div",Wc,[S(fe,{modelValue:s(R).content,"onUpdate:modelValue":y[10]||(y[10]=m=>s(R).content=m),type:"textarea",rows:12,readonly:"",class:"raw-content-area"},null,8,["modelValue"]),h("div",Gc,[S(L,{type:"primary",onClick:y[11]||(y[11]=m=>s(lt)(s(R).content).then(()=>s(We).success("已复制到剪贴板")))},{default:I(()=>[...y[33]||(y[33]=[Q("复制全部内容",-1)])]),_:1}),S(L,{onClick:y[12]||(y[12]=m=>H.value=false)},{default:I(()=>[...y[34]||(y[34]=[Q("关闭",-1)])]),_:1})])])]),_:1},8,["modelValue"])),s(Pe).show?(v(),M("div",{key:4,class:"fixed bg-[var(--k-card-bg)] border border-[var(--k-border-color)] shadow-xl z-[2000] py-1.5 rounded-lg min-w-[140px] backdrop-blur-sm bg-opacity-90",style:De({left:s(Pe).x+"px",top:s(Pe).y+"px"})},[s(Pe).type==="bot"||s(Pe).type==="channel"?(v(),M(ve,{key:0},[h("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[14]||(y[14]=m=>Ce("pin"))},[S(ae,null,{default:I(()=>[S(s(ss))]),_:1}),Q(" "+j(s(Pe).isPinned?"取消置顶":"置顶"),1)]),h("div",{class:"px-4 py-2.5 cursor-pointer text-sm text-red-500 hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[15]||(y[15]=m=>Ce("delete"))},[S(ae,null,{default:I(()=>[S(s(Wa))]),_:1}),y[35]||(y[35]=Q(" 删除数据 ",-1))])],64)):s(Pe).type==="message"?(v(),M(ve,{key:1},[h("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[16]||(y[16]=m=>s(Ke)("copy"))},[S(ae,null,{default:I(()=>[S(s(Ya))]),_:1}),y[36]||(y[36]=Q(" 复制文本 ",-1))]),h("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[17]||(y[17]=m=>s(Ke)("copy-raw"))},[S(ae,null,{default:I(()=>[S(s(so))]),_:1}),y[37]||(y[37]=Q(" 查看原始消息 ",-1))]),h("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[18]||(y[18]=m=>s(Ke)("plus1"))},[S(ae,null,{default:I(()=>[S(s(Ua))]),_:1}),y[38]||(y[38]=Q(" +1 复读 ",-1))]),h("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[19]||(y[19]=m=>s(Ke)("reply"))},[S(ae,null,{default:I(()=>[S(s(ao))]),_:1}),y[39]||(y[39]=Q(" 回复 ",-1))]),s(Pe).hasMedia?(v(),M("div",{key:0,class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[20]||(y[20]=m=>s(Ke)("download"))},[S(ae,null,{default:I(()=>[S(s(Za))]),_:1}),y[40]||(y[40]=Q(" 下载媒体 ",-1))])):N("",true)],64)):N("",true)],4)):N("",true)],4)}}}),Xc=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},Zc={},Jc={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"};function Qc(e,t){return v(),M("svg",Jc,[...t[0]||(t[0]=[h("path",{d:"M8 10.5H16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),h("path",{d:"M8 14H13.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),h("path",{d:"M17 3.33782C15.5291 2.48697 13.8214 2 12 2C6.47715 2 2 6.47715 2 12C2 13.5997 2.37562 15.1116 3.04346 16.4525C3.22094 16.8088 3.28001 17.2161 3.17712 17.6006L2.58151 19.8267C2.32295 20.793 3.20701 21.677 4.17335 21.4185L6.39939 20.8229C6.78393 20.72 7.19121 20.7791 7.54753 20.9565C8.88837 21.6244 10.4003 22 12 22C17.5228 22 22 17.5228 22 12C22 10.1786 21.513 8.47087 20.6622 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)])])}const ed=Xc(Zc,[["render",Qc]]);Pa.register("activity:chat",ed);const ad=e=>{e.page({name:"聊天室",path:"/chat-patch",desc:"",authority:4,icon:"activity:chat",component:J({setup(){return()=>ne(me("k-layout"),{},{default:()=>ne(Yc)})}})})};export{ad as default};
5
+ **/const Ct=()=>{},ps=Object.prototype.hasOwnProperty,Ut=(e,t)=>ps.call(e,t),vs=Array.isArray,ot=e=>typeof e=="function",Re=e=>typeof e=="string",Ot=e=>e!==null&&typeof e=="object",ms=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},hs=/-\w/g,gs=ms(e=>e.replace(hs,t=>t.slice(1).toUpperCase()));var bs=typeof global=="object"&&global&&global.Object===Object&&global,ys=typeof self=="object"&&self&&self.Object===Object&&self,Un=bs||ys||Function("return this")(),ht=Un.Symbol,Yo=Object.prototype,ws=Yo.hasOwnProperty,xs=Yo.toString,Ft=ht?ht.toStringTag:void 0;function _s(e){var t=ws.call(e,Ft),n=e[Ft];try{e[Ft]=void 0;var o=true}catch{}var a=xs.call(e);return o&&(t?e[Ft]=n:delete e[Ft]),a}var Cs=Object.prototype,ks=Cs.toString;function Es(e){return ks.call(e)}var Ss="[object Null]",Is="[object Undefined]",io=ht?ht.toStringTag:void 0;function jn(e){return e==null?e===void 0?Is:Ss:io&&io in Object(e)?_s(e):Es(e)}function Kn(e){return e!=null&&typeof e=="object"}var Ms="[object Symbol]";function qn(e){return typeof e=="symbol"||Kn(e)&&jn(e)==Ms}function Ts(e,t){for(var n=-1,o=e==null?0:e.length,a=Array(o);++n<o;)a[n]=t(e[n],n,e);return a}var Yt=Array.isArray,uo=ht?ht.prototype:void 0,co=uo?uo.toString:void 0;function Xo(e){if(typeof e=="string")return e;if(Yt(e))return Ts(e,Xo)+"";if(qn(e))return co?co.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function pn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ls(e){return e}var $s="[object AsyncFunction]",Bs="[object Function]",As="[object GeneratorFunction]",Ps="[object Proxy]";function Os(e){if(!pn(e))return false;var t=jn(e);return t==Bs||t==As||t==$s||t==Ps}var En=Un["__core-js_shared__"],fo=function(){var e=/[^.]+$/.exec(En&&En.keys&&En.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ns(e){return!!fo&&fo in e}var zs=Function.prototype,Rs=zs.toString;function Vs(e){if(e!=null){try{return Rs.call(e)}catch{}try{return e+""}catch{}}return""}var Ds=/[\\^$.*+?()[\]{}|]/g,Fs=/^\[object .+?Constructor\]$/,Hs=Function.prototype,Us=Object.prototype,js=Hs.toString,Ks=Us.hasOwnProperty,qs=RegExp("^"+js.call(Ks).replace(Ds,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ws(e){if(!pn(e)||Ns(e))return false;var t=Os(e)?qs:Fs;return t.test(Vs(e))}function Gs(e,t){return e==null?void 0:e[t]}function Wn(e,t){var n=Gs(e,t);return Ws(n)?n:void 0}function Ys(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Xs=800,Zs=16,Js=Date.now;function Qs(e){var t=0,n=0;return function(){var o=Js(),a=Zs-(o-n);if(n=o,a>0){if(++t>=Xs)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function er(e){return function(){return e}}var vn=function(){try{var e=Wn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),tr=vn?function(e,t){return vn(e,"toString",{configurable:true,enumerable:false,value:er(t),writable:true})}:Ls,nr=Qs(tr),or=9007199254740991,ar=/^(?:0|[1-9]\d*)$/;function Zo(e,t){var n=typeof e;return t=t??or,!!t&&(n=="number"||n!="symbol"&&ar.test(e))&&e>-1&&e%1==0&&e<t}function sr(e,t,n){t=="__proto__"&&vn?vn(e,t,{configurable:true,enumerable:true,value:n,writable:true}):e[t]=n}function Jo(e,t){return e===t||e!==e&&t!==t}var rr=Object.prototype,lr=rr.hasOwnProperty;function ir(e,t,n){var o=e[t];(!(lr.call(e,t)&&Jo(o,n))||n===void 0&&!(t in e))&&sr(e,t,n)}var po=Math.max;function ur(e,t,n){return t=po(t===void 0?e.length-1:t,0),function(){for(var o=arguments,a=-1,r=po(o.length-t,0),l=Array(r);++a<r;)l[a]=o[t+a];a=-1;for(var i=Array(t+1);++a<t;)i[a]=o[a];return i[t]=n(l),Ys(e,this,i)}}var cr=9007199254740991;function dr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cr}var fr="[object Arguments]";function vo(e){return Kn(e)&&jn(e)==fr}var Qo=Object.prototype,pr=Qo.hasOwnProperty,vr=Qo.propertyIsEnumerable,ea=vo(function(){return arguments}())?vo:function(e){return Kn(e)&&pr.call(e,"callee")&&!vr.call(e,"callee")},mr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hr=/^\w*$/;function gr(e,t){if(Yt(e))return false;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||qn(e)?true:hr.test(e)||!mr.test(e)||t!=null&&e in Object(t)}var jt=Wn(Object,"create");function br(){this.__data__=jt?jt(null):{},this.size=0}function yr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var wr="__lodash_hash_undefined__",xr=Object.prototype,_r=xr.hasOwnProperty;function Cr(e){var t=this.__data__;if(jt){var n=t[e];return n===wr?void 0:n}return _r.call(t,e)?t[e]:void 0}var kr=Object.prototype,Er=kr.hasOwnProperty;function Sr(e){var t=this.__data__;return jt?t[e]!==void 0:Er.call(t,e)}var Ir="__lodash_hash_undefined__";function Mr(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=jt&&t===void 0?Ir:t,this}function kt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}kt.prototype.clear=br;kt.prototype.delete=yr;kt.prototype.get=Cr;kt.prototype.has=Sr;kt.prototype.set=Mr;function Tr(){this.__data__=[],this.size=0}function yn(e,t){for(var n=e.length;n--;)if(Jo(e[n][0],t))return n;return-1}var Lr=Array.prototype,$r=Lr.splice;function Br(e){var t=this.__data__,n=yn(t,e);if(n<0)return false;var o=t.length-1;return n==o?t.pop():$r.call(t,n,1),--this.size,true}function Ar(e){var t=this.__data__,n=yn(t,e);return n<0?void 0:t[n][1]}function Pr(e){return yn(this.__data__,e)>-1}function Or(e,t){var n=this.__data__,o=yn(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function zt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}zt.prototype.clear=Tr;zt.prototype.delete=Br;zt.prototype.get=Ar;zt.prototype.has=Pr;zt.prototype.set=Or;var Nr=Wn(Un,"Map");function zr(){this.size=0,this.__data__={hash:new kt,map:new(Nr||zt),string:new kt}}function Rr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function wn(e,t){var n=e.__data__;return Rr(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Vr(e){var t=wn(this,e).delete(e);return this.size-=t?1:0,t}function Dr(e){return wn(this,e).get(e)}function Fr(e){return wn(this,e).has(e)}function Hr(e,t){var n=wn(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}function St(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}St.prototype.clear=zr;St.prototype.delete=Vr;St.prototype.get=Dr;St.prototype.has=Fr;St.prototype.set=Hr;var Ur="Expected a function";function Gn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ur);var n=function(){var o=arguments,a=t?t.apply(this,o):o[0],r=n.cache;if(r.has(a))return r.get(a);var l=e.apply(this,o);return n.cache=r.set(a,l)||r,l};return n.cache=new(Gn.Cache||St),n}Gn.Cache=St;var jr=500;function Kr(e){var t=Gn(e,function(o){return n.size===jr&&n.clear(),o}),n=t.cache;return t}var qr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wr=/\\(\\)?/g,Gr=Kr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(qr,function(n,o,a,r){t.push(a?r.replace(Wr,"$1"):o||n)}),t});function Yr(e){return e==null?"":Xo(e)}function xn(e,t){return Yt(e)?e:gr(e,t)?[e]:Gr(Yr(e))}function Yn(e){if(typeof e=="string"||qn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ta(e,t){t=xn(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[Yn(t[n++])];return n&&n==o?e:void 0}function Xr(e,t,n){var o=e==null?void 0:ta(e,t);return o===void 0?n:o}function Zr(e,t){for(var n=-1,o=t.length,a=e.length;++n<o;)e[a+n]=t[n];return e}var mo=ht?ht.isConcatSpreadable:void 0;function Jr(e){return Yt(e)||ea(e)||!!(mo&&e&&e[mo])}function Qr(e,t,n,o,a){var r=-1,l=e.length;for(n||(n=Jr),a||(a=[]);++r<l;){var i=e[r];n(i)?Zr(a,i):a[a.length]=i}return a}function el(e){var t=e==null?0:e.length;return t?Qr(e):[]}function tl(e){return nr(ur(e,void 0,el),e+"")}function nl(e,t){return e!=null&&t in Object(e)}function ol(e,t,n){t=xn(t,e);for(var o=-1,a=t.length,r=false;++o<a;){var l=Yn(t[o]);if(!(r=e!=null&&n(e,l)))break;e=e[l]}return r||++o!=a?r:(a=e==null?0:e.length,!!a&&dr(a)&&Zo(l,a)&&(Yt(e)||ea(e)))}function al(e,t){return e!=null&&ol(e,t,nl)}function na(e){for(var t=-1,n=e==null?0:e.length,o={};++t<n;){var a=e[t];o[a[0]]=a[1]}return o}function oa(e){return e==null}function sl(e,t,n,o){if(!pn(e))return e;t=xn(t,e);for(var a=-1,r=t.length,l=r-1,i=e;i!=null&&++a<r;){var f=Yn(t[a]),c=n;if(f==="__proto__"||f==="constructor"||f==="prototype")return e;if(a!=l){var $=i[f];c=void 0,c===void 0&&(c=pn($)?$:Zo(t[a+1])?[]:{})}ir(i,f,c),i=i[f]}return e}function rl(e,t,n){for(var o=-1,a=t.length,r={};++o<a;){var l=t[o],i=ta(e,l);n(i,l)&&sl(r,xn(l,e),i)}return r}function ll(e,t){return rl(e,t,function(n,o){return al(e,o)})}var il=tl(function(e,t){return e==null?{}:ll(e,t)});const ul=e=>e===void 0,Sn=e=>typeof e=="boolean",at=e=>typeof e=="number",On=e=>typeof Element>"u"?false:e instanceof Element,cl=e=>Re(e)?!Number.isNaN(Number(e)):false;class dl extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function fl(e,t){throw new dl(`[${e}] ${t}`)}const ho={current:0},go=N(0),aa=2e3,bo=Symbol("elZIndexContextKey"),sa=Symbol("zIndexContextKey"),pl=e=>{const t=Ye()?Ae(bo,ho):ho,n=e||(Ye()?Ae(sa,void 0):void 0),o=E(()=>{const l=s(n);return at(l)?l:aa}),a=E(()=>o.value+go.value),r=()=>(t.current++,go.value=t.current,a.value);return!je&&Ae(bo),{initialZIndex:o,currentZIndex:a,nextZIndex:r}};var vl={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const ml=e=>(t,n)=>hl(t,n,s(e)),hl=(e,t,n)=>Xr(n,e,e).replace(/\{(\w+)\}/g,(o,a)=>{var r;return`${(r=t==null?void 0:t[a])!=null?r:`{${a}}`}`}),gl=e=>{const t=E(()=>s(e).name),n=yt(e)?e:N(e);return{lang:t,locale:n,t:ml(e)}},ra=Symbol("localeContextKey"),bl=e=>{const t=e||Ae(ra,N());return gl(E(()=>t.value||vl))},la="__epPropKey",de=e=>e,yl=e=>Ot(e)&&!!e[la],ia=(e,t)=>{if(!Ot(e)||yl(e))return e;const{values:n,required:o,default:a,type:r,validator:l}=e,f={type:r,required:!!o,validator:n||l?c=>{let $=false,k=[];if(n&&(k=Array.from(n),Ut(e,"default")&&k.push(a),$||($=k.includes(c))),l&&($||($=l(c))),!$&&k.length>0){const z=[...new Set(k)].map(d=>JSON.stringify(d)).join(", ");Ma(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${z}], got value ${JSON.stringify(c)}.`)}return $}:void 0,[la]:true};return Ut(e,"default")&&(f.default=a),f},st=e=>na(Object.entries(e).map(([t,n])=>[t,ia(n,t)])),ua=["","default","small","large"],Xn=ia({type:String,values:ua,required:false}),ca=Symbol("size"),wl=()=>{const e=Ae(ca,{});return E(()=>s(e.size)||"")},xl=Symbol("emptyValuesContextKey"),_l=st({emptyValues:Array,valueOnClear:{type:de([String,Number,Boolean,Function]),default:void 0,validator:e=>(e=ot(e)?e():e,vs(e)?e.every(t=>!t):!e)}}),yo=e=>Object.keys(e),mn=N();function Zn(e,t=void 0){const n=Ye()?Ae(qo,mn):mn;return e?E(()=>{var o,a;return(a=(o=n.value)==null?void 0:o[e])!=null?a:t}):n}function da(e,t){const n=Zn(),o=Xe(e,E(()=>{var i;return((i=n.value)==null?void 0:i.namespace)||rn})),a=bl(E(()=>{var i;return(i=n.value)==null?void 0:i.locale})),r=pl(E(()=>{var i;return((i=n.value)==null?void 0:i.zIndex)||aa})),l=E(()=>{var i;return s(t)||((i=n.value)==null?void 0:i.size)||""});return fa(E(()=>s(n)||{})),{ns:o,locale:a,zIndex:r,size:l}}const fa=(e,t,n=false)=>{var o;const a=!!Ye(),r=a?Zn():void 0,l=(o=void 0)!=null?o:a?Dn:void 0;if(!l)return;const i=E(()=>{const f=s(e);return r!=null&&r.value?Cl(r.value,f):f});return l(qo,i),l(ra,E(()=>i.value.locale)),l(Wo,E(()=>i.value.namespace)),l(sa,E(()=>i.value.zIndex)),l(ca,{size:E(()=>i.value.size||"")}),l(xl,E(()=>({emptyValues:i.value.emptyValues,valueOnClear:i.value.valueOnClear}))),(n||!mn.value)&&(mn.value=i.value),i},Cl=(e,t)=>{const n=[...new Set([...yo(e),...yo(t)])],o={};for(const a of n)o[a]=t[a]!==void 0?t[a]:e[a];return o};var gt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n};const _n=(e,t)=>{if(e.install=n=>{for(const o of[e,...Object.values(t??{})])n.component(o.name,o)},t)for(const[n,o]of Object.entries(t))e[n]=o;return e},kl=(e,t)=>(e.install=n=>{e._context=n._context,n.config.globalProperties[t]=e},e),El=e=>(e.install=Ct,e),ln="update:modelValue",wo="change",In="input",pa=(e="")=>e.split(" ").filter(t=>!!t.trim()),Sl=(e,t)=>{if(!e||!t)return false;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},Il=(e,t)=>{!e||!t.trim()||e.classList.add(...pa(t))},Ml=(e,t)=>{!e||!t.trim()||e.classList.remove(...pa(t))},Tl=(e,t)=>{var n;if(!je||!e||!t)return"";let o=gs(t);o==="float"&&(o="cssFloat");try{const a=e.style[o];if(a)return a;const r=(n=document.defaultView)==null?void 0:n.getComputedStyle(e,"");return r?r[o]:""}catch{return e.style[o]}};function Kt(e,t="px"){if(!e&&e!==0)return"";if(at(e)||cl(e))return`${e}${t}`;if(Re(e))return e}let Jt;const Ll=e=>{var t;if(!je)return 0;if(Jt!==void 0)return Jt;const n=document.createElement("div");n.className=`${e}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const o=n.offsetWidth;n.style.overflow="scroll";const a=document.createElement("div");a.style.width="100%",n.appendChild(a);const r=a.offsetWidth;return(t=n.parentNode)==null||t.removeChild(n),Jt=o-r,Jt},$l=st({size:{type:de([Number,String])},color:{type:String}}),Bl=ee({name:"ElIcon",inheritAttrs:false,__name:"icon",props:$l,setup(e){const t=e,n=Xe("icon"),o=E(()=>{const{size:a,color:r}=t,l=Kt(a);return!l&&!r?{}:{fontSize:l,"--color":r}});return(a,r)=>(p(),T("i",cn({class:s(n).b(),style:o.value},a.$attrs),[ye(a.$slots,"default")],16))}});var Al=gt(Bl,[["__file","/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);const Ge=_n(Al),Pt=de([String,Object,Function]),va={Close:Uo,SuccessFilled:jo,InfoFilled:Pn,WarningFilled:Ko,CircleCloseFilled:Hn},hn={primary:Pn,success:jo,warning:Ko,error:Hn,info:Pn},Pl={validating:_t,success:Va,error:Ho},Ol=()=>je&&/firefox/i.test(window.navigator.userAgent),Nl=()=>je&&/android/i.test(window.navigator.userAgent);let $e;const zl={height:"0",visibility:"hidden",overflow:Ol()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Rl=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],xo=e=>{const t=Number.parseFloat(e);return Number.isNaN(t)?e:t};function Vl(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),o=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),a=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:Rl.map(l=>[l,t.getPropertyValue(l)]),paddingSize:o,borderSize:a,boxSizing:n}}function _o(e,t=1,n){var o,a;$e||($e=document.createElement("textarea"),((o=e.parentNode)!=null?o:document.body).appendChild($e));const{paddingSize:r,borderSize:l,boxSizing:i,contextStyle:f}=Vl(e);f.forEach(([z,d])=>$e==null?void 0:$e.style.setProperty(z,d)),Object.entries(zl).forEach(([z,d])=>$e==null?void 0:$e.style.setProperty(z,d,"important")),$e.value=e.value||e.placeholder||"";let c=$e.scrollHeight;const $={};i==="border-box"?c=c+l:i==="content-box"&&(c=c-r),$e.value="";const k=$e.scrollHeight-r;if(at(t)){let z=k*t;i==="border-box"&&(z=z+r+l),c=Math.max(z,c),$.minHeight=`${z}px`}if(at(n)){let z=k*n;i==="border-box"&&(z=z+r+l),c=Math.min(z,c)}return $.height=`${c}px`,(a=$e.parentNode)==null||a.removeChild($e),$e=void 0,$}const ma=e=>e,Dl=st({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Fl=e=>il(Dl,e),Hl=st({id:{type:String,default:void 0},size:Xn,disabled:{type:Boolean,default:void 0},modelValue:{type:de([String,Number,Object]),default:""},modelModifiers:{type:de(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:de(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:de([Boolean,Object]),default:false},autocomplete:{type:de(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:Pt,default:Ho},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:Pt},prefixIcon:{type:Pt},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:true},inputStyle:{type:de([Object,Array,String]),default:()=>ma({})},autofocus:Boolean,rows:{type:Number,default:2},...Fl(["ariaLabel"]),inputmode:{type:de(String),default:void 0},name:String}),Ul={[ln]:e=>Re(e),input:e=>Re(e),change:(e,t)=>Re(e)&&(t instanceof Event||t===void 0),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>true,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},jl=["class","style"],Kl=/^on[A-Z]/,ql=(e={})=>{const{excludeListeners:t=false,excludeKeys:n}=e,o=E(()=>((n==null?void 0:n.value)||[]).concat(jl)),a=Ye();return a?E(()=>{var r;return na(Object.entries((r=a.proxy)==null?void 0:r.$attrs).filter(([l])=>!o.value.includes(l)&&!(t&&Kl.test(l))))}):E(()=>({}))},Co={prefix:Math.floor(Math.random()*1e4),current:0},Wl=Symbol("elIdInjection"),Gl=()=>Ye()?Ae(Wl,Co):Co,Nn=e=>{const t=Gl(),n=Go();return Oa(()=>s(e)||`${n.value}-id-${t.prefix}-${t.current++}`)},Jn=Symbol("formContextKey"),ha=Symbol("formItemContextKey"),ga=()=>{const e=Ae(Jn,void 0),t=Ae(ha,void 0);return{form:e,formItem:t}},Yl=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:o})=>{n||(n=N(false)),o||(o=N(false));const a=Ye(),r=()=>{let c=a==null?void 0:a.parent;for(;c;){if(c.type.name==="ElFormItem")return false;if(c.type.name==="ElLabelWrap")return true;c=c.parent}return false},l=N();let i;const f=E(()=>{var c;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((c=t.inputIds)==null?void 0:c.length)<=1)});return Ze(()=>{i=Me([dn(e,"id"),n],([c,$])=>{const k=c??($?void 0:Nn().value);k!==l.value&&(t!=null&&t.removeInputId&&!r()&&(l.value&&t.removeInputId(l.value),!(o!=null&&o.value)&&!$&&k&&t.addInputId(k)),l.value=k)},{immediate:true})}),gn(()=>{i&&i(),t!=null&&t.removeInputId&&l.value&&t.removeInputId(l.value)}),{isLabeledByFormItem:f,inputId:l}},ba=e=>{const t=Ye();return E(()=>{var n,o;return(o=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:o[e]})},ya=(e,t={})=>{const n=N(void 0),o=t.prop?n:ba("size"),a=t.global?n:wl(),r=t.form?{size:void 0}:Ae(Jn,void 0),l=t.formItem?{size:void 0}:Ae(ha,void 0);return E(()=>o.value||s(e)||(l==null?void 0:l.size)||(r==null?void 0:r.size)||a.value||"")},Qn=e=>{const t=ba("disabled"),n=Ae(Jn,void 0);return E(()=>{var o,a,r;return(r=(a=(o=t.value)!=null?o:s(e))!=null?a:n==null?void 0:n.disabled)!=null?r:false})},Xl='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',ko=e=>typeof Element>"u"?false:e instanceof Element,Zl=e=>getComputedStyle(e).position==="fixed"?false:e.offsetParent!==null,Eo=e=>Array.from(e.querySelectorAll(Xl)).filter(t=>eo(t)&&Zl(t)),eo=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return true;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return false;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return true;default:return false}},Jl=(e,t)=>{if(!e||!e.focus)return;let n=false;ko(e)&&!eo(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),n=true),e.focus(t),ko(e)&&n&&e.removeAttribute("tabindex")};function Ql(e,{disabled:t,beforeFocus:n,afterFocus:o,beforeBlur:a,afterBlur:r}={}){const l=Ye(),{emit:i}=l,f=an(),c=N(false),$=d=>{const m=ot(n)?n(d):false;s(t)||c.value||m||(c.value=true,i("focus",d),o==null||o())},k=d=>{var m;const u=ot(a)?a(d):false;s(t)||d.relatedTarget&&((m=f.value)!=null&&m.contains(d.relatedTarget))||u||(c.value=false,i("blur",d),r==null||r())},z=d=>{var m,u;s(t)||eo(d.target)||(m=f.value)!=null&&m.contains(document.activeElement)&&f.value!==document.activeElement||(u=e.value)==null||u.focus()};return Me([f,()=>s(t)],([d,m])=>{d&&(m?d.removeAttribute("tabindex"):d.setAttribute("tabindex","-1"))}),sn(f,"focus",$,true),sn(f,"blur",k,true),sn(f,"click",z,true),{isFocused:c,wrapperRef:f,handleFocus:$,handleBlur:k}}const ei=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);function ti({afterComposition:e,emit:t}){const n=N(false),o=i=>{t==null||t("compositionstart",i),n.value=true},a=i=>{var f;t==null||t("compositionupdate",i);const c=(f=i.target)==null?void 0:f.value,$=c[c.length-1]||"";n.value=!ei($)},r=i=>{t==null||t("compositionend",i),n.value&&(n.value=false,fe(()=>e(i)))};return{isComposing:n,handleComposition:i=>{i.type==="compositionend"?r(i):a(i)},handleCompositionStart:o,handleCompositionUpdate:a,handleCompositionEnd:r}}function ni(e){let t;function n(){if(e.value==null)return;const{selectionStart:a,selectionEnd:r,value:l}=e.value;if(a==null||r==null)return;const i=l.slice(0,Math.max(0,a)),f=l.slice(Math.max(0,r));t={selectionStart:a,selectionEnd:r,value:l,beforeTxt:i,afterTxt:f}}function o(){if(e.value==null||t==null)return;const{value:a}=e.value,{beforeTxt:r,afterTxt:l,selectionStart:i}=t;if(r==null||l==null||i==null)return;let f=a.length;if(a.endsWith(l))f=a.length-l.length;else if(a.startsWith(r))f=r.length;else{const c=r[i-1],$=a.indexOf(c,i-1);$!==-1&&(f=$+1)}e.value.setSelectionRange(f,f)}return[n,o]}const oi=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],ai=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role"],si="ElInput",ri=ee({name:si,inheritAttrs:false,__name:"input",props:Hl,emits:Ul,setup(e,{expose:t,emit:n}){const o=e,a=n,r=Ta(),l=ql(),i=Vo(),f=E(()=>[o.type==="textarea"?L.b():u.b(),u.m(d.value),u.is("disabled",m.value),u.is("exceed",Ve.value),{[u.b("group")]:i.prepend||i.append,[u.m("prefix")]:i.prefix||o.prefixIcon,[u.m("suffix")]:i.suffix||o.suffixIcon||o.clearable||o.showPassword,[u.bm("suffix","password-clear")]:me.value&&_e.value,[u.b("hidden")]:o.type==="hidden"},r.class]),c=E(()=>[u.e("wrapper"),u.is("focus",A.value)]),{form:$,formItem:k}=ga(),{inputId:z}=Yl(o,{formItemContext:k}),d=ya(),m=Qn(),u=Xe("input"),L=Xe("textarea"),_=an(),C=an(),F=N(false),ae=N(false),U=N(),I=an(o.inputStyle),w=E(()=>_.value||C.value),{wrapperRef:j,isFocused:A,handleFocus:X,handleBlur:te}=Ql(w,{disabled:m,afterBlur(){var g;o.validateEvent&&((g=k==null?void 0:k.validate)==null||g.call(k,"blur").catch(P=>void 0))}}),q=E(()=>{var g;return(g=$==null?void 0:$.statusIcon)!=null?g:false}),B=E(()=>(k==null?void 0:k.validateState)||""),pe=E(()=>B.value&&Pl[B.value]),xe=E(()=>ae.value?cs:Qa),rt=E(()=>[r.style]),oe=E(()=>[o.inputStyle,I.value,{resize:o.resize}]),ce=E(()=>oa(o.modelValue)?"":String(o.modelValue)),me=E(()=>o.clearable&&!m.value&&!o.readonly&&!!ce.value&&(A.value||F.value)),_e=E(()=>o.showPassword&&!m.value&&!!ce.value),ze=E(()=>o.showWordLimit&&!!o.maxlength&&(o.type==="text"||o.type==="textarea")&&!m.value&&!o.readonly&&!o.showPassword),Je=E(()=>ce.value.length),Ve=E(()=>!!ze.value&&Je.value>Number(o.maxlength)),It=E(()=>!!i.suffix||!!o.suffixIcon||me.value||o.showPassword||ze.value||!!B.value&&q.value),Mt=E(()=>!!Object.keys(o.modelModifiers).length),[Tt,lt]=ni(_);Fo(C,g=>{if(Vt(),!ze.value||o.resize!=="both"&&o.resize!=="horizontal")return;const P=g[0],{width:G}=P.contentRect;U.value={right:`calc(100% - ${G+22-10}px)`}});const Qe=()=>{const{type:g,autosize:P}=o;if(!(!je||g!=="textarea"||!C.value))if(P){const G=Ot(P)?P.minRows:void 0,Q=Ot(P)?P.maxRows:void 0,ve=_o(C.value,G,Q);I.value={overflowY:"hidden",...ve},fe(()=>{C.value.offsetHeight,I.value=ve})}else I.value={minHeight:_o(C.value).minHeight}},Vt=(g=>{let P=false;return()=>{var G;if(P||!o.autosize)return;((G=C.value)==null?void 0:G.offsetParent)===null||(setTimeout(g),P=true)}})(Qe),De=()=>{const g=w.value,P=o.formatter?o.formatter(ce.value):ce.value;!g||g.value===P||o.type==="file"||(g.value=P)},Ke=g=>{const{trim:P,number:G}=o.modelModifiers;return P&&(g=g.trim()),G&&(g=`${xo(g)}`),o.formatter&&o.parser&&(g=o.parser(g)),g},it=async g=>{if(Lt.value)return;const{lazy:P}=o.modelModifiers;let{value:G}=g.target;if(P){a(In,G);return}if(G=Ke(G),String(G)===ce.value){o.formatter&&De();return}Tt(),a(ln,G),a(In,G),await fe(),(o.formatter&&o.parser||!Mt.value)&&De(),lt()},Pe=async g=>{let{value:P}=g.target;P=Ke(P),o.modelModifiers.lazy&&a(ln,P),a(wo,P,g),await fe(),De()},{isComposing:Lt,handleCompositionStart:ut,handleCompositionUpdate:et,handleCompositionEnd:Ce}=ti({emit:a,afterComposition:it}),tt=()=>{ae.value=!ae.value},Dt=()=>{var g;return(g=w.value)==null?void 0:g.focus()},$t=()=>{var g;return(g=w.value)==null?void 0:g.blur()},J=g=>{F.value=false,a("mouseleave",g)},y=g=>{F.value=true,a("mouseenter",g)},be=g=>{a("keydown",g)},le=()=>{var g;(g=w.value)==null||g.select()},ke=()=>{a(ln,""),a(wo,""),a("clear"),a(In,"")};return Me(()=>o.modelValue,()=>{var g;fe(()=>Qe()),o.validateEvent&&((g=k==null?void 0:k.validate)==null||g.call(k,"change").catch(P=>void 0))}),Me(ce,g=>{if(!w.value)return;const{trim:P,number:G}=o.modelModifiers,Q=w.value.value,ve=(G||o.type==="number")&&!/^0\d/.test(Q)?`${xo(Q)}`:Q;ve!==g&&(document.activeElement===w.value&&w.value.type!=="range"&&P&&ve.trim()===g||De())}),Me(()=>o.type,async()=>{await fe(),De(),Qe()}),Ze(()=>{!o.formatter&&o.parser,De(),fe(Qe)}),t({input:_,textarea:C,ref:w,textareaStyle:oe,autosize:dn(o,"autosize"),isComposing:Lt,focus:Dt,blur:$t,select:le,clear:ke,resizeTextarea:Qe}),(g,P)=>(p(),T("div",{class:D([f.value,{[s(u).bm("group","append")]:g.$slots.append,[s(u).bm("group","prepend")]:g.$slots.prepend}]),style:He(rt.value),onMouseenter:y,onMouseleave:J},[V(" input "),g.type!=="textarea"?(p(),T(he,{key:0},[V(" prepend slot "),g.$slots.prepend?(p(),T("div",{key:0,class:D(s(u).be("group","prepend"))},[ye(g.$slots,"prepend")],2)):V("v-if",true),h("div",{ref_key:"wrapperRef",ref:j,class:D(c.value)},[V(" prefix slot "),g.$slots.prefix||g.prefixIcon?(p(),T("span",{key:0,class:D(s(u).e("prefix"))},[h("span",{class:D(s(u).e("prefix-inner"))},[ye(g.$slots,"prefix"),g.prefixIcon?(p(),K(s(Ge),{key:0,class:D(s(u).e("icon"))},{default:M(()=>[(p(),K(Be(g.prefixIcon)))]),_:1},8,["class"])):V("v-if",true)],2)],2)):V("v-if",true),h("input",cn({id:s(z),ref_key:"input",ref:_,class:s(u).e("inner")},s(l),{name:g.name,minlength:g.minlength,maxlength:g.maxlength,type:g.showPassword?ae.value?"text":"password":g.type,disabled:s(m),readonly:g.readonly,autocomplete:g.autocomplete,tabindex:g.tabindex,"aria-label":g.ariaLabel,placeholder:g.placeholder,style:g.inputStyle,form:g.form,autofocus:g.autofocus,role:g.containerRole,inputmode:g.inputmode,onCompositionstart:P[0]||(P[0]=(...G)=>s(ut)&&s(ut)(...G)),onCompositionupdate:P[1]||(P[1]=(...G)=>s(et)&&s(et)(...G)),onCompositionend:P[2]||(P[2]=(...G)=>s(Ce)&&s(Ce)(...G)),onInput:it,onChange:Pe,onKeydown:be}),null,16,oi),V(" suffix slot "),It.value?(p(),T("span",{key:1,class:D(s(u).e("suffix"))},[h("span",{class:D(s(u).e("suffix-inner"))},[!me.value||!_e.value||!ze.value?(p(),T(he,{key:0},[ye(g.$slots,"suffix"),g.suffixIcon?(p(),K(s(Ge),{key:0,class:D(s(u).e("icon"))},{default:M(()=>[(p(),K(Be(g.suffixIcon)))]),_:1},8,["class"])):V("v-if",true)],64)):V("v-if",true),me.value?(p(),K(s(Ge),{key:1,class:D([s(u).e("icon"),s(u).e("clear")]),onMousedown:Te(s(Ct),["prevent"]),onClick:ke},{default:M(()=>[(p(),K(Be(g.clearIcon)))]),_:1},8,["class","onMousedown"])):V("v-if",true),_e.value?(p(),K(s(Ge),{key:2,class:D([s(u).e("icon"),s(u).e("password")]),onClick:tt,onMousedown:Te(s(Ct),["prevent"]),onMouseup:Te(s(Ct),["prevent"])},{default:M(()=>[(p(),K(Be(xe.value)))]),_:1},8,["class","onMousedown","onMouseup"])):V("v-if",true),ze.value?(p(),T("span",{key:3,class:D([s(u).e("count"),s(u).is("outside",g.wordLimitPosition==="outside")])},[h("span",{class:D(s(u).e("count-inner"))},W(Je.value)+" / "+W(g.maxlength),3)],2)):V("v-if",true),B.value&&pe.value&&q.value?(p(),K(s(Ge),{key:4,class:D([s(u).e("icon"),s(u).e("validateIcon"),s(u).is("loading",B.value==="validating")])},{default:M(()=>[(p(),K(Be(pe.value)))]),_:1},8,["class"])):V("v-if",true)],2)],2)):V("v-if",true)],2),V(" append slot "),g.$slots.append?(p(),T("div",{key:1,class:D(s(u).be("group","append"))},[ye(g.$slots,"append")],2)):V("v-if",true)],64)):(p(),T(he,{key:1},[V(" textarea "),h("textarea",cn({id:s(z),ref_key:"textarea",ref:C,class:[s(L).e("inner"),s(u).is("focus",s(A))]},s(l),{name:g.name,minlength:g.minlength,maxlength:g.maxlength,tabindex:g.tabindex,disabled:s(m),readonly:g.readonly,autocomplete:g.autocomplete,style:oe.value,"aria-label":g.ariaLabel,placeholder:g.placeholder,form:g.form,autofocus:g.autofocus,rows:g.rows,role:g.containerRole,onCompositionstart:P[3]||(P[3]=(...G)=>s(ut)&&s(ut)(...G)),onCompositionupdate:P[4]||(P[4]=(...G)=>s(et)&&s(et)(...G)),onCompositionend:P[5]||(P[5]=(...G)=>s(Ce)&&s(Ce)(...G)),onInput:it,onFocus:P[6]||(P[6]=(...G)=>s(X)&&s(X)(...G)),onBlur:P[7]||(P[7]=(...G)=>s(te)&&s(te)(...G)),onChange:Pe,onKeydown:be}),null,16,ai),ze.value?(p(),T("span",{key:0,style:He(U.value),class:D([s(u).e("count"),s(u).is("outside",g.wordLimitPosition==="outside")])},W(Je.value)+" / "+W(g.maxlength),7)):V("v-if",true)],64))],38))}});var li=gt(ri,[["__file","/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]);const ii=_n(li),Mn="focus-trap.focus-after-trapped",Tn="focus-trap.focus-after-released",ui="focus-trap.focusout-prevented",So={cancelable:true,bubbles:false},ci={cancelable:true,bubbles:false},Io="focusAfterTrapped",Mo="focusAfterReleased",di=Symbol("elFocusTrap"),to=N(),Cn=N(0),no=N(0);let Qt=0;const wa=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0||o===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},To=(e,t)=>{for(const n of e)if(!fi(n,t))return n},fi=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return true;for(;e;){if(t&&e===t)return false;if(getComputedStyle(e).display==="none")return true;e=e.parentElement}return false},pi=e=>{const t=wa(e),n=To(t,e),o=To(t.reverse(),e);return[n,o]},vi=e=>e instanceof HTMLInputElement&&"select"in e,dt=(e,t)=>{if(e){const n=document.activeElement;Jl(e,{preventScroll:true}),no.value=window.performance.now(),e!==n&&vi(e)&&t&&e.select()}};function Lo(e,t){const n=[...e],o=e.indexOf(t);return o!==-1&&n.splice(o,1),n}const mi=()=>{let e=[];return{push:o=>{const a=e[0];a&&o!==a&&a.pause(),e=Lo(e,o),e.unshift(o)},remove:o=>{var a,r;e=Lo(e,o),(r=(a=e[0])==null?void 0:a.resume)==null||r.call(a)}}},hi=(e,t=false)=>{const n=document.activeElement;for(const o of e)if(dt(o,t),document.activeElement!==n)return},$o=mi(),gi=()=>Cn.value>no.value,en=()=>{to.value="pointer",Cn.value=window.performance.now()},Bo=()=>{to.value="keyboard",Cn.value=window.performance.now()},bi=()=>(Ze(()=>{Qt===0&&(document.addEventListener("mousedown",en),document.addEventListener("touchstart",en),document.addEventListener("keydown",Bo)),Qt++}),Gt(()=>{Qt--,Qt<=0&&(document.removeEventListener("mousedown",en),document.removeEventListener("touchstart",en),document.removeEventListener("keydown",Bo))}),{focusReason:to,lastUserFocusTimestamp:Cn,lastAutomatedFocusTimestamp:no}),tn=e=>new CustomEvent(ui,{...ci,detail:e}),Nt={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},kn=e=>{if(e.code&&e.code!=="Unidentified")return e.code;const t=yi(e);if(t){if(Object.values(Nt).includes(t))return t;switch(t){case" ":return Nt.space;default:return""}}return""},yi=e=>{let t=e.key&&e.key!=="Unidentified"?e.key:"";if(!t&&e.type==="keyup"&&Nl()){const n=e.target;t=n.value.charAt(n.selectionStart-1)}return t};let Bt=[];const Ao=e=>{kn(e)===Nt.esc&&Bt.forEach(n=>n(e))},wi=e=>{Ze(()=>{Bt.length===0&&document.addEventListener("keydown",Ao),je&&Bt.push(e)}),Gt(()=>{Bt=Bt.filter(t=>t!==e),Bt.length===0&&je&&document.removeEventListener("keydown",Ao)})},xi=ee({name:"ElFocusTrap",inheritAttrs:false,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Io,Mo,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=N();let o,a;const{focusReason:r}=bi();wi(m=>{e.trapped&&!l.paused&&t("release-requested",m)});const l={paused:false,pause(){this.paused=true},resume(){this.paused=false}},i=m=>{if(!e.loop&&!e.trapped||l.paused)return;const{altKey:u,ctrlKey:L,metaKey:_,currentTarget:C,shiftKey:F}=m,{loop:ae}=e,I=kn(m)===Nt.tab&&!u&&!L&&!_,w=document.activeElement;if(I&&w){const j=C,[A,X]=pi(j);if(A&&X){if(!F&&w===X){const q=tn({focusReason:r.value});t("focusout-prevented",q),q.defaultPrevented||(m.preventDefault(),ae&&dt(A,true))}else if(F&&[A,j].includes(w)){const q=tn({focusReason:r.value});t("focusout-prevented",q),q.defaultPrevented||(m.preventDefault(),ae&&dt(X,true))}}else if(w===j){const q=tn({focusReason:r.value});t("focusout-prevented",q),q.defaultPrevented||m.preventDefault()}}};Dn(di,{focusTrapRef:n,onKeydown:i}),Me(()=>e.focusTrapEl,m=>{m&&(n.value=m)},{immediate:true}),Me([n],([m],[u])=>{m&&(m.addEventListener("keydown",i),m.addEventListener("focusin",$),m.addEventListener("focusout",k)),u&&(u.removeEventListener("keydown",i),u.removeEventListener("focusin",$),u.removeEventListener("focusout",k))});const f=m=>{t(Io,m)},c=m=>t(Mo,m),$=m=>{const u=s(n);if(!u)return;const L=m.target,_=m.relatedTarget,C=L&&u.contains(L);e.trapped||_&&u.contains(_)||(o=_),C&&t("focusin",m),!l.paused&&e.trapped&&(C?a=L:dt(a,true))},k=m=>{const u=s(n);if(!(l.paused||!u))if(e.trapped){const L=m.relatedTarget;!oa(L)&&!u.contains(L)&&setTimeout(()=>{if(!l.paused&&e.trapped){const _=tn({focusReason:r.value});t("focusout-prevented",_),_.defaultPrevented||dt(a,true)}},0)}else{const L=m.target;L&&u.contains(L)||t("focusout",m)}};async function z(){await fe();const m=s(n);if(m){$o.push(l);const u=m.contains(document.activeElement)?o:document.activeElement;if(o=u,!m.contains(u)){const _=new Event(Mn,So);m.addEventListener(Mn,f),m.dispatchEvent(_),_.defaultPrevented||fe(()=>{let C=e.focusStartEl;Re(C)||(dt(C),document.activeElement!==C&&(C="first")),C==="first"&&hi(wa(m),true),(document.activeElement===u||C==="container")&&dt(m)})}}}function d(){const m=s(n);if(m){m.removeEventListener(Mn,f);const u=new CustomEvent(Tn,{...So,detail:{focusReason:r.value}});m.addEventListener(Tn,c),m.dispatchEvent(u),!u.defaultPrevented&&(r.value=="keyboard"||!gi()||m.contains(document.activeElement))&&dt(o??document.body),m.removeEventListener(Tn,c),$o.remove(l),o=null,a=null}}return Ze(()=>{e.trapped&&z(),Me(()=>e.trapped,m=>{m?z():d()})}),Gt(()=>{e.trapped&&d(),n.value&&(n.value.removeEventListener("keydown",i),n.value.removeEventListener("focusin",$),n.value.removeEventListener("focusout",k),n.value=void 0),o=null,a=null}),{onKeydown:i}}});function _i(e,t,n,o,a,r){return ye(e.$slots,"default",{handleKeydown:e.onKeydown})}var Ci=gt(xi,[["render",_i],["__file","/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);const ki=st({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:true},color:String,badgeStyle:{type:de([String,Object,Array])},offset:{type:de(Array),default:[0,0]},badgeClass:{type:String}}),Ei=ee({name:"ElBadge",__name:"badge",props:ki,setup(e,{expose:t}){const n=e,o=Xe("badge"),a=E(()=>n.isDot?"":at(n.value)&&at(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`),r=E(()=>{var l;return[{backgroundColor:n.color,marginRight:Kt(-n.offset[0]),marginTop:Kt(n.offset[1])},(l=n.badgeStyle)!=null?l:{}]});return t({content:a}),(l,i)=>(p(),T("div",{class:D(s(o).b())},[ye(l.$slots,"default"),S(Fn,{name:`${s(o).namespace.value}-zoom-in-center`,persisted:""},{default:M(()=>[vt(h("sup",{class:D([s(o).e("content"),s(o).em("content",l.type),s(o).is("fixed",!!l.$slots.default),s(o).is("dot",l.isDot),s(o).is("hide-zero",!l.showZero&&l.value===0),l.badgeClass]),style:He(r.value)},[ye(l.$slots,"content",{value:a.value},()=>[ne(W(a.value),1)])],6),[[mt,!l.hidden&&(a.value||l.isDot||l.$slots.content)]])]),_:3},8,["name"])],2))}});var Si=gt(Ei,[["__file","/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);const Ii=_n(Si),xa=Symbol("buttonGroupContextKey"),Mi=({from:e,replacement:t,scope:n,version:o,ref:a,type:r="API"},l)=>{Me(()=>s(l),i=>{},{immediate:true})},Ti=(e,t)=>{Mi({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},E(()=>e.type==="text"));const n=Ae(xa,void 0),o=Zn("button"),{form:a}=ga(),r=ya(E(()=>n==null?void 0:n.size)),l=Qn(),i=N(),f=Vo(),c=E(()=>{var _;return e.type||(n==null?void 0:n.type)||((_=o.value)==null?void 0:_.type)||""}),$=E(()=>{var _,C,F;return(F=(C=e.autoInsertSpace)!=null?C:(_=o.value)==null?void 0:_.autoInsertSpace)!=null?F:false}),k=E(()=>{var _,C,F;return(F=(C=e.plain)!=null?C:(_=o.value)==null?void 0:_.plain)!=null?F:false}),z=E(()=>{var _,C,F;return(F=(C=e.round)!=null?C:(_=o.value)==null?void 0:_.round)!=null?F:false}),d=E(()=>{var _,C,F;return(F=(C=e.text)!=null?C:(_=o.value)==null?void 0:_.text)!=null?F:false}),m=E(()=>e.tag==="button"?{ariaDisabled:l.value||e.loading,disabled:l.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),u=E(()=>{var _;const C=(_=f.default)==null?void 0:_.call(f);if($.value&&(C==null?void 0:C.length)===1){const F=C[0];if((F==null?void 0:F.type)===La){const ae=F.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(ae.trim())}}return false});return{_disabled:l,_size:r,_type:c,_ref:i,_props:m,_plain:k,_round:z,_text:d,shouldAddSpace:u,handleClick:_=>{if(l.value||e.loading){_.stopPropagation();return}e.nativeType==="reset"&&(a==null||a.resetFields()),t("click",_)}}},Li=["default","primary","success","warning","info","danger","text",""],$i=["button","submit","reset"],zn=st({size:Xn,disabled:{type:Boolean,default:void 0},type:{type:String,values:Li,default:""},icon:{type:Pt},nativeType:{type:String,values:$i,default:"button"},loading:Boolean,loadingIcon:{type:Pt,default:()=>_t},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:de([String,Object]),default:"button"}}),Bi={click:e=>e instanceof MouseEvent};function we(e,t){Ai(e)&&(e="100%");var n=Pi(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function nn(e){return Math.min(1,Math.max(0,e))}function Ai(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Pi(e){return typeof e=="string"&&e.indexOf("%")!==-1}function _a(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function on(e){return e<=1?"".concat(Number(e)*100,"%"):e}function wt(e){return e.length===1?"0"+e:String(e)}function Oi(e,t,n){return{r:we(e,255)*255,g:we(t,255)*255,b:we(n,255)*255}}function Po(e,t,n){e=we(e,255),t=we(t,255),n=we(n,255);var o=Math.max(e,t,n),a=Math.min(e,t,n),r=0,l=0,i=(o+a)/2;if(o===a)l=0,r=0;else{var f=o-a;switch(l=i>.5?f/(2-o-a):f/(o+a),o){case e:r=(t-n)/f+(t<n?6:0);break;case t:r=(n-e)/f+2;break;case n:r=(e-t)/f+4;break}r/=6}return{h:r,s:l,l:i}}function Ln(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ni(e,t,n){var o,a,r;if(e=we(e,360),t=we(t,100),n=we(n,100),t===0)a=n,r=n,o=n;else{var l=n<.5?n*(1+t):n+t-n*t,i=2*n-l;o=Ln(i,l,e+1/3),a=Ln(i,l,e),r=Ln(i,l,e-1/3)}return{r:o*255,g:a*255,b:r*255}}function Oo(e,t,n){e=we(e,255),t=we(t,255),n=we(n,255);var o=Math.max(e,t,n),a=Math.min(e,t,n),r=0,l=o,i=o-a,f=o===0?0:i/o;if(o===a)r=0;else{switch(o){case e:r=(t-n)/i+(t<n?6:0);break;case t:r=(n-e)/i+2;break;case n:r=(e-t)/i+4;break}r/=6}return{h:r,s:f,v:l}}function zi(e,t,n){e=we(e,360)*6,t=we(t,100),n=we(n,100);var o=Math.floor(e),a=e-o,r=n*(1-t),l=n*(1-a*t),i=n*(1-(1-a)*t),f=o%6,c=[n,l,r,r,i,n][f],$=[i,n,n,l,r,r][f],k=[r,r,i,n,n,l][f];return{r:c*255,g:$*255,b:k*255}}function No(e,t,n,o){var a=[wt(Math.round(e).toString(16)),wt(Math.round(t).toString(16)),wt(Math.round(n).toString(16))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Ri(e,t,n,o,a){var r=[wt(Math.round(e).toString(16)),wt(Math.round(t).toString(16)),wt(Math.round(n).toString(16)),wt(Vi(o))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))&&r[3].startsWith(r[3].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0)+r[3].charAt(0):r.join("")}function Vi(e){return Math.round(parseFloat(e)*255).toString(16)}function zo(e){return Ne(e)/255}function Ne(e){return parseInt(e,16)}function Di(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Rn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Fi(e){var t={r:0,g:0,b:0},n=1,o=null,a=null,r=null,l=false,i=false;return typeof e=="string"&&(e=ji(e)),typeof e=="object"&&(nt(e.r)&&nt(e.g)&&nt(e.b)?(t=Oi(e.r,e.g,e.b),l=true,i=String(e.r).substr(-1)==="%"?"prgb":"rgb"):nt(e.h)&&nt(e.s)&&nt(e.v)?(o=on(e.s),a=on(e.v),t=zi(e.h,o,a),l=true,i="hsv"):nt(e.h)&&nt(e.s)&&nt(e.l)&&(o=on(e.s),r=on(e.l),t=Ni(e.h,o,r),l=true,i="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=_a(n),{ok:l,format:e.format||i,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Hi="[-\\+]?\\d+%?",Ui="[-\\+]?\\d*\\.\\d+%?",pt="(?:".concat(Ui,")|(?:").concat(Hi,")"),$n="[\\s|\\(]+(".concat(pt,")[,|\\s]+(").concat(pt,")[,|\\s]+(").concat(pt,")\\s*\\)?"),Bn="[\\s|\\(]+(".concat(pt,")[,|\\s]+(").concat(pt,")[,|\\s]+(").concat(pt,")[,|\\s]+(").concat(pt,")\\s*\\)?"),Fe={CSS_UNIT:new RegExp(pt),rgb:new RegExp("rgb"+$n),rgba:new RegExp("rgba"+Bn),hsl:new RegExp("hsl"+$n),hsla:new RegExp("hsla"+Bn),hsv:new RegExp("hsv"+$n),hsva:new RegExp("hsva"+Bn),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ji(e){if(e=e.trim().toLowerCase(),e.length===0)return false;var t=false;if(Rn[e])e=Rn[e],t=true;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Fe.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Fe.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Fe.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Fe.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Fe.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Fe.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Fe.hex8.exec(e),n?{r:Ne(n[1]),g:Ne(n[2]),b:Ne(n[3]),a:zo(n[4]),format:t?"name":"hex8"}:(n=Fe.hex6.exec(e),n?{r:Ne(n[1]),g:Ne(n[2]),b:Ne(n[3]),format:t?"name":"hex"}:(n=Fe.hex4.exec(e),n?{r:Ne(n[1]+n[1]),g:Ne(n[2]+n[2]),b:Ne(n[3]+n[3]),a:zo(n[4]+n[4]),format:t?"name":"hex8"}:(n=Fe.hex3.exec(e),n?{r:Ne(n[1]+n[1]),g:Ne(n[2]+n[2]),b:Ne(n[3]+n[3]),format:t?"name":"hex"}:false)))))))))}function nt(e){return!!Fe.CSS_UNIT.exec(String(e))}var Ki=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var o;if(t instanceof e)return t;typeof t=="number"&&(t=Di(t)),this.originalInput=t;var a=Fi(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(o=n.format)!==null&&o!==void 0?o:a.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,o,a,r=t.r/255,l=t.g/255,i=t.b/255;return r<=.03928?n=r/12.92:n=Math.pow((r+.055)/1.055,2.4),l<=.03928?o=l/12.92:o=Math.pow((l+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),.2126*n+.7152*o+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=_a(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Oo(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Oo(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),a=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(o,"%, ").concat(a,"%)"):"hsva(".concat(n,", ").concat(o,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Po(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Po(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),a=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(o,"%, ").concat(a,"%)"):"hsla(".concat(n,", ").concat(o,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=false),No(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=false),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=false),Ri(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=false),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=false),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),o=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(o,")"):"rgba(".concat(t,", ").concat(n,", ").concat(o,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(we(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(we(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return false;for(var t="#"+No(this.r,this.g,this.b,false),n=0,o=Object.entries(Rn);n<o.length;n++){var a=o[n],r=a[0],l=a[1];if(t===l)return r}return false},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var o=false,a=this.a<1&&this.a>=0,r=!n&&a&&(t.startsWith("hex")||t==="name");return r?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(true)),t==="hex4"&&(o=this.toHex8String(true)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=nn(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=nn(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=nn(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=nn(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var o=this.toRgb(),a=new e(t).toRgb(),r=n/100,l={r:(a.r-o.r)*r+o.r,g:(a.g-o.g)*r+o.g,b:(a.b-o.b)*r+o.b,a:(a.a-o.a)*r+o.a};return new e(l)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var o=this.toHsl(),a=360/n,r=[this];for(o.h=(o.h-(a*t>>1)+720)%360;--t;)o.h=(o.h+a)%360,r.push(new e(o));return r},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),o=n.h,a=n.s,r=n.v,l=[],i=1/t;t--;)l.push(new e({h:o,s:a,v:r})),r=(r+i)%1;return l},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),o=new e(t).toRgb(),a=n.a+o.a*(1-n.a);return new e({r:(n.r*n.a+o.r*o.a*(1-n.a))/a,g:(n.g*n.a+o.g*o.a*(1-n.a))/a,b:(n.b*n.a+o.b*o.a*(1-n.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),o=n.h,a=[this],r=360/t,l=1;l<t;l++)a.push(new e({h:(o+l*r)%360,s:n.s,l:n.l}));return a},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function ct(e,t=20){return e.mix("#141414",t).toString()}function qi(e){const t=Qn(),n=Xe("button");return E(()=>{let o={},a=e.color;if(a){const r=a.match(/var\((.*?)\)/);r&&(a=window.getComputedStyle(window.document.documentElement).getPropertyValue(r[1]));const l=new Ki(a),i=e.dark?l.tint(20).toString():ct(l,20);if(e.plain)o=n.cssVarBlock({"bg-color":e.dark?ct(l,90):l.tint(90).toString(),"text-color":a,"border-color":e.dark?ct(l,50):l.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":a,"hover-border-color":a,"active-bg-color":i,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":i}),t.value&&(o[n.cssVarBlockName("disabled-bg-color")]=e.dark?ct(l,90):l.tint(90).toString(),o[n.cssVarBlockName("disabled-text-color")]=e.dark?ct(l,50):l.tint(50).toString(),o[n.cssVarBlockName("disabled-border-color")]=e.dark?ct(l,80):l.tint(80).toString());else{const f=e.dark?ct(l,30):l.tint(30).toString(),c=l.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(o=n.cssVarBlock({"bg-color":a,"text-color":c,"border-color":a,"hover-bg-color":f,"hover-text-color":c,"hover-border-color":f,"active-bg-color":i,"active-border-color":i}),t.value){const $=e.dark?ct(l,50):l.tint(50).toString();o[n.cssVarBlockName("disabled-bg-color")]=$,o[n.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,o[n.cssVarBlockName("disabled-border-color")]=$}}}return o})}const Wi=ee({name:"ElButton",__name:"button",props:zn,emits:Bi,setup(e,{expose:t,emit:n}){const o=e,a=n,r=qi(o),l=Xe("button"),{_ref:i,_size:f,_type:c,_disabled:$,_props:k,_plain:z,_round:d,_text:m,shouldAddSpace:u,handleClick:L}=Ti(o,a),_=E(()=>[l.b(),l.m(c.value),l.m(f.value),l.is("disabled",$.value),l.is("loading",o.loading),l.is("plain",z.value),l.is("round",d.value),l.is("circle",o.circle),l.is("text",m.value),l.is("link",o.link),l.is("has-bg",o.bg)]);return t({ref:i,size:f,type:c,disabled:$,shouldAddSpace:u}),(C,F)=>(p(),K(Be(C.tag),cn({ref_key:"_ref",ref:i},s(k),{class:_.value,style:s(r),onClick:s(L)}),{default:M(()=>[C.loading?(p(),T(he,{key:0},[C.$slots.loading?ye(C.$slots,"loading",{key:0}):(p(),K(s(Ge),{key:1,class:D(s(l).is("loading"))},{default:M(()=>[(p(),K(Be(C.loadingIcon)))]),_:1},8,["class"]))],64)):C.icon||C.$slots.icon?(p(),K(s(Ge),{key:1},{default:M(()=>[C.icon?(p(),K(Be(C.icon),{key:0})):ye(C.$slots,"icon",{key:1})]),_:3})):V("v-if",true),C.$slots.default?(p(),T("span",{key:2,class:D({[s(l).em("text","expand")]:s(u)})},[ye(C.$slots,"default")],2)):V("v-if",true)]),_:3},16,["class","style","onClick"]))}});var Gi=gt(Wi,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);const Yi={size:zn.size,type:zn.type,direction:{type:de(String),values:["horizontal","vertical"],default:"horizontal"}},Xi=ee({name:"ElButtonGroup",__name:"button-group",props:Yi,setup(e){const t=e;Dn(xa,At({size:dn(t,"size"),type:dn(t,"type")}));const n=Xe("button");return(o,a)=>(p(),T("div",{class:D([s(n).b("group"),s(n).bm("group",t.direction)])},[ye(o.$slots,"default")],2))}});var Ca=gt(Xi,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);const Zi=_n(Gi,{ButtonGroup:Ca});El(Ca);var un=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(un||{});const Ji=st({a11y:{type:Boolean,default:true},locale:{type:de(Object)},size:Xn,button:{type:de(Object)},card:{type:de(Object)},dialog:{type:de(Object)},link:{type:de(Object)},experimentalFeatures:{type:de(Object)},keyboardNavigation:{type:Boolean,default:true},message:{type:de(Object)},zIndex:Number,namespace:{type:String,default:"el"},..._l}),Ie={placement:"top"};ee({name:"ElConfigProvider",props:Ji,setup(e,{slots:t}){const n=fa(e);return Me(()=>e.message,o=>{var a,r;Object.assign(Ie,(r=(a=n==null?void 0:n.value)==null?void 0:a.message)!=null?r:{},o??{})},{immediate:true,deep:true}),()=>ye(t,"default",{config:n==null?void 0:n.value})}});const ka=e=>{if(!e)return{onClick:Ct,onMousedown:Ct,onMouseup:Ct};let t=false,n=false;return{onClick:l=>{t&&n&&e(l),t=n=false},onMousedown:l=>{t=l.target===l.currentTarget},onMouseup:l=>{n=l.target===l.currentTarget}}},Qi=st({mask:{type:Boolean,default:true},customMaskEvent:Boolean,overlayClass:{type:de([String,Array,Object])},zIndex:{type:de([String,Number])}}),eu={click:e=>e instanceof MouseEvent},tu="overlay";var nu=ee({name:"ElOverlay",props:Qi,emits:eu,setup(e,{slots:t,emit:n}){const o=Xe(tu),a=f=>{n("click",f)},{onClick:r,onMousedown:l,onMouseup:i}=ka(e.customMaskEvent?void 0:a);return()=>e.mask?S("div",{class:[o.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:r,onMousedown:l,onMouseup:i},[ye(t,"default")],un.STYLE|un.CLASS|un.PROPS,["onClick","onMouseup","onMousedown"]):se("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[ye(t,"default")])}});const ou=nu,au=(e,t,n,o)=>{const a={offsetX:0,offsetY:0},r=N(false),l=(z,d)=>{if(e.value){const{offsetX:m,offsetY:u}=a,L=e.value.getBoundingClientRect(),_=L.left,C=L.top,F=L.width,ae=L.height,U=document.documentElement.clientWidth,I=document.documentElement.clientHeight,w=-_+m,j=-C+u,A=U-_-F+m,X=I-C-(ae<I?ae:0)+u;o!=null&&o.value||(z=Math.min(Math.max(z,w),A),d=Math.min(Math.max(d,j),X)),a.offsetX=z,a.offsetY=d,e.value.style.transform=`translate(${Kt(z)}, ${Kt(d)})`}},i=z=>{const d=z.clientX,m=z.clientY,{offsetX:u,offsetY:L}=a,_=F=>{r.value||(r.value=true);const ae=u+F.clientX-d,U=L+F.clientY-m;l(ae,U)},C=()=>{r.value=false,document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",C)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",C)},f=()=>{t.value&&e.value&&(t.value.addEventListener("mousedown",i),window.addEventListener("resize",k))},c=()=>{t.value&&e.value&&(t.value.removeEventListener("mousedown",i),window.removeEventListener("resize",k))},$=()=>{a.offsetX=0,a.offsetY=0,e.value&&(e.value.style.transform="")},k=()=>{const{offsetX:z,offsetY:d}=a;l(z,d)};return Ze(()=>{$a(()=>{n.value?f():c()})}),Gt(()=>{c()}),{isDragging:r,resetPosition:$,updatePosition:k}},su=(e,t={})=>{yt(e)||fl("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||Xe("popup"),o=E(()=>n.bm("parent","hidden"));let a=0,r=false,l="0";const i=()=>{setTimeout(()=>{typeof document>"u"||r&&document&&(document.body.style.width=l,Ml(document.body,o.value))},200)};Me(e,f=>{if(!f){i();return}r=!Sl(document.body,o.value),r&&(l=document.body.style.width,Il(document.body,o.value)),a=Ll(n.namespace.value);const c=document.documentElement.clientHeight<document.body.scrollHeight,$=Tl(document.body,"overflowY");a>0&&(c||$==="scroll")&&r&&(document.body.style.width=`calc(100% - ${a}px)`)}),Ba(()=>i())},ru=e=>["",...ua].includes(e),Ea=["primary","success","info","warning","error"],Sa=["top","top-left","top-right","bottom","bottom-left","bottom-right"],qt="top",Se=ma({customClass:"",dangerouslyUseHTMLString:false,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:false,type:"info",plain:false,offset:16,placement:void 0,zIndex:0,grouping:false,repeatNum:1,appendTo:je?document.body:void 0}),lu=st({customClass:{type:String,default:Se.customClass},dangerouslyUseHTMLString:{type:Boolean,default:Se.dangerouslyUseHTMLString},duration:{type:Number,default:Se.duration},icon:{type:Pt,default:Se.icon},id:{type:String,default:Se.id},message:{type:de([String,Object,Function]),default:Se.message},onClose:{type:de(Function),default:Se.onClose},showClose:{type:Boolean,default:Se.showClose},type:{type:String,values:Ea,default:Se.type},plain:{type:Boolean,default:Se.plain},offset:{type:Number,default:Se.offset},placement:{type:String,values:Sa,default:Se.placement},zIndex:{type:Number,default:Se.zIndex},grouping:{type:Boolean,default:Se.grouping},repeatNum:{type:Number,default:Se.repeatNum}}),iu={destroy:()=>true},Ue=Do({}),uu=e=>(Ue[e]||(Ue[e]=Do([])),Ue[e]),cu=(e,t)=>{const n=Ue[t]||[],o=n.findIndex(l=>l.id===e),a=n[o];let r;return o>0&&(r=n[o-1]),{current:a,prev:r}},du=(e,t)=>{const{prev:n}=cu(e,t);return n?n.vm.exposed.bottom.value:0},fu=(e,t,n)=>(Ue[n]||[]).findIndex(r=>r.id===e)>0?16:t,pu=["id"],vu=["innerHTML"],mu=ee({name:"ElMessage",__name:"message",props:lu,emits:iu,setup(e,{expose:t,emit:n}){const{Close:o}=va,a=e,r=n,l=N(false),{ns:i,zIndex:f}=da("message"),{currentZIndex:c,nextZIndex:$}=f,k=N(),z=N(false),d=N(0);let m;const u=E(()=>a.type?a.type==="error"?"danger":a.type:"info"),L=E(()=>{const B=a.type;return{[i.bm("icon",B)]:B&&hn[B]}}),_=E(()=>a.icon||hn[a.type]||""),C=E(()=>a.placement||qt),F=E(()=>du(a.id,C.value)),ae=E(()=>fu(a.id,a.offset,C.value)+F.value),U=E(()=>d.value+ae.value),I=E(()=>C.value.includes("left")?i.is("left"):C.value.includes("right")?i.is("right"):i.is("center")),w=E(()=>C.value.startsWith("top")?"top":"bottom"),j=E(()=>({[w.value]:`${ae.value}px`,zIndex:c.value}));function A(){a.duration!==0&&({stop:m}=Na(()=>{te()},a.duration))}function X(){m==null||m()}function te(){z.value=false,fe(()=>{var B;l.value||((B=a.onClose)==null||B.call(a),r("destroy"))})}function q(B){kn(B)===Nt.esc&&te()}return Ze(()=>{A(),$(),z.value=true}),Me(()=>a.repeatNum,()=>{X(),A()}),sn(document,"keydown",q),Fo(k,()=>{d.value=k.value.getBoundingClientRect().height}),t({visible:z,bottom:U,close:te}),(B,pe)=>(p(),K(Fn,{name:s(i).b("fade"),onBeforeEnter:pe[0]||(pe[0]=xe=>l.value=true),onBeforeLeave:B.onClose,onAfterLeave:pe[1]||(pe[1]=xe=>B.$emit("destroy")),persisted:""},{default:M(()=>[vt(h("div",{id:B.id,ref_key:"messageRef",ref:k,class:D([s(i).b(),{[s(i).m(B.type)]:B.type},s(i).is("closable",B.showClose),s(i).is("plain",B.plain),s(i).is("bottom",w.value==="bottom"),I.value,B.customClass]),style:He(j.value),role:"alert",onMouseenter:X,onMouseleave:A},[B.repeatNum>1?(p(),K(s(Ii),{key:0,value:B.repeatNum,type:u.value,class:D(s(i).e("badge"))},null,8,["value","type","class"])):V("v-if",true),_.value?(p(),K(s(Ge),{key:1,class:D([s(i).e("icon"),L.value])},{default:M(()=>[(p(),K(Be(_.value)))]),_:1},8,["class"])):V("v-if",true),ye(B.$slots,"default",{},()=>[B.dangerouslyUseHTMLString?(p(),T(he,{key:1},[V(" Caution here, message could've been compromised, never use user's input as message "),h("p",{class:D(s(i).e("content")),innerHTML:B.message},null,10,vu)],2112)):(p(),T("p",{key:0,class:D(s(i).e("content"))},W(B.message),3))]),B.showClose?(p(),K(s(Ge),{key:2,class:D(s(i).e("closeBtn")),onClick:Te(te,["stop"])},{default:M(()=>[S(s(o))]),_:1},8,["class"])):V("v-if",true)],46,pu),[[mt,z.value]])]),_:3},8,["name","onBeforeLeave"]))}});var hu=gt(mu,[["__file","/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);let gu=1;const bu=e=>{if(!e.appendTo)e.appendTo=document.body;else if(Re(e.appendTo)){let n=document.querySelector(e.appendTo);On(n)||(n=document.body),e.appendTo=n}},yu=e=>{!e.placement&&Re(Ie.placement)&&Ie.placement&&(e.placement=Ie.placement),e.placement||(e.placement=qt),Sa.includes(e.placement)||(e.placement=qt)},Ia=e=>{const t=!e||Re(e)||bn(e)||ot(e)?{message:e}:e,n={...Se,...t};return bu(n),yu(n),Sn(Ie.grouping)&&!n.grouping&&(n.grouping=Ie.grouping),at(Ie.duration)&&n.duration===3e3&&(n.duration=Ie.duration),at(Ie.offset)&&n.offset===16&&(n.offset=Ie.offset),Sn(Ie.showClose)&&!n.showClose&&(n.showClose=Ie.showClose),Sn(Ie.plain)&&!n.plain&&(n.plain=Ie.plain),n},wu=e=>{const t=e.props.placement||qt,n=Ue[t],o=n.indexOf(e);if(o===-1)return;n.splice(o,1);const{handler:a}=e;a.close()},xu=({appendTo:e,...t},n)=>{const o=`message_${gu++}`,a=t.onClose,r=document.createElement("div"),l={...t,id:o,onClose:()=>{a==null||a(),wu($)},onDestroy:()=>{fn(null,r)}},i=S(hu,l,ot(l.message)||bn(l.message)?{default:ot(l.message)?l.message:()=>l.message}:null);i.appContext=n||Et._context,fn(i,r),e.appendChild(r.firstElementChild);const f=i.component,$={id:o,vnode:i,vm:f,handler:{close:()=>{f.exposed.close()}},props:i.component.props};return $},Et=(e={},t)=>{if(!je)return{close:()=>{}};const n=Ia(e),o=uu(n.placement||qt);if(n.grouping&&o.length){const r=o.find(({vnode:l})=>{var i;return((i=l.props)==null?void 0:i.message)===n.message});if(r)return r.props.repeatNum+=1,r.props.type=n.type,r.handler}if(at(Ie.max)&&o.length>=Ie.max)return{close:()=>{}};const a=xu(n,t);return o.push(a),a.handler};Ea.forEach(e=>{Et[e]=(t={},n)=>{const o=Ia(t);return Et({...o,type:e},n)}});function _u(e){for(const t in Ue)if(Ut(Ue,t)){const n=[...Ue[t]];for(const o of n)(!e||e===o.props.type)&&o.handler.close()}}function Cu(e){if(!Ue[e])return;[...Ue[e]].forEach(n=>n.handler.close())}Et.closeAll=_u;Et.closeAllByPlacement=Cu;Et._context=null;const We=kl(Et,"$message"),Vn="_trap-focus-children",xt=[],Ro=e=>{if(xt.length===0)return;const t=kn(e),n=xt[xt.length-1][Vn];if(n.length>0&&t===Nt.tab){if(n.length===1){e.preventDefault(),document.activeElement!==n[0]&&n[0].focus();return}const o=e.shiftKey,a=e.target===n[0],r=e.target===n[n.length-1];a&&o&&(e.preventDefault(),n[n.length-1].focus()),r&&!o&&(e.preventDefault(),n[0].focus())}},ku={beforeMount(e){e[Vn]=Eo(e),xt.push(e),xt.length<=1&&document.addEventListener("keydown",Ro)},updated(e){fe(()=>{e[Vn]=Eo(e)})},unmounted(){xt.shift(),xt.length===0&&document.removeEventListener("keydown",Ro)}},Eu=ee({name:"ElMessageBox",directives:{TrapFocus:ku},components:{ElButton:Zi,ElFocusTrap:Ci,ElInput:ii,ElOverlay:ou,ElIcon:Ge,...va},inheritAttrs:false,props:{buttonSize:{type:String,validator:ru},modal:{type:Boolean,default:true},lockScroll:{type:Boolean,default:true},showClose:{type:Boolean,default:true},closeOnClickModal:{type:Boolean,default:true},closeOnPressEscape:{type:Boolean,default:true},closeOnHashChange:{type:Boolean,default:true},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:o,ns:a,size:r}=da("message-box",E(()=>e.buttonSize)),{t:l}=n,{nextZIndex:i}=o,f=N(false),c=At({autofocus:true,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:false,distinguishCancelAndClose:false,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:true,modalClass:"",showCancelButton:false,showConfirmButton:true,type:"",title:void 0,showInput:false,action:"",confirmButtonLoading:false,cancelButtonLoading:false,confirmButtonLoadingIcon:An(_t),cancelButtonLoadingIcon:An(_t),confirmButtonDisabled:false,editorErrorMessage:"",validateError:false,zIndex:i()}),$=E(()=>{const oe=c.type;return{[a.bm("icon",oe)]:oe&&hn[oe]}}),k=Nn(),z=Nn(),d=E(()=>{const oe=c.type;return c.icon||oe&&hn[oe]||""}),m=E(()=>!!c.message),u=N(),L=N(),_=N(),C=N(),F=N(),ae=E(()=>c.confirmButtonClass);Me(()=>c.inputValue,async oe=>{await fe(),e.boxType==="prompt"&&oe&&B()},{immediate:true}),Me(()=>f.value,oe=>{var ce,me;oe&&(e.boxType!=="prompt"&&(c.autofocus?_.value=(me=(ce=F.value)==null?void 0:ce.$el)!=null?me:u.value:_.value=u.value),c.zIndex=i()),e.boxType==="prompt"&&(oe?fe().then(()=>{var _e;C.value&&C.value.$el&&(c.autofocus?_.value=(_e=pe())!=null?_e:u.value:_.value=u.value)}):(c.editorErrorMessage="",c.validateError=false))});const U=E(()=>e.draggable),I=E(()=>e.overflow),{isDragging:w}=au(u,L,U,I);Ze(async()=>{await fe(),e.closeOnHashChange&&window.addEventListener("hashchange",j)}),Gt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",j)});function j(){f.value&&(f.value=false,fe(()=>{c.action&&t("action",c.action)}))}const A=()=>{e.closeOnClickModal&&q(c.distinguishCancelAndClose?"close":"cancel")},X=ka(A),te=oe=>{if(c.inputType!=="textarea")return oe.preventDefault(),q("confirm")},q=oe=>{var ce;e.boxType==="prompt"&&oe==="confirm"&&!B()||(c.action=oe,c.beforeClose?(ce=c.beforeClose)==null||ce.call(c,oe,c,j):j())},B=()=>{if(e.boxType==="prompt"){const oe=c.inputPattern;if(oe&&!oe.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||l("el.messagebox.error"),c.validateError=true,false;const ce=c.inputValidator;if(ot(ce)){const me=ce(c.inputValue);if(me===false)return c.editorErrorMessage=c.inputErrorMessage||l("el.messagebox.error"),c.validateError=true,false;if(Re(me))return c.editorErrorMessage=me,c.validateError=true,false}}return c.editorErrorMessage="",c.validateError=false,true},pe=()=>{var oe,ce;const me=(oe=C.value)==null?void 0:oe.$refs;return(ce=me==null?void 0:me.input)!=null?ce:me==null?void 0:me.textarea},xe=()=>{q("close")},rt=()=>{e.closeOnPressEscape&&xe()};return e.lockScroll&&su(f,{ns:a}),{...Aa(c),ns:a,overlayEvent:X,visible:f,hasMessage:m,typeClass:$,contentId:k,inputId:z,btnSize:r,iconComponent:d,confirmButtonClasses:ae,rootRef:u,focusStartRef:_,headerRef:L,inputRef:C,isDragging:w,confirmRef:F,doClose:j,handleClose:xe,onCloseRequested:rt,handleWrapperClick:A,handleInputEnter:te,handleAction:q,t:l}}}),Su=["aria-label","aria-describedby"],Iu=["aria-label"],Mu=["id"];function Tu(e,t,n,o,a,r){const l=ge("el-icon"),i=ge("el-input"),f=ge("el-button"),c=ge("el-focus-trap"),$=ge("el-overlay");return p(),K(Fn,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=k=>e.$emit("vanish")),persisted:""},{default:M(()=>[vt(S($,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:M(()=>[h("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:D(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...k)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...k)),onMousedown:t[9]||(t[9]=(...k)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...k)),onMouseup:t[10]||(t[10]=(...k)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...k))},[S(c,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:M(()=>[h("div",{ref:"rootRef",class:D([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:He(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Te(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(p(),T("div",{key:0,ref:"headerRef",class:D([e.ns.e("header"),{"show-close":e.showClose}])},[h("div",{class:D(e.ns.e("title"))},[e.iconComponent&&e.center?(p(),K(l,{key:0,class:D([e.ns.e("status"),e.typeClass])},{default:M(()=>[(p(),K(Be(e.iconComponent)))]),_:1},8,["class"])):V("v-if",true),h("span",null,W(e.title),1)],2),e.showClose?(p(),T("button",{key:0,type:"button",class:D(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=k=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=Ht(Te(k=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[S(l,{class:D(e.ns.e("close"))},{default:M(()=>[(p(),K(Be(e.closeIcon||"close")))]),_:1},8,["class"])],42,Iu)):V("v-if",true)],2)):V("v-if",true),h("div",{id:e.contentId,class:D(e.ns.e("content"))},[h("div",{class:D(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(p(),K(l,{key:0,class:D([e.ns.e("status"),e.typeClass])},{default:M(()=>[(p(),K(Be(e.iconComponent)))]),_:1},8,["class"])):V("v-if",true),e.hasMessage?(p(),T("div",{key:1,class:D(e.ns.e("message"))},[ye(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(p(),K(Be(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(p(),K(Be(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:W(e.message)},null,8,["for","textContent"]))])],2)):V("v-if",true)],2),vt(h("div",{class:D(e.ns.e("input"))},[S(i,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=k=>e.inputValue=k),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:D({invalid:e.validateError}),onKeydown:Ht(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),h("div",{class:D(e.ns.e("errormsg")),style:He({visibility:e.editorErrorMessage?"visible":"hidden"})},W(e.editorErrorMessage),7)],2),[[mt,e.showInput]])],10,Mu),h("div",{class:D(e.ns.e("btns"))},[e.showCancelButton?(p(),K(f,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:D([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=k=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=Ht(Te(k=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:M(()=>[ne(W(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size"])):V("v-if",true),vt(S(f,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:D([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=k=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=Ht(Te(k=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:M(()=>[ne(W(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size"]),[[mt,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,Su)]),_:3},8,["z-index","overlay-class","mask"]),[[mt,e.visible]])]),_:3})}var Lu=gt(Eu,[["render",Tu],["__file","/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]);const Wt=new Map,$u=e=>{let t=document.body;return e.appendTo&&(Re(e.appendTo)&&(t=document.querySelector(e.appendTo)),On(e.appendTo)&&(t=e.appendTo),On(t)||(t=document.body)),t},Bu=(e,t,n=null)=>{const o=S(Lu,e,ot(e.message)||bn(e.message)?{default:ot(e.message)?e.message:()=>e.message}:null);return o.appContext=n,fn(o,t),$u(e).appendChild(t.firstElementChild),o.component},Au=()=>document.createElement("div"),Pu=(e,t)=>{const n=Au();e.onVanish=()=>{fn(null,n),Wt.delete(a)},e.onAction=r=>{const l=Wt.get(a);let i;e.showInput?i={value:a.inputValue,action:r}:i=r,e.callback?e.callback(i,o.proxy):r==="cancel"||r==="close"?e.distinguishCancelAndClose&&r!=="cancel"?l.reject("close"):l.reject("cancel"):l.resolve(i)};const o=Bu(e,n,t),a=o.proxy;for(const r in e)Ut(e,r)&&!Ut(a.$props,r)&&(r==="closeIcon"&&Ot(e[r])?a[r]=An(e[r]):a[r]=e[r]);return a.visible=true,a};function Rt(e,t=null){if(!je)return Promise.reject();let n;return Re(e)||bn(e)?e={message:e}:n=e.callback,new Promise((o,a)=>{const r=Pu(e,t??Rt._context);Wt.set(r,{options:e,callback:n,resolve:o,reject:a})})}const Ou=["alert","confirm","prompt"],Nu={alert:{closeOnPressEscape:false,closeOnClickModal:false},confirm:{showCancelButton:true},prompt:{showCancelButton:true,showInput:true}};Ou.forEach(e=>{Rt[e]=zu(e)});function zu(e){return(t,n,o,a)=>{let r="";return Ot(n)?(o=n,r=""):ul(n)?r="":r=n,Rt(Object.assign({title:r,message:t,type:"",...Nu[e]},o,{boxType:e}),a)}}Rt.close=()=>{Wt.forEach((e,t)=>{t.doClose()}),Wt.clear()};Rt._context=null;const ft=Rt;ft.install=e=>{ft._context=e._context,e.config.globalProperties.$msgbox=ft,e.config.globalProperties.$messageBox=ft,e.config.globalProperties.$alert=ft.alert,e.config.globalProperties.$confirm=ft.confirm,e.config.globalProperties.$prompt=ft.prompt};const Ru=ft;function Vu(){const e=N({bots:{},channels:{},messages:{}}),t=N({maxMessagesPerChannel:1e3,loggerinfo:false,blockedPlatforms:[],chatContainerHeight:80,clearIndexedDBOnStart:true}),n=N(new Set),o=N(new Set),a=N({}),r=E(()=>Object.values(e.value.bots).sort((d,m)=>{const u=n.value.has(d.selfId),L=n.value.has(m.selfId);return u===L?0:u?-1:1})),l=d=>!d||!e.value.channels[d]?[]:Object.values(e.value.channels[d]).sort((m,u)=>{const L=o.value.has(`${d}:${m.id}`),_=o.value.has(`${d}:${u.id}`);return L===_?0:L?-1:1}),i=(d,m)=>{const u=`${d}:${m}`;return e.value.messages[u]||[]},f=(d,m)=>{const u=`${d}:${m}`;return a.value[u]||{offset:0,hasMore:true}};async function c(){const d=await Le("get-chat-data");d.success&&d.data&&(e.value={bots:d.data.bots||{},channels:d.data.channels||{},messages:d.data.messages||{}},n.value=new Set(d.data.pinnedBots||[]),o.value=new Set(d.data.pinnedChannels||[]))}async function $(){const d=await Le("get-plugin-config");d.success&&d.config&&(t.value=d.config)}function k(d){var F,ae;const m=d.selfId,u=d.channelId,L=`${m}:${u}`;if(e.value.bots[m]||(e.value.bots[m]={selfId:m,platform:d.platform||"unknown",username:((F=d.bot)==null?void 0:F.name)||`Bot-${m}`,avatar:(ae=d.bot)==null?void 0:ae.avatar,status:"online"}),e.value.channels[m]||(e.value.channels[m]={}),!e.value.channels[m][u]){const U=d.isDirect||u.includes("private");e.value.channels[m][u]={id:u,name:U?`私聊(${d.username||u})`:d.guildName||u,type:d.channelType||0,isDirect:U}}e.value.messages[L]||(e.value.messages[L]=[]);const _=e.value.messages[L];if(!_.some(U=>!!(U.id===d.messageId||U.id===d.id||(d.type==="bot-message"||d.type==="bot-message-sent"||d.type==="bot")&&U.isBot&&Math.abs(U.timestamp-d.timestamp)<2e3&&U.content===d.content))){const U={id:d.messageId||d.id,content:d.content,userId:d.userId,username:d.username,avatar:d.avatar,timestamp:d.timestamp,channelId:u,selfId:m,elements:d.elements,isBot:d.isBot||d.type==="bot-message"||d.type==="bot",quote:d.quote};_.push(U),_.sort((I,w)=>I.timestamp-w.timestamp)}e.value={...e.value}}async function z(d,m,u=50){const L=`${d}:${m}`,_=f(d,m);if(!_.hasMore)return;const C=await Le("get-history-messages",{selfId:d,channelId:m,limit:u,offset:_.offset});if(C.success&&C.messages){e.value.messages[L]||(e.value.messages[L]=[]);const F=e.value.messages[L],ae=C.messages.filter(U=>!F.find(I=>I.id===U.id));return e.value.messages[L]=[...ae,...F].sort((U,I)=>U.timestamp-I.timestamp),a.value[L]={offset:_.offset+C.messages.length,hasMore:C.messages.length>=u&&C.total>_.offset+C.messages.length},e.value={...e.value},C.messages.length}return 0}return{chatData:e,pluginConfig:t,pinnedBots:n,pinnedChannels:o,bots:r,getChannels:l,getMessages:i,getPagination:f,loadInitialData:c,loadConfig:$,addMessage:k,loadHistory:z}}function Du(){const e=N(false);async function t(i,f,c,$){if(!e.value){e.value=true;try{return await Le("send-message",{selfId:i,channelId:f,content:c,images:$.map(z=>({tempId:z.tempId,filename:z.filename}))})}finally{e.value=false}}}async function n(i){return await Le("delete-bot-data",{selfId:i})}async function o(i,f){return await Le("delete-channel-data",{selfId:i,channelId:f})}async function a(i,f){return await Le("clear-channel-history",{selfId:i,channelId:f})}async function r(i,f,c){f?c.delete(i):c.add(i),await Le("set-pinned-bots",{pinnedBots:Array.from(c)})}async function l(i,f,c,$){const k=`${i}:${f}`;c?$.delete(k):$.add(k),await Le("set-pinned-channels",{pinnedChannels:Array.from($)})}return{isSending:e,sendMessage:t,deleteBotData:n,deleteChannelData:o,clearHistory:a,togglePinBot:r,togglePinChannel:l}}function Fu(){const e=N({}),t=new Map,n=50*1024*1024,o=30;let a=0,r=0,l=null;const i="ChatImageCache",f=2,c="images",$=500,k=12*1024*1024;async function z(){return new Promise(I=>{const w=indexedDB.deleteDatabase(i);w.onsuccess=()=>{console.log("[ImageCache] IndexedDB 已清空"),I(true)},w.onerror=()=>{console.error("[ImageCache] 清空 IndexedDB 失败"),I(false)}})}async function d(I=false){return I&&await z(),new Promise(w=>{const j=indexedDB.open(i,f);j.onupgradeneeded=A=>{const X=A.target.result;if(!X.objectStoreNames.contains(c)){const te=X.createObjectStore(c,{keyPath:"url"});te.createIndex("channelKey","channelKey",{unique:false}),te.createIndex("timestamp","timestamp",{unique:false})}},j.onsuccess=()=>{l=j.result,w(true)},j.onerror=()=>w(false)})}function m(){if(r>o||a>n){const I=Object.entries(e.value),w=Math.ceil(I.length*.3);for(let j=0;j<w&&I.length>0;j++){const[A,X]=I[j];URL.revokeObjectURL(X),delete e.value[A],r--}a=Math.floor(a*.7),console.log(`[ImageCache] 清理内存,剩余 ${r} 个图片`)}}async function u(I,w){if(e.value[w])return e.value[w];if(t.has(w))return t.get(w);const j=(async()=>{try{l||await d();const A=await L(w);if(A){const X=URL.createObjectURL(A.blob);return e.value[w]=X,a+=A.size,r++,m(),X}return null}finally{t.delete(w)}})();return t.set(w,j),j}async function L(I){return l?new Promise(w=>{const X=l.transaction([c],"readonly").objectStore(c).get(I);X.onsuccess=()=>w(X.result||null),X.onerror=()=>w(null)}):null}async function _(I,w){const j=await u(I,w);if(j)return j;try{const A=await Le("fetch-image",{url:w});if(!A.success)return null;if(A.viteUrl)return e.value[w]=A.viteUrl,A.viteUrl;if(A.dataUrl){const te=await(await fetch(A.dataUrl)).blob();if(te.size>k)return console.warn(`[ImageCache] 图片过大 (${te.size} bytes),不缓存`),A.dataUrl;const q={url:w,blob:te,timestamp:Date.now(),size:te.size,channelKey:I};await C(q);const B=URL.createObjectURL(te);return e.value[w]=B,a+=te.size,r++,m(),B}return null}catch(A){return console.error("[ImageCache] 缓存图片失败:",A),null}}async function C(I){if(l)try{await F()>=$&&await ae(Math.floor($*.2)),l.transaction([c],"readwrite").objectStore(c).put(I)}catch(w){console.error("[ImageCache] 保存到 IndexedDB 失败:",w)}}async function F(){return l?new Promise(I=>{const A=l.transaction([c],"readonly").objectStore(c).count();A.onsuccess=()=>I(A.result),A.onerror=()=>I(0)}):0}async function ae(I){if(l)return new Promise(w=>{const te=l.transaction([c],"readwrite").objectStore(c).index("timestamp").openCursor();let q=0;te.onsuccess=B=>{const pe=B.target.result;pe&&q<I?(pe.delete(),q++,pe.continue()):(console.log(`[ImageCache] 清理了 ${q} 张旧图片`),w())},te.onerror=()=>w()})}async function U(I){Object.keys(e.value).forEach(w=>{URL.revokeObjectURL(e.value[w]),delete e.value[w]}),r=0,a=0}return Ze(async()=>{var I;try{const w=await Le("get-plugin-config");(w==null?void 0:w.success)&&((I=w==null?void 0:w.config)==null?void 0:I.clearIndexedDBOnStart)?(console.log("[ImageCache] 配置要求清空 IndexedDB,正在清理..."),await d(true)):await d(false)}catch(w){console.error("[ImageCache] 初始化失败:",w),await d(false)}}),gn(()=>{Object.values(e.value).forEach(URL.revokeObjectURL),l&&l.close()}),{getCachedImageUrl:u,cacheImage:_,clearChannelCache:U,clearIndexedDB:z}}function Hu(){const e=N({}),t=N(new Set),n=N(null);async function o(i){if(e.value[i])return e.value[i];if(t.value.has(i))return new Promise(f=>{const c=setInterval(()=>{e.value[i]&&(clearInterval(c),f(e.value[i])),t.value.has(i)||(clearInterval(c),f(null))},100)});t.value.add(i);try{const f=await Le("fetch-video-temp",{url:i});if(f.success){if(f.viteUrl)return e.value[i]=f.viteUrl,f.viteUrl;if(f.dataUrl){n.value&&URL.revokeObjectURL(n.value);const $=await(await fetch(f.dataUrl)).blob(),k=URL.createObjectURL($);return n.value=k,e.value[i]=k,k}return null}return null}catch(f){return console.error("加载视频失败:",f),null}finally{t.value.delete(i)}}function a(i){return t.value.has(i)}function r(i){return!!e.value[i]}function l(){Object.values(e.value).forEach(i=>{i.startsWith("blob:")&&URL.revokeObjectURL(i)}),e.value={},n.value=null}return gn(()=>{l()}),{loadVideo:o,isVideoLoading:a,isVideoLoaded:r,clearAllVideos:l}}function Uu(){const{bots:e,pinnedBots:t,pinnedChannels:n,getChannels:o,getMessages:a,loadInitialData:r,loadConfig:l,addMessage:i,loadHistory:f,getPagination:c}=Vu(),{isSending:$,sendMessage:k,deleteBotData:z,deleteChannelData:d,togglePinBot:m,togglePinChannel:u}=Du(),{getCachedImageUrl:L,cacheImage:_}=Fu(),{loadVideo:C,isVideoLoading:F,isVideoLoaded:ae}=Hu(),U=N({show:false,x:0,y:0,type:"",id:"",isPinned:false,hasMedia:false}),I=N(""),w=N(""),j=N(""),A=N([]),X=N(null),te=N(null),q=N(false),B=N("bots"),pe=N(false),xe=N(0),rt=At({messages:[]}),oe=N(false),ce=At({url:""}),me=N(false),_e=N(1),ze=At({content:""}),Je=N(false),Ve=N(null),It=At({data:null}),Mt=N(false),Tt=E(()=>o(I.value)),lt=E(()=>a(I.value,w.value)),Qe=E(()=>{const b=Tt.value.find(x=>x.id===w.value);return b?b.name:""}),Xt=E(()=>{const b=e.value.find(x=>x.selfId===I.value);return(b==null?void 0:b.platform)||"unknown"}),Vt=b=>{I.value=b,w.value="",q.value&&(B.value="channels")},De=async b=>{w.value=b,q.value&&(B.value="messages"),lt.value.length===0&&await f(I.value,b),await fe(),Ce(),setTimeout(Ce,300),setTimeout(Ce,800)},Ke=()=>{q.value&&B.value!=="bots"?window.history.back():B.value==="image"?(B.value="messages",_e.value=1):B.value==="forward"||B.value==="profile"||B.value==="raw"?B.value="messages":B.value==="messages"?B.value="channels":B.value==="channels"&&(B.value="bots")},it=b=>{q.value&&(b.state&&b.state.view?B.value=b.state.view:B.value="bots")};Me(B,(b,x)=>{var R;q.value&&((R=window.history.state)==null?void 0:R.view)!==b&&window.history.pushState({view:b},"")});const Pe=b=>{rt.messages=b.filter(x=>x.type==="message"),q.value?B.value="forward":oe.value=true},Lt=b=>{ce.url=b,_e.value=1,q.value?B.value="image":me.value=true},ut=b=>{b.deltaY<0?_e.value=Math.min(_e.value+.1,3):_e.value=Math.max(_e.value-.1,.5)},et=b=>{const x=document.createElement("a");x.href=b,x.download=`chat-image-${Date.now()}.png`,x.click()},Ce=()=>{if(X.value){const b=X.value.wrapRef;b&&(b.scrollTop=b.scrollHeight)}},tt=async({scrollTop:b})=>{var x;if(b<=10&&!pe.value&&I.value&&w.value&&c(I.value,w.value).hasMore){pe.value=true;const H=(x=X.value)==null?void 0:x.wrapRef,v=(H==null?void 0:H.scrollHeight)||0;await f(I.value,w.value),await fe(),H&&(H.scrollTop=H.scrollHeight-v),pe.value=false}},Dt=async()=>{if(!I.value||!w.value||!j.value.trim()&&!A.value.length)return;let b=j.value;Ve.value&&(b=`<quote id="${Ve.value.realId||Ve.value.id}"/>${b}`);const x=await k(I.value,w.value,b,A.value);x!=null&&x.success?(j.value="",A.value=[],Ve.value=null,Ce()):We.error((x==null?void 0:x.error)||"发送失败")},$t=async b=>{if(!I.value||!w.value)return;let x=b.content;if(b.quote){const H=b.quote.id;H&&!H.startsWith("bot-msg-")?x=`<quote id="${H}"/>${x}`:x=b.content}else if(b.isBot||b.userId===I.value){const H=b.realId||b.id;H&&H.startsWith("bot-msg-")?x=b.content:H?x=`<quote id="${H}"/>${x}`:x=b.content}const R=await k(I.value,w.value,x,[]);R!=null&&R.success?Ce():We.error((R==null?void 0:R.error)||"复读失败")},J=(b,x)=>{b.preventDefault(),b.stopPropagation(),U.value={show:true,x:b.clientX,y:b.clientY,type:"bot",id:x.selfId,isPinned:t.value.has(x.selfId),hasMedia:false}},y=(b,x)=>{b.preventDefault(),b.stopPropagation(),U.value={show:true,x:b.clientX,y:b.clientY,type:"channel",id:x.id,isPinned:n.value.has(`${I.value}:${x.id}`),hasMedia:false}},be=(b,x)=>{var H;if(U.value.show&&U.value.type==="message"&&U.value.id===x.id){U.value.show=false;return}b.preventDefault(),b.stopPropagation();const R=(H=x.elements)==null?void 0:H.some(v=>["image","img","mface","audio","video"].includes(v.type));U.value={show:true,x:b.clientX,y:b.clientY,type:"message",id:x.id,isPinned:false,data:x,hasMedia:R}},le=async b=>{const x=U.value.type,R=U.value.id,H=U.value.isPinned;U.value.show=false,b==="pin"?x==="bot"?await m(R,H,t.value):await u(I.value,R,H,n.value):b==="delete"&&(x==="bot"?await z(R):await d(I.value,R),location.reload())},ke=b=>{if(!b)return We.warning("未复制任何内容"),Promise.resolve();if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(b);{const x=document.createElement("textarea");return x.value=b,x.style.position="fixed",x.style.left="-999999px",x.style.top="-999999px",document.body.appendChild(x),x.focus(),x.select(),new Promise((R,H)=>{document.execCommand("copy")?R():H(),x.remove()})}},g=async b=>{var R,H,v,Y;const x=U.value.data;if(U.value.show=false,!!x){if(b==="copy"){const O=(x.content||"").replace(/<[^>]+>/g,"");O?ke(O).then(()=>We.success("已复制到剪贴板")):We.warning("未复制任何内容")}else if(b==="copy-raw"){let O=x.content||"";x.quote&&(O=`<quote id="${x.quote.id}"/>${O}`),ze.content=O,q.value?B.value="raw":Je.value=true}else if(b==="plus1")await $t(x);else if(b==="reply")Ve.value=x,fe(()=>{var ue,Z,re,Ee,oo;const O=((Z=(ue=te.value)==null?void 0:ue.$el)==null?void 0:Z.querySelector("textarea"))||((re=te.value)==null?void 0:re.ref);O?O.focus():(oo=(Ee=te.value)==null?void 0:Ee.focus)==null||oo.call(Ee)});else if(b==="download"){const O=(R=x.elements)==null?void 0:R.find(Z=>["image","img","mface","audio","video"].includes(Z.type)),ue=((H=O==null?void 0:O.attrs)==null?void 0:H.src)||((v=O==null?void 0:O.attrs)==null?void 0:v.url)||((Y=O==null?void 0:O.attrs)==null?void 0:Y.file);ue&&et(ue)}}},P=async b=>{if(!I.value)return;const x=await Le("get-user-info",{selfId:I.value,userId:b.userId,guildId:b.guildId});x.success?(It.data=x.data,q.value?B.value="profile":Mt.value=true):We.error(x.error||"获取用户信息失败")},G=async b=>{let x=document.querySelector(`[data-id="${b}"]`)||document.getElementById(b);if(!x){if(pe.value)return;We.info("正在向上查找历史消息...");for(let R=0;R<3&&(await f(I.value,w.value),await new Promise(H=>setTimeout(H,150)),x=document.querySelector(`[data-id="${b}"]`)||document.getElementById(b),!x);R++);}if(x){x.scrollIntoView({behavior:"smooth",block:"center"});const R=x.querySelector(".cursor-context-menu")||x;R.classList.add("message-highlight"),setTimeout(()=>R.classList.remove("message-highlight"),1500)}else We.warning("消息太久远,已不在当前列表中")},Q=async b=>{var R;const x=(R=b.clipboardData)==null?void 0:R.items;if(x){for(let H=0;H<x.length;H++)if(x[H].type.indexOf("image")!==-1){const v=x[H].getAsFile();if(v){const Y=new FileReader;Y.onload=async O=>{var re;const ue=(re=O.target)==null?void 0:re.result,Z=await Le("upload-image",{file:ue,filename:`pasted_image_${Date.now()}.png`,mimeType:v.type});Z.success&&A.value.push({tempId:Z.tempId,preview:URL.createObjectURL(v),filename:`pasted_image_${Date.now()}.png`})},Y.readAsDataURL(v)}}}},ve=()=>{q.value=window.innerWidth<=768},Oe=()=>{if(!q.value){xe.value=0;return}if(window.visualViewport){const b=window.visualViewport.height,x=window.innerHeight,R=Math.max(0,x-b);Math.abs(R-xe.value)>50&&(xe.value=R)}else xe.value=0};let ie=[];return Ze(async()=>{ve(),window.addEventListener("resize",ve),window.addEventListener("click",()=>U.value.show=false),window.addEventListener("popstate",it),window.visualViewport&&(window.visualViewport.addEventListener("resize",Oe),window.visualViewport.addEventListener("scroll",Oe)),window.addEventListener("resize",Oe);const b=()=>{setTimeout(Oe,300)},x=()=>{setTimeout(()=>{xe.value=0},100)};fe(()=>{var ue,Z;const O=(Z=(ue=te.value)==null?void 0:ue.$el)==null?void 0:Z.querySelector("textarea");O&&(O.addEventListener("focus",b),O.addEventListener("blur",x),ie.push(()=>{O.removeEventListener("focus",b),O.removeEventListener("blur",x)}))}),q.value&&window.history.replaceState({view:B.value},""),await l(),await r();const R=Zt("chat-message-event",O=>{var ue;if(i(O),O.selfId===I.value&&O.channelId===w.value){const Z=(ue=X.value)==null?void 0:ue.wrapRef;Z&&Z.scrollHeight-Z.scrollTop-Z.clientHeight<100&&fe(Ce)}});typeof R=="function"&&ie.push(R);const H=Zt("bot-message-sent-event",O=>{i(O),O.selfId===I.value&&O.channelId===w.value&&fe(Ce)});typeof H=="function"&&ie.push(H);const v=Zt("chat-bot-message-event",O=>{i(O),O.selfId===I.value&&O.channelId===w.value&&fe(Ce)});typeof v=="function"&&ie.push(v);const Y=Zt("bot-message-updated",O=>{const ue=`${I.value}:${w.value}`;if(O.channelKey!==ue)return;const Z=lt.value.find(re=>re.id===O.tempId);Z&&(Z.sending=false,Z.realId=O.realId)});typeof Y=="function"&&ie.push(Y)}),gn(()=>{window.removeEventListener("resize",ve),window.removeEventListener("popstate",it),window.removeEventListener("resize",Oe),window.visualViewport&&(window.visualViewport.removeEventListener("resize",Oe),window.visualViewport.removeEventListener("scroll",Oe)),ie.forEach(b=>b==null?void 0:b())}),{bots:e,selectedBot:I,selectedChannel:w,currentChannels:Tt,currentMessages:lt,currentChannelName:Qe,inputText:j,uploadedImages:A,isSending:$,pinnedBots:t,pinnedChannels:n,scrollRef:X,isMobile:q,mobileView:B,forwardData:rt,imageViewer:ce,imageZoom:_e,rawMessage:ze,isLoadingHistory:pe,forwardDialogVisible:oe,imageViewerVisible:me,rawMessageVisible:Je,replyingTo:Ve,userProfile:It,userProfileVisible:Mt,selectedBotPlatform:Xt,menu:U,keyboardHeight:xe,selectBot:Vt,selectChannel:De,handleSend:Dt,togglePinBot:m,togglePinChannel:u,deleteBotData:z,deleteChannelData:d,getCachedImageUrl:L,cacheImage:_,loadVideo:C,isVideoLoading:F,isVideoLoaded:ae,getMessages:a,goBack:Ke,showForward:Pe,openImageViewer:Lt,handleImageWheel:ut,downloadImage:et,handleScroll:tt,repeatMessage:$t,handlePaste:Q,copyToClipboard:ke,onBotMenu:J,onChannelMenu:y,onMessageMenu:be,handleMenuAction:le,handleMessageAction:g,showUserProfile:P,inputRef:te,scrollToMessage:G}}const ju={key:0,class:"p-10 text-center opacity-40 text-sm"},Ku=["onClick","onContextmenu"],qu={class:"ml-3 flex-1 overflow-hidden"},Wu={class:"flex items-center gap-1 text-sm font-bold truncate"},Gu={class:"text-xs text-[var(--k-text-color-secondary)] truncate opacity-80"},Yu={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] text-lg text-[var(--k-text-color)] flex-shrink-0"},Xu={key:0,class:"p-10 text-center opacity-40 text-sm"},Zu=["onClick","onContextmenu"],Ju={class:"flex-1 overflow-hidden"},Qu={class:"flex items-center gap-1 text-sm font-medium truncate"},ec={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm z-10 text-[var(--k-text-color)]"},tc={class:"truncate"},nc={key:1,class:"ml-2 text-xs opacity-40 font-mono hidden md:inline"},oc={class:"flex-1 overflow-hidden relative bg-opacity-50 bg-gray-100 dark:bg-black/20"},ac={key:0,class:"flex justify-center py-4"},sc=["data-id"],rc={class:"flex items-center gap-2 mb-1.5 text-xs text-[var(--k-text-color-secondary)]"},lc={class:"font-bold"},ic={class:"opacity-60"},uc=["onClick"],cc={key:0,class:"w-8 h-8 flex items-center justify-center"},dc={key:1,class:"w-8 h-8 rounded-full border-2 border-blue-500 flex items-center justify-center font-bold text-xs bg-blue-50/10"},fc=["onContextmenu"],pc={key:0,class:"mb-2.5 p-2.5 text-sm bg-black/5 dark:bg-white/5 rounded-lg border-l-4 border-gray-400/50 text-left relative group/quote"},vc={class:"font-bold opacity-70 mb-1 text-xs"},mc={class:"opacity-90"},hc=["onClick"],gc={class:"text-left min-w-[20px]"},bc={key:0,class:"flex gap-3 mb-3 overflow-x-auto pb-2 scrollbar-hide"},yc={key:1,class:"mb-2 px-3 py-1.5 bg-black/5 dark:bg-white/5 rounded-lg flex items-center justify-between text-xs"},wc={class:"flex items-center gap-2 truncate opacity-70"},xc={class:"flex gap-3 items-end"},_c={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm"},Cc={class:"p-4 space-y-6"},kc={class:"flex-1 overflow-hidden"},Ec={class:"text-xs text-[var(--k-text-color-secondary)] mb-1 font-bold"},Sc={class:"p-3 bg-[var(--k-card-bg)] rounded-2xl rounded-tl-none shadow-sm text-sm break-all border border-[var(--k-border-color)]"},Ic={class:"flex h-14 items-center px-4 font-bold border-b border-white/10 bg-black text-white shadow-sm flex-shrink-0"},Mc=["src"],Tc={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm"},Lc={class:"p-4 flex flex-col gap-4 h-full overflow-hidden"},$c={class:"flex gap-3 pb-8"},Bc={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm"},Ac={class:"p-8 flex flex-col items-center gap-6"},Pc={class:"text-center"},Oc={class:"text-2xl font-bold mb-2"},Nc={class:"text-sm opacity-60 font-mono"},zc={class:"flex flex-col items-center gap-4 py-4"},Rc={class:"text-center"},Vc={class:"text-xl font-bold"},Dc={class:"text-xs opacity-50 mt-1 font-mono"},Fc={class:"p-6 space-y-6 bg-gray-50 dark:bg-black/10"},Hc={class:"flex-1 overflow-hidden"},Uc={class:"text-xs text-[var(--k-text-color-secondary)] mb-1 font-bold"},jc={class:"p-3 bg-[var(--k-card-bg)] rounded-2xl rounded-tl-none shadow-sm text-sm break-all border border-[var(--k-border-color)]"},Kc={class:"flex flex-col items-center gap-4"},qc=["src"],Wc={class:"flex flex-col gap-4"},Gc={class:"flex justify-center gap-3"},Yc=ee({__name:"index",setup(e){const{bots:t,selectedBot:n,selectedChannel:o,currentChannels:a,currentMessages:r,currentChannelName:l,inputText:i,uploadedImages:f,isSending:c,pinnedBots:$,pinnedChannels:k,scrollRef:z,isMobile:d,mobileView:m,goBack:u,forwardData:L,imageViewer:_,imageZoom:C,rawMessage:F,isLoadingHistory:ae,forwardDialogVisible:U,imageViewerVisible:I,rawMessageVisible:w,replyingTo:j,userProfile:A,userProfileVisible:X,selectedBotPlatform:te,keyboardHeight:q,selectBot:B,selectChannel:pe,handleSend:xe,getCachedImageUrl:rt,cacheImage:oe,loadVideo:ce,isVideoLoaded:me,showForward:_e,openImageViewer:ze,handleImageWheel:Je,downloadImage:Ve,handleScroll:It,repeatMessage:Mt,handlePaste:Tt,copyToClipboard:lt,onBotMenu:Qe,onChannelMenu:Xt,onMessageMenu:Vt,handleMenuAction:De,handleMessageAction:Ke,showUserProfile:it,menu:Pe,inputRef:Lt,scrollToMessage:ut}=Uu(),et=J=>new Date(J).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),Ce=async J=>{if(J==="delete")try{await Ru.confirm("确定删除所有数据吗?此操作不可恢复。","警告",{type:"warning",confirmButtonClass:"el-button--danger"}),await De(J)}catch{}else await De(J)},tt=ee({props:["element","botId","channelId","inQuote"],setup(J){const y=N(""),be=N(""),le=N(false),ke=["img","image","mface","audio","video"].includes(J.element.type),g=async()=>{const Q=J.element.attrs.src||J.element.attrs.url||J.element.attrs.file;if(Q){if(J.element.type==="video"){be.value=Q;return}const ve=await rt(`${J.botId}:${J.channelId}`,Q);if(ve)y.value=ve;else{const Oe=await oe(`${J.botId}:${J.channelId}`,Q);y.value=Oe||Q}}};ke&&g(),Me(()=>J.element.attrs.src||J.element.attrs.url||J.element.attrs.file,g);const P=async()=>{if(!be.value||le.value)return;if(me(be.value)){const ve=await ce(be.value);ve&&(y.value=ve);return}le.value=true;const Q=await ce(be.value);Q&&(y.value=Q),le.value=false},G=()=>{if(J.inQuote)return;const Q=document.querySelector(".el-main .el-scrollbar__wrap");Q&&Q.scrollHeight-Q.scrollTop-Q.clientHeight<150&&fe(()=>{Q.scrollTop=Q.scrollHeight})};return()=>{var x;const{element:Q,botId:ve,channelId:Oe}=J,ie=Q.type,b=Q.attrs;if(ie==="text")return se("span",b.content);if(ie==="img"||ie==="image"||ie==="mface"){if(J.inQuote)return se("span",{class:"opacity-60 italic mx-1"},"[图片]");const R=ie==="mface";return se("div",{class:"block my-1.5"},[se("img",{src:y.value,class:["rounded-lg shadow-sm border border-black/5 block cursor-pointer hover:opacity-90 transition-opacity",R?"max-w-[100px] max-h-[100px]":"max-w-full max-h-[400px]"],style:`min-width: ${R?"30px":"50px"}; min-height: ${R?"30px":"50px"}; object-fit: contain; background: rgba(0,0,0,0.05)`,onClick:H=>{H.stopPropagation(),ze(y.value)},onLoad:G,onError:H=>{H.target.src="",H.target.alt="图片加载失败"}})])}return ie==="audio"?se("audio",{src:y.value,controls:true,class:"max-w-full my-1.5 block"}):ie==="video"?y.value?se("video",{src:y.value,controls:true,class:"max-w-full my-1.5 rounded-lg shadow-sm block"}):se("div",{class:"my-1.5 p-4 bg-black/5 dark:bg-white/5 rounded-lg border border-black/10 dark:border-white/10 cursor-pointer hover:bg-black/10 dark:hover:bg-white/10 transition-colors flex items-center justify-center gap-2",onClick:P},[le.value?se("el-icon",{class:"is-loading"},{default:()=>se(_t)}):se("el-icon",null,{default:()=>se(ro)}),se("span",{class:"text-sm"},le.value?"加载中...":"点击加载视频")]):ie==="at"?se("span",{class:"text-blue-500 font-bold hover:underline cursor-default mx-0.5"},`@${b.name||b.id}`):ie==="p"?se("div",{class:"my-1 block min-h-[1em]"},(Q.children||[]).map((R,H)=>se(tt,{key:H,element:R,botId:ve,channelId:Oe}))):ie==="i18n"?se("span",{class:"opacity-80 italic"},`[${b.path||"i18n"}]`):ie==="figure"||ie==="forward"?se("div",{class:"my-2 p-3 bg-black/5 dark:bg-white/5 rounded-xl border border-black/10 dark:border-white/10 max-w-[300px] cursor-pointer hover:bg-black/10 dark:hover:bg-white/10 transition-colors",onClick:R=>{R.stopPropagation(),_e(Q.children||[])}},[se("div",{class:"flex items-center gap-2 mb-2 font-bold text-sm opacity-80"},[se("el-icon",null,{default:()=>se(so)}),se("span","合并转发记录")]),se("div",{class:"space-y-1.5"},(Q.children||[]).filter(R=>R.type==="message").slice(0,4).map(R=>{var H,v,Y,O;return se("div",{class:"text-xs truncate opacity-70"},[se("span",{class:"font-bold mr-1"},`${((H=R.attrs)==null?void 0:H.nickname)||"用户"}:`),se("span",((O=(Y=(v=R.children)==null?void 0:v[0])==null?void 0:Y.attrs)==null?void 0:O.content)||"[富媒体内容]")])})),((x=Q.children)==null?void 0:x.length)>4?se("div",{class:"mt-2 pt-2 border-t border-black/5 dark:border-white/5 text-[10px] opacity-50"},`查看更多 ${Q.children.length} 条内容...`):null]):ie==="quote"?null:se("span",{class:"text-gray-400 italic text-xs"},`[${ie}]`)}}}),Dt=async J=>{const y=new FileReader;y.onload=async be=>{var g;const le=(g=be.target)==null?void 0:g.result,ke=await Le("upload-image",{file:le,filename:J.name,mimeType:J.raw.type});ke.success&&f.value.push({tempId:ke.tempId,preview:URL.createObjectURL(J.raw),filename:J.name})},y.readAsDataURL(J.raw)},$t=J=>{f.value=f.value.filter(y=>y.tempId!==J)};return(J,y)=>{const be=ge("el-avatar"),le=ge("el-icon"),ke=ge("el-scrollbar"),g=ge("el-aside"),P=ge("el-button"),G=ge("el-image"),Q=ge("el-upload"),ve=ge("el-input"),Oe=ge("el-empty"),ie=ge("el-main"),b=ge("el-descriptions-item"),x=ge("el-descriptions"),R=ge("el-container"),H=ge("el-dialog");return p(),T("div",{class:"chat-patch-wrapper absolute inset-0 flex overflow-hidden bg-[var(--k-page-bg)] text-[var(--k-text-color)] font-sans",style:He(s(d)?"height: 100dvh; width: 100vw; position: fixed; top: 0; left: 0;":"height: 100%; width: 100%;")},[S(R,{class:"h-full w-full overflow-hidden"},{default:M(()=>[vt(S(g,{width:s(d)?"100%":"280px",class:"flex flex-col border-r border-[var(--k-border-color)] bg-[var(--k-page-bg)] brightness-95 dark:brightness-90 h-full overflow-hidden"},{default:M(()=>[y[21]||(y[21]=h("div",{class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] text-lg text-[var(--k-text-color)] flex-shrink-0"}," 机器人",-1)),S(ke,{class:"flex-1 overflow-auto"},{default:M(()=>[s(t).length===0?(p(),T("div",ju,"暂无机器人数据")):V("",true),(p(true),T(he,null,qe(s(t),v=>(p(),T("div",{key:v.selfId,class:D(["flex items-center p-4 cursor-pointer transition-all hover:bg-[var(--k-button-hover-bg)] border-l-4 border-transparent",{"!border-[var(--k-color-primary)] bg-[var(--k-button-active-bg)] text-[var(--k-color-primary)]":s(n)===v.selfId}]),onClick:Y=>s(B)(v.selfId),onContextmenu:Te(Y=>s(Qe)(Y,v),["prevent"])},[S(be,{size:44,src:v.avatar,class:"flex-shrink-0 shadow-sm"},{default:M(()=>[ne(W(v.username[0]),1)]),_:2},1032,["src"]),h("div",qu,[h("div",Wu,[ne(W(v.username)+" ",1),s($).has(v.selfId)?(p(),K(le,{key:0,class:"text-orange-400"},{default:M(()=>[S(s(lo))]),_:1})):V("",true)]),h("div",Gu,W(v.platform),1)]),h("div",{class:D(["w-2.5 h-2.5 rounded-full ml-2 shadow-inner",v.status==="online"?"bg-green-500":"bg-gray-400"])},null,2)],42,Ku))),128))]),_:1})]),_:1},8,["width"]),[[mt,!s(d)||s(m)==="bots"]]),vt(S(g,{width:s(d)?"100%":"260px",class:"flex flex-col border-r border-[var(--k-border-color)] bg-[var(--k-page-bg)] brightness-100 dark:brightness-95 h-full overflow-hidden"},{default:M(()=>[h("div",Yu,[s(d)?(p(),K(P,{key:0,icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(u)},null,8,["onClick"])):V("",true),y[22]||(y[22]=ne(" 频道 ",-1))]),S(ke,{class:"flex-1 overflow-auto"},{default:M(()=>[s(a).length===0?(p(),T("div",Xu,"暂无频道数据")):V("",true),(p(true),T(he,null,qe(s(a),v=>(p(),T("div",{key:v.id,class:D(["flex items-center p-4 cursor-pointer transition-all hover:bg-[var(--k-button-hover-bg)] border-l-4 border-transparent",{"!border-[var(--k-color-primary)] bg-[var(--k-button-active-bg)] text-[var(--k-color-primary)]":s(o)===v.id}]),onClick:Y=>s(pe)(v.id),onContextmenu:Te(Y=>s(Xt)(Y,v),["prevent"])},[h("div",Ju,[h("div",Qu,[ne(W(v.name)+" ",1),s(k).has(`${s(n)}:${v.id}`)?(p(),K(le,{key:0,class:"text-orange-400"},{default:M(()=>[S(s(lo))]),_:1})):V("",true)])])],42,Zu))),128))]),_:1})]),_:1},8,["width"]),[[mt,!s(d)&&s(n)||s(d)&&s(m)==="channels"]]),vt(S(ie,{class:"flex flex-col p-0 bg-[var(--k-page-bg)] relative brightness-105 dark:brightness-100 h-full overflow-hidden"},{default:M(()=>[s(n)&&s(o)?(p(),T(he,{key:0},[h("div",ec,[s(d)?(p(),K(P,{key:0,icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(u)},null,8,["onClick"])):V("",true),h("span",tc,W(s(l)),1),s(o)?(p(),T("span",nc,"("+W(s(o))+")",1)):V("",true)]),h("div",oc,[S(ke,{ref_key:"scrollRef",ref:z,onScroll:s(It),class:"h-full"},{default:M(()=>[h("div",{class:"p-6 flex flex-col",style:He(s(d)?{paddingBottom:"calc(180px + env(safe-area-inset-bottom))"}:{minHeight:"100%"})},[s(ae)?(p(),T("div",ac,[S(le,{class:"is-loading text-[var(--k-color-primary)]"},{default:M(()=>[S(s(_t))]),_:1})])):V("",true),(p(true),T(he,null,qe(s(r),v=>(p(),T("div",{key:v.id,"data-id":v.id,class:D(["flex mb-6 gap-3 group",v.isBot||v.userId===s(n)?"flex-row-reverse":"flex-row"])},[S(be,{size:40,src:v.avatar,class:"flex-shrink-0 shadow-sm cursor-pointer hover:brightness-90",onClick:Y=>s(it)(v)},{default:M(()=>[ne(W(v.username[0]),1)]),_:2},1032,["src","onClick"]),h("div",{class:D(["max-w-[85%] md:max-w-[75%] flex flex-col",v.isBot||v.userId===s(n)?"items-end":"items-start"])},[h("div",rc,[h("span",lc,W(v.username),1),h("span",ic,W(et(v.timestamp)),1)]),h("div",{class:D(["flex items-end gap-2 group/msg",v.isBot||v.userId===s(n)?"flex-row":"flex-row-reverse"])},[h("div",{class:D(["transition-opacity cursor-pointer text-blue-500 hover:scale-110 active:scale-95 mb-1",s(d)?"opacity-100":"opacity-0 group-hover/msg:opacity-100"]),title:"复读这条消息",onClick:Te(Y=>s(Mt)(v),["stop"])},[v.sending?(p(),T("div",cc,[S(le,{class:"is-loading"},{default:M(()=>[S(s(_t))]),_:1})])):(p(),T("div",dc," +1"))],10,uc),h("div",{class:D(["p-3.5 rounded-2xl shadow-sm text-[15px] leading-relaxed break-all relative cursor-context-menu",v.isBot||v.userId===s(n)?"bg-[#95ec69] text-black rounded-tr-none":"bg-[var(--k-card-bg)] text-[var(--k-text-color)] rounded-tl-none border border-[var(--k-border-color)]"]),onContextmenu:Te(Y=>s(Vt)(Y,v),["stop"])},[v.quote?(p(),T("div",pc,[h("div",vc,W(v.quote.user.username)+":",1),h("div",mc,[v.quote.elements&&v.quote.elements.length?(p(true),T(he,{key:0},qe(v.quote.elements,(Y,O)=>(p(),K(s(tt),{key:O,element:Y,"bot-id":s(n),"channel-id":s(o),"in-quote":true},null,8,["element","bot-id","channel-id"]))),128)):(p(),T(he,{key:1},[ne(W(v.quote.content),1)],64))]),h("div",{class:"absolute top-1 right-1 cursor-pointer text-[var(--k-color-primary)] hover:scale-110 transition-transform",title:"定位到原消息",onClick:Te(Y=>s(ut)(v.quote.id),["stop"])},[S(le,null,{default:M(()=>[S(s(is))]),_:1})],8,hc)])):V("",true),h("div",gc,[v.elements&&v.elements.length?(p(true),T(he,{key:0},qe(v.elements,(Y,O)=>(p(),K(s(tt),{key:O,element:Y,"bot-id":s(n),"channel-id":s(o)},null,8,["element","bot-id","channel-id"]))),128)):v.content?(p(),T(he,{key:1},[ne(W(v.content),1)],64)):V("",true)])],42,fc)],2)],2)],10,sc))),128))],4)]),_:1},8,["onScroll"])]),h("div",{class:D(["p-4 border-t border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-[0_-2px_10px_rgba(0,0,0,0.05)]",s(d)?"fixed left-0 right-0 z-50 transition-all duration-200":""]),style:He(s(d)?{bottom:s(q)>0?`${s(q)}px`:"0",paddingBottom:"max(env(safe-area-inset-bottom), 16px)"}:{})},[s(f).length?(p(),T("div",bc,[(p(true),T(he,null,qe(s(f),v=>(p(),T("div",{key:v.tempId,class:"relative w-20 h-20 flex-shrink-0 group"},[S(G,{src:v.preview,fit:"cover",class:"w-full h-full rounded-lg border-2 border-[var(--k-border-color)] shadow-sm cursor-pointer hover:brightness-90",onClick:Y=>s(ze)(v.preview)},null,8,["src","onClick"]),S(le,{class:"absolute -top-1.5 -right-1.5 cursor-pointer text-red-500 bg-white rounded-full shadow-md opacity-0 group-hover:opacity-100 transition-opacity z-10",onClick:Te(Y=>$t(v.tempId),["stop"])},{default:M(()=>[S(s(Hn))]),_:1},8,["onClick"])]))),128))])):V("",true),s(j)?(p(),T("div",yc,[h("div",wc,[S(le,null,{default:M(()=>[S(s(ao))]),_:1}),h("span",null,"回复 "+W(s(j).username)+": "+W(s(j).content.slice(0,20))+W(s(j).content.length>20?"...":""),1)]),S(le,{class:"cursor-pointer hover:text-red-500",onClick:y[0]||(y[0]=v=>j.value=null)},{default:M(()=>[S(s(Uo))]),_:1})])):V("",true),h("div",xc,[S(Q,{action:"#","auto-upload":false,"show-file-list":false,"on-change":Dt,multiple:""},{default:M(()=>[S(P,{circle:"",class:"!w-10 !h-10 !text-xl shadow-sm hover:scale-105 transition-transform"},{default:M(()=>[S(le,null,{default:M(()=>[S(s(ro))]),_:1})]),_:1})]),_:1}),S(ve,{ref_key:"inputRef",ref:Lt,modelValue:s(i),"onUpdate:modelValue":y[1]||(y[1]=v=>yt(i)?i.value=v:null),type:"textarea",autosize:{minRows:1,maxRows:4},placeholder:"输入消息...",class:"flex-1 !text-base",onKeydown:Ht(Te(s(xe),["prevent"]),["enter"]),onPaste:s(Tt)},null,8,["modelValue","onKeydown","onPaste"]),S(P,{type:"primary",loading:s(c),onClick:s(xe),class:"px-6 h-10 !text-base font-bold shadow-md"},{default:M(()=>[...y[23]||(y[23]=[ne("发送",-1)])]),_:1},8,["loading","onClick"])])],6)],64)):(p(),K(Oe,{key:1,description:"请选择频道开始对话",class:"h-full flex items-center justify-center opacity-60"}))]),_:1},512),[[mt,!s(d)&&s(n)&&s(o)||s(d)&&s(m)==="messages"]]),s(d)&&s(m)==="forward"?(p(),K(ie,{key:0,class:"flex flex-col p-0 bg-[var(--k-page-bg)] absolute inset-0 z-50 overflow-hidden",style:{height:"100dvh"}},{default:M(()=>[h("div",_c,[S(P,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(u)},null,8,["onClick"]),y[24]||(y[24]=h("span",null,"聊天记录",-1))]),S(ke,{class:"flex-1 bg-gray-50 dark:bg-black/10"},{default:M(()=>[h("div",Cc,[(p(true),T(he,null,qe(s(L).messages,(v,Y)=>{var O,ue;return p(),T("div",{key:Y,class:"flex gap-3"},[S(be,{size:36,src:(O=v.attrs)==null?void 0:O.avatar,class:"flex-shrink-0 shadow-sm"},{default:M(()=>{var Z,re;return[ne(W((re=(Z=v.attrs)==null?void 0:Z.nickname)==null?void 0:re[0]),1)]}),_:2},1032,["src"]),h("div",kc,[h("div",Ec,W((ue=v.attrs)==null?void 0:ue.nickname),1),h("div",Sc,[(p(true),T(he,null,qe(v.children,(Z,re)=>(p(),K(s(tt),{key:re,element:Z,"bot-id":s(n),"channel-id":s(o)},null,8,["element","bot-id","channel-id"]))),128))])])])}),128))])]),_:1})]),_:1})):V("",true),s(d)&&s(m)==="image"?(p(),K(ie,{key:1,class:"flex flex-col p-0 bg-black absolute inset-0 z-[60] overflow-hidden",style:{height:"100dvh"}},{default:M(()=>[h("div",Ic,[S(P,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3 !bg-white/10 !border-none !text-white",onClick:s(u)},null,8,["onClick"]),y[26]||(y[26]=h("span",{class:"truncate mr-2"},"查看图片",-1)),y[27]||(y[27]=h("div",{class:"flex-1"},null,-1)),S(P,{type:"primary",icon:"Download",size:"small",onClick:y[2]||(y[2]=v=>s(Ve)(s(_).url))},{default:M(()=>[...y[25]||(y[25]=[ne("下载",-1)])]),_:1})]),h("div",{class:"flex-1 overflow-hidden relative flex items-center justify-center",onWheel:y[3]||(y[3]=(...v)=>s(Je)&&s(Je)(...v))},[h("img",{src:s(_).url,class:"max-w-full max-h-full object-contain transition-transform duration-200 ease-out will-change-transform",style:He({transform:`scale(${s(C)})`})},null,12,Mc)],32)]),_:1})):V("",true),s(d)&&s(m)==="raw"?(p(),K(ie,{key:2,class:"flex flex-col p-0 bg-[var(--k-page-bg)] absolute inset-0 z-[80] overflow-hidden",style:{height:"100dvh"}},{default:M(()=>[h("div",Tc,[S(P,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(u)},null,8,["onClick"]),y[28]||(y[28]=h("div",{class:"flex-1 text-center pr-8"},"原始消息",-1))]),h("div",Lc,[S(ve,{modelValue:s(F).content,"onUpdate:modelValue":y[4]||(y[4]=v=>s(F).content=v),type:"textarea",rows:15,readonly:"",class:"flex-1 raw-content-area"},null,8,["modelValue"]),h("div",$c,[S(P,{type:"primary",class:"flex-1",onClick:y[5]||(y[5]=v=>s(lt)(s(F).content).then(()=>s(We).success("已复制")))},{default:M(()=>[...y[29]||(y[29]=[ne("复制内容",-1)])]),_:1}),S(P,{class:"flex-1",onClick:s(u)},{default:M(()=>[...y[30]||(y[30]=[ne("返回",-1)])]),_:1},8,["onClick"])])])]),_:1})):V("",true),s(d)&&s(m)==="profile"?(p(),K(ie,{key:3,class:"flex flex-col p-0 bg-[var(--k-page-bg)] absolute inset-0 z-[70] overflow-hidden",style:{height:"100dvh"}},{default:M(()=>{var v,Y,O,ue,Z;return[h("div",Bc,[S(P,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(u)},null,8,["onClick"]),y[31]||(y[31]=h("div",{class:"flex-1 text-center pr-8"},"用户资料",-1))]),h("div",Ac,[S(be,{size:120,src:(v=s(A).data)==null?void 0:v.avatar,class:"shadow-lg"},{default:M(()=>{var re,Ee;return[ne(W((Ee=(re=s(A).data)==null?void 0:re.username)==null?void 0:Ee[0]),1)]}),_:1},8,["src"]),h("div",Pc,[h("div",Oc,W(((Y=s(A).data)==null?void 0:Y.username)||((O=s(A).data)==null?void 0:O.name)||"未知用户"),1),h("div",Nc,"ID: "+W(((ue=s(A).data)==null?void 0:ue.userId)||((Z=s(A).data)==null?void 0:Z.id)),1)]),S(x,{column:1,border:"",class:"w-full mt-4"},{default:M(()=>[S(b,{label:"昵称"},{default:M(()=>{var re,Ee;return[ne(W(((re=s(A).data)==null?void 0:re.username)||((Ee=s(A).data)==null?void 0:Ee.name)),1)]}),_:1}),S(b,{label:"平台"},{default:M(()=>[ne(W(s(te)),1)]),_:1})]),_:1})])]}),_:1})):V("",true)]),_:1}),s(d)?V("",true):(p(),K(H,{key:0,modelValue:s(X),"onUpdate:modelValue":y[6]||(y[6]=v=>yt(X)?X.value=v:null),title:"用户资料",width:"400px",center:"",teleported:"","align-center":""},{default:M(()=>{var v,Y,O,ue,Z;return[h("div",zc,[S(be,{size:80,src:(v=s(A).data)==null?void 0:v.avatar,class:"shadow"},{default:M(()=>{var re,Ee;return[ne(W((Ee=(re=s(A).data)==null?void 0:re.username)==null?void 0:Ee[0]),1)]}),_:1},8,["src"]),h("div",Rc,[h("div",Vc,W(((Y=s(A).data)==null?void 0:Y.username)||((O=s(A).data)==null?void 0:O.name)||"未知用户"),1),h("div",Dc,"ID: "+W(((ue=s(A).data)==null?void 0:ue.userId)||((Z=s(A).data)==null?void 0:Z.id)),1)]),S(x,{column:1,border:"",class:"w-full mt-4"},{default:M(()=>[S(b,{label:"昵称"},{default:M(()=>{var re,Ee;return[ne(W(((re=s(A).data)==null?void 0:re.username)||((Ee=s(A).data)==null?void 0:Ee.name)),1)]}),_:1}),S(b,{label:"平台"},{default:M(()=>[ne(W(s(te)),1)]),_:1})]),_:1})])]}),_:1},8,["modelValue"])),s(d)?V("",true):(p(),K(H,{key:1,modelValue:s(U),"onUpdate:modelValue":y[7]||(y[7]=v=>yt(U)?U.value=v:null),title:"聊天记录",width:"550px",class:"forward-dialog",teleported:""},{default:M(()=>[S(ke,{"max-height":"70vh"},{default:M(()=>[h("div",Fc,[(p(true),T(he,null,qe(s(L).messages,(v,Y)=>{var O,ue;return p(),T("div",{key:Y,class:"flex gap-3"},[S(be,{size:36,src:(O=v.attrs)==null?void 0:O.avatar,class:"flex-shrink-0 shadow-sm"},{default:M(()=>{var Z,re;return[ne(W((re=(Z=v.attrs)==null?void 0:Z.nickname)==null?void 0:re[0]),1)]}),_:2},1032,["src"]),h("div",Hc,[h("div",Uc,W((ue=v.attrs)==null?void 0:ue.nickname),1),h("div",jc,[(p(true),T(he,null,qe(v.children,(Z,re)=>(p(),K(s(tt),{key:re,element:Z,"bot-id":s(n),"channel-id":s(o)},null,8,["element","bot-id","channel-id"]))),128))])])])}),128))])]),_:1})]),_:1},8,["modelValue"])),s(d)?V("",true):(p(),K(H,{key:2,modelValue:s(I),"onUpdate:modelValue":y[9]||(y[9]=v=>yt(I)?I.value=v:null),title:"查看图片",width:"fit-content",class:"image-viewer-dialog",teleported:"",center:""},{default:M(()=>[h("div",Kc,[h("img",{src:s(_).url,class:"max-w-full max-h-[70vh] rounded shadow-lg"},null,8,qc),S(P,{type:"primary",icon:"Download",onClick:y[8]||(y[8]=v=>s(Ve)(s(_).url))},{default:M(()=>[...y[32]||(y[32]=[ne("下载图片",-1)])]),_:1})])]),_:1},8,["modelValue"])),s(d)?V("",true):(p(),K(H,{key:3,modelValue:s(w),"onUpdate:modelValue":y[13]||(y[13]=v=>yt(w)?w.value=v:null),title:"原始消息内容",width:"600px",center:"",teleported:"","align-center":""},{default:M(()=>[h("div",Wc,[S(ve,{modelValue:s(F).content,"onUpdate:modelValue":y[10]||(y[10]=v=>s(F).content=v),type:"textarea",rows:12,readonly:"",class:"raw-content-area"},null,8,["modelValue"]),h("div",Gc,[S(P,{type:"primary",onClick:y[11]||(y[11]=v=>s(lt)(s(F).content).then(()=>s(We).success("已复制到剪贴板")))},{default:M(()=>[...y[33]||(y[33]=[ne("复制全部内容",-1)])]),_:1}),S(P,{onClick:y[12]||(y[12]=v=>w.value=false)},{default:M(()=>[...y[34]||(y[34]=[ne("关闭",-1)])]),_:1})])])]),_:1},8,["modelValue"])),s(Pe).show?(p(),T("div",{key:4,class:"fixed bg-[var(--k-card-bg)] border border-[var(--k-border-color)] shadow-xl z-[2000] py-1.5 rounded-lg min-w-[140px] backdrop-blur-sm bg-opacity-90",style:He({left:s(Pe).x+"px",top:s(Pe).y+"px"})},[s(Pe).type==="bot"||s(Pe).type==="channel"?(p(),T(he,{key:0},[h("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[14]||(y[14]=v=>Ce("pin"))},[S(le,null,{default:M(()=>[S(s(ss))]),_:1}),ne(" "+W(s(Pe).isPinned?"取消置顶":"置顶"),1)]),h("div",{class:"px-4 py-2.5 cursor-pointer text-sm text-red-500 hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[15]||(y[15]=v=>Ce("delete"))},[S(le,null,{default:M(()=>[S(s(Wa))]),_:1}),y[35]||(y[35]=ne(" 删除数据 ",-1))])],64)):s(Pe).type==="message"?(p(),T(he,{key:1},[h("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[16]||(y[16]=v=>s(Ke)("copy"))},[S(le,null,{default:M(()=>[S(s(Ya))]),_:1}),y[36]||(y[36]=ne(" 复制文本 ",-1))]),h("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[17]||(y[17]=v=>s(Ke)("copy-raw"))},[S(le,null,{default:M(()=>[S(s(so))]),_:1}),y[37]||(y[37]=ne(" 查看原始消息 ",-1))]),h("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[18]||(y[18]=v=>s(Ke)("plus1"))},[S(le,null,{default:M(()=>[S(s(Ua))]),_:1}),y[38]||(y[38]=ne(" +1 复读 ",-1))]),h("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[19]||(y[19]=v=>s(Ke)("reply"))},[S(le,null,{default:M(()=>[S(s(ao))]),_:1}),y[39]||(y[39]=ne(" 回复 ",-1))]),s(Pe).hasMedia?(p(),T("div",{key:0,class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:y[20]||(y[20]=v=>s(Ke)("download"))},[S(le,null,{default:M(()=>[S(s(Za))]),_:1}),y[40]||(y[40]=ne(" 下载媒体 ",-1))])):V("",true)],64)):V("",true)],4)):V("",true)],4)}}}),Xc=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},Zc={},Jc={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"};function Qc(e,t){return p(),T("svg",Jc,[...t[0]||(t[0]=[h("path",{d:"M8 10.5H16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),h("path",{d:"M8 14H13.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),h("path",{d:"M17 3.33782C15.5291 2.48697 13.8214 2 12 2C6.47715 2 2 6.47715 2 12C2 13.5997 2.37562 15.1116 3.04346 16.4525C3.22094 16.8088 3.28001 17.2161 3.17712 17.6006L2.58151 19.8267C2.32295 20.793 3.20701 21.677 4.17335 21.4185L6.39939 20.8229C6.78393 20.72 7.19121 20.7791 7.54753 20.9565C8.88837 21.6244 10.4003 22 12 22C17.5228 22 22 17.5228 22 12C22 10.1786 21.513 8.47087 20.6622 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)])])}const ed=Xc(Zc,[["render",Qc]]);Pa.register("activity:chat",ed);const ad=e=>{e.page({name:"聊天室",path:"/chat-patch",desc:"",authority:4,icon:"activity:chat",component:ee({setup(){return()=>se(ge("k-layout"),{},{default:()=>se(Yc)})}})})};export{ad as default};