chainlesschain 0.162.3 → 0.162.8
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/bin/chainlesschain.js +0 -0
- package/package.json +2 -2
- package/src/assets/web-panel/.build-hash +1 -1
- package/src/assets/web-panel/assets/{AIOps-BHcJlF4M.js → AIOps-aMUJYSpU.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-QNqNYP_E.js → ActionButton-OR0lRZdD.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-DWrmU2MM.js → Analytics-BfMp4CEg.js} +2 -2
- package/src/assets/web-panel/assets/{AppLayout-0BXhjvFX.js → AppLayout-DsCuOVxT.js} +2 -2
- package/src/assets/web-panel/assets/{Audit-Cns_OJ3y.js → Audit-_AgBKCnk.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-BWXKm8S2.js → Backup-DuMKrzQE.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-DMtM90I4.js → BaseInput-6If50B9h.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-CPSQIJkd.js → Chat-LKExaE9D.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-CdoTzEcu.js → Checkbox-lAve8IZ7.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-DiMm-2CJ.js → Codegen-BGRrXyxs.js} +1 -1
- package/src/assets/web-panel/assets/{Col-Dw8uRsh8.js → Col-B8xEKq-w.js} +1 -1
- package/src/assets/web-panel/assets/{Community-DF6oPrrt.js → Community-CHHfDSp6.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-DDeBOvFc.js → Compact-C2lhX-05.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-cpcX8foc.js → Compliance-DfVk77IC.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-BnF4dCvO.js → Cowork-BQhdnULG.js} +1 -1
- package/src/assets/web-panel/assets/{Cron-CNm5yzGt.js → Cron-D97i0_EI.js} +1 -1
- package/src/assets/web-panel/assets/{Crosschain-1fdaoWnO.js → Crosschain-Cve_HQ-5.js} +1 -1
- package/src/assets/web-panel/assets/{DID-CgWgrQjr.js → DID-B7BoWEdP.js} +1 -1
- package/src/assets/web-panel/assets/{Dashboard-dGcTq_hg.js → Dashboard-DF2CkjR8.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-CMcWp2f1.js → Dropdown-D4Z1jwWu.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-BVmtVOzD.js → Federation-DwvTsJFa.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-BTuMR6zf.js → FormItemContext-BDiTma_8.js} +1 -1
- package/src/assets/web-panel/assets/{Git-2itzzOWU.js → Git-B8EfEU-1.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-BD5nFtjx.js → Governance-bQA7Tept.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-BqTjotuw.js → Inference-D34fMYbV.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-CkJCUp_X.js → KnowledgeGraph-B_8bBmGM.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-BezIQuu3.js → Logs-CwJhYTVt.js} +1 -1
- package/src/assets/web-panel/assets/{Marketplace-BQi8NC94.js → Marketplace-BD3uuzww.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-UDm4tI8g.js → McpTools-D_Zwvily.js} +1 -1
- package/src/assets/web-panel/assets/{Memory-b3k3SJXP.js → Memory-jVF57XHl.js} +1 -1
- package/src/assets/web-panel/assets/{MobileBridge-CHysUGzj.js → MobileBridge-ClAtqJaU.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-H5DjqNIw.js → MobileProjects-B19KSA4P.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-B-kn2cbZ.js → Mtc-DxajYtbq.js} +1 -1
- package/src/assets/web-panel/assets/{MtcAudit-BSeDGJAO.js → MtcAudit-DlKwbPGL.js} +1 -1
- package/src/assets/web-panel/assets/{Multisig-BSwWbNCn.js → Multisig-DuBQn3FV.js} +2 -2
- package/src/assets/web-panel/assets/{NLProgramming-B7fTKT9-.js → NLProgramming-oRBlzbNU.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-CE7Dxyik.js → Notes-HOvoKAEz.js} +1 -1
- package/src/assets/web-panel/assets/{NotificationSettings-BrWPb12X.js → NotificationSettings-bArFAv3j.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-BvMcmpZ-.js → Organization-B4s1Rn39.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-9VpUiyX3.js → Overflow-C2_V35KO.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-CZiZLuH6.js → P2P-BZ3EQxna.js} +1 -1
- package/src/assets/web-panel/assets/{Permissions-7xPYU8o3.js → Permissions-Bo5AXf7h.js} +1 -1
- package/src/assets/web-panel/assets/PersonalDataHub-BK7I0Rsb.css +1 -0
- package/src/assets/web-panel/assets/PersonalDataHub-Gw18y83j.js +1 -0
- package/src/assets/web-panel/assets/{Pipeline-BXmWkBtJ.js → Pipeline-_733qEBF.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-Bowi-wqF.js → Privacy-BLYBBxeR.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-BW1Xj7_l.js → ProjectInit-C8cQg8oo.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectSettings-pDbBvJFG.js → ProjectSettings-Bahm9oQJ.js} +1 -1
- package/src/assets/web-panel/assets/{Projects-D32hRs2K.js → Projects-BsqCBs7g.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-fvnKRdFc.js → Providers-BRJ9jKvG.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-DBZrimTb.js → QuickAsk-B5eH5ufy.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-B_leuPdE.js → Recommend-D4rYVV0L.js} +1 -1
- package/src/assets/web-panel/assets/{Reputation-9YJu2Q0s.js → Reputation-h1wjkVly.js} +1 -1
- package/src/assets/web-panel/assets/{Row-BwDaJw-R.js → Row-DuvWW403.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-CCwGtGbs.js → RssFeed-B-NY4txM.js} +1 -1
- package/src/assets/web-panel/assets/{Search-CLdXqpfz.js → Search-CLjqgYPf.js} +1 -1
- package/src/assets/web-panel/assets/{Security-_It0GsWS.js → Security-_KySjOq5.js} +1 -1
- package/src/assets/web-panel/assets/{Services-jBxBWGGT.js → Services-CN9GmECL.js} +1 -1
- package/src/assets/web-panel/assets/{Skeleton-DR_EuFFW.js → Skeleton-Bcu8eqiJ.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-DsHcMNEk.js → Skills-3oeFeeEN.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-Be0UaX-h.js → Sla-CGTcZtVL.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-uUhDyyHj.js → SpeechSettings-BCXs-HN2.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-CUAwaSnj.js → SyncSettings-FGSbecSU.js} +1 -1
- package/src/assets/web-panel/assets/{Tasks-CUVZww9Q.js → Tasks-_12fFaUS.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-WLZcNzJ_.js → Templates-BhfiSNuq.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-FgN0uYm6.js → Tenant-Bk08XHaK.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-BzLHjHyj.js → Terminal-BN4P8zso.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-z7lyRr40.js → Tokens-C1FHxUfU.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-HxLdC9ne.js → Trigger-DKmcgMsg.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-DggmMxpI.js → Trust-gSo8e3sa.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-BO-pKTZ_.js → UkeySign-DxdzNrTS.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-DdLdJ9Ps.js → VideoEditing-CZ_IqAw_.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-F8EfdQDN.js → Wallet-ztJldhlc.js} +1 -1
- package/src/assets/web-panel/assets/{WebAuthn-Bi2Kf8Ev.js → WebAuthn-IWR5yaHJ.js} +3 -3
- package/src/assets/web-panel/assets/{WorkflowEditor-DUHk4Y0A.js → WorkflowEditor-BC7bHrH9.js} +1 -1
- package/src/assets/web-panel/assets/{chat-BMz8ik6R.js → chat-bWCVi480.js} +1 -1
- package/src/assets/web-panel/assets/{colors-DTTx1bVY.js → colors-tk9UcMJh.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-BjZyyKpa.js → compact-item-DvrBqRW0.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-D0Ztn7R_.js → createContext-Dh48yEoJ.js} +1 -1
- package/src/assets/web-panel/assets/{hasIn-BeXm1bJ2.js → hasIn-DhFZqw2W.js} +1 -1
- package/src/assets/web-panel/assets/icons-CLQTHa5-.js +57 -0
- package/src/assets/web-panel/assets/{index-CuDNPqlD.js → index-B1Km9jHJ.js} +1 -1
- package/src/assets/web-panel/assets/{index-DIoinlAY.js → index-B5sCqkrI.js} +1 -1
- package/src/assets/web-panel/assets/{index-D1CV-6q1.js → index-BBn2bAO4.js} +1 -1
- package/src/assets/web-panel/assets/{index-CqkwXe3s.js → index-BMhrHykJ.js} +1 -1
- package/src/assets/web-panel/assets/{index-DB1i3Cfr.js → index-BQg3zkF3.js} +1 -1
- package/src/assets/web-panel/assets/{index-D1coHqyT.js → index-BdM_h28f.js} +1 -1
- package/src/assets/web-panel/assets/{index-DXSXIknb.js → index-BfZhEeCu.js} +1 -1
- package/src/assets/web-panel/assets/{index-DRNxWV3i.js → index-BgKxsNPN.js} +1 -1
- package/src/assets/web-panel/assets/{index-B_juAGfN.js → index-BqCbH37-.js} +4 -4
- package/src/assets/web-panel/assets/index-Btv3yJqH.js +1 -0
- package/src/assets/web-panel/assets/{index-aBdRRXWO.js → index-C-T0Izic.js} +1 -1
- package/src/assets/web-panel/assets/{index-BDmMBKM_.js → index-C1q29SZg.js} +1 -1
- package/src/assets/web-panel/assets/{index-tUIluCPu.js → index-C2LSgP0_.js} +1 -1
- package/src/assets/web-panel/assets/{index-DfxUN2LB.js → index-C5Q_AIon.js} +1 -1
- package/src/assets/web-panel/assets/{index-BHuIMHcS.js → index-C8NvrPso.js} +1 -1
- package/src/assets/web-panel/assets/{index-BxIq_rps.js → index-CCiWpUyi.js} +1 -1
- package/src/assets/web-panel/assets/{index-OjH2wDtW.js → index-CDVk418O.js} +1 -1
- package/src/assets/web-panel/assets/{index-BiAjZ9Iq.js → index-CE7s9aDu.js} +1 -1
- package/src/assets/web-panel/assets/{index-BUFpZk0I.js → index-CGmfKi-O.js} +1 -1
- package/src/assets/web-panel/assets/{index-CobyvwP0.js → index-CH7lkYCZ.js} +1 -1
- package/src/assets/web-panel/assets/{index-JTN4jzka.js → index-Ci_43YbF.js} +1 -1
- package/src/assets/web-panel/assets/{index-BDRzvi5v.js → index-CugbuyeG.js} +1 -1
- package/src/assets/web-panel/assets/index-D6Nx0oIG.js +1 -0
- package/src/assets/web-panel/assets/{index-BWRsbH6v.js → index-DCeSV2ph.js} +1 -1
- package/src/assets/web-panel/assets/{index-DLJnAsec.js → index-DI382M6n.js} +1 -1
- package/src/assets/web-panel/assets/{index-CGudWWwE.js → index-DTbb54GX.js} +2 -2
- package/src/assets/web-panel/assets/{index-DTzwBmBS.js → index-DVMUHzwr.js} +1 -1
- package/src/assets/web-panel/assets/{index-By4zsU8r.js → index-DeWB6vZV.js} +1 -1
- package/src/assets/web-panel/assets/{index-DnATlZR7.js → index-Dja_xcjz.js} +1 -1
- package/src/assets/web-panel/assets/{index-Da_XUjv2.js → index-DmyUdBoW.js} +1 -1
- package/src/assets/web-panel/assets/{index-C6Isxhje.js → index-DyzV-4bw.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dx7XPVkb.js → index-JcMiXnz7.js} +1 -1
- package/src/assets/web-panel/assets/{index-NppMuZBM.js → index-OGb7oHqA.js} +1 -1
- package/src/assets/web-panel/assets/{index-DLDHcuz4.js → index-ORgr-yOQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-DMvkBq2d.js → index-PbHsGeoK.js} +1 -1
- package/src/assets/web-panel/assets/{index-nwkYgoRS.js → index-R68d0WjD.js} +1 -1
- package/src/assets/web-panel/assets/{index-D-niPBwZ.js → index-Z1-a86y7.js} +1 -1
- package/src/assets/web-panel/assets/{index-xN0WCVmC.js → index-g_WPIICs.js} +1 -1
- package/src/assets/web-panel/assets/{index-BODKOjRZ.js → index-uvwXPlKL.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-DE_gVS_i.js → initDefaultProps-lrtHMmWq.js} +1 -1
- package/src/assets/web-panel/assets/{motion-BiRUGscQ.js → motion-Dna0fLLD.js} +1 -1
- package/src/assets/web-panel/assets/{move-DMEzVMJZ.js → move-B77ZnXvW.js} +1 -1
- package/src/assets/web-panel/assets/{omit-DBh74Ui4.js → omit-CLI0u4xr.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-D6PQbWuo.js → pickAttrs-CsvVxvao.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-BYkdt9jF.js → placementArrow-gCZvBkZg.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-C2ES6P0V.js → responsiveObserve-B4d5HJeN.js} +1 -1
- package/src/assets/web-panel/assets/{slide-zGdjevxe.js → slide-DmExRlkt.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-Cf6eRpR7.js → statusUtils-BkcOP5ZQ.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-DZZx_bHs.js → styleChecker-tL2BFwwe.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-B6q6zt9X.js → useFlexGapSupport-C-aUgESq.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-DjaBUk_P.js → useFs-KT2jItx2.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-CDF4X084.js → vnode-DJz8D0zb.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-C9FCvBpV.js → zoom-BqXtO25S.js} +1 -1
- package/src/assets/web-panel/index.html +2 -2
- package/src/gateways/ws/message-dispatcher.js +35 -1
- package/src/gateways/ws/personal-data-hub-protocol.js +142 -3
- package/src/lib/personal-data-hub-wiring.js +121 -0
- package/src/assets/web-panel/assets/PersonalDataHub-BoAsj3rP.js +0 -1
- package/src/assets/web-panel/assets/PersonalDataHub-C5HcGC5x.css +0 -1
- package/src/assets/web-panel/assets/icons-BFHq5fEF.js +0 -57
- package/src/assets/web-panel/assets/index-DJOgV0SI.js +0 -1
- package/src/assets/web-panel/assets/index-FpewH8xy.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as i,i as F,P as T,q as L,M as lt,l as it,m as st,r as Y,K as O,f as z,ac as ut,J as ct,g as dt}from"./index-B_juAGfN.js";import{d as W,a as mt,w as G,x as gt,c as v,f,r as R,a4 as bt,a2 as ft,a3 as vt}from"./vendor-M5lGV-wr.js";import{c as Q}from"./vnode-CDF4X084.js";import{g as q,i as k}from"./colors-DTTx1bVY.js";import{i as pt}from"./isNumeric-DjvBa-1E.js";import"./icons-BFHq5fEF.js";function J(t){let{prefixCls:o,value:a,current:e,offset:n=0}=t,c;return n&&(c={position:"absolute",top:`${n}00%`,left:0}),v("p",{style:c,class:F(`${o}-only-unit`,{current:e})},[a])}function ht(t,o,a){let e=t,n=0;for(;(e+10)%10!==o;)e+=a,n+=a;return n}const $t=W({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(t){const o=f(()=>Number(t.value)),a=f(()=>Math.abs(t.count)),e=mt({prevValue:o.value,prevCount:a.value}),n=()=>{e.prevValue=o.value,e.prevCount=a.value},c=R();return G(o,()=>{clearTimeout(c.value),c.value=setTimeout(()=>{n()},1e3)},{flush:"post"}),gt(()=>{clearTimeout(c.value)}),()=>{let d,p={};const s=o.value;if(e.prevValue===s||Number.isNaN(s)||Number.isNaN(e.prevValue))d=[J(i(i({},t),{current:!0}))],p={transition:"none"};else{d=[];const h=s+10,m=[];for(let r=s;r<=h;r+=1)m.push(r);const l=m.findIndex(r=>r%10===e.prevValue);d=m.map((r,y)=>{const $=r%10;return J(i(i({},t),{value:$,offset:y-l,current:y===l}))});const u=e.prevCount<a.value?1:-1;p={transform:`translateY(${-ht(e.prevValue,s,u)}00%)`}}return v("span",{class:`${t.prefixCls}-only`,style:p,onTransitionend:()=>n()},[d])}}});var St=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const yt={prefixCls:String,count:T.any,component:String,title:T.any,show:Boolean},Ct=W({compatConfig:{MODE:3},name:"ScrollNumber",inheritAttrs:!1,props:yt,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n}=L("scroll-number",t);return()=>{var c;const d=i(i({},t),a),{prefixCls:p,count:s,title:h,show:m,component:l="sup",class:u,style:r}=d,y=St(d,["prefixCls","count","title","show","component","class","style"]),$=i(i({},y),{style:r,"data-show":t.show,class:F(n.value,u),title:h});let g=s;if(s&&Number(s)%1===0){const b=String(s).split("");g=b.map((P,B)=>v($t,{prefixCls:n.value,count:Number(s),value:P,key:b.length-B},null))}r&&r.borderColor&&($.style=i(i({},r),{boxShadow:`0 0 0 1px ${r.borderColor} inset`}));const S=lt((c=e.default)===null||c===void 0?void 0:c.call(e));return S&&S.length?Q(S,{class:F(`${n.value}-custom-component`)},!1):v(l,$,{default:()=>[g]})}}}),xt=new O("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),wt=new O("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Nt=new O("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Ot=new O("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Pt=new O("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),Bt=new O("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),It=t=>{const{componentCls:o,iconCls:a,antCls:e,badgeFontHeight:n,badgeShadowSize:c,badgeHeightSm:d,motionDurationSlow:p,badgeStatusSize:s,marginXS:h,badgeRibbonOffset:m}=t,l=`${e}-scroll-number`,u=`${e}-ribbon`,r=`${e}-ribbon-wrapper`,y=q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${o} ${o}-color-${g}`]:{background:b,[`&:not(${o}-count)`]:{color:b}}}}),$=q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${u}-color-${g}`]:{background:b,color:b}}});return{[o]:i(i(i(i({},Y(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${o}-count`]:{zIndex:t.badgeZIndex,minWidth:t.badgeHeight,height:t.badgeHeight,color:t.badgeTextColor,fontWeight:t.badgeFontWeight,fontSize:t.badgeFontSize,lineHeight:`${t.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:t.badgeHeight/2,boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${o}-count-sm`]:{minWidth:d,height:d,fontSize:t.badgeFontSizeSm,lineHeight:`${d}px`,borderRadius:d/2},[`${o}-multiple-words`]:{padding:`0 ${t.paddingXS}px`},[`${o}-dot`]:{zIndex:t.badgeZIndex,width:t.badgeDotSize,minWidth:t.badgeDotSize,height:t.badgeDotSize,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`},[`${o}-dot${l}`]:{transition:`background ${p}`},[`${o}-count, ${o}-dot, ${l}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${a}-spin`]:{animationName:Bt,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${o}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${o}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${o}-status-success`]:{backgroundColor:t.colorSuccess},[`${o}-status-processing`]:{overflow:"visible",color:t.colorPrimary,backgroundColor:t.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:c,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:xt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${o}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${o}-status-error`]:{backgroundColor:t.colorError},[`${o}-status-warning`]:{backgroundColor:t.colorWarning},[`${o}-status-text`]:{marginInlineStart:h,color:t.colorText,fontSize:t.fontSize}}}),y),{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:wt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${o}-zoom-leave`]:{animationName:Nt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${o}-not-a-wrapper`]:{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:Ot,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${o}-zoom-leave`]:{animationName:Pt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${o}-status)`]:{verticalAlign:"middle"},[`${l}-custom-component, ${o}-count`]:{transform:"none"},[`${l}-custom-component, ${l}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${l}`]:{overflow:"hidden",[`${l}-only`]:{position:"relative",display:"inline-block",height:t.badgeHeight,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${l}-only-unit`]:{height:t.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${l}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${o}-count, ${o}-dot, ${l}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${r}`]:{position:"relative"},[`${u}`]:i(i(i(i({},Y(t)),{position:"absolute",top:h,padding:`0 ${t.paddingXS}px`,color:t.colorPrimary,lineHeight:`${n}px`,whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${u}-text`]:{color:t.colorTextLightSolid},[`${u}-corner`]:{position:"absolute",top:"100%",width:m,height:m,color:"currentcolor",border:`${m/2}px solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),$),{[`&${u}-placement-end`]:{insetInlineEnd:-m,borderEndEndRadius:0,[`${u}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${u}-placement-start`]:{insetInlineStart:-m,borderEndStartRadius:0,[`${u}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},tt=it("Badge",t=>{const{fontSize:o,lineHeight:a,fontSizeSM:e,lineWidth:n,marginXS:c,colorBorderBg:d}=t,p=Math.round(o*a),s=n,h="auto",m=p-2*s,l=t.colorBgContainer,u="normal",r=e,y=t.colorError,$=t.colorErrorHover,g=o,S=e/2,b=e,P=e/2,B=st(t,{badgeFontHeight:p,badgeShadowSize:s,badgeZIndex:h,badgeHeight:m,badgeTextColor:l,badgeFontWeight:u,badgeFontSize:r,badgeColor:y,badgeColorHover:$,badgeShadowColor:d,badgeHeightSm:g,badgeDotSize:S,badgeFontSizeSm:b,badgeStatusSize:P,badgeProcessingDuration:"1.2s",badgeRibbonOffset:c,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[It(B)]});var zt=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const Tt=()=>({prefix:String,color:{type:String},text:T.any,placement:{type:String,default:"end"}}),V=W({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:Tt(),slots:Object,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n,direction:c}=L("ribbon",t),[d,p]=tt(n),s=f(()=>k(t.color,!1)),h=f(()=>[n.value,`${n.value}-placement-${t.placement}`,{[`${n.value}-rtl`]:c.value==="rtl",[`${n.value}-color-${t.color}`]:s.value}]);return()=>{var m,l;const{class:u,style:r}=a,y=zt(a,["class","style"]),$={},g={};return t.color&&!s.value&&($.background=t.color,g.color=t.color),d(v("div",z({class:`${n.value}-wrapper ${p.value}`},y),[(m=e.default)===null||m===void 0?void 0:m.call(e),v("div",{class:[h.value,u,p.value],style:i(i({},$),r)},[v("span",{class:`${n.value}-text`},[t.text||((l=e.text)===null||l===void 0?void 0:l.call(e))]),v("div",{class:`${n.value}-corner`,style:g},null)])]))}}}),Et=()=>({count:T.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:T.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),M=W({compatConfig:{MODE:3},name:"ABadge",Ribbon:V,inheritAttrs:!1,props:Et(),slots:Object,setup(t,o){let{slots:a,attrs:e}=o;const{prefixCls:n,direction:c}=L("badge",t),[d,p]=tt(n),s=f(()=>t.count>t.overflowCount?`${t.overflowCount}+`:t.count),h=f(()=>s.value==="0"||s.value===0),m=f(()=>t.count===null||h.value&&!t.showZero),l=f(()=>(t.status!==null&&t.status!==void 0||t.color!==null&&t.color!==void 0)&&m.value),u=f(()=>t.dot&&!h.value),r=f(()=>u.value?"":s.value),y=f(()=>(r.value===null||r.value===void 0||r.value===""||h.value&&!t.showZero)&&!u.value),$=R(t.count),g=R(r.value),S=R(u.value);G([()=>t.count,r,u],()=>{y.value||($.value=t.count,g.value=r.value,S.value=u.value)},{immediate:!0});const b=f(()=>k(t.color,!1)),P=f(()=>({[`${n.value}-status-dot`]:l.value,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value})),B=f(()=>t.color&&!b.value?{background:t.color,color:t.color}:{}),et=f(()=>({[`${n.value}-dot`]:S.value,[`${n.value}-count`]:!S.value,[`${n.value}-count-sm`]:t.size==="small",[`${n.value}-multiple-words`]:!S.value&&g.value&&g.value.toString().length>1,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value}));return()=>{var E,_;const{offset:N,title:Z,color:X}=t,U=e.style,j=ut(a,t,"text"),x=n.value,C=$.value;let w=ct((E=a.default)===null||E===void 0?void 0:E.call(a));w=w.length?w:null;const A=!!(!y.value||a.count),D=(()=>{if(!N)return i({},U);const I={marginTop:pt(N[1])?`${N[1]}px`:N[1]};return c.value==="rtl"?I.left=`${parseInt(N[0],10)}px`:I.right=`${-parseInt(N[0],10)}px`,i(i({},I),U)})(),ot=Z??(typeof C=="string"||typeof C=="number"?C:void 0),nt=A||!j?null:v("span",{class:`${x}-status-text`},[j]),at=typeof C=="object"||C===void 0&&a.count?Q(C??((_=a.count)===null||_===void 0?void 0:_.call(a)),{style:D},!1):null,K=F(x,{[`${x}-status`]:l.value,[`${x}-not-a-wrapper`]:!w,[`${x}-rtl`]:c.value==="rtl"},e.class,p.value);if(!w&&l.value){const I=D.color;return d(v("span",z(z({},e),{},{class:K,style:D}),[v("span",{class:P.value,style:B.value},null),v("span",{style:{color:I},class:`${x}-status-text`},[j])]))}const rt=dt(w?`${x}-zoom`:"",{appear:!1});let H=i(i({},D),t.numberStyle);return X&&!b.value&&(H=H||{},H.background=X),d(v("span",z(z({},e),{},{class:K}),[w,v(bt,rt,{default:()=>[ft(v(Ct,{prefixCls:t.scrollNumberPrefixCls,show:A,class:et.value,count:g.value,title:ot,style:H,key:"scrollNumber"},{default:()=>[at]}),[[vt,A]])]}),nt]))}}});M.install=function(t){return t.component(M.name,M),t.component(V.name,V),t};export{V as BadgeRibbon,M as default};
|
|
1
|
+
import{h as i,i as F,P as T,q as L,M as lt,l as it,m as st,r as Y,K as O,f as z,ac as ut,J as ct,g as dt}from"./index-BqCbH37-.js";import{d as W,a as mt,w as G,x as gt,c as v,f,r as R,a4 as bt,a2 as ft,a3 as vt}from"./vendor-M5lGV-wr.js";import{c as Q}from"./vnode-DJz8D0zb.js";import{g as q,i as k}from"./colors-tk9UcMJh.js";import{i as pt}from"./isNumeric-DjvBa-1E.js";import"./icons-CLQTHa5-.js";function J(t){let{prefixCls:o,value:a,current:e,offset:n=0}=t,c;return n&&(c={position:"absolute",top:`${n}00%`,left:0}),v("p",{style:c,class:F(`${o}-only-unit`,{current:e})},[a])}function ht(t,o,a){let e=t,n=0;for(;(e+10)%10!==o;)e+=a,n+=a;return n}const $t=W({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(t){const o=f(()=>Number(t.value)),a=f(()=>Math.abs(t.count)),e=mt({prevValue:o.value,prevCount:a.value}),n=()=>{e.prevValue=o.value,e.prevCount=a.value},c=R();return G(o,()=>{clearTimeout(c.value),c.value=setTimeout(()=>{n()},1e3)},{flush:"post"}),gt(()=>{clearTimeout(c.value)}),()=>{let d,p={};const s=o.value;if(e.prevValue===s||Number.isNaN(s)||Number.isNaN(e.prevValue))d=[J(i(i({},t),{current:!0}))],p={transition:"none"};else{d=[];const h=s+10,m=[];for(let r=s;r<=h;r+=1)m.push(r);const l=m.findIndex(r=>r%10===e.prevValue);d=m.map((r,y)=>{const $=r%10;return J(i(i({},t),{value:$,offset:y-l,current:y===l}))});const u=e.prevCount<a.value?1:-1;p={transform:`translateY(${-ht(e.prevValue,s,u)}00%)`}}return v("span",{class:`${t.prefixCls}-only`,style:p,onTransitionend:()=>n()},[d])}}});var St=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const yt={prefixCls:String,count:T.any,component:String,title:T.any,show:Boolean},Ct=W({compatConfig:{MODE:3},name:"ScrollNumber",inheritAttrs:!1,props:yt,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n}=L("scroll-number",t);return()=>{var c;const d=i(i({},t),a),{prefixCls:p,count:s,title:h,show:m,component:l="sup",class:u,style:r}=d,y=St(d,["prefixCls","count","title","show","component","class","style"]),$=i(i({},y),{style:r,"data-show":t.show,class:F(n.value,u),title:h});let g=s;if(s&&Number(s)%1===0){const b=String(s).split("");g=b.map((P,B)=>v($t,{prefixCls:n.value,count:Number(s),value:P,key:b.length-B},null))}r&&r.borderColor&&($.style=i(i({},r),{boxShadow:`0 0 0 1px ${r.borderColor} inset`}));const S=lt((c=e.default)===null||c===void 0?void 0:c.call(e));return S&&S.length?Q(S,{class:F(`${n.value}-custom-component`)},!1):v(l,$,{default:()=>[g]})}}}),xt=new O("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),wt=new O("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Nt=new O("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Ot=new O("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Pt=new O("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),Bt=new O("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),It=t=>{const{componentCls:o,iconCls:a,antCls:e,badgeFontHeight:n,badgeShadowSize:c,badgeHeightSm:d,motionDurationSlow:p,badgeStatusSize:s,marginXS:h,badgeRibbonOffset:m}=t,l=`${e}-scroll-number`,u=`${e}-ribbon`,r=`${e}-ribbon-wrapper`,y=q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${o} ${o}-color-${g}`]:{background:b,[`&:not(${o}-count)`]:{color:b}}}}),$=q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${u}-color-${g}`]:{background:b,color:b}}});return{[o]:i(i(i(i({},Y(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${o}-count`]:{zIndex:t.badgeZIndex,minWidth:t.badgeHeight,height:t.badgeHeight,color:t.badgeTextColor,fontWeight:t.badgeFontWeight,fontSize:t.badgeFontSize,lineHeight:`${t.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:t.badgeHeight/2,boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${o}-count-sm`]:{minWidth:d,height:d,fontSize:t.badgeFontSizeSm,lineHeight:`${d}px`,borderRadius:d/2},[`${o}-multiple-words`]:{padding:`0 ${t.paddingXS}px`},[`${o}-dot`]:{zIndex:t.badgeZIndex,width:t.badgeDotSize,minWidth:t.badgeDotSize,height:t.badgeDotSize,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`},[`${o}-dot${l}`]:{transition:`background ${p}`},[`${o}-count, ${o}-dot, ${l}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${a}-spin`]:{animationName:Bt,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${o}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${o}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${o}-status-success`]:{backgroundColor:t.colorSuccess},[`${o}-status-processing`]:{overflow:"visible",color:t.colorPrimary,backgroundColor:t.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:c,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:xt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${o}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${o}-status-error`]:{backgroundColor:t.colorError},[`${o}-status-warning`]:{backgroundColor:t.colorWarning},[`${o}-status-text`]:{marginInlineStart:h,color:t.colorText,fontSize:t.fontSize}}}),y),{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:wt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${o}-zoom-leave`]:{animationName:Nt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${o}-not-a-wrapper`]:{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:Ot,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${o}-zoom-leave`]:{animationName:Pt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${o}-status)`]:{verticalAlign:"middle"},[`${l}-custom-component, ${o}-count`]:{transform:"none"},[`${l}-custom-component, ${l}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${l}`]:{overflow:"hidden",[`${l}-only`]:{position:"relative",display:"inline-block",height:t.badgeHeight,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${l}-only-unit`]:{height:t.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${l}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${o}-count, ${o}-dot, ${l}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${r}`]:{position:"relative"},[`${u}`]:i(i(i(i({},Y(t)),{position:"absolute",top:h,padding:`0 ${t.paddingXS}px`,color:t.colorPrimary,lineHeight:`${n}px`,whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${u}-text`]:{color:t.colorTextLightSolid},[`${u}-corner`]:{position:"absolute",top:"100%",width:m,height:m,color:"currentcolor",border:`${m/2}px solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),$),{[`&${u}-placement-end`]:{insetInlineEnd:-m,borderEndEndRadius:0,[`${u}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${u}-placement-start`]:{insetInlineStart:-m,borderEndStartRadius:0,[`${u}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},tt=it("Badge",t=>{const{fontSize:o,lineHeight:a,fontSizeSM:e,lineWidth:n,marginXS:c,colorBorderBg:d}=t,p=Math.round(o*a),s=n,h="auto",m=p-2*s,l=t.colorBgContainer,u="normal",r=e,y=t.colorError,$=t.colorErrorHover,g=o,S=e/2,b=e,P=e/2,B=st(t,{badgeFontHeight:p,badgeShadowSize:s,badgeZIndex:h,badgeHeight:m,badgeTextColor:l,badgeFontWeight:u,badgeFontSize:r,badgeColor:y,badgeColorHover:$,badgeShadowColor:d,badgeHeightSm:g,badgeDotSize:S,badgeFontSizeSm:b,badgeStatusSize:P,badgeProcessingDuration:"1.2s",badgeRibbonOffset:c,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[It(B)]});var zt=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const Tt=()=>({prefix:String,color:{type:String},text:T.any,placement:{type:String,default:"end"}}),V=W({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:Tt(),slots:Object,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n,direction:c}=L("ribbon",t),[d,p]=tt(n),s=f(()=>k(t.color,!1)),h=f(()=>[n.value,`${n.value}-placement-${t.placement}`,{[`${n.value}-rtl`]:c.value==="rtl",[`${n.value}-color-${t.color}`]:s.value}]);return()=>{var m,l;const{class:u,style:r}=a,y=zt(a,["class","style"]),$={},g={};return t.color&&!s.value&&($.background=t.color,g.color=t.color),d(v("div",z({class:`${n.value}-wrapper ${p.value}`},y),[(m=e.default)===null||m===void 0?void 0:m.call(e),v("div",{class:[h.value,u,p.value],style:i(i({},$),r)},[v("span",{class:`${n.value}-text`},[t.text||((l=e.text)===null||l===void 0?void 0:l.call(e))]),v("div",{class:`${n.value}-corner`,style:g},null)])]))}}}),Et=()=>({count:T.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:T.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),M=W({compatConfig:{MODE:3},name:"ABadge",Ribbon:V,inheritAttrs:!1,props:Et(),slots:Object,setup(t,o){let{slots:a,attrs:e}=o;const{prefixCls:n,direction:c}=L("badge",t),[d,p]=tt(n),s=f(()=>t.count>t.overflowCount?`${t.overflowCount}+`:t.count),h=f(()=>s.value==="0"||s.value===0),m=f(()=>t.count===null||h.value&&!t.showZero),l=f(()=>(t.status!==null&&t.status!==void 0||t.color!==null&&t.color!==void 0)&&m.value),u=f(()=>t.dot&&!h.value),r=f(()=>u.value?"":s.value),y=f(()=>(r.value===null||r.value===void 0||r.value===""||h.value&&!t.showZero)&&!u.value),$=R(t.count),g=R(r.value),S=R(u.value);G([()=>t.count,r,u],()=>{y.value||($.value=t.count,g.value=r.value,S.value=u.value)},{immediate:!0});const b=f(()=>k(t.color,!1)),P=f(()=>({[`${n.value}-status-dot`]:l.value,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value})),B=f(()=>t.color&&!b.value?{background:t.color,color:t.color}:{}),et=f(()=>({[`${n.value}-dot`]:S.value,[`${n.value}-count`]:!S.value,[`${n.value}-count-sm`]:t.size==="small",[`${n.value}-multiple-words`]:!S.value&&g.value&&g.value.toString().length>1,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value}));return()=>{var E,_;const{offset:N,title:Z,color:X}=t,U=e.style,j=ut(a,t,"text"),x=n.value,C=$.value;let w=ct((E=a.default)===null||E===void 0?void 0:E.call(a));w=w.length?w:null;const A=!!(!y.value||a.count),D=(()=>{if(!N)return i({},U);const I={marginTop:pt(N[1])?`${N[1]}px`:N[1]};return c.value==="rtl"?I.left=`${parseInt(N[0],10)}px`:I.right=`${-parseInt(N[0],10)}px`,i(i({},I),U)})(),ot=Z??(typeof C=="string"||typeof C=="number"?C:void 0),nt=A||!j?null:v("span",{class:`${x}-status-text`},[j]),at=typeof C=="object"||C===void 0&&a.count?Q(C??((_=a.count)===null||_===void 0?void 0:_.call(a)),{style:D},!1):null,K=F(x,{[`${x}-status`]:l.value,[`${x}-not-a-wrapper`]:!w,[`${x}-rtl`]:c.value==="rtl"},e.class,p.value);if(!w&&l.value){const I=D.color;return d(v("span",z(z({},e),{},{class:K,style:D}),[v("span",{class:P.value,style:B.value},null),v("span",{style:{color:I},class:`${x}-status-text`},[j])]))}const rt=dt(w?`${x}-zoom`:"",{appear:!1});let H=i(i({},D),t.numberStyle);return X&&!b.value&&(H=H||{},H.background=X),d(v("span",z(z({},e),{},{class:K}),[w,v(bt,rt,{default:()=>[ft(v(Ct,{prefixCls:t.scrollNumberPrefixCls,show:A,class:et.value,count:g.value,title:ot,style:H,key:"scrollNumber"},{default:()=>[at]}),[[vt,A]])]}),nt]))}}});M.install=function(t){return t.component(M.name,M),t.component(V.name,V),t};export{V as BadgeRibbon,M as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as f,i as R,U as $e,f as P,P as g,a6 as Ce,aj as Y,av as Ve,l as Be,m as we,r as Me,S as Te,q as Pe,V as z,a0 as D,G as N,$ as He,t as Oe}from"./index-B_juAGfN.js";import{B as q}from"./Trigger-HxLdC9ne.js";import{c as B,d as I,o as ke,e as ie,s as Z,f as le,w as Fe,aa as Le,r as U}from"./vendor-M5lGV-wr.js";import{s as ue,a as G}from"./motion-BiRUGscQ.js";import{K as E}from"./KeyCode-D63Tfrq7.js";import{i as de}from"./initDefaultProps-DE_gVS_i.js";import{T as Ne,b as Ee}from"./index-D1coHqyT.js";import{w as ee}from"./raf-Deuc0E8-.js";import{a as De}from"./FormItemContext-BTuMR6zf.js";import{T as je}from"./icons-BFHq5fEF.js";import"./vnode-CDF4X084.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-BVc6NQ_K.js";import"./placementArrow-BYkdt9jF.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-DTTx1bVY.js";import"./zoom-C9FCvBpV.js";import"./createContext-D0Ztn7R_.js";const J=(e,o)=>{let{attrs:t}=o;const{included:n,vertical:s,style:a,class:r}=t;let{length:i,offset:l,reverse:u}=t;i<0&&(u=!u,i=Math.abs(i),l=100-l);const d=s?{[u?"top":"bottom"]:`${l}%`,[u?"bottom":"top"]:"auto",height:`${i}%`}:{[u?"right":"left"]:`${l}%`,[u?"left":"right"]:"auto",width:`${i}%`},m=f(f({},a),d);return n?B("div",{class:r,style:m},null):null};J.inheritAttrs=!1;const Re=(e,o,t,n,s,a)=>{const r=Object.keys(o).map(parseFloat).sort((i,l)=>i-l);if(t&&n)for(let i=s;i<=a;i+=n)r.indexOf(i)===-1&&r.push(i);return r},ce=(e,o)=>{let{attrs:t}=o;const{prefixCls:n,vertical:s,reverse:a,marks:r,dots:i,step:l,included:u,lowerBound:d,upperBound:m,max:b,min:C,dotStyle:y,activeDotStyle:w}=t,h=b-C,S=Re(s,r,i,l,C,b).map(c=>{const $=`${Math.abs(c-C)/h*100}%`,V=!u&&c===m||u&&c<=m&&c>=d;let x=s?f(f({},y),{[a?"top":"bottom"]:$}):f(f({},y),{[a?"right":"left"]:$});V&&(x=f(f({},x),w));const v=R({[`${n}-dot`]:!0,[`${n}-dot-active`]:V,[`${n}-dot-reverse`]:a});return B("span",{class:v,style:x,key:c},null)});return B("div",{class:`${n}-step`},[S])};ce.inheritAttrs=!1;const he=(e,o)=>{let{attrs:t,slots:n}=o;const{class:s,vertical:a,reverse:r,marks:i,included:l,upperBound:u,lowerBound:d,max:m,min:b,onClickLabel:C}=t,y=Object.keys(i),w=n.mark,h=m-b,S=y.map(parseFloat).sort((c,$)=>c-$).map(c=>{const $=typeof i[c]=="function"?i[c]():i[c],V=typeof $=="object"&&!$e($);let x=V?$.label:$;if(!x&&x!==0)return null;w&&(x=w({point:c,label:x}));const v=!l&&c===u||l&&c<=u&&c>=d,p=R({[`${s}-text`]:!0,[`${s}-text-active`]:v}),M={marginBottom:"-50%",[r?"top":"bottom"]:`${(c-b)/h*100}%`},O={transform:`translateX(${r?"50%":"-50%"})`,msTransform:`translateX(${r?"50%":"-50%"})`,[r?"right":"left"]:`${(c-b)/h*100}%`},T=a?M:O,L=V?f(f({},T),$.style):T,H={[ue?"onTouchstartPassive":"onTouchstart"]:k=>C(k,c)};return B("span",P({class:p,style:L,key:c,onMousedown:k=>C(k,c)},H),[x])});return B("div",{class:s},[S])};he.inheritAttrs=!1;const fe=I({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(e,o){let{attrs:t,emit:n,expose:s}=o;const a=Z(!1),r=Z(),i=()=>{document.activeElement===r.value&&(a.value=!0)},l=h=>{a.value=!1,n("blur",h)},u=()=>{a.value=!1},d=()=>{var h;(h=r.value)===null||h===void 0||h.focus()},m=()=>{var h;(h=r.value)===null||h===void 0||h.blur()},b=()=>{a.value=!0,d()},C=h=>{h.preventDefault(),d(),n("mousedown",h)};s({focus:d,blur:m,clickFocus:b,ref:r});let y=null;ke(()=>{y=G(document,"mouseup",i)}),ie(()=>{y?.remove()});const w=le(()=>{const{vertical:h,offset:S,reverse:c}=e;return h?{[c?"top":"bottom"]:`${S}%`,[c?"bottom":"top"]:"auto",transform:c?null:"translateY(+50%)"}:{[c?"right":"left"]:`${S}%`,[c?"left":"right"]:"auto",transform:`translateX(${c?"+":"-"}50%)`}});return()=>{const{prefixCls:h,disabled:S,min:c,max:$,value:V,tabindex:x,ariaLabel:v,ariaLabelledBy:p,ariaValueTextFormatter:M,onMouseenter:O,onMouseleave:T}=e,L=R(t.class,{[`${h}-handle-click-focused`]:a.value}),H={"aria-valuemin":c,"aria-valuemax":$,"aria-valuenow":V,"aria-disabled":!!S},k=[t.style,w.value];let F=x||0;(S||x===null)&&(F=null);let W;M&&(W=M(V));const K=f(f(f(f({},t),{role:"slider",tabindex:F}),H),{class:L,onBlur:l,onKeydown:u,onMousedown:C,onMouseenter:O,onMouseleave:T,ref:r,style:k});return B("div",P(P({},K),{},{"aria-label":v,"aria-labelledby":p,"aria-valuetext":W}),null)}}});function X(e,o){try{return Object.keys(o).some(t=>e.target===o[t].ref)}catch{return!1}}function pe(e,o){let{min:t,max:n}=o;return e<t||e>n}function te(e){return e.touches.length>1||e.type.toLowerCase()==="touchend"&&e.touches.length>0}function ne(e,o){let{marks:t,step:n,min:s,max:a}=o;const r=Object.keys(t).map(parseFloat);if(n!==null){const l=Math.pow(10,me(n)),u=Math.floor((a*l-s*l)/(n*l)),d=Math.min((e-s)/n,u),m=Math.round(d)*n+s;r.push(m)}const i=r.map(l=>Math.abs(e-l));return r[i.indexOf(Math.min(...i))]}function me(e){const o=e.toString();let t=0;return o.indexOf(".")>=0&&(t=o.length-o.indexOf(".")-1),t}function oe(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.clientY:o.pageX)/t}function se(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.touches[0].clientY:o.touches[0].pageX)/t}function ae(e,o){const t=o.getBoundingClientRect();return e?t.top+t.height*.5:window.scrollX+t.left+t.width*.5}function Q(e,o){let{max:t,min:n}=o;return e<=n?n:e>=t?t:e}function ge(e,o){const{step:t}=o,n=isFinite(ne(e,o))?ne(e,o):0;return t===null?n:parseFloat(n.toFixed(me(t)))}function A(e){e.stopPropagation(),e.preventDefault()}function ze(e,o,t){const n={increase:(r,i)=>r+i,decrease:(r,i)=>r-i},s=n[e](Object.keys(t.marks).indexOf(JSON.stringify(o)),1),a=Object.keys(t.marks)[s];return t.step?n[e](o,t.step):Object.keys(t.marks).length&&t.marks[a]?t.marks[a]:o}function ve(e,o,t){const n="increase",s="decrease";let a=n;switch(e.keyCode){case E.UP:a=o&&t?s:n;break;case E.RIGHT:a=!o&&t?s:n;break;case E.DOWN:a=o&&t?n:s;break;case E.LEFT:a=!o&&t?n:s;break;case E.END:return(r,i)=>i.max;case E.HOME:return(r,i)=>i.min;case E.PAGE_UP:return(r,i)=>r+i.step*2;case E.PAGE_DOWN:return(r,i)=>r-i.step*2;default:return}return(r,i)=>ze(a,r,i)}var Ae=function(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)o.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(t[n[s]]=e[n[s]]);return t};function j(){}function be(e){const o={id:String,min:Number,max:Number,step:Number,marks:g.object,included:{type:Boolean,default:void 0},prefixCls:String,disabled:{type:Boolean,default:void 0},handle:Function,dots:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},minimumTrackStyle:g.object,maximumTrackStyle:g.object,handleStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),trackStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),railStyle:g.object,dotStyle:g.object,activeDotStyle:g.object,autofocus:{type:Boolean,default:void 0},draggableTrack:{type:Boolean,default:void 0}};return I({compatConfig:{MODE:3},name:"CreateSlider",mixins:[q,e],inheritAttrs:!1,props:de(o,{prefixCls:"rc-slider",min:0,max:100,step:1,marks:{},included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),emits:["change","blur","focus"],data(){const{step:t,max:n,min:s}=this;return this.handlesRefs={},{}},mounted(){this.$nextTick(()=>{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:t,disabled:n}=this;t&&!n&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(t){var{index:n,directives:s,className:a,style:r}=t,i=Ae(t,["index","directives","className","style"]);if(delete i.dragging,i.value===null)return null;const l=f(f({},i),{class:a,style:r,key:n});return B(fe,l,null)},onDown(t,n){let s=n;const{draggableTrack:a,vertical:r}=this.$props,{bounds:i}=this.$data,l=a&&this.positionGetValue?this.positionGetValue(s)||[]:[],u=X(t,this.handlesRefs);if(this.dragTrack=a&&i.length>=2&&!u&&!l.map((d,m)=>{const b=m?!0:d>=i[m];return m===l.length-1?d<=i[m]:b}).some(d=>!d),this.dragTrack)this.dragOffset=s,this.startBounds=[...i];else{if(!u)this.dragOffset=0;else{const d=ae(r,t.target);this.dragOffset=s-d,s=d}this.onStart(s)}},onMouseDown(t){if(t.button!==0)return;this.removeDocumentEvents();const n=this.$props.vertical,s=oe(n,t);this.onDown(t,s),this.addDocumentMouseEvents()},onTouchStart(t){if(te(t))return;const n=this.vertical,s=se(n,t);this.onDown(t,s),this.addDocumentTouchEvents(),A(t)},onFocus(t){const{vertical:n}=this;if(X(t,this.handlesRefs)&&!this.dragTrack){const s=ae(n,t.target);this.dragOffset=0,this.onStart(s),A(t),this.$emit("focus",t)}},onBlur(t){this.dragTrack||this.onEnd(),this.$emit("blur",t)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(t){if(!this.sliderRef){this.onEnd();return}const n=oe(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(t){if(te(t)||!this.sliderRef){this.onEnd();return}const n=se(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(t){this.sliderRef&&X(t,this.handlesRefs)&&this.onKeyboard(t)},onClickMarkLabel(t,n){t.stopPropagation(),this.onChange({sValue:n}),this.setState({sValue:n},()=>this.onEnd(!0))},getSliderStart(){const t=this.sliderRef,{vertical:n,reverse:s}=this,a=t.getBoundingClientRect();return n?s?a.bottom:a.top:window.scrollX+(s?a.right:a.left)},getSliderLength(){const t=this.sliderRef;if(!t)return 0;const n=t.getBoundingClientRect();return this.vertical?n.height:n.width},addDocumentTouchEvents(){this.onTouchMoveListener=G(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=G(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=G(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=G(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var t;this.$props.disabled||(t=this.handlesRefs[0])===null||t===void 0||t.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(t=>{var n,s;(s=(n=this.handlesRefs[t])===null||n===void 0?void 0:n.blur)===null||s===void 0||s.call(n)})},calcValue(t){const{vertical:n,min:s,max:a}=this,r=Math.abs(Math.max(t,0)/this.getSliderLength());return n?(1-r)*(a-s)+s:r*(a-s)+s},calcValueByPos(t){const s=(this.reverse?-1:1)*(t-this.getSliderStart());return this.trimAlignValue(this.calcValue(s))},calcOffset(t){const{min:n,max:s}=this,a=(t-n)/(s-n);return Math.max(0,a*100)},saveSlider(t){this.sliderRef=t},saveHandle(t,n){this.handlesRefs[t]=n}},render(){const{prefixCls:t,marks:n,dots:s,step:a,included:r,disabled:i,vertical:l,reverse:u,min:d,max:m,maximumTrackStyle:b,railStyle:C,dotStyle:y,activeDotStyle:w,id:h}=this,{class:S,style:c}=this.$attrs,{tracks:$,handles:V}=this.renderSlider(),x=R(t,S,{[`${t}-with-marks`]:Object.keys(n).length,[`${t}-disabled`]:i,[`${t}-vertical`]:l,[`${t}-horizontal`]:!l}),v={vertical:l,marks:n,included:r,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:d,reverse:u,class:`${t}-mark`,onClickLabel:i?j:this.onClickMarkLabel},p={[ue?"onTouchstartPassive":"onTouchstart"]:i?j:this.onTouchStart};return B("div",P(P({id:h,ref:this.saveSlider,tabindex:"-1",class:x},p),{},{onMousedown:i?j:this.onMouseDown,onMouseup:i?j:this.onMouseUp,onKeydown:i?j:this.onKeyDown,onFocus:i?j:this.onFocus,onBlur:i?j:this.onBlur,style:c}),[B("div",{class:`${t}-rail`,style:f(f({},b),C)},null),$,B(ce,{prefixCls:t,vertical:l,reverse:u,marks:n,dots:s,step:a,included:r,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:d,dotStyle:y,activeDotStyle:w},null),V,B(he,v,{mark:this.$slots.mark}),Ce(this)])}})}const Ie=I({compatConfig:{MODE:3},name:"Slider",mixins:[q],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const e=this.defaultValue!==void 0?this.defaultValue:this.min,o=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(o),dragging:!1}},watch:{value:{handler(e){this.setChangeValue(e)},deep:!0},min(){const{sValue:e}=this;this.setChangeValue(e)},max(){const{sValue:e}=this;this.setChangeValue(e)}},methods:{setChangeValue(e){const o=e!==void 0?e:this.sValue,t=this.trimAlignValue(o,this.$props);t!==this.sValue&&(this.setState({sValue:t}),pe(o,this.$props)&&this.$emit("change",t))},onChange(e){const o=!Y(this,"value"),t=e.sValue>this.max?f(f({},e),{sValue:this.max}):e;o&&this.setState(t);const n=t.sValue;this.$emit("change",n)},onStart(e){this.setState({dragging:!0});const{sValue:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e,t!==o&&(this.prevMovedHandleIndex=0,this.onChange({sValue:t}))},onEnd(e){const{dragging:o}=this;this.removeDocumentEvents(),(o||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(e,o){A(e);const{sValue:t}=this,n=this.calcValueByPos(o);n!==t&&this.onChange({sValue:n})},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{sValue:s}=this,a=n(s,this.$props),r=this.trimAlignValue(a);if(r===s)return;this.onChange({sValue:r}),this.$emit("afterChange",r),this.onEnd()}},getLowerBound(){const e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound(){return this.$data.sValue<this.$props.startPoint?this.$props.startPoint:this.$data.sValue},trimAlignValue(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;const t=f(f({},this.$props),o),n=Q(e,t);return ge(n,t)},getTrack(e){let{prefixCls:o,reverse:t,vertical:n,included:s,minimumTrackStyle:a,mergedTrackStyle:r,length:i,offset:l}=e;return B(J,{class:`${o}-track`,vertical:n,included:s,offset:l,reverse:t,length:i,style:f(f({},a),r)},null)},renderSlider(){const{prefixCls:e,vertical:o,included:t,disabled:n,minimumTrackStyle:s,trackStyle:a,handleStyle:r,tabindex:i,ariaLabelForHandle:l,ariaLabelledByForHandle:u,ariaValueTextFormatterForHandle:d,min:m,max:b,startPoint:C,reverse:y,handle:w,defaultHandle:h}=this,S=w||h,{sValue:c,dragging:$}=this,V=this.calcOffset(c),x=S({class:`${e}-handle`,prefixCls:e,vertical:o,offset:V,value:c,dragging:$,disabled:n,min:m,max:b,reverse:y,index:0,tabindex:i,ariaLabel:l,ariaLabelledBy:u,ariaValueTextFormatter:d,style:r[0]||r,ref:M=>this.saveHandle(0,M),onFocus:this.onFocus,onBlur:this.onBlur}),v=C!==void 0?this.calcOffset(C):0,p=a[0]||a;return{tracks:this.getTrack({prefixCls:e,reverse:y,vertical:o,included:t,offset:v,minimumTrackStyle:s,mergedTrackStyle:p,length:V-v}),handles:x}}}}),We=be(Ie),_=e=>{let{value:o,handle:t,bounds:n,props:s}=e;const{allowCross:a,pushable:r}=s,i=Number(r),l=Q(o,s);let u=l;return!a&&t!=null&&n!==void 0&&(t>0&&l<=n[t-1]+i&&(u=n[t-1]+i),t<n.length-1&&l>=n[t+1]-i&&(u=n[t+1]-i)),ge(u,s)},_e={defaultValue:g.arrayOf(g.number),value:g.arrayOf(g.number),count:Number,pushable:Ve(g.oneOfType([g.looseBool,g.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:g.arrayOf(g.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},Ge=I({compatConfig:{MODE:3},name:"Range",mixins:[q],inheritAttrs:!1,props:de(_e,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:e,min:o,max:t}=this,n=Array(...Array(e+1)).map(()=>o),s=Y(this,"defaultValue")?this.defaultValue:n;let{value:a}=this;a===void 0&&(a=s);const r=a.map((l,u)=>_({value:l,handle:u,props:this.$props}));return{sHandle:null,recent:r[0]===t?0:r.length-1,bounds:r}},watch:{value:{handler(e){const{bounds:o}=this;this.setChangeValue(e||o)},deep:!0},min(){const{value:e}=this;this.setChangeValue(e||this.bounds)},max(){const{value:e}=this;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue(e){const{bounds:o}=this;let t=e.map((n,s)=>_({value:n,handle:s,bounds:o,props:this.$props}));if(o.length===t.length){if(t.every((n,s)=>n===o[s]))return null}else t=e.map((n,s)=>_({value:n,handle:s,props:this.$props}));if(this.setState({bounds:t}),e.some(n=>pe(n,this.$props))){const n=e.map(s=>Q(s,this.$props));this.$emit("change",n)}},onChange(e){if(!Y(this,"value"))this.setState(e);else{const s={};["sHandle","recent"].forEach(a=>{e[a]!==void 0&&(s[a]=e[a])}),Object.keys(s).length&&this.setState(s)}const n=f(f({},this.$data),e).bounds;this.$emit("change",n)},positionGetValue(e){const o=this.getValue(),t=this.calcValueByPos(e),n=this.getClosestBound(t),s=this.getBoundNeedMoving(t,n),a=o[s];if(t===a)return null;const r=[...o];return r[s]=t,r},onStart(e){const{bounds:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e;const n=this.getClosestBound(t);this.prevMovedHandleIndex=this.getBoundNeedMoving(t,n),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const s=o[this.prevMovedHandleIndex];if(t===s)return;const a=[...o];a[this.prevMovedHandleIndex]=t,this.onChange({bounds:a})},onEnd(e){const{sHandle:o}=this;this.removeDocumentEvents(),o||(this.dragTrack=!1),(o!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(e,o,t,n){A(e);const{$data:s,$props:a}=this,r=a.max||100,i=a.min||0;if(t){let b=a.vertical?-o:o;b=a.reverse?-b:b;const C=r-Math.max(...n),y=i-Math.min(...n),w=Math.min(Math.max(b/(this.getSliderLength()/100),y),C),h=n.map(S=>Math.floor(Math.max(Math.min(S+w,r),i)));s.bounds.map((S,c)=>S===h[c]).some(S=>!S)&&this.onChange({bounds:h});return}const{bounds:l,sHandle:u}=this,d=this.calcValueByPos(o),m=l[u];d!==m&&this.moveTo(d)},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{bounds:s,sHandle:a}=this,r=s[a===null?this.recent:a],i=n(r,this.$props),l=_({value:i,handle:a,bounds:s,props:this.$props});if(l===r)return;this.moveTo(l,!0)}},getClosestBound(e){const{bounds:o}=this;let t=0;for(let n=1;n<o.length-1;n+=1)e>=o[n]&&(t=n);return Math.abs(o[t+1]-e)<Math.abs(o[t]-e)&&(t+=1),t},getBoundNeedMoving(e,o){const{bounds:t,recent:n}=this;let s=o;const a=t[o+1]===t[o];return a&&t[n]===t[o]&&(s=n),a&&e!==t[o+1]&&(s=e<t[o+1]?o:o+1),s},getLowerBound(){return this.bounds[0]},getUpperBound(){const{bounds:e}=this;return e[e.length-1]},getPoints(){const{marks:e,step:o,min:t,max:n}=this,s=this.internalPointsCache;if(!s||s.marks!==e||s.step!==o){const a=f({},e);if(o!==null)for(let i=t;i<=n;i+=o)a[i]=i;const r=Object.keys(a).map(parseFloat);r.sort((i,l)=>i-l),this.internalPointsCache={marks:e,step:o,points:r}}return this.internalPointsCache.points},moveTo(e,o){const t=[...this.bounds],{sHandle:n,recent:s}=this,a=n===null?s:n;t[a]=e;let r=a;this.$props.pushable!==!1?this.pushSurroundingHandles(t,r):this.$props.allowCross&&(t.sort((i,l)=>i-l),r=t.indexOf(e)),this.onChange({recent:r,sHandle:r,bounds:t}),o&&(this.$emit("afterChange",t),this.setState({},()=>{this.handlesRefs[r].focus()}),this.onEnd())},pushSurroundingHandles(e,o){const t=e[o],{pushable:n}=this,s=Number(n);let a=0;if(e[o+1]-t<s&&(a=1),t-e[o-1]<s&&(a=-1),a===0)return;const r=o+a,i=a*(e[r]-t);this.pushHandle(e,r,a,s-i)||(e[o]=e[r]-a*s)},pushHandle(e,o,t,n){const s=e[o];let a=e[o];for(;t*(a-s)<n;){if(!this.pushHandleOnePoint(e,o,t))return e[o]=s,!1;a=e[o]}return!0},pushHandleOnePoint(e,o,t){const n=this.getPoints(),a=n.indexOf(e[o])+t;if(a>=n.length||a<0)return!1;const r=o+t,i=n[a],{pushable:l}=this,u=Number(l),d=t*(e[r]-i);return this.pushHandle(e,r,t,u-d)?(e[o]=i,!0):!1},trimAlignValue(e){const{sHandle:o,bounds:t}=this;return _({value:e,handle:o,bounds:t,props:this.$props})},ensureValueNotConflict(e,o,t){let{allowCross:n,pushable:s}=t;const a=this.$data||{},{bounds:r}=a;if(e=e===void 0?a.sHandle:e,s=Number(s),!n&&e!=null&&r!==void 0){if(e>0&&o<=r[e-1]+s)return r[e-1]+s;if(e<r.length-1&&o>=r[e+1]-s)return r[e+1]-s}return o},getTrack(e){let{bounds:o,prefixCls:t,reverse:n,vertical:s,included:a,offsets:r,trackStyle:i}=e;return o.slice(0,-1).map((l,u)=>{const d=u+1,m=R({[`${t}-track`]:!0,[`${t}-track-${d}`]:!0});return B(J,{class:m,vertical:s,reverse:n,included:a,offset:r[d-1],length:r[d]-r[d-1],style:i[u],key:d},null)})},renderSlider(){const{sHandle:e,bounds:o,prefixCls:t,vertical:n,included:s,disabled:a,min:r,max:i,reverse:l,handle:u,defaultHandle:d,trackStyle:m,handleStyle:b,tabindex:C,ariaLabelGroupForHandles:y,ariaLabelledByGroupForHandles:w,ariaValueTextFormatterGroupForHandles:h}=this,S=u||d,c=o.map(x=>this.calcOffset(x)),$=`${t}-handle`,V=o.map((x,v)=>{let p=C[v]||0;(a||C[v]===null)&&(p=null);const M=e===v;return S({class:R({[$]:!0,[`${$}-${v+1}`]:!0,[`${$}-dragging`]:M}),prefixCls:t,vertical:n,dragging:M,offset:c[v],value:x,index:v,tabindex:p,min:r,max:i,reverse:l,disabled:a,style:b[v],ref:O=>this.saveHandle(v,O),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:y[v],ariaLabelledBy:w[v],ariaValueTextFormatter:h[v]})});return{tracks:this.getTrack({bounds:o,prefixCls:t,reverse:l,vertical:n,included:s,offsets:c,trackStyle:m}),handles:V}}}}),Ue=be(Ge),Ke=I({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:Ee(),setup(e,o){let{attrs:t,slots:n}=o;const s=U(null),a=U(null);function r(){ee.cancel(a.value),a.value=null}function i(){a.value=ee(()=>{var u;(u=s.value)===null||u===void 0||u.forcePopupAlign(),a.value=null})}const l=()=>{r(),e.open&&i()};return Fe([()=>e.open,()=>e.title],()=>{l()},{flush:"post",immediate:!0}),Le(()=>{l()}),ie(()=>{r()}),()=>B(Ne,P(P({ref:s},e),t),n)}}),Xe=e=>{const{componentCls:o,controlSize:t,dotSize:n,marginFull:s,marginPart:a,colorFillContentHover:r}=e;return{[o]:f(f({},Me(e)),{position:"relative",height:t,margin:`${a}px ${s}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${s}px ${a}px`},[`${o}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${o}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${o}-rail`]:{backgroundColor:e.colorFillSecondary},[`${o}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${o}-dot`]:{borderColor:r},[`${o}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${o}-dot-active`]:{borderColor:e.colorPrimary}},[`${o}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${o}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:`
|
|
1
|
+
import{h as f,i as R,U as $e,f as P,P as g,a6 as Ce,aj as Y,av as Ve,l as Be,m as we,r as Me,S as Te,q as Pe,V as z,a0 as D,G as N,$ as He,t as Oe}from"./index-BqCbH37-.js";import{B as q}from"./Trigger-DKmcgMsg.js";import{c as B,d as I,o as ke,e as ie,s as Z,f as le,w as Fe,aa as Le,r as U}from"./vendor-M5lGV-wr.js";import{s as ue,a as G}from"./motion-Dna0fLLD.js";import{K as E}from"./KeyCode-D63Tfrq7.js";import{i as de}from"./initDefaultProps-lrtHMmWq.js";import{T as Ne,b as Ee}from"./index-BdM_h28f.js";import{w as ee}from"./raf-Deuc0E8-.js";import{a as De}from"./FormItemContext-BDiTma_8.js";import{T as je}from"./icons-CLQTHa5-.js";import"./vnode-DJz8D0zb.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-BVc6NQ_K.js";import"./placementArrow-gCZvBkZg.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-tk9UcMJh.js";import"./zoom-BqXtO25S.js";import"./createContext-Dh48yEoJ.js";const J=(e,o)=>{let{attrs:t}=o;const{included:n,vertical:s,style:a,class:r}=t;let{length:i,offset:l,reverse:u}=t;i<0&&(u=!u,i=Math.abs(i),l=100-l);const d=s?{[u?"top":"bottom"]:`${l}%`,[u?"bottom":"top"]:"auto",height:`${i}%`}:{[u?"right":"left"]:`${l}%`,[u?"left":"right"]:"auto",width:`${i}%`},m=f(f({},a),d);return n?B("div",{class:r,style:m},null):null};J.inheritAttrs=!1;const Re=(e,o,t,n,s,a)=>{const r=Object.keys(o).map(parseFloat).sort((i,l)=>i-l);if(t&&n)for(let i=s;i<=a;i+=n)r.indexOf(i)===-1&&r.push(i);return r},ce=(e,o)=>{let{attrs:t}=o;const{prefixCls:n,vertical:s,reverse:a,marks:r,dots:i,step:l,included:u,lowerBound:d,upperBound:m,max:b,min:C,dotStyle:y,activeDotStyle:w}=t,h=b-C,S=Re(s,r,i,l,C,b).map(c=>{const $=`${Math.abs(c-C)/h*100}%`,V=!u&&c===m||u&&c<=m&&c>=d;let x=s?f(f({},y),{[a?"top":"bottom"]:$}):f(f({},y),{[a?"right":"left"]:$});V&&(x=f(f({},x),w));const v=R({[`${n}-dot`]:!0,[`${n}-dot-active`]:V,[`${n}-dot-reverse`]:a});return B("span",{class:v,style:x,key:c},null)});return B("div",{class:`${n}-step`},[S])};ce.inheritAttrs=!1;const he=(e,o)=>{let{attrs:t,slots:n}=o;const{class:s,vertical:a,reverse:r,marks:i,included:l,upperBound:u,lowerBound:d,max:m,min:b,onClickLabel:C}=t,y=Object.keys(i),w=n.mark,h=m-b,S=y.map(parseFloat).sort((c,$)=>c-$).map(c=>{const $=typeof i[c]=="function"?i[c]():i[c],V=typeof $=="object"&&!$e($);let x=V?$.label:$;if(!x&&x!==0)return null;w&&(x=w({point:c,label:x}));const v=!l&&c===u||l&&c<=u&&c>=d,p=R({[`${s}-text`]:!0,[`${s}-text-active`]:v}),M={marginBottom:"-50%",[r?"top":"bottom"]:`${(c-b)/h*100}%`},O={transform:`translateX(${r?"50%":"-50%"})`,msTransform:`translateX(${r?"50%":"-50%"})`,[r?"right":"left"]:`${(c-b)/h*100}%`},T=a?M:O,L=V?f(f({},T),$.style):T,H={[ue?"onTouchstartPassive":"onTouchstart"]:k=>C(k,c)};return B("span",P({class:p,style:L,key:c,onMousedown:k=>C(k,c)},H),[x])});return B("div",{class:s},[S])};he.inheritAttrs=!1;const fe=I({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(e,o){let{attrs:t,emit:n,expose:s}=o;const a=Z(!1),r=Z(),i=()=>{document.activeElement===r.value&&(a.value=!0)},l=h=>{a.value=!1,n("blur",h)},u=()=>{a.value=!1},d=()=>{var h;(h=r.value)===null||h===void 0||h.focus()},m=()=>{var h;(h=r.value)===null||h===void 0||h.blur()},b=()=>{a.value=!0,d()},C=h=>{h.preventDefault(),d(),n("mousedown",h)};s({focus:d,blur:m,clickFocus:b,ref:r});let y=null;ke(()=>{y=G(document,"mouseup",i)}),ie(()=>{y?.remove()});const w=le(()=>{const{vertical:h,offset:S,reverse:c}=e;return h?{[c?"top":"bottom"]:`${S}%`,[c?"bottom":"top"]:"auto",transform:c?null:"translateY(+50%)"}:{[c?"right":"left"]:`${S}%`,[c?"left":"right"]:"auto",transform:`translateX(${c?"+":"-"}50%)`}});return()=>{const{prefixCls:h,disabled:S,min:c,max:$,value:V,tabindex:x,ariaLabel:v,ariaLabelledBy:p,ariaValueTextFormatter:M,onMouseenter:O,onMouseleave:T}=e,L=R(t.class,{[`${h}-handle-click-focused`]:a.value}),H={"aria-valuemin":c,"aria-valuemax":$,"aria-valuenow":V,"aria-disabled":!!S},k=[t.style,w.value];let F=x||0;(S||x===null)&&(F=null);let W;M&&(W=M(V));const K=f(f(f(f({},t),{role:"slider",tabindex:F}),H),{class:L,onBlur:l,onKeydown:u,onMousedown:C,onMouseenter:O,onMouseleave:T,ref:r,style:k});return B("div",P(P({},K),{},{"aria-label":v,"aria-labelledby":p,"aria-valuetext":W}),null)}}});function X(e,o){try{return Object.keys(o).some(t=>e.target===o[t].ref)}catch{return!1}}function pe(e,o){let{min:t,max:n}=o;return e<t||e>n}function te(e){return e.touches.length>1||e.type.toLowerCase()==="touchend"&&e.touches.length>0}function ne(e,o){let{marks:t,step:n,min:s,max:a}=o;const r=Object.keys(t).map(parseFloat);if(n!==null){const l=Math.pow(10,me(n)),u=Math.floor((a*l-s*l)/(n*l)),d=Math.min((e-s)/n,u),m=Math.round(d)*n+s;r.push(m)}const i=r.map(l=>Math.abs(e-l));return r[i.indexOf(Math.min(...i))]}function me(e){const o=e.toString();let t=0;return o.indexOf(".")>=0&&(t=o.length-o.indexOf(".")-1),t}function oe(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.clientY:o.pageX)/t}function se(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.touches[0].clientY:o.touches[0].pageX)/t}function ae(e,o){const t=o.getBoundingClientRect();return e?t.top+t.height*.5:window.scrollX+t.left+t.width*.5}function Q(e,o){let{max:t,min:n}=o;return e<=n?n:e>=t?t:e}function ge(e,o){const{step:t}=o,n=isFinite(ne(e,o))?ne(e,o):0;return t===null?n:parseFloat(n.toFixed(me(t)))}function A(e){e.stopPropagation(),e.preventDefault()}function ze(e,o,t){const n={increase:(r,i)=>r+i,decrease:(r,i)=>r-i},s=n[e](Object.keys(t.marks).indexOf(JSON.stringify(o)),1),a=Object.keys(t.marks)[s];return t.step?n[e](o,t.step):Object.keys(t.marks).length&&t.marks[a]?t.marks[a]:o}function ve(e,o,t){const n="increase",s="decrease";let a=n;switch(e.keyCode){case E.UP:a=o&&t?s:n;break;case E.RIGHT:a=!o&&t?s:n;break;case E.DOWN:a=o&&t?n:s;break;case E.LEFT:a=!o&&t?n:s;break;case E.END:return(r,i)=>i.max;case E.HOME:return(r,i)=>i.min;case E.PAGE_UP:return(r,i)=>r+i.step*2;case E.PAGE_DOWN:return(r,i)=>r-i.step*2;default:return}return(r,i)=>ze(a,r,i)}var Ae=function(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)o.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(t[n[s]]=e[n[s]]);return t};function j(){}function be(e){const o={id:String,min:Number,max:Number,step:Number,marks:g.object,included:{type:Boolean,default:void 0},prefixCls:String,disabled:{type:Boolean,default:void 0},handle:Function,dots:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},minimumTrackStyle:g.object,maximumTrackStyle:g.object,handleStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),trackStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),railStyle:g.object,dotStyle:g.object,activeDotStyle:g.object,autofocus:{type:Boolean,default:void 0},draggableTrack:{type:Boolean,default:void 0}};return I({compatConfig:{MODE:3},name:"CreateSlider",mixins:[q,e],inheritAttrs:!1,props:de(o,{prefixCls:"rc-slider",min:0,max:100,step:1,marks:{},included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),emits:["change","blur","focus"],data(){const{step:t,max:n,min:s}=this;return this.handlesRefs={},{}},mounted(){this.$nextTick(()=>{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:t,disabled:n}=this;t&&!n&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(t){var{index:n,directives:s,className:a,style:r}=t,i=Ae(t,["index","directives","className","style"]);if(delete i.dragging,i.value===null)return null;const l=f(f({},i),{class:a,style:r,key:n});return B(fe,l,null)},onDown(t,n){let s=n;const{draggableTrack:a,vertical:r}=this.$props,{bounds:i}=this.$data,l=a&&this.positionGetValue?this.positionGetValue(s)||[]:[],u=X(t,this.handlesRefs);if(this.dragTrack=a&&i.length>=2&&!u&&!l.map((d,m)=>{const b=m?!0:d>=i[m];return m===l.length-1?d<=i[m]:b}).some(d=>!d),this.dragTrack)this.dragOffset=s,this.startBounds=[...i];else{if(!u)this.dragOffset=0;else{const d=ae(r,t.target);this.dragOffset=s-d,s=d}this.onStart(s)}},onMouseDown(t){if(t.button!==0)return;this.removeDocumentEvents();const n=this.$props.vertical,s=oe(n,t);this.onDown(t,s),this.addDocumentMouseEvents()},onTouchStart(t){if(te(t))return;const n=this.vertical,s=se(n,t);this.onDown(t,s),this.addDocumentTouchEvents(),A(t)},onFocus(t){const{vertical:n}=this;if(X(t,this.handlesRefs)&&!this.dragTrack){const s=ae(n,t.target);this.dragOffset=0,this.onStart(s),A(t),this.$emit("focus",t)}},onBlur(t){this.dragTrack||this.onEnd(),this.$emit("blur",t)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(t){if(!this.sliderRef){this.onEnd();return}const n=oe(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(t){if(te(t)||!this.sliderRef){this.onEnd();return}const n=se(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(t){this.sliderRef&&X(t,this.handlesRefs)&&this.onKeyboard(t)},onClickMarkLabel(t,n){t.stopPropagation(),this.onChange({sValue:n}),this.setState({sValue:n},()=>this.onEnd(!0))},getSliderStart(){const t=this.sliderRef,{vertical:n,reverse:s}=this,a=t.getBoundingClientRect();return n?s?a.bottom:a.top:window.scrollX+(s?a.right:a.left)},getSliderLength(){const t=this.sliderRef;if(!t)return 0;const n=t.getBoundingClientRect();return this.vertical?n.height:n.width},addDocumentTouchEvents(){this.onTouchMoveListener=G(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=G(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=G(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=G(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var t;this.$props.disabled||(t=this.handlesRefs[0])===null||t===void 0||t.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(t=>{var n,s;(s=(n=this.handlesRefs[t])===null||n===void 0?void 0:n.blur)===null||s===void 0||s.call(n)})},calcValue(t){const{vertical:n,min:s,max:a}=this,r=Math.abs(Math.max(t,0)/this.getSliderLength());return n?(1-r)*(a-s)+s:r*(a-s)+s},calcValueByPos(t){const s=(this.reverse?-1:1)*(t-this.getSliderStart());return this.trimAlignValue(this.calcValue(s))},calcOffset(t){const{min:n,max:s}=this,a=(t-n)/(s-n);return Math.max(0,a*100)},saveSlider(t){this.sliderRef=t},saveHandle(t,n){this.handlesRefs[t]=n}},render(){const{prefixCls:t,marks:n,dots:s,step:a,included:r,disabled:i,vertical:l,reverse:u,min:d,max:m,maximumTrackStyle:b,railStyle:C,dotStyle:y,activeDotStyle:w,id:h}=this,{class:S,style:c}=this.$attrs,{tracks:$,handles:V}=this.renderSlider(),x=R(t,S,{[`${t}-with-marks`]:Object.keys(n).length,[`${t}-disabled`]:i,[`${t}-vertical`]:l,[`${t}-horizontal`]:!l}),v={vertical:l,marks:n,included:r,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:d,reverse:u,class:`${t}-mark`,onClickLabel:i?j:this.onClickMarkLabel},p={[ue?"onTouchstartPassive":"onTouchstart"]:i?j:this.onTouchStart};return B("div",P(P({id:h,ref:this.saveSlider,tabindex:"-1",class:x},p),{},{onMousedown:i?j:this.onMouseDown,onMouseup:i?j:this.onMouseUp,onKeydown:i?j:this.onKeyDown,onFocus:i?j:this.onFocus,onBlur:i?j:this.onBlur,style:c}),[B("div",{class:`${t}-rail`,style:f(f({},b),C)},null),$,B(ce,{prefixCls:t,vertical:l,reverse:u,marks:n,dots:s,step:a,included:r,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:d,dotStyle:y,activeDotStyle:w},null),V,B(he,v,{mark:this.$slots.mark}),Ce(this)])}})}const Ie=I({compatConfig:{MODE:3},name:"Slider",mixins:[q],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const e=this.defaultValue!==void 0?this.defaultValue:this.min,o=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(o),dragging:!1}},watch:{value:{handler(e){this.setChangeValue(e)},deep:!0},min(){const{sValue:e}=this;this.setChangeValue(e)},max(){const{sValue:e}=this;this.setChangeValue(e)}},methods:{setChangeValue(e){const o=e!==void 0?e:this.sValue,t=this.trimAlignValue(o,this.$props);t!==this.sValue&&(this.setState({sValue:t}),pe(o,this.$props)&&this.$emit("change",t))},onChange(e){const o=!Y(this,"value"),t=e.sValue>this.max?f(f({},e),{sValue:this.max}):e;o&&this.setState(t);const n=t.sValue;this.$emit("change",n)},onStart(e){this.setState({dragging:!0});const{sValue:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e,t!==o&&(this.prevMovedHandleIndex=0,this.onChange({sValue:t}))},onEnd(e){const{dragging:o}=this;this.removeDocumentEvents(),(o||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(e,o){A(e);const{sValue:t}=this,n=this.calcValueByPos(o);n!==t&&this.onChange({sValue:n})},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{sValue:s}=this,a=n(s,this.$props),r=this.trimAlignValue(a);if(r===s)return;this.onChange({sValue:r}),this.$emit("afterChange",r),this.onEnd()}},getLowerBound(){const e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound(){return this.$data.sValue<this.$props.startPoint?this.$props.startPoint:this.$data.sValue},trimAlignValue(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;const t=f(f({},this.$props),o),n=Q(e,t);return ge(n,t)},getTrack(e){let{prefixCls:o,reverse:t,vertical:n,included:s,minimumTrackStyle:a,mergedTrackStyle:r,length:i,offset:l}=e;return B(J,{class:`${o}-track`,vertical:n,included:s,offset:l,reverse:t,length:i,style:f(f({},a),r)},null)},renderSlider(){const{prefixCls:e,vertical:o,included:t,disabled:n,minimumTrackStyle:s,trackStyle:a,handleStyle:r,tabindex:i,ariaLabelForHandle:l,ariaLabelledByForHandle:u,ariaValueTextFormatterForHandle:d,min:m,max:b,startPoint:C,reverse:y,handle:w,defaultHandle:h}=this,S=w||h,{sValue:c,dragging:$}=this,V=this.calcOffset(c),x=S({class:`${e}-handle`,prefixCls:e,vertical:o,offset:V,value:c,dragging:$,disabled:n,min:m,max:b,reverse:y,index:0,tabindex:i,ariaLabel:l,ariaLabelledBy:u,ariaValueTextFormatter:d,style:r[0]||r,ref:M=>this.saveHandle(0,M),onFocus:this.onFocus,onBlur:this.onBlur}),v=C!==void 0?this.calcOffset(C):0,p=a[0]||a;return{tracks:this.getTrack({prefixCls:e,reverse:y,vertical:o,included:t,offset:v,minimumTrackStyle:s,mergedTrackStyle:p,length:V-v}),handles:x}}}}),We=be(Ie),_=e=>{let{value:o,handle:t,bounds:n,props:s}=e;const{allowCross:a,pushable:r}=s,i=Number(r),l=Q(o,s);let u=l;return!a&&t!=null&&n!==void 0&&(t>0&&l<=n[t-1]+i&&(u=n[t-1]+i),t<n.length-1&&l>=n[t+1]-i&&(u=n[t+1]-i)),ge(u,s)},_e={defaultValue:g.arrayOf(g.number),value:g.arrayOf(g.number),count:Number,pushable:Ve(g.oneOfType([g.looseBool,g.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:g.arrayOf(g.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},Ge=I({compatConfig:{MODE:3},name:"Range",mixins:[q],inheritAttrs:!1,props:de(_e,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:e,min:o,max:t}=this,n=Array(...Array(e+1)).map(()=>o),s=Y(this,"defaultValue")?this.defaultValue:n;let{value:a}=this;a===void 0&&(a=s);const r=a.map((l,u)=>_({value:l,handle:u,props:this.$props}));return{sHandle:null,recent:r[0]===t?0:r.length-1,bounds:r}},watch:{value:{handler(e){const{bounds:o}=this;this.setChangeValue(e||o)},deep:!0},min(){const{value:e}=this;this.setChangeValue(e||this.bounds)},max(){const{value:e}=this;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue(e){const{bounds:o}=this;let t=e.map((n,s)=>_({value:n,handle:s,bounds:o,props:this.$props}));if(o.length===t.length){if(t.every((n,s)=>n===o[s]))return null}else t=e.map((n,s)=>_({value:n,handle:s,props:this.$props}));if(this.setState({bounds:t}),e.some(n=>pe(n,this.$props))){const n=e.map(s=>Q(s,this.$props));this.$emit("change",n)}},onChange(e){if(!Y(this,"value"))this.setState(e);else{const s={};["sHandle","recent"].forEach(a=>{e[a]!==void 0&&(s[a]=e[a])}),Object.keys(s).length&&this.setState(s)}const n=f(f({},this.$data),e).bounds;this.$emit("change",n)},positionGetValue(e){const o=this.getValue(),t=this.calcValueByPos(e),n=this.getClosestBound(t),s=this.getBoundNeedMoving(t,n),a=o[s];if(t===a)return null;const r=[...o];return r[s]=t,r},onStart(e){const{bounds:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e;const n=this.getClosestBound(t);this.prevMovedHandleIndex=this.getBoundNeedMoving(t,n),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const s=o[this.prevMovedHandleIndex];if(t===s)return;const a=[...o];a[this.prevMovedHandleIndex]=t,this.onChange({bounds:a})},onEnd(e){const{sHandle:o}=this;this.removeDocumentEvents(),o||(this.dragTrack=!1),(o!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(e,o,t,n){A(e);const{$data:s,$props:a}=this,r=a.max||100,i=a.min||0;if(t){let b=a.vertical?-o:o;b=a.reverse?-b:b;const C=r-Math.max(...n),y=i-Math.min(...n),w=Math.min(Math.max(b/(this.getSliderLength()/100),y),C),h=n.map(S=>Math.floor(Math.max(Math.min(S+w,r),i)));s.bounds.map((S,c)=>S===h[c]).some(S=>!S)&&this.onChange({bounds:h});return}const{bounds:l,sHandle:u}=this,d=this.calcValueByPos(o),m=l[u];d!==m&&this.moveTo(d)},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{bounds:s,sHandle:a}=this,r=s[a===null?this.recent:a],i=n(r,this.$props),l=_({value:i,handle:a,bounds:s,props:this.$props});if(l===r)return;this.moveTo(l,!0)}},getClosestBound(e){const{bounds:o}=this;let t=0;for(let n=1;n<o.length-1;n+=1)e>=o[n]&&(t=n);return Math.abs(o[t+1]-e)<Math.abs(o[t]-e)&&(t+=1),t},getBoundNeedMoving(e,o){const{bounds:t,recent:n}=this;let s=o;const a=t[o+1]===t[o];return a&&t[n]===t[o]&&(s=n),a&&e!==t[o+1]&&(s=e<t[o+1]?o:o+1),s},getLowerBound(){return this.bounds[0]},getUpperBound(){const{bounds:e}=this;return e[e.length-1]},getPoints(){const{marks:e,step:o,min:t,max:n}=this,s=this.internalPointsCache;if(!s||s.marks!==e||s.step!==o){const a=f({},e);if(o!==null)for(let i=t;i<=n;i+=o)a[i]=i;const r=Object.keys(a).map(parseFloat);r.sort((i,l)=>i-l),this.internalPointsCache={marks:e,step:o,points:r}}return this.internalPointsCache.points},moveTo(e,o){const t=[...this.bounds],{sHandle:n,recent:s}=this,a=n===null?s:n;t[a]=e;let r=a;this.$props.pushable!==!1?this.pushSurroundingHandles(t,r):this.$props.allowCross&&(t.sort((i,l)=>i-l),r=t.indexOf(e)),this.onChange({recent:r,sHandle:r,bounds:t}),o&&(this.$emit("afterChange",t),this.setState({},()=>{this.handlesRefs[r].focus()}),this.onEnd())},pushSurroundingHandles(e,o){const t=e[o],{pushable:n}=this,s=Number(n);let a=0;if(e[o+1]-t<s&&(a=1),t-e[o-1]<s&&(a=-1),a===0)return;const r=o+a,i=a*(e[r]-t);this.pushHandle(e,r,a,s-i)||(e[o]=e[r]-a*s)},pushHandle(e,o,t,n){const s=e[o];let a=e[o];for(;t*(a-s)<n;){if(!this.pushHandleOnePoint(e,o,t))return e[o]=s,!1;a=e[o]}return!0},pushHandleOnePoint(e,o,t){const n=this.getPoints(),a=n.indexOf(e[o])+t;if(a>=n.length||a<0)return!1;const r=o+t,i=n[a],{pushable:l}=this,u=Number(l),d=t*(e[r]-i);return this.pushHandle(e,r,t,u-d)?(e[o]=i,!0):!1},trimAlignValue(e){const{sHandle:o,bounds:t}=this;return _({value:e,handle:o,bounds:t,props:this.$props})},ensureValueNotConflict(e,o,t){let{allowCross:n,pushable:s}=t;const a=this.$data||{},{bounds:r}=a;if(e=e===void 0?a.sHandle:e,s=Number(s),!n&&e!=null&&r!==void 0){if(e>0&&o<=r[e-1]+s)return r[e-1]+s;if(e<r.length-1&&o>=r[e+1]-s)return r[e+1]-s}return o},getTrack(e){let{bounds:o,prefixCls:t,reverse:n,vertical:s,included:a,offsets:r,trackStyle:i}=e;return o.slice(0,-1).map((l,u)=>{const d=u+1,m=R({[`${t}-track`]:!0,[`${t}-track-${d}`]:!0});return B(J,{class:m,vertical:s,reverse:n,included:a,offset:r[d-1],length:r[d]-r[d-1],style:i[u],key:d},null)})},renderSlider(){const{sHandle:e,bounds:o,prefixCls:t,vertical:n,included:s,disabled:a,min:r,max:i,reverse:l,handle:u,defaultHandle:d,trackStyle:m,handleStyle:b,tabindex:C,ariaLabelGroupForHandles:y,ariaLabelledByGroupForHandles:w,ariaValueTextFormatterGroupForHandles:h}=this,S=u||d,c=o.map(x=>this.calcOffset(x)),$=`${t}-handle`,V=o.map((x,v)=>{let p=C[v]||0;(a||C[v]===null)&&(p=null);const M=e===v;return S({class:R({[$]:!0,[`${$}-${v+1}`]:!0,[`${$}-dragging`]:M}),prefixCls:t,vertical:n,dragging:M,offset:c[v],value:x,index:v,tabindex:p,min:r,max:i,reverse:l,disabled:a,style:b[v],ref:O=>this.saveHandle(v,O),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:y[v],ariaLabelledBy:w[v],ariaValueTextFormatter:h[v]})});return{tracks:this.getTrack({bounds:o,prefixCls:t,reverse:l,vertical:n,included:s,offsets:c,trackStyle:m}),handles:V}}}}),Ue=be(Ge),Ke=I({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:Ee(),setup(e,o){let{attrs:t,slots:n}=o;const s=U(null),a=U(null);function r(){ee.cancel(a.value),a.value=null}function i(){a.value=ee(()=>{var u;(u=s.value)===null||u===void 0||u.forcePopupAlign(),a.value=null})}const l=()=>{r(),e.open&&i()};return Fe([()=>e.open,()=>e.title],()=>{l()},{flush:"post",immediate:!0}),Le(()=>{l()}),ie(()=>{r()}),()=>B(Ne,P(P({ref:s},e),t),n)}}),Xe=e=>{const{componentCls:o,controlSize:t,dotSize:n,marginFull:s,marginPart:a,colorFillContentHover:r}=e;return{[o]:f(f({},Me(e)),{position:"relative",height:t,margin:`${a}px ${s}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${s}px ${a}px`},[`${o}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${o}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${o}-rail`]:{backgroundColor:e.colorFillSecondary},[`${o}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${o}-dot`]:{borderColor:r},[`${o}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${o}-dot-active`]:{borderColor:e.colorPrimary}},[`${o}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${o}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:`
|
|
2
2
|
inset-inline-start ${e.motionDurationMid},
|
|
3
3
|
inset-block-start ${e.motionDurationMid},
|
|
4
4
|
width ${e.motionDurationMid},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as be,x as Ce,s as pe,b as $e,d as R,c as a,r as ve,f as Q,O as de,a8 as Se}from"./vendor-M5lGV-wr.js";import{h as l,P as s,i as v,al as xe,f as N,U as ne,aj as K,ak as ye,am as Ie,l as Pe,m as Oe,r as Te,n as ze,an as re,q as Be,p as we,V as M,G as F,$ as Ne,a0 as Me,Z as Ee,ao as je,S as De}from"./index-B_juAGfN.js";import{ag as ae,b7 as oe,b8 as le,b9 as se}from"./icons-BFHq5fEF.js";import{S as G,s as ge}from"./index-BODKOjRZ.js";import{u as Re}from"./responsiveObserve-C2ES6P0V.js";import{i as Ae,g as _e,h as He}from"./index-xN0WCVmC.js";import{B as Ke}from"./Trigger-HxLdC9ne.js";import{B as me}from"./BaseInput-DMtM90I4.js";import{c as ue}from"./vnode-CDF4X084.js";import{f as ce}from"./firstNotUndefined-CLFzEa0p.js";function Fe(){const e=pe({});let t=null;const i=Re();return be(()=>{t=i.value.subscribe(n=>{e.value=n})}),Ce(()=>{i.value.unsubscribe(t)}),e}function ft(e){const t=pe();return $e(()=>{t.value=e()},{flush:"sync"}),t}const Ve=R({name:"MiniSelect",compatConfig:{MODE:3},inheritAttrs:!1,props:ge(),Option:G.Option,setup(e,t){let{attrs:i,slots:n}=t;return()=>{const r=l(l(l({},e),{size:"small"}),i);return a(G,r,n)}}}),We=R({name:"MiddleSelect",inheritAttrs:!1,props:ge(),Option:G.Option,setup(e,t){let{attrs:i,slots:n}=t;return()=>{const r=l(l(l({},e),{size:"middle"}),i);return a(G,r,n)}}}),E=R({compatConfig:{MODE:3},name:"Pager",inheritAttrs:!1,props:{rootPrefixCls:String,page:Number,active:{type:Boolean,default:void 0},last:{type:Boolean,default:void 0},locale:s.object,showTitle:{type:Boolean,default:void 0},itemRender:{type:Function,default:()=>{}},onClick:{type:Function},onKeypress:{type:Function}},eimt:["click","keypress"],setup(e,t){let{emit:i,attrs:n}=t;const r=()=>{i("click",e.page)},O=g=>{i("keypress",g,r,e.page)};return()=>{const{showTitle:g,page:p,itemRender:c}=e,{class:h,style:u}=n,b=`${e.rootPrefixCls}-item`,$=v(b,`${b}-${e.page}`,{[`${b}-active`]:e.active,[`${b}-disabled`]:!e.page},h);return a("li",{onClick:r,onKeypress:O,title:g?String(p):null,tabindex:"0",class:$,style:u},[c({page:p,type:"page",originalElement:a("a",{rel:"nofollow"},[p])})])}}}),j={ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Je=R({compatConfig:{MODE:3},props:{disabled:{type:Boolean,default:void 0},changeSize:Function,quickGo:Function,selectComponentClass:s.any,current:Number,pageSizeOptions:s.array.def(["10","20","50","100"]),pageSize:Number,buildOptionText:Function,locale:s.object,rootPrefixCls:String,selectPrefixCls:String,goButton:s.any},setup(e){const t=ve(""),i=Q(()=>!t.value||isNaN(t.value)?void 0:Number(t.value)),n=c=>`${c.value} ${e.locale.items_per_page}`,r=c=>{const{value:h}=c.target;t.value!==h&&(t.value=h)},O=c=>{const{goButton:h,quickGo:u,rootPrefixCls:b}=e;if(!(h||t.value===""))if(c.relatedTarget&&(c.relatedTarget.className.indexOf(`${b}-item-link`)>=0||c.relatedTarget.className.indexOf(`${b}-item`)>=0)){t.value="";return}else u(i.value),t.value=""},g=c=>{t.value!==""&&(c.keyCode===j.ENTER||c.type==="click")&&(e.quickGo(i.value),t.value="")},p=Q(()=>{const{pageSize:c,pageSizeOptions:h}=e;return h.some(u=>u.toString()===c.toString())?h:h.concat([c.toString()]).sort((u,b)=>{const $=isNaN(Number(u))?0:Number(u),S=isNaN(Number(b))?0:Number(b);return $-S})});return()=>{const{rootPrefixCls:c,locale:h,changeSize:u,quickGo:b,goButton:$,selectComponentClass:S,selectPrefixCls:m,pageSize:T,disabled:x}=e,o=`${c}-options`;let C=null,y=null,z=null;if(!u&&!b)return null;if(u&&S){const D=e.buildOptionText||n,d=p.value.map((f,V)=>a(S.Option,{key:V,value:f},{default:()=>[D({value:f})]}));C=a(S,{disabled:x,prefixCls:m,showSearch:!1,class:`${o}-size-changer`,optionLabelProp:"children",value:(T||p.value[0]).toString(),onChange:f=>u(Number(f)),getPopupContainer:f=>f.parentNode},{default:()=>[d]})}return b&&($&&(z=typeof $=="boolean"?a("button",{type:"button",onClick:g,onKeyup:g,disabled:x,class:`${o}-quick-jumper-button`},[h.jump_to_confirm]):a("span",{onClick:g,onKeyup:g},[$])),y=a("div",{class:`${o}-quick-jumper`},[h.jump_to,a(me,{disabled:x,type:"text",value:t.value,onInput:r,onChange:r,onKeyup:g,onBlur:O},null),h.page,z])),a("li",{class:`${o}`},[C,y])}}});var Le=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i};function Xe(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Ge(e){let{originalElement:t}=e;return t}function P(e,t,i){const n=typeof e>"u"?t.statePageSize:e;return Math.floor((i.total-1)/n)+1}const Ue=R({compatConfig:{MODE:3},name:"Pagination",mixins:[Ke],inheritAttrs:!1,props:{disabled:{type:Boolean,default:void 0},prefixCls:s.string.def("rc-pagination"),selectPrefixCls:s.string.def("rc-select"),current:Number,defaultCurrent:s.number.def(1),total:s.number.def(0),pageSize:Number,defaultPageSize:s.number.def(10),hideOnSinglePage:{type:Boolean,default:!1},showSizeChanger:{type:Boolean,default:void 0},showLessItems:{type:Boolean,default:!1},selectComponentClass:s.any,showPrevNextJumpers:{type:Boolean,default:!0},showQuickJumper:s.oneOfType([s.looseBool,s.object]).def(!1),showTitle:{type:Boolean,default:!0},pageSizeOptions:s.arrayOf(s.oneOfType([s.number,s.string])),buildOptionText:Function,showTotal:Function,simple:{type:Boolean,default:void 0},locale:s.object.def(Ie),itemRender:s.func.def(Ge),prevIcon:s.any,nextIcon:s.any,jumpPrevIcon:s.any,jumpNextIcon:s.any,totalBoundaryShowSizeChanger:s.number.def(50)},data(){const e=this.$props;let t=ce([this.current,this.defaultCurrent]);const i=ce([this.pageSize,this.defaultPageSize]);return t=Math.min(t,P(i,void 0,e)),{stateCurrent:t,stateCurrentInputValue:t,statePageSize:i}},watch:{current(e){this.setState({stateCurrent:e,stateCurrentInputValue:e})},pageSize(e){const t={};let i=this.stateCurrent;const n=P(e,this.$data,this.$props);i=i>n?n:i,K(this,"current")||(t.stateCurrent=i,t.stateCurrentInputValue=i),t.statePageSize=e,this.setState(t)},stateCurrent(e,t){this.$nextTick(()=>{if(this.$refs.paginationNode){const i=this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);i&&document.activeElement===i&&i.blur()}})},total(){const e={},t=P(this.pageSize,this.$data,this.$props);if(K(this,"current")){const i=Math.min(this.current,t);e.stateCurrent=i,e.stateCurrentInputValue=i}else{let i=this.stateCurrent;i===0&&t>0?i=1:i=Math.min(this.stateCurrent,t),e.stateCurrent=i}this.setState(e)}},methods:{getJumpPrevPage(){return Math.max(1,this.stateCurrent-(this.showLessItems?3:5))},getJumpNextPage(){return Math.min(P(void 0,this.$data,this.$props),this.stateCurrent+(this.showLessItems?3:5))},getItemIcon(e,t){const{prefixCls:i}=this.$props;return ye(this,e,this.$props)||a("button",{type:"button","aria-label":t,class:`${i}-item-link`},null)},getValidValue(e){const t=e.target.value,i=P(void 0,this.$data,this.$props),{stateCurrentInputValue:n}=this.$data;let r;return t===""?r=t:isNaN(Number(t))?r=n:t>=i?r=i:r=Number(t),r},isValid(e){return Xe(e)&&e!==this.stateCurrent},shouldDisplayQuickJumper(){const{showQuickJumper:e,pageSize:t,total:i}=this.$props;return i<=t?!1:e},handleKeyDown(e){(e.keyCode===j.ARROW_UP||e.keyCode===j.ARROW_DOWN)&&e.preventDefault()},handleKeyUp(e){const t=this.getValidValue(e),i=this.stateCurrentInputValue;t!==i&&this.setState({stateCurrentInputValue:t}),e.keyCode===j.ENTER?this.handleChange(t):e.keyCode===j.ARROW_UP?this.handleChange(t-1):e.keyCode===j.ARROW_DOWN&&this.handleChange(t+1)},changePageSize(e){let t=this.stateCurrent;const i=t,n=P(e,this.$data,this.$props);t=t>n?n:t,n===0&&(t=this.stateCurrent),typeof e=="number"&&(K(this,"pageSize")||this.setState({statePageSize:e}),K(this,"current")||this.setState({stateCurrent:t,stateCurrentInputValue:t})),this.__emit("update:pageSize",e),t!==i&&this.__emit("update:current",t),this.__emit("showSizeChange",t,e),this.__emit("change",t,e)},handleChange(e){const{disabled:t}=this.$props;let i=e;if(this.isValid(i)&&!t){const n=P(void 0,this.$data,this.$props);return i>n?i=n:i<1&&(i=1),K(this,"current")||this.setState({stateCurrent:i,stateCurrentInputValue:i}),this.__emit("update:current",i),this.__emit("change",i,this.statePageSize),i}return this.stateCurrent},prev(){this.hasPrev()&&this.handleChange(this.stateCurrent-1)},next(){this.hasNext()&&this.handleChange(this.stateCurrent+1)},jumpPrev(){this.handleChange(this.getJumpPrevPage())},jumpNext(){this.handleChange(this.getJumpNextPage())},hasPrev(){return this.stateCurrent>1},hasNext(){return this.stateCurrent<P(void 0,this.$data,this.$props)},getShowSizeChanger(){const{showSizeChanger:e,total:t,totalBoundaryShowSizeChanger:i}=this.$props;return typeof e<"u"?e:t>i},runIfEnter(e,t){if(e.key==="Enter"||e.charCode===13){e.preventDefault();for(var i=arguments.length,n=new Array(i>2?i-2:0),r=2;r<i;r++)n[r-2]=arguments[r];t(...n)}},runIfEnterPrev(e){this.runIfEnter(e,this.prev)},runIfEnterNext(e){this.runIfEnter(e,this.next)},runIfEnterJumpPrev(e){this.runIfEnter(e,this.jumpPrev)},runIfEnterJumpNext(e){this.runIfEnter(e,this.jumpNext)},handleGoTO(e){(e.keyCode===j.ENTER||e.type==="click")&&this.handleChange(this.stateCurrentInputValue)},renderPrev(e){const{itemRender:t}=this.$props,i=t({page:e,type:"prev",originalElement:this.getItemIcon("prevIcon","prev page")}),n=!this.hasPrev();return ne(i)?ue(i,n?{disabled:n}:{}):i},renderNext(e){const{itemRender:t}=this.$props,i=t({page:e,type:"next",originalElement:this.getItemIcon("nextIcon","next page")}),n=!this.hasNext();return ne(i)?ue(i,n?{disabled:n}:{}):i}},render(){const{prefixCls:e,disabled:t,hideOnSinglePage:i,total:n,locale:r,showQuickJumper:O,showLessItems:g,showTitle:p,showTotal:c,simple:h,itemRender:u,showPrevNextJumpers:b,jumpPrevIcon:$,jumpNextIcon:S,selectComponentClass:m,selectPrefixCls:T,pageSizeOptions:x}=this.$props,{stateCurrent:o,statePageSize:C}=this,y=xe(this.$attrs).extraAttrs,{class:z}=y,D=Le(y,["class"]);if(i===!0&&this.total<=C)return null;const d=P(void 0,this.$data,this.$props),f=[];let V=null,Y=null,Z=null,k=null,A=null;const W=O&&O.goButton,I=g?1:2,ee=o-1>0?o-1:0,te=o+1<d?o+1:d,J=this.hasPrev(),L=this.hasNext();if(h)return W&&(typeof W=="boolean"?A=a("button",{type:"button",onClick:this.handleGoTO,onKeyup:this.handleGoTO},[r.jump_to_confirm]):A=a("span",{onClick:this.handleGoTO,onKeyup:this.handleGoTO},[W]),A=a("li",{title:p?`${r.jump_to}${o}/${d}`:null,class:`${e}-simple-pager`},[A])),a("ul",N({class:v(`${e} ${e}-simple`,{[`${e}-disabled`]:t},z)},D),[a("li",{title:p?r.prev_page:null,onClick:this.prev,tabindex:J?0:null,onKeypress:this.runIfEnterPrev,class:v(`${e}-prev`,{[`${e}-disabled`]:!J}),"aria-disabled":!J},[this.renderPrev(ee)]),a("li",{title:p?`${o}/${d}`:null,class:`${e}-simple-pager`},[a(me,{type:"text",value:this.stateCurrentInputValue,disabled:t,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onInput:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"},null),a("span",{class:`${e}-slash`},[de("/")]),d]),a("li",{title:p?r.next_page:null,onClick:this.next,tabindex:L?0:null,onKeypress:this.runIfEnterNext,class:v(`${e}-next`,{[`${e}-disabled`]:!L}),"aria-disabled":!L},[this.renderNext(te)]),A]);if(d<=3+I*2){const X={locale:r,rootPrefixCls:e,showTitle:p,itemRender:u,onClick:this.handleChange,onKeypress:this.runIfEnter};d||f.push(a(E,N(N({},X),{},{key:"noPager",page:1,class:`${e}-item-disabled`}),null));for(let B=1;B<=d;B+=1){const w=o===B;f.push(a(E,N(N({},X),{},{key:B,page:B,active:w}),null))}}else{const X=g?r.prev_3:r.prev_5,B=g?r.next_3:r.next_5;b&&(V=a("li",{title:this.showTitle?X:null,key:"prev",onClick:this.jumpPrev,tabindex:"0",onKeypress:this.runIfEnterJumpPrev,class:v(`${e}-jump-prev`,{[`${e}-jump-prev-custom-icon`]:!!$})},[u({page:this.getJumpPrevPage(),type:"jump-prev",originalElement:this.getItemIcon("jumpPrevIcon","prev page")})]),Y=a("li",{title:this.showTitle?B:null,key:"next",tabindex:"0",onClick:this.jumpNext,onKeypress:this.runIfEnterJumpNext,class:v(`${e}-jump-next`,{[`${e}-jump-next-custom-icon`]:!!S})},[u({page:this.getJumpNextPage(),type:"jump-next",originalElement:this.getItemIcon("jumpNextIcon","next page")})])),k=a(E,{locale:r,last:!0,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:d,page:d,active:!1,showTitle:p,itemRender:u},null),Z=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:1,page:1,active:!1,showTitle:p,itemRender:u},null);let w=Math.max(1,o-I),_=Math.min(o+I,d);o-1<=I&&(_=1+I*2),d-o<=I&&(w=d-I*2);for(let H=w;H<=_;H+=1){const fe=o===H;f.push(a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:H,page:H,active:fe,showTitle:p,itemRender:u},null))}o-1>=I*2&&o!==3&&(f[0]=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:w,page:w,class:`${e}-item-after-jump-prev`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.unshift(V)),d-o>=I*2&&o!==d-2&&(f[f.length-1]=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:_,page:_,class:`${e}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.push(Y)),w!==1&&f.unshift(Z),_!==d&&f.push(k)}let ie=null;c&&(ie=a("li",{class:`${e}-total-text`},[c(n,[n===0?0:(o-1)*C+1,o*C>n?n:o*C])]));const U=!J||!d,q=!L||!d,he=this.buildOptionText||this.$slots.buildOptionText;return a("ul",N(N({unselectable:"on",ref:"paginationNode"},D),{},{class:v({[`${e}`]:!0,[`${e}-disabled`]:t},z)}),[ie,a("li",{title:p?r.prev_page:null,onClick:this.prev,tabindex:U?null:0,onKeypress:this.runIfEnterPrev,class:v(`${e}-prev`,{[`${e}-disabled`]:U}),"aria-disabled":U},[this.renderPrev(ee)]),f,a("li",{title:p?r.next_page:null,onClick:this.next,tabindex:q?null:0,onKeypress:this.runIfEnterNext,class:v(`${e}-next`,{[`${e}-disabled`]:q}),"aria-disabled":q},[this.renderNext(te)]),a(Je,{disabled:t,locale:r,rootPrefixCls:e,selectComponentClass:m,selectPrefixCls:T,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:o,pageSize:C,pageSizeOptions:x,buildOptionText:he||null,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:W},null)])}}),qe=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`&${t}-mini`]:{[`
|
|
1
|
+
import{o as be,x as Ce,s as pe,b as $e,d as R,c as a,r as ve,f as Q,O as de,a8 as Se}from"./vendor-M5lGV-wr.js";import{h as l,P as s,i as v,al as xe,f as N,U as ne,aj as K,ak as ye,am as Ie,l as Pe,m as Oe,r as Te,n as ze,an as re,q as Be,p as we,V as M,G as F,$ as Ne,a0 as Me,Z as Ee,ao as je,S as De}from"./index-BqCbH37-.js";import{ag as ae,b8 as oe,b9 as le,ba as se}from"./icons-CLQTHa5-.js";import{S as G,s as ge}from"./index-uvwXPlKL.js";import{u as Re}from"./responsiveObserve-B4d5HJeN.js";import{i as Ae,g as _e,h as He}from"./index-g_WPIICs.js";import{B as Ke}from"./Trigger-DKmcgMsg.js";import{B as me}from"./BaseInput-6If50B9h.js";import{c as ue}from"./vnode-DJz8D0zb.js";import{f as ce}from"./firstNotUndefined-CLFzEa0p.js";function Fe(){const e=pe({});let t=null;const i=Re();return be(()=>{t=i.value.subscribe(n=>{e.value=n})}),Ce(()=>{i.value.unsubscribe(t)}),e}function ft(e){const t=pe();return $e(()=>{t.value=e()},{flush:"sync"}),t}const Ve=R({name:"MiniSelect",compatConfig:{MODE:3},inheritAttrs:!1,props:ge(),Option:G.Option,setup(e,t){let{attrs:i,slots:n}=t;return()=>{const r=l(l(l({},e),{size:"small"}),i);return a(G,r,n)}}}),We=R({name:"MiddleSelect",inheritAttrs:!1,props:ge(),Option:G.Option,setup(e,t){let{attrs:i,slots:n}=t;return()=>{const r=l(l(l({},e),{size:"middle"}),i);return a(G,r,n)}}}),E=R({compatConfig:{MODE:3},name:"Pager",inheritAttrs:!1,props:{rootPrefixCls:String,page:Number,active:{type:Boolean,default:void 0},last:{type:Boolean,default:void 0},locale:s.object,showTitle:{type:Boolean,default:void 0},itemRender:{type:Function,default:()=>{}},onClick:{type:Function},onKeypress:{type:Function}},eimt:["click","keypress"],setup(e,t){let{emit:i,attrs:n}=t;const r=()=>{i("click",e.page)},O=g=>{i("keypress",g,r,e.page)};return()=>{const{showTitle:g,page:p,itemRender:c}=e,{class:h,style:u}=n,b=`${e.rootPrefixCls}-item`,$=v(b,`${b}-${e.page}`,{[`${b}-active`]:e.active,[`${b}-disabled`]:!e.page},h);return a("li",{onClick:r,onKeypress:O,title:g?String(p):null,tabindex:"0",class:$,style:u},[c({page:p,type:"page",originalElement:a("a",{rel:"nofollow"},[p])})])}}}),j={ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Je=R({compatConfig:{MODE:3},props:{disabled:{type:Boolean,default:void 0},changeSize:Function,quickGo:Function,selectComponentClass:s.any,current:Number,pageSizeOptions:s.array.def(["10","20","50","100"]),pageSize:Number,buildOptionText:Function,locale:s.object,rootPrefixCls:String,selectPrefixCls:String,goButton:s.any},setup(e){const t=ve(""),i=Q(()=>!t.value||isNaN(t.value)?void 0:Number(t.value)),n=c=>`${c.value} ${e.locale.items_per_page}`,r=c=>{const{value:h}=c.target;t.value!==h&&(t.value=h)},O=c=>{const{goButton:h,quickGo:u,rootPrefixCls:b}=e;if(!(h||t.value===""))if(c.relatedTarget&&(c.relatedTarget.className.indexOf(`${b}-item-link`)>=0||c.relatedTarget.className.indexOf(`${b}-item`)>=0)){t.value="";return}else u(i.value),t.value=""},g=c=>{t.value!==""&&(c.keyCode===j.ENTER||c.type==="click")&&(e.quickGo(i.value),t.value="")},p=Q(()=>{const{pageSize:c,pageSizeOptions:h}=e;return h.some(u=>u.toString()===c.toString())?h:h.concat([c.toString()]).sort((u,b)=>{const $=isNaN(Number(u))?0:Number(u),S=isNaN(Number(b))?0:Number(b);return $-S})});return()=>{const{rootPrefixCls:c,locale:h,changeSize:u,quickGo:b,goButton:$,selectComponentClass:S,selectPrefixCls:m,pageSize:T,disabled:x}=e,o=`${c}-options`;let C=null,y=null,z=null;if(!u&&!b)return null;if(u&&S){const D=e.buildOptionText||n,d=p.value.map((f,V)=>a(S.Option,{key:V,value:f},{default:()=>[D({value:f})]}));C=a(S,{disabled:x,prefixCls:m,showSearch:!1,class:`${o}-size-changer`,optionLabelProp:"children",value:(T||p.value[0]).toString(),onChange:f=>u(Number(f)),getPopupContainer:f=>f.parentNode},{default:()=>[d]})}return b&&($&&(z=typeof $=="boolean"?a("button",{type:"button",onClick:g,onKeyup:g,disabled:x,class:`${o}-quick-jumper-button`},[h.jump_to_confirm]):a("span",{onClick:g,onKeyup:g},[$])),y=a("div",{class:`${o}-quick-jumper`},[h.jump_to,a(me,{disabled:x,type:"text",value:t.value,onInput:r,onChange:r,onKeyup:g,onBlur:O},null),h.page,z])),a("li",{class:`${o}`},[C,y])}}});var Le=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i};function Xe(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Ge(e){let{originalElement:t}=e;return t}function P(e,t,i){const n=typeof e>"u"?t.statePageSize:e;return Math.floor((i.total-1)/n)+1}const Ue=R({compatConfig:{MODE:3},name:"Pagination",mixins:[Ke],inheritAttrs:!1,props:{disabled:{type:Boolean,default:void 0},prefixCls:s.string.def("rc-pagination"),selectPrefixCls:s.string.def("rc-select"),current:Number,defaultCurrent:s.number.def(1),total:s.number.def(0),pageSize:Number,defaultPageSize:s.number.def(10),hideOnSinglePage:{type:Boolean,default:!1},showSizeChanger:{type:Boolean,default:void 0},showLessItems:{type:Boolean,default:!1},selectComponentClass:s.any,showPrevNextJumpers:{type:Boolean,default:!0},showQuickJumper:s.oneOfType([s.looseBool,s.object]).def(!1),showTitle:{type:Boolean,default:!0},pageSizeOptions:s.arrayOf(s.oneOfType([s.number,s.string])),buildOptionText:Function,showTotal:Function,simple:{type:Boolean,default:void 0},locale:s.object.def(Ie),itemRender:s.func.def(Ge),prevIcon:s.any,nextIcon:s.any,jumpPrevIcon:s.any,jumpNextIcon:s.any,totalBoundaryShowSizeChanger:s.number.def(50)},data(){const e=this.$props;let t=ce([this.current,this.defaultCurrent]);const i=ce([this.pageSize,this.defaultPageSize]);return t=Math.min(t,P(i,void 0,e)),{stateCurrent:t,stateCurrentInputValue:t,statePageSize:i}},watch:{current(e){this.setState({stateCurrent:e,stateCurrentInputValue:e})},pageSize(e){const t={};let i=this.stateCurrent;const n=P(e,this.$data,this.$props);i=i>n?n:i,K(this,"current")||(t.stateCurrent=i,t.stateCurrentInputValue=i),t.statePageSize=e,this.setState(t)},stateCurrent(e,t){this.$nextTick(()=>{if(this.$refs.paginationNode){const i=this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);i&&document.activeElement===i&&i.blur()}})},total(){const e={},t=P(this.pageSize,this.$data,this.$props);if(K(this,"current")){const i=Math.min(this.current,t);e.stateCurrent=i,e.stateCurrentInputValue=i}else{let i=this.stateCurrent;i===0&&t>0?i=1:i=Math.min(this.stateCurrent,t),e.stateCurrent=i}this.setState(e)}},methods:{getJumpPrevPage(){return Math.max(1,this.stateCurrent-(this.showLessItems?3:5))},getJumpNextPage(){return Math.min(P(void 0,this.$data,this.$props),this.stateCurrent+(this.showLessItems?3:5))},getItemIcon(e,t){const{prefixCls:i}=this.$props;return ye(this,e,this.$props)||a("button",{type:"button","aria-label":t,class:`${i}-item-link`},null)},getValidValue(e){const t=e.target.value,i=P(void 0,this.$data,this.$props),{stateCurrentInputValue:n}=this.$data;let r;return t===""?r=t:isNaN(Number(t))?r=n:t>=i?r=i:r=Number(t),r},isValid(e){return Xe(e)&&e!==this.stateCurrent},shouldDisplayQuickJumper(){const{showQuickJumper:e,pageSize:t,total:i}=this.$props;return i<=t?!1:e},handleKeyDown(e){(e.keyCode===j.ARROW_UP||e.keyCode===j.ARROW_DOWN)&&e.preventDefault()},handleKeyUp(e){const t=this.getValidValue(e),i=this.stateCurrentInputValue;t!==i&&this.setState({stateCurrentInputValue:t}),e.keyCode===j.ENTER?this.handleChange(t):e.keyCode===j.ARROW_UP?this.handleChange(t-1):e.keyCode===j.ARROW_DOWN&&this.handleChange(t+1)},changePageSize(e){let t=this.stateCurrent;const i=t,n=P(e,this.$data,this.$props);t=t>n?n:t,n===0&&(t=this.stateCurrent),typeof e=="number"&&(K(this,"pageSize")||this.setState({statePageSize:e}),K(this,"current")||this.setState({stateCurrent:t,stateCurrentInputValue:t})),this.__emit("update:pageSize",e),t!==i&&this.__emit("update:current",t),this.__emit("showSizeChange",t,e),this.__emit("change",t,e)},handleChange(e){const{disabled:t}=this.$props;let i=e;if(this.isValid(i)&&!t){const n=P(void 0,this.$data,this.$props);return i>n?i=n:i<1&&(i=1),K(this,"current")||this.setState({stateCurrent:i,stateCurrentInputValue:i}),this.__emit("update:current",i),this.__emit("change",i,this.statePageSize),i}return this.stateCurrent},prev(){this.hasPrev()&&this.handleChange(this.stateCurrent-1)},next(){this.hasNext()&&this.handleChange(this.stateCurrent+1)},jumpPrev(){this.handleChange(this.getJumpPrevPage())},jumpNext(){this.handleChange(this.getJumpNextPage())},hasPrev(){return this.stateCurrent>1},hasNext(){return this.stateCurrent<P(void 0,this.$data,this.$props)},getShowSizeChanger(){const{showSizeChanger:e,total:t,totalBoundaryShowSizeChanger:i}=this.$props;return typeof e<"u"?e:t>i},runIfEnter(e,t){if(e.key==="Enter"||e.charCode===13){e.preventDefault();for(var i=arguments.length,n=new Array(i>2?i-2:0),r=2;r<i;r++)n[r-2]=arguments[r];t(...n)}},runIfEnterPrev(e){this.runIfEnter(e,this.prev)},runIfEnterNext(e){this.runIfEnter(e,this.next)},runIfEnterJumpPrev(e){this.runIfEnter(e,this.jumpPrev)},runIfEnterJumpNext(e){this.runIfEnter(e,this.jumpNext)},handleGoTO(e){(e.keyCode===j.ENTER||e.type==="click")&&this.handleChange(this.stateCurrentInputValue)},renderPrev(e){const{itemRender:t}=this.$props,i=t({page:e,type:"prev",originalElement:this.getItemIcon("prevIcon","prev page")}),n=!this.hasPrev();return ne(i)?ue(i,n?{disabled:n}:{}):i},renderNext(e){const{itemRender:t}=this.$props,i=t({page:e,type:"next",originalElement:this.getItemIcon("nextIcon","next page")}),n=!this.hasNext();return ne(i)?ue(i,n?{disabled:n}:{}):i}},render(){const{prefixCls:e,disabled:t,hideOnSinglePage:i,total:n,locale:r,showQuickJumper:O,showLessItems:g,showTitle:p,showTotal:c,simple:h,itemRender:u,showPrevNextJumpers:b,jumpPrevIcon:$,jumpNextIcon:S,selectComponentClass:m,selectPrefixCls:T,pageSizeOptions:x}=this.$props,{stateCurrent:o,statePageSize:C}=this,y=xe(this.$attrs).extraAttrs,{class:z}=y,D=Le(y,["class"]);if(i===!0&&this.total<=C)return null;const d=P(void 0,this.$data,this.$props),f=[];let V=null,Y=null,Z=null,k=null,A=null;const W=O&&O.goButton,I=g?1:2,ee=o-1>0?o-1:0,te=o+1<d?o+1:d,J=this.hasPrev(),L=this.hasNext();if(h)return W&&(typeof W=="boolean"?A=a("button",{type:"button",onClick:this.handleGoTO,onKeyup:this.handleGoTO},[r.jump_to_confirm]):A=a("span",{onClick:this.handleGoTO,onKeyup:this.handleGoTO},[W]),A=a("li",{title:p?`${r.jump_to}${o}/${d}`:null,class:`${e}-simple-pager`},[A])),a("ul",N({class:v(`${e} ${e}-simple`,{[`${e}-disabled`]:t},z)},D),[a("li",{title:p?r.prev_page:null,onClick:this.prev,tabindex:J?0:null,onKeypress:this.runIfEnterPrev,class:v(`${e}-prev`,{[`${e}-disabled`]:!J}),"aria-disabled":!J},[this.renderPrev(ee)]),a("li",{title:p?`${o}/${d}`:null,class:`${e}-simple-pager`},[a(me,{type:"text",value:this.stateCurrentInputValue,disabled:t,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onInput:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"},null),a("span",{class:`${e}-slash`},[de("/")]),d]),a("li",{title:p?r.next_page:null,onClick:this.next,tabindex:L?0:null,onKeypress:this.runIfEnterNext,class:v(`${e}-next`,{[`${e}-disabled`]:!L}),"aria-disabled":!L},[this.renderNext(te)]),A]);if(d<=3+I*2){const X={locale:r,rootPrefixCls:e,showTitle:p,itemRender:u,onClick:this.handleChange,onKeypress:this.runIfEnter};d||f.push(a(E,N(N({},X),{},{key:"noPager",page:1,class:`${e}-item-disabled`}),null));for(let B=1;B<=d;B+=1){const w=o===B;f.push(a(E,N(N({},X),{},{key:B,page:B,active:w}),null))}}else{const X=g?r.prev_3:r.prev_5,B=g?r.next_3:r.next_5;b&&(V=a("li",{title:this.showTitle?X:null,key:"prev",onClick:this.jumpPrev,tabindex:"0",onKeypress:this.runIfEnterJumpPrev,class:v(`${e}-jump-prev`,{[`${e}-jump-prev-custom-icon`]:!!$})},[u({page:this.getJumpPrevPage(),type:"jump-prev",originalElement:this.getItemIcon("jumpPrevIcon","prev page")})]),Y=a("li",{title:this.showTitle?B:null,key:"next",tabindex:"0",onClick:this.jumpNext,onKeypress:this.runIfEnterJumpNext,class:v(`${e}-jump-next`,{[`${e}-jump-next-custom-icon`]:!!S})},[u({page:this.getJumpNextPage(),type:"jump-next",originalElement:this.getItemIcon("jumpNextIcon","next page")})])),k=a(E,{locale:r,last:!0,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:d,page:d,active:!1,showTitle:p,itemRender:u},null),Z=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:1,page:1,active:!1,showTitle:p,itemRender:u},null);let w=Math.max(1,o-I),_=Math.min(o+I,d);o-1<=I&&(_=1+I*2),d-o<=I&&(w=d-I*2);for(let H=w;H<=_;H+=1){const fe=o===H;f.push(a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:H,page:H,active:fe,showTitle:p,itemRender:u},null))}o-1>=I*2&&o!==3&&(f[0]=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:w,page:w,class:`${e}-item-after-jump-prev`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.unshift(V)),d-o>=I*2&&o!==d-2&&(f[f.length-1]=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:_,page:_,class:`${e}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.push(Y)),w!==1&&f.unshift(Z),_!==d&&f.push(k)}let ie=null;c&&(ie=a("li",{class:`${e}-total-text`},[c(n,[n===0?0:(o-1)*C+1,o*C>n?n:o*C])]));const U=!J||!d,q=!L||!d,he=this.buildOptionText||this.$slots.buildOptionText;return a("ul",N(N({unselectable:"on",ref:"paginationNode"},D),{},{class:v({[`${e}`]:!0,[`${e}-disabled`]:t},z)}),[ie,a("li",{title:p?r.prev_page:null,onClick:this.prev,tabindex:U?null:0,onKeypress:this.runIfEnterPrev,class:v(`${e}-prev`,{[`${e}-disabled`]:U}),"aria-disabled":U},[this.renderPrev(ee)]),f,a("li",{title:p?r.next_page:null,onClick:this.next,tabindex:q?null:0,onKeypress:this.runIfEnterNext,class:v(`${e}-next`,{[`${e}-disabled`]:q}),"aria-disabled":q},[this.renderNext(te)]),a(Je,{disabled:t,locale:r,rootPrefixCls:e,selectComponentClass:m,selectPrefixCls:T,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:o,pageSize:C,pageSizeOptions:x,buildOptionText:he||null,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:W},null)])}}),qe=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`&${t}-mini`]:{[`
|
|
2
2
|
&:hover ${t}-item:not(${t}-item-active),
|
|
3
3
|
&:active ${t}-item:not(${t}-item-active),
|
|
4
4
|
&:hover ${t}-item-link,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{K as ye,P as h,f as $,g as be,h as i,i as U,j as Ae,k as Le,l as Re,m as Ee,r as De,n as We,o as je,p as le,q as Ve,w as _e,s as Y,t as K,v as Ge,C as Ke,x as Xe,y as Ue,z as Qe}from"./index-
|
|
1
|
+
import{K as ye,P as h,f as $,g as be,h as i,i as U,j as Ae,k as Le,l as Re,m as Ee,r as De,n as We,o as je,p as le,q as Ve,w as _e,s as Y,t as K,v as Ge,C as Ke,x as Xe,y as Ue,z as Qe}from"./index-BqCbH37-.js";import{K as se}from"./KeyCode-D63Tfrq7.js";import{o as xe}from"./omit-CLI0u4xr.js";import{p as ke}from"./pickAttrs-CsvVxvao.js";import{i as J}from"./initDefaultProps-lrtHMmWq.js";import{d as O,c as a,a4 as $e,a2 as Se,a3 as he,r as X,f as q,n as Ye,s as T,w as Z,e as qe,b as Ze,F as Je,A as ce,u as eo,j as oo}from"./vendor-M5lGV-wr.js";import{i as no,P as to,a as lo}from"./motion-Dna0fLLD.js";import{b as ao,E as io,C as ro,a as so,I as co}from"./icons-CLQTHa5-.js";import{B as de,c as uo}from"./index-BBn2bAO4.js";import{c as fo}from"./styleChecker-tL2BFwwe.js";import{i as mo}from"./zoom-BqXtO25S.js";import{A as ue}from"./ActionButton-OR0lRZdD.js";import{t as po}from"./vnode-DJz8D0zb.js";import"./raf-Deuc0E8-.js";import"./index-CH7lkYCZ.js";import"./isVisible-C7tPsqfj.js";import"./useState-CSzR8F8O.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./compact-item-DvrBqRW0.js";import"./createContext-Dh48yEoJ.js";import"./Compact-C2lhX-05.js";import"./_getTag-BVc6NQ_K.js";const go=new ye("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),Co=new ye("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),vo=function(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:n}=e,t=`${n}-fade`,l=o?"&":"";return[no(t,go,Co,e.motionDurationMid,o),{[`
|
|
2
2
|
${l}${t}-enter,
|
|
3
3
|
${l}${t}-appear
|
|
4
4
|
`]:{opacity:0,animationTimingFunction:"linear"},[`${l}${t}-leave`]:{animationTimingFunction:"linear"}}]};function ae(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:h.shape({x:Number,y:Number}).loose,title:h.any,footer:h.any,transitionName:String,maskTransitionName:String,animation:h.any,maskAnimation:h.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:h.any,maskProps:h.any,wrapProps:h.any,getContainer:h.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:h.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function fe(e,o,n){let t=o;return!t&&n&&(t=`${e}-${n}`),t}let me=-1;function yo(){return me+=1,me}function pe(e,o){let n=e[`page${o?"Y":"X"}Offset`];const t=`scroll${o?"Top":"Left"}`;if(typeof n!="number"){const l=e.document;n=l.documentElement[t],typeof n!="number"&&(n=l.body[t])}return n}function bo(e){const o=e.getBoundingClientRect(),n={left:o.left,top:o.top},t=e.ownerDocument,l=t.defaultView||t.parentWindow;return n.left+=pe(l),n.top+=pe(l,!0),n}const xo={width:0,height:0,overflow:"hidden",outline:"none"},$o={outline:"none"},So=O({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:i(i({},ae()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(e,o){let{expose:n,slots:t,attrs:l}=o;const s=X(),p=X(),g=X();n({focus:()=>{var c;(c=s.value)===null||c===void 0||c.focus({preventScroll:!0})},changeActive:c=>{const{activeElement:r}=document;c&&r===p.value?s.value.focus({preventScroll:!0}):!c&&r===s.value&&p.value.focus({preventScroll:!0})}});const S=X(),m=q(()=>{const{width:c,height:r}=e,v={};return c!==void 0&&(v.width=typeof c=="number"?`${c}px`:c),r!==void 0&&(v.height=typeof r=="number"?`${r}px`:r),S.value&&(v.transformOrigin=S.value),v}),u=()=>{Ye(()=>{if(g.value){const c=bo(g.value);S.value=e.mousePosition?`${e.mousePosition.x-c.left}px ${e.mousePosition.y-c.top}px`:""}})},d=c=>{e.onVisibleChanged(c)};return()=>{var c,r,v,y;const{prefixCls:x,footer:f=(c=t.footer)===null||c===void 0?void 0:c.call(t),title:b=(r=t.title)===null||r===void 0?void 0:r.call(t),ariaId:C,closable:w,closeIcon:B=(v=t.closeIcon)===null||v===void 0?void 0:v.call(t),onClose:F,bodyStyle:I,bodyProps:M,onMousedown:H,onMouseup:A,visible:E,modalRender:D=t.modalRender,destroyOnClose:_,motionName:N}=e;let W;f&&(W=a("div",{class:`${x}-footer`},[f]));let j;b&&(j=a("div",{class:`${x}-header`},[a("div",{class:`${x}-title`,id:C},[b])]));let L;w&&(L=a("button",{type:"button",onClick:F,"aria-label":"Close",class:`${x}-close`},[B||a("span",{class:`${x}-close-x`},null)]));const z=a("div",{class:`${x}-content`},[L,j,a("div",$({class:`${x}-body`,style:I},M),[(y=t.default)===null||y===void 0?void 0:y.call(t)]),W]),ee=be(N);return a($e,$($({},ee),{},{onBeforeEnter:u,onAfterEnter:()=>d(!0),onAfterLeave:()=>d(!1)}),{default:()=>[E||!_?Se(a("div",$($({},l),{},{ref:g,key:"dialog-element",role:"document",style:[m.value,l.style],class:[x,l.class],onMousedown:H,onMouseup:A}),[a("div",{tabindex:0,ref:s,style:$o},[D?D({originVNode:z}):z]),a("div",{tabindex:0,ref:p,style:xo},null)]),[[he,E]]):null]})}}}),ho=O({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(e,o){return()=>{const{prefixCls:n,visible:t,maskProps:l,motionName:s}=e,p=be(s);return a($e,p,{default:()=>[Se(a("div",$({class:`${n}-mask`},l),null),[[he,t]])]})}}}),ge=O({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:J(i(i({},ae()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(e,o){let{attrs:n,slots:t}=o;const l=T(),s=T(),p=T(),g=T(e.visible),S=T(`vcDialogTitle${yo()}`),m=f=>{var b,C;if(f)Ae(s.value,document.activeElement)||(l.value=document.activeElement,(b=p.value)===null||b===void 0||b.focus());else{const w=g.value;if(g.value=!1,e.mask&&l.value&&e.focusTriggerAfterClose){try{l.value.focus({preventScroll:!0})}catch{}l.value=null}w&&((C=e.afterClose)===null||C===void 0||C.call(e))}},u=f=>{var b;(b=e.onClose)===null||b===void 0||b.call(e,f)},d=T(!1),c=T(),r=()=>{clearTimeout(c.value),d.value=!0},v=()=>{c.value=setTimeout(()=>{d.value=!1})},y=f=>{if(!e.maskClosable)return null;d.value?d.value=!1:s.value===f.target&&u(f)},x=f=>{if(e.keyboard&&f.keyCode===se.ESC){f.stopPropagation(),u(f);return}e.visible&&f.keyCode===se.TAB&&p.value.changeActive(!f.shiftKey)};return Z(()=>e.visible,()=>{e.visible&&(g.value=!0)},{flush:"post"}),qe(()=>{var f;clearTimeout(c.value),(f=e.scrollLocker)===null||f===void 0||f.unLock()}),Ze(()=>{var f,b;(f=e.scrollLocker)===null||f===void 0||f.unLock(),g.value&&((b=e.scrollLocker)===null||b===void 0||b.lock())}),()=>{const{prefixCls:f,mask:b,visible:C,maskTransitionName:w,maskAnimation:B,zIndex:F,wrapClassName:I,rootClassName:M,wrapStyle:H,closable:A,maskProps:E,maskStyle:D,transitionName:_,animation:N,wrapProps:W,title:j=t.title}=e,{style:L,class:z}=n;return a("div",$({class:[`${f}-root`,M]},ke(e,{data:!0})),[a(ho,{prefixCls:f,visible:b&&C,motionName:fe(f,w,B),style:i({zIndex:F},D),maskProps:E},null),a("div",$({tabIndex:-1,onKeydown:x,class:U(`${f}-wrap`,I),ref:s,onClick:y,role:"dialog","aria-labelledby":j?S.value:null,style:i(i({zIndex:F},H),{display:g.value?null:"none"})},W),[a(So,$($({},xe(e,["scrollLocker"])),{},{style:L,class:z,onMousedown:r,onMouseup:v,ref:p,closable:A,ariaId:S.value,prefixCls:f,visible:C,onClose:u,onVisibleChanged:m,motionName:fe(f,_,N)}),t)])])}}}),wo=ae(),To=O({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:J(wo,{visible:!1}),setup(e,o){let{attrs:n,slots:t}=o;const l=X(e.visible);return Le({},{inTriggerContext:!1}),Z(()=>e.visible,()=>{e.visible&&(l.value=!0)},{flush:"post"}),()=>{const{visible:s,getContainer:p,forceRender:g,destroyOnClose:S=!1,afterClose:m}=e;let u=i(i(i({},e),n),{ref:"_component",key:"dialog"});return p===!1?a(ge,$($({},u),{},{getOpenCount:()=>2}),t):!g&&S&&!l.value?null:a(to,{autoLock:!0,visible:s,forceRender:g,getContainer:p},{default:d=>(u=i(i(i({},u),d),{afterClose:()=>{m?.(),l.value=!1}}),a(ge,u,t))})}}});function Ce(e){return{position:e,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0}}const Bo=e=>{const{componentCls:o}=e;return[{[`${o}-root`]:{[`${o}${e.antCls}-zoom-enter, ${o}${e.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${o}${e.antCls}-zoom-leave ${o}-content`]:{pointerEvents:"none"},[`${o}-mask`]:i(i({},Ce("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,[`${o}-hidden`]:{display:"none"}}),[`${o}-wrap`]:i(i({},Ce("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${o}-root`]:vo(e)}]},Po=e=>{const{componentCls:o}=e;return[{[`${o}-root`]:{[`${o}-wrap`]:{zIndex:e.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},[`${o}-wrap-rtl`]:{direction:"rtl"},[`${o}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[o]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax})`]:{[o]:{maxWidth:"calc(100vw - 16px)",margin:`${e.marginXS} auto`},[`${o}-centered`]:{[o]:{flex:1}}}}},{[o]:i(i({},De(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${e.margin*2}px)`,margin:"0 auto",paddingBottom:e.paddingLG,[`${o}-title`]:{margin:0,color:e.modalHeadingColor,fontWeight:e.fontWeightStrong,fontSize:e.modalHeaderTitleFontSize,lineHeight:e.modalHeaderTitleLineHeight,wordWrap:"break-word"},[`${o}-content`]:{position:"relative",backgroundColor:e.modalContentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadowSecondary,pointerEvents:"auto",padding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`},[`${o}-close`]:i({position:"absolute",top:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,insetInlineEnd:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,zIndex:e.zIndexPopupBase+10,padding:0,color:e.modalCloseColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalConfirmIconSize,height:e.modalConfirmIconSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"block",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:`${e.modalCloseBtnSize}px`,textAlign:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.wireframe?"transparent":e.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:e.wireframe?"transparent":e.colorFillContentHover}},We(e)),[`${o}-header`]:{color:e.colorText,background:e.modalHeaderBg,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,marginBottom:e.marginXS},[`${o}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word"},[`${o}-footer`]:{textAlign:"end",background:e.modalFooterBg,marginTop:e.marginSM,[`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:e.marginXS}},[`${o}-open`]:{overflow:"hidden"}})},{[`${o}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${o}-content,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{l as S,m as l,h as e,r as u,o as x}from"./index-
|
|
1
|
+
import{l as S,m as l,h as e,r as u,o as x}from"./index-BqCbH37-.js";import{g as m}from"./compact-item-DvrBqRW0.js";const H=r=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:r,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),p=r=>({borderColor:r.inputBorderHoverColor,borderInlineEndWidth:r.lineWidth}),c=r=>({borderColor:r.inputBorderHoverColor,boxShadow:`0 0 0 ${r.controlOutlineWidth}px ${r.controlOutline}`,borderInlineEndWidth:r.lineWidth,outline:0}),R=r=>({color:r.colorTextDisabled,backgroundColor:r.colorBgContainerDisabled,borderColor:r.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":e({},p(l(r,{inputBorderHoverColor:r.colorBorder})))}),h=r=>{const{inputPaddingVerticalLG:i,fontSizeLG:o,lineHeightLG:t,borderRadiusLG:d,inputPaddingHorizontalLG:n}=r;return{padding:`${i}px ${n}px`,fontSize:o,lineHeight:t,borderRadius:d}},g=r=>({padding:`${r.inputPaddingVerticalSM}px ${r.controlPaddingHorizontalSM-1}px`,borderRadius:r.borderRadiusSM}),$=(r,i)=>{const{componentCls:o,colorError:t,colorWarning:d,colorErrorOutline:n,colorWarningOutline:a,colorErrorBorderHover:s,colorWarningBorderHover:f}=r;return{[`&-status-error:not(${i}-disabled):not(${i}-borderless)${i}`]:{borderColor:t,"&:hover":{borderColor:s},"&:focus, &-focused":e({},c(l(r,{inputBorderActiveColor:t,inputBorderHoverColor:t,controlOutline:n}))),[`${o}-prefix`]:{color:t}},[`&-status-warning:not(${i}-disabled):not(${i}-borderless)${i}`]:{borderColor:d,"&:hover":{borderColor:f},"&:focus, &-focused":e({},c(l(r,{inputBorderActiveColor:d,inputBorderHoverColor:d,controlOutline:a}))),[`${o}-prefix`]:{color:d}}}},b=r=>e(e({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${r.inputPaddingVertical}px ${r.inputPaddingHorizontal}px`,color:r.colorText,fontSize:r.fontSize,lineHeight:r.lineHeight,backgroundColor:r.colorBgContainer,backgroundImage:"none",borderWidth:r.lineWidth,borderStyle:r.lineType,borderColor:r.colorBorder,borderRadius:r.borderRadius,transition:`all ${r.motionDurationMid}`},H(r.colorTextPlaceholder)),{"&:hover":e({},p(r)),"&:focus, &-focused":e({},c(r)),"&-disabled, &[disabled]":e({},R(r)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:r.controlHeight,lineHeight:r.lineHeight,verticalAlign:"bottom",transition:`all ${r.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":e({},h(r)),"&-sm":e({},g(r)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),I=r=>{const{componentCls:i,antCls:o}=r;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:r.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${i}, &-lg > ${i}-group-addon`]:e({},h(r)),[`&-sm ${i}, &-sm > ${i}-group-addon`]:e({},g(r)),[`> ${i}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${i}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${r.inputPaddingHorizontal}px`,color:r.colorText,fontWeight:"normal",fontSize:r.fontSize,textAlign:"center",backgroundColor:r.colorFillAlter,border:`${r.lineWidth}px ${r.lineType} ${r.colorBorder}`,borderRadius:r.borderRadius,transition:`all ${r.motionDurationSlow}`,lineHeight:1,[`${o}-select`]:{margin:`-${r.inputPaddingVertical+1}px -${r.inputPaddingHorizontal}px`,[`&${o}-select-single:not(${o}-select-customize-input)`]:{[`${o}-select-selector`]:{backgroundColor:"inherit",border:`${r.lineWidth}px ${r.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${o}-select-selector`]:{color:r.colorPrimary}}},[`${o}-cascader-picker`]:{margin:`-9px -${r.inputPaddingHorizontal}px`,backgroundColor:"transparent",[`${o}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${i}`]:{float:"inline-start",width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${i}-search-with-button &`]:{zIndex:0}}},[`> ${i}:first-child, ${i}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${o}-select ${o}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${i}-affix-wrapper`]:{[`&:not(:first-child) ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${i}:last-child, ${i}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${o}-select ${o}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${i}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${i}-search &`]:{borderStartStartRadius:r.borderRadius,borderEndStartRadius:r.borderRadius}},[`&:not(:first-child), ${i}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${i}-group-compact`]:e(e({display:"block"},x()),{[`${i}-group-addon, ${i}-group-wrap, > ${i}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:r.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`& > ${i}-affix-wrapper`]:{display:"inline-flex"},[`& > ${o}-picker-range`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-r.lineWidth,borderInlineEndWidth:r.lineWidth},[`${i}`]:{float:"none"},[`& > ${o}-select > ${o}-select-selector,
|
|
2
2
|
& > ${o}-select-auto-complete ${i},
|
|
3
3
|
& > ${o}-cascader-picker ${i},
|
|
4
4
|
& > ${i}-group-wrapper ${i}`]:{borderInlineEndWidth:r.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${o}-select-focused`]:{zIndex:1},[`& > ${o}-select > ${o}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as S,P as R,f as k,i as ue,U as Qe,J as Tt,A as vn,r as Je,X as Ye,m as be,af as Mt,l as gn,q as hn,L as bn,as as Sn,V as yn,$ as Te,G as wn,a0 as vt,s as In,at as Cn}from"./index-B_juAGfN.js";import{T as xn}from"./Trigger-HxLdC9ne.js";import{d as fe,c as T,f as V,r as me,k as $n,a5 as Et,i as Ne,b as Ce,o as Se,w as ne,O as Xe,F as Ee,s as X,e as Pe,p as Ze,j as On,a as xe,t as Tn,x as Mn,n as Me,q as En,z as ke,a8 as ge}from"./vendor-M5lGV-wr.js";import{K as _}from"./KeyCode-D63Tfrq7.js";import{c as Ft}from"./vnode-CDF4X084.js";import{B as Fn}from"./BaseInput-DMtM90I4.js";import{p as et}from"./pickAttrs-D6PQbWuo.js";import{O as Pn}from"./Overflow-9VpUiyX3.js";import{i as Rn}from"./isMobile--2fOlCHx.js";import{i as tt}from"./initDefaultProps-DE_gVS_i.js";import{R as Dn}from"./index-DRNxWV3i.js";import{w as ve}from"./raf-Deuc0E8-.js";import{s as he}from"./motion-BiRUGscQ.js";import{o as Le}from"./omit-DBh74Ui4.js";import{u as gt}from"./useMergedState-O7QXt4P5.js";import{u as ht}from"./useState-CSzR8F8O.js";import{C as Vn,L as Hn,ah as Nn,b as Ln,t as Bn,af as _n}from"./icons-BFHq5fEF.js";import{a as An,F as zn}from"./FormItemContext-BTuMR6zf.js";import{g as Wn,a as Kn}from"./statusUtils-Cf6eRpR7.js";import{u as jn}from"./Compact-DDeBOvFc.js";import{i as bt}from"./move-DMEzVMJZ.js";import{s as Un,a as Gn,b as Yn,c as Xn,i as St}from"./slide-zGdjevxe.js";import{g as qn}from"./compact-item-BjZyyKpa.js";function yt(e,t){const{key:o}=e;let n;return"value"in e&&({value:n}=e),o??(n!==void 0?n:`rc-index-key-${t}`)}function Pt(e,t){const{label:o,value:n,options:l}=e||{};return{label:o||(t?"children":"label"),value:n||"value",options:l||"options"}}function Qn(e){let{fieldNames:t,childrenAsData:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=[],{label:l,value:i,options:d}=Pt(t,!1);function a(f,s){f.forEach(r=>{const v=r[l];if(s||!(d in r)){const b=r[i];n.push({key:yt(r,n.length),groupOption:s,data:r,label:v,value:b})}else{let b=v;b===void 0&&o&&(b=r.label),n.push({key:yt(r,n.length),group:!0,data:r,label:b}),a(r[d],!0)}})}return a(e,!1),n}function qe(e){const t=S({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return t}}),t}function Jn(e,t){if(!t||!t.length)return null;let o=!1;function n(i,d){let[a,...f]=d;if(!a)return[i];const s=i.split(a);return o=o||s.length>1,s.reduce((r,v)=>[...r,...n(v,f)],[]).filter(r=>r)}const l=n(e,t);return o?l:null}var Zn=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const kn=e=>{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},eo=fe({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:R.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:R.oneOfType([Number,Boolean]).def(!0),popupElement:R.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(e,t){let{slots:o,attrs:n,expose:l}=t;const i=V(()=>{const{dropdownMatchSelectWidth:a}=e;return kn(a)}),d=me();return l({getPopupElement:()=>d.value}),()=>{const a=S(S({},e),n),{empty:f=!1}=a,s=Zn(a,["empty"]),{visible:r,dropdownAlign:v,prefixCls:b,popupElement:$,dropdownClassName:h,dropdownStyle:y,direction:w="ltr",placement:C,dropdownMatchSelectWidth:D,containerWidth:N,dropdownRender:E,animation:g,transitionName:P,getPopupContainer:x,getTriggerDOMNode:F,onPopupVisibleChange:L,onPopupMouseEnter:A,onPopupFocusin:B,onPopupFocusout:U}=s,Y=`${b}-dropdown`;let W=$;E&&(W=E({menuNode:$,props:e}));const G=g?`${Y}-${g}`:P,z=S({minWidth:`${N}px`},y);return typeof D=="number"?z.width=`${D}px`:D&&(z.width=`${N}px`),T(xn,k(k({},e),{},{showAction:L?["click"]:[],hideAction:L?["click"]:[],popupPlacement:C||(w==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:i.value,prefixCls:Y,popupTransitionName:G,popupAlign:v,popupVisible:r,getPopupContainer:x,popupClassName:ue(h,{[`${Y}-empty`]:f}),popupStyle:z,getTriggerDOMNode:F,onPopupVisibleChange:L}),{default:o.default,popup:()=>T("div",{ref:d,onMouseenter:A,onFocusin:B,onFocusout:U},[W])})}}}),we=(e,t)=>{let{slots:o}=t;var n;const{class:l,customizeIcon:i,customizeIconProps:d,onMousedown:a,onClick:f}=e;let s;return typeof i=="function"?s=i(d):s=$n(i)?Et(i):i,T("span",{class:l,onMousedown:r=>{r.preventDefault(),a&&a(r)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:f,"aria-hidden":!0},[s!==void 0?s:T("span",{class:l.split(/\s+/).map(r=>`${r}-icon`)},[(n=o.default)===null||n===void 0?void 0:n.call(o)])])};we.inheritAttrs=!1;we.displayName="TransBtn";we.props={class:String,customizeIcon:R.any,customizeIconProps:R.any,onMousedown:Function,onClick:Function};const to={inputRef:R.any,prefixCls:String,id:String,inputElement:R.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:R.oneOfType([R.number,R.string]),attrs:R.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},Rt=fe({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:to,setup(e){let t=null;const o=Ne("VCSelectContainerEvent");return()=>{var n;const{prefixCls:l,id:i,inputElement:d,disabled:a,tabindex:f,autofocus:s,autocomplete:r,editable:v,activeDescendantId:b,value:$,onKeydown:h,onMousedown:y,onChange:w,onPaste:C,onCompositionstart:D,onCompositionend:N,onFocus:E,onBlur:g,open:P,inputRef:x,attrs:F}=e;let L=d||T(Fn,null,null);const A=L.props||{},{onKeydown:B,onInput:U,onFocus:Y,onBlur:W,onMousedown:G,onCompositionstart:z,onCompositionend:oe,style:ie}=A;return L=Ft(L,S(S(S(S(S({type:"search"},A),{id:i,ref:x,disabled:a,tabindex:f,lazy:!1,autocomplete:r||"off",autofocus:s,class:ue(`${l}-selection-search-input`,(n=L?.props)===null||n===void 0?void 0:n.class),role:"combobox","aria-expanded":P,"aria-haspopup":"listbox","aria-owns":`${i}_list`,"aria-autocomplete":"list","aria-controls":`${i}_list`,"aria-activedescendant":b}),F),{value:v?$:"",readonly:!v,unselectable:v?null:"on",style:S(S({},ie),{opacity:v?null:0}),onKeydown:p=>{h(p),B&&B(p)},onMousedown:p=>{y(p),G&&G(p)},onInput:p=>{w(p),U&&U(p)},onCompositionstart(p){D(p),z&&z(p)},onCompositionend(p){N(p),oe&&oe(p)},onPaste:C,onFocus:function(){clearTimeout(t),Y&&Y(arguments.length<=0?void 0:arguments[0]),E&&E(arguments.length<=0?void 0:arguments[0]),o?.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var p=arguments.length,H=new Array(p),O=0;O<p;O++)H[O]=arguments[O];t=setTimeout(()=>{W&&W(H[0]),g&&g(H[0]),o?.blur(H[0])},100)}}),L.type==="textarea"?{}:{type:"search"}),!0,!0),L}}}),no=Symbol("TreeSelectLegacyContextPropsKey");function nt(){return Ne(no,{})}const oo={id:String,prefixCls:String,values:R.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:R.any,placeholder:R.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:R.oneOfType([R.number,R.string]),compositionStatus:Boolean,removeIcon:R.any,choiceTransitionName:String,maxTagCount:R.oneOfType([R.number,R.string]),maxTagTextLength:Number,maxTagPlaceholder:R.any.def(()=>e=>`+ ${e.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},wt=e=>{e.preventDefault(),e.stopPropagation()},lo=fe({name:"MultipleSelectSelector",inheritAttrs:!1,props:oo,setup(e){const t=X(),o=X(0),n=X(!1),l=nt(),i=V(()=>`${e.prefixCls}-selection`),d=V(()=>e.open||e.mode==="tags"?e.searchValue:""),a=V(()=>e.mode==="tags"||e.showSearch&&(e.open||n.value)),f=me("");Ce(()=>{f.value=d.value}),Se(()=>{ne(f,()=>{o.value=t.value.scrollWidth},{flush:"post",immediate:!0})});function s(h,y,w,C,D){return T("span",{class:ue(`${i.value}-item`,{[`${i.value}-item-disabled`]:w}),title:typeof h=="string"||typeof h=="number"?h.toString():void 0},[T("span",{class:`${i.value}-item-content`},[y]),C&&T(we,{class:`${i.value}-item-remove`,onMousedown:wt,onClick:D,customizeIcon:e.removeIcon},{default:()=>[Xe("×")]})])}function r(h,y,w,C,D,N){var E;const g=x=>{wt(x),e.onToggleOpen(!open)};let P=N;return l.keyEntities&&(P=((E=l.keyEntities[h])===null||E===void 0?void 0:E.node)||{}),T("span",{key:h,onMousedown:g},[e.tagRender({label:y,value:h,disabled:w,closable:C,onClose:D,option:P})])}function v(h){const{disabled:y,label:w,value:C,option:D}=h,N=!e.disabled&&!y;let E=w;if(typeof e.maxTagTextLength=="number"&&(typeof w=="string"||typeof w=="number")){const P=String(E);P.length>e.maxTagTextLength&&(E=`${P.slice(0,e.maxTagTextLength)}...`)}const g=P=>{var x;P&&P.stopPropagation(),(x=e.onRemove)===null||x===void 0||x.call(e,h)};return typeof e.tagRender=="function"?r(C,E,y,N,g,D):s(w,E,y,N,g)}function b(h){const{maxTagPlaceholder:y=C=>`+ ${C.length} ...`}=e,w=typeof y=="function"?y(h):y;return s(w,w,!1)}const $=h=>{const y=h.target.composing;f.value=h.target.value,y||e.onInputChange(h)};return()=>{const{id:h,prefixCls:y,values:w,open:C,inputRef:D,placeholder:N,disabled:E,autofocus:g,autocomplete:P,activeDescendantId:x,tabindex:F,compositionStatus:L,onInputPaste:A,onInputKeyDown:B,onInputMouseDown:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=T("div",{class:`${i.value}-search`,style:{width:o.value+"px"},key:"input"},[T(Rt,{inputRef:D,open:C,prefixCls:y,id:h,inputElement:null,disabled:E,autofocus:g,autocomplete:P,editable:a.value,activeDescendantId:x,value:f.value,onKeydown:B,onMousedown:U,onChange:$,onPaste:A,onCompositionstart:Y,onCompositionend:W,tabindex:F,attrs:et(e,!0),onFocus:()=>n.value=!0,onBlur:()=>n.value=!1},null),T("span",{ref:t,class:`${i.value}-search-mirror`,"aria-hidden":!0},[f.value,Xe(" ")])]),z=T(Pn,{prefixCls:`${i.value}-overflow`,data:w,renderItem:v,renderRest:b,suffix:G,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return T(Ee,null,[z,!w.length&&!d.value&&!L&&T("span",{class:`${i.value}-placeholder`},[N])])}}}),io={inputElement:R.any,id:String,prefixCls:String,values:R.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:R.any,placeholder:R.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:R.oneOfType([R.number,R.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},ot=fe({name:"SingleSelector",setup(e){const t=X(!1),o=V(()=>e.mode==="combobox"),n=V(()=>o.value||e.showSearch),l=V(()=>{let r=e.searchValue||"";return o.value&&e.activeValue&&!t.value&&(r=e.activeValue),r}),i=nt();ne([o,()=>e.activeValue],()=>{o.value&&(t.value=!1)},{immediate:!0});const d=V(()=>e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!l.value||e.compositionStatus),a=V(()=>{const r=e.values[0];return r&&(typeof r.label=="string"||typeof r.label=="number")?r.label.toString():void 0}),f=()=>{if(e.values[0])return null;const r=d.value?{visibility:"hidden"}:void 0;return T("span",{class:`${e.prefixCls}-selection-placeholder`,style:r},[e.placeholder])},s=r=>{r.target.composing||(t.value=!0,e.onInputChange(r))};return()=>{var r,v,b,$;const{inputElement:h,prefixCls:y,id:w,values:C,inputRef:D,disabled:N,autofocus:E,autocomplete:g,activeDescendantId:P,open:x,tabindex:F,optionLabelRender:L,onInputKeyDown:A,onInputMouseDown:B,onInputPaste:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=C[0];let z=null;if(G&&i.customSlots){const oe=(r=G.key)!==null&&r!==void 0?r:G.value,ie=((v=i.keyEntities[oe])===null||v===void 0?void 0:v.node)||{};z=i.customSlots[(b=ie.slots)===null||b===void 0?void 0:b.title]||i.customSlots.title||G.label,typeof z=="function"&&(z=z(ie))}else z=L&&G?L(G.option):G?.label;return T(Ee,null,[T("span",{class:`${y}-selection-search`},[T(Rt,{inputRef:D,prefixCls:y,id:w,open:x,inputElement:h,disabled:N,autofocus:E,autocomplete:g,editable:n.value,activeDescendantId:P,value:l.value,onKeydown:A,onMousedown:B,onChange:s,onPaste:U,onCompositionstart:Y,onCompositionend:W,tabindex:F,attrs:et(e,!0)},null)]),!o.value&&G&&!d.value&&T("span",{class:`${y}-selection-item`,title:a.value},[T(Ee,{key:($=G.key)!==null&&$!==void 0?$:G.value},[z])]),f()])}}});ot.props=io;ot.inheritAttrs=!1;function ao(e){return![_.ESC,_.SHIFT,_.BACKSPACE,_.TAB,_.WIN_KEY,_.ALT,_.META,_.WIN_KEY_RIGHT,_.CTRL,_.SEMICOLON,_.EQUALS,_.CAPS_LOCK,_.CONTEXT_MENU,_.F1,_.F2,_.F3,_.F4,_.F5,_.F6,_.F7,_.F8,_.F9,_.F10,_.F11,_.F12].includes(e)}function Dt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=null,o;Pe(()=>{clearTimeout(o)});function n(l){(l||t===null)&&(t=l),clearTimeout(o),o=setTimeout(()=>{t=null},e)}return[()=>t,n]}function Fe(){const e=t=>{e.current=t};return e}const ro=fe({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:R.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:R.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:R.oneOfType([R.number,R.string]),disabled:{type:Boolean,default:void 0},placeholder:R.any,removeIcon:R.any,maxTagCount:R.oneOfType([R.number,R.string]),maxTagTextLength:Number,maxTagPlaceholder:R.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(e,t){let{expose:o}=t;const n=Fe(),l=me(!1),[i,d]=Dt(0),a=C=>{const{which:D}=C;(D===_.UP||D===_.DOWN)&&C.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(C),D===_.ENTER&&e.mode==="tags"&&!l.value&&!e.open&&e.onSearchSubmit(C.target.value),ao(D)&&e.onToggleOpen(!0)},f=()=>{d(!0)};let s=null;const r=C=>{e.onSearch(C,!0,l.value)!==!1&&e.onToggleOpen(!0)},v=()=>{l.value=!0},b=C=>{l.value=!1,e.mode!=="combobox"&&r(C.target.value)},$=C=>{let{target:{value:D}}=C;if(e.tokenWithEnter&&s&&/[\r\n]/.test(s)){const N=s.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");D=D.replace(N,s)}s=null,r(D)},h=C=>{const{clipboardData:D}=C;s=D.getData("text")},y=C=>{let{target:D}=C;D!==n.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{n.current.focus()}):n.current.focus())},w=C=>{const D=i();C.target!==n.current&&!D&&C.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!D)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return o({focus:()=>{n.current.focus()},blur:()=>{n.current.blur()}}),()=>{const{prefixCls:C,domRef:D,mode:N}=e,E={inputRef:n,onInputKeyDown:a,onInputMouseDown:f,onInputChange:$,onInputPaste:h,compositionStatus:l.value,onInputCompositionStart:v,onInputCompositionEnd:b},g=N==="multiple"||N==="tags"?T(lo,k(k({},e),E),null):T(ot,k(k({},e),E),null);return T("div",{ref:D,class:`${C}-selector`,onClick:y,onMousedown:w},[g])}}});function so(e,t,o){function n(l){var i,d,a;let f=l.target;f.shadowRoot&&l.composed&&(f=l.composedPath()[0]||f);const s=[(i=e[0])===null||i===void 0?void 0:i.value,(a=(d=e[1])===null||d===void 0?void 0:d.value)===null||a===void 0?void 0:a.getPopupElement()];t.value&&s.every(r=>r&&!r.contains(f)&&r!==f)&&o(!1)}Se(()=>{window.addEventListener("mousedown",n)}),Pe(()=>{window.removeEventListener("mousedown",n)})}function uo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const t=X(!1);let o;const n=()=>{clearTimeout(o)};return Se(()=>{n()}),[t,(i,d)=>{n(),o=setTimeout(()=>{t.value=i,d&&d()},e)},n]}const Vt=Symbol("BaseSelectContextKey");function co(e){return Ze(Vt,e)}function fo(){return Ne(Vt,{})}function Ht(e){if(!On(e))return xe(e);const t=new Proxy({},{get(o,n,l){return Reflect.get(e.value,n,l)},set(o,n,l){return e.value[n]=l,!0},deleteProperty(o,n){return Reflect.deleteProperty(e.value,n)},has(o,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return xe(t)}var po=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const mo=["value","onChange","removeIcon","placeholder","autofocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabindex","OptionList","notFoundContent"],vo=()=>({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:R.any,emptyOptions:Boolean}),Nt=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:R.any,placeholder:R.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:R.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:R.any,clearIcon:R.any,removeIcon:R.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),go=()=>S(S({},vo()),Nt());function Lt(e){return e==="tags"||e==="multiple"}const ho=fe({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:tt(go(),{showAction:[],notFoundContent:"Not Found"}),setup(e,t){let{attrs:o,expose:n,slots:l}=t;const i=V(()=>Lt(e.mode)),d=V(()=>e.showSearch!==void 0?e.showSearch:i.value||e.mode==="combobox"),a=X(!1);Se(()=>{a.value=Rn()});const f=nt(),s=X(null),r=Fe(),v=X(null),b=X(null),$=X(null),h=me(!1),[y,w,C]=uo();n({focus:()=>{var u;(u=b.value)===null||u===void 0||u.focus()},blur:()=>{var u;(u=b.value)===null||u===void 0||u.blur()},scrollTo:u=>{var c;return(c=$.value)===null||c===void 0?void 0:c.scrollTo(u)}});const E=V(()=>{var u;if(e.mode!=="combobox")return e.searchValue;const c=(u=e.displayValues[0])===null||u===void 0?void 0:u.value;return typeof c=="string"||typeof c=="number"?String(c):""}),g=e.open!==void 0?e.open:e.defaultOpen,P=X(g),x=X(g),F=u=>{P.value=e.open!==void 0?e.open:u,x.value=P.value};ne(()=>e.open,()=>{F(e.open)});const L=V(()=>!e.notFoundContent&&e.emptyOptions);Ce(()=>{x.value=P.value,(e.disabled||L.value&&x.value&&e.mode==="combobox")&&(x.value=!1)});const A=V(()=>L.value?!1:x.value),B=u=>{const c=u!==void 0?u:!x.value;x.value!==c&&!e.disabled&&(F(c),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(c),!c&&K.value&&(K.value=!1,w(!1,()=>{H.value=!1,h.value=!1})))},U=V(()=>(e.tokenSeparators||[]).some(u=>[`
|
|
1
|
+
import{h as S,P as R,f as k,i as ue,U as Qe,J as Tt,A as vn,r as Je,X as Ye,m as be,af as Mt,l as gn,q as hn,L as bn,as as Sn,V as yn,$ as Te,G as wn,a0 as vt,s as In,at as Cn}from"./index-BqCbH37-.js";import{T as xn}from"./Trigger-DKmcgMsg.js";import{d as fe,c as T,f as V,r as me,k as $n,a5 as Et,i as Ne,b as Ce,o as Se,w as ne,O as Xe,F as Ee,s as X,e as Pe,p as Ze,j as On,a as xe,t as Tn,x as Mn,n as Me,q as En,z as ke,a8 as ge}from"./vendor-M5lGV-wr.js";import{K as _}from"./KeyCode-D63Tfrq7.js";import{c as Ft}from"./vnode-DJz8D0zb.js";import{B as Fn}from"./BaseInput-6If50B9h.js";import{p as et}from"./pickAttrs-CsvVxvao.js";import{O as Pn}from"./Overflow-C2_V35KO.js";import{i as Rn}from"./isMobile--2fOlCHx.js";import{i as tt}from"./initDefaultProps-lrtHMmWq.js";import{R as Dn}from"./index-BgKxsNPN.js";import{w as ve}from"./raf-Deuc0E8-.js";import{s as he}from"./motion-Dna0fLLD.js";import{o as Le}from"./omit-CLI0u4xr.js";import{u as gt}from"./useMergedState-O7QXt4P5.js";import{u as ht}from"./useState-CSzR8F8O.js";import{C as Vn,L as Hn,ah as Nn,b as Ln,t as Bn,af as _n}from"./icons-CLQTHa5-.js";import{a as An,F as zn}from"./FormItemContext-BDiTma_8.js";import{g as Wn,a as Kn}from"./statusUtils-BkcOP5ZQ.js";import{u as jn}from"./Compact-C2lhX-05.js";import{i as bt}from"./move-B77ZnXvW.js";import{s as Un,a as Gn,b as Yn,c as Xn,i as St}from"./slide-DmExRlkt.js";import{g as qn}from"./compact-item-DvrBqRW0.js";function yt(e,t){const{key:o}=e;let n;return"value"in e&&({value:n}=e),o??(n!==void 0?n:`rc-index-key-${t}`)}function Pt(e,t){const{label:o,value:n,options:l}=e||{};return{label:o||(t?"children":"label"),value:n||"value",options:l||"options"}}function Qn(e){let{fieldNames:t,childrenAsData:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=[],{label:l,value:i,options:d}=Pt(t,!1);function a(f,s){f.forEach(r=>{const v=r[l];if(s||!(d in r)){const b=r[i];n.push({key:yt(r,n.length),groupOption:s,data:r,label:v,value:b})}else{let b=v;b===void 0&&o&&(b=r.label),n.push({key:yt(r,n.length),group:!0,data:r,label:b}),a(r[d],!0)}})}return a(e,!1),n}function qe(e){const t=S({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return t}}),t}function Jn(e,t){if(!t||!t.length)return null;let o=!1;function n(i,d){let[a,...f]=d;if(!a)return[i];const s=i.split(a);return o=o||s.length>1,s.reduce((r,v)=>[...r,...n(v,f)],[]).filter(r=>r)}const l=n(e,t);return o?l:null}var Zn=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const kn=e=>{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},eo=fe({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:R.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:R.oneOfType([Number,Boolean]).def(!0),popupElement:R.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(e,t){let{slots:o,attrs:n,expose:l}=t;const i=V(()=>{const{dropdownMatchSelectWidth:a}=e;return kn(a)}),d=me();return l({getPopupElement:()=>d.value}),()=>{const a=S(S({},e),n),{empty:f=!1}=a,s=Zn(a,["empty"]),{visible:r,dropdownAlign:v,prefixCls:b,popupElement:$,dropdownClassName:h,dropdownStyle:y,direction:w="ltr",placement:C,dropdownMatchSelectWidth:D,containerWidth:N,dropdownRender:E,animation:g,transitionName:P,getPopupContainer:x,getTriggerDOMNode:F,onPopupVisibleChange:L,onPopupMouseEnter:A,onPopupFocusin:B,onPopupFocusout:U}=s,Y=`${b}-dropdown`;let W=$;E&&(W=E({menuNode:$,props:e}));const G=g?`${Y}-${g}`:P,z=S({minWidth:`${N}px`},y);return typeof D=="number"?z.width=`${D}px`:D&&(z.width=`${N}px`),T(xn,k(k({},e),{},{showAction:L?["click"]:[],hideAction:L?["click"]:[],popupPlacement:C||(w==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:i.value,prefixCls:Y,popupTransitionName:G,popupAlign:v,popupVisible:r,getPopupContainer:x,popupClassName:ue(h,{[`${Y}-empty`]:f}),popupStyle:z,getTriggerDOMNode:F,onPopupVisibleChange:L}),{default:o.default,popup:()=>T("div",{ref:d,onMouseenter:A,onFocusin:B,onFocusout:U},[W])})}}}),we=(e,t)=>{let{slots:o}=t;var n;const{class:l,customizeIcon:i,customizeIconProps:d,onMousedown:a,onClick:f}=e;let s;return typeof i=="function"?s=i(d):s=$n(i)?Et(i):i,T("span",{class:l,onMousedown:r=>{r.preventDefault(),a&&a(r)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:f,"aria-hidden":!0},[s!==void 0?s:T("span",{class:l.split(/\s+/).map(r=>`${r}-icon`)},[(n=o.default)===null||n===void 0?void 0:n.call(o)])])};we.inheritAttrs=!1;we.displayName="TransBtn";we.props={class:String,customizeIcon:R.any,customizeIconProps:R.any,onMousedown:Function,onClick:Function};const to={inputRef:R.any,prefixCls:String,id:String,inputElement:R.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:R.oneOfType([R.number,R.string]),attrs:R.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},Rt=fe({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:to,setup(e){let t=null;const o=Ne("VCSelectContainerEvent");return()=>{var n;const{prefixCls:l,id:i,inputElement:d,disabled:a,tabindex:f,autofocus:s,autocomplete:r,editable:v,activeDescendantId:b,value:$,onKeydown:h,onMousedown:y,onChange:w,onPaste:C,onCompositionstart:D,onCompositionend:N,onFocus:E,onBlur:g,open:P,inputRef:x,attrs:F}=e;let L=d||T(Fn,null,null);const A=L.props||{},{onKeydown:B,onInput:U,onFocus:Y,onBlur:W,onMousedown:G,onCompositionstart:z,onCompositionend:oe,style:ie}=A;return L=Ft(L,S(S(S(S(S({type:"search"},A),{id:i,ref:x,disabled:a,tabindex:f,lazy:!1,autocomplete:r||"off",autofocus:s,class:ue(`${l}-selection-search-input`,(n=L?.props)===null||n===void 0?void 0:n.class),role:"combobox","aria-expanded":P,"aria-haspopup":"listbox","aria-owns":`${i}_list`,"aria-autocomplete":"list","aria-controls":`${i}_list`,"aria-activedescendant":b}),F),{value:v?$:"",readonly:!v,unselectable:v?null:"on",style:S(S({},ie),{opacity:v?null:0}),onKeydown:p=>{h(p),B&&B(p)},onMousedown:p=>{y(p),G&&G(p)},onInput:p=>{w(p),U&&U(p)},onCompositionstart(p){D(p),z&&z(p)},onCompositionend(p){N(p),oe&&oe(p)},onPaste:C,onFocus:function(){clearTimeout(t),Y&&Y(arguments.length<=0?void 0:arguments[0]),E&&E(arguments.length<=0?void 0:arguments[0]),o?.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var p=arguments.length,H=new Array(p),O=0;O<p;O++)H[O]=arguments[O];t=setTimeout(()=>{W&&W(H[0]),g&&g(H[0]),o?.blur(H[0])},100)}}),L.type==="textarea"?{}:{type:"search"}),!0,!0),L}}}),no=Symbol("TreeSelectLegacyContextPropsKey");function nt(){return Ne(no,{})}const oo={id:String,prefixCls:String,values:R.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:R.any,placeholder:R.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:R.oneOfType([R.number,R.string]),compositionStatus:Boolean,removeIcon:R.any,choiceTransitionName:String,maxTagCount:R.oneOfType([R.number,R.string]),maxTagTextLength:Number,maxTagPlaceholder:R.any.def(()=>e=>`+ ${e.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},wt=e=>{e.preventDefault(),e.stopPropagation()},lo=fe({name:"MultipleSelectSelector",inheritAttrs:!1,props:oo,setup(e){const t=X(),o=X(0),n=X(!1),l=nt(),i=V(()=>`${e.prefixCls}-selection`),d=V(()=>e.open||e.mode==="tags"?e.searchValue:""),a=V(()=>e.mode==="tags"||e.showSearch&&(e.open||n.value)),f=me("");Ce(()=>{f.value=d.value}),Se(()=>{ne(f,()=>{o.value=t.value.scrollWidth},{flush:"post",immediate:!0})});function s(h,y,w,C,D){return T("span",{class:ue(`${i.value}-item`,{[`${i.value}-item-disabled`]:w}),title:typeof h=="string"||typeof h=="number"?h.toString():void 0},[T("span",{class:`${i.value}-item-content`},[y]),C&&T(we,{class:`${i.value}-item-remove`,onMousedown:wt,onClick:D,customizeIcon:e.removeIcon},{default:()=>[Xe("×")]})])}function r(h,y,w,C,D,N){var E;const g=x=>{wt(x),e.onToggleOpen(!open)};let P=N;return l.keyEntities&&(P=((E=l.keyEntities[h])===null||E===void 0?void 0:E.node)||{}),T("span",{key:h,onMousedown:g},[e.tagRender({label:y,value:h,disabled:w,closable:C,onClose:D,option:P})])}function v(h){const{disabled:y,label:w,value:C,option:D}=h,N=!e.disabled&&!y;let E=w;if(typeof e.maxTagTextLength=="number"&&(typeof w=="string"||typeof w=="number")){const P=String(E);P.length>e.maxTagTextLength&&(E=`${P.slice(0,e.maxTagTextLength)}...`)}const g=P=>{var x;P&&P.stopPropagation(),(x=e.onRemove)===null||x===void 0||x.call(e,h)};return typeof e.tagRender=="function"?r(C,E,y,N,g,D):s(w,E,y,N,g)}function b(h){const{maxTagPlaceholder:y=C=>`+ ${C.length} ...`}=e,w=typeof y=="function"?y(h):y;return s(w,w,!1)}const $=h=>{const y=h.target.composing;f.value=h.target.value,y||e.onInputChange(h)};return()=>{const{id:h,prefixCls:y,values:w,open:C,inputRef:D,placeholder:N,disabled:E,autofocus:g,autocomplete:P,activeDescendantId:x,tabindex:F,compositionStatus:L,onInputPaste:A,onInputKeyDown:B,onInputMouseDown:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=T("div",{class:`${i.value}-search`,style:{width:o.value+"px"},key:"input"},[T(Rt,{inputRef:D,open:C,prefixCls:y,id:h,inputElement:null,disabled:E,autofocus:g,autocomplete:P,editable:a.value,activeDescendantId:x,value:f.value,onKeydown:B,onMousedown:U,onChange:$,onPaste:A,onCompositionstart:Y,onCompositionend:W,tabindex:F,attrs:et(e,!0),onFocus:()=>n.value=!0,onBlur:()=>n.value=!1},null),T("span",{ref:t,class:`${i.value}-search-mirror`,"aria-hidden":!0},[f.value,Xe(" ")])]),z=T(Pn,{prefixCls:`${i.value}-overflow`,data:w,renderItem:v,renderRest:b,suffix:G,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return T(Ee,null,[z,!w.length&&!d.value&&!L&&T("span",{class:`${i.value}-placeholder`},[N])])}}}),io={inputElement:R.any,id:String,prefixCls:String,values:R.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:R.any,placeholder:R.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:R.oneOfType([R.number,R.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},ot=fe({name:"SingleSelector",setup(e){const t=X(!1),o=V(()=>e.mode==="combobox"),n=V(()=>o.value||e.showSearch),l=V(()=>{let r=e.searchValue||"";return o.value&&e.activeValue&&!t.value&&(r=e.activeValue),r}),i=nt();ne([o,()=>e.activeValue],()=>{o.value&&(t.value=!1)},{immediate:!0});const d=V(()=>e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!l.value||e.compositionStatus),a=V(()=>{const r=e.values[0];return r&&(typeof r.label=="string"||typeof r.label=="number")?r.label.toString():void 0}),f=()=>{if(e.values[0])return null;const r=d.value?{visibility:"hidden"}:void 0;return T("span",{class:`${e.prefixCls}-selection-placeholder`,style:r},[e.placeholder])},s=r=>{r.target.composing||(t.value=!0,e.onInputChange(r))};return()=>{var r,v,b,$;const{inputElement:h,prefixCls:y,id:w,values:C,inputRef:D,disabled:N,autofocus:E,autocomplete:g,activeDescendantId:P,open:x,tabindex:F,optionLabelRender:L,onInputKeyDown:A,onInputMouseDown:B,onInputPaste:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=C[0];let z=null;if(G&&i.customSlots){const oe=(r=G.key)!==null&&r!==void 0?r:G.value,ie=((v=i.keyEntities[oe])===null||v===void 0?void 0:v.node)||{};z=i.customSlots[(b=ie.slots)===null||b===void 0?void 0:b.title]||i.customSlots.title||G.label,typeof z=="function"&&(z=z(ie))}else z=L&&G?L(G.option):G?.label;return T(Ee,null,[T("span",{class:`${y}-selection-search`},[T(Rt,{inputRef:D,prefixCls:y,id:w,open:x,inputElement:h,disabled:N,autofocus:E,autocomplete:g,editable:n.value,activeDescendantId:P,value:l.value,onKeydown:A,onMousedown:B,onChange:s,onPaste:U,onCompositionstart:Y,onCompositionend:W,tabindex:F,attrs:et(e,!0)},null)]),!o.value&&G&&!d.value&&T("span",{class:`${y}-selection-item`,title:a.value},[T(Ee,{key:($=G.key)!==null&&$!==void 0?$:G.value},[z])]),f()])}}});ot.props=io;ot.inheritAttrs=!1;function ao(e){return![_.ESC,_.SHIFT,_.BACKSPACE,_.TAB,_.WIN_KEY,_.ALT,_.META,_.WIN_KEY_RIGHT,_.CTRL,_.SEMICOLON,_.EQUALS,_.CAPS_LOCK,_.CONTEXT_MENU,_.F1,_.F2,_.F3,_.F4,_.F5,_.F6,_.F7,_.F8,_.F9,_.F10,_.F11,_.F12].includes(e)}function Dt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=null,o;Pe(()=>{clearTimeout(o)});function n(l){(l||t===null)&&(t=l),clearTimeout(o),o=setTimeout(()=>{t=null},e)}return[()=>t,n]}function Fe(){const e=t=>{e.current=t};return e}const ro=fe({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:R.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:R.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:R.oneOfType([R.number,R.string]),disabled:{type:Boolean,default:void 0},placeholder:R.any,removeIcon:R.any,maxTagCount:R.oneOfType([R.number,R.string]),maxTagTextLength:Number,maxTagPlaceholder:R.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(e,t){let{expose:o}=t;const n=Fe(),l=me(!1),[i,d]=Dt(0),a=C=>{const{which:D}=C;(D===_.UP||D===_.DOWN)&&C.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(C),D===_.ENTER&&e.mode==="tags"&&!l.value&&!e.open&&e.onSearchSubmit(C.target.value),ao(D)&&e.onToggleOpen(!0)},f=()=>{d(!0)};let s=null;const r=C=>{e.onSearch(C,!0,l.value)!==!1&&e.onToggleOpen(!0)},v=()=>{l.value=!0},b=C=>{l.value=!1,e.mode!=="combobox"&&r(C.target.value)},$=C=>{let{target:{value:D}}=C;if(e.tokenWithEnter&&s&&/[\r\n]/.test(s)){const N=s.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");D=D.replace(N,s)}s=null,r(D)},h=C=>{const{clipboardData:D}=C;s=D.getData("text")},y=C=>{let{target:D}=C;D!==n.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{n.current.focus()}):n.current.focus())},w=C=>{const D=i();C.target!==n.current&&!D&&C.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!D)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return o({focus:()=>{n.current.focus()},blur:()=>{n.current.blur()}}),()=>{const{prefixCls:C,domRef:D,mode:N}=e,E={inputRef:n,onInputKeyDown:a,onInputMouseDown:f,onInputChange:$,onInputPaste:h,compositionStatus:l.value,onInputCompositionStart:v,onInputCompositionEnd:b},g=N==="multiple"||N==="tags"?T(lo,k(k({},e),E),null):T(ot,k(k({},e),E),null);return T("div",{ref:D,class:`${C}-selector`,onClick:y,onMousedown:w},[g])}}});function so(e,t,o){function n(l){var i,d,a;let f=l.target;f.shadowRoot&&l.composed&&(f=l.composedPath()[0]||f);const s=[(i=e[0])===null||i===void 0?void 0:i.value,(a=(d=e[1])===null||d===void 0?void 0:d.value)===null||a===void 0?void 0:a.getPopupElement()];t.value&&s.every(r=>r&&!r.contains(f)&&r!==f)&&o(!1)}Se(()=>{window.addEventListener("mousedown",n)}),Pe(()=>{window.removeEventListener("mousedown",n)})}function uo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const t=X(!1);let o;const n=()=>{clearTimeout(o)};return Se(()=>{n()}),[t,(i,d)=>{n(),o=setTimeout(()=>{t.value=i,d&&d()},e)},n]}const Vt=Symbol("BaseSelectContextKey");function co(e){return Ze(Vt,e)}function fo(){return Ne(Vt,{})}function Ht(e){if(!On(e))return xe(e);const t=new Proxy({},{get(o,n,l){return Reflect.get(e.value,n,l)},set(o,n,l){return e.value[n]=l,!0},deleteProperty(o,n){return Reflect.deleteProperty(e.value,n)},has(o,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return xe(t)}var po=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const mo=["value","onChange","removeIcon","placeholder","autofocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabindex","OptionList","notFoundContent"],vo=()=>({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:R.any,emptyOptions:Boolean}),Nt=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:R.any,placeholder:R.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:R.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:R.any,clearIcon:R.any,removeIcon:R.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),go=()=>S(S({},vo()),Nt());function Lt(e){return e==="tags"||e==="multiple"}const ho=fe({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:tt(go(),{showAction:[],notFoundContent:"Not Found"}),setup(e,t){let{attrs:o,expose:n,slots:l}=t;const i=V(()=>Lt(e.mode)),d=V(()=>e.showSearch!==void 0?e.showSearch:i.value||e.mode==="combobox"),a=X(!1);Se(()=>{a.value=Rn()});const f=nt(),s=X(null),r=Fe(),v=X(null),b=X(null),$=X(null),h=me(!1),[y,w,C]=uo();n({focus:()=>{var u;(u=b.value)===null||u===void 0||u.focus()},blur:()=>{var u;(u=b.value)===null||u===void 0||u.blur()},scrollTo:u=>{var c;return(c=$.value)===null||c===void 0?void 0:c.scrollTo(u)}});const E=V(()=>{var u;if(e.mode!=="combobox")return e.searchValue;const c=(u=e.displayValues[0])===null||u===void 0?void 0:u.value;return typeof c=="string"||typeof c=="number"?String(c):""}),g=e.open!==void 0?e.open:e.defaultOpen,P=X(g),x=X(g),F=u=>{P.value=e.open!==void 0?e.open:u,x.value=P.value};ne(()=>e.open,()=>{F(e.open)});const L=V(()=>!e.notFoundContent&&e.emptyOptions);Ce(()=>{x.value=P.value,(e.disabled||L.value&&x.value&&e.mode==="combobox")&&(x.value=!1)});const A=V(()=>L.value?!1:x.value),B=u=>{const c=u!==void 0?u:!x.value;x.value!==c&&!e.disabled&&(F(c),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(c),!c&&K.value&&(K.value=!1,w(!1,()=>{H.value=!1,h.value=!1})))},U=V(()=>(e.tokenSeparators||[]).some(u=>[`
|
|
2
2
|
`,`\r
|
|
3
3
|
`].includes(u))),Y=(u,c,M)=>{var I,j;let Q=!0,J=u;(I=e.onActiveValueChange)===null||I===void 0||I.call(e,null);const Z=M?null:Jn(u,e.tokenSeparators);return e.mode!=="combobox"&&Z&&(J="",(j=e.onSearchSplit)===null||j===void 0||j.call(e,Z),B(!1),Q=!1),e.onSearch&&E.value!==J&&e.onSearch(J,{source:c?"typing":"effect"}),Q},W=u=>{var c;!u||!u.trim()||(c=e.onSearch)===null||c===void 0||c.call(e,u,{source:"submit"})};ne(x,()=>{!x.value&&!i.value&&e.mode!=="combobox"&&Y("",!1,!1)},{immediate:!0,flush:"post"}),ne(()=>e.disabled,()=>{P.value&&e.disabled&&F(!1),e.disabled&&!h.value&&w(!1)},{immediate:!0});const[G,z]=Dt(),oe=function(u){var c;const M=G(),{which:I}=u;if(I===_.ENTER&&(e.mode!=="combobox"&&u.preventDefault(),x.value||B(!0)),z(!!E.value),I===_.BACKSPACE&&!M&&i.value&&!E.value&&e.displayValues.length){const Z=[...e.displayValues];let q=null;for(let le=Z.length-1;le>=0;le-=1){const ae=Z[le];if(!ae.disabled){Z.splice(le,1),q=ae;break}}q&&e.onDisplayValuesChange(Z,{type:"remove",values:[q]})}for(var j=arguments.length,Q=new Array(j>1?j-1:0),J=1;J<j;J++)Q[J-1]=arguments[J];x.value&&$.value&&$.value.onKeydown(u,...Q),(c=e.onKeydown)===null||c===void 0||c.call(e,u,...Q)},ie=function(u){for(var c=arguments.length,M=new Array(c>1?c-1:0),I=1;I<c;I++)M[I-1]=arguments[I];x.value&&$.value&&$.value.onKeyup(u,...M),e.onKeyup&&e.onKeyup(u,...M)},p=u=>{const c=e.displayValues.filter(M=>M!==u);e.onDisplayValuesChange(c,{type:"remove",values:[u]})},H=X(!1),O=function(){w(!0),e.disabled||(e.onFocus&&!H.value&&e.onFocus(...arguments),e.showAction&&e.showAction.includes("focus")&&B(!0)),H.value=!0},K=me(!1),te=function(){if(K.value||(h.value=!0,w(!1,()=>{H.value=!1,h.value=!1,B(!1)}),e.disabled))return;const u=E.value;u&&(e.mode==="tags"?e.onSearch(u,{source:"submit"}):e.mode==="multiple"&&e.onSearch("",{source:"blur"})),e.onBlur&&e.onBlur(...arguments)},re=()=>{K.value=!0},se=()=>{K.value=!1};Ze("VCSelectContainerEvent",{focus:O,blur:te});const ee=[];Se(()=>{ee.forEach(u=>clearTimeout(u)),ee.splice(0,ee.length)}),Pe(()=>{ee.forEach(u=>clearTimeout(u)),ee.splice(0,ee.length)});const ce=function(u){var c,M;const{target:I}=u,j=(c=v.value)===null||c===void 0?void 0:c.getPopupElement();if(j&&j.contains(I)){const q=setTimeout(()=>{var le;const ae=ee.indexOf(q);ae!==-1&&ee.splice(ae,1),C(),!a.value&&!j.contains(document.activeElement)&&((le=b.value)===null||le===void 0||le.focus())});ee.push(q)}for(var Q=arguments.length,J=new Array(Q>1?Q-1:0),Z=1;Z<Q;Z++)J[Z-1]=arguments[Z];(M=e.onMousedown)===null||M===void 0||M.call(e,u,...J)},de=X(null),m=()=>{};return Se(()=>{ne(A,()=>{var u;if(A.value){const c=Math.ceil((u=s.value)===null||u===void 0?void 0:u.offsetWidth);de.value!==c&&!Number.isNaN(c)&&(de.value=c)}},{immediate:!0,flush:"post"})}),so([s,v],A,B),co(Ht(S(S({},Tn(e)),{open:x,triggerOpen:A,showSearch:d,multiple:i,toggleOpen:B}))),()=>{const u=S(S({},e),o),{prefixCls:c,id:M,open:I,defaultOpen:j,mode:Q,showSearch:J,searchValue:Z,onSearch:q,allowClear:le,clearIcon:ae,showArrow:Re,inputIcon:De,disabled:$e,loading:Ve,getInputElement:at,getPopupContainer:Gt,placement:Yt,animation:Xt,transitionName:qt,dropdownStyle:Qt,dropdownClassName:Jt,dropdownMatchSelectWidth:Zt,dropdownRender:kt,dropdownAlign:en,showAction:il,direction:tn,tokenSeparators:al,tagRender:nn,optionLabelRender:on,onPopupScroll:rl,onDropdownVisibleChange:sl,onFocus:ul,onBlur:cl,onKeyup:dl,onKeydown:fl,onMousedown:pl,onClear:_e,omitDomProps:Ae,getRawInputElement:rt,displayValues:He,onDisplayValuesChange:ln,emptyOptions:an,activeDescendantId:rn,activeValue:sn,OptionList:un}=u,cn=po(u,["prefixCls","id","open","defaultOpen","mode","showSearch","searchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","disabled","loading","getInputElement","getPopupContainer","placement","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","optionLabelRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyup","onKeydown","onMousedown","onClear","omitDomProps","getRawInputElement","displayValues","onDisplayValuesChange","emptyOptions","activeDescendantId","activeValue","OptionList"]),st=Q==="combobox"&&at&&at()||null,Oe=typeof rt=="function"&&rt(),ze=S({},cn);let ut;Oe&&(ut=ye=>{B(ye)}),mo.forEach(ye=>{delete ze[ye]}),Ae?.forEach(ye=>{delete ze[ye]});const ct=Re!==void 0?Re:Ve||!i.value&&Q!=="combobox";let dt;ct&&(dt=T(we,{class:ue(`${c}-arrow`,{[`${c}-arrow-loading`]:Ve}),customizeIcon:De,customizeIconProps:{loading:Ve,searchValue:E.value,open:x.value,focused:y.value,showSearch:d.value}},null));let ft;const dn=()=>{_e?.(),ln([],{type:"clear",values:He}),Y("",!1,!1)};!$e&&le&&(He.length||E.value)&&(ft=T(we,{class:`${c}-clear`,onMousedown:dn,customizeIcon:ae},{default:()=>[Xe("×")]}));const fn=T(un,{ref:$},S(S({},f.customSlots),{option:l.option})),pn=ue(c,o.class,{[`${c}-focused`]:y.value,[`${c}-multiple`]:i.value,[`${c}-single`]:!i.value,[`${c}-allow-clear`]:le,[`${c}-show-arrow`]:ct,[`${c}-disabled`]:$e,[`${c}-loading`]:Ve,[`${c}-open`]:x.value,[`${c}-customize-input`]:st,[`${c}-show-search`]:d.value}),pt=T(eo,{ref:v,disabled:$e,prefixCls:c,visible:A.value,popupElement:fn,containerWidth:de.value,animation:Xt,transitionName:qt,dropdownStyle:Qt,dropdownClassName:Jt,direction:tn,dropdownMatchSelectWidth:Zt,dropdownRender:kt,dropdownAlign:en,placement:Yt,getPopupContainer:Gt,empty:an,getTriggerDOMNode:()=>r.current,onPopupVisibleChange:ut,onPopupMouseEnter:m,onPopupFocusin:re,onPopupFocusout:se},{default:()=>Oe?Qe(Oe)&&Ft(Oe,{ref:r},!1,!0):T(ro,k(k({},e),{},{domRef:r,prefixCls:c,inputElement:st,ref:b,id:M,showSearch:d.value,mode:Q,activeDescendantId:rn,tagRender:nn,optionLabelRender:on,values:He,open:x.value,onToggleOpen:B,activeValue:sn,searchValue:E.value,onSearch:Y,onSearchSubmit:W,onRemove:p,tokenWithEnter:U.value}),null)});let We;return Oe?We=pt:We=T("div",k(k({},ze),{},{class:pn,ref:s,onMousedown:ce,onKeydown:oe,onKeyup:ie}),[y.value&&!x.value&&T("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},[`${He.map(ye=>{let{label:mt,value:mn}=ye;return["number","string"].includes(typeof mt)?mt:mn}).join(", ")}`]),pt,dt,ft]),We}}}),Be=(e,t)=>{let{height:o,offset:n,prefixCls:l,onInnerResize:i}=e,{slots:d}=t;var a;let f={},s={display:"flex",flexDirection:"column"};return n!==void 0&&(f={height:`${o}px`,position:"relative",overflow:"hidden"},s=S(S({},s),{transform:`translateY(${n}px)`,position:"absolute",left:0,right:0,top:0})),T("div",{style:f},[T(Dn,{onResize:r=>{let{offsetHeight:v}=r;v&&i&&i()}},{default:()=>[T("div",{style:s,class:ue({[`${l}-holder-inner`]:l})},[(a=d.default)===null||a===void 0?void 0:a.call(d)])]})])};Be.displayName="Filter";Be.inheritAttrs=!1;Be.props={prefixCls:String,height:Number,offset:Number,onInnerResize:Function};const Bt=(e,t)=>{let{setRef:o}=e,{slots:n}=t;var l;const i=Tt((l=n.default)===null||l===void 0?void 0:l.call(n));return i&&i.length?Et(i[0],{ref:o}):i};Bt.props={setRef:{type:Function,default:()=>{}}};const bo=20;function It(e){return"touches"in e?e.touches[0].pageY:e.pageY}const So=fe({compatConfig:{MODE:3},name:"ScrollBar",inheritAttrs:!1,props:{prefixCls:String,scrollTop:Number,scrollHeight:Number,height:Number,count:Number,onScroll:{type:Function},onStartMove:{type:Function},onStopMove:{type:Function}},setup(){return{moveRaf:null,scrollbarRef:Fe(),thumbRef:Fe(),visibleTimeout:null,state:xe({dragging:!1,pageY:null,startTop:null,visible:!1})}},watch:{scrollTop:{handler(){this.delayHidden()},flush:"post"}},mounted(){var e,t;(e=this.scrollbarRef.current)===null||e===void 0||e.addEventListener("touchstart",this.onScrollbarTouchStart,he?{passive:!1}:!1),(t=this.thumbRef.current)===null||t===void 0||t.addEventListener("touchstart",this.onMouseDown,he?{passive:!1}:!1)},beforeUnmount(){this.removeEvents(),clearTimeout(this.visibleTimeout)},methods:{delayHidden(){clearTimeout(this.visibleTimeout),this.state.visible=!0,this.visibleTimeout=setTimeout(()=>{this.state.visible=!1},2e3)},onScrollbarTouchStart(e){e.preventDefault()},onContainerMouseDown(e){e.stopPropagation(),e.preventDefault()},patchEvents(){window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),this.thumbRef.current.addEventListener("touchmove",this.onMouseMove,he?{passive:!1}:!1),this.thumbRef.current.addEventListener("touchend",this.onMouseUp)},removeEvents(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),this.scrollbarRef.current.removeEventListener("touchstart",this.onScrollbarTouchStart,he?{passive:!1}:!1),this.thumbRef.current&&(this.thumbRef.current.removeEventListener("touchstart",this.onMouseDown,he?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchmove",this.onMouseMove,he?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchend",this.onMouseUp)),ve.cancel(this.moveRaf)},onMouseDown(e){const{onStartMove:t}=this.$props;S(this.state,{dragging:!0,pageY:It(e),startTop:this.getTop()}),t(),this.patchEvents(),e.stopPropagation(),e.preventDefault()},onMouseMove(e){const{dragging:t,pageY:o,startTop:n}=this.state,{onScroll:l}=this.$props;if(ve.cancel(this.moveRaf),t){const i=It(e)-o,d=n+i,a=this.getEnableScrollRange(),f=this.getEnableHeightRange(),s=f?d/f:0,r=Math.ceil(s*a);this.moveRaf=ve(()=>{l(r)})}},onMouseUp(){const{onStopMove:e}=this.$props;this.state.dragging=!1,e(),this.removeEvents()},getSpinHeight(){const{height:e,scrollHeight:t}=this.$props;let o=e/t*100;return o=Math.max(o,bo),o=Math.min(o,e/2),Math.floor(o)},getEnableScrollRange(){const{scrollHeight:e,height:t}=this.$props;return e-t||0},getEnableHeightRange(){const{height:e}=this.$props,t=this.getSpinHeight();return e-t||0},getTop(){const{scrollTop:e}=this.$props,t=this.getEnableScrollRange(),o=this.getEnableHeightRange();return e===0||t===0?0:e/t*o},showScroll(){const{height:e,scrollHeight:t}=this.$props;return t>e}},render(){const{dragging:e,visible:t}=this.state,{prefixCls:o}=this.$props,n=this.getSpinHeight()+"px",l=this.getTop()+"px",i=this.showScroll(),d=i&&t;return T("div",{ref:this.scrollbarRef,class:ue(`${o}-scrollbar`,{[`${o}-scrollbar-show`]:i}),style:{width:"8px",top:0,bottom:0,right:0,position:"absolute",display:d?void 0:"none"},onMousedown:this.onContainerMouseDown,onMousemove:this.delayHidden},[T("div",{ref:this.thumbRef,class:ue(`${o}-scrollbar-thumb`,{[`${o}-scrollbar-thumb-moving`]:e}),style:{width:"100%",height:n,top:l,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:"99px",cursor:"pointer",userSelect:"none"},onMousedown:this.onMouseDown},null)])}});function yo(e,t,o,n){const l=new Map,i=new Map,d=me(Symbol("update"));ne(e,()=>{d.value=Symbol("update")});let a;function f(){ve.cancel(a)}function s(){f(),a=ve(()=>{l.forEach((v,b)=>{if(v&&v.offsetParent){const{offsetHeight:$}=v;i.get(b)!==$&&(d.value=Symbol("update"),i.set(b,v.offsetHeight))}})})}function r(v,b){const $=t(v);l.get($),b?(l.set($,b.$el||b),s()):l.delete($)}return Mn(()=>{f()}),[r,s,i,d]}function wo(e,t,o,n,l,i,d,a){let f;return s=>{if(s==null){a();return}ve.cancel(f);const r=t.value,v=n.itemHeight;if(typeof s=="number")d(s);else if(s&&typeof s=="object"){let b;const{align:$}=s;"index"in s?{index:b}=s:b=r.findIndex(w=>l(w)===s.key);const{offset:h=0}=s,y=(w,C)=>{if(w<0||!e.value)return;const D=e.value.clientHeight;let N=!1,E=C;if(D){const g=C||$;let P=0,x=0,F=0;const L=Math.min(r.length,b);for(let U=0;U<=L;U+=1){const Y=l(r[U]);x=P;const W=o.get(Y);F=x+(W===void 0?v:W),P=F,U===b&&W===void 0&&(N=!0)}const A=e.value.scrollTop;let B=null;switch(g){case"top":B=x-h;break;case"bottom":B=F-D+h;break;default:{const U=A+D;x<A?E="top":F>U&&(E="bottom")}}B!==null&&B!==A&&d(B)}f=ve(()=>{N&&i(),y(w-1,E)},2)};y(5)}}}const Io=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),_t=((e,t)=>{let o=!1,n=null;function l(){clearTimeout(n),o=!0,n=setTimeout(()=>{o=!1},50)}return function(i){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const a=i<0&&e.value||i>0&&t.value;return d&&a?(clearTimeout(n),o=!1):(!a||o)&&l(),!o&&a}});function Co(e,t,o,n){let l=0,i=null,d=null,a=!1;const f=_t(t,o);function s(v){if(!e.value)return;ve.cancel(i);const{deltaY:b}=v;l+=b,d=b,!f(b)&&(Io||v.preventDefault(),i=ve(()=>{n(l*(a?10:1)),l=0}))}function r(v){e.value&&(a=v.detail===d)}return[s,r]}const xo=14/15;function $o(e,t,o){let n=!1,l=0,i=null,d=null;const a=()=>{i&&(i.removeEventListener("touchmove",f),i.removeEventListener("touchend",s))},f=b=>{if(n){const $=Math.ceil(b.touches[0].pageY);let h=l-$;l=$,o(h)&&b.preventDefault(),clearInterval(d),d=setInterval(()=>{h*=xo,(!o(h,!0)||Math.abs(h)<=.1)&&clearInterval(d)},16)}},s=()=>{n=!1,a()},r=b=>{a(),b.touches.length===1&&!n&&(n=!0,l=Math.ceil(b.touches[0].pageY),i=b.target,i.addEventListener("touchmove",f,{passive:!1}),i.addEventListener("touchend",s))},v=()=>{};Se(()=>{document.addEventListener("touchmove",v,{passive:!1}),ne(e,b=>{t.value.removeEventListener("touchstart",r),a(),clearInterval(d),b&&t.value.addEventListener("touchstart",r,{passive:!1})},{immediate:!0})}),Pe(()=>{document.removeEventListener("touchmove",v)})}var Oo=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const To=[],Mo={overflowY:"auto",overflowAnchor:"none"};function Eo(e,t,o,n,l,i){let{getKey:d}=i;return e.slice(t,o+1).map((a,f)=>{const s=t+f,r=l(a,s,{}),v=d(a);return T(Bt,{key:v,setRef:b=>n(a,b)},{default:()=>[r]})})}const Fo=fe({compatConfig:{MODE:3},name:"List",inheritAttrs:!1,props:{prefixCls:String,data:R.array,height:Number,itemHeight:Number,fullHeight:{type:Boolean,default:void 0},itemKey:{type:[String,Number,Function],required:!0},component:{type:[String,Object]},virtual:{type:Boolean,default:void 0},children:Function,onScroll:Function,onMousedown:Function,onMouseenter:Function,onVisibleChange:Function},setup(e,t){let{expose:o}=t;const n=V(()=>{const{height:p,itemHeight:H,virtual:O}=e;return!!(O!==!1&&p&&H)}),l=V(()=>{const{height:p,itemHeight:H,data:O}=e;return n.value&&O&&H*O.length>p}),i=xe({scrollTop:0,scrollMoving:!1}),d=V(()=>e.data||To),a=X([]);ne(d,()=>{a.value=ke(d.value).slice()},{immediate:!0});const f=X(p=>{});ne(()=>e.itemKey,p=>{typeof p=="function"?f.value=p:f.value=H=>H?.[p]},{immediate:!0});const s=X(),r=X(),v=X(),b=p=>f.value(p),$={getKey:b};function h(p){let H;typeof p=="function"?H=p(i.scrollTop):H=p;const O=P(H);s.value&&(s.value.scrollTop=O),i.scrollTop=O}const[y,w,C,D]=yo(a,b),N=xe({scrollHeight:void 0,start:0,end:0,offset:void 0}),E=X(0);Se(()=>{Me(()=>{var p;E.value=((p=r.value)===null||p===void 0?void 0:p.offsetHeight)||0})}),En(()=>{Me(()=>{var p;E.value=((p=r.value)===null||p===void 0?void 0:p.offsetHeight)||0})}),ne([n,a],()=>{n.value||S(N,{scrollHeight:void 0,start:0,end:a.value.length-1,offset:void 0})},{immediate:!0}),ne([n,a,E,l],()=>{n.value&&!l.value&&S(N,{scrollHeight:E.value,start:0,end:a.value.length-1,offset:void 0}),s.value&&(i.scrollTop=s.value.scrollTop)},{immediate:!0}),ne([l,n,()=>i.scrollTop,a,D,()=>e.height,E],()=>{if(!n.value||!l.value)return;let p=0,H,O,K;const te=a.value.length,re=a.value,se=i.scrollTop,{itemHeight:ee,height:ce}=e,de=se+ce;for(let m=0;m<te;m+=1){const u=re[m],c=b(u);let M=C.get(c);M===void 0&&(M=ee);const I=p+M;H===void 0&&I>=se&&(H=m,O=p),K===void 0&&I>de&&(K=m),p=I}H===void 0&&(H=0,O=0,K=Math.ceil(ce/ee)),K===void 0&&(K=te-1),K=Math.min(K+1,te),S(N,{scrollHeight:p,start:H,end:K,offset:O})},{immediate:!0});const g=V(()=>N.scrollHeight-e.height);function P(p){let H=p;return Number.isNaN(g.value)||(H=Math.min(H,g.value)),H=Math.max(H,0),H}const x=V(()=>i.scrollTop<=0),F=V(()=>i.scrollTop>=g.value),L=_t(x,F);function A(p){h(p)}function B(p){var H;const{scrollTop:O}=p.currentTarget;O!==i.scrollTop&&h(O),(H=e.onScroll)===null||H===void 0||H.call(e,p)}const[U,Y]=Co(n,x,F,p=>{h(H=>H+p)});$o(n,s,(p,H)=>L(p,H)?!1:(U({preventDefault(){},deltaY:p}),!0));function W(p){n.value&&p.preventDefault()}const G=()=>{s.value&&(s.value.removeEventListener("wheel",U,he?{passive:!1}:!1),s.value.removeEventListener("DOMMouseScroll",Y),s.value.removeEventListener("MozMousePixelScroll",W))};Ce(()=>{Me(()=>{s.value&&(G(),s.value.addEventListener("wheel",U,he?{passive:!1}:!1),s.value.addEventListener("DOMMouseScroll",Y),s.value.addEventListener("MozMousePixelScroll",W))})}),Pe(()=>{G()});const z=wo(s,a,C,e,b,w,h,()=>{var p;(p=v.value)===null||p===void 0||p.delayHidden()});o({scrollTo:z});const oe=V(()=>{let p=null;return e.height&&(p=S({[e.fullHeight?"height":"maxHeight"]:e.height+"px"},Mo),n.value&&(p.overflowY="hidden",i.scrollMoving&&(p.pointerEvents="none"))),p});return ne([()=>N.start,()=>N.end,a],()=>{if(e.onVisibleChange){const p=a.value.slice(N.start,N.end+1);e.onVisibleChange(p,a.value)}},{flush:"post"}),{state:i,mergedData:a,componentStyle:oe,onFallbackScroll:B,onScrollBar:A,componentRef:s,useVirtual:n,calRes:N,collectHeight:w,setInstance:y,sharedConfig:$,scrollBarRef:v,fillerInnerRef:r,delayHideScrollBar:()=>{var p;(p=v.value)===null||p===void 0||p.delayHidden()}}},render(){const e=S(S({},this.$props),this.$attrs),{prefixCls:t="rc-virtual-list",height:o,itemHeight:n,fullHeight:l,data:i,itemKey:d,virtual:a,component:f="div",onScroll:s,children:r=this.$slots.default,style:v,class:b}=e,$=Oo(e,["prefixCls","height","itemHeight","fullHeight","data","itemKey","virtual","component","onScroll","children","style","class"]),h=ue(t,b),{scrollTop:y}=this.state,{scrollHeight:w,offset:C,start:D,end:N}=this.calRes,{componentStyle:E,onFallbackScroll:g,onScrollBar:P,useVirtual:x,collectHeight:F,sharedConfig:L,setInstance:A,mergedData:B,delayHideScrollBar:U}=this;return T("div",k({style:S(S({},v),{position:"relative"}),class:h},$),[T(f,{class:`${t}-holder`,style:E,ref:"componentRef",onScroll:g,onMouseenter:U},{default:()=>[T(Be,{prefixCls:t,height:w,offset:C,onInnerResize:F,ref:"fillerInnerRef"},{default:()=>Eo(B,D,N,A,r,L)})]}),x&&T(So,{ref:"scrollBarRef",prefixCls:t,scrollTop:y,height:o,scrollHeight:w,count:B.length,onScroll:P,onStartMove:()=>{this.state.scrollMoving=!0},onStopMove:()=>{this.state.scrollMoving=!1}},null)])}});function Po(e,t,o){const n=me(e());return ne(t,(l,i)=>{o?o(l,i)&&(n.value=e()):n.value=e()}),n}function Ro(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}const At=Symbol("SelectContextKey");function Do(e){return Ze(At,e)}function Vo(){return Ne(At,{})}var Ho=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};function Ct(e){return typeof e=="string"||typeof e=="number"}const No=fe({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(e,t){let{expose:o,slots:n}=t;const l=fo(),i=Vo(),d=V(()=>`${l.prefixCls}-item`),a=Po(()=>i.flattenOptions,[()=>l.open,()=>i.flattenOptions],g=>g[0]),f=Fe(),s=g=>{g.preventDefault()},r=g=>{f.current&&f.current.scrollTo(typeof g=="number"?{index:g}:g)},v=function(g){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const x=a.value.length;for(let F=0;F<x;F+=1){const L=(g+F*P+x)%x,{group:A,data:B}=a.value[L];if(!A&&!B.disabled)return L}return-1},b=xe({activeIndex:v(0)}),$=function(g){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;b.activeIndex=g;const x={source:P?"keyboard":"mouse"},F=a.value[g];if(!F){i.onActiveValue(null,-1,x);return}i.onActiveValue(F.value,g,x)};ne([()=>a.value.length,()=>l.searchValue],()=>{$(i.defaultActiveFirstOption!==!1?v(0):-1)},{immediate:!0});const h=g=>i.rawValues.has(g)&&l.mode!=="combobox";ne([()=>l.open,()=>l.searchValue],()=>{if(!l.multiple&&l.open&&i.rawValues.size===1){const g=Array.from(i.rawValues)[0],P=ke(a.value).findIndex(x=>{let{data:F}=x;return F[i.fieldNames.value]===g});P!==-1&&($(P),Me(()=>{r(P)}))}l.open&&Me(()=>{var g;(g=f.current)===null||g===void 0||g.scrollTo(void 0)})},{immediate:!0,flush:"post"});const y=g=>{g!==void 0&&i.onSelect(g,{selected:!i.rawValues.has(g)}),l.multiple||l.toggleOpen(!1)},w=g=>typeof g.label=="function"?g.label():g.label;function C(g){const P=a.value[g];if(!P)return null;const x=P.data||{},{value:F}=x,{group:L}=P,A=et(x,!0),B=w(P);return P?T("div",k(k({"aria-label":typeof B=="string"&&!L?B:null},A),{},{key:g,role:L?"presentation":"option",id:`${l.id}_list_${g}`,"aria-selected":h(F)}),[F]):null}return o({onKeydown:g=>{const{which:P,ctrlKey:x}=g;switch(P){case _.N:case _.P:case _.UP:case _.DOWN:{let F=0;if(P===_.UP?F=-1:P===_.DOWN?F=1:Ro()&&x&&(P===_.N?F=1:P===_.P&&(F=-1)),F!==0){const L=v(b.activeIndex+F,F);r(L),$(L,!0)}break}case _.ENTER:{const F=a.value[b.activeIndex];F&&!F.data.disabled?y(F.value):y(void 0),l.open&&g.preventDefault();break}case _.ESC:l.toggleOpen(!1),l.open&&g.stopPropagation()}},onKeyup:()=>{},scrollTo:g=>{r(g)}}),()=>{const{id:g,notFoundContent:P,onPopupScroll:x}=l,{menuItemSelectedIcon:F,fieldNames:L,virtual:A,listHeight:B,listItemHeight:U}=i,Y=n.option,{activeIndex:W}=b,G=Object.keys(L).map(z=>L[z]);return a.value.length===0?T("div",{role:"listbox",id:`${g}_list`,class:`${d.value}-empty`,onMousedown:s},[P]):T(Ee,null,[T("div",{role:"listbox",id:`${g}_list`,style:{height:0,width:0,overflow:"hidden"}},[C(W-1),C(W),C(W+1)]),T(Fo,{itemKey:"key",ref:f,data:a.value,height:B,itemHeight:U,fullHeight:!1,onMousedown:s,onScroll:x,virtual:A},{default:(z,oe)=>{var ie;const{group:p,groupOption:H,data:O,value:K}=z,{key:te}=O,re=typeof z.label=="function"?z.label():z.label;if(p){const ae=(ie=O.title)!==null&&ie!==void 0?ie:Ct(re)&&re;return T("div",{class:ue(d.value,`${d.value}-group`),title:ae},[Y?Y(O):re!==void 0?re:te])}const{disabled:se,title:ee,children:ce,style:de,class:m,className:u}=O,c=Ho(O,["disabled","title","children","style","class","className"]),M=Le(c,G),I=h(K),j=`${d.value}-option`,Q=ue(d.value,j,m,u,{[`${j}-grouped`]:H,[`${j}-active`]:W===oe&&!se,[`${j}-disabled`]:se,[`${j}-selected`]:I}),J=w(z),Z=!F||typeof F=="function"||I,q=typeof J=="number"?J:J||K;let le=Ct(q)?q.toString():void 0;return ee!==void 0&&(le=ee),T("div",k(k({},M),{},{"aria-selected":I,class:Q,title:le,onMousemove:ae=>{c.onMousemove&&c.onMousemove(ae),!(W===oe||se)&&$(oe)},onClick:ae=>{se||y(K),c.onClick&&c.onClick(ae)},style:de}),[T("div",{class:`${j}-content`},[Y?Y(O):q]),Qe(F)||I,Z&&T(we,{class:`${d.value}-option-state`,customizeIcon:F,customizeIconProps:{isSelected:I}},{default:()=>[I?"✓":null]})])}})])}}});var Lo=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};function Bo(e){const t=e,{key:o,children:n}=t,l=t.props,{value:i,disabled:d}=l,a=Lo(l,["value","disabled"]),f=n?.default;return S({key:o,value:i!==void 0?i:o,children:f,disabled:d||d===""},a)}function zt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Tt(e).map((n,l)=>{var i;if(!Qe(n)||!n.type)return null;const{type:{isSelectOptGroup:d},key:a,children:f,props:s}=n;if(t||!d)return Bo(n);const r=f&&f.default?f.default():void 0,v=s?.label||((i=f.label)===null||i===void 0?void 0:i.call(f))||a;return S(S({key:`__RC_SELECT_GRP__${a===null?l:String(a)}__`},s),{label:v,options:zt(r||[])})}).filter(n=>n)}function _o(e,t,o){const n=X(),l=X(),i=X(),d=X([]);return ne([e,t],()=>{e.value?d.value=ke(e.value).slice():d.value=zt(t.value)},{immediate:!0,deep:!0}),Ce(()=>{const a=d.value,f=new Map,s=new Map,r=o.value;function v(b){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(let h=0;h<b.length;h+=1){const y=b[h];!y[r.options]||$?(f.set(y[r.value],y),s.set(y[r.label],y)):v(y[r.options],!0)}}v(a),n.value=a,l.value=f,i.value=s}),{options:n,valueOptions:l,labelOptions:i}}let xt=0;const Ao=vn();function zo(){let e;return Ao?(e=xt,xt+=1):e="TEST_OR_SSR",e}function Wo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:me("");const t=`rc_select_${zo()}`;return e.value||t}function Wt(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Ke(e,t){return Wt(e).join("").toUpperCase().includes(t)}const Ko=((e,t,o,n,l)=>V(()=>{const i=o.value,d=l?.value,a=n?.value;if(!i||a===!1)return e.value;const{options:f,label:s,value:r}=t.value,v=[],b=typeof a=="function",$=i.toUpperCase(),h=b?a:(w,C)=>d?Ke(C[d],$):C[f]?Ke(C[s!=="children"?s:"label"],$):Ke(C[r],$),y=b?w=>qe(w):w=>w;return e.value.forEach(w=>{if(w[f]){if(h(i,y(w)))v.push(w);else{const D=w[f].filter(N=>h(i,y(N)));D.length&&v.push(S(S({},w),{[f]:D}))}return}h(i,y(w))&&v.push(w)}),v})),jo=((e,t)=>{const o=X({values:new Map,options:new Map});return[V(()=>{const{values:i,options:d}=o.value,a=e.value.map(r=>{var v;return r.label===void 0?S(S({},r),{label:(v=i.get(r.value))===null||v===void 0?void 0:v.label}):r}),f=new Map,s=new Map;return a.forEach(r=>{f.set(r.value,r),s.set(r.value,t.value.get(r.value)||d.get(r.value))}),o.value.values=f,o.value.options=s,a}),i=>t.value.get(i)||o.value.options.get(i)]}),Uo=["inputValue"];function Kt(){return S(S({},Nt()),{prefixCls:String,id:String,backfill:{type:Boolean,default:void 0},fieldNames:Object,inputValue:String,searchValue:String,onSearch:Function,autoClearSearchValue:{type:Boolean,default:void 0},onSelect:Function,onDeselect:Function,filterOption:{type:[Boolean,Function],default:void 0},filterSort:Function,optionFilterProp:String,optionLabelProp:String,options:Array,defaultActiveFirstOption:{type:Boolean,default:void 0},virtual:{type:Boolean,default:void 0},listHeight:Number,listItemHeight:Number,menuItemSelectedIcon:R.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:R.any,defaultValue:R.any,onChange:Function,children:Array})}function Go(e){return!e||typeof e!="object"}const Yo=fe({compatConfig:{MODE:3},name:"VcSelect",inheritAttrs:!1,props:tt(Kt(),{prefixCls:"vc-select",autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup(e,t){let{expose:o,attrs:n,slots:l}=t;const i=Wo(ge(e,"id")),d=V(()=>Lt(e.mode)),a=V(()=>!!(!e.options&&e.children)),f=V(()=>e.filterOption===void 0&&e.mode==="combobox"?!1:e.filterOption),s=V(()=>Pt(e.fieldNames,a.value)),[r,v]=gt("",{value:V(()=>e.searchValue!==void 0?e.searchValue:e.inputValue),postState:m=>m||""}),b=_o(ge(e,"options"),ge(e,"children"),s),{valueOptions:$,labelOptions:h,options:y}=b,w=m=>Wt(m).map(c=>{var M,I;let j,Q,J,Z;Go(c)?j=c:(J=c.key,Q=c.label,j=(M=c.value)!==null&&M!==void 0?M:J);const q=$.value.get(j);return q&&(Q===void 0&&(Q=q?.[e.optionLabelProp||s.value.label]),J===void 0&&(J=(I=q?.key)!==null&&I!==void 0?I:j),Z=q?.disabled),{label:Q,value:j,key:J,disabled:Z,option:q}}),[C,D]=gt(e.defaultValue,{value:ge(e,"value")}),N=V(()=>{var m;const u=w(C.value);return e.mode==="combobox"&&!(!((m=u[0])===null||m===void 0)&&m.value)?[]:u}),[E,g]=jo(N,$),P=V(()=>{if(!e.mode&&E.value.length===1){const m=E.value[0];if(m.value===null&&(m.label===null||m.label===void 0))return[]}return E.value.map(m=>{var u;return S(S({},m),{label:(u=typeof m.label=="function"?m.label():m.label)!==null&&u!==void 0?u:m.value})})}),x=V(()=>new Set(E.value.map(m=>m.value)));Ce(()=>{var m;if(e.mode==="combobox"){const u=(m=E.value[0])===null||m===void 0?void 0:m.value;u!=null&&v(String(u))}},{flush:"post"});const F=(m,u)=>{const c=u??m;return{[s.value.value]:m,[s.value.label]:c}},L=X();Ce(()=>{if(e.mode!=="tags"){L.value=y.value;return}const m=y.value.slice(),u=c=>$.value.has(c);[...E.value].sort((c,M)=>c.value<M.value?-1:1).forEach(c=>{const M=c.value;u(M)||m.push(F(M,c.label))}),L.value=m});const A=Ko(L,s,r,f,ge(e,"optionFilterProp")),B=V(()=>e.mode!=="tags"||!r.value||A.value.some(m=>m[e.optionFilterProp||"value"]===r.value)?A.value:[F(r.value),...A.value]),U=V(()=>e.filterSort?[...B.value].sort((m,u)=>e.filterSort(m,u)):B.value),Y=V(()=>Qn(U.value,{fieldNames:s.value,childrenAsData:a.value})),W=m=>{const u=w(m);if(D(u),e.onChange&&(u.length!==E.value.length||u.some((c,M)=>{var I;return((I=E.value[M])===null||I===void 0?void 0:I.value)!==c?.value}))){const c=e.labelInValue?u.map(I=>S(S({},I),{originLabel:I.label,label:typeof I.label=="function"?I.label():I.label})):u.map(I=>I.value),M=u.map(I=>qe(g(I.value)));e.onChange(d.value?c:c[0],d.value?M:M[0])}},[G,z]=ht(null),[oe,ie]=ht(0),p=V(()=>e.defaultActiveFirstOption!==void 0?e.defaultActiveFirstOption:e.mode!=="combobox"),H=function(m,u){let{source:c="keyboard"}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ie(u),e.backfill&&e.mode==="combobox"&&m!==null&&c==="keyboard"&&z(String(m))},O=(m,u)=>{const c=()=>{var M;const I=g(m),j=I?.[s.value.label];return[e.labelInValue?{label:typeof j=="function"?j():j,originLabel:j,value:m,key:(M=I?.key)!==null&&M!==void 0?M:m}:m,qe(I)]};if(u&&e.onSelect){const[M,I]=c();e.onSelect(M,I)}else if(!u&&e.onDeselect){const[M,I]=c();e.onDeselect(M,I)}},K=(m,u)=>{let c;const M=d.value?u.selected:!0;M?c=d.value?[...E.value,m]:[m]:c=E.value.filter(I=>I.value!==m),W(c),O(m,M),e.mode==="combobox"?z(""):(!d.value||e.autoClearSearchValue)&&(v(""),z(""))},te=(m,u)=>{W(m),(u.type==="remove"||u.type==="clear")&&u.values.forEach(c=>{O(c.value,!1)})},re=(m,u)=>{var c;if(v(m),z(null),u.source==="submit"){const M=(m||"").trim();if(M){const I=Array.from(new Set([...x.value,M]));W(I),O(M,!0),v("")}return}u.source!=="blur"&&(e.mode==="combobox"&&W(m),(c=e.onSearch)===null||c===void 0||c.call(e,m))},se=m=>{let u=m;e.mode!=="tags"&&(u=m.map(M=>{const I=h.value.get(M);return I?.value}).filter(M=>M!==void 0));const c=Array.from(new Set([...x.value,...u]));W(c),c.forEach(M=>{O(M,!0)})},ee=V(()=>e.virtual!==!1&&e.dropdownMatchSelectWidth!==!1);Do(Ht(S(S({},b),{flattenOptions:Y,onActiveValue:H,defaultActiveFirstOption:p,onSelect:K,menuItemSelectedIcon:ge(e,"menuItemSelectedIcon"),rawValues:x,fieldNames:s,virtual:ee,listHeight:ge(e,"listHeight"),listItemHeight:ge(e,"listItemHeight"),childrenAsData:a})));const ce=me();o({focus(){var m;(m=ce.value)===null||m===void 0||m.focus()},blur(){var m;(m=ce.value)===null||m===void 0||m.blur()},scrollTo(m){var u;(u=ce.value)===null||u===void 0||u.scrollTo(m)}});const de=V(()=>Le(e,["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"]));return()=>T(ho,k(k(k({},de.value),n),{},{id:i,prefixCls:e.prefixCls,ref:ce,omitDomProps:Uo,mode:e.mode,displayValues:P.value,onDisplayValuesChange:te,searchValue:r.value,onSearch:re,onSearchSplit:se,dropdownMatchSelectWidth:e.dropdownMatchSelectWidth,OptionList:No,emptyOptions:!Y.value.length,activeValue:G.value,activeDescendantId:`${i}_list_${oe.value}`}),l)}}),lt=()=>null;lt.isSelectOption=!0;lt.displayName="ASelectOption";const it=()=>null;it.isSelectOptGroup=!0;it.displayName="ASelectOptGroup";function Xo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{loading:o,multiple:n,prefixCls:l,hasFeedback:i,feedbackIcon:d,showArrow:a}=e,f=e.suffixIcon||t.suffixIcon&&t.suffixIcon(),s=e.clearIcon||t.clearIcon&&t.clearIcon(),r=e.menuItemSelectedIcon||t.menuItemSelectedIcon&&t.menuItemSelectedIcon(),v=e.removeIcon||t.removeIcon&&t.removeIcon(),b=s??T(Vn,null,null),$=C=>T(Ee,null,[a!==!1&&C,i&&d]);let h=null;if(f!==void 0)h=$(f);else if(o)h=$(T(Hn,{spin:!0},null));else{const C=`${l}-suffix`;h=D=>{let{open:N,showSearch:E}=D;return $(N&&E?T(Bn,{class:C},null):T(_n,{class:C},null))}}let y=null;r!==void 0?y=r:n?y=T(Nn,null,null):y=null;let w=null;return v!==void 0?w=v:w=T(Ln,null,null),{clearIcon:b,suffixIcon:h,itemIcon:y,removeIcon:w}}const $t=e=>{const{controlPaddingHorizontal:t}=e;return{position:"relative",display:"block",minHeight:e.controlHeight,padding:`${(e.controlHeight-e.fontSize*e.lineHeight)/2}px ${t}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,boxSizing:"border-box"}},qo=e=>{const{antCls:t,componentCls:o}=e,n=`${o}-item`;return[{[`${o}-dropdown`]:S(S({},Je(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
|
|
4
4
|
&${t}-slide-up-enter${t}-slide-up-enter-active${o}-dropdown-placement-bottomLeft,
|
package/src/assets/web-panel/assets/{initDefaultProps-DE_gVS_i.js → initDefaultProps-lrtHMmWq.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as s}from"./index-
|
|
1
|
+
import{h as s}from"./index-BqCbH37-.js";const n=(p,o)=>{const r=s({},p);return Object.keys(o).forEach(t=>{const e=r[t];if(e)e.type||e.default?e.default=o[t]:e.def?e.def(o[t]):r[t]={type:e,default:o[t]};else throw new Error(`not have ${t} prop`)}),r};export{n as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as p,B as k,D as C,P as F,F as _,G as I,h as f}from"./index-
|
|
1
|
+
import{A as p,B as k,D as C,P as F,F as _,G as I,h as f}from"./index-BqCbH37-.js";import{w as L}from"./raf-Deuc0E8-.js";import{b as O,f as D,d as R,q as z,o as H,w as A,n as j,e as q,c as G,s as v}from"./vendor-M5lGV-wr.js";let M=!1;try{const e=Object.defineProperty({},"passive",{get(){M=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch{}function te(e,n,o,t){if(e&&e.addEventListener){let r=t;r===void 0&&M&&(n==="touchstart"||n==="touchmove"||n==="wheel")&&(r={passive:!1}),e.addEventListener(n,o,r)}return{remove:()=>{e&&e.removeEventListener&&e.removeEventListener(n,o)}}}let g;function W(e){if(typeof document>"u")return 0;if(g===void 0){const n=document.createElement("div");n.style.width="100%",n.style.height="200px";const o=document.createElement("div"),t=o.style;t.position="absolute",t.top="0",t.left="0",t.pointerEvents="none",t.visibility="hidden",t.width="200px",t.height="150px",t.overflow="hidden",o.appendChild(n),document.body.appendChild(o);const r=n.offsetWidth;o.style.overflow="scroll";let a=n.offsetWidth;r===a&&(a=o.clientWidth),document.body.removeChild(o),g=r-a}return g}function N(e){const n=e.match(/^(.*)px$/),o=Number(n?.[1]);return Number.isNaN(o)?W():o}function ne(e){if(typeof document>"u"||!e||!(e instanceof Element))return{width:0,height:0};const{width:n,height:o}=getComputedStyle(e,"::-webkit-scrollbar");return{width:N(n),height:N(o)}}const T=`vc-util-locker-${Date.now()}`;let x=0;function V(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}function Q(e){const n=D(()=>!!e&&!!e.value);x+=1;const o=`${T}_${x}`;O(t=>{if(p()){if(n.value){const r=W(),a=V();k(`
|
|
2
2
|
html body {
|
|
3
3
|
overflow-y: hidden;
|
|
4
4
|
${a?`width: calc(100% - ${r}px);`:""}
|