chainlesschain 0.156.6 → 0.157.0
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/README.md +26 -2
- package/bin/chainlesschain.js +13 -0
- package/package.json +3 -1
- package/src/assets/web-panel/.build-hash +1 -1
- package/src/assets/web-panel/assets/{ActionButton-Dme4LGax.js → ActionButton-CCj9oE5_.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-B3-5BjRm.js → Analytics-RMqXlyHE.js} +2 -2
- package/src/assets/web-panel/assets/AppLayout-CSmBboZB.css +1 -0
- package/src/assets/web-panel/assets/AppLayout-CV6gWn1r.js +1 -0
- package/src/assets/web-panel/assets/{Backup-Cih5dXcD.js → Backup-bes7wE_k.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-wLmjCc9u.js → BaseInput-BKgAovqI.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-CRfTuSl8.js → Chat-Duckao6i.js} +2 -2
- package/src/assets/web-panel/assets/{Checkbox-BfbEUJDW.js → Checkbox-BaBBUZnH.js} +1 -1
- package/src/assets/web-panel/assets/{Col-HJI40OzO.js → Col-B6iQKzFs.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-ADVAwcbQ.js → Compact-Fwt0CbI5.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-BLRUoSoO.js → Cowork-DNy50_Cp.js} +3 -3
- package/src/assets/web-panel/assets/{Cron-DcNB5TYu.js → Cron-CBREJypB.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-p_Wuj0Un.js → Dashboard-DnJ1aZvj.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-CrXGzreQ.js → Dropdown-B3vdFzOi.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-B97Dibo2.js → FormItemContext-RYn2zMn5.js} +1 -1
- package/src/assets/web-panel/assets/{Git-90CPsOOr.js → Git-7TolKe3c.js} +2 -2
- package/src/assets/web-panel/assets/KnowledgeGraph-4b9v3wYV.js +19 -0
- package/src/assets/web-panel/assets/KnowledgeGraph-U8ps3aGJ.css +1 -0
- package/src/assets/web-panel/assets/{Logs-0SXs6Eyx.js → Logs-BZgM3Q4b.js} +2 -2
- package/src/assets/web-panel/assets/{McpTools-VVSCkpV2.js → McpTools-5Wrif1R_.js} +2 -2
- package/src/assets/web-panel/assets/{Memory-B_3zNQNB.js → Memory-D8YRnt51.js} +2 -2
- package/src/assets/web-panel/assets/{Notes-DNQz9UXh.js → Notes-CWTUG8hk.js} +2 -2
- package/src/assets/web-panel/assets/{Organization-CgXUnp-W.js → Organization-DvJzrIES.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-BVsn6SM5.js → Overflow-tpvXbZkh.js} +1 -1
- package/src/assets/web-panel/assets/{OverrideContext-7M2Kv4Ru.js → OverrideContext-9ePmgwvW.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-DGPIG-9j.js → P2P-C-AoKbTs.js} +2 -2
- package/src/assets/web-panel/assets/{Permissions-DIFqcnjU.js → Permissions-cIclKlQB.js} +3 -3
- package/src/assets/web-panel/assets/Portal-DXIqogG2.js +1 -0
- package/src/assets/web-panel/assets/{Projects-Bzn-dJ59.js → Projects-CDKdsdit.js} +2 -2
- package/src/assets/web-panel/assets/{Providers-mscN7CK5.js → Providers-C33u4Mka.js} +2 -2
- package/src/assets/web-panel/assets/{Row-BFUWxIkx.js → Row-DVscVTtp.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-Dpa4h-q_.js → RssFeed-CGC4w7VD.js} +3 -3
- package/src/assets/web-panel/assets/{Security-DR6HKo_S.js → Security-ymR0We-P.js} +3 -3
- package/src/assets/web-panel/assets/{Services-CDh7r75R.js → Services-Gydt4uVC.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-VNikEgM4.js → Skeleton-CfLdvEpu.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-Dk9Cp1NG.js → Skills-C_SrPIFZ.js} +1 -1
- package/src/assets/web-panel/assets/Tasks-BchvT4YD.js +1 -0
- package/src/assets/web-panel/assets/{Templates-Ny_4GO6a.js → Templates-Bj1wDexb.js} +1 -1
- package/src/assets/web-panel/assets/Trigger-CIW_GVYA.js +1 -0
- package/src/assets/web-panel/assets/{VideoEditing-BNRFHgJ9.js → VideoEditing-CQOwjQFu.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-BUfg4IAx.js → Wallet-0kSZ-ENs.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-Cia89OyQ.js → WebAuthn-CrZlAr6l.js} +5 -5
- package/src/assets/web-panel/assets/{WorkflowEditor-C1OsMtqv.js → WorkflowEditor-DbdF8700.js} +1 -1
- package/src/assets/web-panel/assets/{chat-B2uGA8wN.js → chat-BNXQJRrX.js} +1 -1
- package/src/assets/web-panel/assets/{collapseMotion-DnZigkzG.js → collapseMotion-CSS8MlIE.js} +1 -1
- package/src/assets/web-panel/assets/{colors-C_wDMX2Q.js → colors-BgoKrIXh.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-C1ikzEN-.js → compact-item-COAuztwB.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-XExBTk9v.js → createContext-BTceykzK.js} +1 -1
- package/src/assets/web-panel/assets/{hasIn-mXvd_Kdq.js → hasIn-BNooGgXx.js} +1 -1
- package/src/assets/web-panel/assets/{icons-CpgFsfkd.js → icons-DzieZiVh.js} +4 -4
- package/src/assets/web-panel/assets/index-4C1c4hkZ.js +36 -0
- package/src/assets/web-panel/assets/{index-Dz6RDRcu.js → index-81NIDNcI.js} +2 -2
- package/src/assets/web-panel/assets/{index-a0qENb5U.js → index-B7gZm05C.js} +1 -1
- package/src/assets/web-panel/assets/{index-CTle6zcb.js → index-BAPulPv1.js} +2 -2
- package/src/assets/web-panel/assets/{index-qtDQSqTG.js → index-BEbmwv5T.js} +2 -2
- package/src/assets/web-panel/assets/{index-D1eekAaa.js → index-BLzkplpf.js} +3 -3
- package/src/assets/web-panel/assets/{index-BBOVB9YK.js → index-BMU9I-F6.js} +1 -1
- package/src/assets/web-panel/assets/{index-D6Hyy0Bc.js → index-BRBeeCRz.js} +2 -2
- package/src/assets/web-panel/assets/index-BbBjevdP.js +1 -0
- package/src/assets/web-panel/assets/{index-kLUQdSDJ.js → index-Bjf02LQY.js} +2 -2
- package/src/assets/web-panel/assets/index-Bn7dXbEh.js +1 -0
- package/src/assets/web-panel/assets/index-BqJS8Rje.js +1 -0
- package/src/assets/web-panel/assets/{index-LpE6Six-.js → index-C1BBkQIj.js} +4 -4
- package/src/assets/web-panel/assets/{index-CxwU-EjS.js → index-C4YPr8e8.js} +1 -1
- package/src/assets/web-panel/assets/{index-lPIeHtHE.js → index-C7uW3zj4.js} +1 -1
- package/src/assets/web-panel/assets/{index-DMcLOtIo.js → index-CZ3YetO8.js} +1 -1
- package/src/assets/web-panel/assets/{index-Du7KGlCP.js → index-Cf1n_3VC.js} +1 -1
- package/src/assets/web-panel/assets/{index-DwMlStra.js → index-CjOtB4wg.js} +3 -3
- package/src/assets/web-panel/assets/{index-DYLE4bnY.js → index-CpFrvhnj.js} +1 -1
- package/src/assets/web-panel/assets/{index-v4Oi0d0l.js → index-D1SCFE25.js} +1 -1
- package/src/assets/web-panel/assets/{index-BOqmUcij.js → index-D5wFryiJ.js} +2 -2
- package/src/assets/web-panel/assets/{index-CbpKJ2W0.js → index-D6w1kIHg.js} +1 -1
- package/src/assets/web-panel/assets/{index-CttcpCq_.js → index-DC-nDpH_.js} +2 -2
- package/src/assets/web-panel/assets/index-DDgwb3KP.js +1 -0
- package/src/assets/web-panel/assets/index-DYDvGZbQ.js +1 -0
- package/src/assets/web-panel/assets/index-DbxkO9Uy.js +1 -0
- package/src/assets/web-panel/assets/index-DeN7D3FZ.js +1 -0
- package/src/assets/web-panel/assets/{index-DZjQgmBq.js → index-DnoNK5Gb.js} +1 -1
- package/src/assets/web-panel/assets/{index-D_oSE2Nk.js → index-KEQgDCwj.js} +5 -5
- package/src/assets/web-panel/assets/{index-C53dnYiq.js → index-O-dqdn3q.js} +2 -2
- package/src/assets/web-panel/assets/{index-DJkIheU6.js → index-Z5CuKqcS.js} +1 -1
- package/src/assets/web-panel/assets/{index-fLUJs2Sr.js → index-Z9wFemG0.js} +2 -2
- package/src/assets/web-panel/assets/{index-D9tzxSFs.js → index-cF6gfPY3.js} +1 -1
- package/src/assets/web-panel/assets/{index-BL27IhbN.js → index-eVLTVVvL.js} +1 -1
- package/src/assets/web-panel/assets/{index-CMYADk0v.js → index-g7FAcG7B.js} +1 -1
- package/src/assets/web-panel/assets/{index-BirLVqrC.js → index-lrfnKtkl.js} +1 -1
- package/src/assets/web-panel/assets/{index-jg5cpQg9.js → index-nw5SqpgZ.js} +2 -2
- package/src/assets/web-panel/assets/{index-BFFb9yPd.js → index-vHj3UTBK.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-DOj2K4bh.js → initDefaultProps-_t-PG0bz.js} +1 -1
- package/src/assets/web-panel/assets/{motion-joGf7r-l.js → motion-DPnqtODq.js} +2 -2
- package/src/assets/web-panel/assets/{move-Cwb6tumJ.js → move-kO9NQRyb.js} +1 -1
- package/src/assets/web-panel/assets/{omit-CPycjJ8C.js → omit-DD9MqVt0.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-CnibXC3T.js → pickAttrs-D4u5AYq1.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-DWcIO1y4.js → placementArrow-BUkUxlJc.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-C5giLhLf.js → responsiveObserve-DA_o8FHw.js} +1 -1
- package/src/assets/web-panel/assets/{slide-zwgmm7vM.js → slide-DSmAtCrK.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-CK8tJSHq.js → statusUtils-Bn00xQ4D.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-BzLSEXyu.js → styleChecker-phGTLjuN.js} +1 -1
- package/src/assets/web-panel/assets/{transition-D4AbuDdO.js → transition-exl3w1iN.js} +1 -1
- package/src/assets/web-panel/assets/{useConfigInject-ImjEZhXr.js → useConfigInject-C2E3Qsop.js} +2 -2
- package/src/assets/web-panel/assets/useFlexGapSupport-tlovsMBV.js +1 -0
- package/src/assets/web-panel/assets/{useMergedState-CXfbNKuO.js → useMergedState-DUMpRiCy.js} +1 -1
- package/src/assets/web-panel/assets/{useRefs-DwsdQTxa.js → useRefs-C8A7zAB_.js} +1 -1
- package/src/assets/web-panel/assets/{useState-DRbnp348.js → useState-CSbzOa8O.js} +1 -1
- package/src/assets/web-panel/assets/{vendor-C5RM7MZO.js → vendor-aH7YaPZi.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-DAWimP6X.js → vnode-CIbqhcnZ.js} +1 -1
- package/src/assets/web-panel/assets/{ws-D-sl0vsW.js → ws-BTS8ehTm.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-u6SXbmzZ.js → zoom-Ck9WbYsZ.js} +1 -1
- package/src/assets/web-panel/index.html +3 -3
- package/src/commands/mtc.js +786 -0
- package/src/commands/pack.js +463 -0
- package/src/commands/ui.js +6 -0
- package/src/gateways/ws/ws-server.js +49 -5
- package/src/index.js +37 -1
- package/src/lib/governance-v2-helpers.js +109 -0
- package/src/lib/packer/config-template-builder.js +151 -0
- package/src/lib/packer/errors.js +30 -0
- package/src/lib/packer/index.js +383 -0
- package/src/lib/packer/manifest-writer.js +93 -0
- package/src/lib/packer/native-prebuild-collector.js +305 -0
- package/src/lib/packer/pack-update-applier.js +203 -0
- package/src/lib/packer/pack-update-checker.js +185 -0
- package/src/lib/packer/pack-update-downloader.js +162 -0
- package/src/lib/packer/pkg-config-generator.js +325 -0
- package/src/lib/packer/pkg-runner.js +193 -0
- package/src/lib/packer/precheck.js +273 -0
- package/src/lib/packer/project-assets-collector.js +0 -0
- package/src/lib/packer/smoke-runner.js +339 -0
- package/src/lib/packer/web-panel-builder.js +157 -0
- package/src/lib/web-ui-server.js +95 -2
- package/src/lib/ws-server.js +1 -0
- package/src/runtime/agent-runtime.js +1 -0
- package/src/runtime/policies/agent-policy.js +1 -0
- package/src/assets/web-panel/assets/AppLayout-DvVLRyPs.js +0 -1
- package/src/assets/web-panel/assets/AppLayout-nff99EgA.css +0 -1
- package/src/assets/web-panel/assets/Portal-CFB5Y97t.js +0 -1
- package/src/assets/web-panel/assets/Tasks-CfHL1NrP.js +0 -1
- package/src/assets/web-panel/assets/Trigger-C7MTh_xj.js +0 -1
- package/src/assets/web-panel/assets/index-1ZqkTPt2.js +0 -1
- package/src/assets/web-panel/assets/index-B-TI0cZ2.js +0 -1
- package/src/assets/web-panel/assets/index-B6P9mWuk.js +0 -1
- package/src/assets/web-panel/assets/index-BfncNR8d.js +0 -1
- package/src/assets/web-panel/assets/index-C5Zv4fBx.js +0 -1
- package/src/assets/web-panel/assets/index-DQgS_8Fd.js +0 -1
- package/src/assets/web-panel/assets/index-DaMG8ksh.js +0 -36
- package/src/assets/web-panel/assets/index-f4W8Sok0.js +0 -1
- package/src/assets/web-panel/assets/useFlexGapSupport-Cd-PoTMl.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as p,w as it,a as lt,c as rt,b as st,d as ct,e as ut,D as dt,f as ft,s as vt}from"./index-DaMG8ksh.js";import{l as fe,_ as T,c as R,g as we,m as Ne,r as Oe,w as mt,u as Me,j as z,k as pt,n as gt,o as Ct,p as yt,q as $t,L as ht,s as xt,v as ve,x as bt,y as Pt,z as It}from"./useConfigInject-ImjEZhXr.js";import{d as L,a as V,w as q,p as _t,l as ke,M as St,c as g,U as wt,j as P,V as Te,r as Ee,W as Nt,X as ye,s as K,f as me}from"./vendor-C5RM7MZO.js";import{a as Ae}from"./transition-D4AbuDdO.js";import{v as pe,ae as ee,af as te,u as ne,ag as oe,a4 as ge,ac as Ot,ad as Mt,I as kt,O as Tt,T as re,g as $e}from"./icons-CpgFsfkd.js";import{K as H}from"./Keyframes-C7fCrnlS.js";import{P as Et,g as At}from"./Portal-CFB5Y97t.js";let Q=p({},fe.Modal);function Rt(e){e?Q=p(p({},Q),e):Q=p({},fe.Modal)}function Dn(){return Q}const ce="internalMark",J=L({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup(e,t){let{slots:o}=t;lt(e.ANT_MARK__===ce);const n=V({antLocale:p(p({},e.locale),{exist:!0}),ANT_MARK__:ce});return _t("localeData",n),q(()=>e.locale,a=>{Rt(a&&a.Modal),n.antLocale=p(p({},a),{exist:!0})},{immediate:!0}),()=>{var a;return(a=o.default)===null||a===void 0?void 0:a.call(o)}}});J.install=function(e){return e.component(J.name,J),e};const Lt=it(J),Re=L({name:"Notice",inheritAttrs:!1,props:["prefixCls","duration","updateMark","noticeKey","closeIcon","closable","props","onClick","onClose","holder","visible"],setup(e,t){let{attrs:o,slots:n}=t,a,m=!1;const s=P(()=>e.duration===void 0?4.5:e.duration),d=()=>{s.value&&!m&&(a=setTimeout(()=>{l()},s.value*1e3))},f=()=>{a&&(clearTimeout(a),a=null)},l=c=>{c&&c.stopPropagation(),f();const{onClose:u,noticeKey:v}=e;u&&u(v)},r=()=>{f(),d()};return ke(()=>{d()}),St(()=>{m=!0,f()}),q([s,()=>e.updateMark,()=>e.visible],(c,u)=>{let[v,y,C]=c,[x,h,I]=u;(v!==x||y!==h||C!==I&&I)&&r()},{flush:"post"}),()=>{var c,u;const{prefixCls:v,closable:y,closeIcon:C=(c=n.closeIcon)===null||c===void 0?void 0:c.call(n),onClick:x,holder:h}=e,{class:I,style:N}=o,b=`${v}-notice`,_=Object.keys(o).reduce((S,O)=>((O.startsWith("data-")||O.startsWith("aria-")||O==="role")&&(S[O]=o[O]),S),{}),w=g("div",T({class:R(b,I,{[`${b}-closable`]:y}),style:N,onMouseenter:f,onMouseleave:d,onClick:x},_),[g("div",{class:`${b}-content`},[(u=n.default)===null||u===void 0?void 0:u.call(n)]),y?g("a",{tabindex:0,onClick:l,class:`${b}-close`},[C||g("span",{class:`${b}-close-x`},null)]):null]);return h?g(wt,{to:h},{default:()=>w}):w}}});var jt=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};let he=0;const Ft=Date.now();function xe(){const e=he;return he+=1,`rcNotification_${Ft}_${e}`}const Z=L({name:"Notification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId"],setup(e,t){let{attrs:o,expose:n,slots:a}=t;const m=new Map,s=Ee([]),d=P(()=>{const{prefixCls:r,animation:c="fade"}=e;let u=e.transitionName;return!u&&c&&(u=`${r}-${c}`),Ae(u)}),f=(r,c)=>{const u=r.key||xe(),v=p(p({},r),{key:u}),{maxCount:y}=e,C=s.value.map(h=>h.notice.key).indexOf(u),x=s.value.concat();C!==-1?x.splice(C,1,{notice:v,holderCallback:c}):(y&&s.value.length>=y&&(v.key=x[0].notice.key,v.updateMark=xe(),v.userPassKey=u,x.shift()),x.push({notice:v,holderCallback:c})),s.value=x},l=r=>{s.value=Nt(s.value).filter(c=>{let{notice:{key:u,userPassKey:v}}=c;return(v||u)!==r})};return n({add:f,remove:l,notices:s}),()=>{var r;const{prefixCls:c,closeIcon:u=(r=a.closeIcon)===null||r===void 0?void 0:r.call(a,{prefixCls:c})}=e,v=s.value.map((C,x)=>{let{notice:h,holderCallback:I}=C;const N=x===s.value.length-1?h.updateMark:void 0,{key:b,userPassKey:_}=h,{content:w}=h,S=p(p(p({prefixCls:c,closeIcon:typeof u=="function"?u({prefixCls:c}):u},h),h.props),{key:b,noticeKey:_||b,updateMark:N,onClose:O=>{var E;l(O),(E=h.onClose)===null||E===void 0||E.call(h)},onClick:h.onClick});return I?g("div",{key:b,class:`${c}-hook-holder`,ref:O=>{typeof b>"u"||(O?(m.set(b,O),I(O,S)):m.delete(b))}},null):g(Re,T(T({},S),{},{class:R(S.class,e.hashId)}),{default:()=>[typeof w=="function"?w({prefixCls:c}):w]})}),y={[c]:1,[o.class]:!!o.class,[e.hashId]:!0};return g("div",{class:y,style:o.style||{top:"65px",left:"50%"}},[g(Te,T({tag:"div"},d.value),{default:()=>[v]})])}}});Z.newInstance=function(t,o){const n=t||{},{name:a="notification",getContainer:m,appContext:s,prefixCls:d,rootPrefixCls:f,transitionName:l,hasTransitionName:r,useStyle:c}=n,u=jt(n,["name","getContainer","appContext","prefixCls","rootPrefixCls","transitionName","hasTransitionName","useStyle"]),v=document.createElement("div");m?m().appendChild(v):document.body.appendChild(v);const y=L({compatConfig:{MODE:3},name:"NotificationWrapper",setup(x,h){let{attrs:I}=h;const N=K(),b=P(()=>k.getPrefixCls(a,d)),[,_]=c(b);return ke(()=>{o({notice(w){var S;(S=N.value)===null||S===void 0||S.add(w)},removeNotice(w){var S;(S=N.value)===null||S===void 0||S.remove(w)},destroy(){ye(null,v),v.parentNode&&v.parentNode.removeChild(v)},component:N})}),()=>{const w=k,S=w.getRootPrefixCls(f,b.value),O=r?l:`${b.value}-${l}`;return g(G,T(T({},w),{},{prefixCls:S}),{default:()=>[g(Z,T(T({ref:N},I),{},{prefixCls:b.value,transitionName:O,hashId:_.value}),null)]})}}}),C=g(y,u);C.appContext=s||C.appContext,ye(C,v)};let be=0;const Dt=Date.now();function Pe(){const e=be;return be+=1,`rcNotification_${Dt}_${e}`}const Ht=L({name:"HookNotification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId","remove","notices","getStyles","getClassName","onAllRemoved","getContainer"],setup(e,t){let{attrs:o,slots:n}=t;const a=new Map,m=P(()=>e.notices),s=P(()=>{let r=e.transitionName;if(!r&&e.animation)switch(typeof e.animation){case"string":r=e.animation;break;case"function":r=e.animation().name;break;case"object":r=e.animation.name;break;default:r=`${e.prefixCls}-fade`;break}return Ae(r)}),d=r=>e.remove(r),f=Ee({});q(m,()=>{const r={};Object.keys(f.value).forEach(c=>{r[c]=[]}),e.notices.forEach(c=>{const{placement:u="topRight"}=c.notice;u&&(r[u]=r[u]||[],r[u].push(c))}),f.value=r});const l=P(()=>Object.keys(f.value));return()=>{var r;const{prefixCls:c,closeIcon:u=(r=n.closeIcon)===null||r===void 0?void 0:r.call(n,{prefixCls:c})}=e,v=l.value.map(y=>{var C,x;const h=f.value[y],I=(C=e.getClassName)===null||C===void 0?void 0:C.call(e,y),N=(x=e.getStyles)===null||x===void 0?void 0:x.call(e,y),b=h.map((S,O)=>{let{notice:E,holderCallback:Y}=S;const ae=O===m.value.length-1?E.updateMark:void 0,{key:j,userPassKey:ie}=E,{content:W}=E,i=p(p(p({prefixCls:c,closeIcon:typeof u=="function"?u({prefixCls:c}):u},E),E.props),{key:j,noticeKey:ie||j,updateMark:ae,onClose:$=>{var M;d($),(M=E.onClose)===null||M===void 0||M.call(E)},onClick:E.onClick});return Y?g("div",{key:j,class:`${c}-hook-holder`,ref:$=>{typeof j>"u"||($?(a.set(j,$),Y($,i)):a.delete(j))}},null):g(Re,T(T({},i),{},{class:R(i.class,e.hashId)}),{default:()=>[typeof W=="function"?W({prefixCls:c}):W]})}),_={[c]:1,[`${c}-${y}`]:1,[o.class]:!!o.class,[e.hashId]:!0,[I]:!!I};function w(){var S;h.length>0||(Reflect.deleteProperty(f.value,y),(S=e.onAllRemoved)===null||S===void 0||S.call(e))}return g("div",{key:y,class:_,style:o.style||N||{top:"65px",left:"50%"}},[g(Te,T(T({tag:"div"},s.value),{},{onAfterLeave:w}),{default:()=>[b]})])});return g(Et,{getContainer:e.getContainer},{default:()=>[v]})}}});var zt=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};const Kt=()=>document.body;let Ie=0;function Bt(){const e={};for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return o.forEach(a=>{a&&Object.keys(a).forEach(m=>{const s=a[m];s!==void 0&&(e[m]=s)})}),e}function Le(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{getContainer:t=Kt,motion:o,prefixCls:n,maxCount:a,getClassName:m,getStyles:s,onAllRemoved:d}=e,f=zt(e,["getContainer","motion","prefixCls","maxCount","getClassName","getStyles","onAllRemoved"]),l=K([]),r=K(),c=(h,I)=>{const N=h.key||Pe(),b=p(p({},h),{key:N}),_=l.value.map(S=>S.notice.key).indexOf(N),w=l.value.concat();_!==-1?w.splice(_,1,{notice:b,holderCallback:I}):(a&&l.value.length>=a&&(b.key=w[0].notice.key,b.updateMark=Pe(),b.userPassKey=N,w.shift()),w.push({notice:b,holderCallback:I})),l.value=w},u=h=>{l.value=l.value.filter(I=>{let{notice:{key:N,userPassKey:b}}=I;return(b||N)!==h})},v=()=>{l.value=[]},y=()=>g(Ht,{ref:r,prefixCls:n,maxCount:a,notices:l.value,remove:u,getClassName:m,getStyles:s,animation:o,hashId:e.hashId,onAllRemoved:d,getContainer:t},null),C=K([]),x={open:h=>{const I=Bt(f,h);(I.key===null||I.key===void 0)&&(I.key=`vc-notification-${Ie}`,Ie+=1),C.value=[...C.value,{type:"open",config:I}]},close:h=>{C.value=[...C.value,{type:"close",key:h}]},destroy:()=>{C.value=[...C.value,{type:"destroy"}]}};return q(C,()=>{C.value.length&&(C.value.forEach(h=>{switch(h.type){case"open":c(h.config);break;case"close":u(h.key);break;case"destroy":v();break}}),C.value=[])}),[x,y]}const Gt=e=>{const{componentCls:t,iconCls:o,boxShadowSecondary:n,colorBgElevated:a,colorSuccess:m,colorError:s,colorWarning:d,colorInfo:f,fontSizeLG:l,motionEaseInOutCirc:r,motionDurationSlow:c,marginXS:u,paddingXS:v,borderRadiusLG:y,zIndexPopup:C,messageNoticeContentPadding:x}=e,h=new H("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:v,transform:"translateY(0)",opacity:1}}),I=new H("MessageMoveOut",{"0%":{maxHeight:e.height,padding:v,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}});return[{[t]:p(p({},Oe(e)),{position:"fixed",top:u,left:"50%",transform:"translateX(-50%)",width:"100%",pointerEvents:"none",zIndex:C,[`${t}-move-up`]:{animationFillMode:"forwards"},[`
|
|
1
|
+
import{_ as p,w as it,a as lt,c as rt,b as st,d as ct,e as ut,D as dt,f as ft,s as vt}from"./index-4C1c4hkZ.js";import{l as fe,_ as T,c as R,g as we,m as Ne,r as Oe,w as mt,u as Me,d as z,e as pt,h as gt,j as Ct,k as yt,n as $t,L as ht,o as xt,p as ve,q as bt,s as Pt,t as It}from"./useConfigInject-C2E3Qsop.js";import{d as L,a as V,w as Y,p as _t,l as ke,M as St,c as g,V as wt,j as P,W as Te,r as Ee,X as Nt,Y as ye,s as K,f as me}from"./vendor-aH7YaPZi.js";import{a as Ae}from"./transition-exl3w1iN.js";import{w as pe,ag as ee,ah as te,v as ne,ai as oe,a7 as ge,ae as Ot,af as Mt,I as kt,Q as Tt,T as re,g as $e}from"./icons-DzieZiVh.js";import{K as H}from"./Keyframes-C7fCrnlS.js";import{P as Et,g as At}from"./Portal-DXIqogG2.js";let Q=p({},fe.Modal);function Rt(e){e?Q=p(p({},Q),e):Q=p({},fe.Modal)}function Dn(){return Q}const ce="internalMark",J=L({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup(e,t){let{slots:o}=t;lt(e.ANT_MARK__===ce);const n=V({antLocale:p(p({},e.locale),{exist:!0}),ANT_MARK__:ce});return _t("localeData",n),Y(()=>e.locale,a=>{Rt(a&&a.Modal),n.antLocale=p(p({},a),{exist:!0})},{immediate:!0}),()=>{var a;return(a=o.default)===null||a===void 0?void 0:a.call(o)}}});J.install=function(e){return e.component(J.name,J),e};const Lt=it(J),Re=L({name:"Notice",inheritAttrs:!1,props:["prefixCls","duration","updateMark","noticeKey","closeIcon","closable","props","onClick","onClose","holder","visible"],setup(e,t){let{attrs:o,slots:n}=t,a,m=!1;const s=P(()=>e.duration===void 0?4.5:e.duration),d=()=>{s.value&&!m&&(a=setTimeout(()=>{l()},s.value*1e3))},f=()=>{a&&(clearTimeout(a),a=null)},l=c=>{c&&c.stopPropagation(),f();const{onClose:u,noticeKey:v}=e;u&&u(v)},r=()=>{f(),d()};return ke(()=>{d()}),St(()=>{m=!0,f()}),Y([s,()=>e.updateMark,()=>e.visible],(c,u)=>{let[v,y,C]=c,[x,h,I]=u;(v!==x||y!==h||C!==I&&I)&&r()},{flush:"post"}),()=>{var c,u;const{prefixCls:v,closable:y,closeIcon:C=(c=n.closeIcon)===null||c===void 0?void 0:c.call(n),onClick:x,holder:h}=e,{class:I,style:N}=o,b=`${v}-notice`,_=Object.keys(o).reduce((S,O)=>((O.startsWith("data-")||O.startsWith("aria-")||O==="role")&&(S[O]=o[O]),S),{}),w=g("div",T({class:R(b,I,{[`${b}-closable`]:y}),style:N,onMouseenter:f,onMouseleave:d,onClick:x},_),[g("div",{class:`${b}-content`},[(u=n.default)===null||u===void 0?void 0:u.call(n)]),y?g("a",{tabindex:0,onClick:l,class:`${b}-close`},[C||g("span",{class:`${b}-close-x`},null)]):null]);return h?g(wt,{to:h},{default:()=>w}):w}}});var jt=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};let he=0;const Ft=Date.now();function xe(){const e=he;return he+=1,`rcNotification_${Ft}_${e}`}const Z=L({name:"Notification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId"],setup(e,t){let{attrs:o,expose:n,slots:a}=t;const m=new Map,s=Ee([]),d=P(()=>{const{prefixCls:r,animation:c="fade"}=e;let u=e.transitionName;return!u&&c&&(u=`${r}-${c}`),Ae(u)}),f=(r,c)=>{const u=r.key||xe(),v=p(p({},r),{key:u}),{maxCount:y}=e,C=s.value.map(h=>h.notice.key).indexOf(u),x=s.value.concat();C!==-1?x.splice(C,1,{notice:v,holderCallback:c}):(y&&s.value.length>=y&&(v.key=x[0].notice.key,v.updateMark=xe(),v.userPassKey=u,x.shift()),x.push({notice:v,holderCallback:c})),s.value=x},l=r=>{s.value=Nt(s.value).filter(c=>{let{notice:{key:u,userPassKey:v}}=c;return(v||u)!==r})};return n({add:f,remove:l,notices:s}),()=>{var r;const{prefixCls:c,closeIcon:u=(r=a.closeIcon)===null||r===void 0?void 0:r.call(a,{prefixCls:c})}=e,v=s.value.map((C,x)=>{let{notice:h,holderCallback:I}=C;const N=x===s.value.length-1?h.updateMark:void 0,{key:b,userPassKey:_}=h,{content:w}=h,S=p(p(p({prefixCls:c,closeIcon:typeof u=="function"?u({prefixCls:c}):u},h),h.props),{key:b,noticeKey:_||b,updateMark:N,onClose:O=>{var E;l(O),(E=h.onClose)===null||E===void 0||E.call(h)},onClick:h.onClick});return I?g("div",{key:b,class:`${c}-hook-holder`,ref:O=>{typeof b>"u"||(O?(m.set(b,O),I(O,S)):m.delete(b))}},null):g(Re,T(T({},S),{},{class:R(S.class,e.hashId)}),{default:()=>[typeof w=="function"?w({prefixCls:c}):w]})}),y={[c]:1,[o.class]:!!o.class,[e.hashId]:!0};return g("div",{class:y,style:o.style||{top:"65px",left:"50%"}},[g(Te,T({tag:"div"},d.value),{default:()=>[v]})])}}});Z.newInstance=function(t,o){const n=t||{},{name:a="notification",getContainer:m,appContext:s,prefixCls:d,rootPrefixCls:f,transitionName:l,hasTransitionName:r,useStyle:c}=n,u=jt(n,["name","getContainer","appContext","prefixCls","rootPrefixCls","transitionName","hasTransitionName","useStyle"]),v=document.createElement("div");m?m().appendChild(v):document.body.appendChild(v);const y=L({compatConfig:{MODE:3},name:"NotificationWrapper",setup(x,h){let{attrs:I}=h;const N=K(),b=P(()=>k.getPrefixCls(a,d)),[,_]=c(b);return ke(()=>{o({notice(w){var S;(S=N.value)===null||S===void 0||S.add(w)},removeNotice(w){var S;(S=N.value)===null||S===void 0||S.remove(w)},destroy(){ye(null,v),v.parentNode&&v.parentNode.removeChild(v)},component:N})}),()=>{const w=k,S=w.getRootPrefixCls(f,b.value),O=r?l:`${b.value}-${l}`;return g(G,T(T({},w),{},{prefixCls:S}),{default:()=>[g(Z,T(T({ref:N},I),{},{prefixCls:b.value,transitionName:O,hashId:_.value}),null)]})}}}),C=g(y,u);C.appContext=s||C.appContext,ye(C,v)};let be=0;const Dt=Date.now();function Pe(){const e=be;return be+=1,`rcNotification_${Dt}_${e}`}const Ht=L({name:"HookNotification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId","remove","notices","getStyles","getClassName","onAllRemoved","getContainer"],setup(e,t){let{attrs:o,slots:n}=t;const a=new Map,m=P(()=>e.notices),s=P(()=>{let r=e.transitionName;if(!r&&e.animation)switch(typeof e.animation){case"string":r=e.animation;break;case"function":r=e.animation().name;break;case"object":r=e.animation.name;break;default:r=`${e.prefixCls}-fade`;break}return Ae(r)}),d=r=>e.remove(r),f=Ee({});Y(m,()=>{const r={};Object.keys(f.value).forEach(c=>{r[c]=[]}),e.notices.forEach(c=>{const{placement:u="topRight"}=c.notice;u&&(r[u]=r[u]||[],r[u].push(c))}),f.value=r});const l=P(()=>Object.keys(f.value));return()=>{var r;const{prefixCls:c,closeIcon:u=(r=n.closeIcon)===null||r===void 0?void 0:r.call(n,{prefixCls:c})}=e,v=l.value.map(y=>{var C,x;const h=f.value[y],I=(C=e.getClassName)===null||C===void 0?void 0:C.call(e,y),N=(x=e.getStyles)===null||x===void 0?void 0:x.call(e,y),b=h.map((S,O)=>{let{notice:E,holderCallback:q}=S;const ae=O===m.value.length-1?E.updateMark:void 0,{key:j,userPassKey:ie}=E,{content:U}=E,i=p(p(p({prefixCls:c,closeIcon:typeof u=="function"?u({prefixCls:c}):u},E),E.props),{key:j,noticeKey:ie||j,updateMark:ae,onClose:$=>{var M;d($),(M=E.onClose)===null||M===void 0||M.call(E)},onClick:E.onClick});return q?g("div",{key:j,class:`${c}-hook-holder`,ref:$=>{typeof j>"u"||($?(a.set(j,$),q($,i)):a.delete(j))}},null):g(Re,T(T({},i),{},{class:R(i.class,e.hashId)}),{default:()=>[typeof U=="function"?U({prefixCls:c}):U]})}),_={[c]:1,[`${c}-${y}`]:1,[o.class]:!!o.class,[e.hashId]:!0,[I]:!!I};function w(){var S;h.length>0||(Reflect.deleteProperty(f.value,y),(S=e.onAllRemoved)===null||S===void 0||S.call(e))}return g("div",{key:y,class:_,style:o.style||N||{top:"65px",left:"50%"}},[g(Te,T(T({tag:"div"},s.value),{},{onAfterLeave:w}),{default:()=>[b]})])});return g(Et,{getContainer:e.getContainer},{default:()=>[v]})}}});var zt=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};const Kt=()=>document.body;let Ie=0;function Bt(){const e={};for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return o.forEach(a=>{a&&Object.keys(a).forEach(m=>{const s=a[m];s!==void 0&&(e[m]=s)})}),e}function Le(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{getContainer:t=Kt,motion:o,prefixCls:n,maxCount:a,getClassName:m,getStyles:s,onAllRemoved:d}=e,f=zt(e,["getContainer","motion","prefixCls","maxCount","getClassName","getStyles","onAllRemoved"]),l=K([]),r=K(),c=(h,I)=>{const N=h.key||Pe(),b=p(p({},h),{key:N}),_=l.value.map(S=>S.notice.key).indexOf(N),w=l.value.concat();_!==-1?w.splice(_,1,{notice:b,holderCallback:I}):(a&&l.value.length>=a&&(b.key=w[0].notice.key,b.updateMark=Pe(),b.userPassKey=N,w.shift()),w.push({notice:b,holderCallback:I})),l.value=w},u=h=>{l.value=l.value.filter(I=>{let{notice:{key:N,userPassKey:b}}=I;return(b||N)!==h})},v=()=>{l.value=[]},y=()=>g(Ht,{ref:r,prefixCls:n,maxCount:a,notices:l.value,remove:u,getClassName:m,getStyles:s,animation:o,hashId:e.hashId,onAllRemoved:d,getContainer:t},null),C=K([]),x={open:h=>{const I=Bt(f,h);(I.key===null||I.key===void 0)&&(I.key=`vc-notification-${Ie}`,Ie+=1),C.value=[...C.value,{type:"open",config:I}]},close:h=>{C.value=[...C.value,{type:"close",key:h}]},destroy:()=>{C.value=[...C.value,{type:"destroy"}]}};return Y(C,()=>{C.value.length&&(C.value.forEach(h=>{switch(h.type){case"open":c(h.config);break;case"close":u(h.key);break;case"destroy":v();break}}),C.value=[])}),[x,y]}const Gt=e=>{const{componentCls:t,iconCls:o,boxShadowSecondary:n,colorBgElevated:a,colorSuccess:m,colorError:s,colorWarning:d,colorInfo:f,fontSizeLG:l,motionEaseInOutCirc:r,motionDurationSlow:c,marginXS:u,paddingXS:v,borderRadiusLG:y,zIndexPopup:C,messageNoticeContentPadding:x}=e,h=new H("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:v,transform:"translateY(0)",opacity:1}}),I=new H("MessageMoveOut",{"0%":{maxHeight:e.height,padding:v,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}});return[{[t]:p(p({},Oe(e)),{position:"fixed",top:u,left:"50%",transform:"translateX(-50%)",width:"100%",pointerEvents:"none",zIndex:C,[`${t}-move-up`]:{animationFillMode:"forwards"},[`
|
|
2
2
|
${t}-move-up-appear,
|
|
3
3
|
${t}-move-up-enter
|
|
4
4
|
`]:{animationName:h,animationDuration:c,animationPlayState:"paused",animationTimingFunction:r},[`
|
|
@@ -6,9 +6,9 @@ import{_ as p,w as it,a as lt,c as rt,b as st,d as ct,e as ut,D as dt,f as ft,s
|
|
|
6
6
|
${t}-move-up-enter${t}-move-up-enter-active
|
|
7
7
|
`]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:I,animationDuration:c,animationPlayState:"paused",animationTimingFunction:r},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[`${t}-notice`]:{padding:v,textAlign:"center",[o]:{verticalAlign:"text-bottom",marginInlineEnd:u,fontSize:l},[`${t}-notice-content`]:{display:"inline-block",padding:x,background:a,borderRadius:y,boxShadow:n,pointerEvents:"all"},[`${t}-success ${o}`]:{color:m},[`${t}-error ${o}`]:{color:s},[`${t}-warning ${o}`]:{color:d},[`
|
|
8
8
|
${t}-info ${o},
|
|
9
|
-
${t}-loading ${o}`]:{color:f}}},{[`${t}-notice-pure-panel`]:{padding:0,textAlign:"start"}}]},je=we("Message",e=>{const t=Ne(e,{messageNoticeContentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`});return[Gt(t)]},e=>({height:150,zIndexPopup:e.zIndexPopupBase+10})),Ut={info:g(oe,null,null),success:g(ne,null,null),error:g(te,null,null),warning:g(ee,null,null),loading:g(pe,null,null)},Wt=L({name:"PureContent",inheritAttrs:!1,props:["prefixCls","type","icon"],setup(e,t){let{slots:o}=t;return()=>{var n;return g("div",{class:R(`${e.prefixCls}-custom-content`,`${e.prefixCls}-${e.type}`)},[e.icon||Ut[e.type],g("span",null,[(n=o.default)===null||n===void 0?void 0:n.call(o)])])}}});var Vt=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};const Xt=8,qt=3,Yt=L({name:"Holder",inheritAttrs:!1,props:["top","prefixCls","getContainer","maxCount","duration","rtl","transitionName","onAllRemoved","animation","staticGetContainer"],setup(e,t){let{expose:o}=t;var n,a;const{getPrefixCls:m,getPopupContainer:s}=Me("message",e),d=P(()=>m("message",e.prefixCls)),[,f]=je(d),l=()=>{var C;const x=(C=e.top)!==null&&C!==void 0?C:Xt;return{left:"50%",transform:"translateX(-50%)",top:typeof x=="number"?`${x}px`:x}},r=()=>R(f.value,e.rtl?`${d.value}-rtl`:""),c=()=>{var C;return At({prefixCls:d.value,animation:(C=e.animation)!==null&&C!==void 0?C:"move-up",transitionName:e.transitionName})},u=g("span",{class:`${d.value}-close-x`},[g(ge,{class:`${d.value}-close-icon`},null)]),[v,y]=Le({getStyles:l,prefixCls:d.value,getClassName:r,motion:c,closable:!1,closeIcon:u,duration:(n=e.duration)!==null&&n!==void 0?n:qt,getContainer:(a=e.staticGetContainer)!==null&&a!==void 0?a:s.value,maxCount:e.maxCount,onAllRemoved:e.onAllRemoved});return o(p(p({},v),{prefixCls:d,hashId:f})),y}});let _e=0;function Qt(e){const t=K(null),o=Symbol("messageHolderKey"),n=f=>{var l;(l=t.value)===null||l===void 0||l.close(f)},a=f=>{if(!t.value){const _=()=>{};return _.then=()=>{},_}const{open:l,prefixCls:r,hashId:c}=t.value,u=`${r}-notice`,{content:v,icon:y,type:C,key:x,class:h,onClose:I}=f,N=Vt(f,["content","icon","type","key","class","onClose"]);let b=x;return b==null&&(_e+=1,b=`antd-message-${_e}`),mt(_=>(l(p(p({},N),{key:b,content:()=>g(Wt,{prefixCls:r,type:C,icon:typeof y=="function"?y():y},{default:()=>[typeof v=="function"?v():v]}),placement:"top",class:R(C&&`${u}-${C}`,c,h),onClose:()=>{I?.(),_()}})),()=>{n(b)}))},s={open:a,destroy:f=>{var l;f!==void 0?n(f):(l=t.value)===null||l===void 0||l.destroy()}};return["info","success","warning","error","loading"].forEach(f=>{const l=(r,c,u)=>{let v;r&&typeof r=="object"&&"content"in r?v=r:v={content:r};let y,C;typeof c=="function"?C=c:(y=c,C=u);const x=p(p({onClose:C,duration:y},v),{type:f});return a(x)};s[f]=l}),[s,()=>g(Yt,T(T({key:o},e),{},{ref:t}),null)]}function Jt(e){return Qt(e)}let Fe=3,De,A,Zt=1,He="",ze="move-up",Ke=!1,Be=()=>document.body,Ge,Ue=!1;function en(){return Zt++}function tn(e){e.top!==void 0&&(De=e.top,A=null),e.duration!==void 0&&(Fe=e.duration),e.prefixCls!==void 0&&(He=e.prefixCls),e.getContainer!==void 0&&(Be=e.getContainer,A=null),e.transitionName!==void 0&&(ze=e.transitionName,A=null,Ke=!0),e.maxCount!==void 0&&(Ge=e.maxCount,A=null),e.rtl!==void 0&&(Ue=e.rtl)}function nn(e,t){if(A){t(A);return}Z.newInstance({appContext:e.appContext,prefixCls:e.prefixCls||He,rootPrefixCls:e.rootPrefixCls,transitionName:ze,hasTransitionName:Ke,style:{top:De},getContainer:Be||e.getPopupContainer,maxCount:Ge,name:"message",useStyle:je},o=>{if(A){t(A);return}A=o,t(o)})}const We={info:oe,success:ne,error:te,warning:ee,loading:pe},on=Object.keys(We);function an(e){const t=e.duration!==void 0?e.duration:Fe,o=e.key||en(),n=new Promise(m=>{const s=()=>(typeof e.onClose=="function"&&e.onClose(),m(!0));nn(e,d=>{d.notice({key:o,duration:t,style:e.style||{},class:e.class,content:f=>{let{prefixCls:l}=f;const r=We[e.type],c=r?g(r,null,null):"",u=R(`${l}-custom-content`,{[`${l}-${e.type}`]:e.type,[`${l}-rtl`]:Ue===!0});return g("div",{class:u},[typeof e.icon=="function"?e.icon():e.icon||c,g("span",null,[typeof e.content=="function"?e.content():e.content])])},onClose:s,onClick:e.onClick})})}),a=()=>{A&&A.removeNotice(o)};return a.then=(m,s)=>n.then(m,s),a.promise=n,a}function ln(e){return Object.prototype.toString.call(e)==="[object Object]"&&!!e.content}const X={open:an,config:tn,destroy(e){if(A)if(e){const{removeNotice:t}=A;t(e)}else{const{destroy:t}=A;t(),A=null}}};function rn(e,t){e[t]=(o,n,a)=>ln(o)?e.open(p(p({},o),{type:t})):(typeof n=="function"&&(a=n,n=void 0),e.open({content:o,duration:n,type:t,onClose:a}))}on.forEach(e=>rn(X,e));X.warn=X.warning;X.useMessage=Jt;const sn=e=>{const{componentCls:t,width:o,notificationMarginEdge:n}=e,a=new H("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),m=new H("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),s=new H("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:o},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${t}-top, &${t}-bottom`]:{marginInline:0},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:m}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:n,[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:s}}}},cn=e=>{const{iconCls:t,componentCls:o,boxShadowSecondary:n,fontSizeLG:a,notificationMarginBottom:m,borderRadiusLG:s,colorSuccess:d,colorInfo:f,colorWarning:l,colorError:r,colorTextHeading:c,notificationBg:u,notificationPadding:v,notificationMarginEdge:y,motionDurationMid:C,motionEaseInOut:x,fontSize:h,lineHeight:I,width:N,notificationIconSize:b}=e,_=`${o}-notice`,w=new H("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:N},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),S=new H("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:m,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[o]:p(p(p(p({},Oe(e)),{position:"fixed",zIndex:e.zIndexPopup,marginInlineEnd:y,[`${o}-hook-holder`]:{position:"relative"},[`&${o}-top, &${o}-bottom`]:{[`${o}-notice`]:{marginInline:"auto auto"}},[`&${o}-topLeft, &${o}-bottomLeft`]:{[`${o}-notice`]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${o}-fade-enter, ${o}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:x,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${o}-fade-leave`]:{animationTimingFunction:x,animationFillMode:"both",animationDuration:C,animationPlayState:"paused"},[`${o}-fade-enter${o}-fade-enter-active, ${o}-fade-appear${o}-fade-appear-active`]:{animationName:w,animationPlayState:"running"},[`${o}-fade-leave${o}-fade-leave-active`]:{animationName:S,animationPlayState:"running"}}),sn(e)),{"&-rtl":{direction:"rtl",[`${o}-notice-btn`]:{float:"left"}}})},{[_]:{position:"relative",width:N,maxWidth:`calc(100vw - ${y*2}px)`,marginBottom:m,marginInlineStart:"auto",padding:v,overflow:"hidden",lineHeight:I,wordWrap:"break-word",background:u,borderRadius:s,boxShadow:n,[`${o}-close-icon`]:{fontSize:h,cursor:"pointer"},[`${_}-message`]:{marginBottom:e.marginXS,color:c,fontSize:a,lineHeight:e.lineHeightLG},[`${_}-description`]:{fontSize:h},[`&${_}-closable ${_}-message`]:{paddingInlineEnd:e.paddingLG},[`${_}-with-icon ${_}-message`]:{marginBottom:e.marginXS,marginInlineStart:e.marginSM+b,fontSize:a},[`${_}-with-icon ${_}-description`]:{marginInlineStart:e.marginSM+b,fontSize:h},[`${_}-icon`]:{position:"absolute",fontSize:b,lineHeight:0,[`&-success${t}`]:{color:d},[`&-info${t}`]:{color:f},[`&-warning${t}`]:{color:l},[`&-error${t}`]:{color:r}},[`${_}-close`]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${_}-btn`]:{float:"right",marginTop:e.marginSM}}},{[`${_}-pure-panel`]:{margin:0}}]},Ve=we("Notification",e=>{const t=e.paddingMD,o=e.paddingLG,n=Ne(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:o,notificationPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,notificationMarginBottom:e.margin,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationIconSize:e.fontSizeLG*e.lineHeightLG,notificationCloseButtonSize:e.controlHeightLG*.55});return[cn(n)]},e=>({zIndexPopup:e.zIndexPopupBase+50,width:384}));function un(e,t){return t||g("span",{class:`${e}-close-x`},[g(ge,{class:`${e}-close-icon`},null)])}g(oe,null,null),g(ne,null,null),g(te,null,null),g(ee,null,null),g(pe,null,null);const dn={success:ne,info:oe,error:te,warning:ee};function fn(e){let{prefixCls:t,icon:o,type:n,message:a,description:m,btn:s}=e,d=null;if(o)d=g("span",{class:`${t}-icon`},[z(o)]);else if(n){const f=dn[n];d=g(f,{class:`${t}-icon ${t}-icon-${n}`},null)}return g("div",{class:R({[`${t}-with-icon`]:d}),role:"alert"},[d,g("div",{class:`${t}-message`},[a]),g("div",{class:`${t}-description`},[m]),s&&g("div",{class:`${t}-btn`},[s])])}function Xe(e,t,o){let n;switch(t=typeof t=="number"?`${t}px`:t,o=typeof o=="number"?`${o}px`:o,e){case"top":n={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":n={left:0,top:t,bottom:"auto"};break;case"topRight":n={right:0,top:t,bottom:"auto"};break;case"bottom":n={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:o};break;case"bottomLeft":n={left:0,top:"auto",bottom:o};break;default:n={right:0,top:"auto",bottom:o};break}return n}function vn(e){return{name:`${e}-fade`}}var mn=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};const Se=24,pn=4.5,gn=L({name:"Holder",inheritAttrs:!1,props:["prefixCls","class","type","icon","content","onAllRemoved"],setup(e,t){let{expose:o}=t;const{getPrefixCls:n,getPopupContainer:a}=Me("notification",e),m=P(()=>e.prefixCls||n("notification")),s=u=>{var v,y;return Xe(u,(v=e.top)!==null&&v!==void 0?v:Se,(y=e.bottom)!==null&&y!==void 0?y:Se)},[,d]=Ve(m),f=()=>R(d.value,{[`${m.value}-rtl`]:e.rtl}),l=()=>vn(m.value),[r,c]=Le({prefixCls:m.value,getStyles:s,getClassName:f,motion:l,closable:!0,closeIcon:un(m.value),duration:pn,getContainer:()=>{var u,v;return((u=e.getPopupContainer)===null||u===void 0?void 0:u.call(e))||((v=a.value)===null||v===void 0?void 0:v.call(a))||document.body},maxCount:e.maxCount,hashId:d.value,onAllRemoved:e.onAllRemoved});return o(p(p({},r),{prefixCls:m.value,hashId:d})),c}});function Cn(e){const t=K(null),o=Symbol("notificationHolderKey"),n=d=>{if(!t.value)return;const{open:f,prefixCls:l,hashId:r}=t.value,c=`${l}-notice`,{message:u,description:v,icon:y,type:C,btn:x,class:h}=d,I=mn(d,["message","description","icon","type","btn","class"]);return f(p(p({placement:"topRight"},I),{content:()=>g(fn,{prefixCls:c,icon:typeof y=="function"?y():y,type:C,message:typeof u=="function"?u():u,description:typeof v=="function"?v():v,btn:typeof x=="function"?x():x},null),class:R(C&&`${c}-${C}`,r,h)}))},m={open:n,destroy:d=>{var f,l;d!==void 0?(f=t.value)===null||f===void 0||f.close(d):(l=t.value)===null||l===void 0||l.destroy()}};return["success","info","warning","error"].forEach(d=>{m[d]=f=>n(p(p({},f),{type:d}))}),[m,()=>g(gn,T(T({key:o},e),{},{ref:t}),null)]}function yn(e){return Cn(e)}const D={};let qe=4.5,Ye="24px",Qe="24px",ue="",Je="topRight",Ze=()=>document.body,et=null,de=!1,tt;function $n(e){const{duration:t,placement:o,bottom:n,top:a,getContainer:m,closeIcon:s,prefixCls:d}=e;d!==void 0&&(ue=d),t!==void 0&&(qe=t),o!==void 0&&(Je=o),n!==void 0&&(Qe=typeof n=="number"?`${n}px`:n),a!==void 0&&(Ye=typeof a=="number"?`${a}px`:a),m!==void 0&&(Ze=m),s!==void 0&&(et=s),e.rtl!==void 0&&(de=e.rtl),e.maxCount!==void 0&&(tt=e.maxCount)}function hn(e,t){let{prefixCls:o,placement:n=Je,getContainer:a=Ze,top:m,bottom:s,closeIcon:d=et,appContext:f}=e;const{getPrefixCls:l}=at(),r=l("notification",o||ue),c=`${r}-${n}-${de}`,u=D[c];if(u){Promise.resolve(u).then(y=>{t(y)});return}const v=R(`${r}-${n}`,{[`${r}-rtl`]:de===!0});Z.newInstance({name:"notification",prefixCls:o||ue,useStyle:Ve,class:v,style:Xe(n,m??Ye,s??Qe),appContext:f,getContainer:a,closeIcon:y=>{let{prefixCls:C}=y;return g("span",{class:`${C}-close-x`},[z(d,{},g(ge,{class:`${C}-close-icon`},null))])},maxCount:tt,hasTransitionName:!0},y=>{D[c]=y,t(y)})}const xn={success:Tt,info:kt,error:Mt,warning:Ot};function bn(e){const{icon:t,type:o,description:n,message:a,btn:m}=e,s=e.duration===void 0?qe:e.duration;hn(e,d=>{d.notice({content:f=>{let{prefixCls:l}=f;const r=`${l}-notice`;let c=null;if(t)c=()=>g("span",{class:`${r}-icon`},[z(t)]);else if(o){const u=xn[o];c=()=>g(u,{class:`${r}-icon ${r}-icon-${o}`},null)}return g("div",{class:c?`${r}-with-icon`:""},[c&&c(),g("div",{class:`${r}-message`},[!n&&c?g("span",{class:`${r}-message-single-line-auto-margin`},null):null,z(a)]),g("div",{class:`${r}-description`},[z(n)]),m?g("span",{class:`${r}-btn`},[z(m)]):null])},duration:s,closable:!0,onClose:e.onClose,onClick:e.onClick,key:e.key,style:e.style||{},class:e.class})})}const U={open:bn,close(e){Object.keys(D).forEach(t=>Promise.resolve(D[t]).then(o=>{o.removeNotice(e)}))},config:$n,destroy(){Object.keys(D).forEach(e=>{Promise.resolve(D[e]).then(t=>{t.destroy()}),delete D[e]})}},Pn=["success","info","warning","error"];Pn.forEach(e=>{U[e]=t=>U.open(p(p({},t),{type:e}))});U.warn=U.warning;U.useNotification=yn;const In=`-ant-${Date.now()}-${Math.random()}`;function _n(e,t){const o={},n=(s,d)=>{let f=s.clone();return f=d?.(f)||f,f.toRgbString()},a=(s,d)=>{const f=new re(s),l=$e(f.toRgbString());o[`${d}-color`]=n(f),o[`${d}-color-disabled`]=l[1],o[`${d}-color-hover`]=l[4],o[`${d}-color-active`]=l[6],o[`${d}-color-outline`]=f.clone().setAlpha(.2).toRgbString(),o[`${d}-color-deprecated-bg`]=l[0],o[`${d}-color-deprecated-border`]=l[2]};if(t.primaryColor){a(t.primaryColor,"primary");const s=new re(t.primaryColor),d=$e(s.toRgbString());d.forEach((l,r)=>{o[`primary-${r+1}`]=l}),o["primary-color-deprecated-l-35"]=n(s,l=>l.lighten(35)),o["primary-color-deprecated-l-20"]=n(s,l=>l.lighten(20)),o["primary-color-deprecated-t-20"]=n(s,l=>l.tint(20)),o["primary-color-deprecated-t-50"]=n(s,l=>l.tint(50)),o["primary-color-deprecated-f-12"]=n(s,l=>l.setAlpha(l.getAlpha()*.12));const f=new re(d[0]);o["primary-color-active-deprecated-f-30"]=n(f,l=>l.setAlpha(l.getAlpha()*.3)),o["primary-color-active-deprecated-d-02"]=n(f,l=>l.darken(2))}return t.successColor&&a(t.successColor,"success"),t.warningColor&&a(t.warningColor,"warning"),t.errorColor&&a(t.errorColor,"error"),t.infoColor&&a(t.infoColor,"info"),`
|
|
9
|
+
${t}-loading ${o}`]:{color:f}}},{[`${t}-notice-pure-panel`]:{padding:0,textAlign:"start"}}]},je=we("Message",e=>{const t=Ne(e,{messageNoticeContentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`});return[Gt(t)]},e=>({height:150,zIndexPopup:e.zIndexPopupBase+10})),Wt={info:g(oe,null,null),success:g(ne,null,null),error:g(te,null,null),warning:g(ee,null,null),loading:g(pe,null,null)},Ut=L({name:"PureContent",inheritAttrs:!1,props:["prefixCls","type","icon"],setup(e,t){let{slots:o}=t;return()=>{var n;return g("div",{class:R(`${e.prefixCls}-custom-content`,`${e.prefixCls}-${e.type}`)},[e.icon||Wt[e.type],g("span",null,[(n=o.default)===null||n===void 0?void 0:n.call(o)])])}}});var Vt=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};const Xt=8,Yt=3,qt=L({name:"Holder",inheritAttrs:!1,props:["top","prefixCls","getContainer","maxCount","duration","rtl","transitionName","onAllRemoved","animation","staticGetContainer"],setup(e,t){let{expose:o}=t;var n,a;const{getPrefixCls:m,getPopupContainer:s}=Me("message",e),d=P(()=>m("message",e.prefixCls)),[,f]=je(d),l=()=>{var C;const x=(C=e.top)!==null&&C!==void 0?C:Xt;return{left:"50%",transform:"translateX(-50%)",top:typeof x=="number"?`${x}px`:x}},r=()=>R(f.value,e.rtl?`${d.value}-rtl`:""),c=()=>{var C;return At({prefixCls:d.value,animation:(C=e.animation)!==null&&C!==void 0?C:"move-up",transitionName:e.transitionName})},u=g("span",{class:`${d.value}-close-x`},[g(ge,{class:`${d.value}-close-icon`},null)]),[v,y]=Le({getStyles:l,prefixCls:d.value,getClassName:r,motion:c,closable:!1,closeIcon:u,duration:(n=e.duration)!==null&&n!==void 0?n:Yt,getContainer:(a=e.staticGetContainer)!==null&&a!==void 0?a:s.value,maxCount:e.maxCount,onAllRemoved:e.onAllRemoved});return o(p(p({},v),{prefixCls:d,hashId:f})),y}});let _e=0;function Qt(e){const t=K(null),o=Symbol("messageHolderKey"),n=f=>{var l;(l=t.value)===null||l===void 0||l.close(f)},a=f=>{if(!t.value){const _=()=>{};return _.then=()=>{},_}const{open:l,prefixCls:r,hashId:c}=t.value,u=`${r}-notice`,{content:v,icon:y,type:C,key:x,class:h,onClose:I}=f,N=Vt(f,["content","icon","type","key","class","onClose"]);let b=x;return b==null&&(_e+=1,b=`antd-message-${_e}`),mt(_=>(l(p(p({},N),{key:b,content:()=>g(Ut,{prefixCls:r,type:C,icon:typeof y=="function"?y():y},{default:()=>[typeof v=="function"?v():v]}),placement:"top",class:R(C&&`${u}-${C}`,c,h),onClose:()=>{I?.(),_()}})),()=>{n(b)}))},s={open:a,destroy:f=>{var l;f!==void 0?n(f):(l=t.value)===null||l===void 0||l.destroy()}};return["info","success","warning","error","loading"].forEach(f=>{const l=(r,c,u)=>{let v;r&&typeof r=="object"&&"content"in r?v=r:v={content:r};let y,C;typeof c=="function"?C=c:(y=c,C=u);const x=p(p({onClose:C,duration:y},v),{type:f});return a(x)};s[f]=l}),[s,()=>g(qt,T(T({key:o},e),{},{ref:t}),null)]}function Jt(e){return Qt(e)}let Fe=3,De,A,Zt=1,He="",ze="move-up",Ke=!1,Be=()=>document.body,Ge,We=!1;function en(){return Zt++}function tn(e){e.top!==void 0&&(De=e.top,A=null),e.duration!==void 0&&(Fe=e.duration),e.prefixCls!==void 0&&(He=e.prefixCls),e.getContainer!==void 0&&(Be=e.getContainer,A=null),e.transitionName!==void 0&&(ze=e.transitionName,A=null,Ke=!0),e.maxCount!==void 0&&(Ge=e.maxCount,A=null),e.rtl!==void 0&&(We=e.rtl)}function nn(e,t){if(A){t(A);return}Z.newInstance({appContext:e.appContext,prefixCls:e.prefixCls||He,rootPrefixCls:e.rootPrefixCls,transitionName:ze,hasTransitionName:Ke,style:{top:De},getContainer:Be||e.getPopupContainer,maxCount:Ge,name:"message",useStyle:je},o=>{if(A){t(A);return}A=o,t(o)})}const Ue={info:oe,success:ne,error:te,warning:ee,loading:pe},on=Object.keys(Ue);function an(e){const t=e.duration!==void 0?e.duration:Fe,o=e.key||en(),n=new Promise(m=>{const s=()=>(typeof e.onClose=="function"&&e.onClose(),m(!0));nn(e,d=>{d.notice({key:o,duration:t,style:e.style||{},class:e.class,content:f=>{let{prefixCls:l}=f;const r=Ue[e.type],c=r?g(r,null,null):"",u=R(`${l}-custom-content`,{[`${l}-${e.type}`]:e.type,[`${l}-rtl`]:We===!0});return g("div",{class:u},[typeof e.icon=="function"?e.icon():e.icon||c,g("span",null,[typeof e.content=="function"?e.content():e.content])])},onClose:s,onClick:e.onClick})})}),a=()=>{A&&A.removeNotice(o)};return a.then=(m,s)=>n.then(m,s),a.promise=n,a}function ln(e){return Object.prototype.toString.call(e)==="[object Object]"&&!!e.content}const X={open:an,config:tn,destroy(e){if(A)if(e){const{removeNotice:t}=A;t(e)}else{const{destroy:t}=A;t(),A=null}}};function rn(e,t){e[t]=(o,n,a)=>ln(o)?e.open(p(p({},o),{type:t})):(typeof n=="function"&&(a=n,n=void 0),e.open({content:o,duration:n,type:t,onClose:a}))}on.forEach(e=>rn(X,e));X.warn=X.warning;X.useMessage=Jt;const sn=e=>{const{componentCls:t,width:o,notificationMarginEdge:n}=e,a=new H("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),m=new H("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),s=new H("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:o},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${t}-top, &${t}-bottom`]:{marginInline:0},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:m}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:n,[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:s}}}},cn=e=>{const{iconCls:t,componentCls:o,boxShadowSecondary:n,fontSizeLG:a,notificationMarginBottom:m,borderRadiusLG:s,colorSuccess:d,colorInfo:f,colorWarning:l,colorError:r,colorTextHeading:c,notificationBg:u,notificationPadding:v,notificationMarginEdge:y,motionDurationMid:C,motionEaseInOut:x,fontSize:h,lineHeight:I,width:N,notificationIconSize:b}=e,_=`${o}-notice`,w=new H("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:N},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),S=new H("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:m,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[o]:p(p(p(p({},Oe(e)),{position:"fixed",zIndex:e.zIndexPopup,marginInlineEnd:y,[`${o}-hook-holder`]:{position:"relative"},[`&${o}-top, &${o}-bottom`]:{[`${o}-notice`]:{marginInline:"auto auto"}},[`&${o}-topLeft, &${o}-bottomLeft`]:{[`${o}-notice`]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${o}-fade-enter, ${o}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:x,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${o}-fade-leave`]:{animationTimingFunction:x,animationFillMode:"both",animationDuration:C,animationPlayState:"paused"},[`${o}-fade-enter${o}-fade-enter-active, ${o}-fade-appear${o}-fade-appear-active`]:{animationName:w,animationPlayState:"running"},[`${o}-fade-leave${o}-fade-leave-active`]:{animationName:S,animationPlayState:"running"}}),sn(e)),{"&-rtl":{direction:"rtl",[`${o}-notice-btn`]:{float:"left"}}})},{[_]:{position:"relative",width:N,maxWidth:`calc(100vw - ${y*2}px)`,marginBottom:m,marginInlineStart:"auto",padding:v,overflow:"hidden",lineHeight:I,wordWrap:"break-word",background:u,borderRadius:s,boxShadow:n,[`${o}-close-icon`]:{fontSize:h,cursor:"pointer"},[`${_}-message`]:{marginBottom:e.marginXS,color:c,fontSize:a,lineHeight:e.lineHeightLG},[`${_}-description`]:{fontSize:h},[`&${_}-closable ${_}-message`]:{paddingInlineEnd:e.paddingLG},[`${_}-with-icon ${_}-message`]:{marginBottom:e.marginXS,marginInlineStart:e.marginSM+b,fontSize:a},[`${_}-with-icon ${_}-description`]:{marginInlineStart:e.marginSM+b,fontSize:h},[`${_}-icon`]:{position:"absolute",fontSize:b,lineHeight:0,[`&-success${t}`]:{color:d},[`&-info${t}`]:{color:f},[`&-warning${t}`]:{color:l},[`&-error${t}`]:{color:r}},[`${_}-close`]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${_}-btn`]:{float:"right",marginTop:e.marginSM}}},{[`${_}-pure-panel`]:{margin:0}}]},Ve=we("Notification",e=>{const t=e.paddingMD,o=e.paddingLG,n=Ne(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:o,notificationPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,notificationMarginBottom:e.margin,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationIconSize:e.fontSizeLG*e.lineHeightLG,notificationCloseButtonSize:e.controlHeightLG*.55});return[cn(n)]},e=>({zIndexPopup:e.zIndexPopupBase+50,width:384}));function un(e,t){return t||g("span",{class:`${e}-close-x`},[g(ge,{class:`${e}-close-icon`},null)])}g(oe,null,null),g(ne,null,null),g(te,null,null),g(ee,null,null),g(pe,null,null);const dn={success:ne,info:oe,error:te,warning:ee};function fn(e){let{prefixCls:t,icon:o,type:n,message:a,description:m,btn:s}=e,d=null;if(o)d=g("span",{class:`${t}-icon`},[z(o)]);else if(n){const f=dn[n];d=g(f,{class:`${t}-icon ${t}-icon-${n}`},null)}return g("div",{class:R({[`${t}-with-icon`]:d}),role:"alert"},[d,g("div",{class:`${t}-message`},[a]),g("div",{class:`${t}-description`},[m]),s&&g("div",{class:`${t}-btn`},[s])])}function Xe(e,t,o){let n;switch(t=typeof t=="number"?`${t}px`:t,o=typeof o=="number"?`${o}px`:o,e){case"top":n={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":n={left:0,top:t,bottom:"auto"};break;case"topRight":n={right:0,top:t,bottom:"auto"};break;case"bottom":n={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:o};break;case"bottomLeft":n={left:0,top:"auto",bottom:o};break;default:n={right:0,top:"auto",bottom:o};break}return n}function vn(e){return{name:`${e}-fade`}}var mn=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};const Se=24,pn=4.5,gn=L({name:"Holder",inheritAttrs:!1,props:["prefixCls","class","type","icon","content","onAllRemoved"],setup(e,t){let{expose:o}=t;const{getPrefixCls:n,getPopupContainer:a}=Me("notification",e),m=P(()=>e.prefixCls||n("notification")),s=u=>{var v,y;return Xe(u,(v=e.top)!==null&&v!==void 0?v:Se,(y=e.bottom)!==null&&y!==void 0?y:Se)},[,d]=Ve(m),f=()=>R(d.value,{[`${m.value}-rtl`]:e.rtl}),l=()=>vn(m.value),[r,c]=Le({prefixCls:m.value,getStyles:s,getClassName:f,motion:l,closable:!0,closeIcon:un(m.value),duration:pn,getContainer:()=>{var u,v;return((u=e.getPopupContainer)===null||u===void 0?void 0:u.call(e))||((v=a.value)===null||v===void 0?void 0:v.call(a))||document.body},maxCount:e.maxCount,hashId:d.value,onAllRemoved:e.onAllRemoved});return o(p(p({},r),{prefixCls:m.value,hashId:d})),c}});function Cn(e){const t=K(null),o=Symbol("notificationHolderKey"),n=d=>{if(!t.value)return;const{open:f,prefixCls:l,hashId:r}=t.value,c=`${l}-notice`,{message:u,description:v,icon:y,type:C,btn:x,class:h}=d,I=mn(d,["message","description","icon","type","btn","class"]);return f(p(p({placement:"topRight"},I),{content:()=>g(fn,{prefixCls:c,icon:typeof y=="function"?y():y,type:C,message:typeof u=="function"?u():u,description:typeof v=="function"?v():v,btn:typeof x=="function"?x():x},null),class:R(C&&`${c}-${C}`,r,h)}))},m={open:n,destroy:d=>{var f,l;d!==void 0?(f=t.value)===null||f===void 0||f.close(d):(l=t.value)===null||l===void 0||l.destroy()}};return["success","info","warning","error"].forEach(d=>{m[d]=f=>n(p(p({},f),{type:d}))}),[m,()=>g(gn,T(T({key:o},e),{},{ref:t}),null)]}function yn(e){return Cn(e)}const D={};let Ye=4.5,qe="24px",Qe="24px",ue="",Je="topRight",Ze=()=>document.body,et=null,de=!1,tt;function $n(e){const{duration:t,placement:o,bottom:n,top:a,getContainer:m,closeIcon:s,prefixCls:d}=e;d!==void 0&&(ue=d),t!==void 0&&(Ye=t),o!==void 0&&(Je=o),n!==void 0&&(Qe=typeof n=="number"?`${n}px`:n),a!==void 0&&(qe=typeof a=="number"?`${a}px`:a),m!==void 0&&(Ze=m),s!==void 0&&(et=s),e.rtl!==void 0&&(de=e.rtl),e.maxCount!==void 0&&(tt=e.maxCount)}function hn(e,t){let{prefixCls:o,placement:n=Je,getContainer:a=Ze,top:m,bottom:s,closeIcon:d=et,appContext:f}=e;const{getPrefixCls:l}=at(),r=l("notification",o||ue),c=`${r}-${n}-${de}`,u=D[c];if(u){Promise.resolve(u).then(y=>{t(y)});return}const v=R(`${r}-${n}`,{[`${r}-rtl`]:de===!0});Z.newInstance({name:"notification",prefixCls:o||ue,useStyle:Ve,class:v,style:Xe(n,m??qe,s??Qe),appContext:f,getContainer:a,closeIcon:y=>{let{prefixCls:C}=y;return g("span",{class:`${C}-close-x`},[z(d,{},g(ge,{class:`${C}-close-icon`},null))])},maxCount:tt,hasTransitionName:!0},y=>{D[c]=y,t(y)})}const xn={success:Tt,info:kt,error:Mt,warning:Ot};function bn(e){const{icon:t,type:o,description:n,message:a,btn:m}=e,s=e.duration===void 0?Ye:e.duration;hn(e,d=>{d.notice({content:f=>{let{prefixCls:l}=f;const r=`${l}-notice`;let c=null;if(t)c=()=>g("span",{class:`${r}-icon`},[z(t)]);else if(o){const u=xn[o];c=()=>g(u,{class:`${r}-icon ${r}-icon-${o}`},null)}return g("div",{class:c?`${r}-with-icon`:""},[c&&c(),g("div",{class:`${r}-message`},[!n&&c?g("span",{class:`${r}-message-single-line-auto-margin`},null):null,z(a)]),g("div",{class:`${r}-description`},[z(n)]),m?g("span",{class:`${r}-btn`},[z(m)]):null])},duration:s,closable:!0,onClose:e.onClose,onClick:e.onClick,key:e.key,style:e.style||{},class:e.class})})}const W={open:bn,close(e){Object.keys(D).forEach(t=>Promise.resolve(D[t]).then(o=>{o.removeNotice(e)}))},config:$n,destroy(){Object.keys(D).forEach(e=>{Promise.resolve(D[e]).then(t=>{t.destroy()}),delete D[e]})}},Pn=["success","info","warning","error"];Pn.forEach(e=>{W[e]=t=>W.open(p(p({},t),{type:e}))});W.warn=W.warning;W.useNotification=yn;const In=`-ant-${Date.now()}-${Math.random()}`;function _n(e,t){const o={},n=(s,d)=>{let f=s.clone();return f=d?.(f)||f,f.toRgbString()},a=(s,d)=>{const f=new re(s),l=$e(f.toRgbString());o[`${d}-color`]=n(f),o[`${d}-color-disabled`]=l[1],o[`${d}-color-hover`]=l[4],o[`${d}-color-active`]=l[6],o[`${d}-color-outline`]=f.clone().setAlpha(.2).toRgbString(),o[`${d}-color-deprecated-bg`]=l[0],o[`${d}-color-deprecated-border`]=l[2]};if(t.primaryColor){a(t.primaryColor,"primary");const s=new re(t.primaryColor),d=$e(s.toRgbString());d.forEach((l,r)=>{o[`primary-${r+1}`]=l}),o["primary-color-deprecated-l-35"]=n(s,l=>l.lighten(35)),o["primary-color-deprecated-l-20"]=n(s,l=>l.lighten(20)),o["primary-color-deprecated-t-20"]=n(s,l=>l.tint(20)),o["primary-color-deprecated-t-50"]=n(s,l=>l.tint(50)),o["primary-color-deprecated-f-12"]=n(s,l=>l.setAlpha(l.getAlpha()*.12));const f=new re(d[0]);o["primary-color-active-deprecated-f-30"]=n(f,l=>l.setAlpha(l.getAlpha()*.3)),o["primary-color-active-deprecated-d-02"]=n(f,l=>l.darken(2))}return t.successColor&&a(t.successColor,"success"),t.warningColor&&a(t.warningColor,"warning"),t.errorColor&&a(t.errorColor,"error"),t.infoColor&&a(t.infoColor,"info"),`
|
|
10
10
|
:root {
|
|
11
11
|
${Object.keys(o).map(s=>`--${e}-${s}: ${o[s]};`).join(`
|
|
12
12
|
`)}
|
|
13
13
|
}
|
|
14
|
-
`.trim()}function Sn(e,t){const o=_n(e,t);rt()&&st(o,`${In}-dynamic-theme`)}const wn=e=>{const[t,o]=ct();return pt(P(()=>({theme:t.value,token:o.value,hashId:"",path:["ant-design-icons",e.value]})),()=>[{[`.${e.value}`]:p(p({},gt()),{[`.${e.value} .${e.value}-icon`]:{display:"block"}})}])};function Nn(e,t){const o=P(()=>e?.value||{}),n=P(()=>o.value.inherit===!1||!t?.value?ut:t.value);return P(()=>{if(!e?.value)return t?.value;const m=p({},n.value.components);return Object.keys(e.value.components||{}).forEach(s=>{m[s]=p(p({},m[s]),e.value.components[s])}),p(p(p({},n.value),o.value),{token:p(p({},n.value.token),o.value.token),components:m})})}var On=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};const nt="ant";function B(){return k.prefixCls||nt}function ot(){return k.iconPrefixCls||ve}const Ce=V({}),k=V({}),Mn=["getTargetContainer","getPopupContainer","rootPrefixCls","getPrefixCls","renderEmpty","csp","autoInsertSpaceInButton","locale","pageHeader"];me(()=>{p(k,Ce),k.prefixCls=B(),k.iconPrefixCls=ot(),k.getPrefixCls=(e,t)=>t||(e?`${k.prefixCls}-${e}`:k.prefixCls),k.getRootPrefixCls=()=>k.prefixCls?k.prefixCls:B()});let se;const kn=e=>{se&&se(),se=me(()=>{p(Ce,V(e)),p(k,V(e))}),e.theme&&Sn(B(),e.theme)},at=()=>({getPrefixCls:(e,t)=>t||(e?`${B()}-${e}`:B()),getIconPrefixCls:ot,getRootPrefixCls:()=>k.prefixCls?k.prefixCls:B()}),G=L({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:xt(),setup(e,t){let{slots:o}=t;const n=Ct(),a=(i,$)=>{const{prefixCls:M="ant"}=e;if($)return $;const F=M||n.getPrefixCls("");return i?`${F}-${i}`:F},m=P(()=>e.iconPrefixCls||n.iconPrefixCls.value||ve),s=P(()=>m.value!==n.iconPrefixCls.value),d=P(()=>{var i;return e.csp||((i=n.csp)===null||i===void 0?void 0:i.value)}),f=wn(m),l=Nn(P(()=>e.theme),P(()=>{var i;return(i=n.theme)===null||i===void 0?void 0:i.value})),r=i=>(e.renderEmpty||o.renderEmpty||n.renderEmpty||It)(i),c=P(()=>{var i,$;return(i=e.autoInsertSpaceInButton)!==null&&i!==void 0?i:($=n.autoInsertSpaceInButton)===null||$===void 0?void 0:$.value}),u=P(()=>{var i;return e.locale||((i=n.locale)===null||i===void 0?void 0:i.value)});
|
|
14
|
+
`.trim()}function Sn(e,t){const o=_n(e,t);rt()&&st(o,`${In}-dynamic-theme`)}const wn=e=>{const[t,o]=ct();return pt(P(()=>({theme:t.value,token:o.value,hashId:"",path:["ant-design-icons",e.value]})),()=>[{[`.${e.value}`]:p(p({},gt()),{[`.${e.value} .${e.value}-icon`]:{display:"block"}})}])};function Nn(e,t){const o=P(()=>e?.value||{}),n=P(()=>o.value.inherit===!1||!t?.value?ut:t.value);return P(()=>{if(!e?.value)return t?.value;const m=p({},n.value.components);return Object.keys(e.value.components||{}).forEach(s=>{m[s]=p(p({},m[s]),e.value.components[s])}),p(p(p({},n.value),o.value),{token:p(p({},n.value.token),o.value.token),components:m})})}var On=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};const nt="ant";function B(){return k.prefixCls||nt}function ot(){return k.iconPrefixCls||ve}const Ce=V({}),k=V({}),Mn=["getTargetContainer","getPopupContainer","rootPrefixCls","getPrefixCls","renderEmpty","csp","autoInsertSpaceInButton","locale","pageHeader"];me(()=>{p(k,Ce),k.prefixCls=B(),k.iconPrefixCls=ot(),k.getPrefixCls=(e,t)=>t||(e?`${k.prefixCls}-${e}`:k.prefixCls),k.getRootPrefixCls=()=>k.prefixCls?k.prefixCls:B()});let se;const kn=e=>{se&&se(),se=me(()=>{p(Ce,V(e)),p(k,V(e))}),e.theme&&Sn(B(),e.theme)},at=()=>({getPrefixCls:(e,t)=>t||(e?`${B()}-${e}`:B()),getIconPrefixCls:ot,getRootPrefixCls:()=>k.prefixCls?k.prefixCls:B()}),G=L({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:xt(),setup(e,t){let{slots:o}=t;const n=Ct(),a=(i,$)=>{const{prefixCls:M="ant"}=e;if($)return $;const F=M||n.getPrefixCls("");return i?`${F}-${i}`:F},m=P(()=>e.iconPrefixCls||n.iconPrefixCls.value||ve),s=P(()=>m.value!==n.iconPrefixCls.value),d=P(()=>{var i;return e.csp||((i=n.csp)===null||i===void 0?void 0:i.value)}),f=wn(m),l=Nn(P(()=>e.theme),P(()=>{var i;return(i=n.theme)===null||i===void 0?void 0:i.value})),r=i=>(e.renderEmpty||o.renderEmpty||n.renderEmpty||It)(i),c=P(()=>{var i,$;return(i=e.autoInsertSpaceInButton)!==null&&i!==void 0?i:($=n.autoInsertSpaceInButton)===null||$===void 0?void 0:$.value}),u=P(()=>{var i;return e.locale||((i=n.locale)===null||i===void 0?void 0:i.value)});Y(u,()=>{Ce.locale=u.value},{immediate:!0});const v=P(()=>{var i;return e.direction||((i=n.direction)===null||i===void 0?void 0:i.value)}),y=P(()=>{var i,$;return(i=e.space)!==null&&i!==void 0?i:($=n.space)===null||$===void 0?void 0:$.value}),C=P(()=>{var i,$;return(i=e.virtual)!==null&&i!==void 0?i:($=n.virtual)===null||$===void 0?void 0:$.value}),x=P(()=>{var i,$;return(i=e.dropdownMatchSelectWidth)!==null&&i!==void 0?i:($=n.dropdownMatchSelectWidth)===null||$===void 0?void 0:$.value}),h=P(()=>{var i;return e.getTargetContainer!==void 0?e.getTargetContainer:(i=n.getTargetContainer)===null||i===void 0?void 0:i.value}),I=P(()=>{var i;return e.getPopupContainer!==void 0?e.getPopupContainer:(i=n.getPopupContainer)===null||i===void 0?void 0:i.value}),N=P(()=>{var i;return e.pageHeader!==void 0?e.pageHeader:(i=n.pageHeader)===null||i===void 0?void 0:i.value}),b=P(()=>{var i;return e.input!==void 0?e.input:(i=n.input)===null||i===void 0?void 0:i.value}),_=P(()=>{var i;return e.pagination!==void 0?e.pagination:(i=n.pagination)===null||i===void 0?void 0:i.value}),w=P(()=>{var i;return e.form!==void 0?e.form:(i=n.form)===null||i===void 0?void 0:i.value}),S=P(()=>{var i;return e.select!==void 0?e.select:(i=n.select)===null||i===void 0?void 0:i.value}),O=P(()=>e.componentSize),E=P(()=>e.componentDisabled),q=P(()=>{var i,$;return(i=e.wave)!==null&&i!==void 0?i:($=n.wave)===null||$===void 0?void 0:$.value}),ae={csp:d,autoInsertSpaceInButton:c,locale:u,direction:v,space:y,virtual:C,dropdownMatchSelectWidth:x,getPrefixCls:a,iconPrefixCls:m,theme:P(()=>{var i,$;return(i=l.value)!==null&&i!==void 0?i:($=n.theme)===null||$===void 0?void 0:$.value}),renderEmpty:r,getTargetContainer:h,getPopupContainer:I,pageHeader:N,input:b,pagination:_,form:w,select:S,componentSize:O,componentDisabled:E,transformCellText:P(()=>e.transformCellText),wave:q},j=P(()=>{const i=l.value||{},{algorithm:$,token:M}=i,F=On(i,["algorithm","token"]),le=$&&(!Array.isArray($)||$.length>0)?ft($):void 0;return p(p({},F),{theme:le,token:p(p({},vt),M)})}),ie=P(()=>{var i,$;let M={};return u.value&&(M=((i=u.value.Form)===null||i===void 0?void 0:i.defaultValidateMessages)||(($=fe.Form)===null||$===void 0?void 0:$.defaultValidateMessages)||{}),e.form&&e.form.validateMessages&&(M=p(p({},M),e.form.validateMessages)),M});bt(ae),Pt({validateMessages:ie}),yt(O),$t(E);const U=i=>{var $,M;let F=s.value?f(($=o.default)===null||$===void 0?void 0:$.call(o)):(M=o.default)===null||M===void 0?void 0:M.call(o);if(e.theme){const le=(function(){return F})();F=g(dt,{value:j.value},{default:()=>[le]})}return g(Lt,{locale:u.value||i,ANT_MARK__:ce},{default:()=>[F]})};return me(()=>{v.value&&(X.config({rtl:v.value==="rtl"}),W.config({rtl:v.value==="rtl"}))}),()=>g(ht,{children:(i,$,M)=>U(M)},null)}});G.config=kn;G.install=function(e){e.component(G.name,G)};const Hn=Object.freeze(Object.defineProperty({__proto__:null,configConsumerProps:Mn,default:G,defaultIconPrefixCls:ve,defaultPrefixCls:nt,globalConfig:at,globalConfigForApi:k},Symbol.toStringTag,{value:"Module"}));export{G as C,X as a,Dn as b,k as g,Hn as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as L,m as R,r as j,Z as O,u as z,_ as p,c as F}from"./useConfigInject-
|
|
1
|
+
import{g as L,m as R,r as j,Z as O,u as z,_ as p,c as F}from"./useConfigInject-C2E3Qsop.js";import{P}from"./index-U4Zd5IK6.js";import{a7 as X}from"./icons-DzieZiVh.js";import{W as U}from"./index-B7gZm05C.js";import{g as V,i as Z,a as q}from"./colors-BgoKrIXh.js";import{_ as B,l as G}from"./index-4C1c4hkZ.js";import{d as H,c as d,j as b,f as J,H as K,s as Q}from"./vendor-aH7YaPZi.js";import"./isVisible-C7tPsqfj.js";import"./useState-CSbzOa8O.js";import"./raf-Deuc0E8-.js";const v=(o,n,l)=>{const r=O(l);return{[`${o.componentCls}-${n}`]:{color:o[`color${l}`],background:o[`color${r}Bg`],borderColor:o[`color${r}Border`],[`&${o.componentCls}-borderless`]:{borderColor:"transparent"}}}},Y=o=>V(o,(n,l)=>{let{textColor:r,lightBorderColor:a,lightColor:e,darkColor:c}=l;return{[`${o.componentCls}-${n}`]:{color:r,background:e,borderColor:a,"&-inverse":{color:o.colorTextLightSolid,background:c,borderColor:c},[`&${o.componentCls}-borderless`]:{borderColor:"transparent"}}}}),oo=o=>{const{paddingXXS:n,lineWidth:l,tagPaddingHorizontal:r,componentCls:a}=o,e=r-l,c=n-l;return{[a]:B(B({},j(o)),{display:"inline-block",height:"auto",marginInlineEnd:o.marginXS,paddingInline:e,fontSize:o.tagFontSize,lineHeight:`${o.tagLineHeight}px`,whiteSpace:"nowrap",background:o.tagDefaultBg,border:`${o.lineWidth}px ${o.lineType} ${o.colorBorder}`,borderRadius:o.borderRadiusSM,opacity:1,transition:`all ${o.motionDurationMid}`,textAlign:"start",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:o.tagDefaultColor},[`${a}-close-icon`]:{marginInlineStart:c,color:o.colorTextDescription,fontSize:o.tagIconSize,cursor:"pointer",transition:`all ${o.motionDurationMid}`,"&:hover":{color:o.colorTextHeading}},[`&${a}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${o.iconCls}-close, ${o.iconCls}-close:hover`]:{color:o.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:o.colorPrimary,backgroundColor:o.colorFillSecondary},"&:active, &-checked":{color:o.colorTextLightSolid},"&-checked":{backgroundColor:o.colorPrimary,"&:hover":{backgroundColor:o.colorPrimaryHover}},"&:active":{backgroundColor:o.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${o.iconCls} + span, > span + ${o.iconCls}`]:{marginInlineStart:e}}),[`${a}-borderless`]:{borderColor:"transparent",background:o.tagBorderlessBg}}},D=L("Tag",o=>{const{fontSize:n,lineHeight:l,lineWidth:r,fontSizeIcon:a}=o,e=Math.round(n*l),c=o.fontSizeSM,g=e-r*2,C=o.colorFillAlter,s=o.colorText,t=R(o,{tagFontSize:c,tagLineHeight:g,tagDefaultBg:C,tagDefaultColor:s,tagIconSize:a-2*r,tagPaddingHorizontal:8,tagBorderlessBg:o.colorFillTertiary});return[oo(t),Y(t),v(t,"success","Success"),v(t,"processing","Info"),v(t,"error","Error"),v(t,"warning","Warning")]}),eo=()=>({prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}),S=H({compatConfig:{MODE:3},name:"ACheckableTag",inheritAttrs:!1,props:eo(),setup(o,n){let{slots:l,emit:r,attrs:a}=n;const{prefixCls:e}=z("tag",o),[c,g]=D(e),C=t=>{const{checked:u}=o;r("update:checked",!u),r("change",!u),r("click",t)},s=b(()=>F(e.value,g.value,{[`${e.value}-checkable`]:!0,[`${e.value}-checkable-checked`]:o.checked}));return()=>{var t;return c(d("span",p(p({},a),{},{class:[s.value,a.class],onClick:C}),[(t=l.default)===null||t===void 0?void 0:t.call(l)]))}}}),lo=()=>({prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:P.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},onClick:G(),"onUpdate:visible":Function,icon:P.any,bordered:{type:Boolean,default:!0}}),h=H({compatConfig:{MODE:3},name:"ATag",inheritAttrs:!1,props:lo(),slots:Object,setup(o,n){let{slots:l,emit:r,attrs:a}=n;const{prefixCls:e,direction:c}=z("tag",o),[g,C]=D(e),s=Q(!0);J(()=>{o.visible!==void 0&&(s.value=o.visible)});const t=i=>{i.stopPropagation(),r("update:visible",!1),r("close",i),!i.defaultPrevented&&o.visible===void 0&&(s.value=!1)},u=b(()=>Z(o.color)||q(o.color)),M=b(()=>F(e.value,C.value,{[`${e.value}-${o.color}`]:u.value,[`${e.value}-has-color`]:o.color&&!u.value,[`${e.value}-hidden`]:!s.value,[`${e.value}-rtl`]:c.value==="rtl",[`${e.value}-borderless`]:!o.bordered})),_=i=>{r("click",i)};return()=>{var i,m,f;const{icon:w=(i=l.icon)===null||i===void 0?void 0:i.call(l),color:$,closeIcon:y=(m=l.closeIcon)===null||m===void 0?void 0:m.call(l),closable:A=!1}=o,W=()=>A?y?d("span",{class:`${e.value}-close-icon`,onClick:t},[y]):d(X,{class:`${e.value}-close-icon`,onClick:t},null):null,k={backgroundColor:$&&!u.value?$:void 0},T=w||null,I=(f=l.default)===null||f===void 0?void 0:f.call(l),N=T?d(K,null,[T,d("span",null,[I])]):I,E=o.onClick!==void 0,x=d("span",p(p({},a),{},{onClick:_,class:[M.value,a.class],style:[k,a.style]}),[N,W()]);return g(E?d(U,null,{default:()=>[x]}):x)}}});h.CheckableTag=S;h.install=function(o){return o.component(h.name,h),o.component(S.name,S),o};export{S as CheckableTag,h as default,lo as tagProps};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as R,i as $e,_ as P,J as Ce,M as Y,g as Ve,m as we,r as Be,u as Me}from"./useConfigInject-ImjEZhXr.js";import{_ as f,w as Te,p as z,y as D,n as N,x as Pe,o as He}from"./index-DaMG8ksh.js";import{P as g,w as Oe}from"./index-U4Zd5IK6.js";import{B as J}from"./Trigger-C7MTh_xj.js";import{c as w,d as I,l as ke,o as ie,s as Z,j as le,w as Fe,a6 as Le,r as U}from"./vendor-C5RM7MZO.js";import{s as ue,a as G}from"./motion-joGf7r-l.js";import{K as E}from"./KeyCode-D63Tfrq7.js";import{i as de}from"./initDefaultProps-DOj2K4bh.js";import{T as Ne,b as Ee}from"./index-BirLVqrC.js";import{w as ee}from"./raf-Deuc0E8-.js";import{u as De}from"./FormItemContext-B97Dibo2.js";import{T as je}from"./icons-CpgFsfkd.js";import"./Portal-CFB5Y97t.js";import"./vnode-DAWimP6X.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-CWA3v-Ds.js";import"./transition-D4AbuDdO.js";import"./placementArrow-DWcIO1y4.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-C_wDMX2Q.js";import"./zoom-u6SXbmzZ.js";import"./Keyframes-C7fCrnlS.js";import"./createContext-XExBTk9v.js";const q=(e,o)=>{let{attrs:t}=o;const{included:n,vertical:s,style:r,class:a}=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}%`},p=f(f({},r),d);return n?w("div",{class:a,style:p},null):null};q.inheritAttrs=!1;const Re=(e,o,t,n,s,r)=>{const a=Object.keys(o).map(parseFloat).sort((i,l)=>i-l);if(t&&n)for(let i=s;i<=r;i+=n)a.indexOf(i)===-1&&a.push(i);return a},ce=(e,o)=>{let{attrs:t}=o;const{prefixCls:n,vertical:s,reverse:r,marks:a,dots:i,step:l,included:u,lowerBound:d,upperBound:p,max:b,min:C,dotStyle:y,activeDotStyle:B}=t,h=b-C,x=Re(s,a,i,l,C,b).map(c=>{const $=`${Math.abs(c-C)/h*100}%`,V=!u&&c===p||u&&c<=p&&c>=d;let S=s?f(f({},y),{[r?"top":"bottom"]:$}):f(f({},y),{[r?"right":"left"]:$});V&&(S=f(f({},S),B));const v=R({[`${n}-dot`]:!0,[`${n}-dot-active`]:V,[`${n}-dot-reverse`]:r});return w("span",{class:v,style:S,key:c},null)});return w("div",{class:`${n}-step`},[x])};ce.inheritAttrs=!1;const he=(e,o)=>{let{attrs:t,slots:n}=o;const{class:s,vertical:r,reverse:a,marks:i,included:l,upperBound:u,lowerBound:d,max:p,min:b,onClickLabel:C}=t,y=Object.keys(i),B=n.mark,h=p-b,x=y.map(parseFloat).sort((c,$)=>c-$).map(c=>{const $=typeof i[c]=="function"?i[c]():i[c],V=typeof $=="object"&&!$e($);let S=V?$.label:$;if(!S&&S!==0)return null;B&&(S=B({point:c,label:S}));const v=!l&&c===u||l&&c<=u&&c>=d,m=R({[`${s}-text`]:!0,[`${s}-text-active`]:v}),M={marginBottom:"-50%",[a?"top":"bottom"]:`${(c-b)/h*100}%`},O={transform:`translateX(${a?"50%":"-50%"})`,msTransform:`translateX(${a?"50%":"-50%"})`,[a?"right":"left"]:`${(c-b)/h*100}%`},T=r?M:O,L=V?f(f({},T),$.style):T,H={[ue?"onTouchstartPassive":"onTouchstart"]:k=>C(k,c)};return w("span",P({class:m,style:L,key:c,onMousedown:k=>C(k,c)},H),[S])});return w("div",{class:s},[x])};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 r=Z(!1),a=Z(),i=()=>{document.activeElement===a.value&&(r.value=!0)},l=h=>{r.value=!1,n("blur",h)},u=()=>{r.value=!1},d=()=>{var h;(h=a.value)===null||h===void 0||h.focus()},p=()=>{var h;(h=a.value)===null||h===void 0||h.blur()},b=()=>{r.value=!0,d()},C=h=>{h.preventDefault(),d(),n("mousedown",h)};s({focus:d,blur:p,clickFocus:b,ref:a});let y=null;ke(()=>{y=G(document,"mouseup",i)}),ie(()=>{y?.remove()});const B=le(()=>{const{vertical:h,offset:x,reverse:c}=e;return h?{[c?"top":"bottom"]:`${x}%`,[c?"bottom":"top"]:"auto",transform:c?null:"translateY(+50%)"}:{[c?"right":"left"]:`${x}%`,[c?"left":"right"]:"auto",transform:`translateX(${c?"+":"-"}50%)`}});return()=>{const{prefixCls:h,disabled:x,min:c,max:$,value:V,tabindex:S,ariaLabel:v,ariaLabelledBy:m,ariaValueTextFormatter:M,onMouseenter:O,onMouseleave:T}=e,L=R(t.class,{[`${h}-handle-click-focused`]:r.value}),H={"aria-valuemin":c,"aria-valuemax":$,"aria-valuenow":V,"aria-disabled":!!x},k=[t.style,B.value];let F=S||0;(x||S===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:a,style:k});return w("div",P(P({},K),{},{"aria-label":v,"aria-labelledby":m,"aria-valuetext":W}),null)}}});function X(e,o){try{return Object.keys(o).some(t=>e.target===o[t].ref)}catch{return!1}}function me(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:r}=o;const a=Object.keys(t).map(parseFloat);if(n!==null){const l=Math.pow(10,pe(n)),u=Math.floor((r*l-s*l)/(n*l)),d=Math.min((e-s)/n,u),p=Math.round(d)*n+s;a.push(p)}const i=a.map(l=>Math.abs(e-l));return a[i.indexOf(Math.min(...i))]}function pe(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 re(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(pe(t)))}function A(e){e.stopPropagation(),e.preventDefault()}function ze(e,o,t){const n={increase:(a,i)=>a+i,decrease:(a,i)=>a-i},s=n[e](Object.keys(t.marks).indexOf(JSON.stringify(o)),1),r=Object.keys(t.marks)[s];return t.step?n[e](o,t.step):Object.keys(t.marks).length&&t.marks[r]?t.marks[r]:o}function ve(e,o,t){const n="increase",s="decrease";let r=n;switch(e.keyCode){case E.UP:r=o&&t?s:n;break;case E.RIGHT:r=!o&&t?s:n;break;case E.DOWN:r=o&&t?n:s;break;case E.LEFT:r=!o&&t?n:s;break;case E.END:return(a,i)=>i.max;case E.HOME:return(a,i)=>i.min;case E.PAGE_UP:return(a,i)=>a+i.step*2;case E.PAGE_DOWN:return(a,i)=>a-i.step*2;default:return}return(a,i)=>ze(r,a,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:[J,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:r,style:a}=t,i=Ae(t,["index","directives","className","style"]);if(delete i.dragging,i.value===null)return null;const l=f(f({},i),{class:r,style:a,key:n});return w(fe,l,null)},onDown(t,n){let s=n;const{draggableTrack:r,vertical:a}=this.$props,{bounds:i}=this.$data,l=r&&this.positionGetValue?this.positionGetValue(s)||[]:[],u=X(t,this.handlesRefs);if(this.dragTrack=r&&i.length>=2&&!u&&!l.map((d,p)=>{const b=p?!0:d>=i[p];return p===l.length-1?d<=i[p]:b}).some(d=>!d),this.dragTrack)this.dragOffset=s,this.startBounds=[...i];else{if(!u)this.dragOffset=0;else{const d=re(a,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=re(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,r=t.getBoundingClientRect();return n?s?r.bottom:r.top:window.scrollX+(s?r.right:r.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:r}=this,a=Math.abs(Math.max(t,0)/this.getSliderLength());return n?(1-a)*(r-s)+s:a*(r-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,r=(t-n)/(s-n);return Math.max(0,r*100)},saveSlider(t){this.sliderRef=t},saveHandle(t,n){this.handlesRefs[t]=n}},render(){const{prefixCls:t,marks:n,dots:s,step:r,included:a,disabled:i,vertical:l,reverse:u,min:d,max:p,maximumTrackStyle:b,railStyle:C,dotStyle:y,activeDotStyle:B,id:h}=this,{class:x,style:c}=this.$attrs,{tracks:$,handles:V}=this.renderSlider(),S=R(t,x,{[`${t}-with-marks`]:Object.keys(n).length,[`${t}-disabled`]:i,[`${t}-vertical`]:l,[`${t}-horizontal`]:!l}),v={vertical:l,marks:n,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:d,reverse:u,class:`${t}-mark`,onClickLabel:i?j:this.onClickMarkLabel},m={[ue?"onTouchstartPassive":"onTouchstart"]:i?j:this.onTouchStart};return w("div",P(P({id:h,ref:this.saveSlider,tabindex:"-1",class:S},m),{},{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}),[w("div",{class:`${t}-rail`,style:f(f({},b),C)},null),$,w(ce,{prefixCls:t,vertical:l,reverse:u,marks:n,dots:s,step:r,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:d,dotStyle:y,activeDotStyle:B},null),V,w(he,v,{mark:this.$slots.mark}),Ce(this)])}})}const Ie=I({compatConfig:{MODE:3},name:"Slider",mixins:[J],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}),me(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,r=n(s,this.$props),a=this.trimAlignValue(r);if(a===s)return;this.onChange({sValue:a}),this.$emit("afterChange",a),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:r,mergedTrackStyle:a,length:i,offset:l}=e;return w(q,{class:`${o}-track`,vertical:n,included:s,offset:l,reverse:t,length:i,style:f(f({},r),a)},null)},renderSlider(){const{prefixCls:e,vertical:o,included:t,disabled:n,minimumTrackStyle:s,trackStyle:r,handleStyle:a,tabindex:i,ariaLabelForHandle:l,ariaLabelledByForHandle:u,ariaValueTextFormatterForHandle:d,min:p,max:b,startPoint:C,reverse:y,handle:B,defaultHandle:h}=this,x=B||h,{sValue:c,dragging:$}=this,V=this.calcOffset(c),S=x({class:`${e}-handle`,prefixCls:e,vertical:o,offset:V,value:c,dragging:$,disabled:n,min:p,max:b,reverse:y,index:0,tabindex:i,ariaLabel:l,ariaLabelledBy:u,ariaValueTextFormatter:d,style:a[0]||a,ref:M=>this.saveHandle(0,M),onFocus:this.onFocus,onBlur:this.onBlur}),v=C!==void 0?this.calcOffset(C):0,m=r[0]||r;return{tracks:this.getTrack({prefixCls:e,reverse:y,vertical:o,included:t,offset:v,minimumTrackStyle:s,mergedTrackStyle:m,length:V-v}),handles:S}}}}),We=be(Ie),_=e=>{let{value:o,handle:t,bounds:n,props:s}=e;const{allowCross:r,pushable:a}=s,i=Number(a),l=Q(o,s);let u=l;return!r&&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:Oe(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:[J],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:r}=this;r===void 0&&(r=s);const a=r.map((l,u)=>_({value:l,handle:u,props:this.$props}));return{sHandle:null,recent:a[0]===t?0:a.length-1,bounds:a}},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=>me(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(r=>{e[r]!==void 0&&(s[r]=e[r])}),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),r=o[s];if(t===r)return null;const a=[...o];return a[s]=t,a},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 r=[...o];r[this.prevMovedHandleIndex]=t,this.onChange({bounds:r})},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:r}=this,a=r.max||100,i=r.min||0;if(t){let b=r.vertical?-o:o;b=r.reverse?-b:b;const C=a-Math.max(...n),y=i-Math.min(...n),B=Math.min(Math.max(b/(this.getSliderLength()/100),y),C),h=n.map(x=>Math.floor(Math.max(Math.min(x+B,a),i)));s.bounds.map((x,c)=>x===h[c]).some(x=>!x)&&this.onChange({bounds:h});return}const{bounds:l,sHandle:u}=this,d=this.calcValueByPos(o),p=l[u];d!==p&&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:r}=this,a=s[r===null?this.recent:r],i=n(a,this.$props),l=_({value:i,handle:r,bounds:s,props:this.$props});if(l===a)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 r=t[o+1]===t[o];return r&&t[n]===t[o]&&(s=n),r&&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 r=f({},e);if(o!==null)for(let i=t;i<=n;i+=o)r[i]=i;const a=Object.keys(r).map(parseFloat);a.sort((i,l)=>i-l),this.internalPointsCache={marks:e,step:o,points:a}}return this.internalPointsCache.points},moveTo(e,o){const t=[...this.bounds],{sHandle:n,recent:s}=this,r=n===null?s:n;t[r]=e;let a=r;this.$props.pushable!==!1?this.pushSurroundingHandles(t,a):this.$props.allowCross&&(t.sort((i,l)=>i-l),a=t.indexOf(e)),this.onChange({recent:a,sHandle:a,bounds:t}),o&&(this.$emit("afterChange",t),this.setState({},()=>{this.handlesRefs[a].focus()}),this.onEnd())},pushSurroundingHandles(e,o){const t=e[o],{pushable:n}=this,s=Number(n);let r=0;if(e[o+1]-t<s&&(r=1),t-e[o-1]<s&&(r=-1),r===0)return;const a=o+r,i=r*(e[a]-t);this.pushHandle(e,a,r,s-i)||(e[o]=e[a]-r*s)},pushHandle(e,o,t,n){const s=e[o];let r=e[o];for(;t*(r-s)<n;){if(!this.pushHandleOnePoint(e,o,t))return e[o]=s,!1;r=e[o]}return!0},pushHandleOnePoint(e,o,t){const n=this.getPoints(),r=n.indexOf(e[o])+t;if(r>=n.length||r<0)return!1;const a=o+t,i=n[r],{pushable:l}=this,u=Number(l),d=t*(e[a]-i);return this.pushHandle(e,a,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 r=this.$data||{},{bounds:a}=r;if(e=e===void 0?r.sHandle:e,s=Number(s),!n&&e!=null&&a!==void 0){if(e>0&&o<=a[e-1]+s)return a[e-1]+s;if(e<a.length-1&&o>=a[e+1]-s)return a[e+1]-s}return o},getTrack(e){let{bounds:o,prefixCls:t,reverse:n,vertical:s,included:r,offsets:a,trackStyle:i}=e;return o.slice(0,-1).map((l,u)=>{const d=u+1,p=R({[`${t}-track`]:!0,[`${t}-track-${d}`]:!0});return w(q,{class:p,vertical:s,reverse:n,included:r,offset:a[d-1],length:a[d]-a[d-1],style:i[u],key:d},null)})},renderSlider(){const{sHandle:e,bounds:o,prefixCls:t,vertical:n,included:s,disabled:r,min:a,max:i,reverse:l,handle:u,defaultHandle:d,trackStyle:p,handleStyle:b,tabindex:C,ariaLabelGroupForHandles:y,ariaLabelledByGroupForHandles:B,ariaValueTextFormatterGroupForHandles:h}=this,x=u||d,c=o.map(S=>this.calcOffset(S)),$=`${t}-handle`,V=o.map((S,v)=>{let m=C[v]||0;(r||C[v]===null)&&(m=null);const M=e===v;return x({class:R({[$]:!0,[`${$}-${v+1}`]:!0,[`${$}-dragging`]:M}),prefixCls:t,vertical:n,dragging:M,offset:c[v],value:S,index:v,tabindex:m,min:a,max:i,reverse:l,disabled:r,style:b[v],ref:O=>this.saveHandle(v,O),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:y[v],ariaLabelledBy:B[v],ariaValueTextFormatter:h[v]})});return{tracks:this.getTrack({bounds:o,prefixCls:t,reverse:l,vertical:n,included:s,offsets:c,trackStyle:p}),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),r=U(null);function a(){ee.cancel(r.value),r.value=null}function i(){r.value=ee(()=>{var u;(u=s.value)===null||u===void 0||u.forcePopupAlign(),r.value=null})}const l=()=>{a(),e.open&&i()};return Fe([()=>e.open,()=>e.title],()=>{l()},{flush:"post",immediate:!0}),Le(()=>{l()}),ie(()=>{a()}),()=>w(Ne,P(P({ref:s},e),t),n)}}),Xe=e=>{const{componentCls:o,controlSize:t,dotSize:n,marginFull:s,marginPart:r,colorFillContentHover:a}=e;return{[o]:f(f({},Be(e)),{position:"relative",height:t,margin:`${r}px ${s}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${s}px ${r}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:a},[`${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{c as R,i as $e,_ as P,J as Ce,M as Y,g as Ve,m as we,r as Be,u as Me}from"./useConfigInject-C2E3Qsop.js";import{_ as f,w as Te,p as z,y as D,n as N,x as Pe,o as He}from"./index-4C1c4hkZ.js";import{P as g,w as Oe}from"./index-U4Zd5IK6.js";import{B as J}from"./Trigger-CIW_GVYA.js";import{c as w,d as I,l as ke,o as ie,s as Z,j as le,w as Fe,a6 as Le,r as U}from"./vendor-aH7YaPZi.js";import{s as ue,a as G}from"./motion-DPnqtODq.js";import{K as E}from"./KeyCode-D63Tfrq7.js";import{i as de}from"./initDefaultProps-_t-PG0bz.js";import{T as Ne,b as Ee}from"./index-lrfnKtkl.js";import{w as ee}from"./raf-Deuc0E8-.js";import{u as De}from"./FormItemContext-RYn2zMn5.js";import{T as je}from"./icons-DzieZiVh.js";import"./Portal-DXIqogG2.js";import"./vnode-CIbqhcnZ.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-CWA3v-Ds.js";import"./transition-exl3w1iN.js";import"./placementArrow-BUkUxlJc.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-BgoKrIXh.js";import"./zoom-Ck9WbYsZ.js";import"./Keyframes-C7fCrnlS.js";import"./createContext-BTceykzK.js";const q=(e,o)=>{let{attrs:t}=o;const{included:n,vertical:s,style:r,class:a}=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}%`},p=f(f({},r),d);return n?w("div",{class:a,style:p},null):null};q.inheritAttrs=!1;const Re=(e,o,t,n,s,r)=>{const a=Object.keys(o).map(parseFloat).sort((i,l)=>i-l);if(t&&n)for(let i=s;i<=r;i+=n)a.indexOf(i)===-1&&a.push(i);return a},ce=(e,o)=>{let{attrs:t}=o;const{prefixCls:n,vertical:s,reverse:r,marks:a,dots:i,step:l,included:u,lowerBound:d,upperBound:p,max:b,min:C,dotStyle:y,activeDotStyle:B}=t,h=b-C,x=Re(s,a,i,l,C,b).map(c=>{const $=`${Math.abs(c-C)/h*100}%`,V=!u&&c===p||u&&c<=p&&c>=d;let S=s?f(f({},y),{[r?"top":"bottom"]:$}):f(f({},y),{[r?"right":"left"]:$});V&&(S=f(f({},S),B));const v=R({[`${n}-dot`]:!0,[`${n}-dot-active`]:V,[`${n}-dot-reverse`]:r});return w("span",{class:v,style:S,key:c},null)});return w("div",{class:`${n}-step`},[x])};ce.inheritAttrs=!1;const he=(e,o)=>{let{attrs:t,slots:n}=o;const{class:s,vertical:r,reverse:a,marks:i,included:l,upperBound:u,lowerBound:d,max:p,min:b,onClickLabel:C}=t,y=Object.keys(i),B=n.mark,h=p-b,x=y.map(parseFloat).sort((c,$)=>c-$).map(c=>{const $=typeof i[c]=="function"?i[c]():i[c],V=typeof $=="object"&&!$e($);let S=V?$.label:$;if(!S&&S!==0)return null;B&&(S=B({point:c,label:S}));const v=!l&&c===u||l&&c<=u&&c>=d,m=R({[`${s}-text`]:!0,[`${s}-text-active`]:v}),M={marginBottom:"-50%",[a?"top":"bottom"]:`${(c-b)/h*100}%`},O={transform:`translateX(${a?"50%":"-50%"})`,msTransform:`translateX(${a?"50%":"-50%"})`,[a?"right":"left"]:`${(c-b)/h*100}%`},T=r?M:O,L=V?f(f({},T),$.style):T,H={[ue?"onTouchstartPassive":"onTouchstart"]:k=>C(k,c)};return w("span",P({class:m,style:L,key:c,onMousedown:k=>C(k,c)},H),[S])});return w("div",{class:s},[x])};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 r=Z(!1),a=Z(),i=()=>{document.activeElement===a.value&&(r.value=!0)},l=h=>{r.value=!1,n("blur",h)},u=()=>{r.value=!1},d=()=>{var h;(h=a.value)===null||h===void 0||h.focus()},p=()=>{var h;(h=a.value)===null||h===void 0||h.blur()},b=()=>{r.value=!0,d()},C=h=>{h.preventDefault(),d(),n("mousedown",h)};s({focus:d,blur:p,clickFocus:b,ref:a});let y=null;ke(()=>{y=G(document,"mouseup",i)}),ie(()=>{y?.remove()});const B=le(()=>{const{vertical:h,offset:x,reverse:c}=e;return h?{[c?"top":"bottom"]:`${x}%`,[c?"bottom":"top"]:"auto",transform:c?null:"translateY(+50%)"}:{[c?"right":"left"]:`${x}%`,[c?"left":"right"]:"auto",transform:`translateX(${c?"+":"-"}50%)`}});return()=>{const{prefixCls:h,disabled:x,min:c,max:$,value:V,tabindex:S,ariaLabel:v,ariaLabelledBy:m,ariaValueTextFormatter:M,onMouseenter:O,onMouseleave:T}=e,L=R(t.class,{[`${h}-handle-click-focused`]:r.value}),H={"aria-valuemin":c,"aria-valuemax":$,"aria-valuenow":V,"aria-disabled":!!x},k=[t.style,B.value];let F=S||0;(x||S===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:a,style:k});return w("div",P(P({},K),{},{"aria-label":v,"aria-labelledby":m,"aria-valuetext":W}),null)}}});function X(e,o){try{return Object.keys(o).some(t=>e.target===o[t].ref)}catch{return!1}}function me(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:r}=o;const a=Object.keys(t).map(parseFloat);if(n!==null){const l=Math.pow(10,pe(n)),u=Math.floor((r*l-s*l)/(n*l)),d=Math.min((e-s)/n,u),p=Math.round(d)*n+s;a.push(p)}const i=a.map(l=>Math.abs(e-l));return a[i.indexOf(Math.min(...i))]}function pe(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 re(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(pe(t)))}function A(e){e.stopPropagation(),e.preventDefault()}function ze(e,o,t){const n={increase:(a,i)=>a+i,decrease:(a,i)=>a-i},s=n[e](Object.keys(t.marks).indexOf(JSON.stringify(o)),1),r=Object.keys(t.marks)[s];return t.step?n[e](o,t.step):Object.keys(t.marks).length&&t.marks[r]?t.marks[r]:o}function ve(e,o,t){const n="increase",s="decrease";let r=n;switch(e.keyCode){case E.UP:r=o&&t?s:n;break;case E.RIGHT:r=!o&&t?s:n;break;case E.DOWN:r=o&&t?n:s;break;case E.LEFT:r=!o&&t?n:s;break;case E.END:return(a,i)=>i.max;case E.HOME:return(a,i)=>i.min;case E.PAGE_UP:return(a,i)=>a+i.step*2;case E.PAGE_DOWN:return(a,i)=>a-i.step*2;default:return}return(a,i)=>ze(r,a,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:[J,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:r,style:a}=t,i=Ae(t,["index","directives","className","style"]);if(delete i.dragging,i.value===null)return null;const l=f(f({},i),{class:r,style:a,key:n});return w(fe,l,null)},onDown(t,n){let s=n;const{draggableTrack:r,vertical:a}=this.$props,{bounds:i}=this.$data,l=r&&this.positionGetValue?this.positionGetValue(s)||[]:[],u=X(t,this.handlesRefs);if(this.dragTrack=r&&i.length>=2&&!u&&!l.map((d,p)=>{const b=p?!0:d>=i[p];return p===l.length-1?d<=i[p]:b}).some(d=>!d),this.dragTrack)this.dragOffset=s,this.startBounds=[...i];else{if(!u)this.dragOffset=0;else{const d=re(a,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=re(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,r=t.getBoundingClientRect();return n?s?r.bottom:r.top:window.scrollX+(s?r.right:r.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:r}=this,a=Math.abs(Math.max(t,0)/this.getSliderLength());return n?(1-a)*(r-s)+s:a*(r-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,r=(t-n)/(s-n);return Math.max(0,r*100)},saveSlider(t){this.sliderRef=t},saveHandle(t,n){this.handlesRefs[t]=n}},render(){const{prefixCls:t,marks:n,dots:s,step:r,included:a,disabled:i,vertical:l,reverse:u,min:d,max:p,maximumTrackStyle:b,railStyle:C,dotStyle:y,activeDotStyle:B,id:h}=this,{class:x,style:c}=this.$attrs,{tracks:$,handles:V}=this.renderSlider(),S=R(t,x,{[`${t}-with-marks`]:Object.keys(n).length,[`${t}-disabled`]:i,[`${t}-vertical`]:l,[`${t}-horizontal`]:!l}),v={vertical:l,marks:n,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:d,reverse:u,class:`${t}-mark`,onClickLabel:i?j:this.onClickMarkLabel},m={[ue?"onTouchstartPassive":"onTouchstart"]:i?j:this.onTouchStart};return w("div",P(P({id:h,ref:this.saveSlider,tabindex:"-1",class:S},m),{},{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}),[w("div",{class:`${t}-rail`,style:f(f({},b),C)},null),$,w(ce,{prefixCls:t,vertical:l,reverse:u,marks:n,dots:s,step:r,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:d,dotStyle:y,activeDotStyle:B},null),V,w(he,v,{mark:this.$slots.mark}),Ce(this)])}})}const Ie=I({compatConfig:{MODE:3},name:"Slider",mixins:[J],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}),me(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,r=n(s,this.$props),a=this.trimAlignValue(r);if(a===s)return;this.onChange({sValue:a}),this.$emit("afterChange",a),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:r,mergedTrackStyle:a,length:i,offset:l}=e;return w(q,{class:`${o}-track`,vertical:n,included:s,offset:l,reverse:t,length:i,style:f(f({},r),a)},null)},renderSlider(){const{prefixCls:e,vertical:o,included:t,disabled:n,minimumTrackStyle:s,trackStyle:r,handleStyle:a,tabindex:i,ariaLabelForHandle:l,ariaLabelledByForHandle:u,ariaValueTextFormatterForHandle:d,min:p,max:b,startPoint:C,reverse:y,handle:B,defaultHandle:h}=this,x=B||h,{sValue:c,dragging:$}=this,V=this.calcOffset(c),S=x({class:`${e}-handle`,prefixCls:e,vertical:o,offset:V,value:c,dragging:$,disabled:n,min:p,max:b,reverse:y,index:0,tabindex:i,ariaLabel:l,ariaLabelledBy:u,ariaValueTextFormatter:d,style:a[0]||a,ref:M=>this.saveHandle(0,M),onFocus:this.onFocus,onBlur:this.onBlur}),v=C!==void 0?this.calcOffset(C):0,m=r[0]||r;return{tracks:this.getTrack({prefixCls:e,reverse:y,vertical:o,included:t,offset:v,minimumTrackStyle:s,mergedTrackStyle:m,length:V-v}),handles:S}}}}),We=be(Ie),_=e=>{let{value:o,handle:t,bounds:n,props:s}=e;const{allowCross:r,pushable:a}=s,i=Number(a),l=Q(o,s);let u=l;return!r&&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:Oe(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:[J],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:r}=this;r===void 0&&(r=s);const a=r.map((l,u)=>_({value:l,handle:u,props:this.$props}));return{sHandle:null,recent:a[0]===t?0:a.length-1,bounds:a}},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=>me(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(r=>{e[r]!==void 0&&(s[r]=e[r])}),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),r=o[s];if(t===r)return null;const a=[...o];return a[s]=t,a},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 r=[...o];r[this.prevMovedHandleIndex]=t,this.onChange({bounds:r})},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:r}=this,a=r.max||100,i=r.min||0;if(t){let b=r.vertical?-o:o;b=r.reverse?-b:b;const C=a-Math.max(...n),y=i-Math.min(...n),B=Math.min(Math.max(b/(this.getSliderLength()/100),y),C),h=n.map(x=>Math.floor(Math.max(Math.min(x+B,a),i)));s.bounds.map((x,c)=>x===h[c]).some(x=>!x)&&this.onChange({bounds:h});return}const{bounds:l,sHandle:u}=this,d=this.calcValueByPos(o),p=l[u];d!==p&&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:r}=this,a=s[r===null?this.recent:r],i=n(a,this.$props),l=_({value:i,handle:r,bounds:s,props:this.$props});if(l===a)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 r=t[o+1]===t[o];return r&&t[n]===t[o]&&(s=n),r&&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 r=f({},e);if(o!==null)for(let i=t;i<=n;i+=o)r[i]=i;const a=Object.keys(r).map(parseFloat);a.sort((i,l)=>i-l),this.internalPointsCache={marks:e,step:o,points:a}}return this.internalPointsCache.points},moveTo(e,o){const t=[...this.bounds],{sHandle:n,recent:s}=this,r=n===null?s:n;t[r]=e;let a=r;this.$props.pushable!==!1?this.pushSurroundingHandles(t,a):this.$props.allowCross&&(t.sort((i,l)=>i-l),a=t.indexOf(e)),this.onChange({recent:a,sHandle:a,bounds:t}),o&&(this.$emit("afterChange",t),this.setState({},()=>{this.handlesRefs[a].focus()}),this.onEnd())},pushSurroundingHandles(e,o){const t=e[o],{pushable:n}=this,s=Number(n);let r=0;if(e[o+1]-t<s&&(r=1),t-e[o-1]<s&&(r=-1),r===0)return;const a=o+r,i=r*(e[a]-t);this.pushHandle(e,a,r,s-i)||(e[o]=e[a]-r*s)},pushHandle(e,o,t,n){const s=e[o];let r=e[o];for(;t*(r-s)<n;){if(!this.pushHandleOnePoint(e,o,t))return e[o]=s,!1;r=e[o]}return!0},pushHandleOnePoint(e,o,t){const n=this.getPoints(),r=n.indexOf(e[o])+t;if(r>=n.length||r<0)return!1;const a=o+t,i=n[r],{pushable:l}=this,u=Number(l),d=t*(e[a]-i);return this.pushHandle(e,a,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 r=this.$data||{},{bounds:a}=r;if(e=e===void 0?r.sHandle:e,s=Number(s),!n&&e!=null&&a!==void 0){if(e>0&&o<=a[e-1]+s)return a[e-1]+s;if(e<a.length-1&&o>=a[e+1]-s)return a[e+1]-s}return o},getTrack(e){let{bounds:o,prefixCls:t,reverse:n,vertical:s,included:r,offsets:a,trackStyle:i}=e;return o.slice(0,-1).map((l,u)=>{const d=u+1,p=R({[`${t}-track`]:!0,[`${t}-track-${d}`]:!0});return w(q,{class:p,vertical:s,reverse:n,included:r,offset:a[d-1],length:a[d]-a[d-1],style:i[u],key:d},null)})},renderSlider(){const{sHandle:e,bounds:o,prefixCls:t,vertical:n,included:s,disabled:r,min:a,max:i,reverse:l,handle:u,defaultHandle:d,trackStyle:p,handleStyle:b,tabindex:C,ariaLabelGroupForHandles:y,ariaLabelledByGroupForHandles:B,ariaValueTextFormatterGroupForHandles:h}=this,x=u||d,c=o.map(S=>this.calcOffset(S)),$=`${t}-handle`,V=o.map((S,v)=>{let m=C[v]||0;(r||C[v]===null)&&(m=null);const M=e===v;return x({class:R({[$]:!0,[`${$}-${v+1}`]:!0,[`${$}-dragging`]:M}),prefixCls:t,vertical:n,dragging:M,offset:c[v],value:S,index:v,tabindex:m,min:a,max:i,reverse:l,disabled:r,style:b[v],ref:O=>this.saveHandle(v,O),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:y[v],ariaLabelledBy:B[v],ariaValueTextFormatter:h[v]})});return{tracks:this.getTrack({bounds:o,prefixCls:t,reverse:l,vertical:n,included:s,offsets:c,trackStyle:p}),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),r=U(null);function a(){ee.cancel(r.value),r.value=null}function i(){r.value=ee(()=>{var u;(u=s.value)===null||u===void 0||u.forcePopupAlign(),r.value=null})}const l=()=>{a(),e.open&&i()};return Fe([()=>e.open,()=>e.title],()=>{l()},{flush:"post",immediate:!0}),Le(()=>{l()}),ie(()=>{a()}),()=>w(Ne,P(P({ref:s},e),t),n)}}),Xe=e=>{const{componentCls:o,controlSize:t,dotSize:n,marginFull:s,marginPart:r,colorFillContentHover:a}=e;return{[o]:f(f({},Be(e)),{position:"relative",height:t,margin:`${r}px ${s}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${s}px ${r}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:a},[`${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{l as be,M as Ce,s as pe,f as $e,d as D,c as a,r as ve,j as Q,J as de,a2 as Se}from"./vendor-C5RM7MZO.js";import{_ as l,p as N,n as K,x as xe,y as ye,q as Ie,w as Pe}from"./index-DaMG8ksh.js";import{x as ne,an as re,ao as ae,ap as oe}from"./icons-CpgFsfkd.js";import{S as G,s as ge}from"./index-D_oSE2Nk.js";import{c as v,V as Oe,_ as M,i as le,M as F,N as Te,g as ze,m as Be,r as we,A as Ne,G as se,u as Me,S as Ee,W as je}from"./useConfigInject-ImjEZhXr.js";import{u as _e}from"./responsiveObserve-C5giLhLf.js";import{i as De,g as Ae,h as Re}from"./index-BBOVB9YK.js";import{P as s}from"./index-U4Zd5IK6.js";import{B as He}from"./Trigger-C7MTh_xj.js";import{B as me}from"./BaseInput-wLmjCc9u.js";import{c as ue}from"./vnode-DAWimP6X.js";import{f as ce}from"./firstNotUndefined-CLFzEa0p.js";function Ke(){const e=pe({});let t=null;const i=_e();return be(()=>{t=i.value.subscribe(n=>{e.value=n})}),Ce(()=>{i.value.unsubscribe(t)}),e}function Ct(e){const t=pe();return $e(()=>{t.value=e()},{flush:"sync"}),t}const Fe=D({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)}}}),Ve=D({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=D({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},We=D({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 _=e.buildOptionText||n,d=p.value.map((f,V)=>a(S.Option,{key:V,value:f},{default:()=>[_({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])}}}),Je={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"};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=D({compatConfig:{MODE:3},name:"Pagination",mixins:[He],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(Je),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,F(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(F(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 Te(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"&&(F(this,"pageSize")||this.setState({statePageSize:e}),F(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),F(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 le(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 le(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=Oe(this.$attrs).extraAttrs,{class:z}=y,_=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",M({class:v(`${e} ${e}-simple`,{[`${e}-disabled`]:t},z)},_),[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,M(M({},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,M(M({},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),R=Math.min(o+I,d);o-1<=I&&(R=1+I*2),d-o<=I&&(w=d-I*2);for(let H=w;H<=R;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:R,page:R,class:`${e}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.push(Y)),w!==1&&f.unshift(Z),R!==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",M(M({unselectable:"on",ref:"paginationNode"},_),{},{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(We,{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{l as be,M as Ce,s as pe,f as $e,d as D,c as a,r as ve,j as Q,J as de,a4 as Se}from"./vendor-aH7YaPZi.js";import{_ as l,p as N,n as K,x as xe,y as ye,q as Ie,w as Pe}from"./index-4C1c4hkZ.js";import{y as ne,ap as re,aq as ae,ar as oe}from"./icons-DzieZiVh.js";import{S as G,s as ge}from"./index-KEQgDCwj.js";import{c as v,V as Oe,_ as M,i as le,M as F,N as Te,g as ze,m as Be,r as we,v as Ne,G as se,u as Me,S as Ee,W as je}from"./useConfigInject-C2E3Qsop.js";import{u as _e}from"./responsiveObserve-DA_o8FHw.js";import{i as De,g as Ae,h as Re}from"./index-BMU9I-F6.js";import{P as s}from"./index-U4Zd5IK6.js";import{B as He}from"./Trigger-CIW_GVYA.js";import{B as me}from"./BaseInput-BKgAovqI.js";import{c as ue}from"./vnode-CIbqhcnZ.js";import{f as ce}from"./firstNotUndefined-CLFzEa0p.js";function Ke(){const e=pe({});let t=null;const i=_e();return be(()=>{t=i.value.subscribe(n=>{e.value=n})}),Ce(()=>{i.value.unsubscribe(t)}),e}function Ct(e){const t=pe();return $e(()=>{t.value=e()},{flush:"sync"}),t}const Fe=D({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)}}}),Ve=D({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=D({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},We=D({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 _=e.buildOptionText||n,d=p.value.map((f,V)=>a(S.Option,{key:V,value:f},{default:()=>[_({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])}}}),Je={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"};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 qe=D({compatConfig:{MODE:3},name:"Pagination",mixins:[He],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(Je),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,F(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(F(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 Te(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"&&(F(this,"pageSize")||this.setState({statePageSize:e}),F(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),F(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 le(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 le(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=Oe(this.$attrs).extraAttrs,{class:z}=y,_=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",M({class:v(`${e} ${e}-simple`,{[`${e}-disabled`]:t},z)},_),[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,M(M({},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,M(M({},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),R=Math.min(o+I,d);o-1<=I&&(R=1+I*2),d-o<=I&&(w=d-I*2);for(let H=w;H<=R;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:R,page:R,class:`${e}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.push(Y)),w!==1&&f.unshift(Z),R!==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 q=!J||!d,U=!L||!d,he=this.buildOptionText||this.$slots.buildOptionText;return a("ul",M(M({unselectable:"on",ref:"paginationNode"},_),{},{class:v({[`${e}`]:!0,[`${e}-disabled`]:t},z)}),[ie,a("li",{title:p?r.prev_page:null,onClick:this.prev,tabindex:q?null:0,onKeypress:this.runIfEnterPrev,class:v(`${e}-prev`,{[`${e}-disabled`]:q}),"aria-disabled":q},[this.renderPrev(ee)]),f,a("li",{title:p?r.next_page:null,onClick:this.next,tabindex:U?null:0,onKeypress:this.runIfEnterNext,class:v(`${e}-next`,{[`${e}-disabled`]:U}),"aria-disabled":U},[this.renderNext(te)]),a(We,{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)])}}),Ue=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,
|
|
@@ -18,4 +18,4 @@ import{l as be,M as Ce,s as pe,f as $e,d as D,c as a,r as ve,j as Q,J as de,a2 a
|
|
|
18
18
|
${t}-next,
|
|
19
19
|
${t}-jump-prev,
|
|
20
20
|
${t}-jump-next
|
|
21
|
-
`]:{display:"inline-block",minWidth:e.paginationItemSize,height:e.paginationItemSize,color:e.colorText,fontFamily:e.paginationFontFamily,lineHeight:`${e.paginationItemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:focus-visible ${t}-item-link`]:l({},se(e)),[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:`${e.controlHeight}px`,verticalAlign:"top",input:l(l({},Ae(e)),{width:e.controlHeightLG*1.25,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},ke=e=>{const{componentCls:t}=e;return{[`${t}-item`]:l(l({display:"inline-block",minWidth:e.paginationItemSize,height:e.paginationItemSize,marginInlineEnd:e.marginXS,fontFamily:e.paginationFontFamily,lineHeight:`${e.paginationItemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${e.paginationItemPaddingInline}px`,color:e.colorText,transition:"none","&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}}},Ne(e)),{"&-active":{fontWeight:e.paginationFontWeightActive,backgroundColor:e.paginationItemBgActive,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}})}},et=e=>{const{componentCls:t}=e;return{[t]:l(l(l(l(l(l(l(l({},we(e)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.paginationItemSize,marginInlineEnd:e.marginXS,lineHeight:`${e.paginationItemSize-2}px`,verticalAlign:"middle"}}),ke(e)),Ze(e)),Ye(e)),Qe(e)),
|
|
21
|
+
`]:{display:"inline-block",minWidth:e.paginationItemSize,height:e.paginationItemSize,color:e.colorText,fontFamily:e.paginationFontFamily,lineHeight:`${e.paginationItemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:focus-visible ${t}-item-link`]:l({},se(e)),[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:`${e.controlHeight}px`,verticalAlign:"top",input:l(l({},Ae(e)),{width:e.controlHeightLG*1.25,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},ke=e=>{const{componentCls:t}=e;return{[`${t}-item`]:l(l({display:"inline-block",minWidth:e.paginationItemSize,height:e.paginationItemSize,marginInlineEnd:e.marginXS,fontFamily:e.paginationFontFamily,lineHeight:`${e.paginationItemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${e.paginationItemPaddingInline}px`,color:e.colorText,transition:"none","&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}}},Ne(e)),{"&-active":{fontWeight:e.paginationFontWeightActive,backgroundColor:e.paginationItemBgActive,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}})}},et=e=>{const{componentCls:t}=e;return{[t]:l(l(l(l(l(l(l(l({},we(e)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.paginationItemSize,marginInlineEnd:e.marginXS,lineHeight:`${e.paginationItemSize-2}px`,verticalAlign:"middle"}}),ke(e)),Ze(e)),Ye(e)),Qe(e)),Ue(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},tt=e=>{const{componentCls:t}=e;return{[`${t}${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.paginationItemDisabledBgActive}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[t]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.paginationItemBg},[`${t}-item-link`]:{backgroundColor:e.paginationItemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.paginationItemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.paginationItemBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.paginationItemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},it=ze("Pagination",e=>{const t=Be(e,{paginationItemSize:e.controlHeight,paginationFontFamily:e.fontFamily,paginationItemBg:e.colorBgContainer,paginationItemBgActive:e.colorBgContainer,paginationFontWeightActive:e.fontWeightStrong,paginationItemSizeSM:e.controlHeightSM,paginationItemInputBg:e.colorBgContainer,paginationMiniOptionsSizeChangerTop:0,paginationItemDisabledBgActive:e.controlItemBgActiveDisabled,paginationItemDisabledColorActive:e.colorTextDisabled,paginationItemLinkBg:e.colorBgContainer,inputOutlineOffset:"0 0",paginationMiniOptionsMarginInlineStart:e.marginXXS/2,paginationMiniQuickJumperInputWidth:e.controlHeightLG*1.1,paginationItemPaddingInline:e.marginXXS*1.5,paginationEllipsisLetterSpacing:e.marginXXS/2,paginationSlashMarginInlineStart:e.marginXXS,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},De(e));return[et(t),e.wireframe&&tt(t)]});var nt=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};const rt=()=>({total:Number,defaultCurrent:Number,disabled:K(),current:Number,defaultPageSize:Number,pageSize:Number,hideOnSinglePage:K(),showSizeChanger:K(),pageSizeOptions:Ie(),buildOptionText:N(),showQuickJumper:ye([Boolean,Object]),showTotal:N(),size:xe(),simple:K(),locale:Object,prefixCls:String,selectPrefixCls:String,totalBoundaryShowSizeChanger:Number,selectComponentClass:String,itemRender:N(),role:String,responsive:Boolean,showLessItems:K(),onChange:N(),onShowSizeChange:N(),"onUpdate:current":N(),"onUpdate:pageSize":N()}),at=D({compatConfig:{MODE:3},name:"APagination",inheritAttrs:!1,props:rt(),setup(e,t){let{slots:i,attrs:n}=t;const{prefixCls:r,configProvider:O,direction:g,size:p}=Me("pagination",e),[c,h]=it(r),u=Q(()=>O.getPrefixCls("select",e.selectPrefixCls)),b=Ke(),[$]=Ee("Pagination",je,Se(e,"locale")),S=m=>{const T=a("span",{class:`${m}-item-ellipsis`},[de("•••")]),x=a("button",{class:`${m}-item-link`,type:"button",tabindex:-1},[g.value==="rtl"?a(ne,null,null):a(re,null,null)]),o=a("button",{class:`${m}-item-link`,type:"button",tabindex:-1},[g.value==="rtl"?a(re,null,null):a(ne,null,null)]),C=a("a",{rel:"nofollow",class:`${m}-item-link`},[a("div",{class:`${m}-item-container`},[g.value==="rtl"?a(ae,{class:`${m}-item-link-icon`},null):a(oe,{class:`${m}-item-link-icon`},null),T])]),y=a("a",{rel:"nofollow",class:`${m}-item-link`},[a("div",{class:`${m}-item-container`},[g.value==="rtl"?a(oe,{class:`${m}-item-link-icon`},null):a(ae,{class:`${m}-item-link-icon`},null),T])]);return{prevIcon:x,nextIcon:o,jumpPrevIcon:C,jumpNextIcon:y}};return()=>{var m;const{itemRender:T=i.itemRender,buildOptionText:x=i.buildOptionText,selectComponentClass:o,responsive:C}=e,y=nt(e,["itemRender","buildOptionText","selectComponentClass","responsive"]),z=p.value==="small"||!!(!((m=b.value)===null||m===void 0)&&m.xs&&!p.value&&C),_=l(l(l(l(l({},y),S(r.value)),{prefixCls:r.value,selectPrefixCls:u.value,selectComponentClass:o||(z?Fe:Ve),locale:$.value,buildOptionText:x}),n),{class:v({[`${r.value}-mini`]:z,[`${r.value}-rtl`]:g.value==="rtl"},n.class,h.value),itemRender:T});return c(a(qe,_,null))}}}),$t=Pe(at);export{$t as P,Ct as e,Ke as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as v,t as D}from"./index-
|
|
1
|
+
import{_ as v,t as D}from"./index-4C1c4hkZ.js";import{g as re,m as ne,u as O,c as M,_ as F}from"./useConfigInject-C2E3Qsop.js";import{a as Z,S as ae}from"./injectionKey-BXVc-oGP.js";import{d as L,c as g,j as ie,r as le,p as G,i as se,s as A,w as j,l as de,o as ue}from"./vendor-aH7YaPZi.js";import{P as f}from"./index-U4Zd5IK6.js";import{i as ce}from"./initDefaultProps-_t-PG0bz.js";import{i as ge}from"./isNumeric-DjvBa-1E.js";import{ao as pe,ap as _,y as X}from"./icons-DzieZiVh.js";const fe=e=>{const{componentCls:n,colorBgContainer:o,colorBgBody:s,colorText:a}=e;return{[`${n}-sider-light`]:{background:o,[`${n}-sider-trigger`]:{color:a,background:o},[`${n}-sider-zero-width-trigger`]:{color:a,background:o,border:`1px solid ${s}`,borderInlineStart:0}}}},me=e=>{const{antCls:n,componentCls:o,colorText:s,colorTextLightSolid:a,colorBgHeader:p,colorBgBody:d,colorBgTrigger:i,layoutHeaderHeight:u,layoutHeaderPaddingInline:h,layoutHeaderColor:y,layoutFooterPadding:t,layoutTriggerHeight:l,layoutZeroTriggerSize:x,motionDurationMid:S,motionDurationSlow:r,fontSize:m,borderRadius:c}=e;return{[o]:v(v({display:"flex",flex:"auto",flexDirection:"column",color:s,minHeight:0,background:d,"&, *":{boxSizing:"border-box"},[`&${o}-has-sider`]:{flexDirection:"row",[`> ${o}, > ${o}-content`]:{width:0}},[`${o}-header, &${o}-footer`]:{flex:"0 0 auto"},[`${o}-header`]:{height:u,paddingInline:h,color:y,lineHeight:`${u}px`,background:p,[`${n}-menu`]:{lineHeight:"inherit"}},[`${o}-footer`]:{padding:t,color:s,fontSize:m,background:d},[`${o}-content`]:{flex:"auto",minHeight:0},[`${o}-sider`]:{position:"relative",minWidth:0,background:p,transition:`all ${S}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${n}-menu${n}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:l},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:l,color:a,lineHeight:`${l}px`,textAlign:"center",background:i,cursor:"pointer",transition:`all ${S}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:u,insetInlineEnd:-x,zIndex:1,width:x,height:x,color:a,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:p,borderStartStartRadius:0,borderStartEndRadius:c,borderEndEndRadius:c,borderEndStartRadius:0,cursor:"pointer",transition:`background ${r} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${r}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-x,borderStartStartRadius:c,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:c}}}}},fe(e)),{"&-rtl":{direction:"rtl"}})}},he=re("Layout",e=>{const{colorText:n,controlHeightSM:o,controlHeight:s,controlHeightLG:a,marginXXS:p}=e,d=a*1.25,i=ne(e,{layoutHeaderHeight:s*2,layoutHeaderPaddingInline:d,layoutHeaderColor:n,layoutFooterPadding:`${o}px ${d}px`,layoutTriggerHeight:a+p*2,layoutZeroTriggerSize:a});return[me(i)]},e=>{const{colorBgLayout:n}=e;return{colorBgHeader:"#001529",colorBgBody:n,colorBgTrigger:"#002140"}}),P=()=>({prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String});function B(e){let{suffixCls:n,tagName:o,name:s}=e;return a=>L({compatConfig:{MODE:3},name:s,props:P(),setup(d,i){let{slots:u}=i;const{prefixCls:h}=O(n,d);return()=>{const y=v(v({},d),{prefixCls:h.value,tagName:o});return g(a,y,u)}}})}const R=L({compatConfig:{MODE:3},props:P(),setup(e,n){let{slots:o}=n;return()=>g(e.tagName,{class:e.prefixCls},o)}}),ye=L({compatConfig:{MODE:3},inheritAttrs:!1,props:P(),setup(e,n){let{slots:o,attrs:s}=n;const{prefixCls:a,direction:p}=O("",e),[d,i]=he(a),u=le([]);G(Z,{addSider:t=>{u.value=[...u.value,t]},removeSider:t=>{u.value=u.value.filter(l=>l!==t)}});const y=ie(()=>{const{prefixCls:t,hasSider:l}=e;return{[i.value]:!0,[`${t}`]:!0,[`${t}-has-sider`]:typeof l=="boolean"?l:u.value.length>0,[`${t}-rtl`]:p.value==="rtl"}});return()=>{const{tagName:t}=e;return d(g(t,v(v({},s),{class:[y.value,s.class]}),o))}}}),I=B({suffixCls:"layout",tagName:"section",name:"ALayout"})(ye),C=B({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(R),w=B({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(R),H=B({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(R),K={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1999.98px"},xe=()=>({prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:f.any,width:f.oneOfType([f.number,f.string]),collapsedWidth:f.oneOfType([f.number,f.string]),breakpoint:f.oneOf(D("xs","sm","md","lg","xl","xxl","xxxl")),theme:f.oneOf(D("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}),ve=(()=>{let e=0;return function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e+=1,`${n}${e}`}})(),k=L({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:ce(xe(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup(e,n){let{emit:o,attrs:s,slots:a}=n;const{prefixCls:p}=O("layout-sider",e),d=se(Z,void 0),i=A(!!(e.collapsed!==void 0?e.collapsed:e.defaultCollapsed)),u=A(!1);j(()=>e.collapsed,()=>{i.value=!!e.collapsed}),G(ae,i);const h=(r,m)=>{e.collapsed===void 0&&(i.value=r),o("update:collapsed",r),o("collapse",r,m)},y=A(r=>{u.value=r.matches,o("breakpoint",r.matches),i.value!==r.matches&&h(r.matches,"responsive")});let t;function l(r){return y.value(r)}const x=ve("ant-sider-");d&&d.addSider(x),de(()=>{j(()=>e.breakpoint,()=>{try{t?.removeEventListener("change",l)}catch{t?.removeListener(l)}if(typeof window<"u"){const{matchMedia:r}=window;if(r&&e.breakpoint&&e.breakpoint in K){t=r(`(max-width: ${K[e.breakpoint]})`);try{t.addEventListener("change",l)}catch{t.addListener(l)}l(t)}}},{immediate:!0})}),ue(()=>{try{t?.removeEventListener("change",l)}catch{t?.removeListener(l)}d&&d.removeSider(x)});const S=()=>{h(!i.value,"clickTrigger")};return()=>{var r,m;const c=p.value,{collapsedWidth:N,width:U,reverseArrow:T,zeroWidthTriggerStyle:V,trigger:$=(r=a.trigger)===null||r===void 0?void 0:r.call(a),collapsible:W,theme:J}=e,z=i.value?N:U,b=ge(z)?`${z}px`:String(z),E=parseFloat(String(N||0))===0?g("span",{onClick:S,class:M(`${c}-zero-width-trigger`,`${c}-zero-width-trigger-${T?"right":"left"}`),style:V},[$||g(pe,null,null)]):null,Q={expanded:T?g(X,null,null):g(_,null,null),collapsed:T?g(_,null,null):g(X,null,null)},Y=i.value?"collapsed":"expanded",q=Q[Y],ee=$!==null?E||g("div",{class:`${c}-trigger`,onClick:S,style:{width:b}},[$||q]):null,te=[s.style,{flex:`0 0 ${b}`,maxWidth:b,minWidth:b,width:b}],oe=M(c,`${c}-${J}`,{[`${c}-collapsed`]:!!i.value,[`${c}-has-trigger`]:W&&$!==null&&!E,[`${c}-below`]:!!u.value,[`${c}-zero-width`]:parseFloat(b)===0},s.class);return g("aside",F(F({},s),{},{class:oe,style:te}),[g("div",{class:`${c}-children`},[(m=a.default)===null||m===void 0?void 0:m.call(a)]),W||u.value&&E?ee:null])}}}),Be=C,Te=w,ze=k,Ee=H,Ae=v(I,{Header:C,Footer:w,Content:H,Sider:k,install:e=>(e.component(I.name,I),e.component(C.name,C),e.component(w.name,w),e.component(k.name,k),e.component(H.name,H),e)});export{Ee as LayoutContent,Te as LayoutFooter,Be as LayoutHeader,ze as LayoutSider,Ae as default};
|