hermes-web-ui 0.2.5 → 0.2.6

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.
Files changed (80) hide show
  1. package/README.md +138 -205
  2. package/bin/hermes-web-ui.mjs +14 -2
  3. package/dist/assets/{Button-DBOPt_s1.js → Button-BHvh9zmj.js} +1 -1
  4. package/dist/assets/{ChannelsView-BU9QAub-.css → ChannelsView-C7Wor1FB.css} +1 -1
  5. package/dist/assets/ChannelsView-DZMniRoi.js +1 -0
  6. package/dist/assets/ChatView-Dt1eqp6-.js +127 -0
  7. package/dist/assets/{ChatView-D1SaZAvQ.css → ChatView-gR62J-Xr.css} +1 -1
  8. package/dist/assets/Close-DYPlamoH.js +45 -0
  9. package/dist/assets/{FormItem-De01hN-G.js → FormItem-C75Y2lpf.js} +1 -1
  10. package/dist/assets/Input-CS0p63GR.js +234 -0
  11. package/dist/assets/InputNumber-lHTE1DBf.js +13 -0
  12. package/dist/assets/JobsView-DoUtVQm_.css +1 -0
  13. package/dist/assets/JobsView-kGXDpDGq.js +2 -0
  14. package/dist/assets/LoginView-BXByybMK.css +1 -0
  15. package/dist/assets/LoginView-HQwDR5A7.js +1 -0
  16. package/dist/assets/{LogsView-BgmSycD4.js → LogsView-KPcTBGzh.js} +1 -1
  17. package/dist/assets/{MarkdownRenderer-z5xC7cOw.js → MarkdownRenderer-Bp-uAEtp.js} +1 -1
  18. package/dist/assets/{MemoryView-BUZGXC60.js → MemoryView-CWEya0jB.js} +1 -1
  19. package/dist/assets/{Modal-BLLYorfc.js → Modal-mFCAbKPD.js} +5 -5
  20. package/dist/assets/{ModelsView-ByryHyh7.js → ModelsView-BdPt2Mo_.js} +1 -1
  21. package/dist/assets/{ModelsView-DCR-0I10.css → ModelsView-DbBXgw4g.css} +1 -1
  22. package/dist/assets/Popconfirm-C2OzcGTX.js +16 -0
  23. package/dist/assets/Popover-CRZpNb8Q.js +117 -0
  24. package/dist/assets/Scrollbar-CA0Mq0os.js +77 -0
  25. package/dist/assets/Select-DLECSo9D.js +340 -0
  26. package/dist/assets/SettingRow-CsKwX-jv.js +1 -0
  27. package/dist/assets/{SettingsView-Y2Et1YHr.css → SettingsView-Citzr3ci.css} +1 -1
  28. package/dist/assets/SettingsView-DWXjfdpD.js +352 -0
  29. package/dist/assets/{SkillsView-CREfL6dQ.css → SkillsView-BNEWlriU.css} +1 -1
  30. package/dist/assets/{SkillsView-Blcv_g2_.js → SkillsView-Gb4tyJjH.js} +1 -1
  31. package/dist/assets/{Spin-DiwsqMEC.js → Spin-BbbA3R-G.js} +1 -1
  32. package/dist/assets/Suffix-BMwB7UJK.js +25 -0
  33. package/dist/assets/{Switch-Ce0Tgpcj.js → Switch-Xa0U6jwA.js} +2 -2
  34. package/dist/assets/{Tag-BUJuCRNX.js → Tag-NMAaTGW7.js} +2 -2
  35. package/dist/assets/TerminalView-B7iMIrM8.css +1 -0
  36. package/dist/assets/TerminalView-CvTXTM3W.js +36 -0
  37. package/dist/assets/{Tooltip-C65FWX0W.js → Tooltip-C9RmASqV.js} +1 -1
  38. package/dist/assets/{UsageView-CKMaJ5W0.css → UsageView-DKigFrVY.css} +1 -1
  39. package/dist/assets/UsageView-DiCHVrs8.js +1 -0
  40. package/dist/assets/Warning-CmJYhk3M.js +1 -0
  41. package/dist/assets/{_plugin-vue_export-helper-DkLSTLBi.js → _plugin-vue_export-helper-NLzeiXdV.js} +1 -1
  42. package/dist/assets/{app-DtII96CF.js → app-CQZfHgyy.js} +1 -1
  43. package/dist/assets/app-DeeNNd_a.js +1 -0
  44. package/dist/assets/{browser-oMT2KRlV.js → browser-DNwI2j4X.js} +1 -1
  45. package/dist/assets/{chat-nPd2Ount.js → chat-DnFbBAAK.js} +2 -2
  46. package/dist/assets/context-DLFTSrww.js +1 -0
  47. package/dist/assets/fade-in-scale-up.cssr-BMJXPg-3.js +1 -0
  48. package/dist/assets/index-DlNQjiQP.js +306 -0
  49. package/dist/assets/{index-8v0lZOmS.css → index-TVVcuwR0.css} +1 -1
  50. package/dist/assets/{jobs-fIgcRW5v.js → jobs-B7U8gZia.js} +1 -1
  51. package/dist/assets/{pinia-D41F8A9y.js → pinia-DKSOddVw.js} +1 -1
  52. package/dist/assets/{router-B0PaAFys.js → router-CpYvE976.js} +2 -2
  53. package/dist/assets/{sessions-Dsqr5aLA.js → sessions-DTV2WuAE.js} +1 -1
  54. package/dist/assets/{skills-COmQAkb0.js → skills-DwX9oZGG.js} +1 -1
  55. package/dist/assets/use-compitable-D2-fMbL2.js +1 -0
  56. package/dist/assets/{use-message-CG8KB3t0.js → use-message-17mZlZe3.js} +1 -1
  57. package/dist/index.html +22 -18
  58. package/dist/server/index.js +3 -0
  59. package/dist/server/routes/terminal.d.ts +2 -0
  60. package/dist/server/routes/terminal.js +288 -0
  61. package/package.json +28 -4
  62. package/dist/assets/ChannelsView-CIZXL3vY.js +0 -1
  63. package/dist/assets/ChatView-DvAYfM24.js +0 -142
  64. package/dist/assets/Close-Ck11Jegf.js +0 -45
  65. package/dist/assets/Input-CyvPny5v.js +0 -234
  66. package/dist/assets/InputNumber-v7Tkrv97.js +0 -13
  67. package/dist/assets/JobsView-Cch6Sv2Y.js +0 -2
  68. package/dist/assets/JobsView-DARa8llR.css +0 -1
  69. package/dist/assets/LoginView-Cp-xfwtv.css +0 -1
  70. package/dist/assets/LoginView-DsClZpVT.js +0 -1
  71. package/dist/assets/Popover-ZzeCeChJ.js +0 -117
  72. package/dist/assets/Select-CPQQRbMt.js +0 -340
  73. package/dist/assets/SettingRow-BvAmImkg.js +0 -1
  74. package/dist/assets/SettingsView-B_5pGI0B.js +0 -352
  75. package/dist/assets/Suffix-La8FFPWu.js +0 -101
  76. package/dist/assets/UsageView-MZGY4EKW.js +0 -1
  77. package/dist/assets/app-DVSCPXta.js +0 -1
  78. package/dist/assets/context-DRBiUHq_.js +0 -1
  79. package/dist/assets/index-DNNVWa6r.js +0 -306
  80. /package/dist/assets/{omit-C6t0n7Zy.js → omit-C4dR5R2G.js} +0 -0
@@ -1,142 +0,0 @@
1
- import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,K as c,L as l,N as u,Q as d,R as f,T as p,U as m,V as h,W as g,X as _,_ as v,ct as y,d as b,dt as x,g as S,gt as C,j as w,k as T,m as E,mt as D,ot as O,pt as k,q as A,st as j,w as M,y as N}from"./router-B0PaAFys.js";import{r as P,t as F}from"./_plugin-vue_export-helper-DkLSTLBi.js";import{t as ee}from"./logo-Cd-t_oGE.js";import{B as I,K as L,Q as R,W as z,Y as B,at as V,c as H,ct as U,dt as W,et as G,lt as K,n as q,ot as J,q as Y,s as X,tt as te,ut as Z,z as Q}from"./browser-oMT2KRlV.js";import{A as ne,C as re,D as ie,E as ae,L as oe,P as se,_ as ce,a as le,h as ue,i as de,l as fe,n as pe,o as me,r as he,t as ge,u as _e,w as ve}from"./Popover-ZzeCeChJ.js";import{_ as ye,c as be,g as xe,l as Se,r as Ce,v as we}from"./Suffix-La8FFPWu.js";import{c as Te,f as Ee,t as De}from"./Modal-BLLYorfc.js";import{r as Oe,t as $}from"./Button-DBOPt_s1.js";import{t as ke}from"./omit-C6t0n7Zy.js";import{t as Ae}from"./Input-CyvPny5v.js";import{t as je}from"./Tooltip-C65FWX0W.js";import{t as Me}from"./use-message-CG8KB3t0.js";import{t as Ne}from"./app-DtII96CF.js";import{t as Pe}from"./chat-nPd2Ount.js";import{i as Fe}from"./sessions-Dsqr5aLA.js";import{t as Ie}from"./MarkdownRenderer-z5xC7cOw.js";function Le(e={},t){let r=O({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:i,keyup:a}=e,o=e=>{switch(e.key){case`Control`:r.ctrl=!0;break;case`Meta`:r.command=!0,r.win=!0;break;case`Shift`:r.shift=!0;break;case`Tab`:r.tab=!0;break}i!==void 0&&Object.keys(i).forEach(t=>{if(t!==e.key)return;let n=i[t];if(typeof n==`function`)n(e);else{let{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}})},s=e=>{switch(e.key){case`Control`:r.ctrl=!1;break;case`Meta`:r.command=!1,r.win=!1;break;case`Shift`:r.shift=!1;break;case`Tab`:r.tab=!1;break}a!==void 0&&Object.keys(a).forEach(t=>{if(t!==e.key)return;let n=a[t];if(typeof n==`function`)n(e);else{let{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}})},c=()=>{(t===void 0||t.value)&&(we(`keydown`,document,o),we(`keyup`,document,s)),t!==void 0&&_(t,e=>{e?(we(`keydown`,document,o),we(`keyup`,document,s)):(ye(`keydown`,document,o),ye(`keyup`,document,s))})};return se()?(n(c),h(()=>{(t===void 0||t.value)&&(ye(`keydown`,document,o),ye(`keyup`,document,s))})):c(),j(r)}function Re(e,t,n){if(!t)return e;let r=y(e.value),i=null;return _(e,e=>{i!==null&&window.clearTimeout(i),e===!0?n&&!n.value?r.value=!0:i=window.setTimeout(()=>{r.value=!0},t):r.value=!1}),r}function ze(e){return t=>{t?e.value=t.$el:e.value=null}}var Be=w({name:`ChevronRight`,render(){return u(`svg`,{viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},u(`path`,{d:`M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z`,fill:`currentColor`}))}}),Ve={padding:`4px 0`,optionIconSizeSmall:`14px`,optionIconSizeMedium:`16px`,optionIconSizeLarge:`16px`,optionIconSizeHuge:`18px`,optionSuffixWidthSmall:`14px`,optionSuffixWidthMedium:`14px`,optionSuffixWidthLarge:`16px`,optionSuffixWidthHuge:`16px`,optionIconSuffixWidthSmall:`32px`,optionIconSuffixWidthMedium:`32px`,optionIconSuffixWidthLarge:`36px`,optionIconSuffixWidthHuge:`36px`,optionPrefixWidthSmall:`14px`,optionPrefixWidthMedium:`14px`,optionPrefixWidthLarge:`16px`,optionPrefixWidthHuge:`16px`,optionIconPrefixWidthSmall:`36px`,optionIconPrefixWidthMedium:`36px`,optionIconPrefixWidthLarge:`40px`,optionIconPrefixWidthHuge:`40px`};function He(e){let{primaryColor:t,textColor2:n,dividerColor:r,hoverColor:i,popoverColor:a,invertedColor:o,borderRadius:s,fontSizeSmall:c,fontSizeMedium:l,fontSizeLarge:u,fontSizeHuge:d,heightSmall:f,heightMedium:p,heightLarge:m,heightHuge:h,textColor3:g,opacityDisabled:_}=e;return Object.assign(Object.assign({},Ve),{optionHeightSmall:f,optionHeightMedium:p,optionHeightLarge:m,optionHeightHuge:h,borderRadius:s,fontSizeSmall:c,fontSizeMedium:l,fontSizeLarge:u,fontSizeHuge:d,optionTextColor:n,optionTextColorHover:n,optionTextColorActive:t,optionTextColorChildActive:t,color:a,dividerColor:r,suffixColor:n,prefixColor:n,optionColorHover:i,optionColorActive:te(t,{alpha:.1}),groupHeaderTextColor:g,optionTextColorInverted:`#BBB`,optionTextColorHoverInverted:`#FFF`,optionTextColorActiveInverted:`#FFF`,optionTextColorChildActiveInverted:`#FFF`,colorInverted:o,dividerColorInverted:`#BBB`,suffixColorInverted:`#BBB`,prefixColorInverted:`#BBB`,optionColorHoverInverted:t,optionColorActiveInverted:t,groupHeaderTextColorInverted:`#AAA`,optionOpacityDisabled:_})}var Ue=X({name:`Dropdown`,common:q,peers:{Popover:de},self:He}),We=R(`n-dropdown-menu`),Ge=R(`n-dropdown`),Ke=R(`n-dropdown-option`),qe=w({name:`DropdownDivider`,props:{clsPrefix:{type:String,required:!0}},render(){return u(`div`,{class:`${this.clsPrefix}-dropdown-divider`})}}),Je=w({name:`DropdownGroupHeader`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){let{showIconRef:e,hasSubmenuRef:t}=o(We),{renderLabelRef:n,labelFieldRef:r,nodePropsRef:i,renderOptionRef:a}=o(Ge);return{labelField:r,showIcon:e,hasSubmenu:t,renderLabel:n,nodeProps:i,renderOption:a}},render(){let{clsPrefix:e,hasSubmenu:t,showIcon:n,nodeProps:r,renderLabel:i,renderOption:a}=this,{rawNode:o}=this.tmNode,s=u(`div`,Object.assign({class:`${e}-dropdown-option`},r?.(o)),u(`div`,{class:`${e}-dropdown-option-body ${e}-dropdown-option-body--group`},u(`div`,{"data-dropdown-option":!0,class:[`${e}-dropdown-option-body__prefix`,n&&`${e}-dropdown-option-body__prefix--show-icon`]},fe(o.icon)),u(`div`,{class:`${e}-dropdown-option-body__label`,"data-dropdown-option":!0},i?i(o):fe(o.title??o[this.labelField])),u(`div`,{class:[`${e}-dropdown-option-body__suffix`,t&&`${e}-dropdown-option-body__suffix--has-submenu`],"data-dropdown-option":!0})));return a?a({node:s,option:o}):s}});function Ye(e){let{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:a,opacity5:o}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:a,opacity5Depth:o}}var Xe={name:`Icon`,common:q,self:Ye},Ze=J(`icon`,`
2
- height: 1em;
3
- width: 1em;
4
- line-height: 1em;
5
- text-align: center;
6
- display: inline-block;
7
- position: relative;
8
- fill: currentColor;
9
- `,[K(`color-transition`,{transition:`color .3s var(--n-bezier)`}),K(`depth`,{color:`var(--n-color)`},[V(`svg`,{opacity:`var(--n-opacity)`,transition:`opacity .3s var(--n-bezier)`})]),V(`svg`,{height:`1em`,width:`1em`})]),Qe=w({_n_icon__:!0,name:`Icon`,inheritAttrs:!1,props:Object.assign(Object.assign({},H.props),{depth:[String,Number],size:[Number,String],color:String,component:[Object,Function]}),setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:n}=I(e),i=H(`Icon`,`-icon`,Ze,Xe,e,t),a=r(()=>{let{depth:t}=e,{common:{cubicBezierEaseInOut:n},self:r}=i.value;if(t!==void 0){let{color:e,[`opacity${t}Depth`]:i}=r;return{"--n-bezier":n,"--n-color":e,"--n-opacity":i}}return{"--n-bezier":n,"--n-color":``,"--n-opacity":``}}),o=n?Q(`icon`,r(()=>`${e.depth||`d`}`),a,e):void 0;return{mergedClsPrefix:t,mergedStyle:r(()=>{let{size:t,color:n}=e;return{fontSize:ue(t),color:n}}),cssVars:n?void 0:a,themeClass:o?.themeClass,onRender:o?.onRender}},render(){let{$parent:e,depth:t,mergedClsPrefix:n,component:r,onRender:i,themeClass:a}=this;return e?.$options?._n_icon__&&B(`icon`,"don't wrap `n-icon` inside `n-icon`"),i?.(),u(`i`,l(this.$attrs,{role:`img`,class:[`${n}-icon`,a,{[`${n}-icon--depth`]:t,[`${n}-icon--color-transition`]:t!==void 0}],style:[this.cssVars,this.mergedStyle]}),r?u(r):this.$slots)}});function $e(e,t){return e.type===`submenu`||e.type===void 0&&e[t]!==void 0}function et(e){return e.type===`group`}function tt(e){return e.type===`divider`}function nt(e){return e.type===`render`}var rt=w({name:`DropdownOption`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null},placement:{type:String,default:`right-start`},props:Object,scrollable:Boolean},setup(e){let t=o(Ge),{hoverKeyRef:n,keyboardKeyRef:i,lastToggledSubmenuKeyRef:a,pendingKeyPathRef:s,activeKeyPathRef:l,animatedRef:u,mergedShowRef:d,renderLabelRef:f,renderIconRef:p,labelFieldRef:m,childrenFieldRef:h,renderOptionRef:g,nodePropsRef:_,menuPropsRef:v}=t,b=o(Ke,null),x=o(We),S=o(ae),C=r(()=>e.tmNode.rawNode),w=r(()=>{let{value:t}=h;return $e(e.tmNode.rawNode,t)}),T=r(()=>{let{disabled:t}=e.tmNode;return t}),E=Re(r(()=>{if(!w.value)return!1;let{key:t,disabled:r}=e.tmNode;if(r)return!1;let{value:o}=n,{value:c}=i,{value:l}=a,{value:u}=s;return o===null?c===null?l===null?!1:u.includes(t):u.includes(t)&&u[u.length-1]!==t:u.includes(t)}),300,r(()=>i.value===null&&!u.value)),D=r(()=>!!b?.enteringSubmenuRef.value),O=y(!1);c(Ke,{enteringSubmenuRef:O});function k(){O.value=!0}function A(){O.value=!1}function j(){let{parentKey:t,tmNode:r}=e;r.disabled||d.value&&(a.value=t,i.value=null,n.value=r.key)}function M(){let{tmNode:t}=e;t.disabled||d.value&&n.value!==t.key&&j()}function N(t){if(e.tmNode.disabled||!d.value)return;let{relatedTarget:r}=t;r&&!oe({target:r},`dropdownOption`)&&!oe({target:r},`scrollbarRail`)&&(n.value=null)}function P(){let{value:n}=w,{tmNode:r}=e;d.value&&!n&&!r.disabled&&(t.doSelect(r.key,r.rawNode),t.doUpdateShow(!1))}return{labelField:m,renderLabel:f,renderIcon:p,siblingHasIcon:x.showIconRef,siblingHasSubmenu:x.hasSubmenuRef,menuProps:v,popoverBody:S,animated:u,mergedShowSubmenu:r(()=>E.value&&!D.value),rawNode:C,hasSubmenu:w,pending:G(()=>{let{value:t}=s,{key:n}=e.tmNode;return t.includes(n)}),childActive:G(()=>{let{value:t}=l,{key:n}=e.tmNode,r=t.findIndex(e=>n===e);return r===-1?!1:r<t.length-1}),active:G(()=>{let{value:t}=l,{key:n}=e.tmNode,r=t.findIndex(e=>n===e);return r===-1?!1:r===t.length-1}),mergedDisabled:T,renderOption:g,nodeProps:_,handleClick:P,handleMouseMove:M,handleMouseEnter:j,handleMouseLeave:N,handleSubmenuBeforeEnter:k,handleSubmenuAfterEnter:A}},render(){let{animated:e,rawNode:t,mergedShowSubmenu:n,clsPrefix:r,siblingHasIcon:i,siblingHasSubmenu:a,renderLabel:o,renderIcon:s,renderOption:c,nodeProps:d,props:f,scrollable:p}=this,m=null;if(n){let e=this.menuProps?.call(this,t,t.children);m=u(ot,Object.assign({},e,{clsPrefix:r,scrollable:this.scrollable,tmNodes:this.tmNode.children,parentKey:this.tmNode.key}))}let h={class:[`${r}-dropdown-option-body`,this.pending&&`${r}-dropdown-option-body--pending`,this.active&&`${r}-dropdown-option-body--active`,this.childActive&&`${r}-dropdown-option-body--child-active`,this.mergedDisabled&&`${r}-dropdown-option-body--disabled`],onMousemove:this.handleMouseMove,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onClick:this.handleClick},g=d?.(t),_=u(`div`,Object.assign({class:[`${r}-dropdown-option`,g?.class],"data-dropdown-option":!0},g),u(`div`,l(h,f),[u(`div`,{class:[`${r}-dropdown-option-body__prefix`,i&&`${r}-dropdown-option-body__prefix--show-icon`]},[s?s(t):fe(t.icon)]),u(`div`,{"data-dropdown-option":!0,class:`${r}-dropdown-option-body__label`},o?o(t):fe(t[this.labelField]??t.title)),u(`div`,{"data-dropdown-option":!0,class:[`${r}-dropdown-option-body__suffix`,a&&`${r}-dropdown-option-body__suffix--has-submenu`]},this.hasSubmenu?u(Qe,null,{default:()=>u(Be,null)}):null)]),this.hasSubmenu?u(ve,null,{default:()=>[u(re,null,{default:()=>u(`div`,{class:`${r}-dropdown-offset-container`},u(ce,{show:this.mergedShowSubmenu,placement:this.placement,to:p&&this.popoverBody||void 0,teleportDisabled:!p},{default:()=>u(`div`,{class:`${r}-dropdown-menu-wrapper`},e?u(b,{onBeforeEnter:this.handleSubmenuBeforeEnter,onAfterEnter:this.handleSubmenuAfterEnter,name:`fade-in-scale-up-transition`,appear:!0},{default:()=>m}):m)}))})]}):null);return c?c({node:_,option:t}):_}}),it=w({name:`NDropdownGroup`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null}},render(){let{tmNode:e,parentKey:t,clsPrefix:n}=this,{children:r}=e;return u(N,null,u(Je,{clsPrefix:n,tmNode:e,key:e.key}),r?.map(e=>{let{rawNode:r}=e;return r.show===!1?null:tt(r)?u(qe,{clsPrefix:n,key:e.key}):e.isGroup?(B(`dropdown`,"`group` node is not allowed to be put in `group` node."),null):u(rt,{clsPrefix:n,tmNode:e,parentKey:t,key:e.key})}))}}),at=w({name:`DropdownRenderOption`,props:{tmNode:{type:Object,required:!0}},render(){let{rawNode:{render:e,props:t}}=this.tmNode;return u(`div`,t,[e?.()])}}),ot=w({name:`DropdownMenu`,props:{scrollable:Boolean,showArrow:Boolean,arrowStyle:[String,Object],clsPrefix:{type:String,required:!0},tmNodes:{type:Array,default:()=>[]},parentKey:{type:[String,Number],default:null}},setup(e){let{renderIconRef:t,childrenFieldRef:n}=o(Ge);c(We,{showIconRef:r(()=>{let n=t.value;return e.tmNodes.some(e=>{if(e.isGroup)return e.children?.some(({rawNode:e})=>n?n(e):e.icon);let{rawNode:t}=e;return n?n(t):t.icon})}),hasSubmenuRef:r(()=>{let{value:t}=n;return e.tmNodes.some(e=>{if(e.isGroup)return e.children?.some(({rawNode:e})=>$e(e,t));let{rawNode:n}=e;return $e(n,t)})})});let i=y(null);return c(ie,null),c(ne,null),c(ae,i),{bodyRef:i}},render(){let{parentKey:e,clsPrefix:t,scrollable:n}=this,r=this.tmNodes.map(r=>{let{rawNode:i}=r;return i.show===!1?null:nt(i)?u(at,{tmNode:r,key:r.key}):tt(i)?u(qe,{clsPrefix:t,key:r.key}):et(i)?u(it,{clsPrefix:t,tmNode:r,parentKey:e,key:r.key}):u(rt,{clsPrefix:t,tmNode:r,parentKey:e,key:r.key,props:i.props,scrollable:n})});return u(`div`,{class:[`${t}-dropdown-menu`,n&&`${t}-dropdown-menu--scrollable`],ref:`bodyRef`},n?u(Ce,{contentClass:`${t}-dropdown-menu__content`},{default:()=>r}):r,this.showArrow?he({clsPrefix:t,arrowStyle:this.arrowStyle,arrowClass:void 0,arrowWrapperClass:void 0,arrowWrapperStyle:void 0}):null)}}),st=J(`dropdown-menu`,`
10
- transform-origin: var(--v-transform-origin);
11
- background-color: var(--n-color);
12
- border-radius: var(--n-border-radius);
13
- box-shadow: var(--n-box-shadow);
14
- position: relative;
15
- transition:
16
- background-color .3s var(--n-bezier),
17
- box-shadow .3s var(--n-bezier);
18
- `,[le(),J(`dropdown-option`,`
19
- position: relative;
20
- `,[V(`a`,`
21
- text-decoration: none;
22
- color: inherit;
23
- outline: none;
24
- `,[V(`&::before`,`
25
- content: "";
26
- position: absolute;
27
- left: 0;
28
- right: 0;
29
- top: 0;
30
- bottom: 0;
31
- `)]),J(`dropdown-option-body`,`
32
- display: flex;
33
- cursor: pointer;
34
- position: relative;
35
- height: var(--n-option-height);
36
- line-height: var(--n-option-height);
37
- font-size: var(--n-font-size);
38
- color: var(--n-option-text-color);
39
- transition: color .3s var(--n-bezier);
40
- `,[V(`&::before`,`
41
- content: "";
42
- position: absolute;
43
- top: 0;
44
- bottom: 0;
45
- left: 4px;
46
- right: 4px;
47
- transition: background-color .3s var(--n-bezier);
48
- border-radius: var(--n-border-radius);
49
- `),Z(`disabled`,[K(`pending`,`
50
- color: var(--n-option-text-color-hover);
51
- `,[U(`prefix, suffix`,`
52
- color: var(--n-option-text-color-hover);
53
- `),V(`&::before`,`background-color: var(--n-option-color-hover);`)]),K(`active`,`
54
- color: var(--n-option-text-color-active);
55
- `,[U(`prefix, suffix`,`
56
- color: var(--n-option-text-color-active);
57
- `),V(`&::before`,`background-color: var(--n-option-color-active);`)]),K(`child-active`,`
58
- color: var(--n-option-text-color-child-active);
59
- `,[U(`prefix, suffix`,`
60
- color: var(--n-option-text-color-child-active);
61
- `)])]),K(`disabled`,`
62
- cursor: not-allowed;
63
- opacity: var(--n-option-opacity-disabled);
64
- `),K(`group`,`
65
- font-size: calc(var(--n-font-size) - 1px);
66
- color: var(--n-group-header-text-color);
67
- `,[U(`prefix`,`
68
- width: calc(var(--n-option-prefix-width) / 2);
69
- `,[K(`show-icon`,`
70
- width: calc(var(--n-option-icon-prefix-width) / 2);
71
- `)])]),U(`prefix`,`
72
- width: var(--n-option-prefix-width);
73
- display: flex;
74
- justify-content: center;
75
- align-items: center;
76
- color: var(--n-prefix-color);
77
- transition: color .3s var(--n-bezier);
78
- z-index: 1;
79
- `,[K(`show-icon`,`
80
- width: var(--n-option-icon-prefix-width);
81
- `),J(`icon`,`
82
- font-size: var(--n-option-icon-size);
83
- `)]),U(`label`,`
84
- white-space: nowrap;
85
- flex: 1;
86
- z-index: 1;
87
- `),U(`suffix`,`
88
- box-sizing: border-box;
89
- flex-grow: 0;
90
- flex-shrink: 0;
91
- display: flex;
92
- justify-content: flex-end;
93
- align-items: center;
94
- min-width: var(--n-option-suffix-width);
95
- padding: 0 8px;
96
- transition: color .3s var(--n-bezier);
97
- color: var(--n-suffix-color);
98
- z-index: 1;
99
- `,[K(`has-submenu`,`
100
- width: var(--n-option-icon-suffix-width);
101
- `),J(`icon`,`
102
- font-size: var(--n-option-icon-size);
103
- `)]),J(`dropdown-menu`,`pointer-events: all;`)]),J(`dropdown-offset-container`,`
104
- pointer-events: none;
105
- position: absolute;
106
- left: 0;
107
- right: 0;
108
- top: -4px;
109
- bottom: -4px;
110
- `)]),J(`dropdown-divider`,`
111
- transition: background-color .3s var(--n-bezier);
112
- background-color: var(--n-divider-color);
113
- height: 1px;
114
- margin: 4px 0;
115
- `),J(`dropdown-menu-wrapper`,`
116
- transform-origin: var(--v-transform-origin);
117
- width: fit-content;
118
- `),V(`>`,[J(`scrollbar`,`
119
- height: inherit;
120
- max-height: inherit;
121
- `)]),Z(`scrollable`,`
122
- padding: var(--n-padding);
123
- `),K(`scrollable`,[U(`content`,`
124
- padding: var(--n-padding);
125
- `)])]),ct={animated:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},size:String,inverted:Boolean,placement:{type:String,default:`bottom`},onSelect:[Function,Array],options:{type:Array,default:()=>[]},menuProps:Function,showArrow:Boolean,renderLabel:Function,renderIcon:Function,renderOption:Function,nodeProps:Function,labelField:{type:String,default:`label`},keyField:{type:String,default:`key`},childrenField:{type:String,default:`children`},value:[String,Number]},lt=Object.keys(pe),ut=w({name:`Dropdown`,inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign({},pe),ct),H.props),setup(e){let t=y(!1),n=xe(x(e,`show`),t),i=r(()=>{let{keyField:t,childrenField:n}=e;return me(e.options,{getKey(e){return e[t]},getDisabled(e){return e.disabled===!0},getIgnored(e){return e.type===`divider`||e.type===`render`},getChildren(e){return e[n]}})}),a=r(()=>i.value.treeNodes),o=y(null),s=y(null),l=y(null),u=r(()=>o.value??s.value??l.value??null),d=r(()=>i.value.getPath(u.value).keyPath),f=r(()=>i.value.getPath(e.value).keyPath),p=G(()=>e.keyboard&&n.value);Le({keydown:{ArrowUp:{prevent:!0,handler:O},ArrowRight:{prevent:!0,handler:D},ArrowDown:{prevent:!0,handler:k},ArrowLeft:{prevent:!0,handler:E},Enter:{prevent:!0,handler:A},Escape:T}},p);let{mergedClsPrefixRef:m,inlineThemeDisabled:h,mergedComponentPropsRef:g}=I(e),v=r(()=>e.size||g?.value?.Dropdown?.size||`medium`),b=H(`Dropdown`,`-dropdown`,st,Ue,e,m);c(Ge,{labelFieldRef:x(e,`labelField`),childrenFieldRef:x(e,`childrenField`),renderLabelRef:x(e,`renderLabel`),renderIconRef:x(e,`renderIcon`),hoverKeyRef:o,keyboardKeyRef:s,lastToggledSubmenuKeyRef:l,pendingKeyPathRef:d,activeKeyPathRef:f,animatedRef:x(e,`animated`),mergedShowRef:n,nodePropsRef:x(e,`nodeProps`),renderOptionRef:x(e,`renderOption`),menuPropsRef:x(e,`menuProps`),doSelect:S,doUpdateShow:C}),_(n,t=>{!e.animated&&!t&&w()});function S(t,n){let{onSelect:r}=e;r&&Y(r,t,n)}function C(n){let{"onUpdate:show":r,onUpdateShow:i}=e;r&&Y(r,n),i&&Y(i,n),t.value=n}function w(){o.value=null,s.value=null,l.value=null}function T(){C(!1)}function E(){M(`left`)}function D(){M(`right`)}function O(){M(`up`)}function k(){M(`down`)}function A(){let e=j();e?.isLeaf&&n.value&&(S(e.key,e.rawNode),C(!1))}function j(){let{value:e}=i,{value:t}=u;return!e||t===null?null:e.getNode(t)??null}function M(e){let{value:t}=u,{value:{getFirstAvailableNode:n}}=i,r=null;if(t===null){let e=n();e!==null&&(r=e.key)}else{let t=j();if(t){let n;switch(e){case`down`:n=t.getNext();break;case`up`:n=t.getPrev();break;case`right`:n=t.getChild();break;case`left`:n=t.getParent();break}n&&(r=n.key)}}r!==null&&(o.value=null,s.value=r)}let N=r(()=>{let{inverted:t}=e,n=v.value,{common:{cubicBezierEaseInOut:r},self:i}=b.value,{padding:a,dividerColor:o,borderRadius:s,optionOpacityDisabled:c,[W(`optionIconSuffixWidth`,n)]:l,[W(`optionSuffixWidth`,n)]:u,[W(`optionIconPrefixWidth`,n)]:d,[W(`optionPrefixWidth`,n)]:f,[W(`fontSize`,n)]:p,[W(`optionHeight`,n)]:m,[W(`optionIconSize`,n)]:h}=i,g={"--n-bezier":r,"--n-font-size":p,"--n-padding":a,"--n-border-radius":s,"--n-option-height":m,"--n-option-prefix-width":f,"--n-option-icon-prefix-width":d,"--n-option-suffix-width":u,"--n-option-icon-suffix-width":l,"--n-option-icon-size":h,"--n-divider-color":o,"--n-option-opacity-disabled":c};return t?(g[`--n-color`]=i.colorInverted,g[`--n-option-color-hover`]=i.optionColorHoverInverted,g[`--n-option-color-active`]=i.optionColorActiveInverted,g[`--n-option-text-color`]=i.optionTextColorInverted,g[`--n-option-text-color-hover`]=i.optionTextColorHoverInverted,g[`--n-option-text-color-active`]=i.optionTextColorActiveInverted,g[`--n-option-text-color-child-active`]=i.optionTextColorChildActiveInverted,g[`--n-prefix-color`]=i.prefixColorInverted,g[`--n-suffix-color`]=i.suffixColorInverted,g[`--n-group-header-text-color`]=i.groupHeaderTextColorInverted):(g[`--n-color`]=i.color,g[`--n-option-color-hover`]=i.optionColorHover,g[`--n-option-color-active`]=i.optionColorActive,g[`--n-option-text-color`]=i.optionTextColor,g[`--n-option-text-color-hover`]=i.optionTextColorHover,g[`--n-option-text-color-active`]=i.optionTextColorActive,g[`--n-option-text-color-child-active`]=i.optionTextColorChildActive,g[`--n-prefix-color`]=i.prefixColor,g[`--n-suffix-color`]=i.suffixColor,g[`--n-group-header-text-color`]=i.groupHeaderTextColor),g}),P=h?Q(`dropdown`,r(()=>`${v.value[0]}${e.inverted?`i`:``}`),N,e):void 0;return{mergedClsPrefix:m,mergedTheme:b,mergedSize:v,tmNodes:a,mergedShow:n,handleAfterLeave:()=>{e.animated&&w()},doUpdateShow:C,cssVars:h?void 0:N,themeClass:P?.themeClass,onRender:P?.onRender}},render(){let e=(e,t,n,r,i)=>{var a;let{mergedClsPrefix:o,menuProps:s}=this;(a=this.onRender)==null||a.call(this);let c=s?.(void 0,this.tmNodes.map(e=>e.rawNode))||{},d={ref:ze(t),class:[e,`${o}-dropdown`,`${o}-dropdown--${this.mergedSize}-size`,this.themeClass],clsPrefix:o,tmNodes:this.tmNodes,style:[...n,this.cssVars],showArrow:this.showArrow,arrowStyle:this.arrowStyle,scrollable:this.scrollable,onMouseenter:r,onMouseleave:i};return u(ot,l(this.$attrs,d,c))},{mergedTheme:t}=this,n={show:this.mergedShow,theme:t.peers.Popover,themeOverrides:t.peerOverrides.Popover,internalOnAfterLeave:this.handleAfterLeave,internalRenderBody:e,onUpdateShow:this.doUpdateShow,"onUpdate:show":void 0};return u(ge,Object.assign({},_e(this.$props,lt),n),{trigger:()=>{var e;return(e=this.$slots).default?.call(e)}})}}),dt={iconSize:`22px`};function ft(e){let{fontSize:t,warningColor:n}=e;return Object.assign(Object.assign({},dt),{fontSize:t,iconColor:n})}var pt=X({name:`Popconfirm`,common:q,peers:{Button:Oe,Popover:de},self:ft}),mt=R(`n-popconfirm`),ht={positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0}},gt=Ee(ht),_t=w({name:`NPopconfirmPanel`,props:ht,setup(e){let{localeRef:t}=Se(`Popconfirm`),{inlineThemeDisabled:n}=I(),{mergedClsPrefixRef:i,mergedThemeRef:a,props:s}=o(mt),c=r(()=>{let{common:{cubicBezierEaseInOut:e},self:{fontSize:t,iconSize:n,iconColor:r}}=a.value;return{"--n-bezier":e,"--n-font-size":t,"--n-icon-size":n,"--n-icon-color":r}}),l=n?Q(`popconfirm-panel`,void 0,c,s):void 0;return Object.assign(Object.assign({},Se(`Popconfirm`)),{mergedClsPrefix:i,cssVars:n?void 0:c,localizedPositiveText:r(()=>e.positiveText||t.value.positiveText),localizedNegativeText:r(()=>e.negativeText||t.value.negativeText),positiveButtonProps:x(s,`positiveButtonProps`),negativeButtonProps:x(s,`negativeButtonProps`),handlePositiveClick(t){e.onPositiveClick(t)},handleNegativeClick(t){e.onNegativeClick(t)},themeClass:l?.themeClass,onRender:l?.onRender})},render(){var e;let{mergedClsPrefix:t,showIcon:n,$slots:r}=this,i=z(r.action,()=>this.negativeText===null&&this.positiveText===null?[]:[this.negativeText!==null&&u($,Object.assign({size:`small`,onClick:this.handleNegativeClick},this.negativeButtonProps),{default:()=>this.localizedNegativeText}),this.positiveText!==null&&u($,Object.assign({size:`small`,type:`primary`,onClick:this.handlePositiveClick},this.positiveButtonProps),{default:()=>this.localizedPositiveText})]);return(e=this.onRender)==null||e.call(this),u(`div`,{class:[`${t}-popconfirm__panel`,this.themeClass],style:this.cssVars},L(r.default,e=>n||e?u(`div`,{class:`${t}-popconfirm__body`},n?u(`div`,{class:`${t}-popconfirm__icon`},z(r.icon,()=>[u(be,{clsPrefix:t},{default:()=>u(Te,null)})])):null,e):null),i?u(`div`,{class:[`${t}-popconfirm__action`]},i):null)}}),vt=J(`popconfirm`,[U(`body`,`
126
- font-size: var(--n-font-size);
127
- display: flex;
128
- align-items: center;
129
- flex-wrap: nowrap;
130
- position: relative;
131
- `,[U(`icon`,`
132
- display: flex;
133
- font-size: var(--n-icon-size);
134
- color: var(--n-icon-color);
135
- transition: color .3s var(--n-bezier);
136
- margin: 0 8px 0 0;
137
- `)]),U(`action`,`
138
- display: flex;
139
- justify-content: flex-end;
140
- `,[V(`&:not(:first-child)`,`margin-top: 8px`),J(`button`,[V(`&:not(:last-child)`,`margin-right: 8px;`)])])]),yt=w({name:`Popconfirm`,props:Object.assign(Object.assign(Object.assign({},H.props),pe),{positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},trigger:{type:String,default:`click`},positiveButtonProps:Object,negativeButtonProps:Object,onPositiveClick:Function,onNegativeClick:Function}),slots:Object,__popover__:!0,setup(e){let{mergedClsPrefixRef:t}=I(),n=H(`Popconfirm`,`-popconfirm`,vt,pt,e,t),r=y(null);function i(t){if(!r.value?.getMergedShow())return;let{onPositiveClick:n,"onUpdate:show":i}=e;Promise.resolve(n?n(t):!0).then(e=>{var t;e!==!1&&((t=r.value)==null||t.setShow(!1),i&&Y(i,!1))})}function a(t){if(!r.value?.getMergedShow())return;let{onNegativeClick:n,"onUpdate:show":i}=e;Promise.resolve(n?n(t):!0).then(e=>{var t;e!==!1&&((t=r.value)==null||t.setShow(!1),i&&Y(i,!1))})}return c(mt,{mergedThemeRef:n,mergedClsPrefixRef:t,props:e}),{setShow(e){var t;(t=r.value)==null||t.setShow(e)},syncPosition(){var e;(e=r.value)==null||e.syncPosition()},mergedTheme:n,popoverInstRef:r,handlePositiveClick:i,handleNegativeClick:a}},render(){let{$slots:e,$props:t,mergedTheme:n}=this;return u(ge,Object.assign({},ke(t,gt),{theme:n.peers.Popover,themeOverrides:n.peerOverrides.Popover,internalExtraClass:[`popconfirm`],ref:`popoverInstRef`}),{trigger:e.trigger,default:()=>{let n=_e(t,gt);return u(_t,Object.assign({},n,{onPositiveClick:this.handlePositiveClick,onNegativeClick:this.handleNegativeClick}),e)}})}}),bt={class:`chat-input-area`},xt={key:0,class:`attachment-previews`},St=[`src`,`alt`],Ct={key:1,class:`attachment-file`},wt={class:`file-name`},Tt={class:`file-size`},Et=[`onClick`],Dt=[`placeholder`],Ot={class:`input-actions`},kt=F(w({__name:`ChatInput`,setup(n){let o=Pe(),{t:c}=P(),l=y(``),u=y(),f=y(),m=y([]),h=y(!1),g=y(0),_=y(!1),v=r(()=>l.value.trim()||m.value.length>0);function b(e){if(m.value.find(t=>t.name===e.name))return;let t=Date.now().toString(36)+Math.random().toString(36).slice(2,8),n=URL.createObjectURL(e);m.value.push({id:t,name:e.name,type:e.type,size:e.size,url:n,file:e})}function x(){f.value?.click()}function S(e){let t=e.target;if(t.files){for(let e of t.files)b(e);t.value=``}}function w(e){let t=Array.from(e.clipboardData?.items||[]).filter(e=>e.type.startsWith(`image/`));if(t.length){e.preventDefault();for(let e of t){let t=e.getAsFile();if(!t)continue;let n=e.type.split(`/`)[1]||`png`;b(new File([t],`pasted-${Date.now()}.${n}`,{type:e.type}))}}}function O(e){e.preventDefault()}function j(e){e.preventDefault(),e.dataTransfer?.types.includes(`Files`)&&(g.value++,h.value=!0)}function F(){g.value--,g.value<=0&&(g.value=0,h.value=!1)}function ee(e){e.preventDefault(),g.value=0,h.value=!1;let t=Array.from(e.dataTransfer?.files||[]);if(t.length){for(let e of t)b(e);u.value?.focus()}}function I(){let e=l.value.trim();!e&&m.value.length===0||(o.sendMessage(e,m.value.length>0?m.value:void 0),l.value=``,m.value=[],u.value&&(u.value.style.height=`auto`))}function L(){_.value=!0}function R(){requestAnimationFrame(()=>{_.value=!1})}function z(e){return _.value||e.isComposing||e.keyCode===229}function B(e){e.key!==`Enter`||e.shiftKey||z(e)||(e.preventDefault(),I())}function V(e){let t=e.target;t.style.height=`auto`,t.style.height=Math.min(t.scrollHeight,100)+`px`}function H(e){let t=m.value.findIndex(t=>t.id===e);t!==-1&&(URL.revokeObjectURL(m.value[t].url),m.value.splice(t,1))}function U(e){return e<1024?e+` B`:e<1024*1024?(e/1024).toFixed(1)+` KB`:(e/(1024*1024)).toFixed(1)+` MB`}function W(e){return e.startsWith(`image/`)}return(n,r)=>(s(),i(`div`,bt,[m.value.length>0?(s(),i(`div`,xt,[(s(!0),i(N,null,A(m.value,e=>(s(),i(`div`,{key:e.id,class:D([`attachment-preview`,{image:W(e.type)}])},[W(e.type)?(s(),i(`img`,{key:0,src:e.url,alt:e.name,class:`attachment-thumb`},null,8,St)):(s(),i(`div`,Ct,[r[2]||=M(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[M(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),M(`polyline`,{points:`14 2 14 8 20 8`})],-1),M(`span`,wt,C(e.name),1),M(`span`,Tt,C(U(e.size)),1)])),M(`button`,{class:`attachment-remove`,onClick:t=>H(e.id)},[...r[3]||=[M(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[M(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),M(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})],-1)]],8,Et)],2))),128))])):a(``,!0),M(`div`,{class:D([`input-wrapper`,{"drag-over":h.value}]),onDragover:O,onDragenter:j,onDragleave:F,onDrop:ee},[M(`input`,{ref_key:`fileInputRef`,ref:f,type:`file`,multiple:``,class:`file-input-hidden`,onChange:S},null,544),e(M(`textarea`,{ref_key:`textareaRef`,ref:u,"onUpdate:modelValue":r[0]||=e=>l.value=e,class:`input-textarea`,placeholder:k(c)(`chat.inputPlaceholder`),rows:`1`,onKeydown:B,onCompositionstart:L,onCompositionend:R,onInput:V,onPaste:w},null,40,Dt),[[E,l.value]]),M(`div`,Ot,[t(k(je),{trigger:`hover`},{trigger:d(()=>[t(k($),{quaternary:``,size:`small`,onClick:x,circle:``},{icon:d(()=>[...r[4]||=[M(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[M(`path`,{d:`M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48`})],-1)]]),_:1})]),default:d(()=>[T(` `+C(k(c)(`chat.attachFiles`)),1)]),_:1}),k(o).isStreaming?(s(),p(k($),{key:0,size:`small`,type:`error`,onClick:r[1]||=e=>k(o).stopStreaming()},{default:d(()=>[T(C(k(c)(`chat.stop`)),1)]),_:1})):a(``,!0),t(k($),{size:`small`,type:`primary`,disabled:!v.value||k(o).isStreaming,onClick:I},{icon:d(()=>[...r[5]||=[M(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[M(`line`,{x1:`22`,y1:`2`,x2:`11`,y2:`13`}),M(`polygon`,{points:`22 2 15 22 11 13 2 9 22 2`})],-1)]]),default:d(()=>[T(` `+C(k(c)(`chat.send`)),1)]),_:1},8,[`disabled`])])],34)]))}}),[[`__scopeId`,`data-v-474a732e`]]),At={key:1,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,class:`tool-icon`},jt={class:`tool-name`},Mt={key:2,class:`tool-preview`},Nt={key:3,class:`tool-spinner`},Pt={key:4,class:`tool-error-badge`},Ft={key:0,class:`tool-details`},It={key:0,class:`tool-detail-section`},Lt={class:`tool-detail-label`},Rt={class:`tool-detail-code`},zt={key:1,class:`tool-detail-section`},Bt={class:`tool-detail-label`},Vt={class:`tool-detail-code`},Ht={key:1,class:`msg-body`},Ut={key:0,src:ee,alt:`Hermes`,class:`msg-avatar`},Wt={key:0,class:`msg-attachments`},Gt=[`src`,`alt`],Kt={key:1,class:`msg-attachment-file`},qt={class:`att-name`},Jt={class:`att-size`},Yt={key:2,class:`streaming-dots`},Xt={class:`message-time`},Zt=F(w({__name:`MessageItem`,props:{message:{}},setup(e){let t=e,{t:n}=P(),o=r(()=>t.message.role===`system`),c=y(!1),l=r(()=>new Date(t.message.timestamp).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}));function u(e){return e.startsWith(`image/`)}function d(e){return e<1024?e+` B`:e<1024*1024?(e/1024).toFixed(1)+` KB`:(e/(1024*1024)).toFixed(1)+` MB`}let f=r(()=>(t.message.attachments?.length??0)>0),m=r(()=>!!(t.message.toolArgs||t.message.toolResult)),h=r(()=>{if(!t.message.toolArgs)return``;try{return JSON.stringify(JSON.parse(t.message.toolArgs),null,2)}catch{return t.message.toolArgs}}),g=r(()=>{if(!t.message.toolResult)return``;try{let e=JSON.parse(t.message.toolResult),r=JSON.stringify(e,null,2);return r.length>2e3?r.slice(0,2e3)+`
141
- `+n(`chat.truncated`):r}catch{let e=t.message.toolResult;return e.length>2e3?e.slice(0,2e3)+`
142
- `+n(`chat.truncated`):e}});return(t,r)=>(s(),i(`div`,{class:D([`message`,[e.message.role]])},[e.message.role===`tool`?(s(),i(N,{key:0},[M(`div`,{class:D([`tool-line`,{expandable:m.value}]),onClick:r[0]||=e=>m.value&&(c.value=!c.value)},[m.value?(s(),i(`svg`,{key:0,width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,class:D([`tool-chevron`,{rotated:c.value}])},[...r[1]||=[M(`polyline`,{points:`9 18 15 12 9 6`},null,-1)]],2)):(s(),i(`svg`,At,[...r[2]||=[M(`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`},null,-1)]])),M(`span`,jt,C(e.message.toolName),1),e.message.toolPreview&&!c.value?(s(),i(`span`,Mt,C(e.message.toolPreview),1)):a(``,!0),e.message.toolStatus===`running`?(s(),i(`span`,Nt)):a(``,!0),e.message.toolStatus===`error`?(s(),i(`span`,Pt,C(k(n)(`chat.error`)),1)):a(``,!0)],2),c.value&&m.value?(s(),i(`div`,Ft,[h.value?(s(),i(`div`,It,[M(`div`,Lt,C(k(n)(`chat.arguments`)),1),M(`pre`,Rt,C(h.value),1)])):a(``,!0),g.value?(s(),i(`div`,zt,[M(`div`,Bt,C(k(n)(`chat.result`)),1),M(`pre`,Vt,C(g.value),1)])):a(``,!0)])):a(``,!0)],64)):(s(),i(`div`,Ht,[e.message.role===`assistant`?(s(),i(`img`,Ut)):a(``,!0),M(`div`,{class:D([`msg-content`,e.message.role])},[M(`div`,{class:D([`message-bubble`,{system:o.value}])},[f.value?(s(),i(`div`,Wt,[(s(!0),i(N,null,A(e.message.attachments,e=>(s(),i(`div`,{key:e.id,class:D([`msg-attachment`,{image:u(e.type)}])},[u(e.type)&&e.url?(s(),i(`img`,{key:0,src:e.url,alt:e.name,class:`msg-attachment-thumb`},null,8,Gt)):(s(),i(`div`,Kt,[r[3]||=M(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[M(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),M(`polyline`,{points:`14 2 14 8 20 8`})],-1),M(`span`,qt,C(e.name),1),M(`span`,Jt,C(d(e.size)),1)]))],2))),128))])):a(``,!0),e.message.content?(s(),p(Ie,{key:1,content:e.message.content},null,8,[`content`])):a(``,!0),e.message.isStreaming&&!e.message.content?(s(),i(`span`,Yt,[...r[4]||=[M(`span`,null,null,-1),M(`span`,null,null,-1),M(`span`,null,null,-1)]])):a(``,!0)],2),M(`div`,Xt,C(l.value),1)],2)]))],2))}}),[[`__scopeId`,`data-v-6d591bdc`]]),Qt=`/assets/thinking-Cwsva50h.mp4`,$t={key:0,class:`empty-state`},en={key:0,class:`streaming-indicator`},tn=[`src`],nn={key:0,class:`tool-calls-panel`},rn={class:`tool-call-name`},an={key:0,class:`tool-call-preview`},on={key:1,class:`tool-call-spinner`},sn={key:2,class:`tool-call-error`},cn=F(w({__name:`MessageList`,setup(e){let n=Pe(),{t:o}=P(),c=y(),l=r(()=>n.messages.filter(e=>e.role!==`tool`)),u=r(()=>{let e=n.messages,t=-1;for(let n=e.length-1;n>=0;n--)if(e[n].role===`user`){t=n;break}return[...e.filter((e,n)=>e.role===`tool`&&n>t)].reverse()});function m(){f(()=>{c.value&&(c.value.scrollTop=c.value.scrollHeight)})}return _(()=>n.messages.length,m),_(()=>n.messages[n.messages.length-1]?.content,m),_(()=>n.isStreaming,e=>{e&&m()}),_(u,m),(e,r)=>(s(),i(`div`,{ref_key:`listRef`,ref:c,class:`message-list`},[k(n).messages.length===0?(s(),i(`div`,$t,[r[0]||=M(`img`,{src:`/logo.png`,alt:`Hermes`,class:`empty-logo`},null,-1),M(`p`,null,C(k(o)(`chat.emptyState`)),1)])):a(``,!0),(s(!0),i(N,null,A(l.value,e=>(s(),p(Zt,{key:e.id,message:e},null,8,[`message`]))),128)),t(b,{name:`fade`},{default:d(()=>[k(n).isStreaming?(s(),i(`div`,en,[M(`video`,{src:k(Qt),autoplay:``,loop:``,muted:``,playsinline:``,class:`thinking-video`},null,8,tn),u.value.length>0?(s(),i(`div`,nn,[(s(!0),i(N,null,A(u.value,e=>(s(),i(`div`,{key:e.id,class:`tool-call-item`},[r[1]||=M(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,class:`tool-call-icon`},[M(`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`})],-1),M(`span`,rn,C(e.toolName),1),e.toolPreview?(s(),i(`span`,an,C(e.toolPreview),1)):a(``,!0),e.toolStatus===`running`?(s(),i(`span`,on)):a(``,!0),e.toolStatus===`error`?(s(),i(`span`,sn,C(k(o)(`chat.error`)),1)):a(``,!0)]))),128))])):a(``,!0)])):a(``,!0)]),_:1})],512))}}),[[`__scopeId`,`data-v-21c7a8d2`]]),ln={class:`chat-panel`},un={class:`session-list-header`},dn={key:0,class:`session-list-title`},fn={class:`session-list-actions`},pn={key:0,class:`session-items`},mn={key:0,class:`session-loading`},hn={key:1,class:`session-empty`},gn=[`onClick`],_n={class:`session-group-label`},vn={class:`session-group-count`},yn=[`onClick`,`onContextmenu`],bn={class:`session-item-content`},xn={class:`session-item-title`},Sn={class:`session-item-meta`},Cn={key:0,class:`session-item-model`},wn={class:`session-item-time`},Tn={class:`chat-main`},En={class:`chat-header`},Dn={class:`header-left`},On={class:`header-session-title`},kn={key:0,class:`source-badge`},An={class:`header-actions`},jn={key:0,class:`context-info`},Mn=F(w({__name:`ChatPanel`,setup(e){let n=Pe(),o=Me(),{t:c}=P(),l=y(!0),u=null;function h(e){n.switchSession(e),u?.matches&&(l.value=!1)}function b(e){e.matches&&l.value&&(l.value=!1)}m(()=>{u=window.matchMedia(`(max-width: 768px)`),b(u),u.addEventListener(`change`,b)}),g(()=>{u?.removeEventListener(`change`,b)});let x=y(!1),w=y(``),E=y(null),O=y(null),j=y(new Set(JSON.parse(localStorage.getItem(`hermes_collapsed_groups`)||`[]`))),F={telegram:`Telegram`,api_server:`API Server`,cli:`CLI`,discord:`Discord`,slack:`Slack`,matrix:`Matrix`,whatsapp:`WhatsApp`,signal:`Signal`,email:`Email`,sms:`SMS`,dingtalk:`DingTalk`,feishu:`Feishu`,wecom:`WeCom`,weixin:`WeChat`,bluebubbles:`iMessage`,mattermost:`Mattermost`,cron:`Cron`};function ee(e){return e?F[e]||e:``}function I(e){return e===`api_server`?-1:e===`cron`?999:0}let L=r(()=>{let e=[...n.sessions].sort((e,t)=>t.createdAt-e.createdAt),t=new Map;for(let n of e){let e=n.source||``;t.has(e)||t.set(e,[]),t.get(e).push(n)}return[...t.keys()].sort((e,t)=>{let n=I(e),r=I(t);return n===r?e.localeCompare(t):n-r}).map(e=>({source:e,label:e?ee(e):c(`chat.other`),sessions:t.get(e)}))});function R(e){if(!j.value.has(e))j.value=new Set([...j.value,e]);else{j.value=new Set(L.value.map(e=>e.source).filter(t=>t!==e));let t=L.value.find(t=>t.source===e);t?.sessions.length&&n.switchSession(t.sessions[0].id)}localStorage.setItem(`hermes_collapsed_groups`,JSON.stringify([...j.value]))}_(L,e=>{if(localStorage.getItem(`hermes_collapsed_groups`)!==null){let e=n.activeSession?.source;e&&j.value.has(e)&&(j.value=new Set([...j.value].filter(t=>t!==e)),localStorage.setItem(`hermes_collapsed_groups`,JSON.stringify([...j.value])));return}j.value=new Set(e.slice(1).map(e=>e.source)),localStorage.setItem(`hermes_collapsed_groups`,JSON.stringify([...j.value]))},{once:!0});let z=r(()=>n.activeSession?.title||c(`chat.newChat`)),B=r(()=>(n.activeSession?.inputTokens??0)+(n.activeSession?.outputTokens??0)),V={"claude-opus-4":2e5,"claude-sonnet-4":2e5,"claude-haiku-4":2e5,"claude-3.5-sonnet":2e5,"claude-3.5-haiku":2e5,"claude-3-opus":2e5,"claude-3-sonnet":2e5,"claude-3-haiku":2e5,"gpt-4o":128e3,"gpt-4o-mini":128e3,"gpt-4-turbo":128e3,"gpt-4":8192,"gpt-3.5-turbo":16385,o1:2e5,"o1-mini":128e3,o3:2e5,"o3-mini":2e5,"o4-mini":2e5,"deepseek-chat":65536,"deepseek-reasoner":65536,"gemini-2.5-pro":1e6,"gemini-2.5-flash":1e6,"gemini-2.0-flash":1e6,"glm-4-plus":128e3,"glm-4":128e3,"qwen-max":128e3,"qwen-plus":128e3,"qwen-turbo":128e3},H=r(()=>{let e=n.activeSession?.model||``;for(let[t,n]of Object.entries(V))if(e.includes(t))return n;return null});function U(e){return e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`k`:String(e)}let W=r(()=>n.activeSession?.source||``);function G(){n.newChat()}function K(e){let t=e||n.activeSessionId;t&&(navigator.clipboard.writeText(t),o.success(c(`common.copied`)))}function q(e){n.deleteSession(e),o.success(c(`chat.sessionDeleted`))}function J(e){let t=new Date(e),n=new Date;return t.toDateString()===n.toDateString()?t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):t.toLocaleDateString([],{month:`short`,day:`numeric`})}let Y=r(()=>[{label:c(`chat.rename`),key:`rename`},{label:c(`chat.copySessionId`),key:`copy-id`}]),X=y(null);function te(e,t){e.preventDefault(),X.value=t,Z.value=!0,Q.value=e.clientX,ne.value=e.clientY}let Z=y(!1),Q=y(0),ne=y(0);function re(e){if(Z.value=!1,X.value){if(e===`copy-id`)K(X.value);else if(e===`rename`){let e=n.sessions.find(e=>e.id===X.value);E.value=X.value,w.value=e?.title||``,x.value=!0,f(()=>{O.value?.focus()})}}}function ie(){Z.value=!1}async function ae(){if(!(!E.value||!w.value.trim())){if(await Fe(E.value,w.value.trim())){let e=n.sessions.find(e=>e.id===E.value);e&&(e.title=w.value.trim()),n.activeSession?.id===E.value&&(n.activeSession.title=w.value.trim()),o.success(c(`chat.renamed`))}else o.error(c(`chat.renameFailed`));x.value=!1}}return(e,r)=>(s(),i(`div`,ln,[M(`div`,{class:D([`session-backdrop`,{active:l.value}]),onClick:r[0]||=e=>l.value=!1},null,2),M(`aside`,{class:D([`session-list`,{collapsed:!l.value}])},[M(`div`,un,[l.value?(s(),i(`span`,dn,C(k(c)(`chat.sessions`)),1)):a(``,!0),M(`div`,fn,[M(`button`,{class:`session-close-btn`,onClick:r[1]||=e=>l.value=!1},[...r[7]||=[M(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[M(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),M(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})],-1)]]),t(k($),{quaternary:``,size:`tiny`,onClick:G,circle:``},{icon:d(()=>[...r[8]||=[M(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[M(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),M(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})],-1)]]),_:1})])]),l.value?(s(),i(`div`,pn,[k(n).isLoadingSessions&&k(n).sessions.length===0?(s(),i(`div`,mn,C(k(c)(`common.loading`)),1)):k(n).sessions.length===0?(s(),i(`div`,hn,C(k(c)(`chat.noSessions`)),1)):a(``,!0),(s(!0),i(N,null,A(L.value,e=>(s(),i(N,{key:e.source},[M(`div`,{class:`session-group-header`,onClick:t=>R(e.source)},[(s(),i(`svg`,{width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,class:D([`group-chevron`,{collapsed:j.value.has(e.source)}])},[...r[9]||=[M(`polyline`,{points:`9 18 15 12 9 6`},null,-1)]],2)),M(`span`,_n,C(e.label),1),M(`span`,vn,C(e.sessions.length),1)],8,gn),j.value.has(e.source)?a(``,!0):(s(!0),i(N,{key:0},A(e.sessions,e=>(s(),i(`button`,{key:e.id,class:D([`session-item`,{active:e.id===k(n).activeSessionId}]),onClick:t=>h(e.id),onContextmenu:t=>te(t,e.id)},[M(`div`,bn,[M(`span`,xn,C(e.title),1),M(`span`,Sn,[e.model?(s(),i(`span`,Cn,C(e.model),1)):a(``,!0),M(`span`,wn,C(J(e.createdAt)),1)])]),e.id!==k(n).activeSessionId||k(n).sessions.length>1?(s(),p(k(yt),{key:0,onPositiveClick:t=>q(e.id)},{trigger:d(()=>[M(`button`,{class:`session-item-delete`,onClick:r[2]||=v(()=>{},[`stop`])},[...r[10]||=[M(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[M(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),M(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})],-1)]])]),default:d(()=>[T(` `+C(k(c)(`chat.deleteSession`)),1)]),_:1},8,[`onPositiveClick`])):a(``,!0)],42,yn))),128))],64))),128))])):a(``,!0)],2),t(k(ut),{placement:`bottom-start`,trigger:`manual`,x:Q.value,y:ne.value,options:Y.value,show:Z.value,onSelect:re,onClickoutside:ie},null,8,[`x`,`y`,`options`,`show`]),t(k(De),{show:x.value,"onUpdate:show":r[4]||=e=>x.value=e,preset:`dialog`,title:k(c)(`chat.renameSession`),"positive-text":k(c)(`common.ok`),"negative-text":k(c)(`common.cancel`),onPositiveClick:ae},{default:d(()=>[t(k(Ae),{ref_key:`renameInputRef`,ref:O,value:w.value,"onUpdate:value":r[3]||=e=>w.value=e,placeholder:k(c)(`chat.enterNewTitle`),onKeydown:S(ae,[`enter`])},null,8,[`value`,`placeholder`])]),_:1},8,[`show`,`title`,`positive-text`,`negative-text`]),M(`div`,Tn,[M(`header`,En,[M(`div`,Dn,[t(k($),{quaternary:``,size:`small`,onClick:r[5]||=e=>l.value=!l.value,circle:``},{icon:d(()=>[...r[11]||=[M(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[M(`rect`,{x:`3`,y:`3`,width:`7`,height:`7`}),M(`rect`,{x:`14`,y:`3`,width:`7`,height:`7`}),M(`rect`,{x:`3`,y:`14`,width:`7`,height:`7`}),M(`rect`,{x:`14`,y:`14`,width:`7`,height:`7`})],-1)]]),_:1}),M(`span`,On,C(z.value),1),W.value?(s(),i(`span`,kn,C(ee(W.value)),1)):a(``,!0)]),M(`div`,An,[t(k(je),{trigger:`hover`},{trigger:d(()=>[t(k($),{quaternary:``,size:`small`,onClick:r[6]||=e=>K(),circle:``},{icon:d(()=>[...r[12]||=[M(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[M(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),M(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})],-1)]]),_:1})]),default:d(()=>[T(` `+C(k(c)(`chat.copySessionId`)),1)]),_:1}),t(k($),{size:`small`,onClick:G},{icon:d(()=>[...r[13]||=[M(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[M(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),M(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})],-1)]]),default:d(()=>[T(` `+C(k(c)(`chat.newChat`)),1)]),_:1})])]),t(cn),H.value===null?a(``,!0):(s(),i(`div`,jn,[M(`span`,null,C(U(B.value))+` / `+C(U(H.value)),1)])),t(kt)])]))}}),[[`__scopeId`,`data-v-3291477f`]]),Nn={class:`chat-view`},Pn=F(w({__name:`ChatView`,setup(e){let n=Ne(),r=Pe();return m(()=>{n.loadModels(),r.loadSessions()}),(e,n)=>(s(),i(`div`,Nn,[t(Mn)]))}}),[[`__scopeId`,`data-v-9db9ee3f`]]);export{Pn as default};
@@ -1,45 +0,0 @@
1
- import{C as e,N as t,dt as n,j as r}from"./router-B0PaAFys.js";import{at as i,l as a,lt as o,ot as s,ut as c}from"./browser-oMT2KRlV.js";import{c as l,s as u}from"./Suffix-La8FFPWu.js";function d(t,n){return e(()=>{for(let e of n)if(t[e]!==void 0)return t[e];return t[n[n.length-1]]})}var f=u(`close`,()=>t(`svg`,{viewBox:`0 0 12 12`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":!0},t(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},t(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},t(`path`,{d:`M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z`}))))),p=s(`base-close`,`
2
- display: flex;
3
- align-items: center;
4
- justify-content: center;
5
- cursor: pointer;
6
- background-color: transparent;
7
- color: var(--n-close-icon-color);
8
- border-radius: var(--n-close-border-radius);
9
- height: var(--n-close-size);
10
- width: var(--n-close-size);
11
- font-size: var(--n-close-icon-size);
12
- outline: none;
13
- border: none;
14
- position: relative;
15
- padding: 0;
16
- `,[o(`absolute`,`
17
- height: var(--n-close-icon-size);
18
- width: var(--n-close-icon-size);
19
- `),i(`&::before`,`
20
- content: "";
21
- position: absolute;
22
- width: var(--n-close-size);
23
- height: var(--n-close-size);
24
- left: 50%;
25
- top: 50%;
26
- transform: translateY(-50%) translateX(-50%);
27
- transition: inherit;
28
- border-radius: inherit;
29
- `),c(`disabled`,[i(`&:hover`,`
30
- color: var(--n-close-icon-color-hover);
31
- `),i(`&:hover::before`,`
32
- background-color: var(--n-close-color-hover);
33
- `),i(`&:focus::before`,`
34
- background-color: var(--n-close-color-hover);
35
- `),i(`&:active`,`
36
- color: var(--n-close-icon-color-pressed);
37
- `),i(`&:active::before`,`
38
- background-color: var(--n-close-color-pressed);
39
- `)]),o(`disabled`,`
40
- cursor: not-allowed;
41
- color: var(--n-close-icon-color-disabled);
42
- background-color: transparent;
43
- `),o(`round`,[i(`&::before`,`
44
- border-radius: 50%;
45
- `)])]),m=r({name:`BaseClose`,props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return a(`-base-close`,p,n(e,`clsPrefix`)),()=>{let{clsPrefix:n,disabled:r,absolute:i,round:a,isButtonTag:o}=e;return t(o?`button`:`div`,{type:o?`button`:void 0,tabindex:r||!e.focusable?-1:0,"aria-disabled":r,"aria-label":`close`,role:o?void 0:`button`,disabled:r,class:[`${n}-base-close`,i&&`${n}-base-close--absolute`,r&&`${n}-base-close--disabled`,a&&`${n}-base-close--round`],onMousedown:t=>{e.focusable||t.preventDefault()},onClick:e.onClick},t(l,{clsPrefix:n},{default:()=>t(f,null)}))}}});export{d as n,m as t};
@@ -1,234 +0,0 @@
1
- import{C as e,F as t,K as n,M as r,N as i,R as a,U as o,X as s,Z as c,ct as l,dt as u,j as d,y as f}from"./router-B0PaAFys.js";import{B as ee,G as p,K as m,Q as h,R as g,W as _,at as v,c as y,ct as b,d as te,dt as x,et as S,l as ne,lt as C,n as w,ot as T,q as E,s as D,t as re,tt as O,ut as k,z as A}from"./browser-oMT2KRlV.js";import{_ as ie,b as ae,c as j,g as oe,i as M,l as se,m as N,n as P,o as F,t as I,v as L}from"./Suffix-La8FFPWu.js";var R=d({name:`Eye`,render(){return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},i(`path`,{d:`M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`}),i(`circle`,{cx:`256`,cy:`256`,r:`80`,fill:`none`,stroke:`currentColor`,"stroke-miterlimit":`10`,"stroke-width":`32`}))}}),z=d({name:`EyeOff`,render(){return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},i(`path`,{d:`M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z`,fill:`currentColor`}),i(`path`,{d:`M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z`,fill:`currentColor`}),i(`path`,{d:`M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z`,fill:`currentColor`}),i(`path`,{d:`M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z`,fill:`currentColor`}),i(`path`,{d:`M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z`,fill:`currentColor`}))}}),B={paddingTiny:`0 8px`,paddingSmall:`0 10px`,paddingMedium:`0 12px`,paddingLarge:`0 14px`,clearSize:`16px`};function V(e){let{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:i,primaryColorHover:a,inputColor:o,inputColorDisabled:s,borderColor:c,warningColor:l,warningColorHover:u,errorColor:d,errorColorHover:f,borderRadius:ee,lineHeight:p,fontSizeTiny:m,fontSizeSmall:h,fontSizeMedium:g,fontSizeLarge:_,heightTiny:v,heightSmall:y,heightMedium:b,heightLarge:te,actionColor:x,clearColor:S,clearColorHover:ne,clearColorPressed:C,placeholderColor:w,placeholderColorDisabled:T,iconColor:E,iconColorDisabled:D,iconColorHover:re,iconColorPressed:k,fontWeight:A}=e;return Object.assign(Object.assign({},B),{fontWeight:A,countTextColorDisabled:r,countTextColor:n,heightTiny:v,heightSmall:y,heightMedium:b,heightLarge:te,fontSizeTiny:m,fontSizeSmall:h,fontSizeMedium:g,fontSizeLarge:_,lineHeight:p,lineHeightTextarea:p,borderRadius:ee,iconSize:`16px`,groupLabelColor:x,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:i,placeholderColor:w,placeholderColorDisabled:T,color:o,colorDisabled:s,colorFocus:o,groupLabelBorder:`1px solid ${c}`,border:`1px solid ${c}`,borderHover:`1px solid ${a}`,borderDisabled:`1px solid ${c}`,borderFocus:`1px solid ${a}`,boxShadowFocus:`0 0 0 2px ${O(i,{alpha:.2})}`,loadingColor:i,loadingColorWarning:l,borderWarning:`1px solid ${l}`,borderHoverWarning:`1px solid ${u}`,colorFocusWarning:o,borderFocusWarning:`1px solid ${u}`,boxShadowFocusWarning:`0 0 0 2px ${O(l,{alpha:.2})}`,caretColorWarning:l,loadingColorError:d,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${f}`,colorFocusError:o,borderFocusError:`1px solid ${f}`,boxShadowFocusError:`0 0 0 2px ${O(d,{alpha:.2})}`,caretColorError:d,clearColor:S,clearColorHover:ne,clearColorPressed:C,iconColor:E,iconColorDisabled:D,iconColorHover:re,iconColorPressed:k,suffixTextColor:t})}var ce=D({name:`Input`,common:w,peers:{Scrollbar:M},self:V}),H=h(`n-input`),le=T(`input`,`
2
- max-width: 100%;
3
- cursor: text;
4
- line-height: 1.5;
5
- z-index: auto;
6
- outline: none;
7
- box-sizing: border-box;
8
- position: relative;
9
- display: inline-flex;
10
- border-radius: var(--n-border-radius);
11
- background-color: var(--n-color);
12
- transition: background-color .3s var(--n-bezier);
13
- font-size: var(--n-font-size);
14
- font-weight: var(--n-font-weight);
15
- --n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);
16
- `,[b(`input, textarea`,`
17
- overflow: hidden;
18
- flex-grow: 1;
19
- position: relative;
20
- `),b(`input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder`,`
21
- box-sizing: border-box;
22
- font-size: inherit;
23
- line-height: 1.5;
24
- font-family: inherit;
25
- border: none;
26
- outline: none;
27
- background-color: #0000;
28
- text-align: inherit;
29
- transition:
30
- -webkit-text-fill-color .3s var(--n-bezier),
31
- caret-color .3s var(--n-bezier),
32
- color .3s var(--n-bezier),
33
- text-decoration-color .3s var(--n-bezier);
34
- `),b(`input-el, textarea-el`,`
35
- -webkit-appearance: none;
36
- scrollbar-width: none;
37
- width: 100%;
38
- min-width: 0;
39
- text-decoration-color: var(--n-text-decoration-color);
40
- color: var(--n-text-color);
41
- caret-color: var(--n-caret-color);
42
- background-color: transparent;
43
- `,[v(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
44
- width: 0;
45
- height: 0;
46
- display: none;
47
- `),v(`&::placeholder`,`
48
- color: #0000;
49
- -webkit-text-fill-color: transparent !important;
50
- `),v(`&:-webkit-autofill ~`,[b(`placeholder`,`display: none;`)])]),C(`round`,[k(`textarea`,`border-radius: calc(var(--n-height) / 2);`)]),b(`placeholder`,`
51
- pointer-events: none;
52
- position: absolute;
53
- left: 0;
54
- right: 0;
55
- top: 0;
56
- bottom: 0;
57
- overflow: hidden;
58
- color: var(--n-placeholder-color);
59
- `,[v(`span`,`
60
- width: 100%;
61
- display: inline-block;
62
- `)]),C(`textarea`,[b(`placeholder`,`overflow: visible;`)]),k(`autosize`,`width: 100%;`),C(`autosize`,[b(`textarea-el, input-el`,`
63
- position: absolute;
64
- top: 0;
65
- left: 0;
66
- height: 100%;
67
- `)]),T(`input-wrapper`,`
68
- overflow: hidden;
69
- display: inline-flex;
70
- flex-grow: 1;
71
- position: relative;
72
- padding-left: var(--n-padding-left);
73
- padding-right: var(--n-padding-right);
74
- `),b(`input-mirror`,`
75
- padding: 0;
76
- height: var(--n-height);
77
- line-height: var(--n-height);
78
- overflow: hidden;
79
- visibility: hidden;
80
- position: static;
81
- white-space: pre;
82
- pointer-events: none;
83
- `),b(`input-el`,`
84
- padding: 0;
85
- height: var(--n-height);
86
- line-height: var(--n-height);
87
- `,[v(`&[type=password]::-ms-reveal`,`display: none;`),v(`+`,[b(`placeholder`,`
88
- display: flex;
89
- align-items: center;
90
- `)])]),k(`textarea`,[b(`placeholder`,`white-space: nowrap;`)]),b(`eye`,`
91
- display: flex;
92
- align-items: center;
93
- justify-content: center;
94
- transition: color .3s var(--n-bezier);
95
- `),C(`textarea`,`width: 100%;`,[T(`input-word-count`,`
96
- position: absolute;
97
- right: var(--n-padding-right);
98
- bottom: var(--n-padding-vertical);
99
- `),C(`resizable`,[T(`input-wrapper`,`
100
- resize: vertical;
101
- min-height: var(--n-height);
102
- `)]),b(`textarea-el, textarea-mirror, placeholder`,`
103
- height: 100%;
104
- padding-left: 0;
105
- padding-right: 0;
106
- padding-top: var(--n-padding-vertical);
107
- padding-bottom: var(--n-padding-vertical);
108
- word-break: break-word;
109
- display: inline-block;
110
- vertical-align: bottom;
111
- box-sizing: border-box;
112
- line-height: var(--n-line-height-textarea);
113
- margin: 0;
114
- resize: none;
115
- white-space: pre-wrap;
116
- scroll-padding-block-end: var(--n-padding-vertical);
117
- `),b(`textarea-mirror`,`
118
- width: 100%;
119
- pointer-events: none;
120
- overflow: hidden;
121
- visibility: hidden;
122
- position: static;
123
- white-space: pre-wrap;
124
- overflow-wrap: break-word;
125
- `)]),C(`pair`,[b(`input-el, placeholder`,`text-align: center;`),b(`separator`,`
126
- display: flex;
127
- align-items: center;
128
- transition: color .3s var(--n-bezier);
129
- color: var(--n-text-color);
130
- white-space: nowrap;
131
- `,[T(`icon`,`
132
- color: var(--n-icon-color);
133
- `),T(`base-icon`,`
134
- color: var(--n-icon-color);
135
- `)])]),C(`disabled`,`
136
- cursor: not-allowed;
137
- background-color: var(--n-color-disabled);
138
- `,[b(`border`,`border: var(--n-border-disabled);`),b(`input-el, textarea-el`,`
139
- cursor: not-allowed;
140
- color: var(--n-text-color-disabled);
141
- text-decoration-color: var(--n-text-color-disabled);
142
- `),b(`placeholder`,`color: var(--n-placeholder-color-disabled);`),b(`separator`,`color: var(--n-text-color-disabled);`,[T(`icon`,`
143
- color: var(--n-icon-color-disabled);
144
- `),T(`base-icon`,`
145
- color: var(--n-icon-color-disabled);
146
- `)]),T(`input-word-count`,`
147
- color: var(--n-count-text-color-disabled);
148
- `),b(`suffix, prefix`,`color: var(--n-text-color-disabled);`,[T(`icon`,`
149
- color: var(--n-icon-color-disabled);
150
- `),T(`internal-icon`,`
151
- color: var(--n-icon-color-disabled);
152
- `)])]),k(`disabled`,[b(`eye`,`
153
- color: var(--n-icon-color);
154
- cursor: pointer;
155
- `,[v(`&:hover`,`
156
- color: var(--n-icon-color-hover);
157
- `),v(`&:active`,`
158
- color: var(--n-icon-color-pressed);
159
- `)]),v(`&:hover`,[b(`state-border`,`border: var(--n-border-hover);`)]),C(`focus`,`background-color: var(--n-color-focus);`,[b(`state-border`,`
160
- border: var(--n-border-focus);
161
- box-shadow: var(--n-box-shadow-focus);
162
- `)])]),b(`border, state-border`,`
163
- box-sizing: border-box;
164
- position: absolute;
165
- left: 0;
166
- right: 0;
167
- top: 0;
168
- bottom: 0;
169
- pointer-events: none;
170
- border-radius: inherit;
171
- border: var(--n-border);
172
- transition:
173
- box-shadow .3s var(--n-bezier),
174
- border-color .3s var(--n-bezier);
175
- `),b(`state-border`,`
176
- border-color: #0000;
177
- z-index: 1;
178
- `),b(`prefix`,`margin-right: 4px;`),b(`suffix`,`
179
- margin-left: 4px;
180
- `),b(`suffix, prefix`,`
181
- transition: color .3s var(--n-bezier);
182
- flex-wrap: nowrap;
183
- flex-shrink: 0;
184
- line-height: var(--n-height);
185
- white-space: nowrap;
186
- display: inline-flex;
187
- align-items: center;
188
- justify-content: center;
189
- color: var(--n-suffix-text-color);
190
- `,[T(`base-loading`,`
191
- font-size: var(--n-icon-size);
192
- margin: 0 2px;
193
- color: var(--n-loading-color);
194
- `),T(`base-clear`,`
195
- font-size: var(--n-icon-size);
196
- `,[b(`placeholder`,[T(`base-icon`,`
197
- transition: color .3s var(--n-bezier);
198
- color: var(--n-icon-color);
199
- font-size: var(--n-icon-size);
200
- `)])]),v(`>`,[T(`icon`,`
201
- transition: color .3s var(--n-bezier);
202
- color: var(--n-icon-color);
203
- font-size: var(--n-icon-size);
204
- `)]),T(`base-icon`,`
205
- font-size: var(--n-icon-size);
206
- `)]),T(`input-word-count`,`
207
- pointer-events: none;
208
- line-height: 1.5;
209
- font-size: .85em;
210
- color: var(--n-count-text-color);
211
- transition: color .3s var(--n-bezier);
212
- margin-left: 4px;
213
- font-variant: tabular-nums;
214
- `),[`warning`,`error`].map(e=>C(`${e}-status`,[k(`disabled`,[T(`base-loading`,`
215
- color: var(--n-loading-color-${e})
216
- `),b(`input-el, textarea-el`,`
217
- caret-color: var(--n-caret-color-${e});
218
- `),b(`state-border`,`
219
- border: var(--n-border-${e});
220
- `),v(`&:hover`,[b(`state-border`,`
221
- border: var(--n-border-hover-${e});
222
- `)]),v(`&:focus`,`
223
- background-color: var(--n-color-focus-${e});
224
- `,[b(`state-border`,`
225
- box-shadow: var(--n-box-shadow-focus-${e});
226
- border: var(--n-border-focus-${e});
227
- `)]),C(`focus`,`
228
- background-color: var(--n-color-focus-${e});
229
- `,[b(`state-border`,`
230
- box-shadow: var(--n-box-shadow-focus-${e});
231
- border: var(--n-border-focus-${e});
232
- `)])])]))]),ue=T(`input`,[C(`disabled`,[b(`input-el, textarea-el`,`
233
- -webkit-text-fill-color: var(--n-text-color-disabled);
234
- `)])]);function U(e){let t=0;for(let n of e)t++;return t}function W(e){return e===``||e==null}function de(e){let t=l(null);function n(){let{value:n}=e;if(!n?.focus){i();return}let{selectionStart:r,selectionEnd:a,value:o}=n;if(r==null||a==null){i();return}t.value={start:r,end:a,beforeText:o.slice(0,r),afterText:o.slice(a)}}function r(){var n;let{value:r}=t,{value:i}=e;if(!r||!i)return;let{value:a}=i,{start:o,beforeText:s,afterText:c}=r,l=a.length;if(a.endsWith(c))l=a.length-c.length;else if(a.startsWith(s))l=s.length;else{let e=s[o-1],t=a.indexOf(e,o-1);t!==-1&&(l=t+1)}(n=i.setSelectionRange)==null||n.call(i,l,l)}function i(){t.value=null}return s(e,i),{recordCursor:n,restoreCursor:r}}var G=d({name:`InputWordCount`,setup(n,{slots:r}){let{mergedValueRef:a,maxlengthRef:o,mergedClsPrefixRef:s,countGraphemesRef:c}=t(H),l=e(()=>{let{value:e}=a;return e===null||Array.isArray(e)?0:(c.value||U)(e)});return()=>{let{value:e}=o,{value:t}=a;return i(`span`,{class:`${s.value}-input-word-count`},p(r.default,{value:t===null||Array.isArray(t)?``:t},()=>[e===void 0?l.value:`${l.value} / ${e}`]))}}}),K=d({name:`Input`,props:Object.assign(Object.assign({},y.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:`text`},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),slots:Object,setup(t){let{mergedClsPrefixRef:i,mergedBorderedRef:d,inlineThemeDisabled:f,mergedRtlRef:p,mergedComponentPropsRef:m}=ee(t),h=y(`Input`,`-input`,le,ce,t,i);re&&ne(`-input-safari`,ue,i);let _=l(null),v=l(null),b=l(null),C=l(null),w=l(null),T=l(null),D=l(null),O=de(D),k=l(null),{localeRef:j}=se(`Input`),M=l(t.defaultValue),N=oe(u(t,`value`),M),P=g(t,{mergedSize:e=>{let{size:n}=t;if(n)return n;let{mergedSize:r}=e||{};return r?.value?r.value:m?.value?.Input?.size||`medium`}}),{mergedSizeRef:F,mergedDisabledRef:I,mergedStatusRef:R}=P,z=l(!1),B=l(!1),V=l(!1),U=l(!1),G=null,K=e(()=>{let{placeholder:e,pair:n}=t;return n?Array.isArray(e)?e:e===void 0?[``,``]:[e,e]:e===void 0?[j.value.placeholder]:[e]}),fe=e(()=>{let{value:e}=V,{value:t}=N,{value:n}=K;return!e&&(W(t)||Array.isArray(t)&&W(t[0]))&&n[0]}),pe=e(()=>{let{value:e}=V,{value:t}=N,{value:n}=K;return!e&&n[1]&&(W(t)||Array.isArray(t)&&W(t[1]))}),q=S(()=>t.internalForceFocus||z.value),me=S(()=>{if(I.value||t.readonly||!t.clearable||!q.value&&!B.value)return!1;let{value:e}=N,{value:n}=q;return t.pair?!!(Array.isArray(e)&&(e[0]||e[1]))&&(B.value||n):!!e&&(B.value||n)}),he=e(()=>{let{showPasswordOn:e}=t;if(e)return e;if(t.showPasswordToggle)return`click`}),J=l(!1),ge=e(()=>{let{textDecoration:e}=t;return e?Array.isArray(e)?e.map(e=>({textDecoration:e})):[{textDecoration:e}]:[``,``]}),_e=l(void 0),ve=()=>{if(t.type===`textarea`){let{autosize:e}=t;if(e&&(_e.value=k.value?.$el?.offsetWidth),!v.value||typeof e==`boolean`)return;let{paddingTop:n,paddingBottom:r,lineHeight:i}=window.getComputedStyle(v.value),a=Number(n.slice(0,-2)),o=Number(r.slice(0,-2)),s=Number(i.slice(0,-2)),{value:c}=b;if(!c)return;if(e.minRows){let t=Math.max(e.minRows,1),n=`${a+o+s*t}px`;c.style.minHeight=n}if(e.maxRows){let t=`${a+o+s*e.maxRows}px`;c.style.maxHeight=t}}},ye=e(()=>{let{maxlength:e}=t;return e===void 0?void 0:Number(e)});o(()=>{let{value:e}=N;Array.isArray(e)||nt(e)});let be=r().proxy;function Y(e,n){let{onUpdateValue:r,"onUpdate:value":i,onInput:a}=t,{nTriggerFormInput:o}=P;r&&E(r,e,n),i&&E(i,e,n),a&&E(a,e,n),M.value=e,o()}function X(e,n){let{onChange:r}=t,{nTriggerFormChange:i}=P;r&&E(r,e,n),M.value=e,i()}function xe(e){let{onBlur:n}=t,{nTriggerFormBlur:r}=P;n&&E(n,e),r()}function Se(e){let{onFocus:n}=t,{nTriggerFormFocus:r}=P;n&&E(n,e),r()}function Ce(e){let{onClear:n}=t;n&&E(n,e)}function we(e){let{onInputBlur:n}=t;n&&E(n,e)}function Te(e){let{onInputFocus:n}=t;n&&E(n,e)}function Ee(){let{onDeactivate:e}=t;e&&E(e)}function De(){let{onActivate:e}=t;e&&E(e)}function Oe(e){let{onClick:n}=t;n&&E(n,e)}function ke(e){let{onWrapperFocus:n}=t;n&&E(n,e)}function Ae(e){let{onWrapperBlur:n}=t;n&&E(n,e)}function je(){V.value=!0}function Me(e){V.value=!1,e.target===T.value?Z(e,1):Z(e,0)}function Z(e,n=0,r=`input`){let i=e.target.value;if(nt(i),e instanceof InputEvent&&!e.isComposing&&(V.value=!1),t.type===`textarea`){let{value:e}=k;e&&e.syncUnifiedContainer()}if(G=i,V.value)return;O.recordCursor();let o=Ne(i);if(o)if(!t.pair)r===`input`?Y(i,{source:n}):X(i,{source:n});else{let{value:e}=N;e=Array.isArray(e)?[e[0],e[1]]:[``,``],e[n]=i,r===`input`?Y(e,{source:n}):X(e,{source:n})}be.$forceUpdate(),o||a(O.restoreCursor)}function Ne(e){let{countGraphemes:n,maxlength:r,minlength:i}=t;if(n){let t;if(r!==void 0&&(t===void 0&&(t=n(e)),t>Number(r))||i!==void 0&&(t===void 0&&(t=n(e)),t<Number(r)))return!1}let{allowInput:a}=t;return typeof a==`function`?a(e):!0}function Pe(e){we(e),e.relatedTarget===_.value&&Ee(),e.relatedTarget!==null&&(e.relatedTarget===w.value||e.relatedTarget===T.value||e.relatedTarget===v.value)||(U.value=!1),Q(e,`blur`),D.value=null}function Fe(e,t){Te(e),z.value=!0,U.value=!0,De(),Q(e,`focus`),t===0?D.value=w.value:t===1?D.value=T.value:t===2&&(D.value=v.value)}function Ie(e){t.passivelyActivated&&(Ae(e),Q(e,`blur`))}function Le(e){t.passivelyActivated&&(z.value=!0,ke(e),Q(e,`focus`))}function Q(e,t){e.relatedTarget!==null&&(e.relatedTarget===w.value||e.relatedTarget===T.value||e.relatedTarget===v.value||e.relatedTarget===_.value)||(t===`focus`?(Se(e),z.value=!0):t===`blur`&&(xe(e),z.value=!1))}function Re(e,t){Z(e,t,`change`)}function ze(e){Oe(e)}function Be(e){Ce(e),Ve()}function Ve(){t.pair?(Y([``,``],{source:`clear`}),X([``,``],{source:`clear`})):(Y(``,{source:`clear`}),X(``,{source:`clear`}))}function He(e){let{onMousedown:n}=t;n&&n(e);let{tagName:r}=e.target;if(r!==`INPUT`&&r!==`TEXTAREA`){if(t.resizable){let{value:t}=_;if(t){let{left:n,top:r,width:i,height:a}=t.getBoundingClientRect();if(n+i-14<e.clientX&&e.clientX<n+i&&r+a-14<e.clientY&&e.clientY<r+a)return}}e.preventDefault(),z.value||Xe()}}function Ue(){var e;B.value=!0,t.type===`textarea`&&((e=k.value)==null||e.handleMouseEnterWrapper())}function We(){var e;B.value=!1,t.type===`textarea`&&((e=k.value)==null||e.handleMouseLeaveWrapper())}function Ge(){I.value||he.value===`click`&&(J.value=!J.value)}function Ke(e){if(I.value)return;e.preventDefault();let t=e=>{e.preventDefault(),ie(`mouseup`,document,t)};if(L(`mouseup`,document,t),he.value!==`mousedown`)return;J.value=!0;let n=()=>{J.value=!1,ie(`mouseup`,document,n)};L(`mouseup`,document,n)}function qe(e){t.onKeyup&&E(t.onKeyup,e)}function Je(e){switch(t.onKeydown&&E(t.onKeydown,e),e.key){case`Escape`:$();break;case`Enter`:Ye(e);break}}function Ye(e){var n,r;if(t.passivelyActivated){let{value:i}=U;if(i){t.internalDeactivateOnEnter&&$();return}e.preventDefault(),t.type===`textarea`?(n=v.value)==null||n.focus():(r=w.value)==null||r.focus()}}function $(){t.passivelyActivated&&(U.value=!1,a(()=>{var e;(e=_.value)==null||e.focus()}))}function Xe(){var e,n,r;I.value||(t.passivelyActivated?(e=_.value)==null||e.focus():((n=v.value)==null||n.focus(),(r=w.value)==null||r.focus()))}function Ze(){_.value?.contains(document.activeElement)&&document.activeElement.blur()}function Qe(){var e,t;(e=v.value)==null||e.select(),(t=w.value)==null||t.select()}function $e(){I.value||(v.value?v.value.focus():w.value&&w.value.focus())}function et(){let{value:e}=_;e?.contains(document.activeElement)&&e!==document.activeElement&&$()}function tt(e){if(t.type===`textarea`){let{value:t}=v;t?.scrollTo(e)}else{let{value:t}=w;t?.scrollTo(e)}}function nt(e){let{type:n,pair:r,autosize:i}=t;if(!r&&i)if(n===`textarea`){let{value:t}=b;t&&(t.textContent=`${e??``}\r\n`)}else{let{value:t}=C;t&&(e?t.textContent=e:t.innerHTML=`&nbsp;`)}}function rt(){ve()}let it=l({top:`0`});function at(e){var t;let{scrollTop:n}=e.target;it.value.top=`${-n}px`,(t=k.value)==null||t.syncUnifiedContainer()}let ot=null;c(()=>{let{autosize:e,type:n}=t;e&&n===`textarea`?ot=s(N,e=>{!Array.isArray(e)&&e!==G&&nt(e)}):ot?.()});let st=null;c(()=>{t.type===`textarea`?st=s(N,e=>{var t;!Array.isArray(e)&&e!==G&&((t=k.value)==null||t.syncUnifiedContainer())}):st?.()}),n(H,{mergedValueRef:N,maxlengthRef:ye,mergedClsPrefixRef:i,countGraphemesRef:u(t,`countGraphemes`)});let ct={wrapperElRef:_,inputElRef:w,textareaElRef:v,isCompositing:V,clear:Ve,focus:Xe,blur:Ze,select:Qe,deactivate:et,activate:$e,scrollTo:tt},lt=te(`Input`,p,i),ut=e(()=>{let{value:e}=F,{common:{cubicBezierEaseInOut:t},self:{color:n,borderRadius:r,textColor:i,caretColor:a,caretColorError:o,caretColorWarning:s,textDecorationColor:c,border:l,borderDisabled:u,borderHover:d,borderFocus:f,placeholderColor:ee,placeholderColorDisabled:p,lineHeightTextarea:m,colorDisabled:g,colorFocus:_,textColorDisabled:v,boxShadowFocus:y,iconSize:b,colorFocusWarning:te,boxShadowFocusWarning:S,borderWarning:ne,borderFocusWarning:C,borderHoverWarning:w,colorFocusError:T,boxShadowFocusError:E,borderError:D,borderFocusError:re,borderHoverError:O,clearSize:k,clearColor:A,clearColorHover:ie,clearColorPressed:j,iconColor:oe,iconColorDisabled:M,suffixTextColor:se,countTextColor:N,countTextColorDisabled:P,iconColorHover:I,iconColorPressed:L,loadingColor:R,loadingColorError:z,loadingColorWarning:B,fontWeight:V,[x(`padding`,e)]:ce,[x(`fontSize`,e)]:H,[x(`height`,e)]:le}}=h.value,{left:ue,right:U}=ae(ce);return{"--n-bezier":t,"--n-count-text-color":N,"--n-count-text-color-disabled":P,"--n-color":n,"--n-font-size":H,"--n-font-weight":V,"--n-border-radius":r,"--n-height":le,"--n-padding-left":ue,"--n-padding-right":U,"--n-text-color":i,"--n-caret-color":a,"--n-text-decoration-color":c,"--n-border":l,"--n-border-disabled":u,"--n-border-hover":d,"--n-border-focus":f,"--n-placeholder-color":ee,"--n-placeholder-color-disabled":p,"--n-icon-size":b,"--n-line-height-textarea":m,"--n-color-disabled":g,"--n-color-focus":_,"--n-text-color-disabled":v,"--n-box-shadow-focus":y,"--n-loading-color":R,"--n-caret-color-warning":s,"--n-color-focus-warning":te,"--n-box-shadow-focus-warning":S,"--n-border-warning":ne,"--n-border-focus-warning":C,"--n-border-hover-warning":w,"--n-loading-color-warning":B,"--n-caret-color-error":o,"--n-color-focus-error":T,"--n-box-shadow-focus-error":E,"--n-border-error":D,"--n-border-focus-error":re,"--n-border-hover-error":O,"--n-loading-color-error":z,"--n-clear-color":A,"--n-clear-size":k,"--n-clear-color-hover":ie,"--n-clear-color-pressed":j,"--n-icon-color":oe,"--n-icon-color-hover":I,"--n-icon-color-pressed":L,"--n-icon-color-disabled":M,"--n-suffix-text-color":se}}),dt=f?A(`input`,e(()=>{let{value:e}=F;return e[0]}),ut,t):void 0;return Object.assign(Object.assign({},ct),{wrapperElRef:_,inputElRef:w,inputMirrorElRef:C,inputEl2Ref:T,textareaElRef:v,textareaMirrorElRef:b,textareaScrollbarInstRef:k,rtlEnabled:lt,uncontrolledValue:M,mergedValue:N,passwordVisible:J,mergedPlaceholder:K,showPlaceholder1:fe,showPlaceholder2:pe,mergedFocus:q,isComposing:V,activated:U,showClearButton:me,mergedSize:F,mergedDisabled:I,textDecorationStyle:ge,mergedClsPrefix:i,mergedBordered:d,mergedShowPasswordOn:he,placeholderStyle:it,mergedStatus:R,textAreaScrollContainerWidth:_e,handleTextAreaScroll:at,handleCompositionStart:je,handleCompositionEnd:Me,handleInput:Z,handleInputBlur:Pe,handleInputFocus:Fe,handleWrapperBlur:Ie,handleWrapperFocus:Le,handleMouseEnter:Ue,handleMouseLeave:We,handleMouseDown:He,handleChange:Re,handleClick:ze,handleClear:Be,handlePasswordToggleClick:Ge,handlePasswordToggleMousedown:Ke,handleWrapperKeydown:Je,handleWrapperKeyup:qe,handleTextAreaMirrorResize:rt,getTextareaScrollContainer:()=>v.value,mergedTheme:h,cssVars:f?void 0:ut,themeClass:dt?.themeClass,onRender:dt?.onRender})},render(){let{mergedClsPrefix:e,mergedStatus:t,themeClass:n,type:r,countGraphemes:a,onRender:o}=this,s=this.$slots;return o?.(),i(`div`,{ref:`wrapperElRef`,class:[`${e}-input`,`${e}-input--${this.mergedSize}-size`,n,t&&`${e}-input--${t}-status`,{[`${e}-input--rtl`]:this.rtlEnabled,[`${e}-input--disabled`]:this.mergedDisabled,[`${e}-input--textarea`]:r===`textarea`,[`${e}-input--resizable`]:this.resizable&&!this.autosize,[`${e}-input--autosize`]:this.autosize,[`${e}-input--round`]:this.round&&r!==`textarea`,[`${e}-input--pair`]:this.pair,[`${e}-input--focus`]:this.mergedFocus,[`${e}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},i(`div`,{class:`${e}-input-wrapper`},m(s.prefix,t=>t&&i(`div`,{class:`${e}-input__prefix`},t)),r===`textarea`?i(P,{ref:`textareaScrollbarInstRef`,class:`${e}-input__textarea`,container:this.getTextareaScrollContainer,theme:this.theme?.peers?.Scrollbar,themeOverrides:this.themeOverrides?.peers?.Scrollbar,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{let{textAreaScrollContainerWidth:t}=this,n={width:this.autosize&&t&&`${t}px`};return i(f,null,i(`textarea`,Object.assign({},this.inputProps,{ref:`textareaElRef`,class:[`${e}-input__textarea-el`,this.inputProps?.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],this.inputProps?.style,n],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?i(`div`,{class:`${e}-input__placeholder`,style:[this.placeholderStyle,n],key:`placeholder`},this.mergedPlaceholder[0]):null,this.autosize?i(N,{onResize:this.handleTextAreaMirrorResize},{default:()=>i(`div`,{ref:`textareaMirrorElRef`,class:`${e}-input__textarea-mirror`,key:`mirror`})}):null)}}):i(`div`,{class:`${e}-input__input`},i(`input`,Object.assign({type:r===`password`&&this.mergedShowPasswordOn&&this.passwordVisible?`text`:r},this.inputProps,{ref:`inputElRef`,class:[`${e}-input__input-el`,this.inputProps?.class],style:[this.textDecorationStyle[0],this.inputProps?.style],tabindex:this.passivelyActivated&&!this.activated?-1:this.inputProps?.tabindex,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,0)},onInput:e=>{this.handleInput(e,0)},onChange:e=>{this.handleChange(e,0)}})),this.showPlaceholder1?i(`div`,{class:`${e}-input__placeholder`},i(`span`,null,this.mergedPlaceholder[0])):null,this.autosize?i(`div`,{class:`${e}-input__input-mirror`,key:`mirror`,ref:`inputMirrorElRef`},`\xA0`):null),!this.pair&&m(s.suffix,t=>t||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?i(`div`,{class:`${e}-input__suffix`},[m(s[`clear-icon-placeholder`],t=>(this.clearable||t)&&i(F,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>t,icon:()=>{var e;return(e=this.$slots)[`clear-icon`]?.call(e)}})),this.internalLoadingBeforeSuffix?null:t,this.loading===void 0?null:i(I,{clsPrefix:e,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}),this.internalLoadingBeforeSuffix?t:null,this.showCount&&this.type!==`textarea`?i(G,null,{default:e=>{let{renderCount:t}=this;return t?t(e):s.count?.call(s,e)}}):null,this.mergedShowPasswordOn&&this.type===`password`?i(`div`,{class:`${e}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?_(s[`password-visible-icon`],()=>[i(j,{clsPrefix:e},{default:()=>i(R,null)})]):_(s[`password-invisible-icon`],()=>[i(j,{clsPrefix:e},{default:()=>i(z,null)})])):null]):null)),this.pair?i(`span`,{class:`${e}-input__separator`},_(s.separator,()=>[this.separator])):null,this.pair?i(`div`,{class:`${e}-input-wrapper`},i(`div`,{class:`${e}-input__input`},i(`input`,{ref:`inputEl2Ref`,type:this.type,class:`${e}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,1)},onInput:e=>{this.handleInput(e,1)},onChange:e=>{this.handleChange(e,1)}}),this.showPlaceholder2?i(`div`,{class:`${e}-input__placeholder`},i(`span`,null,this.mergedPlaceholder[1])):null),m(s.suffix,t=>(this.clearable||t)&&i(`div`,{class:`${e}-input__suffix`},[this.clearable&&i(F,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{icon:()=>s[`clear-icon`]?.call(s),placeholder:()=>s[`clear-icon-placeholder`]?.call(s)}),t]))):null,this.mergedBordered?i(`div`,{class:`${e}-input__border`}):null,this.mergedBordered?i(`div`,{class:`${e}-input__state-border`}):null,this.showCount&&r===`textarea`?i(G,null,{default:e=>{let{renderCount:t}=this;return t?t(e):s.count?.call(s,e)}}):null)}});export{ce as n,K as t};
@@ -1,13 +0,0 @@
1
- import{C as e,N as t,R as n,X as r,ct as i,dt as a,j as o}from"./router-B0PaAFys.js";import{B as s,K as c,R as l,W as u,at as d,c as f,d as p,et as m,n as h,ot as g,q as _,rt as ee,s as v}from"./browser-oMT2KRlV.js";import{c as y,g as te,l as ne,v as b}from"./Suffix-La8FFPWu.js";import{n as x,r as S}from"./Button-DBOPt_s1.js";import{n as C,t as w}from"./Input-CyvPny5v.js";var T=o({name:`Add`,render(){return t(`svg`,{width:`512`,height:`512`,viewBox:`0 0 512 512`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},t(`path`,{d:`M256 112V400M400 256H112`,stroke:`currentColor`,"stroke-width":`32`,"stroke-linecap":`round`,"stroke-linejoin":`round`}))}}),E=o({name:`Remove`,render(){return t(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},t(`line`,{x1:`400`,y1:`256`,x2:`112`,y2:`256`,style:`
2
- fill: none;
3
- stroke: currentColor;
4
- stroke-linecap: round;
5
- stroke-linejoin: round;
6
- stroke-width: 32px;
7
- `}))}});function D(e){let{textColorDisabled:t}=e;return{iconColorDisabled:t}}var re=v({name:`InputNumber`,common:h,peers:{Button:S,Input:C},self:D}),ie=d([g(`input-number-suffix`,`
8
- display: inline-block;
9
- margin-right: 10px;
10
- `),g(`input-number-prefix`,`
11
- display: inline-block;
12
- margin-left: 10px;
13
- `)]);function ae(e){return e==null||typeof e==`string`&&e.trim()===``?null:Number(e)}function oe(e){return e.includes(`.`)&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||e===`-`||e===`-0`}function O(e){return e==null?!0:!Number.isNaN(e)}function k(e,t){return typeof e==`number`?t===void 0?String(e):e.toFixed(t):``}function A(e){if(e===null)return null;if(typeof e==`number`)return e;{let t=Number(e);return Number.isNaN(t)?null:t}}var j=800,M=100,N=o({name:`InputNumber`,props:Object.assign(Object.assign({},f.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:`right`},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),slots:Object,setup(t){let{mergedBorderedRef:o,mergedClsPrefixRef:c,mergedRtlRef:u,mergedComponentPropsRef:d}=s(t),h=f(`InputNumber`,`-input-number`,ie,re,t,c),{localeRef:g}=ne(`InputNumber`),v=l(t,{mergedSize:e=>{let{size:n}=t;if(n)return n;let{mergedSize:r}=e||{};return r?.value?r.value:d?.value?.InputNumber?.size||`medium`}}),{mergedSizeRef:y,mergedDisabledRef:x,mergedStatusRef:S}=v,C=i(null),w=i(null),T=i(null),E=i(t.defaultValue),D=te(a(t,`value`),E),N=i(``),P=e=>{let t=String(e).split(`.`)[1];return t?t.length:0},F=e=>{let n=[t.min,t.max,t.step,e].map(e=>e===void 0?0:P(e));return Math.max(...n)},se=m(()=>{let{placeholder:e}=t;return e===void 0?g.value.placeholder:e}),I=m(()=>{let e=A(t.step);return e===null||e===0?1:Math.abs(e)}),L=m(()=>{let e=A(t.min);return e===null?null:e}),R=m(()=>{let e=A(t.max);return e===null?null:e}),z=()=>{let{value:e}=D;if(O(e)){let{format:n,precision:r}=t;n?N.value=n(e):e===null||r===void 0||P(e)>r?N.value=k(e,void 0):N.value=k(e,r)}else N.value=String(e)};z();let B=e=>{let{value:n}=D;if(e===n){z();return}let{"onUpdate:value":r,onUpdateValue:i,onChange:a}=t,{nTriggerFormInput:o,nTriggerFormChange:s}=v;a&&_(a,e),i&&_(i,e),r&&_(r,e),E.value=e,o(),s()},V=({offset:e,doUpdateIfValid:n,fixPrecision:r,isInputing:i})=>{let{value:a}=N;if(i&&oe(a))return!1;let o=(t.parse||ae)(a);if(o===null)return n&&B(null),null;if(O(o)){let a=P(o),{precision:s}=t;if(s!==void 0&&s<a&&!r)return!1;let c=Number.parseFloat((o+e).toFixed(s??F(o)));if(O(c)){let{value:e}=R,{value:r}=L;if(e!==null&&c>e){if(!n||i)return!1;c=e}if(r!==null&&c<r){if(!n||i)return!1;c=r}return t.validator&&!t.validator(c)?!1:(n&&B(c),c)}}return!1},ce=m(()=>V({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),H=m(()=>{let{value:e}=D;if(t.validator&&e===null)return!1;let{value:n}=I;return V({offset:-n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),U=m(()=>{let{value:e}=D;if(t.validator&&e===null)return!1;let{value:n}=I;return V({offset:+n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function W(e){let{onFocus:n}=t,{nTriggerFormFocus:r}=v;n&&_(n,e),r()}function le(e){if(e.target===C.value?.wrapperElRef)return;let r=V({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(r!==!1){let e=C.value?.inputElRef;e&&(e.value=String(r||``)),D.value===r&&z()}else z();let{onBlur:i}=t,{nTriggerFormBlur:a}=v;i&&_(i,e),a(),n(()=>{z()})}function ue(e){let{onClear:n}=t;n&&_(n,e)}function G(){let{value:e}=U;if(!e){$();return}let{value:n}=D;if(n===null)t.validator||B(q());else{let{value:e}=I;V({offset:e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function K(){let{value:e}=H;if(!e){Z();return}let{value:n}=D;if(n===null)t.validator||B(q());else{let{value:e}=I;V({offset:-e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}let de=W,fe=le;function q(){if(t.validator)return null;let{value:e}=L,{value:n}=R;return e===null?n===null?0:Math.min(0,n):Math.max(0,e)}function pe(e){ue(e),B(null)}function me(e){var t;T.value?.$el.contains(e.target)&&e.preventDefault(),w.value?.$el.contains(e.target)&&e.preventDefault(),(t=C.value)==null||t.activate()}let J=null,Y=null,X=null;function Z(){X&&=(window.clearTimeout(X),null),J&&=(window.clearInterval(J),null)}let Q=null;function $(){Q&&=(window.clearTimeout(Q),null),Y&&=(window.clearInterval(Y),null)}function he(){Z(),X=window.setTimeout(()=>{J=window.setInterval(()=>{K()},M)},j),b(`mouseup`,document,Z,{once:!0})}function ge(){$(),Q=window.setTimeout(()=>{Y=window.setInterval(()=>{G()},M)},j),b(`mouseup`,document,$,{once:!0})}let _e=()=>{Y||G()},ve=()=>{J||K()};function ye(e){var n;if(e.key===`Enter`){if(e.target===C.value?.wrapperElRef)return;V({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((n=C.value)==null||n.deactivate())}else if(e.key===`ArrowUp`){if(!U.value||t.keyboard.ArrowUp===!1)return;e.preventDefault(),V({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&G()}else if(e.key===`ArrowDown`){if(!H.value||t.keyboard.ArrowDown===!1)return;e.preventDefault(),V({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&K()}}function be(e){N.value=e,t.updateValueOnInput&&!t.format&&!t.parse&&t.precision===void 0&&V({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}r(D,()=>{z()});let xe={focus:()=>C.value?.focus(),blur:()=>C.value?.blur(),select:()=>C.value?.select()},Se=p(`InputNumber`,u,c);return Object.assign(Object.assign({},xe),{rtlEnabled:Se,inputInstRef:C,minusButtonInstRef:w,addButtonInstRef:T,mergedClsPrefix:c,mergedBordered:o,uncontrolledValue:E,mergedValue:D,mergedPlaceholder:se,displayedValueInvalid:ce,mergedSize:y,mergedDisabled:x,displayedValue:N,addable:U,minusable:H,mergedStatus:S,handleFocus:de,handleBlur:fe,handleClear:pe,handleMouseDown:me,handleAddClick:_e,handleMinusClick:ve,handleAddMousedown:ge,handleMinusMousedown:he,handleKeyDown:ye,handleUpdateDisplayedValue:be,mergedTheme:h,inputThemeOverrides:{paddingSmall:`0 8px 0 10px`,paddingMedium:`0 8px 0 12px`,paddingLarge:`0 8px 0 14px`},buttonThemeOverrides:e(()=>{let{self:{iconColorDisabled:e}}=h.value,[t,n,r,i]=ee(e);return{textColorTextDisabled:`rgb(${t}, ${n}, ${r})`,opacityDisabled:`${i}`}})})},render(){let{mergedClsPrefix:e,$slots:n}=this,r=()=>t(x,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:`minusButtonInstRef`},{icon:()=>u(n[`minus-icon`],()=>[t(y,{clsPrefix:e},{default:()=>t(E,null)})])}),i=()=>t(x,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:`addButtonInstRef`},{icon:()=>u(n[`add-icon`],()=>[t(y,{clsPrefix:e},{default:()=>t(T,null)})])});return t(`div`,{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},t(w,{ref:`inputInstRef`,autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?`line-through`:void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>this.showButton&&this.buttonPlacement===`both`?[r(),c(n.prefix,n=>n?t(`span`,{class:`${e}-input-number-prefix`},n):null)]:n.prefix?.call(n),suffix:()=>this.showButton?[c(n.suffix,n=>n?t(`span`,{class:`${e}-input-number-suffix`},n):null),this.buttonPlacement===`right`?r():null,i()]:n.suffix?.call(n)}))}});export{T as n,N as t};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jobs-fIgcRW5v.js","assets/router-B0PaAFys.js"])))=>i.map(i=>d[i]);
2
- import{A as e,C as t,D as n,E as r,G as i,O as a,Q as o,T as s,U as c,ct as l,gt as u,j as d,k as f,mt as p,n as m,pt as h,q as g,w as _,y as v}from"./router-B0PaAFys.js";import{n as y}from"./pinia-D41F8A9y.js";import{r as b,t as x}from"./_plugin-vue_export-helper-DkLSTLBi.js";import{t as S}from"./Modal-BLLYorfc.js";import{n as C,t as w}from"./FormItem-De01hN-G.js";import{t as T}from"./Select-CPQQRbMt.js";import{t as E}from"./Button-DBOPt_s1.js";import{t as D}from"./InputNumber-v7Tkrv97.js";import{t as O}from"./Input-CyvPny5v.js";import{t as k}from"./Tooltip-C65FWX0W.js";import{t as A}from"./use-message-CG8KB3t0.js";import{t as j}from"./Spin-DiwsqMEC.js";import{a as M,c as N,i as P,n as F,o as I,s as ee,t as L}from"./jobs-fIgcRW5v.js";function R(e,t){return e.job_id===t||e.id===t}var z=y(`jobs`,()=>{let e=l([]),t=l(!1);async function n(){t.value=!0;try{e.value=await P()}catch(e){console.error(`Failed to fetch jobs:`,e)}finally{t.value=!1}}async function r(t){let n=await L(t);return e.value.unshift(n),n}async function i(t,n){let r=await N(t,n),i=e.value.findIndex(e=>R(e,t));return i!==-1&&(e.value[i]=r),r}async function a(t){await F(t),e.value=e.value.filter(e=>!R(e,t))}async function o(t){let n=await M(t),r=e.value.findIndex(e=>R(e,t));r!==-1&&(e.value[r]=n)}async function s(t){let n=await I(t),r=e.value.findIndex(e=>R(e,t));r!==-1&&(e.value[r]=n)}async function c(t){let n=await ee(t),r=e.value.findIndex(e=>R(e,t));r!==-1&&(e.value[r]=n)}return{jobs:e,loading:t,fetchJobs:n,createJob:r,updateJob:i,deleteJob:a,pauseJob:o,resumeJob:s,runJob:c}}),B={class:`job-card`},V={class:`card-header`},H={class:`job-name`},U={class:`card-body`},W={class:`info-row`},G={class:`info-label`},K={class:`info-value mono`},q={class:`info-row`},J={class:`info-label`},Y={class:`info-value`},X={class:`info-row`},Z={class:`info-label`},Q={class:`info-value`},te={class:`info-row`},ne={class:`info-label`},re={class:`info-value`},ie={key:0,class:`info-row`},ae={class:`info-label`},oe={class:`info-value`},se={class:`card-actions`},ce=x(d({__name:`JobCard`,props:{job:{}},emits:[`edit`],setup(a,{emit:c}){let l=a,d=c,{t:m}=b(),g=z(),y=A(),x=t(()=>l.job.job_id||l.job.id),S=t(()=>l.job.state===`running`?m(`jobs.status.running`):l.job.state===`paused`?m(`jobs.status.paused`):l.job.enabled?m(`jobs.status.scheduled`):m(`jobs.status.disabled`)),C=t(()=>l.job.state===`running`?`info`:l.job.state===`paused`?`warning`:l.job.enabled?`success`:`error`),w=t(()=>{let e=l.job.schedule;return typeof e==`string`?e:e?.expr||l.job.schedule_display||`—`}),T=e=>e?new Date(e).toLocaleString():`—`;async function D(){try{await g.pauseJob(x.value),y.success(m(`jobs.jobPaused`))}catch(e){y.error(e.message)}}async function O(){try{await g.resumeJob(x.value),y.success(m(`jobs.jobResumed`))}catch(e){y.error(e.message)}}async function j(){try{await g.runJob(x.value),y.info(m(`jobs.jobTriggered`))}catch(e){y.error(e.message)}}async function M(){try{await g.deleteJob(x.value),y.success(m(`jobs.jobDeleted`))}catch(e){y.error(e.message)}}return(t,c)=>(i(),n(`div`,B,[_(`div`,V,[_(`h3`,H,u(a.job.name),1),_(`span`,{class:p([`status-badge`,C.value])},u(S.value),3)]),_(`div`,U,[_(`div`,W,[_(`span`,G,u(h(m)(`jobs.info.schedule`)),1),_(`code`,K,u(w.value),1)]),_(`div`,q,[_(`span`,J,u(h(m)(`jobs.info.lastRun`)),1),_(`span`,Y,[f(u(T(a.job.last_run_at))+` `,1),a.job.last_status?(i(),n(`span`,{key:0,class:p([`run-status`,{ok:a.job.last_status===`ok`,err:a.job.last_status!==`ok`}])},u(a.job.last_status===`ok`?`OK`:a.job.last_status),3)):r(``,!0)])]),_(`div`,X,[_(`span`,Z,u(h(m)(`jobs.info.nextRun`)),1),_(`span`,Q,u(T(a.job.next_run_at)),1)]),_(`div`,te,[_(`span`,ne,u(h(m)(`jobs.info.deliver`)),1),_(`span`,re,[f(u(a.job.deliver),1),a.job.origin?(i(),n(v,{key:0},[f(` (`+u(a.job.origin.platform)+`)`,1)],64)):r(``,!0)])]),a.job.repeat?(i(),n(`div`,ie,[_(`span`,ae,u(h(m)(`jobs.info.repeat`)),1),_(`span`,oe,[typeof a.job.repeat==`string`?(i(),n(v,{key:0},[f(u(a.job.repeat),1)],64)):(i(),n(v,{key:1},[f(u(a.job.repeat.completed)+` / `+u(a.job.repeat.times??`∞`),1)],64))])])):r(``,!0)]),_(`div`,se,[a.job.state!==`paused`&&a.job.enabled?(i(),s(h(k),{key:0},{trigger:o(()=>[e(h(E),{size:`tiny`,quaternary:``,onClick:D},{default:o(()=>[f(u(h(m)(`jobs.action.pause`)),1)]),_:1})]),default:o(()=>[f(` `+u(h(m)(`jobs.action.pauseJob`)),1)]),_:1})):a.job.state===`paused`?(i(),s(h(k),{key:1},{trigger:o(()=>[e(h(E),{size:`tiny`,quaternary:``,onClick:O},{default:o(()=>[f(u(h(m)(`jobs.action.resume`)),1)]),_:1})]),default:o(()=>[f(` `+u(h(m)(`jobs.action.resumeJob`)),1)]),_:1})):r(``,!0),e(h(k),null,{trigger:o(()=>[e(h(E),{size:`tiny`,quaternary:``,onClick:j},{default:o(()=>[f(u(h(m)(`jobs.action.runNow`)),1)]),_:1})]),default:o(()=>[f(` `+u(h(m)(`jobs.action.triggerImmediately`)),1)]),_:1}),e(h(E),{size:`tiny`,quaternary:``,onClick:c[0]||=e=>d(`edit`,x.value)},{default:o(()=>[f(u(h(m)(`common.edit`)),1)]),_:1}),e(h(E),{size:`tiny`,quaternary:``,type:`error`,onClick:M},{default:o(()=>[f(u(h(m)(`common.delete`)),1)]),_:1})])]))}}),[[`__scopeId`,`data-v-95911aa6`]]),le={key:0,class:`empty-state`},ue={key:1,class:`jobs-grid`},de=x(d({__name:`JobsPanel`,emits:[`edit`],setup(e,{emit:t}){let{t:r}=b(),o=t,c=z();return(e,t)=>h(c).jobs.length===0?(i(),n(`div`,le,[t[0]||=a(`<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" class="empty-icon" data-v-b91b48f7><rect x="3" y="4" width="18" height="18" rx="2" ry="2" data-v-b91b48f7></rect><line x1="16" y1="2" x2="16" y2="6" data-v-b91b48f7></line><line x1="8" y1="2" x2="8" y2="6" data-v-b91b48f7></line><line x1="3" y1="10" x2="21" y2="10" data-v-b91b48f7></line></svg>`,1),_(`p`,null,u(h(r)(`jobs.noJobs`)),1)])):(i(),n(`div`,ue,[(i(!0),n(v,null,g(h(c).jobs,e=>(i(),s(ce,{key:e.id,job:e,onEdit:t=>o(`edit`,e.id)},null,8,[`job`,`onEdit`]))),128))]))}}),[[`__scopeId`,`data-v-b91b48f7`]]),fe={class:`modal-footer`},pe=x(d({__name:`JobFormModal`,props:{jobId:{}},emits:[`close`,`saved`],setup(n,{emit:r}){let{t:a}=b(),d=n,p=r,g=z(),v=A(),y=l(!0),x=l(!1),k=l({name:``,schedule:``,prompt:``,deliver:`origin`,repeat_times:null}),j=l(null),M=t(()=>!!d.jobId),N=t(()=>[{label:a(`jobs.presetEveryMinute`),value:`* * * * *`},{label:a(`jobs.presetEvery5Min`),value:`*/5 * * * *`},{label:a(`jobs.presetEveryHour`),value:`0 * * * *`},{label:a(`jobs.presetEveryDay`),value:`0 0 * * *`},{label:a(`jobs.presetEveryDay9`),value:`0 9 * * *`},{label:a(`jobs.presetEveryMonday`),value:`0 9 * * 1`},{label:a(`jobs.presetEveryMonth`),value:`0 9 1 * *`}]),P=t(()=>[{label:a(`jobs.origin`),value:`origin`},{label:a(`jobs.local`),value:`local`}]);c(async()=>{if(d.jobId)try{let{getJob:e}=await m(async()=>{let{getJob:e}=await import(`./jobs-fIgcRW5v.js`).then(e=>e.r);return{getJob:e}},__vite__mapDeps([0,1])),t=await e(d.jobId);k.value={name:t.name,schedule:typeof t.schedule==`string`?t.schedule:t.schedule?.expr||t.schedule_display||``,prompt:t.prompt,deliver:t.deliver||`origin`,repeat_times:typeof t.repeat==`number`?t.repeat:typeof t.repeat==`object`?t.repeat.times:null}}catch(e){v.error(a(`jobs.loadFailed`)+`: `+e.message)}});async function F(){if(!k.value.name.trim()){v.warning(a(`jobs.nameRequired`));return}if(!k.value.schedule.trim()){v.warning(a(`jobs.scheduleRequired`));return}x.value=!0;try{let e={name:k.value.name,schedule:k.value.schedule,prompt:k.value.prompt,deliver:k.value.deliver,repeat:k.value.repeat_times??void 0};M.value?(await g.updateJob(d.jobId,e),v.success(a(`jobs.jobUpdated`))):(await g.createJob(e),v.success(a(`jobs.jobCreated`))),p(`saved`)}catch(e){v.error(e.message)}finally{x.value=!1}}function I(){y.value=!1,setTimeout(()=>p(`close`),200)}return(t,n)=>(i(),s(h(S),{show:y.value,"onUpdate:show":n[7]||=e=>y.value=e,preset:`card`,title:M.value?h(a)(`jobs.editJob`):h(a)(`jobs.createJob`),style:{width:`min(520px, calc(100vw - 32px))`},"mask-closable":!x.value,onAfterLeave:n[8]||=e=>p(`close`)},{footer:o(()=>[_(`div`,fe,[e(h(E),{onClick:I},{default:o(()=>[f(u(h(a)(`common.cancel`)),1)]),_:1}),e(h(E),{type:`primary`,loading:x.value,onClick:F},{default:o(()=>[f(u(M.value?h(a)(`common.update`):h(a)(`common.create`)),1)]),_:1},8,[`loading`])])]),default:o(()=>[e(h(C),{"label-placement":`top`},{default:o(()=>[e(h(w),{label:h(a)(`jobs.name`),required:``},{default:o(()=>[e(h(O),{value:k.value.name,"onUpdate:value":n[0]||=e=>k.value.name=e,placeholder:h(a)(`jobs.namePlaceholder`),maxlength:`200`,"show-count":``},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),e(h(w),{label:h(a)(`jobs.schedule`),required:``},{default:o(()=>[e(h(O),{value:k.value.schedule,"onUpdate:value":n[1]||=e=>k.value.schedule=e,placeholder:h(a)(`jobs.schedulePlaceholder`)},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),e(h(w),{label:h(a)(`jobs.quickPresets`)},{default:o(()=>[e(h(T),{value:j.value,"onUpdate:value":[n[2]||=e=>j.value=e,n[3]||=e=>k.value.schedule=e],options:N.value,placeholder:h(a)(`jobs.selectPreset`)},null,8,[`value`,`options`,`placeholder`])]),_:1},8,[`label`]),e(h(w),{label:h(a)(`jobs.prompt`),required:``},{default:o(()=>[e(h(O),{value:k.value.prompt,"onUpdate:value":n[4]||=e=>k.value.prompt=e,type:`textarea`,placeholder:h(a)(`jobs.promptPlaceholder`),rows:4,maxlength:`5000`,"show-count":``},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),e(h(w),{label:h(a)(`jobs.deliverTarget`)},{default:o(()=>[e(h(T),{value:k.value.deliver,"onUpdate:value":n[5]||=e=>k.value.deliver=e,options:P.value},null,8,[`value`,`options`])]),_:1},8,[`label`]),e(h(w),{label:h(a)(`jobs.repeatCount`)},{default:o(()=>[e(h(D),{value:k.value.repeat_times,"onUpdate:value":n[6]||=e=>k.value.repeat_times=e,min:1,placeholder:h(a)(`jobs.repeatPlaceholder`),clearable:``,style:{width:`100%`}},null,8,[`value`,`placeholder`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`show`,`title`,`mask-closable`]))}}),[[`__scopeId`,`data-v-1cf63c17`]]),$={class:`jobs-view`},me={class:`page-header`},he={class:`header-title`},ge={class:`jobs-content`},_e=x(d({__name:`JobsView`,setup(t){let{t:a}=b(),d=z(),p=l(!1),m=l(null);c(()=>{d.fetchJobs()});function g(){m.value=null,p.value=!0}function v(e){m.value=e,p.value=!0}function y(){p.value=!1,m.value=null}async function x(){await d.fetchJobs(),y()}return(t,c)=>(i(),n(`div`,$,[_(`header`,me,[_(`h2`,he,u(h(a)(`jobs.title`)),1),e(h(E),{type:`primary`,size:`small`,onClick:g},{icon:o(()=>[...c[0]||=[_(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[_(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),_(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})],-1)]]),default:o(()=>[f(` `+u(h(a)(`jobs.createJob`)),1)]),_:1})]),_(`div`,ge,[e(h(j),{show:h(d).loading&&h(d).jobs.length===0},{default:o(()=>[e(de,{onEdit:v})]),_:1},8,[`show`])]),p.value?(i(),s(pe,{key:0,"job-id":m.value,onClose:y,onSaved:x},null,8,[`job-id`])):r(``,!0)]))}}),[[`__scopeId`,`data-v-3d9d3ab7`]]);export{_e as default};
@@ -1 +0,0 @@
1
- .job-card[data-v-95911aa6]{background-color:#fff;border:1px solid #e0e0e0;border-radius:10px;padding:16px;transition:border-color .15s}.job-card[data-v-95911aa6]:hover{border-color:#3333334d}.card-header[data-v-95911aa6]{justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}.job-name[data-v-95911aa6]{color:#1a1a1a;text-overflow:ellipsis;white-space:nowrap;max-width:70%;font-size:15px;font-weight:600;overflow:hidden}.status-badge[data-v-95911aa6]{border-radius:10px;padding:2px 8px;font-size:11px;font-weight:500}.status-badge.success[data-v-95911aa6]{color:#2e7d32;background:#2e7d321f}.status-badge.info[data-v-95911aa6]{color:#333;background:#3333331f}.status-badge.warning[data-v-95911aa6]{color:#f57f17;background:#f57f171f}.status-badge.error[data-v-95911aa6]{color:#c62828;background:#c628281f}.card-body[data-v-95911aa6]{flex-direction:column;gap:6px;margin-bottom:14px;display:flex}.info-row[data-v-95911aa6]{justify-content:space-between;align-items:center;display:flex}.info-label[data-v-95911aa6]{color:#999;font-size:12px}.info-value[data-v-95911aa6]{color:#666;font-size:12px}.run-status[data-v-95911aa6]{margin-left:6px;font-size:11px;font-weight:500}.run-status.ok[data-v-95911aa6]{color:#2e7d32}.run-status.err[data-v-95911aa6]{color:#c62828}.mono[data-v-95911aa6]{font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:12px}.card-actions[data-v-95911aa6]{border-top:1px solid #ebebeb;gap:4px;padding-top:10px;display:flex}.empty-state[data-v-b91b48f7]{color:#999;flex-direction:column;justify-content:center;align-items:center;gap:12px;height:100%;display:flex}.empty-state .empty-icon[data-v-b91b48f7]{opacity:.3}.empty-state p[data-v-b91b48f7]{font-size:14px}.jobs-grid[data-v-b91b48f7]{grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr));gap:14px;display:grid}.modal-footer[data-v-1cf63c17]{justify-content:flex-end;gap:8px;display:flex}.jobs-view[data-v-3d9d3ab7]{height:calc(100 * var(--vh));flex-direction:column;display:flex}.jobs-content[data-v-3d9d3ab7]{flex:1;padding:20px;overflow-y:auto}
@@ -1 +0,0 @@
1
- .login-view[data-v-3ae29a28]{height:calc(100 * var(--vh));background:#fafafa;justify-content:center;align-items:center;display:flex}.login-card[data-v-3ae29a28]{text-align:center;background:#fff;border:1px solid #e0e0e0;border-radius:14px;width:480px;max-width:calc(100vw - 32px);padding:56px}@media (width<=768px){.login-card[data-v-3ae29a28]{padding:32px 24px}}.login-logo[data-v-3ae29a28]{margin-bottom:24px}.login-title[data-v-3ae29a28]{color:#1a1a1a;margin:0 0 10px;font-size:26px;font-weight:600}.login-desc[data-v-3ae29a28]{color:#999;margin:0 0 40px;font-size:14px;line-height:1.6}.login-form[data-v-3ae29a28]{flex-direction:column;gap:14px;display:flex}.login-input[data-v-3ae29a28]{color:#1a1a1a;box-sizing:border-box;background:#fff;border:1px solid #e0e0e0;border-radius:6px;outline:none;width:100%;padding:14px 16px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:15px;transition:border-color .15s}.login-input[data-v-3ae29a28]::placeholder{color:#999}.login-input[data-v-3ae29a28]:focus{border-color:#333}.login-error[data-v-3ae29a28]{color:#c62828;text-align:left;font-size:13px}.login-btn[data-v-3ae29a28]{color:#fff;cursor:pointer;background:#1a1a1a;border:none;border-radius:6px;width:100%;padding:14px;font-size:15px;font-weight:500;transition:opacity .15s}.login-btn[data-v-3ae29a28]:hover{opacity:.85}.login-btn[data-v-3ae29a28]:disabled{opacity:.5;cursor:not-allowed}