hermes-web-ui 0.3.4 → 0.3.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.
- package/LICENSE +21 -0
- package/dist/client/assets/{Add-DBcT5hzg.js → Add-CKf6ViXR.js} +1 -1
- package/dist/client/assets/{Button-R5s3092y.js → Button-CrrCCorI.js} +1 -1
- package/dist/client/assets/ChannelsView-CoREbYTy.css +1 -0
- package/dist/client/assets/ChannelsView-D4I7hhZO.js +1 -0
- package/dist/client/assets/ChatView-DxyBUK57.js +127 -0
- package/dist/client/assets/ChatView-Vfi_jEpI.css +1 -0
- package/dist/client/assets/Close-C9xwy-pW.js +45 -0
- package/dist/client/assets/{FormItem-ZuVh5lSE.js → FormItem-BgJdrTW0.js} +1 -1
- package/dist/client/assets/GatewaysView-Cib2JydO.js +1 -0
- package/dist/client/assets/GatewaysView-DtUN_4uh.css +1 -0
- package/dist/client/assets/Input-ChENEW-Z.js +234 -0
- package/dist/client/assets/{InputNumber-B6xJGyAP.js → InputNumber-Xd6HWSdp.js} +3 -3
- package/dist/client/assets/JobsView-C9-go5-X.css +1 -0
- package/dist/client/assets/{JobsView-BNGFt0kv.js → JobsView-SnToCbDd.js} +2 -2
- package/dist/client/assets/{LoginView-B-UpFAOr.js → LoginView-BZdmMnsf.js} +1 -1
- package/dist/client/assets/LoginView-DHPxG3eC.css +1 -0
- package/dist/client/assets/{LogsView-BMJ5FVwp.js → LogsView-DblvOJIg.js} +1 -1
- package/dist/client/assets/LogsView-VfBZmaM1.css +1 -0
- package/dist/client/assets/{MarkdownRenderer-C8-GFOw3.js → MarkdownRenderer-DJLVk7ei.js} +1 -1
- package/dist/client/assets/MarkdownRenderer-Dc9VWGMm.css +1 -0
- package/dist/client/assets/MemoryView-BZxpGTCE.css +1 -0
- package/dist/client/assets/{MemoryView-Rfsn9nzW.js → MemoryView-exXvRwCc.js} +1 -1
- package/dist/client/assets/{Modal-DCJNfzf6.js → Modal-B2zvXTrk.js} +6 -6
- package/dist/client/assets/{ModelsView-wE2P2H3O.js → ModelsView-DGs47Cj4.js} +1 -1
- package/dist/client/assets/ModelsView-jbgZP3YF.css +1 -0
- package/dist/client/assets/Popconfirm-BoZc0kKk.js +16 -0
- package/dist/client/assets/Popover-Cu52vG3D.js +117 -0
- package/dist/client/assets/ProfilesView-1BtKDO_6.css +1 -0
- package/dist/client/assets/ProfilesView-D0FY7Jwe.js +440 -0
- package/dist/client/assets/Select-BHc7u-Yf.js +340 -0
- package/dist/client/assets/SettingRow-Cr1VcUPz.css +1 -0
- package/dist/client/assets/{SettingRow-Bztj1Qvd.js → SettingRow-i-UXlco7.js} +1 -1
- package/dist/client/assets/SettingsView-BW6ctYG5.js +352 -0
- package/dist/client/assets/SettingsView-Dhr2wzAB.css +1 -0
- package/dist/client/assets/SkillsView-5K2WjAWZ.css +1 -0
- package/dist/client/assets/{SkillsView-DA7GSqMh.js → SkillsView-B5QBaAzi.js} +1 -1
- package/dist/client/assets/{Spin-UenY6DjU.js → Spin-DsNCRPk9.js} +3 -3
- package/dist/client/assets/Suffix-3xK0KZGt.js +90 -0
- package/dist/client/assets/{Switch-D4sdzrF1.js → Switch-Bf63XXgA.js} +2 -2
- package/dist/client/assets/{light-UKc15Qzy.js → Tag-Dmbj68Ki.js} +2 -2
- package/dist/client/assets/TerminalView-BOiVMGJZ.css +1 -0
- package/dist/client/assets/{TerminalView-bdOH27Rz.js → TerminalView-DrJHZ0qI.js} +16 -16
- package/dist/client/assets/{Tooltip-shahfZE0.js → Tooltip-CRbZNhG0.js} +1 -1
- package/dist/client/assets/{UsageView-LP-yDWfN.js → UsageView-DQ43JasX.js} +1 -1
- package/dist/client/assets/UsageView-wje1C97e.css +1 -0
- package/dist/client/assets/Warning-kBbRMAif.js +1 -0
- package/dist/client/assets/{_plugin-vue_export-helper-B5RrPTMt.js → _plugin-vue_export-helper-CnosYBkx.js} +1 -1
- package/dist/client/assets/app-BT9yU6N6.js +1 -0
- package/dist/client/assets/app-CjNVVG5x.js +1 -0
- package/dist/client/assets/{browser-Cnde4syl.js → browser-Djp4tkp3.js} +1 -1
- package/dist/client/assets/chat-DlC9S9DK.js +6 -0
- package/dist/client/assets/composables-DCA4Yga5.js +1 -0
- package/dist/client/assets/fade-in.cssr-CIVyTG6A.js +12 -0
- package/dist/client/assets/index-BEcRccNA.css +1 -0
- package/dist/client/assets/index-D12ukDT7.js +284 -0
- package/dist/client/assets/{jobs-Bg3B0qd3.js → jobs-CcVaCGMJ.js} +1 -1
- package/dist/client/assets/{light-CtcMXxnt.js → light-BF6E9z0k.js} +1 -1
- package/dist/client/assets/{light-B9EqymT1.js → light-BJ96fCLC.js} +1 -1
- package/dist/client/assets/{light-7AGE9udo.js → light-BPqyaxve.js} +1 -1
- package/dist/client/assets/{light-C_iMTPuX.js → light-CSp9-LhE.js} +1 -1
- package/dist/client/assets/light-D9G2GshF.js +1 -0
- package/dist/client/assets/light-KCEDTUGE.js +23 -0
- package/dist/client/assets/{pinia-BizF94YH.js → pinia-iHE5_ZXa.js} +1 -1
- package/dist/client/assets/profiles-CJCR84uQ.js +1 -0
- package/dist/client/assets/{router-BuVIua3w.js → router-C-NNJUuf.js} +2 -2
- package/dist/client/assets/{sessions-CpgDAUKL.js → sessions-C4bnNvzS.js} +1 -1
- package/dist/client/assets/{skills-BGUX0Zk7.js → skills-B4slZfeZ.js} +1 -1
- package/dist/client/assets/{use-message-DgahoF2f.js → use-message-BIpqgDet.js} +1 -1
- package/dist/client/assets/{useTheme-CRVFV8Ud.js → useTheme-B78N9tyz.js} +1 -1
- package/dist/client/index.html +29 -29
- package/dist/server/index.js +17 -79
- package/dist/server/routes/hermes/filesystem.js +3 -1
- package/dist/server/routes/hermes/gateways.d.ts +4 -0
- package/dist/server/routes/hermes/gateways.js +73 -0
- package/dist/server/routes/hermes/index.js +2 -0
- package/dist/server/routes/hermes/profiles.js +28 -84
- package/dist/server/routes/hermes/proxy-handler.js +17 -1
- package/dist/server/routes/hermes/sessions.js +9 -0
- package/dist/server/services/hermes/gateway-manager.d.ts +131 -0
- package/dist/server/services/hermes/gateway-manager.js +536 -0
- package/dist/server/services/hermes/sessions-db.d.ts +24 -0
- package/dist/server/services/hermes/sessions-db.js +147 -0
- package/package.json +1 -1
- package/dist/client/assets/ChannelsView-CH6386MX.js +0 -1
- package/dist/client/assets/ChannelsView-DS2AEk-a.css +0 -1
- package/dist/client/assets/ChatView-C_mCyb0n.js +0 -127
- package/dist/client/assets/ChatView-CtLv9X8G.css +0 -1
- package/dist/client/assets/Close-CbcMKiZ9.js +0 -45
- package/dist/client/assets/Input-CbOEVtEq.js +0 -234
- package/dist/client/assets/JobsView-CVx2Yv-y.css +0 -1
- package/dist/client/assets/LoginView-CA9w3oDH.css +0 -1
- package/dist/client/assets/LogsView-BG7Bro4j.css +0 -1
- package/dist/client/assets/MarkdownRenderer-Ct6cRT2D.css +0 -1
- package/dist/client/assets/MemoryView-DEyIgPS8.css +0 -1
- package/dist/client/assets/ModelsView-D1p_2trx.css +0 -1
- package/dist/client/assets/Popconfirm-pG5fyaNw.js +0 -16
- package/dist/client/assets/Popover-BcnZkOJ0.js +0 -117
- package/dist/client/assets/ProfilesView-CAOfb8ly.js +0 -440
- package/dist/client/assets/ProfilesView-Chffv0-D.css +0 -1
- package/dist/client/assets/Scrollbar-B7udJACg.js +0 -77
- package/dist/client/assets/Select-B6Xt21kv.js +0 -340
- package/dist/client/assets/SettingRow-CwidKv2Q.css +0 -1
- package/dist/client/assets/SettingsView-BIEQOPzq.css +0 -1
- package/dist/client/assets/SettingsView-Dwx8y_nj.js +0 -352
- package/dist/client/assets/SkillsView-D5bivF7Z.css +0 -1
- package/dist/client/assets/Suffix-DopnzIdr.js +0 -25
- package/dist/client/assets/TerminalView-DPdn9YA7.css +0 -1
- package/dist/client/assets/UsageView-CnADqqzf.css +0 -1
- package/dist/client/assets/Warning-DT2rnqpH.js +0 -1
- package/dist/client/assets/app-B3-jMgcz.js +0 -1
- package/dist/client/assets/app-Baqdn89g.js +0 -1
- package/dist/client/assets/chat-CCvtq7iz.js +0 -6
- package/dist/client/assets/composables-yAWv_nAD.js +0 -1
- package/dist/client/assets/fade-in-scale-up.cssr-7cCctcdO.js +0 -1
- package/dist/client/assets/index-JeutuTe0.css +0 -1
- package/dist/client/assets/index-vZMUiSyM.js +0 -284
- package/dist/client/assets/light-87-mk9Yl.js +0 -1
- package/dist/client/assets/profiles-DXTLdlvo.js +0 -23
- package/dist/client/assets/use-compitable-C1bGazqI.js +0 -1
- /package/dist/client/assets/{_common-DgdkN_d5.js → _common-Yp55QE79.js} +0 -0
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import{C as e,F as t,H as n,J as r,L as i,M as a,N as o,U as s,V as c,X as l,Z as u,ct as d,d as f,dt as p,j as m,y as h,z as g}from"./router-BuVIua3w.js";import{B as _,F as v,M as y,N as b,P as x,V as S,c as ee,ct as C,d as w,dt as T,l as E,n as D,st as O,u as k,ut as A,z as te}from"./browser-Cnde4syl.js";function ne(e){return e.composedPath()[0]||null}function re(e){return typeof e==`string`?e.endsWith(`px`)?Number(e.slice(0,e.length-2)):Number(e):e}function ie(e){if(e!=null)return typeof e==`number`?`${e}px`:e.endsWith(`px`)?e:`${e}px`}function j(e,t){let n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw Error(`[seemly/getMargin]:`+e+` is not a valid value.`)}return t===void 0?r:r[t]}function M(e){return e.composedPath()[0]}var N={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function ae(e,t,n){if(e===`mousemoveoutside`){let e=e=>{t.contains(M(e))||n(e)};return{mousemove:e,touchstart:e}}else if(e===`clickoutside`){let e=!1,r=n=>{e=!t.contains(M(n))},i=r=>{e&&(t.contains(M(r))||n(r))};return{mousedown:r,mouseup:i,touchstart:r,touchend:i}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function oe(e,t,n){let r=N[e],i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let a=i.get(n);return a===void 0&&i.set(n,a=ae(e,t,n)),a}function P(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=oe(e,t,n);return Object.keys(i).forEach(e=>{I(e,document,i[e],r)}),!0}return!1}function F(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=oe(e,t,n);return Object.keys(i).forEach(e=>{L(e,document,i[e],r)}),!0}return!1}function se(){if(typeof window>`u`)return{on:()=>{},off:()=>{}};let e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(e,t,n){let r=e[t];return e[t]=function(){return n.apply(e,arguments),r.apply(e,arguments)},e}function a(e,t){e[t]=Event.prototype[t]}let o=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,`currentTarget`);function c(){return o.get(this)??null}function l(e,t){s!==void 0&&Object.defineProperty(e,`currentTarget`,{configurable:!0,enumerable:!0,get:t??s.get})}let u={bubble:{},capture:{}},d={};function f(){let s=function(s){let{type:d,eventPhase:f,bubbles:p}=s,m=M(s);if(f===2)return;let h=f===1?`capture`:`bubble`,g=m,_=[];for(;g===null&&(g=window),_.push(g),g!==window;)g=g.parentNode||null;let v=u.capture[d],y=u.bubble[d];if(i(s,`stopPropagation`,n),i(s,`stopImmediatePropagation`,r),l(s,c),h===`capture`){if(v===void 0)return;for(let n=_.length-1;n>=0&&!e.has(s);--n){let e=_[n],r=v.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}if(n===0&&!p&&y!==void 0){let n=y.get(e);if(n!==void 0)for(let e of n){if(t.has(s))break;e(s)}}}}else if(h===`bubble`){if(y===void 0)return;for(let n=0;n<_.length&&!e.has(s);++n){let e=_[n],r=y.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}}}a(s,`stopPropagation`),a(s,`stopImmediatePropagation`),l(s)};return s.displayName=`evtdUnifiedHandler`,s}function p(){let e=function(e){let{type:t,eventPhase:n}=e;if(n!==2)return;let r=d[t];r!==void 0&&r.forEach(t=>t(e))};return e.displayName=`evtdUnifiedWindowEventHandler`,e}let m=f(),h=p();function g(e,t){let n=u[e];return n[t]===void 0&&(n[t]=new Map,window.addEventListener(t,m,e===`capture`)),n[t]}function _(e){return d[e]===void 0&&(d[e]=new Set,window.addEventListener(e,h)),d[e]}function v(e,t){let n=e.get(t);return n===void 0&&e.set(t,n=new Set),n}function y(e,t,n,r){let i=u[t][n];if(i!==void 0){let t=i.get(e);if(t!==void 0&&t.has(r))return!0}return!1}function b(e,t){let n=d[e];return!!(n!==void 0&&n.has(t))}function x(e,t,n,r){let i;if(i=typeof r==`object`&&r.once===!0?a=>{S(e,t,i,r),n(a)}:n,P(e,t,i,r))return;let a=v(g(r===!0||typeof r==`object`&&r.capture===!0?`capture`:`bubble`,e),t);if(a.has(i)||a.add(i),t===window){let t=_(e);t.has(i)||t.add(i)}}function S(e,t,n,r){if(F(e,t,n,r))return;let i=r===!0||typeof r==`object`&&r.capture===!0,a=i?`capture`:`bubble`,o=g(a,e),s=v(o,t);if(t===window&&!y(t,i?`bubble`:`capture`,e,n)&&b(e,n)){let t=d[e];t.delete(n),t.size===0&&(window.removeEventListener(e,h),d[e]=void 0)}s.has(n)&&s.delete(n),s.size===0&&o.delete(t),o.size===0&&(window.removeEventListener(e,m,a===`capture`),u[a][e]=void 0)}return{on:x,off:S}}var{on:I,off:L}=se();function R(t,n){return l(t,e=>{e!==void 0&&(n.value=e)}),e(()=>t.value===void 0?n.value:t.value)}var ce=(typeof window>`u`?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1)&&!window.MSStream;function le(){return ce}function ue(e){let t={isDeactivated:!1},r=!1;return g(()=>{if(t.isDeactivated=!1,!r){r=!0;return}e()}),n(()=>{t.isDeactivated=!0,r||=!0}),t}function de(e,t){console.error(`[vueuc/${e}]: ${t}`)}var z=[],fe=function(){return z.some(function(e){return e.activeTargets.length>0})},pe=function(){return z.some(function(e){return e.skippedTargets.length>0})},B=`ResizeObserver loop completed with undelivered notifications.`,me=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:B}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=B),window.dispatchEvent(e)},V;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(V||={});var H=function(e){return Object.freeze(e)},U=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,H(this)}return e}(),he=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,H(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),W=function(e){return e instanceof SVGElement&&`getBBox`in e},G=function(e){if(W(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},ge=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},_e=function(e){switch(e.tagName){case`INPUT`:if(e.type!==`image`)break;case`VIDEO`:case`AUDIO`:case`EMBED`:case`OBJECT`:case`CANVAS`:case`IFRAME`:case`IMG`:return!0}return!1},K=typeof window<`u`?window:{},q=new WeakMap,ve=/auto|scroll/,ye=/^tb|vertical/,be=/msie|trident/i.test(K.navigator&&K.navigator.userAgent),J=function(e){return parseFloat(e||`0`)},Y=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new U((n?t:e)||0,(n?e:t)||0)},xe=H({devicePixelContentBoxSize:Y(),borderBoxSize:Y(),contentBoxSize:Y(),contentRect:new he(0,0,0,0)}),Se=function(e,t){if(t===void 0&&(t=!1),q.has(e)&&!t)return q.get(e);if(G(e))return q.set(e,xe),xe;var n=getComputedStyle(e),r=W(e)&&e.ownerSVGElement&&e.getBBox(),i=!be&&n.boxSizing===`border-box`,a=ye.test(n.writingMode||``),o=!r&&ve.test(n.overflowY||``),s=!r&&ve.test(n.overflowX||``),c=r?0:J(n.paddingTop),l=r?0:J(n.paddingRight),u=r?0:J(n.paddingBottom),d=r?0:J(n.paddingLeft),f=r?0:J(n.borderTopWidth),p=r?0:J(n.borderRightWidth),m=r?0:J(n.borderBottomWidth),h=r?0:J(n.borderLeftWidth),g=d+l,_=c+u,v=h+p,y=f+m,b=s?e.offsetHeight-y-e.clientHeight:0,x=o?e.offsetWidth-v-e.clientWidth:0,S=i?g+v:0,ee=i?_+y:0,C=r?r.width:J(n.width)-S-x,w=r?r.height:J(n.height)-ee-b,T=C+g+x+v,E=w+_+b+y,D=H({devicePixelContentBoxSize:Y(Math.round(C*devicePixelRatio),Math.round(w*devicePixelRatio),a),borderBoxSize:Y(T,E,a),contentBoxSize:Y(C,w,a),contentRect:new he(d,c,C,w)});return q.set(e,D),D},Ce=function(e,t,n){var r=Se(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case V.DEVICE_PIXEL_CONTENT_BOX:return o;case V.BORDER_BOX:return i;default:return a}},we=function(){function e(e){var t=Se(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=H([t.borderBoxSize]),this.contentBoxSize=H([t.contentBoxSize]),this.devicePixelContentBoxSize=H([t.devicePixelContentBoxSize])}return e}(),Te=function(e){if(G(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Ee=function(){var e=1/0,t=[];z.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new we(t.target),i=Te(t.target);r.push(n),t.lastReportedSize=Ce(t.target,t.observedBox),i<e&&(e=i)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},X=function(e){z.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(Te(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},De=function(){var e=0;for(X(e);fe();)e=Ee(),X(e);return pe()&&me(),e>0},Oe,ke=[],Ae=function(){return ke.splice(0).forEach(function(e){return e()})},je=function(e){if(!Oe){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return Ae()}).observe(n,{characterData:!0}),Oe=function(){n.textContent=`${t?t--:t++}`}}ke.push(e),Oe()},Me=function(e){je(function(){requestAnimationFrame(e)})},Z=0,Ne=function(){return!!Z},Pe=250,Fe={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ie=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],Le=function(e){return e===void 0&&(e=0),Date.now()+e},Re=!1,ze=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(e===void 0&&(e=Pe),!Re){Re=!0;var n=Le(e);Me(function(){var r=!1;try{r=De()}finally{if(Re=!1,e=n-Le(),!Ne())return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Fe)};document.body?t():K.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ie.forEach(function(t){return K.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),Ie.forEach(function(t){return K.removeEventListener(t,e.listener,!0)}),!0)},e}()),Be=function(e){!Z&&e>0&&ze.start(),Z+=e,!Z&&ze.stop()},Ve=function(e){return!W(e)&&!_e(e)&&getComputedStyle(e).display===`inline`},He=function(){function e(e,t){this.target=e,this.observedBox=t||V.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=Ce(this.target,this.observedBox,!0);return Ve(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),Ue=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),We=new WeakMap,Ge=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Ke=function(){function e(){}return e.connect=function(e,t){var n=new Ue(e,t);We.set(e,n)},e.observe=function(e,t,n){var r=We.get(e),i=r.observationTargets.length===0;Ge(r.observationTargets,t)<0&&(i&&z.push(r),r.observationTargets.push(new He(t,n&&n.box)),Be(1),ze.schedule())},e.unobserve=function(e,t){var n=We.get(e),r=Ge(n.observationTargets,t),i=n.observationTargets.length===1;r>=0&&(i&&z.splice(z.indexOf(n),1),n.observationTargets.splice(r,1),Be(-1))},e.disconnect=function(e){var t=this,n=We.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),qe=function(){function e(e){if(arguments.length===0)throw TypeError(`Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.`);if(typeof e!=`function`)throw TypeError(`Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.`);Ke.connect(this,e)}return e.prototype.observe=function(e,t){if(arguments.length===0)throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!ge(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);Ke.observe(this,e,t)},e.prototype.unobserve=function(e){if(arguments.length===0)throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!ge(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);Ke.unobserve(this,e)},e.prototype.disconnect=function(){Ke.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}(),Je=new class{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<`u`&&window.ResizeObserver||qe)(this.handleResize),this.elHandlersMap=new Map}handleResize(e){for(let t of e){let e=this.elHandlersMap.get(t.target);e!==void 0&&e(t)}}registerHandler(e,t){this.elHandlersMap.set(e,t),this.observer.observe(e)}unregisterHandler(e){this.elHandlersMap.has(e)&&(this.elHandlersMap.delete(e),this.observer.unobserve(e))}},Ye=m({name:`ResizeObserver`,props:{onResize:Function},setup(e){let t=!1,n=a().proxy;function r(t){let{onResize:n}=e;n!==void 0&&n(t)}s(()=>{let e=n.$el;if(e===void 0){de(`resize-observer`,`$el does not exist.`);return}if(e.nextElementSibling!==e.nextSibling&&e.nodeType===3&&e.nodeValue!==``){de(`resize-observer`,`$el can not be observed (it may be a text node).`);return}e.nextElementSibling!==null&&(Je.registerHandler(e.nextElementSibling,r),t=!0)}),c(()=>{t&&Je.unregisterHandler(n.$el.nextElementSibling)})},render(){return r(this.$slots,`default`)}});function Xe(e){let{left:t,right:n,top:r,bottom:i}=j(e);return`${r} ${t} ${i} ${n}`}var Ze=m({render(){var e;return(e=this.$slots).default?.call(e)}}),Qe={name:`en-US`,global:{undo:`Undo`,redo:`Redo`,confirm:`Confirm`,clear:`Clear`},Popconfirm:{positiveText:`Confirm`,negativeText:`Cancel`},Cascader:{placeholder:`Please Select`,loading:`Loading`,loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`},DatePicker:{yearFormat:`yyyy`,monthFormat:`MMM`,dayFormat:`eeeeee`,yearTypeFormat:`yyyy`,monthTypeFormat:`yyyy-MM`,dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`,quarterFormat:`yyyy-qqq`,weekFormat:`YYYY-w`,clear:`Clear`,now:`Now`,confirm:`Confirm`,selectTime:`Select Time`,selectDate:`Select Date`,datePlaceholder:`Select Date`,datetimePlaceholder:`Select Date and Time`,monthPlaceholder:`Select Month`,yearPlaceholder:`Select Year`,quarterPlaceholder:`Select Quarter`,weekPlaceholder:`Select Week`,startDatePlaceholder:`Start Date`,endDatePlaceholder:`End Date`,startDatetimePlaceholder:`Start Date and Time`,endDatetimePlaceholder:`End Date and Time`,startMonthPlaceholder:`Start Month`,endMonthPlaceholder:`End Month`,monthBeforeYear:!0,firstDayOfWeek:6,today:`Today`},DataTable:{checkTableAll:`Select all in the table`,uncheckTableAll:`Unselect all in the table`,confirm:`Confirm`,clear:`Clear`},LegacyTransfer:{sourceTitle:`Source`,targetTitle:`Target`},Transfer:{selectAll:`Select all`,unselectAll:`Unselect all`,clearAll:`Clear`,total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:`No Data`},Select:{placeholder:`Please Select`},TimePicker:{placeholder:`Select Time`,positiveText:`OK`,negativeText:`Cancel`,now:`Now`,clear:`Clear`},Pagination:{goto:`Goto`,selectionSuffix:`page`},DynamicTags:{add:`Add`},Log:{loading:`Loading`},Input:{placeholder:`Please Input`},InputNumber:{placeholder:`Please Input`},DynamicInput:{create:`Create`},ThemeEditor:{title:`Theme Editor`,clearAllVars:`Clear All Variables`,clearSearch:`Clear Search`,filterCompName:`Filter Component Name`,filterVarName:`Filter Variable Name`,import:`Import`,export:`Export`,restore:`Reset to Default`},Image:{tipPrevious:`Previous picture (←)`,tipNext:`Next picture (→)`,tipCounterclockwise:`Counterclockwise`,tipClockwise:`Clockwise`,tipZoomOut:`Zoom out`,tipZoomIn:`Zoom in`,tipDownload:`Download`,tipClose:`Close (Esc)`,tipOriginalSize:`Zoom to original size`},Heatmap:{less:`less`,more:`more`,monthFormat:`MMM`,weekdayFormat:`eee`}};function $e(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Q(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}function $(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?tt(s,e=>e.test(o)):et(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function et(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function tt(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function nt(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var rt={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},it=(e,t,n)=>{let r,i=rt[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},at={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},ot=(e,t,n,r)=>at[e],st={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:Q({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:Q({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:Q({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:Q({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:Q({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})},ct={ordinalNumber:nt({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:$({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:$({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:$({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:$({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:$({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},lt={name:`en-US`,locale:{code:`en-US`,formatDistance:it,formatLong:{date:$e({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:$e({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:$e({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},formatRelative:ot,localize:st,match:ct,options:{weekStartsOn:0,firstWeekContainsDate:1}}},ut=`[object Symbol]`;function dt(e){return typeof e==`symbol`||b(e)&&x(e)==ut}function ft(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var pt=1/0,mt=v?v.prototype:void 0,ht=mt?mt.toString:void 0;function gt(e){if(typeof e==`string`)return e;if(y(e))return ft(e,gt)+``;if(dt(e))return ht?ht.call(e):``;var t=e+``;return t==`0`&&1/e==-pt?`-0`:t}function _t(e){return e==null?``:gt(e)}function vt(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function yt(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:vt(e,t,n)}var bt=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function xt(e){return bt.test(e)}function St(e){return e.split(``)}var Ct=`\\ud800-\\udfff`,wt=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,Tt=`\\ufe0e\\ufe0f`,Et=`[`+Ct+`]`,Dt=`[`+wt+`]`,Ot=`\\ud83c[\\udffb-\\udfff]`,kt=`(?:`+Dt+`|`+Ot+`)`,At=`[^`+Ct+`]`,jt=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Mt=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Nt=`\\u200d`,Pt=kt+`?`,Ft=`[`+Tt+`]?`,It=`(?:`+Nt+`(?:`+[At,jt,Mt].join(`|`)+`)`+Ft+Pt+`)*`,Lt=Ft+Pt+It,Rt=`(?:`+[At+Dt+`?`,Dt,jt,Mt,Et].join(`|`)+`)`,zt=RegExp(Ot+`(?=`+Ot+`)|`+Rt+Lt,`g`);function Bt(e){return e.match(zt)||[]}function Vt(e){return xt(e)?Bt(e):St(e)}function Ht(e){return function(t){t=_t(t);var n=xt(t)?Vt(t):void 0,r=n?n[0]:t.charAt(0),i=n?yt(n,1).join(``):t.slice(1);return r[e]()+i}}var Ut=Ht(`toUpperCase`);function Wt(n){let{mergedLocaleRef:r,mergedDateLocaleRef:i}=t(S,null)||{},a=e(()=>r?.value?.[n]??Qe[n]);return{dateLocaleRef:e(()=>i?.value??lt),localeRef:a}}var Gt=C(`base-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
|
-
`,[O(`svg`,`
|
|
10
|
-
height: 1em;
|
|
11
|
-
width: 1em;
|
|
12
|
-
`)]),Kt=m({name:`BaseIcon`,props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){E(`-base-icon`,Gt,p(e,`clsPrefix`))},render(){return o(`i`,{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}});function qt(e,n){let r=m({render(){return n()}});return m({name:Ut(e),setup(){let n=t(S,null)?.mergedIconsRef;return()=>{let t=n?.value?.[e];return t?t():o(r,null)}}})}var{cubicBezierEaseInOut:Jt}=k;function Yt({name:e=`fade-in`,enterDuration:t=`0.2s`,leaveDuration:n=`0.2s`,enterCubicBezier:r=Jt,leaveCubicBezier:i=Jt}={}){return[O(`&.${e}-transition-enter-active`,{transition:`all ${t} ${r}!important`}),O(`&.${e}-transition-leave-active`,{transition:`all ${n} ${i}!important`}),O(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0}),O(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`,{opacity:1})]}var Xt={railInsetHorizontalBottom:`auto 2px 4px 2px`,railInsetHorizontalTop:`4px 2px auto 2px`,railInsetVerticalRight:`2px 4px 2px auto`,railInsetVerticalLeft:`2px auto 2px 4px`,railColor:`transparent`};function Zt(e){let{scrollbarColor:t,scrollbarColorHover:n,scrollbarHeight:r,scrollbarWidth:i,scrollbarBorderRadius:a}=e;return Object.assign(Object.assign({},Xt),{height:r,width:i,borderRadius:a,color:t,colorHover:n})}var Qt={name:`Scrollbar`,common:D,self:Zt},$t=C(`scrollbar`,`
|
|
13
|
-
overflow: hidden;
|
|
14
|
-
position: relative;
|
|
15
|
-
z-index: auto;
|
|
16
|
-
height: 100%;
|
|
17
|
-
width: 100%;
|
|
18
|
-
`,[O(`>`,[C(`scrollbar-container`,`
|
|
19
|
-
width: 100%;
|
|
20
|
-
overflow: scroll;
|
|
21
|
-
height: 100%;
|
|
22
|
-
min-height: inherit;
|
|
23
|
-
max-height: inherit;
|
|
24
|
-
scrollbar-width: none;
|
|
25
|
-
`,[O(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
|
|
26
|
-
width: 0;
|
|
27
|
-
height: 0;
|
|
28
|
-
display: none;
|
|
29
|
-
`),O(`>`,[C(`scrollbar-content`,`
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
min-width: 100%;
|
|
32
|
-
`)])])]),O(`>, +`,[C(`scrollbar-rail`,`
|
|
33
|
-
position: absolute;
|
|
34
|
-
pointer-events: none;
|
|
35
|
-
user-select: none;
|
|
36
|
-
background: var(--n-scrollbar-rail-color);
|
|
37
|
-
-webkit-user-select: none;
|
|
38
|
-
`,[T(`horizontal`,`
|
|
39
|
-
height: var(--n-scrollbar-height);
|
|
40
|
-
`,[O(`>`,[A(`scrollbar`,`
|
|
41
|
-
height: var(--n-scrollbar-height);
|
|
42
|
-
border-radius: var(--n-scrollbar-border-radius);
|
|
43
|
-
right: 0;
|
|
44
|
-
`)])]),T(`horizontal--top`,`
|
|
45
|
-
top: var(--n-scrollbar-rail-top-horizontal-top);
|
|
46
|
-
right: var(--n-scrollbar-rail-right-horizontal-top);
|
|
47
|
-
bottom: var(--n-scrollbar-rail-bottom-horizontal-top);
|
|
48
|
-
left: var(--n-scrollbar-rail-left-horizontal-top);
|
|
49
|
-
`),T(`horizontal--bottom`,`
|
|
50
|
-
top: var(--n-scrollbar-rail-top-horizontal-bottom);
|
|
51
|
-
right: var(--n-scrollbar-rail-right-horizontal-bottom);
|
|
52
|
-
bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom);
|
|
53
|
-
left: var(--n-scrollbar-rail-left-horizontal-bottom);
|
|
54
|
-
`),T(`vertical`,`
|
|
55
|
-
width: var(--n-scrollbar-width);
|
|
56
|
-
`,[O(`>`,[A(`scrollbar`,`
|
|
57
|
-
width: var(--n-scrollbar-width);
|
|
58
|
-
border-radius: var(--n-scrollbar-border-radius);
|
|
59
|
-
bottom: 0;
|
|
60
|
-
`)])]),T(`vertical--left`,`
|
|
61
|
-
top: var(--n-scrollbar-rail-top-vertical-left);
|
|
62
|
-
right: var(--n-scrollbar-rail-right-vertical-left);
|
|
63
|
-
bottom: var(--n-scrollbar-rail-bottom-vertical-left);
|
|
64
|
-
left: var(--n-scrollbar-rail-left-vertical-left);
|
|
65
|
-
`),T(`vertical--right`,`
|
|
66
|
-
top: var(--n-scrollbar-rail-top-vertical-right);
|
|
67
|
-
right: var(--n-scrollbar-rail-right-vertical-right);
|
|
68
|
-
bottom: var(--n-scrollbar-rail-bottom-vertical-right);
|
|
69
|
-
left: var(--n-scrollbar-rail-left-vertical-right);
|
|
70
|
-
`),T(`disabled`,[O(`>`,[A(`scrollbar`,`pointer-events: none;`)])]),O(`>`,[A(`scrollbar`,`
|
|
71
|
-
z-index: 1;
|
|
72
|
-
position: absolute;
|
|
73
|
-
cursor: pointer;
|
|
74
|
-
pointer-events: all;
|
|
75
|
-
background-color: var(--n-scrollbar-color);
|
|
76
|
-
transition: background-color .2s var(--n-scrollbar-bezier);
|
|
77
|
-
`,[Yt(),O(`&:hover`,`background-color: var(--n-scrollbar-color-hover);`)])])])])]),en=m({name:`Scrollbar`,props:Object.assign(Object.assign({},ee.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:`hover`},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean,internalExposeWidthCssVar:Boolean,yPlacement:{type:String,default:`right`},xPlacement:{type:String,default:`bottom`}}),inheritAttrs:!1,setup(t){let{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=_(t),a=w(`Scrollbar`,i,n),o=d(null),l=d(null),f=d(null),p=d(null),m=d(null),h=d(null),g=d(null),v=d(null),y=d(null),b=d(null),x=d(null),S=d(0),C=d(0),T=d(!1),E=d(!1),D=!1,O=!1,k,A,ie=0,M=0,N=0,ae=0,oe=le(),P=ee(`Scrollbar`,`-scrollbar`,$t,Qt,t,n),F=e(()=>{let{value:e}=v,{value:t}=h,{value:n}=b;return e===null||t===null||n===null?0:Math.min(e,n*e/t+re(P.value.self.width)*1.5)}),se=e(()=>`${F.value}px`),R=e(()=>{let{value:e}=y,{value:t}=g,{value:n}=x;return e===null||t===null||n===null?0:n*e/t+re(P.value.self.height)*1.5}),ce=e(()=>`${R.value}px`),de=e(()=>{let{value:e}=v,{value:t}=S,{value:n}=h,{value:r}=b;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-F.value):0}}),z=e(()=>`${de.value}px`),fe=e(()=>{let{value:e}=y,{value:t}=C,{value:n}=g,{value:r}=x;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-R.value):0}}),pe=e(()=>`${fe.value}px`),B=e(()=>{let{value:e}=v,{value:t}=h;return e!==null&&t!==null&&t>e}),me=e(()=>{let{value:e}=y,{value:t}=g;return e!==null&&t!==null&&t>e}),V=e(()=>{let{trigger:e}=t;return e===`none`||T.value}),H=e(()=>{let{trigger:e}=t;return e===`none`||E.value}),U=e(()=>{let{container:e}=t;return e?e():l.value}),he=e(()=>{let{content:e}=t;return e?e():f.value}),W=(e,n)=>{if(!t.scrollable)return;if(typeof e==`number`){q(e,n??0,0,!1,`auto`);return}let{left:r,top:i,index:a,elSize:o,position:s,behavior:c,el:l,debounce:u=!0}=e;(r!==void 0||i!==void 0)&&q(r??0,i??0,0,!1,c),l===void 0?a!==void 0&&o!==void 0?q(0,a*o,o,u,c):s===`bottom`?q(0,2**53-1,0,!1,c):s===`top`&&q(0,0,0,!1,c):q(0,l.offsetTop,l.offsetHeight,u,c)},G=ue(()=>{t.container||W({top:S.value,left:C.value})}),ge=()=>{G.isDeactivated||X()},_e=e=>{if(G.isDeactivated)return;let{onResize:n}=t;n&&n(e),X()},K=(e,n)=>{if(!t.scrollable)return;let{value:r}=U;r&&(typeof e==`object`?r.scrollBy(e):r.scrollBy(e,n||0))};function q(e,t,n,r,i){let{value:a}=U;if(a){if(r){let{scrollTop:r,offsetHeight:o}=a;if(t>r){t+n<=r+o||a.scrollTo({left:e,top:t+n-o,behavior:i});return}}a.scrollTo({left:e,top:t,behavior:i})}}function ve(){xe(),Se(),X()}function ye(){be()}function be(){J(),Y()}function J(){A!==void 0&&window.clearTimeout(A),A=window.setTimeout(()=>{E.value=!1},t.duration)}function Y(){k!==void 0&&window.clearTimeout(k),k=window.setTimeout(()=>{T.value=!1},t.duration)}function xe(){k!==void 0&&window.clearTimeout(k),T.value=!0}function Se(){A!==void 0&&window.clearTimeout(A),E.value=!0}function Ce(e){let{onScroll:n}=t;n&&n(e),we()}function we(){let{value:e}=U;e&&(S.value=e.scrollTop,C.value=e.scrollLeft*(a?.value?-1:1))}function Te(){let{value:e}=he;e&&(h.value=e.offsetHeight,g.value=e.offsetWidth);let{value:t}=U;t&&(v.value=t.offsetHeight,y.value=t.offsetWidth);let{value:n}=m,{value:r}=p;n&&(x.value=n.offsetWidth),r&&(b.value=r.offsetHeight)}function Ee(){let{value:e}=U;e&&(S.value=e.scrollTop,C.value=e.scrollLeft*(a?.value?-1:1),v.value=e.offsetHeight,y.value=e.offsetWidth,h.value=e.scrollHeight,g.value=e.scrollWidth);let{value:t}=m,{value:n}=p;t&&(x.value=t.offsetWidth),n&&(b.value=n.offsetHeight)}function X(){t.scrollable&&(t.useUnifiedContainer?Ee():(Te(),we()))}function De(e){return!o.value?.contains(ne(e))}function Oe(e){e.preventDefault(),e.stopPropagation(),O=!0,I(`mousemove`,window,ke,!0),I(`mouseup`,window,Ae,!0),M=C.value,N=a?.value?window.innerWidth-e.clientX:e.clientX}function ke(e){if(!O)return;k!==void 0&&window.clearTimeout(k),A!==void 0&&window.clearTimeout(A);let{value:n}=y,{value:r}=g,{value:i}=R;if(n===null||r===null)return;let o=(a?.value?window.innerWidth-e.clientX-N:e.clientX-N)*(r-n)/(n-i),s=r-n,c=M+o;c=Math.min(s,c),c=Math.max(c,0);let{value:l}=U;if(l){l.scrollLeft=c*(a?.value?-1:1);let{internalOnUpdateScrollLeft:e}=t;e&&e(c)}}function Ae(e){e.preventDefault(),e.stopPropagation(),L(`mousemove`,window,ke,!0),L(`mouseup`,window,Ae,!0),O=!1,X(),De(e)&&be()}function je(e){e.preventDefault(),e.stopPropagation(),D=!0,I(`mousemove`,window,Me,!0),I(`mouseup`,window,Z,!0),ie=S.value,ae=e.clientY}function Me(e){if(!D)return;k!==void 0&&window.clearTimeout(k),A!==void 0&&window.clearTimeout(A);let{value:t}=v,{value:n}=h,{value:r}=F;if(t===null||n===null)return;let i=(e.clientY-ae)*(n-t)/(t-r),a=n-t,o=ie+i;o=Math.min(a,o),o=Math.max(o,0);let{value:s}=U;s&&(s.scrollTop=o)}function Z(e){e.preventDefault(),e.stopPropagation(),L(`mousemove`,window,Me,!0),L(`mouseup`,window,Z,!0),D=!1,X(),De(e)&&be()}u(()=>{let{value:e}=me,{value:t}=B,{value:r}=n,{value:i}=m,{value:a}=p;i&&(e?i.classList.remove(`${r}-scrollbar-rail--disabled`):i.classList.add(`${r}-scrollbar-rail--disabled`)),a&&(t?a.classList.remove(`${r}-scrollbar-rail--disabled`):a.classList.add(`${r}-scrollbar-rail--disabled`))}),s(()=>{t.container||X()}),c(()=>{k!==void 0&&window.clearTimeout(k),A!==void 0&&window.clearTimeout(A),L(`mousemove`,window,Me,!0),L(`mouseup`,window,Z,!0)});let Ne=e(()=>{let{common:{cubicBezierEaseInOut:e},self:{color:t,colorHover:n,height:r,width:i,borderRadius:o,railInsetHorizontalTop:s,railInsetHorizontalBottom:c,railInsetVerticalRight:l,railInsetVerticalLeft:u,railColor:d}}=P.value,{top:f,right:p,bottom:m,left:h}=j(s),{top:g,right:_,bottom:v,left:y}=j(c),{top:b,right:x,bottom:S,left:ee}=j(a?.value?Xe(l):l),{top:C,right:w,bottom:T,left:E}=j(a?.value?Xe(u):u);return{"--n-scrollbar-bezier":e,"--n-scrollbar-color":t,"--n-scrollbar-color-hover":n,"--n-scrollbar-border-radius":o,"--n-scrollbar-width":i,"--n-scrollbar-height":r,"--n-scrollbar-rail-top-horizontal-top":f,"--n-scrollbar-rail-right-horizontal-top":p,"--n-scrollbar-rail-bottom-horizontal-top":m,"--n-scrollbar-rail-left-horizontal-top":h,"--n-scrollbar-rail-top-horizontal-bottom":g,"--n-scrollbar-rail-right-horizontal-bottom":_,"--n-scrollbar-rail-bottom-horizontal-bottom":v,"--n-scrollbar-rail-left-horizontal-bottom":y,"--n-scrollbar-rail-top-vertical-right":b,"--n-scrollbar-rail-right-vertical-right":x,"--n-scrollbar-rail-bottom-vertical-right":S,"--n-scrollbar-rail-left-vertical-right":ee,"--n-scrollbar-rail-top-vertical-left":C,"--n-scrollbar-rail-right-vertical-left":w,"--n-scrollbar-rail-bottom-vertical-left":T,"--n-scrollbar-rail-left-vertical-left":E,"--n-scrollbar-rail-color":d}}),Pe=r?te(`scrollbar`,void 0,Ne,t):void 0;return Object.assign(Object.assign({},{scrollTo:W,scrollBy:K,sync:X,syncUnifiedContainer:Ee,handleMouseEnterWrapper:ve,handleMouseLeaveWrapper:ye}),{mergedClsPrefix:n,rtlEnabled:a,containerScrollTop:S,wrapperRef:o,containerRef:l,contentRef:f,yRailRef:p,xRailRef:m,needYBar:B,needXBar:me,yBarSizePx:se,xBarSizePx:ce,yBarTopPx:z,xBarLeftPx:pe,isShowXBar:V,isShowYBar:H,isIos:oe,handleScroll:Ce,handleContentResize:ge,handleContainerResize:_e,handleYScrollMouseDown:je,handleXScrollMouseDown:Oe,containerWidth:y,cssVars:r?void 0:Ne,themeClass:Pe?.themeClass,onRender:Pe?.onRender})},render(){let{$slots:e,mergedClsPrefix:t,triggerDisplayManually:n,rtlEnabled:r,internalHoistYRail:a,yPlacement:s,xPlacement:c,xScrollable:l}=this;if(!this.scrollable)return e.default?.call(e);let u=this.trigger===`none`,d=(e,n)=>o(`div`,{ref:`yRailRef`,class:[`${t}-scrollbar-rail`,`${t}-scrollbar-rail--vertical`,`${t}-scrollbar-rail--vertical--${s}`,e],"data-scrollbar-rail":!0,style:[n||``,this.verticalRailStyle],"aria-hidden":!0},o(u?Ze:f,u?null:{name:`fade-in-transition`},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?o(`div`,{class:`${t}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),p=()=>{var s;return(s=this.onRender)==null||s.call(this),o(`div`,i(this.$attrs,{role:`none`,ref:`wrapperRef`,class:[`${t}-scrollbar`,this.themeClass,r&&`${t}-scrollbar--rtl`],style:this.cssVars,onMouseenter:n?void 0:this.handleMouseEnterWrapper,onMouseleave:n?void 0:this.handleMouseLeaveWrapper}),[this.container?e.default?.call(e):o(`div`,{role:`none`,ref:`containerRef`,class:[`${t}-scrollbar-container`,this.containerClass],style:[this.containerStyle,this.internalExposeWidthCssVar?{"--n-scrollbar-current-width":ie(this.containerWidth)}:void 0],onScroll:this.handleScroll,onWheel:this.onWheel},o(Ye,{onResize:this.handleContentResize},{default:()=>o(`div`,{ref:`contentRef`,role:`none`,style:[{width:this.xScrollable?`fit-content`:null},this.contentStyle],class:[`${t}-scrollbar-content`,this.contentClass]},e)})),a?null:d(void 0,void 0),l&&o(`div`,{ref:`xRailRef`,class:[`${t}-scrollbar-rail`,`${t}-scrollbar-rail--horizontal`,`${t}-scrollbar-rail--horizontal--${c}`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},o(u?Ze:f,u?null:{name:`fade-in-transition`},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?o(`div`,{class:`${t}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:r?this.xBarLeftPx:void 0,left:r?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},m=this.container?p():o(Ye,{onResize:this.handleContainerResize},{default:p});return a?o(h,null,m,d(this.themeClass,this.cssVars)):m}}),tn=en;export{I as _,Yt as a,ie as b,Wt as c,dt as d,Ze as f,L as g,R as h,Zt as i,_t as l,Je as m,tn as n,qt as o,Ye as p,Qt as r,Kt as s,en as t,ft as u,re as v,ne as x,j as y};
|
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
import{$ as e,C as t,F as n,H as r,J as i,K as a,L as o,N as s,R as c,U as l,V as u,X as d,Z as f,ct as p,d as m,dt as h,h as g,j as _,y as v,z as y}from"./router-BuVIua3w.js";import{B as b,K as x,R as S,W as C,Z as w,c as T,ct as E,d as D,dt as O,et as ee,ft as k,n as A,nt as j,pt as M,q as N,r as P,s as F,st as I,tt as L,ut as R,z as te}from"./browser-Cnde4syl.js";import{D as z,E as B,M as ne,_ as V,b as re,f as ie,h as H,i as U,m as W,t as G,v as K,y as ae}from"./Popover-BcnZkOJ0.js";import{n as oe,r as se,t as ce}from"./create-5zWq3BEB.js";import{b as q,c as le,f as J,h as ue,m as Y,p as de,r as fe,s as pe,t as me,v as X,x as he,y as Z}from"./Scrollbar-B7udJACg.js";import{t as ge}from"./use-compitable-C1bGazqI.js";import{i as _e,n as Q,t as ve}from"./fade-in-scale-up.cssr-7cCctcdO.js";import{t as ye}from"./Suffix-DopnzIdr.js";import{r as be}from"./light-UKc15Qzy.js";function xe(e){return e&-e}var Se=class{constructor(e,t){this.l=e,this.min=t;let n=Array(e+1);for(let t=0;t<e+1;++t)n[t]=0;this.ft=n}add(e,t){if(t===0)return;let{l:n,ft:r}=this;for(e+=1;e<=n;)r[e]+=t,e+=xe(e)}get(e){return this.sum(e+1)-this.sum(e)}sum(e){if(e===void 0&&(e=this.l),e<=0)return 0;let{ft:t,min:n,l:r}=this;if(e>r)throw Error("[FinweckTree.sum]: `i` is larger than length.");let i=e*n;for(;e>0;)i+=t[e],e-=xe(e);return i}getBound(e){let t=0,n=this.l;for(;n>t;){let r=Math.floor((t+n)/2),i=this.sum(r);if(i>e){n=r;continue}else if(i<e){if(t===r)return this.sum(t+1)<=e?t+1:r;t=r}else return r}return t}},Ce;function we(){return typeof document>`u`?!1:(Ce===void 0&&(Ce=`matchMedia`in window?window.matchMedia(`(pointer:coarse)`).matches:!1),Ce)}var Te;function Ee(){return typeof document>`u`?1:(Te===void 0&&(Te=`chrome`in window?window.devicePixelRatio:1),Te)}var De=`VVirtualListXScroll`;function Oe({columnsRef:e,renderColRef:n,renderItemWithColsRef:r}){let i=p(0),o=p(0),s=t(()=>{let t=e.value;if(t.length===0)return null;let n=new Se(t.length,0);return t.forEach((e,t)=>{n.add(t,e.width)}),n});return a(De,{startIndexRef:L(()=>{let e=s.value;return e===null?0:Math.max(e.getBound(o.value)-1,0)}),endIndexRef:L(()=>{let t=s.value;return t===null?0:Math.min(t.getBound(o.value+i.value)+1,e.value.length-1)}),columnsRef:e,renderColRef:n,renderItemWithColsRef:r,getLeft:e=>{let t=s.value;return t===null?0:t.sum(e)}}),{listWidthRef:i,scrollLeftRef:o}}var ke=_({name:`VirtualListRow`,props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){let{startIndexRef:e,endIndexRef:t,columnsRef:r,getLeft:i,renderColRef:a,renderItemWithColsRef:o}=n(De);return{startIndex:e,endIndex:t,columns:r,renderCol:a,renderItemWithCols:o,getLeft:i}},render(){let{startIndex:e,endIndex:t,columns:n,renderCol:r,renderItemWithCols:i,getLeft:a,item:o}=this;if(i!=null)return i({itemIndex:this.index,startColIndex:e,endColIndex:t,allColumns:n,item:o,getLeft:a});if(r!=null){let i=[];for(let s=e;s<=t;++s){let e=n[s];i.push(r({column:e,left:a(s),item:o}))}return i}return null}}),Ae=W(`.v-vl`,{maxHeight:`inherit`,height:`100%`,overflow:`auto`,minWidth:`1px`},[W(`&:not(.v-vl--show-scrollbar)`,{scrollbarWidth:`none`},[W(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,{width:0,height:0,display:`none`})])]),je=_({name:`VirtualList`,inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:`div`},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:`key`},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){let n=w();Ae.mount({id:`vueuc/virtual-list`,head:!0,anchorMetaName:H,ssr:n}),l(()=>{let{defaultScrollIndex:t,defaultScrollKey:n}=e;t==null?n!=null&&S({key:n}):S({index:t})});let i=!1,a=!1;y(()=>{if(i=!1,!a){a=!0;return}S({top:v.value,left:c.value})}),r(()=>{i=!0,a||=!0});let o=L(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let t=0;return e.columns.forEach(e=>{t+=e.width}),t}),s=t(()=>{let t=new Map,{keyField:n}=e;return e.items.forEach((e,r)=>{t.set(e[n],r)}),t}),{scrollLeftRef:c,listWidthRef:u}=Oe({columnsRef:h(e,`columns`),renderColRef:h(e,`renderCol`),renderItemWithColsRef:h(e,`renderItemWithCols`)}),d=p(null),f=p(void 0),m=new Map,g=t(()=>{let{items:t,itemSize:n,keyField:r}=e,i=new Se(t.length,n);return t.forEach((e,t)=>{let n=e[r],a=m.get(n);a!==void 0&&i.add(t,a)}),i}),_=p(0),v=p(0),b=L(()=>Math.max(g.value.getBound(v.value-X(e.paddingTop))-1,0)),x=t(()=>{let{value:t}=f;if(t===void 0)return[];let{items:n,itemSize:r}=e,i=b.value,a=Math.min(i+Math.ceil(t/r+1),n.length-1),o=[];for(let e=i;e<=a;++e)o.push(n[e]);return o}),S=(e,t)=>{if(typeof e==`number`){D(e,t,`auto`);return}let{left:n,top:r,index:i,key:a,position:o,behavior:c,debounce:l=!0}=e;if(n!==void 0||r!==void 0)D(n,r,c);else if(i!==void 0)E(i,c,l);else if(a!==void 0){let e=s.value.get(a);e!==void 0&&E(e,c,l)}else o===`bottom`?D(0,2**53-1,c):o===`top`&&D(0,0,c)},C,T=null;function E(t,n,r){let{value:i}=g,a=i.sum(t)+X(e.paddingTop);if(!r)d.value.scrollTo({left:0,top:a,behavior:n});else{C=t,T!==null&&window.clearTimeout(T),T=window.setTimeout(()=>{C=void 0,T=null},16);let{scrollTop:e,offsetHeight:r}=d.value;if(a>e){let o=i.get(t);a+o<=e+r||d.value.scrollTo({left:0,top:a+o-r,behavior:n})}else d.value.scrollTo({left:0,top:a,behavior:n})}}function D(e,t,n){d.value.scrollTo({left:e,top:t,behavior:n})}function O(t,n){if(i||e.ignoreItemResize||P(n.target))return;let{value:r}=g,a=s.value.get(t),o=r.get(a),c=n.borderBoxSize?.[0]?.blockSize??n.contentRect.height;if(c===o)return;c-e.itemSize===0?m.delete(t):m.set(t,c-e.itemSize);let l=c-o;if(l===0)return;r.add(a,l);let u=d.value;if(u!=null){if(C===void 0){let e=r.sum(a);u.scrollTop>e&&u.scrollBy(0,l)}else (a<C||a===C&&c+r.sum(a)>u.scrollTop+u.offsetHeight)&&u.scrollBy(0,l);N()}_.value++}let ee=!we(),k=!1;function A(t){var n;(n=e.onScroll)==null||n.call(e,t),(!ee||!k)&&N()}function j(t){var n;if((n=e.onWheel)==null||n.call(e,t),ee){let e=d.value;if(e!=null){if(t.deltaX===0&&(e.scrollTop===0&&t.deltaY<=0||e.scrollTop+e.offsetHeight>=e.scrollHeight&&t.deltaY>=0))return;t.preventDefault(),e.scrollTop+=t.deltaY/Ee(),e.scrollLeft+=t.deltaX/Ee(),N(),k=!0,ne(()=>{k=!1})}}}function M(t){if(i||P(t.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(t.contentRect.height===f.value)return}else if(t.contentRect.height===f.value&&t.contentRect.width===u.value)return;f.value=t.contentRect.height,u.value=t.contentRect.width;let{onResize:n}=e;n!==void 0&&n(t)}function N(){let{value:e}=d;e!=null&&(v.value=e.scrollTop,c.value=e.scrollLeft)}function P(e){let t=e;for(;t!==null;){if(t.style.display===`none`)return!0;t=t.parentElement}return!1}return{listHeight:f,listStyle:{overflow:`auto`},keyToIndex:s,itemsStyle:t(()=>{let{itemResizable:t}=e,n=q(g.value.sum());return _.value,[e.itemsStyle,{boxSizing:`content-box`,width:q(o.value),height:t?``:n,minHeight:t?n:``,paddingTop:q(e.paddingTop),paddingBottom:q(e.paddingBottom)}]}),visibleItemsStyle:t(()=>(_.value,{transform:`translateY(${q(g.value.sum(b.value))})`})),viewportItems:x,listElRef:d,itemsElRef:p(null),scrollTo:S,handleListResize:M,handleListScroll:A,handleListWheel:j,handleItemResize:O}},render(){let{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:r}=this;return s(de,{onResize:this.handleListResize},{default:()=>{var i;return s(`div`,o(this.$attrs,{class:[`v-vl`,this.showScrollbar&&`v-vl--show-scrollbar`],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:`listElRef`}),[this.items.length===0?(i=this.$slots).empty?.call(i):s(`div`,{ref:`itemsElRef`,class:`v-vl-items`,style:this.itemsStyle},[s(r,Object.assign({class:`v-vl-visible-items`,style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{let{renderCol:r,renderItemWithCols:i}=this;return this.viewportItems.map(a=>{let o=a[t],c=n.get(o),l=r==null?void 0:s(ke,{index:c,item:a}),u=i==null?void 0:s(ke,{index:c,item:a}),d=this.$slots.default({item:a,renderedCols:l,renderedItemWithCols:u,index:c})[0];return e?s(de,{key:o,onResize:e=>this.handleItemResize(o,e)},{default:()=>d}):(d.key=o,d)})}})])])}})}}),$=`v-hidden`,Me=W(`[v-hidden]`,{display:`none!important`}),Ne=_({name:`Overflow`,props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){let n=p(null),r=p(null);function i(i){let{value:a}=n,{getCounter:o,getTail:s}=e,c;if(c=o===void 0?r.value:o(),!a||!c)return;c.hasAttribute($)&&c.removeAttribute($);let{children:l}=a;if(i.showAllItemsBeforeCalculate)for(let e of l)e.hasAttribute($)&&e.removeAttribute($);let u=a.offsetWidth,d=[],f=t.tail?s?.():null,p=f?f.offsetWidth:0,m=!1,h=a.children.length-+!!t.tail;for(let t=0;t<h-1;++t){if(t<0)continue;let n=l[t];if(m){n.hasAttribute($)||n.setAttribute($,``);continue}else n.hasAttribute($)&&n.removeAttribute($);let r=n.offsetWidth;if(p+=r,d[t]=r,p>u){let{updateCounter:n}=e;for(let r=t;r>=0;--r){let i=h-1-r;n===void 0?c.textContent=`${i}`:n(i);let a=c.offsetWidth;if(p-=d[r],p+a<=u||r===0){m=!0,t=r-1,f&&(t===-1?(f.style.maxWidth=`${u-a}px`,f.style.boxSizing=`border-box`):f.style.maxWidth=``);let{onUpdateCount:n}=e;n&&n(i);break}}}}let{onUpdateOverflow:g}=e;m?g!==void 0&&g(!0):(g!==void 0&&g(!1),c.setAttribute($,``))}let a=w();return Me.mount({id:`vueuc/overflow`,head:!0,anchorMetaName:H,ssr:a}),l(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:i}},render(){let{$slots:e}=this;return c(()=>this.sync({showAllItemsBeforeCalculate:!1})),s(`div`,{class:`v-overflow`,ref:`selfRef`},[i(e,`default`),e.counter?e.counter():s(`span`,{style:{display:`inline-block`},ref:`counterRef`}),e.tail?e.tail():null])}});function Pe(e,t){t&&(l(()=>{let{value:n}=e;n&&Y.registerHandler(n,t)}),d(e,(e,t)=>{t&&Y.unregisterHandler(t)},{deep:!1}),u(()=>{let{value:t}=e;t&&Y.unregisterHandler(t)}))}function Fe(e){switch(typeof e){case`string`:return e||void 0;case`number`:return String(e);default:return}}function Ie(e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?t[0]:t=>{e.forEach(e=>{e&&e(t)})}}var Le=_({name:`Checkmark`,render(){return s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 16 16`},s(`g`,{fill:`none`},s(`path`,{d:`M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z`,fill:`currentColor`})))}}),Re=_({name:`Empty`,render(){return s(`svg`,{viewBox:`0 0 28 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},s(`path`,{d:`M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z`,fill:`currentColor`}),s(`path`,{d:`M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z`,fill:`currentColor`}))}}),ze=_({props:{onFocus:Function,onBlur:Function},setup(e){return()=>s(`div`,{style:`width: 0; height: 0`,tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}}),Be={iconSizeTiny:`28px`,iconSizeSmall:`34px`,iconSizeMedium:`40px`,iconSizeLarge:`46px`,iconSizeHuge:`52px`};function Ve(e){let{textColorDisabled:t,iconColor:n,textColor2:r,fontSizeTiny:i,fontSizeSmall:a,fontSizeMedium:o,fontSizeLarge:s,fontSizeHuge:c}=e;return Object.assign(Object.assign({},Be),{fontSizeTiny:i,fontSizeSmall:a,fontSizeMedium:o,fontSizeLarge:s,fontSizeHuge:c,textColor:t,iconColor:n,extraTextColor:r})}var He={name:`Empty`,common:A,self:Ve},Ue=E(`empty`,`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
align-items: center;
|
|
5
|
-
font-size: var(--n-font-size);
|
|
6
|
-
`,[R(`icon`,`
|
|
7
|
-
width: var(--n-icon-size);
|
|
8
|
-
height: var(--n-icon-size);
|
|
9
|
-
font-size: var(--n-icon-size);
|
|
10
|
-
line-height: var(--n-icon-size);
|
|
11
|
-
color: var(--n-icon-color);
|
|
12
|
-
transition:
|
|
13
|
-
color .3s var(--n-bezier);
|
|
14
|
-
`,[I(`+`,[R(`description`,`
|
|
15
|
-
margin-top: 8px;
|
|
16
|
-
`)])]),R(`description`,`
|
|
17
|
-
transition: color .3s var(--n-bezier);
|
|
18
|
-
color: var(--n-text-color);
|
|
19
|
-
`),R(`extra`,`
|
|
20
|
-
text-align: center;
|
|
21
|
-
transition: color .3s var(--n-bezier);
|
|
22
|
-
margin-top: 12px;
|
|
23
|
-
color: var(--n-extra-text-color);
|
|
24
|
-
`)]),We=_({name:`Empty`,props:Object.assign(Object.assign({},T.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:`medium`},renderIcon:Function}),slots:Object,setup(e){let{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedComponentPropsRef:i}=b(e),a=T(`Empty`,`-empty`,Ue,He,e,n),{localeRef:o}=le(`Empty`),c=t(()=>e.description??i?.value?.Empty?.description),l=t(()=>i?.value?.Empty?.renderIcon||(()=>s(Re,null))),u=t(()=>{let{size:t}=e,{common:{cubicBezierEaseInOut:n},self:{[M(`iconSize`,t)]:r,[M(`fontSize`,t)]:i,textColor:o,iconColor:s,extraTextColor:c}}=a.value;return{"--n-icon-size":r,"--n-font-size":i,"--n-bezier":n,"--n-text-color":o,"--n-icon-color":s,"--n-extra-text-color":c}}),d=r?te(`empty`,t(()=>{let t=``,{size:n}=e;return t+=n[0],t}),u,e):void 0;return{mergedClsPrefix:n,mergedRenderIcon:l,localizedDescription:t(()=>c.value||o.value.description),cssVars:r?void 0:u,themeClass:d?.themeClass,onRender:d?.onRender}},render(){let{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n?.(),s(`div`,{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?s(`div`,{class:`${t}-empty__icon`},e.icon?e.icon():s(pe,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?s(`div`,{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?s(`div`,{class:`${t}-empty__extra`},e.extra()):null)}}),Ge={height:`calc(var(--n-option-height) * 7.6)`,paddingTiny:`4px 0`,paddingSmall:`4px 0`,paddingMedium:`4px 0`,paddingLarge:`4px 0`,paddingHuge:`4px 0`,optionPaddingTiny:`0 12px`,optionPaddingSmall:`0 12px`,optionPaddingMedium:`0 12px`,optionPaddingLarge:`0 12px`,optionPaddingHuge:`0 12px`,loadingSize:`18px`};function Ke(e){let{borderRadius:t,popoverColor:n,textColor3:r,dividerColor:i,textColor2:a,primaryColorPressed:o,textColorDisabled:s,primaryColor:c,opacityDisabled:l,hoverColor:u,fontSizeTiny:d,fontSizeSmall:f,fontSizeMedium:p,fontSizeLarge:m,fontSizeHuge:h,heightTiny:g,heightSmall:_,heightMedium:v,heightLarge:y,heightHuge:b}=e;return Object.assign(Object.assign({},Ge),{optionFontSizeTiny:d,optionFontSizeSmall:f,optionFontSizeMedium:p,optionFontSizeLarge:m,optionFontSizeHuge:h,optionHeightTiny:g,optionHeightSmall:_,optionHeightMedium:v,optionHeightLarge:y,optionHeightHuge:b,borderRadius:t,color:n,groupHeaderTextColor:r,actionDividerColor:i,optionTextColor:a,optionTextColorPressed:o,optionTextColorDisabled:s,optionTextColorActive:c,optionOpacityDisabled:l,optionCheckColor:c,optionColorPending:u,optionColorActive:`rgba(0, 0, 0, 0)`,optionColorActivePending:u,actionTextColor:a,loadingColor:c})}var qe=F({name:`InternalSelectMenu`,common:A,peers:{Scrollbar:fe,Empty:He},self:Ke}),Je=_({name:`NBaseSelectGroupHeader`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){let{renderLabelRef:e,renderOptionRef:t,labelFieldRef:r,nodePropsRef:i}=n(z);return{labelField:r,nodeProps:i,renderLabel:e,renderOption:t}},render(){let{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:r,tmNode:{rawNode:i}}=this,a=r?.(i),o=t?t(i,!1):Q(i[this.labelField],i,!1),c=s(`div`,Object.assign({},a,{class:[`${e}-base-select-group-header`,a?.class]}),o);return i.render?i.render({node:c,option:i}):n?n({node:c,option:i,selected:!1}):c}});function Ye(e,t){return s(m,{name:`fade-in-scale-up-transition`},{default:()=>e?s(pe,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>s(Le)}):null})}var Xe=_({name:`NBaseSelectOption`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){let{valueRef:t,pendingTmNodeRef:r,multipleRef:i,valueSetRef:a,renderLabelRef:o,renderOptionRef:s,labelFieldRef:c,valueFieldRef:l,showCheckmarkRef:u,nodePropsRef:d,handleOptionClick:f,handleOptionMouseEnter:p}=n(z),m=L(()=>{let{value:t}=r;return t?e.tmNode.key===t.key:!1});function h(t){let{tmNode:n}=e;n.disabled||f(t,n)}function g(t){let{tmNode:n}=e;n.disabled||p(t,n)}function _(t){let{tmNode:n}=e,{value:r}=m;n.disabled||r||p(t,n)}return{multiple:i,isGrouped:L(()=>{let{tmNode:t}=e,{parent:n}=t;return n&&n.rawNode.type===`group`}),showCheckmark:u,nodeProps:d,isPending:m,isSelected:L(()=>{let{value:n}=t,{value:r}=i;if(n===null)return!1;let o=e.tmNode.rawNode[l.value];if(r){let{value:e}=a;return e.has(o)}else return n===o}),labelField:c,renderLabel:o,renderOption:s,handleMouseMove:_,handleMouseEnter:g,handleClick:h}},render(){let{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:r,isGrouped:i,showCheckmark:a,nodeProps:o,renderOption:c,renderLabel:l,handleClick:u,handleMouseEnter:d,handleMouseMove:f}=this,p=Ye(n,e),m=l?[l(t,n),a&&p]:[Q(t[this.labelField],t,n),a&&p],h=o?.(t),g=s(`div`,Object.assign({},h,{class:[`${e}-base-select-option`,t.class,h?.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:i,[`${e}-base-select-option--pending`]:r,[`${e}-base-select-option--show-checkmark`]:a}],style:[h?.style||``,t.style||``],onClick:Ie([u,h?.onClick]),onMouseenter:Ie([d,h?.onMouseenter]),onMousemove:Ie([f,h?.onMousemove])}),s(`div`,{class:`${e}-base-select-option__content`},m));return t.render?t.render({node:g,option:t,selected:n}):c?c({node:g,option:t,selected:n}):g}}),Ze=E(`base-select-menu`,`
|
|
25
|
-
line-height: 1.5;
|
|
26
|
-
outline: none;
|
|
27
|
-
z-index: 0;
|
|
28
|
-
position: relative;
|
|
29
|
-
border-radius: var(--n-border-radius);
|
|
30
|
-
transition:
|
|
31
|
-
background-color .3s var(--n-bezier),
|
|
32
|
-
box-shadow .3s var(--n-bezier);
|
|
33
|
-
background-color: var(--n-color);
|
|
34
|
-
`,[E(`scrollbar`,`
|
|
35
|
-
max-height: var(--n-height);
|
|
36
|
-
`),E(`virtual-list`,`
|
|
37
|
-
max-height: var(--n-height);
|
|
38
|
-
`),E(`base-select-option`,`
|
|
39
|
-
min-height: var(--n-option-height);
|
|
40
|
-
font-size: var(--n-option-font-size);
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
`,[R(`content`,`
|
|
44
|
-
z-index: 1;
|
|
45
|
-
white-space: nowrap;
|
|
46
|
-
text-overflow: ellipsis;
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
`)]),E(`base-select-group-header`,`
|
|
49
|
-
min-height: var(--n-option-height);
|
|
50
|
-
font-size: .93em;
|
|
51
|
-
display: flex;
|
|
52
|
-
align-items: center;
|
|
53
|
-
`),E(`base-select-menu-option-wrapper`,`
|
|
54
|
-
position: relative;
|
|
55
|
-
width: 100%;
|
|
56
|
-
`),R(`loading, empty`,`
|
|
57
|
-
display: flex;
|
|
58
|
-
padding: 12px 32px;
|
|
59
|
-
flex: 1;
|
|
60
|
-
justify-content: center;
|
|
61
|
-
`),R(`loading`,`
|
|
62
|
-
color: var(--n-loading-color);
|
|
63
|
-
font-size: var(--n-loading-size);
|
|
64
|
-
`),R(`header`,`
|
|
65
|
-
padding: 8px var(--n-option-padding-left);
|
|
66
|
-
font-size: var(--n-option-font-size);
|
|
67
|
-
transition:
|
|
68
|
-
color .3s var(--n-bezier),
|
|
69
|
-
border-color .3s var(--n-bezier);
|
|
70
|
-
border-bottom: 1px solid var(--n-action-divider-color);
|
|
71
|
-
color: var(--n-action-text-color);
|
|
72
|
-
`),R(`action`,`
|
|
73
|
-
padding: 8px var(--n-option-padding-left);
|
|
74
|
-
font-size: var(--n-option-font-size);
|
|
75
|
-
transition:
|
|
76
|
-
color .3s var(--n-bezier),
|
|
77
|
-
border-color .3s var(--n-bezier);
|
|
78
|
-
border-top: 1px solid var(--n-action-divider-color);
|
|
79
|
-
color: var(--n-action-text-color);
|
|
80
|
-
`),E(`base-select-group-header`,`
|
|
81
|
-
position: relative;
|
|
82
|
-
cursor: default;
|
|
83
|
-
padding: var(--n-option-padding);
|
|
84
|
-
color: var(--n-group-header-text-color);
|
|
85
|
-
`),E(`base-select-option`,`
|
|
86
|
-
cursor: pointer;
|
|
87
|
-
position: relative;
|
|
88
|
-
padding: var(--n-option-padding);
|
|
89
|
-
transition:
|
|
90
|
-
color .3s var(--n-bezier),
|
|
91
|
-
opacity .3s var(--n-bezier);
|
|
92
|
-
box-sizing: border-box;
|
|
93
|
-
color: var(--n-option-text-color);
|
|
94
|
-
opacity: 1;
|
|
95
|
-
`,[O(`show-checkmark`,`
|
|
96
|
-
padding-right: calc(var(--n-option-padding-right) + 20px);
|
|
97
|
-
`),I(`&::before`,`
|
|
98
|
-
content: "";
|
|
99
|
-
position: absolute;
|
|
100
|
-
left: 4px;
|
|
101
|
-
right: 4px;
|
|
102
|
-
top: 0;
|
|
103
|
-
bottom: 0;
|
|
104
|
-
border-radius: var(--n-border-radius);
|
|
105
|
-
transition: background-color .3s var(--n-bezier);
|
|
106
|
-
`),I(`&:active`,`
|
|
107
|
-
color: var(--n-option-text-color-pressed);
|
|
108
|
-
`),O(`grouped`,`
|
|
109
|
-
padding-left: calc(var(--n-option-padding-left) * 1.5);
|
|
110
|
-
`),O(`pending`,[I(`&::before`,`
|
|
111
|
-
background-color: var(--n-option-color-pending);
|
|
112
|
-
`)]),O(`selected`,`
|
|
113
|
-
color: var(--n-option-text-color-active);
|
|
114
|
-
`,[I(`&::before`,`
|
|
115
|
-
background-color: var(--n-option-color-active);
|
|
116
|
-
`),O(`pending`,[I(`&::before`,`
|
|
117
|
-
background-color: var(--n-option-color-active-pending);
|
|
118
|
-
`)])]),O(`disabled`,`
|
|
119
|
-
cursor: not-allowed;
|
|
120
|
-
`,[k(`selected`,`
|
|
121
|
-
color: var(--n-option-text-color-disabled);
|
|
122
|
-
`),O(`selected`,`
|
|
123
|
-
opacity: var(--n-option-opacity-disabled);
|
|
124
|
-
`)]),R(`check`,`
|
|
125
|
-
font-size: 16px;
|
|
126
|
-
position: absolute;
|
|
127
|
-
right: calc(var(--n-option-padding-right) - 4px);
|
|
128
|
-
top: calc(50% - 7px);
|
|
129
|
-
color: var(--n-option-check-color);
|
|
130
|
-
transition: color .3s var(--n-bezier);
|
|
131
|
-
`,[ve({enterScale:`0.5`})])])]),Qe=_({name:`InternalSelectMenu`,props:Object.assign(Object.assign({},T.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:`medium`},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:`label`},valueField:{type:String,default:`value`},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,scrollbarProps:Object,onToggle:Function}),setup(e){let{mergedClsPrefixRef:n,mergedRtlRef:r,mergedComponentPropsRef:i}=b(e),o=D(`InternalSelectMenu`,r,n),s=T(`InternalSelectMenu`,`-internal-select-menu`,Ze,qe,e,h(e,`clsPrefix`)),f=p(null),m=p(null),g=p(null),_=t(()=>e.treeMate.getFlattenedNodes()),v=t(()=>oe(_.value)),y=p(null);function x(){let{treeMate:t}=e,n=null,{value:r}=e;r===null?n=t.getFirstAvailableNode():(n=e.multiple?t.getNode((r||[])[(r||[]).length-1]):t.getNode(r),(!n||n.disabled)&&(n=t.getFirstAvailableNode())),H(n||null)}function S(){let{value:t}=y;t&&!e.treeMate.getNode(t.key)&&(y.value=null)}let C;d(()=>e.show,t=>{t?C=d(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?x():S(),c(U)):S()},{immediate:!0}):C?.()},{immediate:!0}),u(()=>{C?.()});let w=t(()=>X(s.value.self[M(`optionHeight`,e.size)])),E=t(()=>Z(s.value.self[M(`padding`,e.size)])),O=t(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),ee=t(()=>{let e=_.value;return e&&e.length===0}),k=t(()=>i?.value?.Select?.renderEmpty);function A(t){let{onToggle:n}=e;n&&n(t)}function j(t){let{onScroll:n}=e;n&&n(t)}function N(e){var t;(t=g.value)==null||t.sync(),j(e)}function P(){var e;(e=g.value)==null||e.sync()}function F(){let{value:e}=y;return e||null}function I(e,t){t.disabled||H(t,!1)}function L(e,t){t.disabled||A(t)}function R(t){var n;se(t,`action`)||(n=e.onKeyup)==null||n.call(e,t)}function ne(t){var n;se(t,`action`)||(n=e.onKeydown)==null||n.call(e,t)}function V(t){var n;(n=e.onMousedown)==null||n.call(e,t),!e.focusable&&t.preventDefault()}function re(){let{value:e}=y;e&&H(e.getNext({loop:!0}),!0)}function ie(){let{value:e}=y;e&&H(e.getPrev({loop:!0}),!0)}function H(e,t=!1){y.value=e,t&&U()}function U(){var t,n;let r=y.value;if(!r)return;let i=v.value(r.key);i!==null&&(e.virtualScroll?(t=m.value)==null||t.scrollTo({index:i}):(n=g.value)==null||n.scrollTo({index:i,elSize:w.value}))}function W(t){var n;f.value?.contains(t.target)&&((n=e.onFocus)==null||n.call(e,t))}function G(t){var n;f.value?.contains(t.relatedTarget)||(n=e.onBlur)==null||n.call(e,t)}a(z,{handleOptionMouseEnter:I,handleOptionClick:L,valueSetRef:O,pendingTmNodeRef:y,nodePropsRef:h(e,`nodeProps`),showCheckmarkRef:h(e,`showCheckmark`),multipleRef:h(e,`multiple`),valueRef:h(e,`value`),renderLabelRef:h(e,`renderLabel`),renderOptionRef:h(e,`renderOption`),labelFieldRef:h(e,`labelField`),valueFieldRef:h(e,`valueField`)}),a(B,f),l(()=>{let{value:e}=g;e&&e.sync()});let K=t(()=>{let{size:t}=e,{common:{cubicBezierEaseInOut:n},self:{height:r,borderRadius:i,color:a,groupHeaderTextColor:o,actionDividerColor:c,optionTextColorPressed:l,optionTextColor:u,optionTextColorDisabled:d,optionTextColorActive:f,optionOpacityDisabled:p,optionCheckColor:m,actionTextColor:h,optionColorPending:g,optionColorActive:_,loadingColor:v,loadingSize:y,optionColorActivePending:b,[M(`optionFontSize`,t)]:x,[M(`optionHeight`,t)]:S,[M(`optionPadding`,t)]:C}}=s.value;return{"--n-height":r,"--n-action-divider-color":c,"--n-action-text-color":h,"--n-bezier":n,"--n-border-radius":i,"--n-color":a,"--n-option-font-size":x,"--n-group-header-text-color":o,"--n-option-check-color":m,"--n-option-color-pending":g,"--n-option-color-active":_,"--n-option-color-active-pending":b,"--n-option-height":S,"--n-option-opacity-disabled":p,"--n-option-text-color":u,"--n-option-text-color-active":f,"--n-option-text-color-disabled":d,"--n-option-text-color-pressed":l,"--n-option-padding":C,"--n-option-padding-left":Z(C,`left`),"--n-option-padding-right":Z(C,`right`),"--n-loading-color":v,"--n-loading-size":y}}),{inlineThemeDisabled:ae}=e,ce=ae?te(`internal-select-menu`,t(()=>e.size[0]),K,e):void 0,q={selfRef:f,next:re,prev:ie,getPendingTmNode:F};return Pe(f,e.onResize),Object.assign({mergedTheme:s,mergedClsPrefix:n,rtlEnabled:o,virtualListRef:m,scrollbarRef:g,itemSize:w,padding:E,flattenedNodes:_,empty:ee,mergedRenderEmpty:k,virtualListContainer(){let{value:e}=m;return e?.listElRef},virtualListContent(){let{value:e}=m;return e?.itemsElRef},doScroll:j,handleFocusin:W,handleFocusout:G,handleKeyUp:R,handleKeyDown:ne,handleMouseDown:V,handleVirtualListResize:P,handleVirtualListScroll:N,cssVars:ae?void 0:K,themeClass:ce?.themeClass,onRender:ce?.onRender},q)},render(){let{$slots:e,virtualScroll:t,clsPrefix:n,mergedTheme:r,themeClass:i,onRender:a}=this;return a?.(),s(`div`,{ref:`selfRef`,tabindex:this.focusable?0:-1,class:[`${n}-base-select-menu`,`${n}-base-select-menu--${this.size}-size`,this.rtlEnabled&&`${n}-base-select-menu--rtl`,i,this.multiple&&`${n}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},x(e.header,e=>e&&s(`div`,{class:`${n}-base-select-menu__header`,"data-header":!0,key:`header`},e)),this.loading?s(`div`,{class:`${n}-base-select-menu__loading`},s(P,{clsPrefix:n,strokeWidth:20})):this.empty?s(`div`,{class:`${n}-base-select-menu__empty`,"data-empty":!0},C(e.empty,()=>[this.mergedRenderEmpty?.call(this)||s(We,{theme:r.peers.Empty,themeOverrides:r.peerOverrides.Empty,size:this.size})])):s(me,Object.assign({ref:`scrollbarRef`,theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar,scrollable:this.scrollable,container:t?this.virtualListContainer:void 0,content:t?this.virtualListContent:void 0,onScroll:t?void 0:this.doScroll},this.scrollbarProps),{default:()=>t?s(je,{ref:`virtualListRef`,class:`${n}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:e})=>e.isGroup?s(Je,{key:e.key,clsPrefix:n,tmNode:e}):e.ignored?null:s(Xe,{clsPrefix:n,key:e.key,tmNode:e})}):s(`div`,{class:`${n}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(e=>e.isGroup?s(Je,{key:e.key,clsPrefix:n,tmNode:e}):s(Xe,{clsPrefix:n,key:e.key,tmNode:e})))}),x(e.action,e=>e&&[s(`div`,{class:`${n}-base-select-menu__action`,"data-action":!0,key:`action`},e),s(ze,{onFocus:this.onTabOut,key:`focus-detector`})]))}}),$e={paddingSingle:`0 26px 0 12px`,paddingMultiple:`3px 26px 0 12px`,clearSize:`16px`,arrowSize:`16px`};function et(e){let{borderRadius:t,textColor2:n,textColorDisabled:r,inputColor:i,inputColorDisabled:a,primaryColor:o,primaryColorHover:s,warningColor:c,warningColorHover:l,errorColor:u,errorColorHover:d,borderColor:f,iconColor:p,iconColorDisabled:m,clearColor:h,clearColorHover:g,clearColorPressed:_,placeholderColor:v,placeholderColorDisabled:y,fontSizeTiny:b,fontSizeSmall:x,fontSizeMedium:S,fontSizeLarge:C,heightTiny:w,heightSmall:T,heightMedium:E,heightLarge:D,fontWeight:O}=e;return Object.assign(Object.assign({},$e),{fontSizeTiny:b,fontSizeSmall:x,fontSizeMedium:S,fontSizeLarge:C,heightTiny:w,heightSmall:T,heightMedium:E,heightLarge:D,borderRadius:t,fontWeight:O,textColor:n,textColorDisabled:r,placeholderColor:v,placeholderColorDisabled:y,color:i,colorDisabled:a,colorActive:i,border:`1px solid ${f}`,borderHover:`1px solid ${s}`,borderActive:`1px solid ${o}`,borderFocus:`1px solid ${s}`,boxShadowHover:`none`,boxShadowActive:`0 0 0 2px ${j(o,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${j(o,{alpha:.2})}`,caretColor:o,arrowColor:p,arrowColorDisabled:m,loadingColor:o,borderWarning:`1px solid ${c}`,borderHoverWarning:`1px solid ${l}`,borderActiveWarning:`1px solid ${c}`,borderFocusWarning:`1px solid ${l}`,boxShadowHoverWarning:`none`,boxShadowActiveWarning:`0 0 0 2px ${j(c,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${j(c,{alpha:.2})}`,colorActiveWarning:i,caretColorWarning:c,borderError:`1px solid ${u}`,borderHoverError:`1px solid ${d}`,borderActiveError:`1px solid ${u}`,borderFocusError:`1px solid ${d}`,boxShadowHoverError:`none`,boxShadowActiveError:`0 0 0 2px ${j(u,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${j(u,{alpha:.2})}`,colorActiveError:i,caretColorError:u,clearColor:h,clearColorHover:g,clearColorPressed:_})}var tt=F({name:`InternalSelection`,common:A,peers:{Popover:U},self:et}),nt=I([E(`base-selection`,`
|
|
132
|
-
--n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left);
|
|
133
|
-
--n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left);
|
|
134
|
-
position: relative;
|
|
135
|
-
z-index: auto;
|
|
136
|
-
box-shadow: none;
|
|
137
|
-
width: 100%;
|
|
138
|
-
max-width: 100%;
|
|
139
|
-
display: inline-block;
|
|
140
|
-
vertical-align: bottom;
|
|
141
|
-
border-radius: var(--n-border-radius);
|
|
142
|
-
min-height: var(--n-height);
|
|
143
|
-
line-height: 1.5;
|
|
144
|
-
font-size: var(--n-font-size);
|
|
145
|
-
`,[E(`base-loading`,`
|
|
146
|
-
color: var(--n-loading-color);
|
|
147
|
-
`),E(`base-selection-tags`,`min-height: var(--n-height);`),R(`border, state-border`,`
|
|
148
|
-
position: absolute;
|
|
149
|
-
left: 0;
|
|
150
|
-
right: 0;
|
|
151
|
-
top: 0;
|
|
152
|
-
bottom: 0;
|
|
153
|
-
pointer-events: none;
|
|
154
|
-
border: var(--n-border);
|
|
155
|
-
border-radius: inherit;
|
|
156
|
-
transition:
|
|
157
|
-
box-shadow .3s var(--n-bezier),
|
|
158
|
-
border-color .3s var(--n-bezier);
|
|
159
|
-
`),R(`state-border`,`
|
|
160
|
-
z-index: 1;
|
|
161
|
-
border-color: #0000;
|
|
162
|
-
`),E(`base-suffix`,`
|
|
163
|
-
cursor: pointer;
|
|
164
|
-
position: absolute;
|
|
165
|
-
top: 50%;
|
|
166
|
-
transform: translateY(-50%);
|
|
167
|
-
right: 10px;
|
|
168
|
-
`,[R(`arrow`,`
|
|
169
|
-
font-size: var(--n-arrow-size);
|
|
170
|
-
color: var(--n-arrow-color);
|
|
171
|
-
transition: color .3s var(--n-bezier);
|
|
172
|
-
`)]),E(`base-selection-overlay`,`
|
|
173
|
-
display: flex;
|
|
174
|
-
align-items: center;
|
|
175
|
-
white-space: nowrap;
|
|
176
|
-
pointer-events: none;
|
|
177
|
-
position: absolute;
|
|
178
|
-
top: 0;
|
|
179
|
-
right: 0;
|
|
180
|
-
bottom: 0;
|
|
181
|
-
left: 0;
|
|
182
|
-
padding: var(--n-padding-single);
|
|
183
|
-
transition: color .3s var(--n-bezier);
|
|
184
|
-
`,[R(`wrapper`,`
|
|
185
|
-
flex-basis: 0;
|
|
186
|
-
flex-grow: 1;
|
|
187
|
-
overflow: hidden;
|
|
188
|
-
text-overflow: ellipsis;
|
|
189
|
-
`)]),E(`base-selection-placeholder`,`
|
|
190
|
-
color: var(--n-placeholder-color);
|
|
191
|
-
`,[R(`inner`,`
|
|
192
|
-
max-width: 100%;
|
|
193
|
-
overflow: hidden;
|
|
194
|
-
`)]),E(`base-selection-tags`,`
|
|
195
|
-
cursor: pointer;
|
|
196
|
-
outline: none;
|
|
197
|
-
box-sizing: border-box;
|
|
198
|
-
position: relative;
|
|
199
|
-
z-index: auto;
|
|
200
|
-
display: flex;
|
|
201
|
-
padding: var(--n-padding-multiple);
|
|
202
|
-
flex-wrap: wrap;
|
|
203
|
-
align-items: center;
|
|
204
|
-
width: 100%;
|
|
205
|
-
vertical-align: bottom;
|
|
206
|
-
background-color: var(--n-color);
|
|
207
|
-
border-radius: inherit;
|
|
208
|
-
transition:
|
|
209
|
-
color .3s var(--n-bezier),
|
|
210
|
-
box-shadow .3s var(--n-bezier),
|
|
211
|
-
background-color .3s var(--n-bezier);
|
|
212
|
-
`),E(`base-selection-label`,`
|
|
213
|
-
height: var(--n-height);
|
|
214
|
-
display: inline-flex;
|
|
215
|
-
width: 100%;
|
|
216
|
-
vertical-align: bottom;
|
|
217
|
-
cursor: pointer;
|
|
218
|
-
outline: none;
|
|
219
|
-
z-index: auto;
|
|
220
|
-
box-sizing: border-box;
|
|
221
|
-
position: relative;
|
|
222
|
-
transition:
|
|
223
|
-
color .3s var(--n-bezier),
|
|
224
|
-
box-shadow .3s var(--n-bezier),
|
|
225
|
-
background-color .3s var(--n-bezier);
|
|
226
|
-
border-radius: inherit;
|
|
227
|
-
background-color: var(--n-color);
|
|
228
|
-
align-items: center;
|
|
229
|
-
`,[E(`base-selection-input`,`
|
|
230
|
-
font-size: inherit;
|
|
231
|
-
line-height: inherit;
|
|
232
|
-
outline: none;
|
|
233
|
-
cursor: pointer;
|
|
234
|
-
box-sizing: border-box;
|
|
235
|
-
border:none;
|
|
236
|
-
width: 100%;
|
|
237
|
-
padding: var(--n-padding-single);
|
|
238
|
-
background-color: #0000;
|
|
239
|
-
color: var(--n-text-color);
|
|
240
|
-
transition: color .3s var(--n-bezier);
|
|
241
|
-
caret-color: var(--n-caret-color);
|
|
242
|
-
`,[R(`content`,`
|
|
243
|
-
text-overflow: ellipsis;
|
|
244
|
-
overflow: hidden;
|
|
245
|
-
white-space: nowrap;
|
|
246
|
-
`)]),R(`render-label`,`
|
|
247
|
-
color: var(--n-text-color);
|
|
248
|
-
`)]),k(`disabled`,[I(`&:hover`,[R(`state-border`,`
|
|
249
|
-
box-shadow: var(--n-box-shadow-hover);
|
|
250
|
-
border: var(--n-border-hover);
|
|
251
|
-
`)]),O(`focus`,[R(`state-border`,`
|
|
252
|
-
box-shadow: var(--n-box-shadow-focus);
|
|
253
|
-
border: var(--n-border-focus);
|
|
254
|
-
`)]),O(`active`,[R(`state-border`,`
|
|
255
|
-
box-shadow: var(--n-box-shadow-active);
|
|
256
|
-
border: var(--n-border-active);
|
|
257
|
-
`),E(`base-selection-label`,`background-color: var(--n-color-active);`),E(`base-selection-tags`,`background-color: var(--n-color-active);`)])]),O(`disabled`,`cursor: not-allowed;`,[R(`arrow`,`
|
|
258
|
-
color: var(--n-arrow-color-disabled);
|
|
259
|
-
`),E(`base-selection-label`,`
|
|
260
|
-
cursor: not-allowed;
|
|
261
|
-
background-color: var(--n-color-disabled);
|
|
262
|
-
`,[E(`base-selection-input`,`
|
|
263
|
-
cursor: not-allowed;
|
|
264
|
-
color: var(--n-text-color-disabled);
|
|
265
|
-
`),R(`render-label`,`
|
|
266
|
-
color: var(--n-text-color-disabled);
|
|
267
|
-
`)]),E(`base-selection-tags`,`
|
|
268
|
-
cursor: not-allowed;
|
|
269
|
-
background-color: var(--n-color-disabled);
|
|
270
|
-
`),E(`base-selection-placeholder`,`
|
|
271
|
-
cursor: not-allowed;
|
|
272
|
-
color: var(--n-placeholder-color-disabled);
|
|
273
|
-
`)]),E(`base-selection-input-tag`,`
|
|
274
|
-
height: calc(var(--n-height) - 6px);
|
|
275
|
-
line-height: calc(var(--n-height) - 6px);
|
|
276
|
-
outline: none;
|
|
277
|
-
display: none;
|
|
278
|
-
position: relative;
|
|
279
|
-
margin-bottom: 3px;
|
|
280
|
-
max-width: 100%;
|
|
281
|
-
vertical-align: bottom;
|
|
282
|
-
`,[R(`input`,`
|
|
283
|
-
font-size: inherit;
|
|
284
|
-
font-family: inherit;
|
|
285
|
-
min-width: 1px;
|
|
286
|
-
padding: 0;
|
|
287
|
-
background-color: #0000;
|
|
288
|
-
outline: none;
|
|
289
|
-
border: none;
|
|
290
|
-
max-width: 100%;
|
|
291
|
-
overflow: hidden;
|
|
292
|
-
width: 1em;
|
|
293
|
-
line-height: inherit;
|
|
294
|
-
cursor: pointer;
|
|
295
|
-
color: var(--n-text-color);
|
|
296
|
-
caret-color: var(--n-caret-color);
|
|
297
|
-
`),R(`mirror`,`
|
|
298
|
-
position: absolute;
|
|
299
|
-
left: 0;
|
|
300
|
-
top: 0;
|
|
301
|
-
white-space: pre;
|
|
302
|
-
visibility: hidden;
|
|
303
|
-
user-select: none;
|
|
304
|
-
-webkit-user-select: none;
|
|
305
|
-
opacity: 0;
|
|
306
|
-
`)]),[`warning`,`error`].map(e=>O(`${e}-status`,[R(`state-border`,`border: var(--n-border-${e});`),k(`disabled`,[I(`&:hover`,[R(`state-border`,`
|
|
307
|
-
box-shadow: var(--n-box-shadow-hover-${e});
|
|
308
|
-
border: var(--n-border-hover-${e});
|
|
309
|
-
`)]),O(`active`,[R(`state-border`,`
|
|
310
|
-
box-shadow: var(--n-box-shadow-active-${e});
|
|
311
|
-
border: var(--n-border-active-${e});
|
|
312
|
-
`),E(`base-selection-label`,`background-color: var(--n-color-active-${e});`),E(`base-selection-tags`,`background-color: var(--n-color-active-${e});`)]),O(`focus`,[R(`state-border`,`
|
|
313
|
-
box-shadow: var(--n-box-shadow-focus-${e});
|
|
314
|
-
border: var(--n-border-focus-${e});
|
|
315
|
-
`)])])]))]),E(`base-selection-popover`,`
|
|
316
|
-
margin-bottom: -3px;
|
|
317
|
-
display: flex;
|
|
318
|
-
flex-wrap: wrap;
|
|
319
|
-
margin-right: -8px;
|
|
320
|
-
`),E(`base-selection-tag-wrapper`,`
|
|
321
|
-
max-width: 100%;
|
|
322
|
-
display: inline-flex;
|
|
323
|
-
padding: 0 7px 3px 0;
|
|
324
|
-
`,[I(`&:last-child`,`padding-right: 0;`),E(`tag`,`
|
|
325
|
-
font-size: 14px;
|
|
326
|
-
max-width: 100%;
|
|
327
|
-
`,[R(`content`,`
|
|
328
|
-
line-height: 1.25;
|
|
329
|
-
text-overflow: ellipsis;
|
|
330
|
-
overflow: hidden;
|
|
331
|
-
`)])])]),rt=_({name:`InternalSelection`,props:Object.assign(Object.assign({},T.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:``},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:`label`},valueField:{type:String,default:`value`},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:`medium`},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){let{mergedClsPrefixRef:n,mergedRtlRef:r}=b(e),i=D(`InternalSelection`,r,n),a=p(null),o=p(null),s=p(null),u=p(null),m=p(null),g=p(null),_=p(null),v=p(null),y=p(null),x=p(null),S=p(!1),C=p(!1),w=p(!1),E=T(`InternalSelection`,`-internal-selection`,nt,tt,e,h(e,`clsPrefix`)),O=t(()=>e.clearable&&!e.disabled&&(w.value||e.active)),ee=t(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):Q(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),k=t(()=>{let t=e.selectedOption;if(t)return t[e.labelField]}),A=t(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function j(){var t;let{value:n}=a;if(n){let{value:r}=o;r&&(r.style.width=`${n.offsetWidth}px`,e.maxTagCount!==`responsive`&&((t=y.value)==null||t.sync({showAllItemsBeforeCalculate:!1})))}}function N(){let{value:e}=x;e&&(e.style.display=`none`)}function P(){let{value:e}=x;e&&(e.style.display=`inline-block`)}d(h(e,`active`),e=>{e||N()}),d(h(e,`pattern`),()=>{e.multiple&&c(j)});function F(t){let{onFocus:n}=e;n&&n(t)}function I(t){let{onBlur:n}=e;n&&n(t)}function L(t){let{onDeleteOption:n}=e;n&&n(t)}function R(t){let{onClear:n}=e;n&&n(t)}function z(t){let{onPatternInput:n}=e;n&&n(t)}function B(e){(!e.relatedTarget||!s.value?.contains(e.relatedTarget))&&F(e)}function ne(e){s.value?.contains(e.relatedTarget)||I(e)}function V(e){R(e)}function re(){w.value=!0}function ie(){w.value=!1}function H(t){!e.active||!e.filterable||t.target!==o.value&&t.preventDefault()}function U(e){L(e)}let W=p(!1);function G(t){if(t.key===`Backspace`&&!W.value&&!e.pattern.length){let{selectedOptions:t}=e;t?.length&&U(t[t.length-1])}}let K=null;function ae(t){let{value:n}=a;n&&(n.textContent=t.target.value,j()),e.ignoreComposition&&W.value?K=t:z(t)}function oe(){W.value=!0}function se(){W.value=!1,e.ignoreComposition&&z(K),K=null}function ce(t){var n;C.value=!0,(n=e.onPatternFocus)==null||n.call(e,t)}function q(t){var n;C.value=!1,(n=e.onPatternBlur)==null||n.call(e,t)}function le(){var t,n;if(e.filterable)C.value=!1,(t=g.value)==null||t.blur(),(n=o.value)==null||n.blur();else if(e.multiple){let{value:e}=u;e?.blur()}else{let{value:e}=m;e?.blur()}}function J(){var t,n,r;e.filterable?(C.value=!1,(t=g.value)==null||t.focus()):e.multiple?(n=u.value)==null||n.focus():(r=m.value)==null||r.focus()}function ue(){let{value:e}=o;e&&(P(),e.focus())}function Y(){let{value:e}=o;e&&e.blur()}function de(e){let{value:t}=_;t&&t.setTextContent(`+${e}`)}function fe(){let{value:e}=v;return e}function pe(){return o.value}let me=null;function X(){me!==null&&window.clearTimeout(me)}function he(){e.active||(X(),me=window.setTimeout(()=>{A.value&&(S.value=!0)},100))}function ge(){X()}function _e(e){e||(X(),S.value=!1)}d(A,e=>{e||(S.value=!1)}),l(()=>{f(()=>{let t=g.value;t&&(e.disabled?t.removeAttribute(`tabindex`):t.tabIndex=C.value?-1:0)})}),Pe(s,e.onResize);let{inlineThemeDisabled:ve}=e,ye=t(()=>{let{size:t}=e,{common:{cubicBezierEaseInOut:n},self:{fontWeight:r,borderRadius:i,color:a,placeholderColor:o,textColor:s,paddingSingle:c,paddingMultiple:l,caretColor:u,colorDisabled:d,textColorDisabled:f,placeholderColorDisabled:p,colorActive:m,boxShadowFocus:h,boxShadowActive:g,boxShadowHover:_,border:v,borderFocus:y,borderHover:b,borderActive:x,arrowColor:S,arrowColorDisabled:C,loadingColor:w,colorActiveWarning:T,boxShadowFocusWarning:D,boxShadowActiveWarning:O,boxShadowHoverWarning:ee,borderWarning:k,borderFocusWarning:A,borderHoverWarning:j,borderActiveWarning:N,colorActiveError:P,boxShadowFocusError:F,boxShadowActiveError:I,boxShadowHoverError:L,borderError:R,borderFocusError:te,borderHoverError:z,borderActiveError:B,clearColor:ne,clearColorHover:V,clearColorPressed:re,clearSize:ie,arrowSize:H,[M(`height`,t)]:U,[M(`fontSize`,t)]:W}}=E.value,G=Z(c),K=Z(l);return{"--n-bezier":n,"--n-border":v,"--n-border-active":x,"--n-border-focus":y,"--n-border-hover":b,"--n-border-radius":i,"--n-box-shadow-active":g,"--n-box-shadow-focus":h,"--n-box-shadow-hover":_,"--n-caret-color":u,"--n-color":a,"--n-color-active":m,"--n-color-disabled":d,"--n-font-size":W,"--n-height":U,"--n-padding-single-top":G.top,"--n-padding-multiple-top":K.top,"--n-padding-single-right":G.right,"--n-padding-multiple-right":K.right,"--n-padding-single-left":G.left,"--n-padding-multiple-left":K.left,"--n-padding-single-bottom":G.bottom,"--n-padding-multiple-bottom":K.bottom,"--n-placeholder-color":o,"--n-placeholder-color-disabled":p,"--n-text-color":s,"--n-text-color-disabled":f,"--n-arrow-color":S,"--n-arrow-color-disabled":C,"--n-loading-color":w,"--n-color-active-warning":T,"--n-box-shadow-focus-warning":D,"--n-box-shadow-active-warning":O,"--n-box-shadow-hover-warning":ee,"--n-border-warning":k,"--n-border-focus-warning":A,"--n-border-hover-warning":j,"--n-border-active-warning":N,"--n-color-active-error":P,"--n-box-shadow-focus-error":F,"--n-box-shadow-active-error":I,"--n-box-shadow-hover-error":L,"--n-border-error":R,"--n-border-focus-error":te,"--n-border-hover-error":z,"--n-border-active-error":B,"--n-clear-size":ie,"--n-clear-color":ne,"--n-clear-color-hover":V,"--n-clear-color-pressed":re,"--n-arrow-size":H,"--n-font-weight":r}}),be=ve?te(`internal-selection`,t(()=>e.size[0]),ye,e):void 0;return{mergedTheme:E,mergedClearable:O,mergedClsPrefix:n,rtlEnabled:i,patternInputFocused:C,filterablePlaceholder:ee,label:k,selected:A,showTagsPanel:S,isComposing:W,counterRef:_,counterWrapperRef:v,patternInputMirrorRef:a,patternInputRef:o,selfRef:s,multipleElRef:u,singleElRef:m,patternInputWrapperRef:g,overflowRef:y,inputTagElRef:x,handleMouseDown:H,handleFocusin:B,handleClear:V,handleMouseEnter:re,handleMouseLeave:ie,handleDeleteOption:U,handlePatternKeyDown:G,handlePatternInputInput:ae,handlePatternInputBlur:q,handlePatternInputFocus:ce,handleMouseEnterCounter:he,handleMouseLeaveCounter:ge,handleFocusout:ne,handleCompositionEnd:se,handleCompositionStart:oe,onPopoverUpdateShow:_e,focus:J,focusInput:ue,blur:le,blurInput:Y,updateCounter:de,getCounter:fe,getTail:pe,renderLabel:e.renderLabel,cssVars:ve?void 0:ye,themeClass:be?.themeClass,onRender:be?.onRender}},render(){let{status:e,multiple:t,size:n,disabled:r,filterable:i,maxTagCount:a,bordered:o,clsPrefix:c,ellipsisTagPopoverProps:l,onRender:u,renderTag:d,renderLabel:f}=this;u?.();let p=a===`responsive`,m=typeof a==`number`,h=p||m,g=s(J,null,{default:()=>s(ye,{clsPrefix:c,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var e;return(e=this.$slots).arrow?.call(e)}})}),_;if(t){let{labelField:e}=this,t=t=>s(`div`,{class:`${c}-base-selection-tag-wrapper`,key:t.value},d?d({option:t,handleClose:()=>{this.handleDeleteOption(t)}}):s(be,{size:n,closable:!t.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(t)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>f?f(t,!0):Q(t[e],t,!0)})),o=()=>(m?this.selectedOptions.slice(0,a):this.selectedOptions).map(t),u=i?s(`div`,{class:`${c}-base-selection-input-tag`,ref:`inputTagElRef`,key:`__input-tag__`},s(`input`,Object.assign({},this.inputProps,{ref:`patternInputRef`,tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${c}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),s(`span`,{ref:`patternInputMirrorRef`,class:`${c}-base-selection-input-tag__mirror`},this.pattern)):null,y=p?()=>s(`div`,{class:`${c}-base-selection-tag-wrapper`,ref:`counterWrapperRef`},s(be,{size:n,ref:`counterRef`,onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0,b;if(m){let e=this.selectedOptions.length-a;e>0&&(b=s(`div`,{class:`${c}-base-selection-tag-wrapper`,key:`__counter__`},s(be,{size:n,ref:`counterRef`,onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${e}`})))}let x=p?i?s(Ne,{ref:`overflowRef`,updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:`100%`,display:`flex`,overflow:`hidden`}},{default:o,counter:y,tail:()=>u}):s(Ne,{ref:`overflowRef`,updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:`100%`,display:`flex`,overflow:`hidden`}},{default:o,counter:y}):m&&b?o().concat(b):o(),S=h?()=>s(`div`,{class:`${c}-base-selection-popover`},p?o():this.selectedOptions.map(t)):void 0,C=h?Object.assign({show:this.showTagsPanel,trigger:`hover`,overlap:!0,placement:`top`,width:`trigger`,onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},l):null,w=!this.selected&&(!this.active||!this.pattern&&!this.isComposing)?s(`div`,{class:`${c}-base-selection-placeholder ${c}-base-selection-overlay`},s(`div`,{class:`${c}-base-selection-placeholder__inner`},this.placeholder)):null,T=i?s(`div`,{ref:`patternInputWrapperRef`,class:`${c}-base-selection-tags`},x,p?null:u,g):s(`div`,{ref:`multipleElRef`,class:`${c}-base-selection-tags`,tabindex:r?void 0:0},x,g);_=s(v,null,h?s(G,Object.assign({},C,{scrollable:!0,style:`max-height: calc(var(--v-target-height) * 6.6);`}),{trigger:()=>T,default:S}):T,w)}else if(i){let e=this.pattern||this.isComposing,t=this.active?!e:!this.selected,n=this.active?!1:this.selected;_=s(`div`,{ref:`patternInputWrapperRef`,class:`${c}-base-selection-label`,title:this.patternInputFocused?void 0:Fe(this.label)},s(`input`,Object.assign({},this.inputProps,{ref:`patternInputRef`,class:`${c}-base-selection-input`,value:this.active?this.pattern:``,placeholder:``,readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),n?s(`div`,{class:`${c}-base-selection-label__render-label ${c}-base-selection-overlay`,key:`input`},s(`div`,{class:`${c}-base-selection-overlay__wrapper`},d?d({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):Q(this.label,this.selectedOption,!0))):null,t?s(`div`,{class:`${c}-base-selection-placeholder ${c}-base-selection-overlay`,key:`placeholder`},s(`div`,{class:`${c}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,g)}else _=s(`div`,{ref:`singleElRef`,class:`${c}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label===void 0?s(`div`,{class:`${c}-base-selection-placeholder ${c}-base-selection-overlay`,key:`placeholder`},s(`div`,{class:`${c}-base-selection-placeholder__inner`},this.placeholder)):s(`div`,{class:`${c}-base-selection-input`,title:Fe(this.label),key:`input`},s(`div`,{class:`${c}-base-selection-input__content`},d?d({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):Q(this.label,this.selectedOption,!0))),g);return s(`div`,{ref:`selfRef`,class:[`${c}-base-selection`,this.rtlEnabled&&`${c}-base-selection--rtl`,this.themeClass,e&&`${c}-base-selection--${e}-status`,{[`${c}-base-selection--active`]:this.active,[`${c}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${c}-base-selection--disabled`]:this.disabled,[`${c}-base-selection--multiple`]:this.multiple,[`${c}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},_,o?s(`div`,{class:`${c}-base-selection__border`}):null,o?s(`div`,{class:`${c}-base-selection__state-border`}):null)}});function it(e){return e.type===`group`}function at(e){return e.type===`ignored`}function ot(e,t){try{return!!(1+t.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function st(e,t){return{getIsGroup:it,getIgnored:at,getKey(t){return it(t)?t.name||t.key||`key-required`:t[e]},getChildren(e){return e[t]}}}function ct(e,t,n,r){if(!t)return e;function i(e){if(!Array.isArray(e))return[];let a=[];for(let o of e)if(it(o)){let e=i(o[r]);e.length&&a.push(Object.assign({},o,{[r]:e}))}else if(at(o))continue;else t(n,o)&&a.push(o);return a}return i(e)}function lt(e,t,n){let r=new Map;return e.forEach(e=>{it(e)?e[n].forEach(e=>{r.set(e[t],e)}):r.set(e[t],e)}),r}function ut(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}var dt=F({name:`Select`,common:A,peers:{InternalSelection:tt,InternalSelectMenu:qe},self:ut}),ft=I([E(`select`,`
|
|
332
|
-
z-index: auto;
|
|
333
|
-
outline: none;
|
|
334
|
-
width: 100%;
|
|
335
|
-
position: relative;
|
|
336
|
-
font-weight: var(--n-font-weight);
|
|
337
|
-
`),E(`select-menu`,`
|
|
338
|
-
margin: 4px 0;
|
|
339
|
-
box-shadow: var(--n-menu-box-shadow);
|
|
340
|
-
`,[ve({originalTransition:`background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)`})])]),pt=_({name:`Select`,props:Object.assign(Object.assign({},T.props),{to:re.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearCreatedOptionsOnClear:{type:Boolean,default:!0},clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:`bottom-start`},widthMode:{type:String,default:`trigger`},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:`label`},valueField:{type:String,default:`value`},childrenField:{type:String,default:`children`},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:`show`},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},scrollbarProps:Object,onChange:[Function,Array],items:Array}),slots:Object,setup(e){let{mergedClsPrefixRef:n,mergedBorderedRef:r,namespaceRef:i,inlineThemeDisabled:a,mergedComponentPropsRef:o}=b(e),s=T(`Select`,`-select`,ft,dt,e,n),c=p(e.defaultValue),l=ue(h(e,`value`),c),u=p(!1),f=p(``),m=ge(e,[`items`,`options`]),g=p([]),_=p([]),v=t(()=>_.value.concat(g.value).concat(m.value)),y=t(()=>{let{filter:t}=e;if(t)return t;let{labelField:n,valueField:r}=e;return(e,t)=>{if(!t)return!1;let i=t[n];if(typeof i==`string`)return ot(e,i);let a=t[r];return typeof a==`string`?ot(e,a):typeof a==`number`?ot(e,String(a)):!1}}),x=t(()=>{if(e.remote)return m.value;{let{value:t}=v,{value:n}=f;return!n.length||!e.filterable?t:ct(t,y.value,n,e.childrenField)}}),C=t(()=>{let{valueField:t,childrenField:n}=e,r=st(t,n);return ce(x.value,r)}),w=t(()=>lt(v.value,e.valueField,e.childrenField)),E=p(!1),D=ue(h(e,`show`),E),O=p(null),k=p(null),A=p(null),{localeRef:j}=le(`Select`),M=t(()=>e.placeholder??j.value.placeholder),P=[],F=p(new Map),I=t(()=>{let{fallbackOption:t}=e;if(t===void 0){let{labelField:t,valueField:n}=e;return e=>({[t]:String(e),[n]:e})}return t===!1?!1:e=>Object.assign(t(e),{value:e})});function L(t){let n=e.remote,{value:r}=F,{value:i}=w,{value:a}=I,o=[];return t.forEach(e=>{if(i.has(e))o.push(i.get(e));else if(n&&r.has(e))o.push(r.get(e));else if(a){let t=a(e);t&&o.push(t)}}),o}let R=t(()=>{if(e.multiple){let{value:e}=l;return Array.isArray(e)?L(e):[]}return null}),z=t(()=>{let{value:t}=l;return!e.multiple&&!Array.isArray(t)?t===null?null:L([t])[0]||null:null}),B=S(e,{mergedSize:t=>{let{size:n}=e;if(n)return n;let{mergedSize:r}=t||{};return r?.value?r.value:o?.value?.Select?.size||`medium`}}),{mergedSizeRef:ne,mergedDisabledRef:V,mergedStatusRef:ie}=B;function H(t,n){let{onChange:r,"onUpdate:value":i,onUpdateValue:a}=e,{nTriggerFormChange:o,nTriggerFormInput:s}=B;r&&N(r,t,n),a&&N(a,t,n),i&&N(i,t,n),c.value=t,o(),s()}function U(t){let{onBlur:n}=e,{nTriggerFormBlur:r}=B;n&&N(n,t),r()}function W(){let{onClear:t}=e;t&&N(t)}function G(t){let{onFocus:n,showOnFocus:r}=e,{nTriggerFormFocus:i}=B;n&&N(n,t),i(),r&&J()}function K(t){let{onSearch:n}=e;n&&N(n,t)}function ae(t){let{onScroll:n}=e;n&&N(n,t)}function oe(){var t;let{remote:n,multiple:r}=e;if(n){let{value:n}=F;if(r){let{valueField:r}=e;(t=R.value)==null||t.forEach(e=>{n.set(e[r],e)})}else{let t=z.value;t&&n.set(t[e.valueField],t)}}}function q(t){let{onUpdateShow:n,"onUpdate:show":r}=e;n&&N(n,t),r&&N(r,t),E.value=t}function J(){V.value||(q(!0),E.value=!0,e.filterable&&$())}function Y(){q(!1)}function de(){f.value=``,_.value=P}let fe=p(!1);function pe(){e.filterable&&(fe.value=!0)}function me(){e.filterable&&(fe.value=!1,D.value||de())}function X(){V.value||(D.value?e.filterable?$():Y():J())}function Z(e){(A.value?.selfRef)?.contains(e.relatedTarget)||(u.value=!1,U(e),Y())}function Q(e){G(e),u.value=!0}function ve(){u.value=!0}function ye(e){O.value?.$el.contains(e.relatedTarget)||(u.value=!1,U(e),Y())}function be(){var e;(e=O.value)==null||e.focus(),Y()}function xe(e){D.value&&(O.value?.$el.contains(he(e))||Y())}function Se(t){if(!Array.isArray(t))return[];if(I.value)return Array.from(t);{let{remote:n}=e,{value:r}=w;if(n){let{value:e}=F;return t.filter(t=>r.has(t)||e.has(t))}else return t.filter(e=>r.has(e))}}function Ce(e){we(e.rawNode)}function we(t){if(V.value)return;let{tag:n,remote:r,clearFilterAfterSelect:i,valueField:a}=e;if(n&&!r){let{value:e}=_,t=e[0]||null;if(t){let e=g.value;e.length?e.push(t):g.value=[t],_.value=P}}if(r&&F.value.set(t[a],t),e.multiple){let e=Se(l.value),o=e.findIndex(e=>e===t[a]);if(~o){if(e.splice(o,1),n&&!r){let e=Te(t[a]);~e&&(g.value.splice(e,1),i&&(f.value=``))}}else e.push(t[a]),i&&(f.value=``);H(e,L(e))}else{if(n&&!r){let e=Te(t[a]);~e?g.value=[g.value[e]]:g.value=P}je(),Y(),H(t[a],t)}}function Te(t){return g.value.findIndex(n=>n[e.valueField]===t)}function Ee(t){D.value||J();let{value:n}=t.target;f.value=n;let{tag:r,remote:i}=e;if(K(n),r&&!i){if(!n){_.value=P;return}let{onCreate:t}=e,r=t?t(n):{[e.labelField]:n,[e.valueField]:n},{valueField:i,labelField:a}=e;m.value.some(e=>e[i]===r[i]||e[a]===r[a])||g.value.some(e=>e[i]===r[i]||e[a]===r[a])?_.value=P:_.value=[r]}}function De(t){t.stopPropagation();let{multiple:n,tag:r,remote:i,clearCreatedOptionsOnClear:a}=e;!n&&e.filterable&&Y(),r&&!i&&a&&(g.value=P),W(),n?H([],[]):H(null,null)}function Oe(e){!se(e,`action`)&&!se(e,`empty`)&&!se(e,`header`)&&e.preventDefault()}function ke(e){ae(e)}function Ae(t){var n,r,i;if(!e.keyboard){t.preventDefault();return}switch(t.key){case` `:if(e.filterable)break;t.preventDefault();case`Enter`:if(!O.value?.isComposing){if(D.value){let t=A.value?.getPendingTmNode();t?Ce(t):e.filterable||(Y(),je())}else if(J(),e.tag&&fe.value){let t=_.value[0];if(t){let n=t[e.valueField],{value:r}=l;e.multiple&&Array.isArray(r)&&r.includes(n)||we(t)}}}t.preventDefault();break;case`ArrowUp`:if(t.preventDefault(),e.loading)return;D.value&&((n=A.value)==null||n.prev());break;case`ArrowDown`:if(t.preventDefault(),e.loading)return;D.value?(r=A.value)==null||r.next():J();break;case`Escape`:D.value&&(_e(t),Y()),(i=O.value)==null||i.focus();break}}function je(){var e;(e=O.value)==null||e.focus()}function $(){var e;(e=O.value)==null||e.focusInput()}function Me(){var e;D.value&&((e=k.value)==null||e.syncPosition())}oe(),d(h(e,`options`),oe);let Ne={focus:()=>{var e;(e=O.value)==null||e.focus()},focusInput:()=>{var e;(e=O.value)==null||e.focusInput()},blur:()=>{var e;(e=O.value)==null||e.blur()},blurInput:()=>{var e;(e=O.value)==null||e.blurInput()}},Pe=t(()=>{let{self:{menuBoxShadow:e}}=s.value;return{"--n-menu-box-shadow":e}}),Fe=a?te(`select`,void 0,Pe,e):void 0;return Object.assign(Object.assign({},Ne),{mergedStatus:ie,mergedClsPrefix:n,mergedBordered:r,namespace:i,treeMate:C,isMounted:ee(),triggerRef:O,menuRef:A,pattern:f,uncontrolledShow:E,mergedShow:D,adjustedTo:re(e),uncontrolledValue:c,mergedValue:l,followerRef:k,localizedPlaceholder:M,selectedOption:z,selectedOptions:R,mergedSize:ne,mergedDisabled:V,focused:u,activeWithoutMenuOpen:fe,inlineThemeDisabled:a,onTriggerInputFocus:pe,onTriggerInputBlur:me,handleTriggerOrMenuResize:Me,handleMenuFocus:ve,handleMenuBlur:ye,handleMenuTabOut:be,handleTriggerClick:X,handleToggle:Ce,handleDeleteOption:we,handlePatternInput:Ee,handleClear:De,handleTriggerBlur:Z,handleTriggerFocus:Q,handleKeydown:Ae,handleMenuAfterLeave:de,handleMenuClickOutside:xe,handleMenuScroll:ke,handleMenuKeydown:Ae,handleMenuMousedown:Oe,mergedTheme:s,cssVars:a?void 0:Pe,themeClass:Fe?.themeClass,onRender:Fe?.onRender})},render(){return s(`div`,{class:`${this.mergedClsPrefix}-select`},s(ae,null,{default:()=>[s(K,null,{default:()=>s(rt,{ref:`triggerRef`,inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e;return[(e=this.$slots).arrow?.call(e)]}})}),s(ie,{ref:`followerRef`,show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===re.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?`target`:void 0,minWidth:`target`,placement:this.placement},{default:()=>s(m,{name:`fade-in-scale-up-transition`,appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var t;return this.mergedShow||this.displayDirective===`show`?((t=this.onRender)==null||t.call(this),e(s(Qe,Object.assign({},this.menuProps,{ref:`menuRef`,onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,this.menuProps?.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[this.menuProps?.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange,scrollbarProps:this.scrollbarProps}),{empty:()=>{var e;return[(e=this.$slots).empty?.call(e)]},header:()=>{var e;return[(e=this.$slots).header?.call(e)]},action:()=>{var e;return[(e=this.$slots).action?.call(e)]}}),this.displayDirective===`show`?[[g,this.mergedShow],[V,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[V,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}});export{$e as a,He as c,tt as i,Ve as l,dt as n,qe as o,ut as r,Ke as s,pt as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[data-v-b81640b4]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#333;--accent-hover:#1a1a1a;--accent-muted:#888;--text-primary:#1a1a1a;--text-secondary:#666;--text-muted:#999;--success:#2e7d32;--error:#c62828;--warning:#f57f17;--msg-user-bg:#f5f5f5;--msg-assistant-bg:#f5f5f5;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#4a90d9;--accent-primary-rgb:51, 51, 51;--accent-hover-rgb:26, 26, 26;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:46, 125, 50;--error-rgb:198, 40, 40;--warning-rgb:245, 127, 23;--accent-info-rgb:74, 144, 217}.dark[data-v-b81640b4]{--bg-primary:#1a1a1a;--bg-secondary:#252525;--bg-sidebar:#202020;--bg-card:#333;--bg-card-hover:#333;--bg-input:#2a2a2a;--border-color:#3a3a3a;--border-light:#333;--accent-primary:#e0e0e0;--accent-hover:#f5f5f5;--accent-muted:#888;--text-primary:#e0e0e0;--text-secondary:#a0a0a0;--text-muted:#666;--success:#66bb6a;--error:#ef5350;--warning:#ffb74d;--msg-user-bg:#252525;--msg-assistant-bg:#252525;--msg-system-border:#555;--code-bg:#1e1e1e;--text-on-accent:#1a1a1a;--text-on-overlay:#fff;--accent-info:#6ba3d6;--accent-primary-rgb:224, 224, 224;--accent-hover-rgb:245, 245, 245;--text-primary-rgb:224, 224, 224;--text-muted-rgb:102, 102, 102;--success-rgb:102, 187, 106;--error-rgb:239, 83, 80;--warning-rgb:255, 183, 77;--accent-info-rgb:107, 163, 214}.setting-row[data-v-b81640b4]{border-bottom:1px solid var(--border-light);justify-content:space-between;align-items:center;padding:10px 0;display:flex}.setting-row[data-v-b81640b4]:last-child{border-bottom:none}.setting-info[data-v-b81640b4]{flex:1;margin-right:16px}.setting-label[data-v-b81640b4]{color:var(--text-primary);font-size:13px;display:block}.setting-hint[data-v-b81640b4]{color:var(--text-muted);margin-top:2px;font-size:12px}.setting-control[data-v-b81640b4]{flex-shrink:0}@media (width<=768px){.setting-row[data-v-b81640b4]{flex-direction:column;align-items:flex-start;gap:8px}.setting-info[data-v-b81640b4]{margin-right:0}.setting-control[data-v-b81640b4]{width:100%}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[data-v-e737ef30]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#333;--accent-hover:#1a1a1a;--accent-muted:#888;--text-primary:#1a1a1a;--text-secondary:#666;--text-muted:#999;--success:#2e7d32;--error:#c62828;--warning:#f57f17;--msg-user-bg:#f5f5f5;--msg-assistant-bg:#f5f5f5;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#4a90d9;--accent-primary-rgb:51, 51, 51;--accent-hover-rgb:26, 26, 26;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:46, 125, 50;--error-rgb:198, 40, 40;--warning-rgb:245, 127, 23;--accent-info-rgb:74, 144, 217}.dark[data-v-e737ef30]{--bg-primary:#1a1a1a;--bg-secondary:#252525;--bg-sidebar:#202020;--bg-card:#333;--bg-card-hover:#333;--bg-input:#2a2a2a;--border-color:#3a3a3a;--border-light:#333;--accent-primary:#e0e0e0;--accent-hover:#f5f5f5;--accent-muted:#888;--text-primary:#e0e0e0;--text-secondary:#a0a0a0;--text-muted:#666;--success:#66bb6a;--error:#ef5350;--warning:#ffb74d;--msg-user-bg:#252525;--msg-assistant-bg:#252525;--msg-system-border:#555;--code-bg:#1e1e1e;--text-on-accent:#1a1a1a;--text-on-overlay:#fff;--accent-info:#6ba3d6;--accent-primary-rgb:224, 224, 224;--accent-hover-rgb:245, 245, 245;--text-primary-rgb:224, 224, 224;--text-muted-rgb:102, 102, 102;--success-rgb:102, 187, 106;--error-rgb:239, 83, 80;--warning-rgb:255, 183, 77;--accent-info-rgb:107, 163, 214}.settings-section[data-v-e737ef30]{margin-top:16px}[data-v-1f96245d]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#333;--accent-hover:#1a1a1a;--accent-muted:#888;--text-primary:#1a1a1a;--text-secondary:#666;--text-muted:#999;--success:#2e7d32;--error:#c62828;--warning:#f57f17;--msg-user-bg:#f5f5f5;--msg-assistant-bg:#f5f5f5;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#4a90d9;--accent-primary-rgb:51, 51, 51;--accent-hover-rgb:26, 26, 26;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:46, 125, 50;--error-rgb:198, 40, 40;--warning-rgb:245, 127, 23;--accent-info-rgb:74, 144, 217}.dark[data-v-1f96245d]{--bg-primary:#1a1a1a;--bg-secondary:#252525;--bg-sidebar:#202020;--bg-card:#333;--bg-card-hover:#333;--bg-input:#2a2a2a;--border-color:#3a3a3a;--border-light:#333;--accent-primary:#e0e0e0;--accent-hover:#f5f5f5;--accent-muted:#888;--text-primary:#e0e0e0;--text-secondary:#a0a0a0;--text-muted:#666;--success:#66bb6a;--error:#ef5350;--warning:#ffb74d;--msg-user-bg:#252525;--msg-assistant-bg:#252525;--msg-system-border:#555;--code-bg:#1e1e1e;--text-on-accent:#1a1a1a;--text-on-overlay:#fff;--accent-info:#6ba3d6;--accent-primary-rgb:224, 224, 224;--accent-hover-rgb:245, 245, 245;--text-primary-rgb:224, 224, 224;--text-muted-rgb:102, 102, 102;--success-rgb:102, 187, 106;--error-rgb:239, 83, 80;--warning-rgb:255, 183, 77;--accent-info-rgb:107, 163, 214}.settings-section[data-v-1f96245d]{margin-top:16px}[data-v-0c8e2aa7]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#333;--accent-hover:#1a1a1a;--accent-muted:#888;--text-primary:#1a1a1a;--text-secondary:#666;--text-muted:#999;--success:#2e7d32;--error:#c62828;--warning:#f57f17;--msg-user-bg:#f5f5f5;--msg-assistant-bg:#f5f5f5;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#4a90d9;--accent-primary-rgb:51, 51, 51;--accent-hover-rgb:26, 26, 26;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:46, 125, 50;--error-rgb:198, 40, 40;--warning-rgb:245, 127, 23;--accent-info-rgb:74, 144, 217}.dark[data-v-0c8e2aa7]{--bg-primary:#1a1a1a;--bg-secondary:#252525;--bg-sidebar:#202020;--bg-card:#333;--bg-card-hover:#333;--bg-input:#2a2a2a;--border-color:#3a3a3a;--border-light:#333;--accent-primary:#e0e0e0;--accent-hover:#f5f5f5;--accent-muted:#888;--text-primary:#e0e0e0;--text-secondary:#a0a0a0;--text-muted:#666;--success:#66bb6a;--error:#ef5350;--warning:#ffb74d;--msg-user-bg:#252525;--msg-assistant-bg:#252525;--msg-system-border:#555;--code-bg:#1e1e1e;--text-on-accent:#1a1a1a;--text-on-overlay:#fff;--accent-info:#6ba3d6;--accent-primary-rgb:224, 224, 224;--accent-hover-rgb:245, 245, 245;--text-primary-rgb:224, 224, 224;--text-muted-rgb:102, 102, 102;--success-rgb:102, 187, 106;--error-rgb:239, 83, 80;--warning-rgb:255, 183, 77;--accent-info-rgb:107, 163, 214}.settings-section[data-v-0c8e2aa7]{margin-top:16px}[data-v-46301ac7]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#333;--accent-hover:#1a1a1a;--accent-muted:#888;--text-primary:#1a1a1a;--text-secondary:#666;--text-muted:#999;--success:#2e7d32;--error:#c62828;--warning:#f57f17;--msg-user-bg:#f5f5f5;--msg-assistant-bg:#f5f5f5;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#4a90d9;--accent-primary-rgb:51, 51, 51;--accent-hover-rgb:26, 26, 26;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:46, 125, 50;--error-rgb:198, 40, 40;--warning-rgb:245, 127, 23;--accent-info-rgb:74, 144, 217}.dark[data-v-46301ac7]{--bg-primary:#1a1a1a;--bg-secondary:#252525;--bg-sidebar:#202020;--bg-card:#333;--bg-card-hover:#333;--bg-input:#2a2a2a;--border-color:#3a3a3a;--border-light:#333;--accent-primary:#e0e0e0;--accent-hover:#f5f5f5;--accent-muted:#888;--text-primary:#e0e0e0;--text-secondary:#a0a0a0;--text-muted:#666;--success:#66bb6a;--error:#ef5350;--warning:#ffb74d;--msg-user-bg:#252525;--msg-assistant-bg:#252525;--msg-system-border:#555;--code-bg:#1e1e1e;--text-on-accent:#1a1a1a;--text-on-overlay:#fff;--accent-info:#6ba3d6;--accent-primary-rgb:224, 224, 224;--accent-hover-rgb:245, 245, 245;--text-primary-rgb:224, 224, 224;--text-muted-rgb:102, 102, 102;--success-rgb:102, 187, 106;--error-rgb:239, 83, 80;--warning-rgb:255, 183, 77;--accent-info-rgb:107, 163, 214}.settings-section[data-v-46301ac7]{margin-top:16px}[data-v-43145f27]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#333;--accent-hover:#1a1a1a;--accent-muted:#888;--text-primary:#1a1a1a;--text-secondary:#666;--text-muted:#999;--success:#2e7d32;--error:#c62828;--warning:#f57f17;--msg-user-bg:#f5f5f5;--msg-assistant-bg:#f5f5f5;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#4a90d9;--accent-primary-rgb:51, 51, 51;--accent-hover-rgb:26, 26, 26;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:46, 125, 50;--error-rgb:198, 40, 40;--warning-rgb:245, 127, 23;--accent-info-rgb:74, 144, 217}.dark[data-v-43145f27]{--bg-primary:#1a1a1a;--bg-secondary:#252525;--bg-sidebar:#202020;--bg-card:#333;--bg-card-hover:#333;--bg-input:#2a2a2a;--border-color:#3a3a3a;--border-light:#333;--accent-primary:#e0e0e0;--accent-hover:#f5f5f5;--accent-muted:#888;--text-primary:#e0e0e0;--text-secondary:#a0a0a0;--text-muted:#666;--success:#66bb6a;--error:#ef5350;--warning:#ffb74d;--msg-user-bg:#252525;--msg-assistant-bg:#252525;--msg-system-border:#555;--code-bg:#1e1e1e;--text-on-accent:#1a1a1a;--text-on-overlay:#fff;--accent-info:#6ba3d6;--accent-primary-rgb:224, 224, 224;--accent-hover-rgb:245, 245, 245;--text-primary-rgb:224, 224, 224;--text-muted-rgb:102, 102, 102;--success-rgb:102, 187, 106;--error-rgb:239, 83, 80;--warning-rgb:255, 183, 77;--accent-info-rgb:107, 163, 214}.settings-section[data-v-43145f27]{margin-top:16px}[data-v-fffdaf8c]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#333;--accent-hover:#1a1a1a;--accent-muted:#888;--text-primary:#1a1a1a;--text-secondary:#666;--text-muted:#999;--success:#2e7d32;--error:#c62828;--warning:#f57f17;--msg-user-bg:#f5f5f5;--msg-assistant-bg:#f5f5f5;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#4a90d9;--accent-primary-rgb:51, 51, 51;--accent-hover-rgb:26, 26, 26;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:46, 125, 50;--error-rgb:198, 40, 40;--warning-rgb:245, 127, 23;--accent-info-rgb:74, 144, 217}.dark[data-v-fffdaf8c]{--bg-primary:#1a1a1a;--bg-secondary:#252525;--bg-sidebar:#202020;--bg-card:#333;--bg-card-hover:#333;--bg-input:#2a2a2a;--border-color:#3a3a3a;--border-light:#333;--accent-primary:#e0e0e0;--accent-hover:#f5f5f5;--accent-muted:#888;--text-primary:#e0e0e0;--text-secondary:#a0a0a0;--text-muted:#666;--success:#66bb6a;--error:#ef5350;--warning:#ffb74d;--msg-user-bg:#252525;--msg-assistant-bg:#252525;--msg-system-border:#555;--code-bg:#1e1e1e;--text-on-accent:#1a1a1a;--text-on-overlay:#fff;--accent-info:#6ba3d6;--accent-primary-rgb:224, 224, 224;--accent-hover-rgb:245, 245, 245;--text-primary-rgb:224, 224, 224;--text-muted-rgb:102, 102, 102;--success-rgb:102, 187, 106;--error-rgb:239, 83, 80;--warning-rgb:255, 183, 77;--accent-info-rgb:107, 163, 214}.settings-view[data-v-fffdaf8c]{height:calc(100 * var(--vh));flex-direction:column;display:flex}.settings-content[data-v-fffdaf8c]{flex:1;padding:20px;overflow-y:auto}
|