chainlesschain 0.162.0 → 0.162.1
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/package.json +1 -1
- package/src/assets/web-panel/assets/{AIOps-Dn8q-Cu4.js → AIOps-5A54O3wF.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-BePEVs4O.js → ActionButton-epuY2GkZ.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-CKp-5Gi0.js → Analytics-CIdxw7T5.js} +1 -1
- package/src/assets/web-panel/assets/{AppLayout-BSudqld0.js → AppLayout-xR6YUHsS.js} +2 -2
- package/src/assets/web-panel/assets/{Audit-iefpSeRG.js → Audit-D95nRcdZ.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-Ce43ZIhD.js → Backup-Cmw7ZTJD.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-BvGiwRav.js → BaseInput-DgCEAL_E.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-BAaQg-Oc.js → Chat-DAQAzZsA.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-Dvn8uxKO.js → Checkbox-GRxUANnE.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-CTcZCayj.js → Codegen--6KIDt1W.js} +1 -1
- package/src/assets/web-panel/assets/{Col-CBFpGgb5.js → Col-3s6dxuMx.js} +1 -1
- package/src/assets/web-panel/assets/{Community-DmCYaV9M.js → Community-D60pkEBz.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-DnOD5uMF.js → Compact-CQR4QsWP.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-u53e9lg-.js → Compliance-KySNEhMK.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-CL5ohuXH.js → Cowork-Yrrf_Vuu.js} +1 -1
- package/src/assets/web-panel/assets/{Cron-DubcmRgt.js → Cron-DSuuSKIQ.js} +1 -1
- package/src/assets/web-panel/assets/{Crosschain-BWXcUXc3.js → Crosschain-Dub0G9i4.js} +1 -1
- package/src/assets/web-panel/assets/{DID-Cw0i8WjE.js → DID-CbpCGV51.js} +1 -1
- package/src/assets/web-panel/assets/{Dashboard-BbofvIWH.js → Dashboard-D29e0y01.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-DN6ur5xV.js → Dropdown-DZY7X5v2.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-CA-rIdkY.js → Federation-dmrLzzMB.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-D_HGU4aA.js → FormItemContext-EopsCGez.js} +1 -1
- package/src/assets/web-panel/assets/{Git-CBWFs6Uk.js → Git-D3mb4RhK.js} +1 -1
- package/src/assets/web-panel/assets/{Governance-Cx6PTC43.js → Governance-8v034-Nr.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-Ubk1VstS.js → Inference-Ddl-HQwQ.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-DTB10MYO.js → KnowledgeGraph-DrRruyud.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-Tfk4FBVC.js → Logs-Bsu6lYQe.js} +1 -1
- package/src/assets/web-panel/assets/{Marketplace-BAsztG4O.js → Marketplace-Iyf2Xc23.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-DliPfvuK.js → McpTools-ljVE1lIN.js} +1 -1
- package/src/assets/web-panel/assets/{Memory-hkw6Xwyv.js → Memory-Ca48TtDU.js} +1 -1
- package/src/assets/web-panel/assets/{MobileBridge-eeNMFGj6.js → MobileBridge-DZ3Ar6da.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-BP3Riowm.js → Mtc-CRjBnVAT.js} +1 -1
- package/src/assets/web-panel/assets/{MtcAudit-DvD7pE7V.js → MtcAudit-CEC2eKez.js} +1 -1
- package/src/assets/web-panel/assets/{Multisig-CPtc-fVL.js → Multisig-BHoQvNeL.js} +1 -1
- package/src/assets/web-panel/assets/{NLProgramming-1y__Epjg.js → NLProgramming-9e5hIFvL.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-CEvJqMP8.js → Notes-BEhZRadw.js} +1 -1
- package/src/assets/web-panel/assets/{NotificationSettings-wmCYm99r.js → NotificationSettings-CzPbT9UE.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-CSoz8gGr.js → Organization-CvFg4VAr.js} +1 -1
- package/src/assets/web-panel/assets/{Overflow-kf1mnFrM.js → Overflow-Cm7ISeJl.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-C4GfXJ8Z.js → P2P-BWN-wdfH.js} +1 -1
- package/src/assets/web-panel/assets/{Permissions-CW1Mn95X.js → Permissions-C4vKkP_t.js} +1 -1
- package/src/assets/web-panel/assets/{Pipeline-CM1ppddn.js → Pipeline-DQCShDeT.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-DuAY5fEm.js → Privacy-Nc7LlSr3.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-C72779b6.js → ProjectInit-DDkqXAED.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectSettings-CAilXWam.js → ProjectSettings-ia6GQr6A.js} +1 -1
- package/src/assets/web-panel/assets/{Projects-DTIlVTkF.js → Projects-CNqXa5XY.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-Cf6Yv8bu.js → Providers-EwarbUb8.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-CK1_VVzw.js → QuickAsk-BAHQBw0d.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-QBC7KgvR.js → Recommend-Ccgu6elV.js} +1 -1
- package/src/assets/web-panel/assets/{Reputation-ju6lWzMM.js → Reputation-ai0gRNpj.js} +1 -1
- package/src/assets/web-panel/assets/{Row-DQwipGEm.js → Row-BWLfAhHC.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-DkLGmeLW.js → RssFeed-CnuRtiQH.js} +1 -1
- package/src/assets/web-panel/assets/{Search-YYhitzkt.js → Search-Da0CvI_2.js} +1 -1
- package/src/assets/web-panel/assets/{Security-DEllaBqe.js → Security-DEFeOeUv.js} +1 -1
- package/src/assets/web-panel/assets/{Services-BgPHBq9S.js → Services-CsfvCqCH.js} +1 -1
- package/src/assets/web-panel/assets/{Skeleton-DHEyJI7c.js → Skeleton-DlRaGj_n.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-c212vgf3.js → Skills-fjlZrsYq.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-COqhw_no.js → Sla-DNSDuEt2.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-Bmds06su.js → SpeechSettings-Bj0t-JCf.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-Bx1_A34Y.js → SyncSettings-uO7Gy-BB.js} +1 -1
- package/src/assets/web-panel/assets/{Tasks-B0Lo_9aN.js → Tasks-BSjsO-m8.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-D0RcpfuW.js → Templates-B03SSuXn.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-G0yVctLy.js → Tenant-CTCPIBzq.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-DqgLtK3c.js → Terminal-CQZcdArx.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-Cdt0aqCc.js → Tokens-CsNJIdNl.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-DFbfZFuJ.js → Trigger-kYPQmm6P.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-BQXsWPz6.js → Trust-mt-MiBeI.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-DBem5Xkj.js → UkeySign-DBi8jgXw.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-B1yipKKv.js → VideoEditing-CINSMEf5.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-iPJtU5QZ.js → Wallet-DCVMgW0U.js} +1 -1
- package/src/assets/web-panel/assets/{WebAuthn-HLb9srUL.js → WebAuthn-C9OjbTBs.js} +1 -1
- package/src/assets/web-panel/assets/{WorkflowEditor-BSqXL8GD.js → WorkflowEditor-LM1HJs-S.js} +1 -1
- package/src/assets/web-panel/assets/{chat-D_J-ZVBh.js → chat-Dz68Ixdp.js} +1 -1
- package/src/assets/web-panel/assets/{colors-B126JcB4.js → colors-qf63Eax9.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-Bw5EEKw4.js → compact-item-r4YWRFGQ.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-xLJXI46O.js → createContext-C8Lwrn-C.js} +1 -1
- package/src/assets/web-panel/assets/{hasIn-K8QCNlyy.js → hasIn-DsPi2kPP.js} +1 -1
- package/src/assets/web-panel/assets/{index-DFwF_JeQ.js → index-1xqIvVM5.js} +1 -1
- package/src/assets/web-panel/assets/{index-CVeuzjxG.js → index-5nOMJaLt.js} +1 -1
- package/src/assets/web-panel/assets/{index-85lab9HJ.js → index-B0KxtBNy.js} +1 -1
- package/src/assets/web-panel/assets/index-B3blziag.js +1 -0
- package/src/assets/web-panel/assets/{index-Dt0Tp8TS.js → index-B8gs4g1v.js} +1 -1
- package/src/assets/web-panel/assets/{index-mzNWO8Yy.js → index-BFV6aAoX.js} +1 -1
- package/src/assets/web-panel/assets/{index-LZYGhjVr.js → index-BKEl9Ahm.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bptjq-wQ.js → index-BfdIkZnT.js} +1 -1
- package/src/assets/web-panel/assets/{index-sAfwWh0R.js → index-BjPHuhxG.js} +1 -1
- package/src/assets/web-panel/assets/{index-DlX09aXr.js → index-BtCSUUKm.js} +1 -1
- package/src/assets/web-panel/assets/{index-DLZZi1Km.js → index-BxNXO95B.js} +1 -1
- package/src/assets/web-panel/assets/{index-CWBajOcE.js → index-Bz1O2KhE.js} +1 -1
- package/src/assets/web-panel/assets/{index-BWUG9yVI.js → index-BzzFMBIM.js} +1 -1
- package/src/assets/web-panel/assets/{index-B_PqXUkT.js → index-C2OFaKmx.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dj8BNg-z.js → index-C3VVwJcn.js} +1 -1
- package/src/assets/web-panel/assets/{index-DdMzLeDn.js → index-C8SY0_S8.js} +1 -1
- package/src/assets/web-panel/assets/{index-BQ_NIMQS.js → index-CCCX2ZSH.js} +1 -1
- package/src/assets/web-panel/assets/{index-DY5Oc3z6.js → index-CEbbycgJ.js} +3 -3
- package/src/assets/web-panel/assets/{index-COCq6xuZ.js → index-CINVudo7.js} +1 -1
- package/src/assets/web-panel/assets/{index-DvNCyE3A.js → index-CKRXnUTD.js} +1 -1
- package/src/assets/web-panel/assets/{index-Da7bZewp.js → index-CSCb-EY9.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bv9odL87.js → index-CY5X4uXO.js} +1 -1
- package/src/assets/web-panel/assets/{index-C2CgD7TN.js → index-CqmyLTa_.js} +1 -1
- package/src/assets/web-panel/assets/{index-mqHxeING.js → index-Cw48kkkH.js} +1 -1
- package/src/assets/web-panel/assets/{index-qJbfToeQ.js → index-D0mFFS7Y.js} +1 -1
- package/src/assets/web-panel/assets/index-D1XYuPHf.js +1 -0
- package/src/assets/web-panel/assets/{index-DFPVNSby.js → index-D2BR3WQ-.js} +1 -1
- package/src/assets/web-panel/assets/{index-xJkPbv0L.js → index-D4XgKgOF.js} +1 -1
- package/src/assets/web-panel/assets/{index-CvAey6iD.js → index-DBpVVgRI.js} +1 -1
- package/src/assets/web-panel/assets/{index-zEr6BW9X.js → index-DGXVjiyF.js} +1 -1
- package/src/assets/web-panel/assets/{index-BSgvvXgq.js → index-DQSweK5-.js} +1 -1
- package/src/assets/web-panel/assets/{index-BaXXyyT0.js → index-DXBc_lyR.js} +1 -1
- package/src/assets/web-panel/assets/{index-DZcij18m.js → index-DycrmZ_r.js} +1 -1
- package/src/assets/web-panel/assets/{index-fMwtau_-.js → index-I55BAmVG.js} +1 -1
- package/src/assets/web-panel/assets/{index-yhA-qP4Y.js → index-LQYz2tRO.js} +1 -1
- package/src/assets/web-panel/assets/{index-B9ztiTnX.js → index-cTFVNgoS.js} +1 -1
- package/src/assets/web-panel/assets/{index-BsbKjK1o.js → index-qLyVEtRM.js} +1 -1
- package/src/assets/web-panel/assets/{index-p3d5_s7V.js → index-qcVx0s-M.js} +1 -1
- package/src/assets/web-panel/assets/{index-DrfiELFa.js → index-wVpfPJXE.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-CacwmJft.js → initDefaultProps-CAgx2aHm.js} +1 -1
- package/src/assets/web-panel/assets/{motion-BWrP7Lz6.js → motion-DFuREFOd.js} +1 -1
- package/src/assets/web-panel/assets/{move-imnbiy1n.js → move-DfcQIXuy.js} +1 -1
- package/src/assets/web-panel/assets/{omit-BlaOv91I.js → omit-BFZV2hmZ.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-DUGKp0ro.js → pickAttrs-D98WQSur.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-P0ZA4yAK.js → placementArrow-BlP2AN9q.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-CZz-M9cI.js → responsiveObserve-DuI2xGQd.js} +1 -1
- package/src/assets/web-panel/assets/{slide-BEnICwoX.js → slide-DSvqah_S.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-DdYKRSiH.js → statusUtils-B-96ZLWF.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-DgUxvOQt.js → styleChecker-Br0YrCOO.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-BUEmeWdR.js → useFlexGapSupport-BD4Xr9XU.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-BXsj6Z5e.js → useFs-Ch5L3BnA.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-B3Pp583L.js → vnode-BQi3uWRC.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-D-LYfiQh.js → zoom-DaW-jbu7.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/assets/web-panel/assets/index-BEYypR_d.js +0 -1
- package/src/assets/web-panel/assets/index-DZWfmuM2.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as L,m as R,h as P,r as O,a9 as j,q as z,f as p,i as F,P as B,H as X}from"./index-
|
|
1
|
+
import{l as L,m as R,h as P,r as O,a9 as j,q as z,f as p,i as F,P as B,H as X}from"./index-CEbbycgJ.js";import{b as U}from"./icons-NT6gy8Ee.js";import{W as q}from"./index-C3VVwJcn.js";import{g as V,i as G,a as J}from"./colors-qf63Eax9.js";import{d as H,c as d,f as m,b as K,F as Q,s as Y}from"./vendor-M5lGV-wr.js";import"./isVisible-C7tPsqfj.js";import"./useState-CSzR8F8O.js";import"./raf-Deuc0E8-.js";const h=(o,t,l)=>{const r=j(l);return{[`${o.componentCls}-${t}`]:{color:o[`color${l}`],background:o[`color${r}Bg`],borderColor:o[`color${r}Border`],[`&${o.componentCls}-borderless`]:{borderColor:"transparent"}}}},Z=o=>V(o,(t,l)=>{let{textColor:r,lightBorderColor:a,lightColor:e,darkColor:c}=l;return{[`${o.componentCls}-${t}`]:{color:r,background:e,borderColor:a,"&-inverse":{color:o.colorTextLightSolid,background:c,borderColor:c},[`&${o.componentCls}-borderless`]:{borderColor:"transparent"}}}}),oo=o=>{const{paddingXXS:t,lineWidth:l,tagPaddingHorizontal:r,componentCls:a}=o,e=r-l,c=t-l;return{[a]:P(P({},O(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:t,lineHeight:l,lineWidth:r,fontSizeIcon:a}=o,e=Math.round(t*l),c=o.fontSizeSM,g=e-r*2,C=o.colorFillAlter,s=o.colorText,n=R(o,{tagFontSize:c,tagLineHeight:g,tagDefaultBg:C,tagDefaultColor:s,tagIconSize:a-2*r,tagPaddingHorizontal:8,tagBorderlessBg:o.colorFillTertiary});return[oo(n),Z(n),h(n,"success","Success"),h(n,"processing","Info"),h(n,"error","Error"),h(n,"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,t){let{slots:l,emit:r,attrs:a}=t;const{prefixCls:e}=z("tag",o),[c,g]=D(e),C=n=>{const{checked:u}=o;r("update:checked",!u),r("change",!u),r("click",n)},s=m(()=>F(e.value,g.value,{[`${e.value}-checkable`]:!0,[`${e.value}-checkable-checked`]:o.checked}));return()=>{var n;return c(d("span",p(p({},a),{},{class:[s.value,a.class],onClick:C}),[(n=l.default)===null||n===void 0?void 0:n.call(l)]))}}}),lo=()=>({prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:B.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},onClick:X(),"onUpdate:visible":Function,icon:B.any,bordered:{type:Boolean,default:!0}}),v=H({compatConfig:{MODE:3},name:"ATag",inheritAttrs:!1,props:lo(),slots:Object,setup(o,t){let{slots:l,emit:r,attrs:a}=t;const{prefixCls:e,direction:c}=z("tag",o),[g,C]=D(e),s=Y(!0);K(()=>{o.visible!==void 0&&(s.value=o.visible)});const n=i=>{i.stopPropagation(),r("update:visible",!1),r("close",i),!i.defaultPrevented&&o.visible===void 0&&(s.value=!1)},u=m(()=>G(o.color)||J(o.color)),M=m(()=>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})),w=i=>{r("click",i)};return()=>{var i,b,f;const{icon:A=(i=l.icon)===null||i===void 0?void 0:i.call(l),color:$,closeIcon:y=(b=l.closeIcon)===null||b===void 0?void 0:b.call(l),closable:W=!1}=o,k=()=>W?y?d("span",{class:`${e.value}-close-icon`,onClick:n},[y]):d(U,{class:`${e.value}-close-icon`,onClick:n},null):null,N={backgroundColor:$&&!u.value?$:void 0},T=A||null,I=(f=l.default)===null||f===void 0?void 0:f.call(l),_=T?d(Q,null,[T,d("span",null,[I])]):I,E=o.onClick!==void 0,x=d("span",p(p({},a),{},{onClick:w,class:[M.value,a.class],style:[N,a.style]}),[_,k()]);return g(E?d(q,null,{default:()=>[x]}):x)}}});v.CheckableTag=S;v.install=function(o){return o.component(v.name,v),o.component(S.name,S),o};export{S as CheckableTag,v as default,lo as tagProps};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as j,f as V,V as _,h as v,G as F,a0 as Z,$ as we,l as et,r as _e,af as tt,q as nt,L as rt,P as Se}from"./index-DY5Oc3z6.js";import{ae as at,b4 as it}from"./icons-NT6gy8Ee.js";import{i as lt}from"./isMobile--2fOlCHx.js";import{d as Ee,e as je,c as b,r as We,s as P,w as ee,f as W}from"./vendor-M5lGV-wr.js";import{a as ot}from"./warning-Pq00owYb.js";import{w as Ve}from"./raf-Deuc0E8-.js";import{K as le}from"./KeyCode-D63Tfrq7.js";import{a as st,F as ut,N as Oe}from"./FormItemContext-D_HGU4aA.js";import{c as dt}from"./vnode-B3Pp583L.js";import{o as ct}from"./omit-BlaOv91I.js";import{g as $e,a as ft}from"./statusUtils-DdYKRSiH.js";import{i as mt,g as He,a as Ge,b as pt,c as gt,d as vt,e as ht,f as qe}from"./index-fMwtau_-.js";import{g as bt}from"./compact-item-Bw5EEKw4.js";import{u as St,N as Te}from"./Compact-DnOD5uMF.js";import"./createContext-xLJXI46O.js";import"./_getTag-BVc6NQ_K.js";function Ie(){return typeof BigInt=="function"}function te(e){let t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t=`0${t}`);const a=t||"0",o=a.split("."),i=o[0]||"0",d=o[1]||"0";i==="0"&&d==="0"&&(n=!1);const c=n?"-":"";return{negative:n,negativeStr:c,trimStr:a,integerStr:i,decimalStr:d,fullStr:`${c}${a}`}}function Ce(e){const t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function ne(e){const t=String(e);if(Ce(e)){let n=Number(t.slice(t.indexOf("e-")+2));const a=t.match(/\.(\d+)/);return a?.[1]&&(n+=a[1].length),n}return t.includes(".")&&Me(t)?t.length-t.indexOf(".")-1:0}function De(e){let t=String(e);if(Ce(e)){if(e>Number.MAX_SAFE_INTEGER)return String(Ie()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(Ie()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed(ne(t))}return te(t).fullStr}function Me(e){return typeof e=="number"?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}function Le(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}class z{constructor(t){if(this.origin="",Le(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}negate(){return new z(-this.toNumber())}add(t){if(this.isInvalidate())return new z(t);const n=Number(t);if(Number.isNaN(n))return this;const a=this.number+n;if(a>Number.MAX_SAFE_INTEGER)return new z(Number.MAX_SAFE_INTEGER);if(a<Number.MIN_SAFE_INTEGER)return new z(Number.MIN_SAFE_INTEGER);const o=Math.max(ne(this.number),ne(n));return new z(a.toFixed(o))}isEmpty(){return this.empty}isNaN(){return Number.isNaN(this.number)}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(t){return this.toNumber()===t?.toNumber()}lessEquals(t){return this.add(t.negate().toString()).toNumber()<=0}toNumber(){return this.number}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":De(this.number):this.origin}}class U{constructor(t){if(this.origin="",Le(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}let n=t;if(Ce(n)&&(n=Number(n)),n=typeof n=="string"?n:De(n),Me(n)){const a=te(n);this.negative=a.negative;const o=a.trimStr.split(".");this.integer=BigInt(o[0]);const i=o[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length}else this.nan=!0}getMark(){return this.negative?"-":""}getIntegerStr(){return this.integer.toString()}getDecimalStr(){return this.decimal.toString().padStart(this.decimalLen,"0")}alignDecimal(t){const n=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(t,"0")}`;return BigInt(n)}negate(){const t=new U(this.toString());return t.negative=!t.negative,t}add(t){if(this.isInvalidate())return new U(t);const n=new U(t);if(n.isInvalidate())return this;const a=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),o=this.alignDecimal(a),i=n.alignDecimal(a),d=(o+i).toString(),{negativeStr:c,trimStr:f}=te(d),m=`${c}${f.padStart(a+1,"0")}`;return new U(`${m.slice(0,-a)}.${m.slice(-a)}`)}isEmpty(){return this.empty}isNaN(){return this.nan}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(t){return this.toString()===t?.toString()}lessEquals(t){return this.add(t.negate().toString()).toNumber()<=0}toNumber(){return this.isNaN()?NaN:Number(this.toString())}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":te(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}function M(e){return Ie()?new U(e):new z(e)}function xe(e,t,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";const{negativeStr:o,integerStr:i,decimalStr:d}=te(e),c=`${t}${d}`,f=`${o}${i}`;if(n>=0){const m=Number(d[n]);if(m>=5&&!a){const s=M(e).add(`${o}0.${"0".repeat(n)}${10-m}`);return xe(s.toString(),t,n,a)}return n===0?f:`${f}${t}${d.padEnd(n,"0").slice(0,n)}`}return c===".0"?f:`${f}${c}`}const $t=200,Nt=600,yt=Ee({compatConfig:{MODE:3},name:"StepHandler",inheritAttrs:!1,props:{prefixCls:String,upDisabled:Boolean,downDisabled:Boolean,onStep:_()},slots:Object,setup(e,t){let{slots:n,emit:a}=t;const o=We(),i=(c,f)=>{c.preventDefault(),a("step",f);function m(){a("step",f),o.value=setTimeout(m,$t)}o.value=setTimeout(m,Nt)},d=()=>{clearTimeout(o.value)};return je(()=>{d()}),()=>{if(lt())return null;const{prefixCls:c,upDisabled:f,downDisabled:m}=e,s=`${c}-handler`,w=j(s,`${s}-up`,{[`${s}-up-disabled`]:f}),S=j(s,`${s}-down`,{[`${s}-down-disabled`]:m}),x={unselectable:"on",role:"button",onMouseup:d,onMouseleave:d},{upNode:$,downNode:E}=n;return b("div",{class:`${s}-wrap`},[b("span",V(V({},x),{},{onMousedown:R=>{i(R,!0)},"aria-label":"Increase Value","aria-disabled":f,class:w}),[$?.()||b("span",{unselectable:"on",class:`${c}-handler-up-inner`},null)]),b("span",V(V({},x),{},{onMousedown:R=>{i(R,!1)},"aria-label":"Decrease Value","aria-disabled":m,class:S}),[E?.()||b("span",{unselectable:"on",class:`${c}-handler-down-inner`},null)])])}}});function wt(e,t){const n=We(null);function a(){try{const{selectionStart:i,selectionEnd:d,value:c}=e.value,f=c.substring(0,i),m=c.substring(d);n.value={start:i,end:d,value:c,beforeTxt:f,afterTxt:m}}catch{}}function o(){if(e.value&&n.value&&t.value)try{const{value:i}=e.value,{beforeTxt:d,afterTxt:c,start:f}=n.value;let m=i.length;if(i.endsWith(c))m=i.length-n.value.afterTxt.length;else if(i.startsWith(d))m=d.length;else{const s=d[f-1],w=i.indexOf(s,f-1);w!==-1&&(m=w+1)}e.value.setSelectionRange(m,m)}catch(i){ot(!1,`Something warning of cursor restore. Please fire issue about this: ${i.message}`)}}return[a,o]}const It=(()=>{const e=P(0),t=()=>{Ve.cancel(e.value)};return je(()=>{t()}),n=>{t(),e.value=Ve(()=>{n()})}});var xt=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const Be=(e,t)=>e||t.isEmpty()?t.toString():t.toNumber(),Fe=e=>{const t=M(e);return t.isInvalidate()?null:t},Ue=()=>({stringMode:F(),defaultValue:Z([String,Number]),value:Z([String,Number]),prefixCls:we(),min:Z([String,Number]),max:Z([String,Number]),step:Z([String,Number],1),tabindex:Number,controls:F(!0),readonly:F(),disabled:F(),autofocus:F(),keyboard:F(!0),parser:_(),formatter:_(),precision:Number,decimalSeparator:String,onInput:_(),onChange:_(),onPressEnter:_(),onStep:_(),onBlur:_(),onFocus:_()}),Et=Ee({compatConfig:{MODE:3},name:"InnerInputNumber",inheritAttrs:!1,props:v(v({},Ue()),{lazy:Boolean}),slots:Object,setup(e,t){let{attrs:n,slots:a,emit:o,expose:i}=t;const d=P(),c=P(!1),f=P(!1),m=P(!1),s=P(M(e.value));function w(r){e.value===void 0&&(s.value=r)}const S=(r,l)=>{if(!l)return e.precision>=0?e.precision:Math.max(ne(r),ne(e.step))},x=r=>{const l=String(r);if(e.parser)return e.parser(l);let u=l;return e.decimalSeparator&&(u=u.replace(e.decimalSeparator,".")),u.replace(/[^\w.-]+/g,"")},$=P(""),E=(r,l)=>{if(e.formatter)return e.formatter(r,{userTyping:l,input:String($.value)});let u=typeof r=="number"?De(r):r;if(!l){const p=S(u,l);if(Me(u)&&(e.decimalSeparator||p>=0)){const y=e.decimalSeparator||".";u=xe(u,y,p)}}return u},R=(()=>{const r=e.value;return s.value.isInvalidate()&&["string","number"].includes(typeof r)?Number.isNaN(r)?"":r:E(s.value.toString(),!1)})();$.value=R;function C(r,l){$.value=E(r.isInvalidate()?r.toString(!1):r.toString(!l),l)}const D=W(()=>Fe(e.max)),N=W(()=>Fe(e.min)),I=W(()=>!D.value||!s.value||s.value.isInvalidate()?!1:D.value.lessEquals(s.value)),O=W(()=>!N.value||!s.value||s.value.isInvalidate()?!1:s.value.lessEquals(N.value)),[k,K]=wt(d,c),X=r=>D.value&&!r.lessEquals(D.value)?D.value:N.value&&!N.value.lessEquals(r)?N.value:null,oe=r=>!X(r),Y=(r,l)=>{var u;let p=r,y=oe(p)||p.isEmpty();if(!p.isEmpty()&&!l&&(p=X(p)||p,y=!0),!e.readonly&&!e.disabled&&y){const A=p.toString(),q=S(A,l);return q>=0&&(p=M(xe(A,".",q))),p.equals(s.value)||(w(p),(u=e.onChange)===null||u===void 0||u.call(e,p.isEmpty()?null:Be(e.stringMode,p)),e.value===void 0&&C(p,l)),p}return s.value},se=It(),J=r=>{var l;if(k(),$.value=r,!m.value){const u=x(r),p=M(u);p.isNaN()||Y(p,!0)}(l=e.onInput)===null||l===void 0||l.call(e,r),se(()=>{let u=r;e.parser||(u=r.replace(/。/g,".")),u!==r&&J(u)})},h=()=>{m.value=!0},Q=()=>{m.value=!1,J(d.value.value)},H=r=>{J(r.target.value)},G=r=>{var l,u;if(r&&I.value||!r&&O.value)return;f.value=!1;let p=M(e.step);r||(p=p.negate());const y=(s.value||M(0)).add(p.toString()),A=Y(y,!1);(l=e.onStep)===null||l===void 0||l.call(e,Be(e.stringMode,A),{offset:e.step,type:r?"up":"down"}),(u=d.value)===null||u===void 0||u.focus()},T=r=>{const l=M(x($.value));let u=l;l.isNaN()?u=s.value:u=Y(l,r),e.value!==void 0?C(s.value,!1):u.isNaN()||C(u,!1)},ue=()=>{f.value=!0},de=r=>{var l;const{which:u}=r;f.value=!0,u===le.ENTER&&(m.value||(f.value=!1),T(!1),(l=e.onPressEnter)===null||l===void 0||l.call(e,r)),e.keyboard!==!1&&!m.value&&[le.UP,le.DOWN].includes(u)&&(G(le.UP===u),r.preventDefault())},ce=()=>{f.value=!1},re=r=>{T(!1),c.value=!1,f.value=!1,o("blur",r)};return ee(()=>e.precision,()=>{s.value.isInvalidate()||C(s.value,!1)},{flush:"post"}),ee(()=>e.value,()=>{const r=M(e.value);s.value=r;const l=M(x($.value));(!r.equals(l)||!f.value||e.formatter)&&C(r,f.value)},{flush:"post"}),ee($,()=>{e.formatter&&K()},{flush:"post"}),ee(()=>e.disabled,r=>{r&&(c.value=!1)}),i({focus:()=>{var r;(r=d.value)===null||r===void 0||r.focus()},blur:()=>{var r;(r=d.value)===null||r===void 0||r.blur()}}),()=>{const r=v(v({},n),e),{prefixCls:l="rc-input-number",min:u,max:p,step:y=1,defaultValue:A,value:q,disabled:ae,readonly:ie,keyboard:g,controls:fe=!0,autofocus:B,stringMode:me,parser:pe,formatter:L,precision:ge,decimalSeparator:ve,onChange:he,onInput:Pe,onPressEnter:Re,onStep:At,lazy:ke,class:Ke,style:Xe}=r,Ye=xt(r,["prefixCls","min","max","step","defaultValue","value","disabled","readonly","keyboard","controls","autofocus","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","lazy","class","style"]),{upHandler:Je,downHandler:Qe}=a,Ae=`${l}-input`,be={};return ke?be.onChange=H:be.onInput=H,b("div",{class:j(l,Ke,{[`${l}-focused`]:c.value,[`${l}-disabled`]:ae,[`${l}-readonly`]:ie,[`${l}-not-a-number`]:s.value.isNaN(),[`${l}-out-of-range`]:!s.value.isInvalidate()&&!oe(s.value)}),style:Xe,onKeydown:de,onKeyup:ce},[fe&&b(yt,{prefixCls:l,upDisabled:I.value,downDisabled:O.value,onStep:G},{upNode:Je,downNode:Qe}),b("div",{class:`${Ae}-wrap`},[b("input",V(V(V({autofocus:B,autocomplete:"off",role:"spinbutton","aria-valuemin":u,"aria-valuemax":p,"aria-valuenow":s.value.isInvalidate()?null:s.value.toString(),step:y},Ye),{},{ref:d,class:Ae,value:$.value,disabled:ae,readonly:ie,onFocus:Ze=>{c.value=!0,o("focus",Ze)}},be),{},{onBlur:re,onCompositionstart:h,onCompositionend:Q,onBeforeinput:ue}),null)])])}}});function Ne(e){return e!=null}const Ct=e=>{const{componentCls:t,lineWidth:n,lineType:a,colorBorder:o,borderRadius:i,fontSizeLG:d,controlHeightLG:c,controlHeightSM:f,colorError:m,inputPaddingHorizontalSM:s,colorTextDescription:w,motionDurationMid:S,colorPrimary:x,controlHeight:$,inputPaddingHorizontal:E,colorBgContainer:R,colorTextDisabled:C,borderRadiusSM:D,borderRadiusLG:N,controlWidth:I,handleVisible:O}=e;return[{[t]:v(v(v(v({},_e(e)),He(e)),Ge(e,t)),{display:"inline-block",width:I,margin:0,padding:0,border:`${n}px ${a} ${o}`,borderRadius:i,"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:d,borderRadius:N,[`input${t}-input`]:{height:c-2*n}},"&-sm":{padding:0,borderRadius:D,[`input${t}-input`]:{height:f-2*n,padding:`0 ${s}px`}},"&:hover":v({},qe(e)),"&-focused":v({},ht(e)),"&-disabled":v(v({},vt(e)),{[`${t}-input`]:{cursor:"not-allowed"}}),"&-out-of-range":{input:{color:m}},"&-group":v(v(v({},_e(e)),gt(e)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:N}},"&-sm":{[`${t}-group-addon`]:{borderRadius:D}}}}),[t]:{"&-input":v(v({width:"100%",height:$-2*n,padding:`0 ${E}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:i,outline:0,transition:`all ${S} linear`,appearance:"textfield",color:e.colorText,fontSize:"inherit",verticalAlign:"top"},pt(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[t]:{[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{opacity:1},[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleWidth,height:"100%",background:R,borderStartStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i,borderEndStartRadius:0,opacity:O===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${S} linear ${S}`,[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
1
|
+
import{i as j,f as V,V as _,h as v,G as F,a0 as Z,$ as we,l as et,r as _e,af as tt,q as nt,L as rt,P as Se}from"./index-CEbbycgJ.js";import{ae as at,b4 as it}from"./icons-NT6gy8Ee.js";import{i as lt}from"./isMobile--2fOlCHx.js";import{d as Ee,e as je,c as b,r as We,s as P,w as ee,f as W}from"./vendor-M5lGV-wr.js";import{a as ot}from"./warning-Pq00owYb.js";import{w as Ve}from"./raf-Deuc0E8-.js";import{K as le}from"./KeyCode-D63Tfrq7.js";import{a as st,F as ut,N as Oe}from"./FormItemContext-EopsCGez.js";import{c as dt}from"./vnode-BQi3uWRC.js";import{o as ct}from"./omit-BFZV2hmZ.js";import{g as $e,a as ft}from"./statusUtils-B-96ZLWF.js";import{i as mt,g as He,a as Ge,b as pt,c as gt,d as vt,e as ht,f as qe}from"./index-I55BAmVG.js";import{g as bt}from"./compact-item-r4YWRFGQ.js";import{u as St,N as Te}from"./Compact-CQR4QsWP.js";import"./createContext-C8Lwrn-C.js";import"./_getTag-BVc6NQ_K.js";function Ie(){return typeof BigInt=="function"}function te(e){let t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t=`0${t}`);const a=t||"0",o=a.split("."),i=o[0]||"0",d=o[1]||"0";i==="0"&&d==="0"&&(n=!1);const c=n?"-":"";return{negative:n,negativeStr:c,trimStr:a,integerStr:i,decimalStr:d,fullStr:`${c}${a}`}}function Ce(e){const t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function ne(e){const t=String(e);if(Ce(e)){let n=Number(t.slice(t.indexOf("e-")+2));const a=t.match(/\.(\d+)/);return a?.[1]&&(n+=a[1].length),n}return t.includes(".")&&Me(t)?t.length-t.indexOf(".")-1:0}function De(e){let t=String(e);if(Ce(e)){if(e>Number.MAX_SAFE_INTEGER)return String(Ie()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(Ie()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed(ne(t))}return te(t).fullStr}function Me(e){return typeof e=="number"?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}function Le(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}class z{constructor(t){if(this.origin="",Le(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}negate(){return new z(-this.toNumber())}add(t){if(this.isInvalidate())return new z(t);const n=Number(t);if(Number.isNaN(n))return this;const a=this.number+n;if(a>Number.MAX_SAFE_INTEGER)return new z(Number.MAX_SAFE_INTEGER);if(a<Number.MIN_SAFE_INTEGER)return new z(Number.MIN_SAFE_INTEGER);const o=Math.max(ne(this.number),ne(n));return new z(a.toFixed(o))}isEmpty(){return this.empty}isNaN(){return Number.isNaN(this.number)}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(t){return this.toNumber()===t?.toNumber()}lessEquals(t){return this.add(t.negate().toString()).toNumber()<=0}toNumber(){return this.number}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":De(this.number):this.origin}}class U{constructor(t){if(this.origin="",Le(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}let n=t;if(Ce(n)&&(n=Number(n)),n=typeof n=="string"?n:De(n),Me(n)){const a=te(n);this.negative=a.negative;const o=a.trimStr.split(".");this.integer=BigInt(o[0]);const i=o[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length}else this.nan=!0}getMark(){return this.negative?"-":""}getIntegerStr(){return this.integer.toString()}getDecimalStr(){return this.decimal.toString().padStart(this.decimalLen,"0")}alignDecimal(t){const n=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(t,"0")}`;return BigInt(n)}negate(){const t=new U(this.toString());return t.negative=!t.negative,t}add(t){if(this.isInvalidate())return new U(t);const n=new U(t);if(n.isInvalidate())return this;const a=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),o=this.alignDecimal(a),i=n.alignDecimal(a),d=(o+i).toString(),{negativeStr:c,trimStr:f}=te(d),m=`${c}${f.padStart(a+1,"0")}`;return new U(`${m.slice(0,-a)}.${m.slice(-a)}`)}isEmpty(){return this.empty}isNaN(){return this.nan}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(t){return this.toString()===t?.toString()}lessEquals(t){return this.add(t.negate().toString()).toNumber()<=0}toNumber(){return this.isNaN()?NaN:Number(this.toString())}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":te(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}function M(e){return Ie()?new U(e):new z(e)}function xe(e,t,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";const{negativeStr:o,integerStr:i,decimalStr:d}=te(e),c=`${t}${d}`,f=`${o}${i}`;if(n>=0){const m=Number(d[n]);if(m>=5&&!a){const s=M(e).add(`${o}0.${"0".repeat(n)}${10-m}`);return xe(s.toString(),t,n,a)}return n===0?f:`${f}${t}${d.padEnd(n,"0").slice(0,n)}`}return c===".0"?f:`${f}${c}`}const $t=200,Nt=600,yt=Ee({compatConfig:{MODE:3},name:"StepHandler",inheritAttrs:!1,props:{prefixCls:String,upDisabled:Boolean,downDisabled:Boolean,onStep:_()},slots:Object,setup(e,t){let{slots:n,emit:a}=t;const o=We(),i=(c,f)=>{c.preventDefault(),a("step",f);function m(){a("step",f),o.value=setTimeout(m,$t)}o.value=setTimeout(m,Nt)},d=()=>{clearTimeout(o.value)};return je(()=>{d()}),()=>{if(lt())return null;const{prefixCls:c,upDisabled:f,downDisabled:m}=e,s=`${c}-handler`,w=j(s,`${s}-up`,{[`${s}-up-disabled`]:f}),S=j(s,`${s}-down`,{[`${s}-down-disabled`]:m}),x={unselectable:"on",role:"button",onMouseup:d,onMouseleave:d},{upNode:$,downNode:E}=n;return b("div",{class:`${s}-wrap`},[b("span",V(V({},x),{},{onMousedown:R=>{i(R,!0)},"aria-label":"Increase Value","aria-disabled":f,class:w}),[$?.()||b("span",{unselectable:"on",class:`${c}-handler-up-inner`},null)]),b("span",V(V({},x),{},{onMousedown:R=>{i(R,!1)},"aria-label":"Decrease Value","aria-disabled":m,class:S}),[E?.()||b("span",{unselectable:"on",class:`${c}-handler-down-inner`},null)])])}}});function wt(e,t){const n=We(null);function a(){try{const{selectionStart:i,selectionEnd:d,value:c}=e.value,f=c.substring(0,i),m=c.substring(d);n.value={start:i,end:d,value:c,beforeTxt:f,afterTxt:m}}catch{}}function o(){if(e.value&&n.value&&t.value)try{const{value:i}=e.value,{beforeTxt:d,afterTxt:c,start:f}=n.value;let m=i.length;if(i.endsWith(c))m=i.length-n.value.afterTxt.length;else if(i.startsWith(d))m=d.length;else{const s=d[f-1],w=i.indexOf(s,f-1);w!==-1&&(m=w+1)}e.value.setSelectionRange(m,m)}catch(i){ot(!1,`Something warning of cursor restore. Please fire issue about this: ${i.message}`)}}return[a,o]}const It=(()=>{const e=P(0),t=()=>{Ve.cancel(e.value)};return je(()=>{t()}),n=>{t(),e.value=Ve(()=>{n()})}});var xt=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const Be=(e,t)=>e||t.isEmpty()?t.toString():t.toNumber(),Fe=e=>{const t=M(e);return t.isInvalidate()?null:t},Ue=()=>({stringMode:F(),defaultValue:Z([String,Number]),value:Z([String,Number]),prefixCls:we(),min:Z([String,Number]),max:Z([String,Number]),step:Z([String,Number],1),tabindex:Number,controls:F(!0),readonly:F(),disabled:F(),autofocus:F(),keyboard:F(!0),parser:_(),formatter:_(),precision:Number,decimalSeparator:String,onInput:_(),onChange:_(),onPressEnter:_(),onStep:_(),onBlur:_(),onFocus:_()}),Et=Ee({compatConfig:{MODE:3},name:"InnerInputNumber",inheritAttrs:!1,props:v(v({},Ue()),{lazy:Boolean}),slots:Object,setup(e,t){let{attrs:n,slots:a,emit:o,expose:i}=t;const d=P(),c=P(!1),f=P(!1),m=P(!1),s=P(M(e.value));function w(r){e.value===void 0&&(s.value=r)}const S=(r,l)=>{if(!l)return e.precision>=0?e.precision:Math.max(ne(r),ne(e.step))},x=r=>{const l=String(r);if(e.parser)return e.parser(l);let u=l;return e.decimalSeparator&&(u=u.replace(e.decimalSeparator,".")),u.replace(/[^\w.-]+/g,"")},$=P(""),E=(r,l)=>{if(e.formatter)return e.formatter(r,{userTyping:l,input:String($.value)});let u=typeof r=="number"?De(r):r;if(!l){const p=S(u,l);if(Me(u)&&(e.decimalSeparator||p>=0)){const y=e.decimalSeparator||".";u=xe(u,y,p)}}return u},R=(()=>{const r=e.value;return s.value.isInvalidate()&&["string","number"].includes(typeof r)?Number.isNaN(r)?"":r:E(s.value.toString(),!1)})();$.value=R;function C(r,l){$.value=E(r.isInvalidate()?r.toString(!1):r.toString(!l),l)}const D=W(()=>Fe(e.max)),N=W(()=>Fe(e.min)),I=W(()=>!D.value||!s.value||s.value.isInvalidate()?!1:D.value.lessEquals(s.value)),O=W(()=>!N.value||!s.value||s.value.isInvalidate()?!1:s.value.lessEquals(N.value)),[k,K]=wt(d,c),X=r=>D.value&&!r.lessEquals(D.value)?D.value:N.value&&!N.value.lessEquals(r)?N.value:null,oe=r=>!X(r),Y=(r,l)=>{var u;let p=r,y=oe(p)||p.isEmpty();if(!p.isEmpty()&&!l&&(p=X(p)||p,y=!0),!e.readonly&&!e.disabled&&y){const A=p.toString(),q=S(A,l);return q>=0&&(p=M(xe(A,".",q))),p.equals(s.value)||(w(p),(u=e.onChange)===null||u===void 0||u.call(e,p.isEmpty()?null:Be(e.stringMode,p)),e.value===void 0&&C(p,l)),p}return s.value},se=It(),J=r=>{var l;if(k(),$.value=r,!m.value){const u=x(r),p=M(u);p.isNaN()||Y(p,!0)}(l=e.onInput)===null||l===void 0||l.call(e,r),se(()=>{let u=r;e.parser||(u=r.replace(/。/g,".")),u!==r&&J(u)})},h=()=>{m.value=!0},Q=()=>{m.value=!1,J(d.value.value)},H=r=>{J(r.target.value)},G=r=>{var l,u;if(r&&I.value||!r&&O.value)return;f.value=!1;let p=M(e.step);r||(p=p.negate());const y=(s.value||M(0)).add(p.toString()),A=Y(y,!1);(l=e.onStep)===null||l===void 0||l.call(e,Be(e.stringMode,A),{offset:e.step,type:r?"up":"down"}),(u=d.value)===null||u===void 0||u.focus()},T=r=>{const l=M(x($.value));let u=l;l.isNaN()?u=s.value:u=Y(l,r),e.value!==void 0?C(s.value,!1):u.isNaN()||C(u,!1)},ue=()=>{f.value=!0},de=r=>{var l;const{which:u}=r;f.value=!0,u===le.ENTER&&(m.value||(f.value=!1),T(!1),(l=e.onPressEnter)===null||l===void 0||l.call(e,r)),e.keyboard!==!1&&!m.value&&[le.UP,le.DOWN].includes(u)&&(G(le.UP===u),r.preventDefault())},ce=()=>{f.value=!1},re=r=>{T(!1),c.value=!1,f.value=!1,o("blur",r)};return ee(()=>e.precision,()=>{s.value.isInvalidate()||C(s.value,!1)},{flush:"post"}),ee(()=>e.value,()=>{const r=M(e.value);s.value=r;const l=M(x($.value));(!r.equals(l)||!f.value||e.formatter)&&C(r,f.value)},{flush:"post"}),ee($,()=>{e.formatter&&K()},{flush:"post"}),ee(()=>e.disabled,r=>{r&&(c.value=!1)}),i({focus:()=>{var r;(r=d.value)===null||r===void 0||r.focus()},blur:()=>{var r;(r=d.value)===null||r===void 0||r.blur()}}),()=>{const r=v(v({},n),e),{prefixCls:l="rc-input-number",min:u,max:p,step:y=1,defaultValue:A,value:q,disabled:ae,readonly:ie,keyboard:g,controls:fe=!0,autofocus:B,stringMode:me,parser:pe,formatter:L,precision:ge,decimalSeparator:ve,onChange:he,onInput:Pe,onPressEnter:Re,onStep:At,lazy:ke,class:Ke,style:Xe}=r,Ye=xt(r,["prefixCls","min","max","step","defaultValue","value","disabled","readonly","keyboard","controls","autofocus","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","lazy","class","style"]),{upHandler:Je,downHandler:Qe}=a,Ae=`${l}-input`,be={};return ke?be.onChange=H:be.onInput=H,b("div",{class:j(l,Ke,{[`${l}-focused`]:c.value,[`${l}-disabled`]:ae,[`${l}-readonly`]:ie,[`${l}-not-a-number`]:s.value.isNaN(),[`${l}-out-of-range`]:!s.value.isInvalidate()&&!oe(s.value)}),style:Xe,onKeydown:de,onKeyup:ce},[fe&&b(yt,{prefixCls:l,upDisabled:I.value,downDisabled:O.value,onStep:G},{upNode:Je,downNode:Qe}),b("div",{class:`${Ae}-wrap`},[b("input",V(V(V({autofocus:B,autocomplete:"off",role:"spinbutton","aria-valuemin":u,"aria-valuemax":p,"aria-valuenow":s.value.isInvalidate()?null:s.value.toString(),step:y},Ye),{},{ref:d,class:Ae,value:$.value,disabled:ae,readonly:ie,onFocus:Ze=>{c.value=!0,o("focus",Ze)}},be),{},{onBlur:re,onCompositionstart:h,onCompositionend:Q,onBeforeinput:ue}),null)])])}}});function Ne(e){return e!=null}const Ct=e=>{const{componentCls:t,lineWidth:n,lineType:a,colorBorder:o,borderRadius:i,fontSizeLG:d,controlHeightLG:c,controlHeightSM:f,colorError:m,inputPaddingHorizontalSM:s,colorTextDescription:w,motionDurationMid:S,colorPrimary:x,controlHeight:$,inputPaddingHorizontal:E,colorBgContainer:R,colorTextDisabled:C,borderRadiusSM:D,borderRadiusLG:N,controlWidth:I,handleVisible:O}=e;return[{[t]:v(v(v(v({},_e(e)),He(e)),Ge(e,t)),{display:"inline-block",width:I,margin:0,padding:0,border:`${n}px ${a} ${o}`,borderRadius:i,"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:d,borderRadius:N,[`input${t}-input`]:{height:c-2*n}},"&-sm":{padding:0,borderRadius:D,[`input${t}-input`]:{height:f-2*n,padding:`0 ${s}px`}},"&:hover":v({},qe(e)),"&-focused":v({},ht(e)),"&-disabled":v(v({},vt(e)),{[`${t}-input`]:{cursor:"not-allowed"}}),"&-out-of-range":{input:{color:m}},"&-group":v(v(v({},_e(e)),gt(e)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:N}},"&-sm":{[`${t}-group-addon`]:{borderRadius:D}}}}),[t]:{"&-input":v(v({width:"100%",height:$-2*n,padding:`0 ${E}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:i,outline:0,transition:`all ${S} linear`,appearance:"textfield",color:e.colorText,fontSize:"inherit",verticalAlign:"top"},pt(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[t]:{[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{opacity:1},[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleWidth,height:"100%",background:R,borderStartStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i,borderEndStartRadius:0,opacity:O===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${S} linear ${S}`,[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
2
2
|
${t}-handler-up-inner,
|
|
3
3
|
${t}-handler-down-inner
|
|
4
4
|
`]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:w,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${n}px ${a} ${o}`,transition:`all ${S} linear`,"&:active":{background:e.colorFillAlter},"&:hover":{height:"60%",[`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as p,f as i,p as $}from"./vendor-M5lGV-wr.js";import{l as d,m as u,h as a}from"./index-
|
|
1
|
+
import{i as p,f as i,p as $}from"./vendor-M5lGV-wr.js";import{l as d,m as u,h as a}from"./index-CEbbycgJ.js";const c=Symbol("rowContextKey"),w=o=>{$(c,o)},I=()=>p(c,{gutter:i(()=>{}),wrap:i(()=>{}),supportFlexGap:i(()=>{})}),m=o=>{const{componentCls:e}=o;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around ":{justifyContent:"space-around"},"&-space-evenly ":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},f=o=>{const{componentCls:e}=o;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},y=(o,e)=>{const{componentCls:t,gridColumns:s}=o,r={};for(let n=s;n>=0;n--)n===0?(r[`${t}${e}-${n}`]={display:"none"},r[`${t}-push-${n}`]={insetInlineStart:"auto"},r[`${t}-pull-${n}`]={insetInlineEnd:"auto"},r[`${t}${e}-push-${n}`]={insetInlineStart:"auto"},r[`${t}${e}-pull-${n}`]={insetInlineEnd:"auto"},r[`${t}${e}-offset-${n}`]={marginInlineEnd:0},r[`${t}${e}-order-${n}`]={order:0}):(r[`${t}${e}-${n}`]={display:"block",flex:`0 0 ${n/s*100}%`,maxWidth:`${n/s*100}%`},r[`${t}${e}-push-${n}`]={insetInlineStart:`${n/s*100}%`},r[`${t}${e}-pull-${n}`]={insetInlineEnd:`${n/s*100}%`},r[`${t}${e}-offset-${n}`]={marginInlineStart:`${n/s*100}%`},r[`${t}${e}-order-${n}`]={order:n});return r},l=(o,e)=>y(o,e),x=(o,e,t)=>({[`@media (min-width: ${e}px)`]:a({},l(o,t))}),M=d("Grid",o=>[m(o)]),h=d("Grid",o=>{const e=u(o,{gridColumns:24}),t={"-sm":e.screenSMMin,"-md":e.screenMDMin,"-lg":e.screenLGMin,"-xl":e.screenXLMin,"-xxl":e.screenXXLMin};return[f(e),l(e,""),l(e,"-xs"),Object.keys(t).map(s=>x(e,t[s],s)).reduce((s,r)=>a(a({},s),r),{})]});export{w as a,I as b,h as c,M as u};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{l as J,m as K,h as H,r as Q,S as Y,q as Z,i as ee,U as oe,g as ne,P as v,O as te,f as N}from"./index-
|
|
1
|
+
import{l as J,m as K,h as H,r as Q,S as Y,q as Z,i as ee,U as oe,g as ne,P as v,O as te,f as N}from"./index-CEbbycgJ.js";import{d as le,c as s,a4 as ie,s as w,f as ae,a2 as se,a3 as re}from"./vendor-M5lGV-wr.js";import{c as ce,d as de,e as ue,f as ge,E as pe,C as me,I as fe,a as ve,b as $e}from"./icons-NT6gy8Ee.js";import{c as he}from"./vnode-BQi3uWRC.js";const B=(e,o,n,i,a)=>({backgroundColor:e,border:`${i.lineWidth}px ${i.lineType} ${o}`,[`${a}-icon`]:{color:n}}),ye=e=>{const{componentCls:o,motionDurationSlow:n,marginXS:i,marginSM:a,fontSize:u,fontSizeLG:r,lineHeight:g,borderRadiusLG:$,motionEaseInOutCirc:c,alertIconSizeLG:d,colorText:m,paddingContentVerticalSM:f,alertPaddingHorizontal:h,paddingMD:C,paddingContentHorizontalLG:S}=e;return{[o]:H(H({},Q(e)),{position:"relative",display:"flex",alignItems:"center",padding:`${f}px ${h}px`,wordWrap:"break-word",borderRadius:$,[`&${o}-rtl`]:{direction:"rtl"},[`${o}-content`]:{flex:1,minWidth:0},[`${o}-icon`]:{marginInlineEnd:i,lineHeight:0},"&-description":{display:"none",fontSize:u,lineHeight:g},"&-message":{color:m},[`&${o}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c},
|
|
2
2
|
padding-top ${n} ${c}, padding-bottom ${n} ${c},
|
|
3
3
|
margin-bottom ${n} ${c}`},[`&${o}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${o}-with-description`]:{alignItems:"flex-start",paddingInline:S,paddingBlock:C,[`${o}-icon`]:{marginInlineEnd:a,fontSize:d,lineHeight:0},[`${o}-message`]:{display:"block",marginBottom:i,color:m,fontSize:r},[`${o}-description`]:{display:"block"}},[`${o}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},Ce=e=>{const{componentCls:o,colorSuccess:n,colorSuccessBorder:i,colorSuccessBg:a,colorWarning:u,colorWarningBorder:r,colorWarningBg:g,colorError:$,colorErrorBorder:c,colorErrorBg:d,colorInfo:m,colorInfoBorder:f,colorInfoBg:h}=e;return{[o]:{"&-success":B(a,i,n,e,o),"&-info":B(h,f,m,e,o),"&-warning":B(g,r,u,e,o),"&-error":H(H({},B(d,c,$,e,o)),{[`${o}-description > pre`]:{margin:0,padding:0}})}}},Se=e=>{const{componentCls:o,iconCls:n,motionDurationMid:i,marginXS:a,fontSizeIcon:u,colorIcon:r,colorIconHover:g}=e;return{[o]:{"&-action":{marginInlineStart:a},[`${o}-close-icon`]:{marginInlineStart:a,padding:0,overflow:"hidden",fontSize:u,lineHeight:`${u}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:r,transition:`color ${i}`,"&:hover":{color:g}}},"&-close-text":{color:r,transition:`color ${i}`,"&:hover":{color:g}}}}},xe=e=>[ye(e),Ce(e),Se(e)],Ie=J("Alert",e=>{const{fontSizeHeading3:o}=e,n=K(e,{alertIconSizeLG:o,alertPaddingHorizontal:12});return[xe(n)]}),be={success:ve,info:fe,error:me,warning:pe},we={success:ge,info:ue,error:de,warning:ce},Be=te("success","info","warning","error"),He=()=>({type:v.oneOf(Be),closable:{type:Boolean,default:void 0},closeText:v.any,message:v.any,description:v.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:v.any,closeIcon:v.any,onClose:Function}),Te=le({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:He(),setup(e,o){let{slots:n,emit:i,attrs:a,expose:u}=o;const{prefixCls:r,direction:g}=Z("alert",e),[$,c]=Ie(r),d=w(!1),m=w(!1),f=w(),h=l=>{l.preventDefault();const p=f.value;p.style.height=`${p.offsetHeight}px`,p.style.height=`${p.offsetHeight}px`,d.value=!0,i("close",l)},C=()=>{var l;d.value=!1,m.value=!0,(l=e.afterClose)===null||l===void 0||l.call(e)},S=ae(()=>{const{type:l}=e;return l!==void 0?l:e.banner?"warning":"info"});u({animationEnd:C});const V=w({});return()=>{var l,p,T,E,_,z,A,O,L,F;const{banner:D,closeIcon:W=(l=n.closeIcon)===null||l===void 0?void 0:l.call(n)}=e;let{closable:M,showIcon:y}=e;const P=(p=e.closeText)!==null&&p!==void 0?p:(T=n.closeText)===null||T===void 0?void 0:T.call(n),x=(E=e.description)!==null&&E!==void 0?E:(_=n.description)===null||_===void 0?void 0:_.call(n),G=(z=e.message)!==null&&z!==void 0?z:(A=n.message)===null||A===void 0?void 0:A.call(n),I=(O=e.icon)!==null&&O!==void 0?O:(L=n.icon)===null||L===void 0?void 0:L.call(n),R=(F=n.action)===null||F===void 0?void 0:F.call(n);y=D&&y===void 0?!0:y;const j=(x?we:be)[S.value]||null;P&&(M=!0);const t=r.value,k=ee(t,{[`${t}-${S.value}`]:!0,[`${t}-closing`]:d.value,[`${t}-with-description`]:!!x,[`${t}-no-icon`]:!y,[`${t}-banner`]:!!D,[`${t}-closable`]:M,[`${t}-rtl`]:g.value==="rtl",[c.value]:!0}),X=M?s("button",{type:"button",onClick:h,class:`${t}-close-icon`,tabindex:0},[P?s("span",{class:`${t}-close-text`},[P]):W===void 0?s($e,null,null):W]):null,q=I&&(oe(I)?he(I,{class:`${t}-icon`}):s("span",{class:`${t}-icon`},[I]))||s(j,{class:`${t}-icon`},null),U=ne(`${t}-motion`,{appear:!1,css:!0,onAfterLeave:C,onBeforeLeave:b=>{b.style.maxHeight=`${b.offsetHeight}px`},onLeave:b=>{b.style.maxHeight="0px"}});return $(m.value?null:s(ie,U,{default:()=>[se(s("div",N(N({role:"alert"},a),{},{style:[a.style,V.value],class:[a.class,k],"data-show":!d.value,ref:f}),[y?q:null,s("div",{class:`${t}-content`},[G?s("div",{class:`${t}-message`},[G]):null,x?s("div",{class:`${t}-description`},[x]):null]),R?s("div",{class:`${t}-action`},[R]):null,X]),[[re,!d.value]])]}))}}}),Oe=Y(Te);export{He as alertProps,Oe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as q,m as J,h as N,r as Q,$ as P,t as tt,f as b,S as et,p as nt,q as ot,I as st}from"./index-DY5Oc3z6.js";import it from"./index-mzNWO8Yy.js";import{B as rt}from"./index-BWUG9yVI.js";import{d as L,b as F,w as lt,c as C,F as D,f as O,s as y,r as at}from"./vendor-M5lGV-wr.js";import{R as ut}from"./icons-NT6gy8Ee.js";import"./initDefaultProps-CacwmJft.js";import"./index-Dj8BNg-z.js";import"./isVisible-C7tPsqfj.js";import"./useState-CSzR8F8O.js";import"./raf-Deuc0E8-.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./compact-item-Bw5EEKw4.js";import"./createContext-xLJXI46O.js";import"./Compact-DnOD5uMF.js";import"./_getTag-BVc6NQ_K.js";const ct=r=>{const{componentCls:s}=r;return{[s]:N(N({},Q(r)),{display:"flex",justifyContent:"center",alignItems:"center",padding:r.paddingSM,backgroundColor:r.colorWhite,borderRadius:r.borderRadiusLG,border:`${r.lineWidth}px ${r.lineType} ${r.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${s}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:r.colorText,lineHeight:r.lineHeight,background:r.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${s}-expired , & > ${s}-scanned`]:{color:r.QRCodeTextColor}},"&-icon":{marginBlockEnd:r.marginXS,fontSize:r.controlHeight}}),[`${s}-borderless`]:{borderColor:"transparent"}}},ht=q("QRCode",r=>ct(J(r,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"}))),z=()=>({size:{type:Number,default:160},value:{type:String,required:!0},type:P("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:tt()}),ft=()=>N(N({},z()),{errorLevel:P("M"),icon:String,iconSize:{type:Number,default:40},status:P("active"),bordered:{type:Boolean,default:!0}});var p;(function(r){class s{static encodeText(t,n){const e=r.QrSegment.makeSegments(t);return s.encodeSegments(e,n)}static encodeBinary(t,n){const e=r.QrSegment.makeBytes(t);return s.encodeSegments([e],n)}static encodeSegments(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(s.MIN_VERSION<=e&&e<=o&&o<=s.MAX_VERSION)||i<-1||i>7)throw new RangeError("Invalid value");let a,g;for(a=e;;a++){const m=s.getNumDataCodewords(a,n)*8,M=l.getTotalBits(t,a);if(M<=m){g=M;break}if(a>=o)throw new RangeError("Data too long")}for(const m of[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH])c&&g<=s.getNumDataCodewords(a,m)*8&&(n=m);const f=[];for(const m of t){u(m.mode.modeBits,4,f),u(m.numChars,m.mode.numCharCountBits(a),f);for(const M of m.getData())f.push(M)}h(f.length==g);const R=s.getNumDataCodewords(a,n)*8;h(f.length<=R),u(0,Math.min(4,R-f.length),f),u(0,(8-f.length%8)%8,f),h(f.length%8==0);for(let m=236;f.length<R;m^=253)u(m,8,f);const w=[];for(;w.length*8<f.length;)w.push(0);return f.forEach((m,M)=>w[M>>>3]|=m<<7-(M&7)),new s(a,n,w,i)}constructor(t,n,e,o){if(this.version=t,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=[];for(let a=0;a<this.size;a++)i.push(!1);for(let a=0;a<this.size;a++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();const c=this.addEccAndInterleave(e);if(this.drawCodewords(c),o==-1){let a=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const f=this.getPenaltyScore();f<a&&(o=g,a=f),this.applyMask(g)}}h(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}getModule(t,n){return 0<=t&&t<this.size&&0<=n&&n<this.size&&this.modules[n][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),n=t.length;for(let e=0;e<n;e++)for(let o=0;o<n;o++)e==0&&o==0||e==0&&o==n-1||e==n-1&&o==0||this.drawAlignmentPattern(t[e],t[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.errorCorrectionLevel.formatBits<<3|t;let e=n;for(let i=0;i<10;i++)e=e<<1^(e>>>9)*1335;const o=(n<<10|e)^21522;h(o>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,d(o,i));this.setFunctionModule(8,7,d(o,6)),this.setFunctionModule(8,8,d(o,7)),this.setFunctionModule(7,8,d(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,d(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,d(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,d(o,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let e=0;e<12;e++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;h(n>>>18==0);for(let e=0;e<18;e++){const o=d(n,e),i=this.size-11+e%3,c=Math.floor(e/3);this.setFunctionModule(i,c,o),this.setFunctionModule(c,i,o)}}drawFinderPattern(t,n){for(let e=-4;e<=4;e++)for(let o=-4;o<=4;o++){const i=Math.max(Math.abs(o),Math.abs(e)),c=t+o,a=n+e;0<=c&&c<this.size&&0<=a&&a<this.size&&this.setFunctionModule(c,a,i!=2&&i!=4)}}drawAlignmentPattern(t,n){for(let e=-2;e<=2;e++)for(let o=-2;o<=2;o++)this.setFunctionModule(t+o,n+e,Math.max(Math.abs(o),Math.abs(e))!=1)}setFunctionModule(t,n,e){this.modules[n][t]=e,this.isFunction[n][t]=!0}addEccAndInterleave(t){const n=this.version,e=this.errorCorrectionLevel;if(t.length!=s.getNumDataCodewords(n,e))throw new RangeError("Invalid argument");const o=s.NUM_ERROR_CORRECTION_BLOCKS[e.ordinal][n],i=s.ECC_CODEWORDS_PER_BLOCK[e.ordinal][n],c=Math.floor(s.getNumRawDataModules(n)/8),a=o-c%o,g=Math.floor(c/o),f=[],R=s.reedSolomonComputeDivisor(i);for(let m=0,M=0;m<o;m++){const v=t.slice(M,M+g-i+(m<a?0:1));M+=v.length;const A=s.reedSolomonComputeRemainder(v,R);m<a&&v.push(0),f.push(v.concat(A))}const w=[];for(let m=0;m<f[0].length;m++)f.forEach((M,v)=>{(m!=g-i||v>=a)&&w.push(M[m])});return h(w.length==c),w}drawCodewords(t){if(t.length!=Math.floor(s.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let e=this.size-1;e>=1;e-=2){e==6&&(e=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){const c=e-i,g=(e+1&2)==0?this.size-1-o:o;!this.isFunction[g][c]&&n<t.length*8&&(this.modules[g][c]=d(t[n>>>3],7-(n&7)),n++)}}h(n==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let e=0;e<this.size;e++){let o;switch(t){case 0:o=(e+n)%2==0;break;case 1:o=n%2==0;break;case 2:o=e%3==0;break;case 3:o=(e+n)%3==0;break;case 4:o=(Math.floor(e/3)+Math.floor(n/2))%2==0;break;case 5:o=e*n%2+e*n%3==0;break;case 6:o=(e*n%2+e*n%3)%2==0;break;case 7:o=((e+n)%2+e*n%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[n][e]&&o&&(this.modules[n][e]=!this.modules[n][e])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let f=0;f<this.size;f++)this.modules[i][f]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[i][f],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let f=0;f<this.size;f++)this.modules[f][i]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[f][i],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size-1;i++)for(let c=0;c<this.size-1;c++){const a=this.modules[i][c];a==this.modules[i][c+1]&&a==this.modules[i+1][c]&&a==this.modules[i+1][c+1]&&(t+=s.PENALTY_N2)}let n=0;for(const i of this.modules)n=i.reduce((c,a)=>c+(a?1:0),n);const e=this.size*this.size,o=Math.ceil(Math.abs(n*20-e*10)/e)-1;return h(0<=o&&o<=9),t+=o*s.PENALTY_N4,h(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{const t=Math.floor(this.version/7)+2,n=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,e=[6];for(let o=this.size-7;e.length<t;o-=n)e.splice(1,0,o);return e}}static getNumRawDataModules(t){if(t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*t+128)*t+64;if(t>=2){const e=Math.floor(t/7)+2;n-=(25*e-10)*e-55,t>=7&&(n-=36)}return h(208<=n&&n<=29648),n}static getNumDataCodewords(t,n){return Math.floor(s.getNumRawDataModules(t)/8)-s.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*s.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");const n=[];for(let o=0;o<t-1;o++)n.push(0);n.push(1);let e=1;for(let o=0;o<t;o++){for(let i=0;i<n.length;i++)n[i]=s.reedSolomonMultiply(n[i],e),i+1<n.length&&(n[i]^=n[i+1]);e=s.reedSolomonMultiply(e,2)}return n}static reedSolomonComputeRemainder(t,n){const e=n.map(o=>0);for(const o of t){const i=o^e.shift();e.push(0),n.forEach((c,a)=>e[a]^=s.reedSolomonMultiply(c,i))}return e}static reedSolomonMultiply(t,n){if(t>>>8||n>>>8)throw new RangeError("Byte out of range");let e=0;for(let o=7;o>=0;o--)e=e<<1^(e>>>7)*285,e^=(n>>>o&1)*t;return h(e>>>8==0),e}finderPenaltyCountPatterns(t){const n=t[1];h(n<=this.size*3);const e=n>0&&t[2]==n&&t[3]==n*3&&t[4]==n&&t[5]==n;return(e&&t[0]>=n*4&&t[6]>=n?1:0)+(e&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,e){return t&&(this.finderPenaltyAddHistory(n,e),n=0),n+=this.size,this.finderPenaltyAddHistory(n,e),this.finderPenaltyCountPatterns(e)}finderPenaltyAddHistory(t,n){n[0]==0&&(t+=this.size),n.pop(),n.unshift(t)}}s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],r.QrCode=s;function u(E,t,n){if(t<0||t>31||E>>>t)throw new RangeError("Value out of range");for(let e=t-1;e>=0;e--)n.push(E>>>e&1)}function d(E,t){return(E>>>t&1)!=0}function h(E){if(!E)throw new Error("Assertion error")}class l{static makeBytes(t){const n=[];for(const e of t)u(e,8,n);return new l(l.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!l.isNumeric(t))throw new RangeError("String contains non-numeric characters");const n=[];for(let e=0;e<t.length;){const o=Math.min(t.length-e,3);u(parseInt(t.substring(e,e+o),10),o*3+1,n),e+=o}return new l(l.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!l.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");const n=[];let e;for(e=0;e+2<=t.length;e+=2){let o=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e))*45;o+=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e+1)),u(o,11,n)}return e<t.length&&u(l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e)),6,n),new l(l.Mode.ALPHANUMERIC,t.length,n)}static makeSegments(t){return t==""?[]:l.isNumeric(t)?[l.makeNumeric(t)]:l.isAlphanumeric(t)?[l.makeAlphanumeric(t)]:[l.makeBytes(l.toUtf8ByteArray(t))]}static makeEci(t){const n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)u(t,8,n);else if(t<16384)u(2,2,n),u(t,14,n);else if(t<1e6)u(6,3,n),u(t,21,n);else throw new RangeError("ECI assignment value out of range");return new l(l.Mode.ECI,0,n)}static isNumeric(t){return l.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return l.ALPHANUMERIC_REGEX.test(t)}constructor(t,n,e){if(this.mode=t,this.numChars=n,this.bitData=e,n<0)throw new RangeError("Invalid argument");this.bitData=e.slice()}getData(){return this.bitData.slice()}static getTotalBits(t,n){let e=0;for(const o of t){const i=o.mode.numCharCountBits(n);if(o.numChars>=1<<i)return 1/0;e+=4+i+o.bitData.length}return e}static toUtf8ByteArray(t){t=encodeURI(t);const n=[];for(let e=0;e<t.length;e++)t.charAt(e)!="%"?n.push(t.charCodeAt(e)):(n.push(parseInt(t.substring(e+1,e+3),16)),e+=2);return n}}l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",r.QrSegment=l})(p||(p={}));(function(r){(function(s){class u{constructor(h,l){this.ordinal=h,this.formatBits=l}}u.LOW=new u(0,1),u.MEDIUM=new u(1,0),u.QUARTILE=new u(2,3),u.HIGH=new u(3,2),s.Ecc=u})(r.QrCode||(r.QrCode={}))})(p||(p={}));(function(r){(function(s){class u{constructor(h,l){this.modeBits=h,this.numBitsCharCount=l}numCharCountBits(h){return this.numBitsCharCount[Math.floor((h+7)/17)]}}u.NUMERIC=new u(1,[10,12,14]),u.ALPHANUMERIC=new u(2,[9,11,13]),u.BYTE=new u(4,[8,16,16]),u.KANJI=new u(8,[8,10,12]),u.ECI=new u(7,[0,0,0]),s.Mode=u})(r.QrSegment||(r.QrSegment={}))})(p||(p={}));const U={L:p.QrCode.Ecc.LOW,M:p.QrCode.Ecc.MEDIUM,Q:p.QrCode.Ecc.QUARTILE,H:p.QrCode.Ecc.HIGH},S=128,$="L",k="#FFFFFF",H="#000000",G=!1,dt=4,gt=0,mt=.1;function Y(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const u=[];return r.forEach(function(d,h){let l=null;d.forEach(function(E,t){if(!E&&l!==null){u.push(`M${l+s} ${h+s}h${t-l}v1H${l+s}z`),l=null;return}if(t===d.length-1){if(!E)return;l===null?u.push(`M${t+s},${h+s} h1v1H${t+s}z`):u.push(`M${l+s},${h+s} h${t+1-l}v1H${l+s}z`);return}E&&l===null&&(l=t)})}),u.join("")}function V(r,s){return r.slice().map((u,d)=>d<s.y||d>=s.y+s.h?u:u.map((h,l)=>l<s.x||l>=s.x+s.w?h:!1))}function X(r,s,u,d){if(d==null)return null;const h=r.length+u*2,l=Math.floor(s*mt),E=h/s,t=(d.width||l)*E,n=(d.height||l)*E,e=d.x==null?r.length/2-t/2:d.x*E,o=d.y==null?r.length/2-n/2:d.y*E;let i=null;if(d.excavate){const c=Math.floor(e),a=Math.floor(o),g=Math.ceil(t+e-c),f=Math.ceil(n+o-a);i={x:c,y:a,w:g,h:f}}return{x:e,y:o,h:n,w:t,excavation:i}}function _(r,s){return s!=null?Math.floor(s):r?dt:gt}const Et=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Mt=L({name:"QRCodeCanvas",inheritAttrs:!1,props:N(N({},z()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(r,s){let{attrs:u,expose:d}=s;const h=O(()=>{var n;return(n=r.imageSettings)===null||n===void 0?void 0:n.src}),l=y(null),E=y(null),t=y(!1);return d({toDataURL:(n,e)=>{var o;return(o=l.value)===null||o===void 0?void 0:o.toDataURL(n,e)}}),F(()=>{const{value:n,size:e=S,level:o=$,bgColor:i=k,fgColor:c=H,includeMargin:a=G,marginSize:g,imageSettings:f}=r;if(l.value!=null){const R=l.value,w=R.getContext("2d");if(!w)return;let m=p.QrCode.encodeText(n,U[o]).getModules();const M=_(a,g),v=m.length+M*2,A=X(m,e,M,f),I=E.value,x=t.value&&A!=null&&I!==null&&I.complete&&I.naturalHeight!==0&&I.naturalWidth!==0;x&&A.excavation!=null&&(m=V(m,A.excavation));const B=window.devicePixelRatio||1;R.height=R.width=e*B;const T=e/v*B;w.scale(T,T),w.fillStyle=i,w.fillRect(0,0,v,v),w.fillStyle=c,Et?w.fill(new Path2D(Y(m,M))):m.forEach(function(W,j){W.forEach(function(K,Z){K&&w.fillRect(Z+M,j+M,1,1)})}),x&&w.drawImage(I,A.x+M,A.y+M,A.w,A.h)}},{flush:"post"}),lt(h,()=>{t.value=!1}),()=>{var n;const e=(n=r.size)!==null&&n!==void 0?n:S,o={height:`${e}px`,width:`${e}px`};let i=null;return h.value!=null&&(i=C("img",{src:h.value,key:h.value,style:{display:"none"},onLoad:()=>{t.value=!0},ref:E},null)),C(D,null,[C("canvas",b(b({},u),{},{style:[o,u.style],ref:l}),null),i])}}}),wt=L({name:"QRCodeSVG",inheritAttrs:!1,props:N(N({},z()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(r){let s=null,u=null,d=null,h=null,l=null,E=null;return F(()=>{const{value:t,size:n=S,level:e=$,includeMargin:o=G,marginSize:i,imageSettings:c}=r;s=p.QrCode.encodeText(t,U[e]).getModules(),u=_(o,i),d=s.length+u*2,h=X(s,n,u,c),c!=null&&h!=null&&(h.excavation!=null&&(s=V(s,h.excavation)),E=C("image",{"xlink:href":c.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"},null)),l=Y(s,u)}),()=>{const t=r.bgColor&&k,n=r.fgColor&&H;return C("svg",{height:r.size,width:r.size,viewBox:`0 0 ${d} ${d}`},[!!r.title&&C("title",null,[r.title]),C("path",{fill:t,d:`M0,0 h${d}v${d}H0z`,"shape-rendering":"crispEdges"},null),C("path",{fill:n,d:l,"shape-rendering":"crispEdges"},null),E])}}}),Ct=L({name:"AQrcode",inheritAttrs:!1,props:ft(),emits:["refresh"],setup(r,s){let{emit:u,attrs:d,expose:h}=s;const[l]=nt("QRCode"),{prefixCls:E}=ot("qrcode",r),[t,n]=ht(E),[,e]=st(),o=at();h({toDataURL:(c,a)=>{var g;return(g=o.value)===null||g===void 0?void 0:g.toDataURL(c,a)}});const i=O(()=>{const{value:c,icon:a="",size:g=160,iconSize:f=40,color:R=e.value.colorText,bgColor:w="transparent",errorLevel:m="M"}=r,M={src:a,x:void 0,y:void 0,height:f,width:f,excavate:!0};return{value:c,size:g-(e.value.paddingSM+e.value.lineWidth)*2,level:m,bgColor:w,fgColor:R,imageSettings:a?M:void 0}});return()=>{const c=E.value;return t(C("div",b(b({},d),{},{style:[d.style,{width:`${r.size}px`,height:`${r.size}px`,backgroundColor:i.value.bgColor}],class:[n.value,c,{[`${c}-borderless`]:!r.bordered}]}),[r.status!=="active"&&C("div",{class:`${c}-mask`},[r.status==="loading"&&C(it,null,null),r.status==="expired"&&C(D,null,[C("p",{class:`${c}-expired`},[l.value.expired]),C(rt,{type:"link",onClick:a=>u("refresh",a)},{default:()=>[l.value.refresh],icon:()=>C(ut,null,null)})]),r.status==="scanned"&&C("p",{class:`${c}-scanned`},[l.value.scanned])]),r.type==="canvas"?C(Mt,b({ref:o},i.value),null):C(wt,i.value,null)]))}}}),Dt=et(Ct);export{Dt as default};
|
|
1
|
+
import{l as q,m as J,h as N,r as Q,$ as P,t as tt,f as b,S as et,p as nt,q as ot,I as st}from"./index-CEbbycgJ.js";import it from"./index-BFV6aAoX.js";import{B as rt}from"./index-BzzFMBIM.js";import{d as L,b as F,w as lt,c as C,F as D,f as O,s as y,r as at}from"./vendor-M5lGV-wr.js";import{R as ut}from"./icons-NT6gy8Ee.js";import"./initDefaultProps-CAgx2aHm.js";import"./index-C3VVwJcn.js";import"./isVisible-C7tPsqfj.js";import"./useState-CSzR8F8O.js";import"./raf-Deuc0E8-.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./compact-item-r4YWRFGQ.js";import"./createContext-C8Lwrn-C.js";import"./Compact-CQR4QsWP.js";import"./_getTag-BVc6NQ_K.js";const ct=r=>{const{componentCls:s}=r;return{[s]:N(N({},Q(r)),{display:"flex",justifyContent:"center",alignItems:"center",padding:r.paddingSM,backgroundColor:r.colorWhite,borderRadius:r.borderRadiusLG,border:`${r.lineWidth}px ${r.lineType} ${r.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${s}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:r.colorText,lineHeight:r.lineHeight,background:r.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${s}-expired , & > ${s}-scanned`]:{color:r.QRCodeTextColor}},"&-icon":{marginBlockEnd:r.marginXS,fontSize:r.controlHeight}}),[`${s}-borderless`]:{borderColor:"transparent"}}},ht=q("QRCode",r=>ct(J(r,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"}))),z=()=>({size:{type:Number,default:160},value:{type:String,required:!0},type:P("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:tt()}),ft=()=>N(N({},z()),{errorLevel:P("M"),icon:String,iconSize:{type:Number,default:40},status:P("active"),bordered:{type:Boolean,default:!0}});var p;(function(r){class s{static encodeText(t,n){const e=r.QrSegment.makeSegments(t);return s.encodeSegments(e,n)}static encodeBinary(t,n){const e=r.QrSegment.makeBytes(t);return s.encodeSegments([e],n)}static encodeSegments(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(s.MIN_VERSION<=e&&e<=o&&o<=s.MAX_VERSION)||i<-1||i>7)throw new RangeError("Invalid value");let a,g;for(a=e;;a++){const m=s.getNumDataCodewords(a,n)*8,M=l.getTotalBits(t,a);if(M<=m){g=M;break}if(a>=o)throw new RangeError("Data too long")}for(const m of[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH])c&&g<=s.getNumDataCodewords(a,m)*8&&(n=m);const f=[];for(const m of t){u(m.mode.modeBits,4,f),u(m.numChars,m.mode.numCharCountBits(a),f);for(const M of m.getData())f.push(M)}h(f.length==g);const R=s.getNumDataCodewords(a,n)*8;h(f.length<=R),u(0,Math.min(4,R-f.length),f),u(0,(8-f.length%8)%8,f),h(f.length%8==0);for(let m=236;f.length<R;m^=253)u(m,8,f);const w=[];for(;w.length*8<f.length;)w.push(0);return f.forEach((m,M)=>w[M>>>3]|=m<<7-(M&7)),new s(a,n,w,i)}constructor(t,n,e,o){if(this.version=t,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=[];for(let a=0;a<this.size;a++)i.push(!1);for(let a=0;a<this.size;a++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();const c=this.addEccAndInterleave(e);if(this.drawCodewords(c),o==-1){let a=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const f=this.getPenaltyScore();f<a&&(o=g,a=f),this.applyMask(g)}}h(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}getModule(t,n){return 0<=t&&t<this.size&&0<=n&&n<this.size&&this.modules[n][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),n=t.length;for(let e=0;e<n;e++)for(let o=0;o<n;o++)e==0&&o==0||e==0&&o==n-1||e==n-1&&o==0||this.drawAlignmentPattern(t[e],t[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.errorCorrectionLevel.formatBits<<3|t;let e=n;for(let i=0;i<10;i++)e=e<<1^(e>>>9)*1335;const o=(n<<10|e)^21522;h(o>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,d(o,i));this.setFunctionModule(8,7,d(o,6)),this.setFunctionModule(8,8,d(o,7)),this.setFunctionModule(7,8,d(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,d(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,d(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,d(o,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let e=0;e<12;e++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;h(n>>>18==0);for(let e=0;e<18;e++){const o=d(n,e),i=this.size-11+e%3,c=Math.floor(e/3);this.setFunctionModule(i,c,o),this.setFunctionModule(c,i,o)}}drawFinderPattern(t,n){for(let e=-4;e<=4;e++)for(let o=-4;o<=4;o++){const i=Math.max(Math.abs(o),Math.abs(e)),c=t+o,a=n+e;0<=c&&c<this.size&&0<=a&&a<this.size&&this.setFunctionModule(c,a,i!=2&&i!=4)}}drawAlignmentPattern(t,n){for(let e=-2;e<=2;e++)for(let o=-2;o<=2;o++)this.setFunctionModule(t+o,n+e,Math.max(Math.abs(o),Math.abs(e))!=1)}setFunctionModule(t,n,e){this.modules[n][t]=e,this.isFunction[n][t]=!0}addEccAndInterleave(t){const n=this.version,e=this.errorCorrectionLevel;if(t.length!=s.getNumDataCodewords(n,e))throw new RangeError("Invalid argument");const o=s.NUM_ERROR_CORRECTION_BLOCKS[e.ordinal][n],i=s.ECC_CODEWORDS_PER_BLOCK[e.ordinal][n],c=Math.floor(s.getNumRawDataModules(n)/8),a=o-c%o,g=Math.floor(c/o),f=[],R=s.reedSolomonComputeDivisor(i);for(let m=0,M=0;m<o;m++){const v=t.slice(M,M+g-i+(m<a?0:1));M+=v.length;const A=s.reedSolomonComputeRemainder(v,R);m<a&&v.push(0),f.push(v.concat(A))}const w=[];for(let m=0;m<f[0].length;m++)f.forEach((M,v)=>{(m!=g-i||v>=a)&&w.push(M[m])});return h(w.length==c),w}drawCodewords(t){if(t.length!=Math.floor(s.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let e=this.size-1;e>=1;e-=2){e==6&&(e=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){const c=e-i,g=(e+1&2)==0?this.size-1-o:o;!this.isFunction[g][c]&&n<t.length*8&&(this.modules[g][c]=d(t[n>>>3],7-(n&7)),n++)}}h(n==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let e=0;e<this.size;e++){let o;switch(t){case 0:o=(e+n)%2==0;break;case 1:o=n%2==0;break;case 2:o=e%3==0;break;case 3:o=(e+n)%3==0;break;case 4:o=(Math.floor(e/3)+Math.floor(n/2))%2==0;break;case 5:o=e*n%2+e*n%3==0;break;case 6:o=(e*n%2+e*n%3)%2==0;break;case 7:o=((e+n)%2+e*n%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[n][e]&&o&&(this.modules[n][e]=!this.modules[n][e])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let f=0;f<this.size;f++)this.modules[i][f]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[i][f],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let f=0;f<this.size;f++)this.modules[f][i]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[f][i],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size-1;i++)for(let c=0;c<this.size-1;c++){const a=this.modules[i][c];a==this.modules[i][c+1]&&a==this.modules[i+1][c]&&a==this.modules[i+1][c+1]&&(t+=s.PENALTY_N2)}let n=0;for(const i of this.modules)n=i.reduce((c,a)=>c+(a?1:0),n);const e=this.size*this.size,o=Math.ceil(Math.abs(n*20-e*10)/e)-1;return h(0<=o&&o<=9),t+=o*s.PENALTY_N4,h(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{const t=Math.floor(this.version/7)+2,n=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,e=[6];for(let o=this.size-7;e.length<t;o-=n)e.splice(1,0,o);return e}}static getNumRawDataModules(t){if(t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*t+128)*t+64;if(t>=2){const e=Math.floor(t/7)+2;n-=(25*e-10)*e-55,t>=7&&(n-=36)}return h(208<=n&&n<=29648),n}static getNumDataCodewords(t,n){return Math.floor(s.getNumRawDataModules(t)/8)-s.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*s.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");const n=[];for(let o=0;o<t-1;o++)n.push(0);n.push(1);let e=1;for(let o=0;o<t;o++){for(let i=0;i<n.length;i++)n[i]=s.reedSolomonMultiply(n[i],e),i+1<n.length&&(n[i]^=n[i+1]);e=s.reedSolomonMultiply(e,2)}return n}static reedSolomonComputeRemainder(t,n){const e=n.map(o=>0);for(const o of t){const i=o^e.shift();e.push(0),n.forEach((c,a)=>e[a]^=s.reedSolomonMultiply(c,i))}return e}static reedSolomonMultiply(t,n){if(t>>>8||n>>>8)throw new RangeError("Byte out of range");let e=0;for(let o=7;o>=0;o--)e=e<<1^(e>>>7)*285,e^=(n>>>o&1)*t;return h(e>>>8==0),e}finderPenaltyCountPatterns(t){const n=t[1];h(n<=this.size*3);const e=n>0&&t[2]==n&&t[3]==n*3&&t[4]==n&&t[5]==n;return(e&&t[0]>=n*4&&t[6]>=n?1:0)+(e&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,e){return t&&(this.finderPenaltyAddHistory(n,e),n=0),n+=this.size,this.finderPenaltyAddHistory(n,e),this.finderPenaltyCountPatterns(e)}finderPenaltyAddHistory(t,n){n[0]==0&&(t+=this.size),n.pop(),n.unshift(t)}}s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],r.QrCode=s;function u(E,t,n){if(t<0||t>31||E>>>t)throw new RangeError("Value out of range");for(let e=t-1;e>=0;e--)n.push(E>>>e&1)}function d(E,t){return(E>>>t&1)!=0}function h(E){if(!E)throw new Error("Assertion error")}class l{static makeBytes(t){const n=[];for(const e of t)u(e,8,n);return new l(l.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!l.isNumeric(t))throw new RangeError("String contains non-numeric characters");const n=[];for(let e=0;e<t.length;){const o=Math.min(t.length-e,3);u(parseInt(t.substring(e,e+o),10),o*3+1,n),e+=o}return new l(l.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!l.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");const n=[];let e;for(e=0;e+2<=t.length;e+=2){let o=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e))*45;o+=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e+1)),u(o,11,n)}return e<t.length&&u(l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e)),6,n),new l(l.Mode.ALPHANUMERIC,t.length,n)}static makeSegments(t){return t==""?[]:l.isNumeric(t)?[l.makeNumeric(t)]:l.isAlphanumeric(t)?[l.makeAlphanumeric(t)]:[l.makeBytes(l.toUtf8ByteArray(t))]}static makeEci(t){const n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)u(t,8,n);else if(t<16384)u(2,2,n),u(t,14,n);else if(t<1e6)u(6,3,n),u(t,21,n);else throw new RangeError("ECI assignment value out of range");return new l(l.Mode.ECI,0,n)}static isNumeric(t){return l.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return l.ALPHANUMERIC_REGEX.test(t)}constructor(t,n,e){if(this.mode=t,this.numChars=n,this.bitData=e,n<0)throw new RangeError("Invalid argument");this.bitData=e.slice()}getData(){return this.bitData.slice()}static getTotalBits(t,n){let e=0;for(const o of t){const i=o.mode.numCharCountBits(n);if(o.numChars>=1<<i)return 1/0;e+=4+i+o.bitData.length}return e}static toUtf8ByteArray(t){t=encodeURI(t);const n=[];for(let e=0;e<t.length;e++)t.charAt(e)!="%"?n.push(t.charCodeAt(e)):(n.push(parseInt(t.substring(e+1,e+3),16)),e+=2);return n}}l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",r.QrSegment=l})(p||(p={}));(function(r){(function(s){class u{constructor(h,l){this.ordinal=h,this.formatBits=l}}u.LOW=new u(0,1),u.MEDIUM=new u(1,0),u.QUARTILE=new u(2,3),u.HIGH=new u(3,2),s.Ecc=u})(r.QrCode||(r.QrCode={}))})(p||(p={}));(function(r){(function(s){class u{constructor(h,l){this.modeBits=h,this.numBitsCharCount=l}numCharCountBits(h){return this.numBitsCharCount[Math.floor((h+7)/17)]}}u.NUMERIC=new u(1,[10,12,14]),u.ALPHANUMERIC=new u(2,[9,11,13]),u.BYTE=new u(4,[8,16,16]),u.KANJI=new u(8,[8,10,12]),u.ECI=new u(7,[0,0,0]),s.Mode=u})(r.QrSegment||(r.QrSegment={}))})(p||(p={}));const U={L:p.QrCode.Ecc.LOW,M:p.QrCode.Ecc.MEDIUM,Q:p.QrCode.Ecc.QUARTILE,H:p.QrCode.Ecc.HIGH},S=128,$="L",k="#FFFFFF",H="#000000",G=!1,dt=4,gt=0,mt=.1;function Y(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const u=[];return r.forEach(function(d,h){let l=null;d.forEach(function(E,t){if(!E&&l!==null){u.push(`M${l+s} ${h+s}h${t-l}v1H${l+s}z`),l=null;return}if(t===d.length-1){if(!E)return;l===null?u.push(`M${t+s},${h+s} h1v1H${t+s}z`):u.push(`M${l+s},${h+s} h${t+1-l}v1H${l+s}z`);return}E&&l===null&&(l=t)})}),u.join("")}function V(r,s){return r.slice().map((u,d)=>d<s.y||d>=s.y+s.h?u:u.map((h,l)=>l<s.x||l>=s.x+s.w?h:!1))}function X(r,s,u,d){if(d==null)return null;const h=r.length+u*2,l=Math.floor(s*mt),E=h/s,t=(d.width||l)*E,n=(d.height||l)*E,e=d.x==null?r.length/2-t/2:d.x*E,o=d.y==null?r.length/2-n/2:d.y*E;let i=null;if(d.excavate){const c=Math.floor(e),a=Math.floor(o),g=Math.ceil(t+e-c),f=Math.ceil(n+o-a);i={x:c,y:a,w:g,h:f}}return{x:e,y:o,h:n,w:t,excavation:i}}function _(r,s){return s!=null?Math.floor(s):r?dt:gt}const Et=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Mt=L({name:"QRCodeCanvas",inheritAttrs:!1,props:N(N({},z()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(r,s){let{attrs:u,expose:d}=s;const h=O(()=>{var n;return(n=r.imageSettings)===null||n===void 0?void 0:n.src}),l=y(null),E=y(null),t=y(!1);return d({toDataURL:(n,e)=>{var o;return(o=l.value)===null||o===void 0?void 0:o.toDataURL(n,e)}}),F(()=>{const{value:n,size:e=S,level:o=$,bgColor:i=k,fgColor:c=H,includeMargin:a=G,marginSize:g,imageSettings:f}=r;if(l.value!=null){const R=l.value,w=R.getContext("2d");if(!w)return;let m=p.QrCode.encodeText(n,U[o]).getModules();const M=_(a,g),v=m.length+M*2,A=X(m,e,M,f),I=E.value,x=t.value&&A!=null&&I!==null&&I.complete&&I.naturalHeight!==0&&I.naturalWidth!==0;x&&A.excavation!=null&&(m=V(m,A.excavation));const B=window.devicePixelRatio||1;R.height=R.width=e*B;const T=e/v*B;w.scale(T,T),w.fillStyle=i,w.fillRect(0,0,v,v),w.fillStyle=c,Et?w.fill(new Path2D(Y(m,M))):m.forEach(function(W,j){W.forEach(function(K,Z){K&&w.fillRect(Z+M,j+M,1,1)})}),x&&w.drawImage(I,A.x+M,A.y+M,A.w,A.h)}},{flush:"post"}),lt(h,()=>{t.value=!1}),()=>{var n;const e=(n=r.size)!==null&&n!==void 0?n:S,o={height:`${e}px`,width:`${e}px`};let i=null;return h.value!=null&&(i=C("img",{src:h.value,key:h.value,style:{display:"none"},onLoad:()=>{t.value=!0},ref:E},null)),C(D,null,[C("canvas",b(b({},u),{},{style:[o,u.style],ref:l}),null),i])}}}),wt=L({name:"QRCodeSVG",inheritAttrs:!1,props:N(N({},z()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(r){let s=null,u=null,d=null,h=null,l=null,E=null;return F(()=>{const{value:t,size:n=S,level:e=$,includeMargin:o=G,marginSize:i,imageSettings:c}=r;s=p.QrCode.encodeText(t,U[e]).getModules(),u=_(o,i),d=s.length+u*2,h=X(s,n,u,c),c!=null&&h!=null&&(h.excavation!=null&&(s=V(s,h.excavation)),E=C("image",{"xlink:href":c.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"},null)),l=Y(s,u)}),()=>{const t=r.bgColor&&k,n=r.fgColor&&H;return C("svg",{height:r.size,width:r.size,viewBox:`0 0 ${d} ${d}`},[!!r.title&&C("title",null,[r.title]),C("path",{fill:t,d:`M0,0 h${d}v${d}H0z`,"shape-rendering":"crispEdges"},null),C("path",{fill:n,d:l,"shape-rendering":"crispEdges"},null),E])}}}),Ct=L({name:"AQrcode",inheritAttrs:!1,props:ft(),emits:["refresh"],setup(r,s){let{emit:u,attrs:d,expose:h}=s;const[l]=nt("QRCode"),{prefixCls:E}=ot("qrcode",r),[t,n]=ht(E),[,e]=st(),o=at();h({toDataURL:(c,a)=>{var g;return(g=o.value)===null||g===void 0?void 0:g.toDataURL(c,a)}});const i=O(()=>{const{value:c,icon:a="",size:g=160,iconSize:f=40,color:R=e.value.colorText,bgColor:w="transparent",errorLevel:m="M"}=r,M={src:a,x:void 0,y:void 0,height:f,width:f,excavate:!0};return{value:c,size:g-(e.value.paddingSM+e.value.lineWidth)*2,level:m,bgColor:w,fgColor:R,imageSettings:a?M:void 0}});return()=>{const c=E.value;return t(C("div",b(b({},d),{},{style:[d.style,{width:`${r.size}px`,height:`${r.size}px`,backgroundColor:i.value.bgColor}],class:[n.value,c,{[`${c}-borderless`]:!r.bordered}]}),[r.status!=="active"&&C("div",{class:`${c}-mask`},[r.status==="loading"&&C(it,null,null),r.status==="expired"&&C(D,null,[C("p",{class:`${c}-expired`},[l.value.expired]),C(rt,{type:"link",onClick:a=>u("refresh",a)},{default:()=>[l.value.refresh],icon:()=>C(ut,null,null)})]),r.status==="scanned"&&C("p",{class:`${c}-scanned`},[l.value.scanned])]),r.type==="canvas"?C(Mt,b({ref:o},i.value),null):C(wt,i.value,null)]))}}}),Dt=et(Ct);export{Dt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{K as ye,P as h,f as $,g as be,h as i,i as U,j as Ae,k as Le,l as Re,m as Ee,r as De,n as We,o as je,p as le,q as Ve,w as _e,s as Y,t as K,v as Ge,C as Ke,x as Xe,y as Ue,z as Qe}from"./index-
|
|
1
|
+
import{K as ye,P as h,f as $,g as be,h as i,i as U,j as Ae,k as Le,l as Re,m as Ee,r as De,n as We,o as je,p as le,q as Ve,w as _e,s as Y,t as K,v as Ge,C as Ke,x as Xe,y as Ue,z as Qe}from"./index-CEbbycgJ.js";import{K as se}from"./KeyCode-D63Tfrq7.js";import{o as xe}from"./omit-BFZV2hmZ.js";import{p as ke}from"./pickAttrs-D98WQSur.js";import{i as J}from"./initDefaultProps-CAgx2aHm.js";import{d as O,c as a,a4 as $e,a2 as Se,a3 as he,r as X,f as q,n as Ye,s as T,w as Z,e as qe,b as Ze,F as Je,A as ce,u as eo,j as oo}from"./vendor-M5lGV-wr.js";import{i as no,P as to,a as lo}from"./motion-DFuREFOd.js";import{b as ao,E as io,C as ro,a as so,I as co}from"./icons-NT6gy8Ee.js";import{B as de,c as uo}from"./index-BzzFMBIM.js";import{c as fo}from"./styleChecker-Br0YrCOO.js";import{i as mo}from"./zoom-DaW-jbu7.js";import{A as ue}from"./ActionButton-epuY2GkZ.js";import{t as po}from"./vnode-BQi3uWRC.js";import"./raf-Deuc0E8-.js";import"./index-C3VVwJcn.js";import"./isVisible-C7tPsqfj.js";import"./useState-CSzR8F8O.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./compact-item-r4YWRFGQ.js";import"./createContext-C8Lwrn-C.js";import"./Compact-CQR4QsWP.js";import"./_getTag-BVc6NQ_K.js";const go=new ye("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),Co=new ye("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),vo=function(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:n}=e,t=`${n}-fade`,l=o?"&":"";return[no(t,go,Co,e.motionDurationMid,o),{[`
|
|
2
2
|
${l}${t}-enter,
|
|
3
3
|
${l}${t}-appear
|
|
4
4
|
`]:{opacity:0,animationTimingFunction:"linear"},[`${l}${t}-leave`]:{animationTimingFunction:"linear"}}]};function ae(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:h.shape({x:Number,y:Number}).loose,title:h.any,footer:h.any,transitionName:String,maskTransitionName:String,animation:h.any,maskAnimation:h.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:h.any,maskProps:h.any,wrapProps:h.any,getContainer:h.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:h.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function fe(e,o,n){let t=o;return!t&&n&&(t=`${e}-${n}`),t}let me=-1;function yo(){return me+=1,me}function pe(e,o){let n=e[`page${o?"Y":"X"}Offset`];const t=`scroll${o?"Top":"Left"}`;if(typeof n!="number"){const l=e.document;n=l.documentElement[t],typeof n!="number"&&(n=l.body[t])}return n}function bo(e){const o=e.getBoundingClientRect(),n={left:o.left,top:o.top},t=e.ownerDocument,l=t.defaultView||t.parentWindow;return n.left+=pe(l),n.top+=pe(l,!0),n}const xo={width:0,height:0,overflow:"hidden",outline:"none"},$o={outline:"none"},So=O({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:i(i({},ae()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(e,o){let{expose:n,slots:t,attrs:l}=o;const s=X(),p=X(),g=X();n({focus:()=>{var c;(c=s.value)===null||c===void 0||c.focus({preventScroll:!0})},changeActive:c=>{const{activeElement:r}=document;c&&r===p.value?s.value.focus({preventScroll:!0}):!c&&r===s.value&&p.value.focus({preventScroll:!0})}});const S=X(),m=q(()=>{const{width:c,height:r}=e,v={};return c!==void 0&&(v.width=typeof c=="number"?`${c}px`:c),r!==void 0&&(v.height=typeof r=="number"?`${r}px`:r),S.value&&(v.transformOrigin=S.value),v}),u=()=>{Ye(()=>{if(g.value){const c=bo(g.value);S.value=e.mousePosition?`${e.mousePosition.x-c.left}px ${e.mousePosition.y-c.top}px`:""}})},d=c=>{e.onVisibleChanged(c)};return()=>{var c,r,v,y;const{prefixCls:x,footer:f=(c=t.footer)===null||c===void 0?void 0:c.call(t),title:b=(r=t.title)===null||r===void 0?void 0:r.call(t),ariaId:C,closable:w,closeIcon:B=(v=t.closeIcon)===null||v===void 0?void 0:v.call(t),onClose:F,bodyStyle:I,bodyProps:M,onMousedown:H,onMouseup:A,visible:E,modalRender:D=t.modalRender,destroyOnClose:_,motionName:N}=e;let W;f&&(W=a("div",{class:`${x}-footer`},[f]));let j;b&&(j=a("div",{class:`${x}-header`},[a("div",{class:`${x}-title`,id:C},[b])]));let L;w&&(L=a("button",{type:"button",onClick:F,"aria-label":"Close",class:`${x}-close`},[B||a("span",{class:`${x}-close-x`},null)]));const z=a("div",{class:`${x}-content`},[L,j,a("div",$({class:`${x}-body`,style:I},M),[(y=t.default)===null||y===void 0?void 0:y.call(t)]),W]),ee=be(N);return a($e,$($({},ee),{},{onBeforeEnter:u,onAfterEnter:()=>d(!0),onAfterLeave:()=>d(!1)}),{default:()=>[E||!_?Se(a("div",$($({},l),{},{ref:g,key:"dialog-element",role:"document",style:[m.value,l.style],class:[x,l.class],onMousedown:H,onMouseup:A}),[a("div",{tabindex:0,ref:s,style:$o},[D?D({originVNode:z}):z]),a("div",{tabindex:0,ref:p,style:xo},null)]),[[he,E]]):null]})}}}),ho=O({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(e,o){return()=>{const{prefixCls:n,visible:t,maskProps:l,motionName:s}=e,p=be(s);return a($e,p,{default:()=>[Se(a("div",$({class:`${n}-mask`},l),null),[[he,t]])]})}}}),ge=O({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:J(i(i({},ae()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(e,o){let{attrs:n,slots:t}=o;const l=T(),s=T(),p=T(),g=T(e.visible),S=T(`vcDialogTitle${yo()}`),m=f=>{var b,C;if(f)Ae(s.value,document.activeElement)||(l.value=document.activeElement,(b=p.value)===null||b===void 0||b.focus());else{const w=g.value;if(g.value=!1,e.mask&&l.value&&e.focusTriggerAfterClose){try{l.value.focus({preventScroll:!0})}catch{}l.value=null}w&&((C=e.afterClose)===null||C===void 0||C.call(e))}},u=f=>{var b;(b=e.onClose)===null||b===void 0||b.call(e,f)},d=T(!1),c=T(),r=()=>{clearTimeout(c.value),d.value=!0},v=()=>{c.value=setTimeout(()=>{d.value=!1})},y=f=>{if(!e.maskClosable)return null;d.value?d.value=!1:s.value===f.target&&u(f)},x=f=>{if(e.keyboard&&f.keyCode===se.ESC){f.stopPropagation(),u(f);return}e.visible&&f.keyCode===se.TAB&&p.value.changeActive(!f.shiftKey)};return Z(()=>e.visible,()=>{e.visible&&(g.value=!0)},{flush:"post"}),qe(()=>{var f;clearTimeout(c.value),(f=e.scrollLocker)===null||f===void 0||f.unLock()}),Ze(()=>{var f,b;(f=e.scrollLocker)===null||f===void 0||f.unLock(),g.value&&((b=e.scrollLocker)===null||b===void 0||b.lock())}),()=>{const{prefixCls:f,mask:b,visible:C,maskTransitionName:w,maskAnimation:B,zIndex:F,wrapClassName:I,rootClassName:M,wrapStyle:H,closable:A,maskProps:E,maskStyle:D,transitionName:_,animation:N,wrapProps:W,title:j=t.title}=e,{style:L,class:z}=n;return a("div",$({class:[`${f}-root`,M]},ke(e,{data:!0})),[a(ho,{prefixCls:f,visible:b&&C,motionName:fe(f,w,B),style:i({zIndex:F},D),maskProps:E},null),a("div",$({tabIndex:-1,onKeydown:x,class:U(`${f}-wrap`,I),ref:s,onClick:y,role:"dialog","aria-labelledby":j?S.value:null,style:i(i({zIndex:F},H),{display:g.value?null:"none"})},W),[a(So,$($({},xe(e,["scrollLocker"])),{},{style:L,class:z,onMousedown:r,onMouseup:v,ref:p,closable:A,ariaId:S.value,prefixCls:f,visible:C,onClose:u,onVisibleChanged:m,motionName:fe(f,_,N)}),t)])])}}}),wo=ae(),To=O({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:J(wo,{visible:!1}),setup(e,o){let{attrs:n,slots:t}=o;const l=X(e.visible);return Le({},{inTriggerContext:!1}),Z(()=>e.visible,()=>{e.visible&&(l.value=!0)},{flush:"post"}),()=>{const{visible:s,getContainer:p,forceRender:g,destroyOnClose:S=!1,afterClose:m}=e;let u=i(i(i({},e),n),{ref:"_component",key:"dialog"});return p===!1?a(ge,$($({},u),{},{getOpenCount:()=>2}),t):!g&&S&&!l.value?null:a(to,{autoLock:!0,visible:s,forceRender:g,getContainer:p},{default:d=>(u=i(i(i({},u),d),{afterClose:()=>{m?.(),l.value=!1}}),a(ge,u,t))})}}});function Ce(e){return{position:e,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0}}const Bo=e=>{const{componentCls:o}=e;return[{[`${o}-root`]:{[`${o}${e.antCls}-zoom-enter, ${o}${e.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${o}${e.antCls}-zoom-leave ${o}-content`]:{pointerEvents:"none"},[`${o}-mask`]:i(i({},Ce("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,[`${o}-hidden`]:{display:"none"}}),[`${o}-wrap`]:i(i({},Ce("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${o}-root`]:vo(e)}]},Po=e=>{const{componentCls:o}=e;return[{[`${o}-root`]:{[`${o}-wrap`]:{zIndex:e.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},[`${o}-wrap-rtl`]:{direction:"rtl"},[`${o}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[o]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax})`]:{[o]:{maxWidth:"calc(100vw - 16px)",margin:`${e.marginXS} auto`},[`${o}-centered`]:{[o]:{flex:1}}}}},{[o]:i(i({},De(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${e.margin*2}px)`,margin:"0 auto",paddingBottom:e.paddingLG,[`${o}-title`]:{margin:0,color:e.modalHeadingColor,fontWeight:e.fontWeightStrong,fontSize:e.modalHeaderTitleFontSize,lineHeight:e.modalHeaderTitleLineHeight,wordWrap:"break-word"},[`${o}-content`]:{position:"relative",backgroundColor:e.modalContentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadowSecondary,pointerEvents:"auto",padding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`},[`${o}-close`]:i({position:"absolute",top:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,insetInlineEnd:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,zIndex:e.zIndexPopupBase+10,padding:0,color:e.modalCloseColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalConfirmIconSize,height:e.modalConfirmIconSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"block",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:`${e.modalCloseBtnSize}px`,textAlign:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.wireframe?"transparent":e.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:e.wireframe?"transparent":e.colorFillContentHover}},We(e)),[`${o}-header`]:{color:e.colorText,background:e.modalHeaderBg,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,marginBottom:e.marginXS},[`${o}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word"},[`${o}-footer`]:{textAlign:"end",background:e.modalFooterBg,marginTop:e.marginSM,[`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:e.marginXS}},[`${o}-open`]:{overflow:"hidden"}})},{[`${o}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${o}-content,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as p,J as lt,f as B,U as it,P as ye,t as Ae,i as he,g as ht,aq as Ne,ac as at,an as It,X as St,l as Ct,m as je,o as Ve,r as xt,af as Mt,q as wt}from"./index-DY5Oc3z6.js";import{z as We,i as de,d as J,a8 as Ge,p as ge,f as m,e as Ie,w as X,c as f,g as rt,s as z,r as F,a4 as Kt,a2 as Ot,a3 as Tt,F as Ee,o as kt,b as Te,u as be,v as Pt}from"./vendor-M5lGV-wr.js";import{d as Se}from"./devWarning-CNIS3FrJ.js";import{m as st,f as Bt,h as Et,T as Dt}from"./Trigger-DFbfZFuJ.js";import{a as At}from"./_arrayIncludes-B8uzE354.js";import{q as ke}from"./_getTag-BVc6NQ_K.js";import{S as _t}from"./injectionKey-BXVc-oGP.js";import{O as fe}from"./Overflow-kf1mnFrM.js";import{c as _e}from"./vnode-B3Pp583L.js";import{T as Rt}from"./index-85lab9HJ.js";import{K as zt}from"./KeyCode-D63Tfrq7.js";import{w as Pe}from"./raf-Deuc0E8-.js";import{T as Xe,b2 as Ht}from"./icons-NT6gy8Ee.js";import{g as Ft,c as Lt}from"./collapseMotion-CjFH_Jop.js";import{i as Ye}from"./slide-BEnICwoX.js";import{i as Nt}from"./zoom-D-LYfiQh.js";import{a as jt}from"./OverrideContext-x9ZzjLwk.js";import"./warning-Pq00owYb.js";import"./motion-BWrP7Lz6.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./index-yhA-qP4Y.js";import"./placementArrow-P0ZA4yAK.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-B126JcB4.js";import"./initDefaultProps-CacwmJft.js";function Vt(){}var Wt=1/0,Gt=ke&&1/st(new ke([,-0]))[1]==Wt?function(t){return new ke(t)}:Vt,Xt=200;function Yt(t,n,e){var o=-1,l=At,u=t.length,c=!0,i=[],s=i;if(u>=Xt){var v=Gt(t);if(v)return st(v);c=!1,l=Et,s=new Bt}else s=i;e:for(;++o<u;){var d=t[o],a=d;if(d=d!==0?d:0,c&&a===a){for(var $=s.length;$--;)if(s[$]===a)continue e;i.push(d)}else l(s,a,e)||(s!==i&&s.push(a),i.push(d))}return i}function Be(t){return t&&t.length?Yt(t):[]}function qt(t,n,e,o){let l;if(l!==void 0)return!!l;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;const u=Object.keys(t),c=Object.keys(n);if(u.length!==c.length)return!1;const i=Object.prototype.hasOwnProperty.bind(n);for(let s=0;s<u.length;s++){const v=u[s];if(!i(v))return!1;const d=t[v],a=n[v];if(l=void 0,l===!1||l===void 0&&d!==a)return!1}return!0}function ve(t,n){return qt(We(t),We(n))}const ut=Symbol("menuContextKey"),ct=t=>{ge(ut,t)},Q=()=>de(ut),dt=Symbol("ForceRenderKey"),Ut=t=>{ge(dt,t)},mt=()=>de(dt,!1),vt=Symbol("menuFirstLevelContextKey"),ft=t=>{ge(vt,t)},Zt=()=>de(vt,!0),Ce=J({compatConfig:{MODE:3},name:"MenuContextProvider",inheritAttrs:!1,props:{mode:{type:String,default:void 0},overflowDisabled:{type:Boolean,default:void 0}},setup(t,n){let{slots:e}=n;const o=Q(),l=p({},o);return t.mode!==void 0&&(l.mode=Ge(t,"mode")),t.overflowDisabled!==void 0&&(l.overflowDisabled=Ge(t,"overflowDisabled")),ct(l),()=>{var u;return(u=e.default)===null||u===void 0?void 0:u.call(e)}}}),$e="$$__vc-menu-more__key",pt=Symbol("KeyPathContext"),Re=()=>de(pt,{parentEventKeys:m(()=>[]),parentKeys:m(()=>[]),parentInfo:{}}),Jt=(t,n,e)=>{const{parentEventKeys:o,parentKeys:l}=Re(),u=m(()=>[...o.value,t]),c=m(()=>[...l.value,n]);return ge(pt,{parentEventKeys:u,parentKeys:c,parentInfo:e}),c},gt=Symbol("measure"),qe=J({compatConfig:{MODE:3},setup(t,n){let{slots:e}=n;return ge(gt,!0),()=>{var o;return(o=e.default)===null||o===void 0?void 0:o.call(e)}}}),ze=()=>de(gt,!1);function bt(t){const{mode:n,rtl:e,inlineIndent:o}=Q();return m(()=>n.value!=="inline"?null:e.value?{paddingRight:`${t.value*o.value}px`}:{paddingLeft:`${t.value*o.value}px`})}let Qt=0;const en=()=>({id:String,role:String,disabled:Boolean,danger:Boolean,title:{type:[String,Boolean],default:void 0},icon:ye.any,onMouseenter:Function,onMouseleave:Function,onClick:Function,onKeydown:Function,onFocus:Function,originItemValue:Ae()}),pe=J({compatConfig:{MODE:3},name:"AMenuItem",inheritAttrs:!1,props:en(),slots:Object,setup(t,n){let{slots:e,emit:o,attrs:l}=n;const u=rt(),c=ze(),i=typeof u.vnode.key=="symbol"?String(u.vnode.key):u.vnode.key;Se(typeof u.vnode.key!="symbol","MenuItem",`MenuItem \`:key="${String(i)}"\` not support Symbol type`);const s=`menu_item_${++Qt}_$$_${i}`,{parentEventKeys:v,parentKeys:d}=Re(),{prefixCls:a,activeKeys:$,disabled:y,changeActiveKeys:g,rtl:C,inlineCollapsed:x,siderCollapsed:k,onItemClick:K,selectedKeys:L,registerMenuInfo:U,unRegisterMenuInfo:I}=Q(),O=Zt(),R=z(!1),_=m(()=>[...d.value,i]);U(s,{eventKey:s,key:i,parentEventKeys:v,parentKeys:d,isLeaf:!0}),Ie(()=>{I(s)}),X($,()=>{R.value=!!$.value.find(h=>h===i)},{immediate:!0});const T=m(()=>y.value||t.disabled),V=m(()=>L.value.includes(i)),W=m(()=>{const h=`${a.value}-item`;return{[`${h}`]:!0,[`${h}-danger`]:t.danger,[`${h}-active`]:R.value,[`${h}-selected`]:V.value,[`${h}-disabled`]:T.value}}),Y=h=>({key:i,eventKey:s,keyPath:_.value,eventKeyPath:[...v.value,s],domEvent:h,item:p(p({},t),l)}),ae=h=>{if(T.value)return;const E=Y(h);o("click",h),K(E)},re=h=>{T.value||(g(_.value),o("mouseenter",h))},ee=h=>{T.value||(g([]),o("mouseleave",h))},te=h=>{if(o("keydown",h),h.which===zt.ENTER){const E=Y(h);o("click",h),K(E)}},se=h=>{g(_.value),o("focus",h)},N=(h,E)=>{const H=f("span",{class:`${a.value}-title-content`},[E]);return(!h||it(E)&&E.type==="span")&&E&&x.value&&O&&typeof E=="string"?f("div",{class:`${a.value}-inline-collapsed-noicon`},[E.charAt(0)]):H},me=bt(m(()=>_.value.length));return()=>{var h,E,H,Z,ne;if(c)return null;const q=(h=t.title)!==null&&h!==void 0?h:(E=e.title)===null||E===void 0?void 0:E.call(e),r=lt((H=e.default)===null||H===void 0?void 0:H.call(e)),b=r.length;let M=q;typeof q>"u"?M=O&&b?r:"":q===!1&&(M="");const P={title:M};!k.value&&!x.value&&(P.title=null,P.open=!1);const D={};t.role==="option"&&(D["aria-selected"]=V.value);const w=(Z=t.icon)!==null&&Z!==void 0?Z:(ne=e.icon)===null||ne===void 0?void 0:ne.call(e,t);return f(Rt,B(B({},P),{},{placement:C.value?"left":"right",overlayClassName:`${a.value}-inline-collapsed-tooltip`}),{default:()=>[f(fe.Item,B(B(B({component:"li"},l),{},{id:t.id,style:p(p({},l.style||{}),me.value),class:[W.value,{[`${l.class}`]:!!l.class,[`${a.value}-item-only-child`]:(w?b+1:b)===1}],role:t.role||"menuitem",tabindex:t.disabled?null:-1,"data-menu-id":i,"aria-disabled":t.disabled},D),{},{onMouseenter:re,onMouseleave:ee,onClick:ae,onKeydown:te,onFocus:se,title:typeof q=="string"?q:void 0}),{default:()=>[_e(typeof w=="function"?w(t.originItemValue):w,{class:`${a.value}-item-icon`},!1),N(w,r)]})]})}}}),le={adjustX:1,adjustY:1},tn={topLeft:{points:["bl","tl"],overflow:le,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:le,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:le,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:le,offset:[4,0]}},nn={topLeft:{points:["bl","tl"],overflow:le,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:le,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:le,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:le,offset:[4,0]}},on={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Ue=J({compatConfig:{MODE:3},name:"PopupTrigger",inheritAttrs:!1,props:{prefixCls:String,mode:String,visible:Boolean,popupClassName:String,popupOffset:Array,disabled:Boolean,onVisibleChange:Function},slots:Object,emits:["visibleChange"],setup(t,n){let{slots:e,emit:o}=n;const l=z(!1),{getPopupContainer:u,rtl:c,subMenuOpenDelay:i,subMenuCloseDelay:s,builtinPlacements:v,triggerSubMenuAction:d,forceSubMenuRender:a,motion:$,defaultMotions:y,rootClassName:g}=Q(),C=mt(),x=m(()=>c.value?p(p({},nn),v.value):p(p({},tn),v.value)),k=m(()=>on[t.mode]),K=z();X(()=>t.visible,I=>{Pe.cancel(K.value),K.value=Pe(()=>{l.value=I})},{immediate:!0}),Ie(()=>{Pe.cancel(K.value)});const L=I=>{o("visibleChange",I)},U=m(()=>{var I,O;const R=$.value||((I=y.value)===null||I===void 0?void 0:I[t.mode])||((O=y.value)===null||O===void 0?void 0:O.other),_=typeof R=="function"?R():R;return _?ht(_.name,{css:!0}):void 0});return()=>{const{prefixCls:I,popupClassName:O,mode:R,popupOffset:_,disabled:j}=t;return f(Dt,{prefixCls:I,popupClassName:he(`${I}-popup`,{[`${I}-rtl`]:c.value},O,g.value),stretch:R==="horizontal"?"minWidth":null,getPopupContainer:u.value,builtinPlacements:x.value,popupPlacement:k.value,popupVisible:l.value,popupAlign:_&&{offset:_},action:j?[]:[d.value],mouseEnterDelay:i.value,mouseLeaveDelay:s.value,onPopupVisibleChange:L,forceRender:C||a.value,popupAnimation:U.value},{popup:e.popup,default:e.default})}}}),He=(t,n)=>{let{slots:e,attrs:o}=n;var l;const{prefixCls:u,mode:c}=Q();return f("ul",B(B({},o),{},{class:he(u.value,`${u.value}-sub`,`${u.value}-${c.value==="inline"?"inline":"vertical"}`),"data-menu-list":!0}),[(l=e.default)===null||l===void 0?void 0:l.call(e)])};He.displayName="SubMenuList";const ln=J({compatConfig:{MODE:3},name:"InlineSubMenuList",inheritAttrs:!1,props:{id:String,open:Boolean,keyPath:Array},setup(t,n){let{slots:e}=n;const o=m(()=>"inline"),{motion:l,mode:u,defaultMotions:c}=Q(),i=m(()=>u.value===o.value),s=F(!i.value),v=m(()=>i.value?t.open:!1);X(u,()=>{i.value&&(s.value=!1)},{flush:"post"});const d=m(()=>{var a,$;const y=l.value||((a=c.value)===null||a===void 0?void 0:a[o.value])||(($=c.value)===null||$===void 0?void 0:$.other),g=typeof y=="function"?y():y;return p(p({},g),{appear:t.keyPath.length<=1})});return()=>{var a;return s.value?null:f(Ce,{mode:o.value},{default:()=>[f(Kt,d.value,{default:()=>[Ot(f(He,{id:t.id},{default:()=>[(a=e.default)===null||a===void 0?void 0:a.call(e)]}),[[Tt,v.value]])]})]})}}});let Ze=0;const an=()=>({icon:ye.any,title:ye.any,disabled:Boolean,level:Number,popupClassName:String,popupOffset:Array,internalPopupClose:Boolean,eventKey:String,expandIcon:Function,theme:String,onMouseenter:Function,onMouseleave:Function,onTitleClick:Function,originItemValue:Ae()}),ce=J({compatConfig:{MODE:3},name:"ASubMenu",inheritAttrs:!1,props:an(),slots:Object,setup(t,n){let{slots:e,attrs:o,emit:l}=n;var u,c;ft(!1);const i=ze(),s=rt(),v=typeof s.vnode.key=="symbol"?String(s.vnode.key):s.vnode.key;Se(typeof s.vnode.key!="symbol","SubMenu",`SubMenu \`:key="${String(v)}"\` not support Symbol type`);const d=Ne(v)?v:`sub_menu_${++Ze}_$$_not_set_key`,a=(u=t.eventKey)!==null&&u!==void 0?u:Ne(v)?`sub_menu_${++Ze}_$$_${v}`:d,{parentEventKeys:$,parentInfo:y,parentKeys:g}=Re(),C=m(()=>[...g.value,d]),x=z([]),k={eventKey:a,key:d,parentEventKeys:$,childrenEventKeys:x,parentKeys:g};(c=y.childrenEventKeys)===null||c===void 0||c.value.push(a),Ie(()=>{var S;y.childrenEventKeys&&(y.childrenEventKeys.value=(S=y.childrenEventKeys)===null||S===void 0?void 0:S.value.filter(A=>A!=a))}),Jt(a,d,k);const{prefixCls:K,activeKeys:L,disabled:U,changeActiveKeys:I,mode:O,inlineCollapsed:R,openKeys:_,overflowDisabled:j,onOpenChange:T,registerMenuInfo:V,unRegisterMenuInfo:W,selectedSubMenuKeys:Y,expandIcon:ae,theme:re}=Q(),ee=v!=null,te=!i&&(mt()||!ee);Ut(te),(i&&ee||!i&&!ee||te)&&(V(a,k),Ie(()=>{W(a)}));const se=m(()=>`${K.value}-submenu`),N=m(()=>U.value||t.disabled),me=z(),h=z(),E=m(()=>_.value.includes(d)),H=m(()=>!j.value&&E.value),Z=m(()=>Y.value.includes(d)),ne=z(!1);X(L,()=>{ne.value=!!L.value.find(S=>S===d)},{immediate:!0});const q=S=>{N.value||(l("titleClick",S,d),O.value==="inline"&&T(d,!E.value))},r=S=>{N.value||(I(C.value),l("mouseenter",S))},b=S=>{N.value||(I([]),l("mouseleave",S))},M=bt(m(()=>C.value.length)),P=S=>{O.value!=="inline"&&T(d,S)},D=()=>{I(C.value)},w=a&&`${a}-popup`,G=m(()=>he(K.value,`${K.value}-${t.theme||re.value}`,t.popupClassName)),ue=(S,A)=>{if(!A)return R.value&&!g.value.length&&S&&typeof S=="string"?f("div",{class:`${K.value}-inline-collapsed-noicon`},[S.charAt(0)]):f("span",{class:`${K.value}-title-content`},[S]);const oe=it(S)&&S.type==="span";return f(Ee,null,[_e(typeof A=="function"?A(t.originItemValue):A,{class:`${K.value}-item-icon`},!1),oe?S:f("span",{class:`${K.value}-title-content`},[S])])},we=m(()=>O.value!=="inline"&&C.value.length>1?"vertical":O.value),$t=m(()=>O.value==="horizontal"?"vertical":O.value),yt=m(()=>we.value==="horizontal"?"vertical":we.value),Fe=()=>{var S,A;const oe=se.value,Ke=(S=t.icon)!==null&&S!==void 0?S:(A=e.icon)===null||A===void 0?void 0:A.call(e,t),Le=t.expandIcon||e.expandIcon||ae.value,Oe=ue(at(e,t,"title"),Ke);return f("div",{style:M.value,class:`${oe}-title`,tabindex:N.value?null:-1,ref:me,title:typeof Oe=="string"?Oe:null,"data-menu-id":d,"aria-expanded":H.value,"aria-haspopup":!0,"aria-controls":w,"aria-disabled":N.value,onClick:q,onFocus:D},[Oe,O.value!=="horizontal"&&Le?Le(p(p({},t),{isOpen:H.value})):f("i",{class:`${oe}-arrow`},null)])};return()=>{var S;if(i)return ee?(S=e.default)===null||S===void 0?void 0:S.call(e):null;const A=se.value;let oe=()=>null;if(!j.value&&O.value!=="inline"){const Ke=O.value==="horizontal"?[0,8]:[10,0];oe=()=>f(Ue,{mode:we.value,prefixCls:A,visible:!t.internalPopupClose&&H.value,popupClassName:G.value,popupOffset:t.popupOffset||Ke,disabled:N.value,onVisibleChange:P},{default:()=>[Fe()],popup:()=>f(Ce,{mode:yt.value},{default:()=>[f(He,{id:w,ref:h},{default:e.default})]})})}else oe=()=>f(Ue,null,{default:Fe});return f(Ce,{mode:$t.value},{default:()=>[f(fe.Item,B(B({component:"li"},o),{},{role:"none",class:he(A,`${A}-${O.value}`,o.class,{[`${A}-open`]:H.value,[`${A}-active`]:ne.value,[`${A}-selected`]:Z.value,[`${A}-disabled`]:N.value}),onMouseenter:r,onMouseleave:b,"data-submenu-id":d}),{default:()=>f(Ee,null,[oe(),!j.value&&f(ln,{id:w,open:H.value,keyPath:C.value},{default:e.default})])})]})}}}),rn=()=>({title:ye.any,originItemValue:Ae()}),xe=J({compatConfig:{MODE:3},name:"AMenuItemGroup",inheritAttrs:!1,props:rn(),slots:Object,setup(t,n){let{slots:e,attrs:o}=n;const{prefixCls:l}=Q(),u=m(()=>`${l.value}-item-group`),c=ze();return()=>{var i,s;return c?(i=e.default)===null||i===void 0?void 0:i.call(e):f("li",B(B({},o),{},{onClick:v=>v.stopPropagation(),class:u.value}),[f("div",{title:typeof t.title=="string"?t.title:void 0,class:`${u.value}-title`},[at(e,t,"title")]),f("ul",{class:`${u.value}-list`},[(s=e.default)===null||s===void 0?void 0:s.call(e)])])}}}),sn=()=>({prefixCls:String,dashed:Boolean}),Me=J({compatConfig:{MODE:3},name:"AMenuDivider",props:sn(),setup(t){const{prefixCls:n}=Q(),e=m(()=>({[`${n.value}-item-divider`]:!0,[`${n.value}-item-divider-dashed`]:!!t.dashed}));return()=>f("li",{class:e.value},null)}});var un=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(t);l<o.length;l++)n.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(t,o[l])&&(e[o[l]]=t[o[l]]);return e};function De(t,n,e){return(t||[]).map((o,l)=>{if(o&&typeof o=="object"){const u=o,{label:c,children:i,key:s,type:v}=u,d=un(u,["label","children","key","type"]),a=s??`tmp-${l}`,$=e?e.parentKeys.slice():[],y=[],g={eventKey:a,key:a,parentEventKeys:F($),parentKeys:F($),childrenEventKeys:F(y),isLeaf:!1};if(i||v==="group"){if(v==="group"){const x=De(i,n,e);return f(xe,B(B({key:a},d),{},{title:c,originItemValue:o}),{default:()=>[x]})}n.set(a,g),e&&e.childrenEventKeys.push(a);const C=De(i,n,{childrenEventKeys:y,parentKeys:[].concat($,a)});return f(ce,B(B({key:a},d),{},{title:c,originItemValue:o}),{default:()=>[C]})}return v==="divider"?f(Me,B({key:a},d),null):(g.isLeaf=!0,n.set(a,g),f(pe,B(B({key:a},d),{},{originItemValue:o}),{default:()=>[c]}))}return null}).filter(o=>o)}function cn(t){const n=z([]),e=z(!1),o=z(new Map);return X(()=>t.items,()=>{const l=new Map;e.value=!1,t.items?(e.value=!0,n.value=De(t.items,l)):n.value=void 0,o.value=l},{immediate:!0,deep:!0}),{itemsNodes:n,store:o,hasItmes:e}}const dn=t=>{const{componentCls:n,motionDurationSlow:e,menuHorizontalHeight:o,colorSplit:l,lineWidth:u,lineType:c,menuItemPaddingInline:i}=t;return{[`${n}-horizontal`]:{lineHeight:`${o}px`,border:0,borderBottom:`${u}px ${c} ${l}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${n}-item, ${n}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:i},[`> ${n}-item:hover,
|
|
1
|
+
import{h as p,J as lt,f as B,U as it,P as ye,t as Ae,i as he,g as ht,aq as Ne,ac as at,an as It,X as St,l as Ct,m as je,o as Ve,r as xt,af as Mt,q as wt}from"./index-CEbbycgJ.js";import{z as We,i as de,d as J,a8 as Ge,p as ge,f as m,e as Ie,w as X,c as f,g as rt,s as z,r as F,a4 as Kt,a2 as Ot,a3 as Tt,F as Ee,o as kt,b as Te,u as be,v as Pt}from"./vendor-M5lGV-wr.js";import{d as Se}from"./devWarning-CNIS3FrJ.js";import{m as st,f as Bt,h as Et,T as Dt}from"./Trigger-kYPQmm6P.js";import{a as At}from"./_arrayIncludes-B8uzE354.js";import{q as ke}from"./_getTag-BVc6NQ_K.js";import{S as _t}from"./injectionKey-BXVc-oGP.js";import{O as fe}from"./Overflow-Cm7ISeJl.js";import{c as _e}from"./vnode-BQi3uWRC.js";import{T as Rt}from"./index-B0KxtBNy.js";import{K as zt}from"./KeyCode-D63Tfrq7.js";import{w as Pe}from"./raf-Deuc0E8-.js";import{T as Xe,b2 as Ht}from"./icons-NT6gy8Ee.js";import{g as Ft,c as Lt}from"./collapseMotion-CjFH_Jop.js";import{i as Ye}from"./slide-DSvqah_S.js";import{i as Nt}from"./zoom-DaW-jbu7.js";import{a as jt}from"./OverrideContext-x9ZzjLwk.js";import"./warning-Pq00owYb.js";import"./motion-DFuREFOd.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./index-LQYz2tRO.js";import"./placementArrow-BlP2AN9q.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-qf63Eax9.js";import"./initDefaultProps-CAgx2aHm.js";function Vt(){}var Wt=1/0,Gt=ke&&1/st(new ke([,-0]))[1]==Wt?function(t){return new ke(t)}:Vt,Xt=200;function Yt(t,n,e){var o=-1,l=At,u=t.length,c=!0,i=[],s=i;if(u>=Xt){var v=Gt(t);if(v)return st(v);c=!1,l=Et,s=new Bt}else s=i;e:for(;++o<u;){var d=t[o],a=d;if(d=d!==0?d:0,c&&a===a){for(var $=s.length;$--;)if(s[$]===a)continue e;i.push(d)}else l(s,a,e)||(s!==i&&s.push(a),i.push(d))}return i}function Be(t){return t&&t.length?Yt(t):[]}function qt(t,n,e,o){let l;if(l!==void 0)return!!l;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;const u=Object.keys(t),c=Object.keys(n);if(u.length!==c.length)return!1;const i=Object.prototype.hasOwnProperty.bind(n);for(let s=0;s<u.length;s++){const v=u[s];if(!i(v))return!1;const d=t[v],a=n[v];if(l=void 0,l===!1||l===void 0&&d!==a)return!1}return!0}function ve(t,n){return qt(We(t),We(n))}const ut=Symbol("menuContextKey"),ct=t=>{ge(ut,t)},Q=()=>de(ut),dt=Symbol("ForceRenderKey"),Ut=t=>{ge(dt,t)},mt=()=>de(dt,!1),vt=Symbol("menuFirstLevelContextKey"),ft=t=>{ge(vt,t)},Zt=()=>de(vt,!0),Ce=J({compatConfig:{MODE:3},name:"MenuContextProvider",inheritAttrs:!1,props:{mode:{type:String,default:void 0},overflowDisabled:{type:Boolean,default:void 0}},setup(t,n){let{slots:e}=n;const o=Q(),l=p({},o);return t.mode!==void 0&&(l.mode=Ge(t,"mode")),t.overflowDisabled!==void 0&&(l.overflowDisabled=Ge(t,"overflowDisabled")),ct(l),()=>{var u;return(u=e.default)===null||u===void 0?void 0:u.call(e)}}}),$e="$$__vc-menu-more__key",pt=Symbol("KeyPathContext"),Re=()=>de(pt,{parentEventKeys:m(()=>[]),parentKeys:m(()=>[]),parentInfo:{}}),Jt=(t,n,e)=>{const{parentEventKeys:o,parentKeys:l}=Re(),u=m(()=>[...o.value,t]),c=m(()=>[...l.value,n]);return ge(pt,{parentEventKeys:u,parentKeys:c,parentInfo:e}),c},gt=Symbol("measure"),qe=J({compatConfig:{MODE:3},setup(t,n){let{slots:e}=n;return ge(gt,!0),()=>{var o;return(o=e.default)===null||o===void 0?void 0:o.call(e)}}}),ze=()=>de(gt,!1);function bt(t){const{mode:n,rtl:e,inlineIndent:o}=Q();return m(()=>n.value!=="inline"?null:e.value?{paddingRight:`${t.value*o.value}px`}:{paddingLeft:`${t.value*o.value}px`})}let Qt=0;const en=()=>({id:String,role:String,disabled:Boolean,danger:Boolean,title:{type:[String,Boolean],default:void 0},icon:ye.any,onMouseenter:Function,onMouseleave:Function,onClick:Function,onKeydown:Function,onFocus:Function,originItemValue:Ae()}),pe=J({compatConfig:{MODE:3},name:"AMenuItem",inheritAttrs:!1,props:en(),slots:Object,setup(t,n){let{slots:e,emit:o,attrs:l}=n;const u=rt(),c=ze(),i=typeof u.vnode.key=="symbol"?String(u.vnode.key):u.vnode.key;Se(typeof u.vnode.key!="symbol","MenuItem",`MenuItem \`:key="${String(i)}"\` not support Symbol type`);const s=`menu_item_${++Qt}_$$_${i}`,{parentEventKeys:v,parentKeys:d}=Re(),{prefixCls:a,activeKeys:$,disabled:y,changeActiveKeys:g,rtl:C,inlineCollapsed:x,siderCollapsed:k,onItemClick:K,selectedKeys:L,registerMenuInfo:U,unRegisterMenuInfo:I}=Q(),O=Zt(),R=z(!1),_=m(()=>[...d.value,i]);U(s,{eventKey:s,key:i,parentEventKeys:v,parentKeys:d,isLeaf:!0}),Ie(()=>{I(s)}),X($,()=>{R.value=!!$.value.find(h=>h===i)},{immediate:!0});const T=m(()=>y.value||t.disabled),V=m(()=>L.value.includes(i)),W=m(()=>{const h=`${a.value}-item`;return{[`${h}`]:!0,[`${h}-danger`]:t.danger,[`${h}-active`]:R.value,[`${h}-selected`]:V.value,[`${h}-disabled`]:T.value}}),Y=h=>({key:i,eventKey:s,keyPath:_.value,eventKeyPath:[...v.value,s],domEvent:h,item:p(p({},t),l)}),ae=h=>{if(T.value)return;const E=Y(h);o("click",h),K(E)},re=h=>{T.value||(g(_.value),o("mouseenter",h))},ee=h=>{T.value||(g([]),o("mouseleave",h))},te=h=>{if(o("keydown",h),h.which===zt.ENTER){const E=Y(h);o("click",h),K(E)}},se=h=>{g(_.value),o("focus",h)},N=(h,E)=>{const H=f("span",{class:`${a.value}-title-content`},[E]);return(!h||it(E)&&E.type==="span")&&E&&x.value&&O&&typeof E=="string"?f("div",{class:`${a.value}-inline-collapsed-noicon`},[E.charAt(0)]):H},me=bt(m(()=>_.value.length));return()=>{var h,E,H,Z,ne;if(c)return null;const q=(h=t.title)!==null&&h!==void 0?h:(E=e.title)===null||E===void 0?void 0:E.call(e),r=lt((H=e.default)===null||H===void 0?void 0:H.call(e)),b=r.length;let M=q;typeof q>"u"?M=O&&b?r:"":q===!1&&(M="");const P={title:M};!k.value&&!x.value&&(P.title=null,P.open=!1);const D={};t.role==="option"&&(D["aria-selected"]=V.value);const w=(Z=t.icon)!==null&&Z!==void 0?Z:(ne=e.icon)===null||ne===void 0?void 0:ne.call(e,t);return f(Rt,B(B({},P),{},{placement:C.value?"left":"right",overlayClassName:`${a.value}-inline-collapsed-tooltip`}),{default:()=>[f(fe.Item,B(B(B({component:"li"},l),{},{id:t.id,style:p(p({},l.style||{}),me.value),class:[W.value,{[`${l.class}`]:!!l.class,[`${a.value}-item-only-child`]:(w?b+1:b)===1}],role:t.role||"menuitem",tabindex:t.disabled?null:-1,"data-menu-id":i,"aria-disabled":t.disabled},D),{},{onMouseenter:re,onMouseleave:ee,onClick:ae,onKeydown:te,onFocus:se,title:typeof q=="string"?q:void 0}),{default:()=>[_e(typeof w=="function"?w(t.originItemValue):w,{class:`${a.value}-item-icon`},!1),N(w,r)]})]})}}}),le={adjustX:1,adjustY:1},tn={topLeft:{points:["bl","tl"],overflow:le,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:le,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:le,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:le,offset:[4,0]}},nn={topLeft:{points:["bl","tl"],overflow:le,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:le,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:le,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:le,offset:[4,0]}},on={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Ue=J({compatConfig:{MODE:3},name:"PopupTrigger",inheritAttrs:!1,props:{prefixCls:String,mode:String,visible:Boolean,popupClassName:String,popupOffset:Array,disabled:Boolean,onVisibleChange:Function},slots:Object,emits:["visibleChange"],setup(t,n){let{slots:e,emit:o}=n;const l=z(!1),{getPopupContainer:u,rtl:c,subMenuOpenDelay:i,subMenuCloseDelay:s,builtinPlacements:v,triggerSubMenuAction:d,forceSubMenuRender:a,motion:$,defaultMotions:y,rootClassName:g}=Q(),C=mt(),x=m(()=>c.value?p(p({},nn),v.value):p(p({},tn),v.value)),k=m(()=>on[t.mode]),K=z();X(()=>t.visible,I=>{Pe.cancel(K.value),K.value=Pe(()=>{l.value=I})},{immediate:!0}),Ie(()=>{Pe.cancel(K.value)});const L=I=>{o("visibleChange",I)},U=m(()=>{var I,O;const R=$.value||((I=y.value)===null||I===void 0?void 0:I[t.mode])||((O=y.value)===null||O===void 0?void 0:O.other),_=typeof R=="function"?R():R;return _?ht(_.name,{css:!0}):void 0});return()=>{const{prefixCls:I,popupClassName:O,mode:R,popupOffset:_,disabled:j}=t;return f(Dt,{prefixCls:I,popupClassName:he(`${I}-popup`,{[`${I}-rtl`]:c.value},O,g.value),stretch:R==="horizontal"?"minWidth":null,getPopupContainer:u.value,builtinPlacements:x.value,popupPlacement:k.value,popupVisible:l.value,popupAlign:_&&{offset:_},action:j?[]:[d.value],mouseEnterDelay:i.value,mouseLeaveDelay:s.value,onPopupVisibleChange:L,forceRender:C||a.value,popupAnimation:U.value},{popup:e.popup,default:e.default})}}}),He=(t,n)=>{let{slots:e,attrs:o}=n;var l;const{prefixCls:u,mode:c}=Q();return f("ul",B(B({},o),{},{class:he(u.value,`${u.value}-sub`,`${u.value}-${c.value==="inline"?"inline":"vertical"}`),"data-menu-list":!0}),[(l=e.default)===null||l===void 0?void 0:l.call(e)])};He.displayName="SubMenuList";const ln=J({compatConfig:{MODE:3},name:"InlineSubMenuList",inheritAttrs:!1,props:{id:String,open:Boolean,keyPath:Array},setup(t,n){let{slots:e}=n;const o=m(()=>"inline"),{motion:l,mode:u,defaultMotions:c}=Q(),i=m(()=>u.value===o.value),s=F(!i.value),v=m(()=>i.value?t.open:!1);X(u,()=>{i.value&&(s.value=!1)},{flush:"post"});const d=m(()=>{var a,$;const y=l.value||((a=c.value)===null||a===void 0?void 0:a[o.value])||(($=c.value)===null||$===void 0?void 0:$.other),g=typeof y=="function"?y():y;return p(p({},g),{appear:t.keyPath.length<=1})});return()=>{var a;return s.value?null:f(Ce,{mode:o.value},{default:()=>[f(Kt,d.value,{default:()=>[Ot(f(He,{id:t.id},{default:()=>[(a=e.default)===null||a===void 0?void 0:a.call(e)]}),[[Tt,v.value]])]})]})}}});let Ze=0;const an=()=>({icon:ye.any,title:ye.any,disabled:Boolean,level:Number,popupClassName:String,popupOffset:Array,internalPopupClose:Boolean,eventKey:String,expandIcon:Function,theme:String,onMouseenter:Function,onMouseleave:Function,onTitleClick:Function,originItemValue:Ae()}),ce=J({compatConfig:{MODE:3},name:"ASubMenu",inheritAttrs:!1,props:an(),slots:Object,setup(t,n){let{slots:e,attrs:o,emit:l}=n;var u,c;ft(!1);const i=ze(),s=rt(),v=typeof s.vnode.key=="symbol"?String(s.vnode.key):s.vnode.key;Se(typeof s.vnode.key!="symbol","SubMenu",`SubMenu \`:key="${String(v)}"\` not support Symbol type`);const d=Ne(v)?v:`sub_menu_${++Ze}_$$_not_set_key`,a=(u=t.eventKey)!==null&&u!==void 0?u:Ne(v)?`sub_menu_${++Ze}_$$_${v}`:d,{parentEventKeys:$,parentInfo:y,parentKeys:g}=Re(),C=m(()=>[...g.value,d]),x=z([]),k={eventKey:a,key:d,parentEventKeys:$,childrenEventKeys:x,parentKeys:g};(c=y.childrenEventKeys)===null||c===void 0||c.value.push(a),Ie(()=>{var S;y.childrenEventKeys&&(y.childrenEventKeys.value=(S=y.childrenEventKeys)===null||S===void 0?void 0:S.value.filter(A=>A!=a))}),Jt(a,d,k);const{prefixCls:K,activeKeys:L,disabled:U,changeActiveKeys:I,mode:O,inlineCollapsed:R,openKeys:_,overflowDisabled:j,onOpenChange:T,registerMenuInfo:V,unRegisterMenuInfo:W,selectedSubMenuKeys:Y,expandIcon:ae,theme:re}=Q(),ee=v!=null,te=!i&&(mt()||!ee);Ut(te),(i&&ee||!i&&!ee||te)&&(V(a,k),Ie(()=>{W(a)}));const se=m(()=>`${K.value}-submenu`),N=m(()=>U.value||t.disabled),me=z(),h=z(),E=m(()=>_.value.includes(d)),H=m(()=>!j.value&&E.value),Z=m(()=>Y.value.includes(d)),ne=z(!1);X(L,()=>{ne.value=!!L.value.find(S=>S===d)},{immediate:!0});const q=S=>{N.value||(l("titleClick",S,d),O.value==="inline"&&T(d,!E.value))},r=S=>{N.value||(I(C.value),l("mouseenter",S))},b=S=>{N.value||(I([]),l("mouseleave",S))},M=bt(m(()=>C.value.length)),P=S=>{O.value!=="inline"&&T(d,S)},D=()=>{I(C.value)},w=a&&`${a}-popup`,G=m(()=>he(K.value,`${K.value}-${t.theme||re.value}`,t.popupClassName)),ue=(S,A)=>{if(!A)return R.value&&!g.value.length&&S&&typeof S=="string"?f("div",{class:`${K.value}-inline-collapsed-noicon`},[S.charAt(0)]):f("span",{class:`${K.value}-title-content`},[S]);const oe=it(S)&&S.type==="span";return f(Ee,null,[_e(typeof A=="function"?A(t.originItemValue):A,{class:`${K.value}-item-icon`},!1),oe?S:f("span",{class:`${K.value}-title-content`},[S])])},we=m(()=>O.value!=="inline"&&C.value.length>1?"vertical":O.value),$t=m(()=>O.value==="horizontal"?"vertical":O.value),yt=m(()=>we.value==="horizontal"?"vertical":we.value),Fe=()=>{var S,A;const oe=se.value,Ke=(S=t.icon)!==null&&S!==void 0?S:(A=e.icon)===null||A===void 0?void 0:A.call(e,t),Le=t.expandIcon||e.expandIcon||ae.value,Oe=ue(at(e,t,"title"),Ke);return f("div",{style:M.value,class:`${oe}-title`,tabindex:N.value?null:-1,ref:me,title:typeof Oe=="string"?Oe:null,"data-menu-id":d,"aria-expanded":H.value,"aria-haspopup":!0,"aria-controls":w,"aria-disabled":N.value,onClick:q,onFocus:D},[Oe,O.value!=="horizontal"&&Le?Le(p(p({},t),{isOpen:H.value})):f("i",{class:`${oe}-arrow`},null)])};return()=>{var S;if(i)return ee?(S=e.default)===null||S===void 0?void 0:S.call(e):null;const A=se.value;let oe=()=>null;if(!j.value&&O.value!=="inline"){const Ke=O.value==="horizontal"?[0,8]:[10,0];oe=()=>f(Ue,{mode:we.value,prefixCls:A,visible:!t.internalPopupClose&&H.value,popupClassName:G.value,popupOffset:t.popupOffset||Ke,disabled:N.value,onVisibleChange:P},{default:()=>[Fe()],popup:()=>f(Ce,{mode:yt.value},{default:()=>[f(He,{id:w,ref:h},{default:e.default})]})})}else oe=()=>f(Ue,null,{default:Fe});return f(Ce,{mode:$t.value},{default:()=>[f(fe.Item,B(B({component:"li"},o),{},{role:"none",class:he(A,`${A}-${O.value}`,o.class,{[`${A}-open`]:H.value,[`${A}-active`]:ne.value,[`${A}-selected`]:Z.value,[`${A}-disabled`]:N.value}),onMouseenter:r,onMouseleave:b,"data-submenu-id":d}),{default:()=>f(Ee,null,[oe(),!j.value&&f(ln,{id:w,open:H.value,keyPath:C.value},{default:e.default})])})]})}}}),rn=()=>({title:ye.any,originItemValue:Ae()}),xe=J({compatConfig:{MODE:3},name:"AMenuItemGroup",inheritAttrs:!1,props:rn(),slots:Object,setup(t,n){let{slots:e,attrs:o}=n;const{prefixCls:l}=Q(),u=m(()=>`${l.value}-item-group`),c=ze();return()=>{var i,s;return c?(i=e.default)===null||i===void 0?void 0:i.call(e):f("li",B(B({},o),{},{onClick:v=>v.stopPropagation(),class:u.value}),[f("div",{title:typeof t.title=="string"?t.title:void 0,class:`${u.value}-title`},[at(e,t,"title")]),f("ul",{class:`${u.value}-list`},[(s=e.default)===null||s===void 0?void 0:s.call(e)])])}}}),sn=()=>({prefixCls:String,dashed:Boolean}),Me=J({compatConfig:{MODE:3},name:"AMenuDivider",props:sn(),setup(t){const{prefixCls:n}=Q(),e=m(()=>({[`${n.value}-item-divider`]:!0,[`${n.value}-item-divider-dashed`]:!!t.dashed}));return()=>f("li",{class:e.value},null)}});var un=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(t);l<o.length;l++)n.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(t,o[l])&&(e[o[l]]=t[o[l]]);return e};function De(t,n,e){return(t||[]).map((o,l)=>{if(o&&typeof o=="object"){const u=o,{label:c,children:i,key:s,type:v}=u,d=un(u,["label","children","key","type"]),a=s??`tmp-${l}`,$=e?e.parentKeys.slice():[],y=[],g={eventKey:a,key:a,parentEventKeys:F($),parentKeys:F($),childrenEventKeys:F(y),isLeaf:!1};if(i||v==="group"){if(v==="group"){const x=De(i,n,e);return f(xe,B(B({key:a},d),{},{title:c,originItemValue:o}),{default:()=>[x]})}n.set(a,g),e&&e.childrenEventKeys.push(a);const C=De(i,n,{childrenEventKeys:y,parentKeys:[].concat($,a)});return f(ce,B(B({key:a},d),{},{title:c,originItemValue:o}),{default:()=>[C]})}return v==="divider"?f(Me,B({key:a},d),null):(g.isLeaf=!0,n.set(a,g),f(pe,B(B({key:a},d),{},{originItemValue:o}),{default:()=>[c]}))}return null}).filter(o=>o)}function cn(t){const n=z([]),e=z(!1),o=z(new Map);return X(()=>t.items,()=>{const l=new Map;e.value=!1,t.items?(e.value=!0,n.value=De(t.items,l)):n.value=void 0,o.value=l},{immediate:!0,deep:!0}),{itemsNodes:n,store:o,hasItmes:e}}const dn=t=>{const{componentCls:n,motionDurationSlow:e,menuHorizontalHeight:o,colorSplit:l,lineWidth:u,lineType:c,menuItemPaddingInline:i}=t;return{[`${n}-horizontal`]:{lineHeight:`${o}px`,border:0,borderBottom:`${u}px ${c} ${l}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${n}-item, ${n}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:i},[`> ${n}-item:hover,
|
|
2
2
|
> ${n}-item-active,
|
|
3
3
|
> ${n}-submenu ${n}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${n}-item, ${n}-submenu-title`]:{transition:[`border-color ${e}`,`background ${e}`].join(",")},[`${n}-submenu-arrow`]:{display:"none"}}}},mn=t=>{let{componentCls:n,menuArrowOffset:e}=t;return{[`${n}-rtl`]:{direction:"rtl"},[`${n}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${n}-rtl${n}-vertical,
|
|
4
4
|
${n}-submenu-rtl ${n}-vertical`]:{[`${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${e})`},"&::after":{transform:`rotate(45deg) translateY(${e})`}}}}},Je=t=>p({},It(t)),Qe=(t,n)=>{const{componentCls:e,colorItemText:o,colorItemTextSelected:l,colorGroupTitle:u,colorItemBg:c,colorSubItemBg:i,colorItemBgSelected:s,colorActiveBarHeight:v,colorActiveBarWidth:d,colorActiveBarBorderSize:a,motionDurationSlow:$,motionEaseInOut:y,motionEaseOut:g,menuItemPaddingInline:C,motionDurationMid:x,colorItemTextHover:k,lineType:K,colorSplit:L,colorItemTextDisabled:U,colorDangerItemText:I,colorDangerItemTextHover:O,colorDangerItemTextSelected:R,colorDangerItemBgActive:_,colorDangerItemBgSelected:j,colorItemBgHover:T,menuSubMenuBg:V,colorItemTextSelectedHorizontal:W,colorItemBgSelectedHorizontal:Y}=t;return{[`${e}-${n}`]:{color:o,background:c,[`&${e}-root:focus-visible`]:p({},Je(t)),[`${e}-item-group-title`]:{color:u},[`${e}-submenu-selected`]:{[`> ${e}-submenu-title`]:{color:l}},[`${e}-item-disabled, ${e}-submenu-disabled`]:{color:`${U} !important`},[`${e}-item:hover, ${e}-submenu-title:hover`]:{[`&:not(${e}-item-selected):not(${e}-submenu-selected)`]:{color:k}},[`&:not(${e}-horizontal)`]:{[`${e}-item:not(${e}-item-selected)`]:{"&:hover":{backgroundColor:T},"&:active":{backgroundColor:s}},[`${e}-submenu-title`]:{"&:hover":{backgroundColor:T},"&:active":{backgroundColor:s}}},[`${e}-item-danger`]:{color:I,[`&${e}-item:hover`]:{[`&:not(${e}-item-selected):not(${e}-submenu-selected)`]:{color:O}},[`&${e}-item:active`]:{background:_}},[`${e}-item a`]:{"&, &:hover":{color:"inherit"}},[`${e}-item-selected`]:{color:l,[`&${e}-item-danger`]:{color:R},"a, a:hover":{color:"inherit"}},[`& ${e}-item-selected`]:{backgroundColor:s,[`&${e}-item-danger`]:{backgroundColor:j}},[`${e}-item, ${e}-submenu-title`]:{[`&:not(${e}-item-disabled):focus-visible`]:p({},Je(t))},[`&${e}-submenu > ${e}`]:{backgroundColor:V},[`&${e}-popup > ${e}`]:{backgroundColor:c},[`&${e}-horizontal`]:p(p({},n==="dark"?{borderBottom:0}:{}),{[`> ${e}-item, > ${e}-submenu`]:{top:a,marginTop:-a,marginBottom:0,borderRadius:0,"&::after":{position:"absolute",insetInline:C,bottom:0,borderBottom:`${v}px solid transparent`,transition:`border-color ${$} ${y}`,content:'""'},"&:hover, &-active, &-open":{"&::after":{borderBottomWidth:v,borderBottomColor:W}},"&-selected":{color:W,backgroundColor:Y,"&::after":{borderBottomWidth:v,borderBottomColor:W}}}}),[`&${e}-root`]:{[`&${e}-inline, &${e}-vertical`]:{borderInlineEnd:`${a}px ${K} ${L}`}},[`&${e}-inline`]:{[`${e}-sub${e}-inline`]:{background:i},[`${e}-item, ${e}-submenu-title`]:a&&d?{width:`calc(100% + ${a}px)`}:{},[`${e}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${d}px solid ${l}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${x} ${g}`,`opacity ${x} ${g}`].join(","),content:'""'},[`&${e}-item-danger`]:{"&::after":{borderInlineEndColor:R}}},[`${e}-selected, ${e}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${x} ${y}`,`opacity ${x} ${y}`].join(",")}}}}}},et=t=>{const{componentCls:n,menuItemHeight:e,itemMarginInline:o,padding:l,menuArrowSize:u,marginXS:c,marginXXS:i}=t,s=l+u+c;return{[`${n}-item`]:{position:"relative"},[`${n}-item, ${n}-submenu-title`]:{height:e,lineHeight:`${e}px`,paddingInline:l,overflow:"hidden",textOverflow:"ellipsis",marginInline:o,marginBlock:i,width:`calc(100% - ${o*2}px)`},[`${n}-submenu`]:{paddingBottom:.02},[`> ${n}-item,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as o}from"./Row-BWLfAhHC.js";import{S as t}from"./index-CEbbycgJ.js";import"./responsiveObserve-DuI2xGQd.js";import"./vendor-M5lGV-wr.js";import"./useFlexGapSupport-BD4Xr9XU.js";import"./styleChecker-Br0YrCOO.js";import"./index-CSCb-EY9.js";import"./icons-NT6gy8Ee.js";const l=t(o);export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as V,M as k,h as p,f as N,G as q,P as F,O as I,i as L}from"./index-
|
|
1
|
+
import{q as V,M as k,h as p,f as N,G as q,P as F,O as I,i as L}from"./index-CEbbycgJ.js";import{u as W}from"./useFlexGapSupport-BD4Xr9XU.js";import{a as H,C as h}from"./Compact-CQR4QsWP.js";import{d as J,w as K,c as v,F as Q,r as j,f as o}from"./vendor-M5lGV-wr.js";import"./icons-NT6gy8Ee.js";import"./styleChecker-Br0YrCOO.js";import"./createContext-C8Lwrn-C.js";import"./_getTag-BVc6NQ_K.js";const U={small:8,middle:16,large:24},X=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:F.oneOf(I("horizontal","vertical")).def("horizontal"),align:F.oneOf(I("start","end","center","baseline")),wrap:q()});function Y(e){return typeof e=="string"?U[e]:e||0}const d=J({compatConfig:{MODE:3},name:"ASpace",inheritAttrs:!1,props:X(),slots:Object,setup(e,B){let{slots:r,attrs:f}=B;const{prefixCls:l,space:g,direction:x}=V("space",e),[P,D]=H(l),z=W(),n=o(()=>{var t,a,i;return(i=(t=e.size)!==null&&t!==void 0?t:(a=g?.value)===null||a===void 0?void 0:a.size)!==null&&i!==void 0?i:"small"}),y=j(),s=j();K(n,()=>{[y.value,s.value]=(Array.isArray(n.value)?n.value:[n.value,n.value]).map(t=>Y(t))},{immediate:!0});const C=o(()=>e.align===void 0&&e.direction==="horizontal"?"center":e.align),E=o(()=>L(l.value,D.value,`${l.value}-${e.direction}`,{[`${l.value}-rtl`]:x.value==="rtl",[`${l.value}-align-${C.value}`]:C.value})),M=o(()=>x.value==="rtl"?"marginLeft":"marginRight"),R=o(()=>{const t={};return z.value&&(t.columnGap=`${y.value}px`,t.rowGap=`${s.value}px`),p(p({},t),e.wrap&&{flexWrap:"wrap",marginBottom:`${-s.value}px`})});return()=>{var t,a;const{wrap:i,direction:T="horizontal"}=e,b=(t=r.default)===null||t===void 0?void 0:t.call(r),w=k(b),_=w.length;if(_===0)return null;const c=(a=r.split)===null||a===void 0?void 0:a.call(r),A=`${l.value}-item`,O=y.value,S=_-1;return v("div",N(N({},f),{},{class:[E.value,f.class],style:[R.value,f.style]}),[w.map((G,u)=>{let $=b.indexOf(G);$===-1&&($=`$$space-${u}`);let m={};return z.value||(T==="vertical"?u<S&&(m={marginBottom:`${O/(c?2:1)}px`}):m=p(p({},u<S&&{[M.value]:`${O/(c?2:1)}px`}),i&&{paddingBottom:`${s.value}px`})),P(v(Q,{key:$},[v("div",{class:A,style:m},[G]),u<S&&c&&v("span",{class:`${A}-split`,style:m},[c])]))})])}}});d.Compact=h;d.install=function(e){return e.component(d.name,d),e.component(h.name,h),e};export{h as Compact,d as default,X as spaceProps};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as f,i as R,U as $e,f as P,P as g,a6 as Ce,aj as Y,av as Ve,l as Be,m as we,r as Me,S as Te,q as Pe,V as z,a0 as D,G as N,$ as He,t as Oe}from"./index-DY5Oc3z6.js";import{B as q}from"./Trigger-DFbfZFuJ.js";import{c as B,d as I,o as ke,e as ie,s as Z,f as le,w as Fe,aa as Le,r as U}from"./vendor-M5lGV-wr.js";import{s as ue,a as G}from"./motion-BWrP7Lz6.js";import{K as E}from"./KeyCode-D63Tfrq7.js";import{i as de}from"./initDefaultProps-CacwmJft.js";import{T as Ne,b as Ee}from"./index-85lab9HJ.js";import{w as ee}from"./raf-Deuc0E8-.js";import{a as De}from"./FormItemContext-D_HGU4aA.js";import{T as je}from"./icons-NT6gy8Ee.js";import"./vnode-B3Pp583L.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-BVc6NQ_K.js";import"./placementArrow-P0ZA4yAK.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-B126JcB4.js";import"./zoom-D-LYfiQh.js";import"./createContext-xLJXI46O.js";const J=(e,o)=>{let{attrs:t}=o;const{included:n,vertical:s,style:a,class:r}=t;let{length:i,offset:l,reverse:u}=t;i<0&&(u=!u,i=Math.abs(i),l=100-l);const d=s?{[u?"top":"bottom"]:`${l}%`,[u?"bottom":"top"]:"auto",height:`${i}%`}:{[u?"right":"left"]:`${l}%`,[u?"left":"right"]:"auto",width:`${i}%`},m=f(f({},a),d);return n?B("div",{class:r,style:m},null):null};J.inheritAttrs=!1;const Re=(e,o,t,n,s,a)=>{const r=Object.keys(o).map(parseFloat).sort((i,l)=>i-l);if(t&&n)for(let i=s;i<=a;i+=n)r.indexOf(i)===-1&&r.push(i);return r},ce=(e,o)=>{let{attrs:t}=o;const{prefixCls:n,vertical:s,reverse:a,marks:r,dots:i,step:l,included:u,lowerBound:d,upperBound:m,max:b,min:C,dotStyle:y,activeDotStyle:w}=t,h=b-C,S=Re(s,r,i,l,C,b).map(c=>{const $=`${Math.abs(c-C)/h*100}%`,V=!u&&c===m||u&&c<=m&&c>=d;let x=s?f(f({},y),{[a?"top":"bottom"]:$}):f(f({},y),{[a?"right":"left"]:$});V&&(x=f(f({},x),w));const v=R({[`${n}-dot`]:!0,[`${n}-dot-active`]:V,[`${n}-dot-reverse`]:a});return B("span",{class:v,style:x,key:c},null)});return B("div",{class:`${n}-step`},[S])};ce.inheritAttrs=!1;const he=(e,o)=>{let{attrs:t,slots:n}=o;const{class:s,vertical:a,reverse:r,marks:i,included:l,upperBound:u,lowerBound:d,max:m,min:b,onClickLabel:C}=t,y=Object.keys(i),w=n.mark,h=m-b,S=y.map(parseFloat).sort((c,$)=>c-$).map(c=>{const $=typeof i[c]=="function"?i[c]():i[c],V=typeof $=="object"&&!$e($);let x=V?$.label:$;if(!x&&x!==0)return null;w&&(x=w({point:c,label:x}));const v=!l&&c===u||l&&c<=u&&c>=d,p=R({[`${s}-text`]:!0,[`${s}-text-active`]:v}),M={marginBottom:"-50%",[r?"top":"bottom"]:`${(c-b)/h*100}%`},O={transform:`translateX(${r?"50%":"-50%"})`,msTransform:`translateX(${r?"50%":"-50%"})`,[r?"right":"left"]:`${(c-b)/h*100}%`},T=a?M:O,L=V?f(f({},T),$.style):T,H={[ue?"onTouchstartPassive":"onTouchstart"]:k=>C(k,c)};return B("span",P({class:p,style:L,key:c,onMousedown:k=>C(k,c)},H),[x])});return B("div",{class:s},[S])};he.inheritAttrs=!1;const fe=I({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(e,o){let{attrs:t,emit:n,expose:s}=o;const a=Z(!1),r=Z(),i=()=>{document.activeElement===r.value&&(a.value=!0)},l=h=>{a.value=!1,n("blur",h)},u=()=>{a.value=!1},d=()=>{var h;(h=r.value)===null||h===void 0||h.focus()},m=()=>{var h;(h=r.value)===null||h===void 0||h.blur()},b=()=>{a.value=!0,d()},C=h=>{h.preventDefault(),d(),n("mousedown",h)};s({focus:d,blur:m,clickFocus:b,ref:r});let y=null;ke(()=>{y=G(document,"mouseup",i)}),ie(()=>{y?.remove()});const w=le(()=>{const{vertical:h,offset:S,reverse:c}=e;return h?{[c?"top":"bottom"]:`${S}%`,[c?"bottom":"top"]:"auto",transform:c?null:"translateY(+50%)"}:{[c?"right":"left"]:`${S}%`,[c?"left":"right"]:"auto",transform:`translateX(${c?"+":"-"}50%)`}});return()=>{const{prefixCls:h,disabled:S,min:c,max:$,value:V,tabindex:x,ariaLabel:v,ariaLabelledBy:p,ariaValueTextFormatter:M,onMouseenter:O,onMouseleave:T}=e,L=R(t.class,{[`${h}-handle-click-focused`]:a.value}),H={"aria-valuemin":c,"aria-valuemax":$,"aria-valuenow":V,"aria-disabled":!!S},k=[t.style,w.value];let F=x||0;(S||x===null)&&(F=null);let W;M&&(W=M(V));const K=f(f(f(f({},t),{role:"slider",tabindex:F}),H),{class:L,onBlur:l,onKeydown:u,onMousedown:C,onMouseenter:O,onMouseleave:T,ref:r,style:k});return B("div",P(P({},K),{},{"aria-label":v,"aria-labelledby":p,"aria-valuetext":W}),null)}}});function X(e,o){try{return Object.keys(o).some(t=>e.target===o[t].ref)}catch{return!1}}function pe(e,o){let{min:t,max:n}=o;return e<t||e>n}function te(e){return e.touches.length>1||e.type.toLowerCase()==="touchend"&&e.touches.length>0}function ne(e,o){let{marks:t,step:n,min:s,max:a}=o;const r=Object.keys(t).map(parseFloat);if(n!==null){const l=Math.pow(10,me(n)),u=Math.floor((a*l-s*l)/(n*l)),d=Math.min((e-s)/n,u),m=Math.round(d)*n+s;r.push(m)}const i=r.map(l=>Math.abs(e-l));return r[i.indexOf(Math.min(...i))]}function me(e){const o=e.toString();let t=0;return o.indexOf(".")>=0&&(t=o.length-o.indexOf(".")-1),t}function oe(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.clientY:o.pageX)/t}function se(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.touches[0].clientY:o.touches[0].pageX)/t}function ae(e,o){const t=o.getBoundingClientRect();return e?t.top+t.height*.5:window.scrollX+t.left+t.width*.5}function Q(e,o){let{max:t,min:n}=o;return e<=n?n:e>=t?t:e}function ge(e,o){const{step:t}=o,n=isFinite(ne(e,o))?ne(e,o):0;return t===null?n:parseFloat(n.toFixed(me(t)))}function A(e){e.stopPropagation(),e.preventDefault()}function ze(e,o,t){const n={increase:(r,i)=>r+i,decrease:(r,i)=>r-i},s=n[e](Object.keys(t.marks).indexOf(JSON.stringify(o)),1),a=Object.keys(t.marks)[s];return t.step?n[e](o,t.step):Object.keys(t.marks).length&&t.marks[a]?t.marks[a]:o}function ve(e,o,t){const n="increase",s="decrease";let a=n;switch(e.keyCode){case E.UP:a=o&&t?s:n;break;case E.RIGHT:a=!o&&t?s:n;break;case E.DOWN:a=o&&t?n:s;break;case E.LEFT:a=!o&&t?n:s;break;case E.END:return(r,i)=>i.max;case E.HOME:return(r,i)=>i.min;case E.PAGE_UP:return(r,i)=>r+i.step*2;case E.PAGE_DOWN:return(r,i)=>r-i.step*2;default:return}return(r,i)=>ze(a,r,i)}var Ae=function(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)o.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(t[n[s]]=e[n[s]]);return t};function j(){}function be(e){const o={id:String,min:Number,max:Number,step:Number,marks:g.object,included:{type:Boolean,default:void 0},prefixCls:String,disabled:{type:Boolean,default:void 0},handle:Function,dots:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},minimumTrackStyle:g.object,maximumTrackStyle:g.object,handleStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),trackStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),railStyle:g.object,dotStyle:g.object,activeDotStyle:g.object,autofocus:{type:Boolean,default:void 0},draggableTrack:{type:Boolean,default:void 0}};return I({compatConfig:{MODE:3},name:"CreateSlider",mixins:[q,e],inheritAttrs:!1,props:de(o,{prefixCls:"rc-slider",min:0,max:100,step:1,marks:{},included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),emits:["change","blur","focus"],data(){const{step:t,max:n,min:s}=this;return this.handlesRefs={},{}},mounted(){this.$nextTick(()=>{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:t,disabled:n}=this;t&&!n&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(t){var{index:n,directives:s,className:a,style:r}=t,i=Ae(t,["index","directives","className","style"]);if(delete i.dragging,i.value===null)return null;const l=f(f({},i),{class:a,style:r,key:n});return B(fe,l,null)},onDown(t,n){let s=n;const{draggableTrack:a,vertical:r}=this.$props,{bounds:i}=this.$data,l=a&&this.positionGetValue?this.positionGetValue(s)||[]:[],u=X(t,this.handlesRefs);if(this.dragTrack=a&&i.length>=2&&!u&&!l.map((d,m)=>{const b=m?!0:d>=i[m];return m===l.length-1?d<=i[m]:b}).some(d=>!d),this.dragTrack)this.dragOffset=s,this.startBounds=[...i];else{if(!u)this.dragOffset=0;else{const d=ae(r,t.target);this.dragOffset=s-d,s=d}this.onStart(s)}},onMouseDown(t){if(t.button!==0)return;this.removeDocumentEvents();const n=this.$props.vertical,s=oe(n,t);this.onDown(t,s),this.addDocumentMouseEvents()},onTouchStart(t){if(te(t))return;const n=this.vertical,s=se(n,t);this.onDown(t,s),this.addDocumentTouchEvents(),A(t)},onFocus(t){const{vertical:n}=this;if(X(t,this.handlesRefs)&&!this.dragTrack){const s=ae(n,t.target);this.dragOffset=0,this.onStart(s),A(t),this.$emit("focus",t)}},onBlur(t){this.dragTrack||this.onEnd(),this.$emit("blur",t)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(t){if(!this.sliderRef){this.onEnd();return}const n=oe(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(t){if(te(t)||!this.sliderRef){this.onEnd();return}const n=se(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(t){this.sliderRef&&X(t,this.handlesRefs)&&this.onKeyboard(t)},onClickMarkLabel(t,n){t.stopPropagation(),this.onChange({sValue:n}),this.setState({sValue:n},()=>this.onEnd(!0))},getSliderStart(){const t=this.sliderRef,{vertical:n,reverse:s}=this,a=t.getBoundingClientRect();return n?s?a.bottom:a.top:window.scrollX+(s?a.right:a.left)},getSliderLength(){const t=this.sliderRef;if(!t)return 0;const n=t.getBoundingClientRect();return this.vertical?n.height:n.width},addDocumentTouchEvents(){this.onTouchMoveListener=G(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=G(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=G(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=G(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var t;this.$props.disabled||(t=this.handlesRefs[0])===null||t===void 0||t.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(t=>{var n,s;(s=(n=this.handlesRefs[t])===null||n===void 0?void 0:n.blur)===null||s===void 0||s.call(n)})},calcValue(t){const{vertical:n,min:s,max:a}=this,r=Math.abs(Math.max(t,0)/this.getSliderLength());return n?(1-r)*(a-s)+s:r*(a-s)+s},calcValueByPos(t){const s=(this.reverse?-1:1)*(t-this.getSliderStart());return this.trimAlignValue(this.calcValue(s))},calcOffset(t){const{min:n,max:s}=this,a=(t-n)/(s-n);return Math.max(0,a*100)},saveSlider(t){this.sliderRef=t},saveHandle(t,n){this.handlesRefs[t]=n}},render(){const{prefixCls:t,marks:n,dots:s,step:a,included:r,disabled:i,vertical:l,reverse:u,min:d,max:m,maximumTrackStyle:b,railStyle:C,dotStyle:y,activeDotStyle:w,id:h}=this,{class:S,style:c}=this.$attrs,{tracks:$,handles:V}=this.renderSlider(),x=R(t,S,{[`${t}-with-marks`]:Object.keys(n).length,[`${t}-disabled`]:i,[`${t}-vertical`]:l,[`${t}-horizontal`]:!l}),v={vertical:l,marks:n,included:r,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:d,reverse:u,class:`${t}-mark`,onClickLabel:i?j:this.onClickMarkLabel},p={[ue?"onTouchstartPassive":"onTouchstart"]:i?j:this.onTouchStart};return B("div",P(P({id:h,ref:this.saveSlider,tabindex:"-1",class:x},p),{},{onMousedown:i?j:this.onMouseDown,onMouseup:i?j:this.onMouseUp,onKeydown:i?j:this.onKeyDown,onFocus:i?j:this.onFocus,onBlur:i?j:this.onBlur,style:c}),[B("div",{class:`${t}-rail`,style:f(f({},b),C)},null),$,B(ce,{prefixCls:t,vertical:l,reverse:u,marks:n,dots:s,step:a,included:r,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:d,dotStyle:y,activeDotStyle:w},null),V,B(he,v,{mark:this.$slots.mark}),Ce(this)])}})}const Ie=I({compatConfig:{MODE:3},name:"Slider",mixins:[q],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const e=this.defaultValue!==void 0?this.defaultValue:this.min,o=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(o),dragging:!1}},watch:{value:{handler(e){this.setChangeValue(e)},deep:!0},min(){const{sValue:e}=this;this.setChangeValue(e)},max(){const{sValue:e}=this;this.setChangeValue(e)}},methods:{setChangeValue(e){const o=e!==void 0?e:this.sValue,t=this.trimAlignValue(o,this.$props);t!==this.sValue&&(this.setState({sValue:t}),pe(o,this.$props)&&this.$emit("change",t))},onChange(e){const o=!Y(this,"value"),t=e.sValue>this.max?f(f({},e),{sValue:this.max}):e;o&&this.setState(t);const n=t.sValue;this.$emit("change",n)},onStart(e){this.setState({dragging:!0});const{sValue:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e,t!==o&&(this.prevMovedHandleIndex=0,this.onChange({sValue:t}))},onEnd(e){const{dragging:o}=this;this.removeDocumentEvents(),(o||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(e,o){A(e);const{sValue:t}=this,n=this.calcValueByPos(o);n!==t&&this.onChange({sValue:n})},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{sValue:s}=this,a=n(s,this.$props),r=this.trimAlignValue(a);if(r===s)return;this.onChange({sValue:r}),this.$emit("afterChange",r),this.onEnd()}},getLowerBound(){const e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound(){return this.$data.sValue<this.$props.startPoint?this.$props.startPoint:this.$data.sValue},trimAlignValue(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;const t=f(f({},this.$props),o),n=Q(e,t);return ge(n,t)},getTrack(e){let{prefixCls:o,reverse:t,vertical:n,included:s,minimumTrackStyle:a,mergedTrackStyle:r,length:i,offset:l}=e;return B(J,{class:`${o}-track`,vertical:n,included:s,offset:l,reverse:t,length:i,style:f(f({},a),r)},null)},renderSlider(){const{prefixCls:e,vertical:o,included:t,disabled:n,minimumTrackStyle:s,trackStyle:a,handleStyle:r,tabindex:i,ariaLabelForHandle:l,ariaLabelledByForHandle:u,ariaValueTextFormatterForHandle:d,min:m,max:b,startPoint:C,reverse:y,handle:w,defaultHandle:h}=this,S=w||h,{sValue:c,dragging:$}=this,V=this.calcOffset(c),x=S({class:`${e}-handle`,prefixCls:e,vertical:o,offset:V,value:c,dragging:$,disabled:n,min:m,max:b,reverse:y,index:0,tabindex:i,ariaLabel:l,ariaLabelledBy:u,ariaValueTextFormatter:d,style:r[0]||r,ref:M=>this.saveHandle(0,M),onFocus:this.onFocus,onBlur:this.onBlur}),v=C!==void 0?this.calcOffset(C):0,p=a[0]||a;return{tracks:this.getTrack({prefixCls:e,reverse:y,vertical:o,included:t,offset:v,minimumTrackStyle:s,mergedTrackStyle:p,length:V-v}),handles:x}}}}),We=be(Ie),_=e=>{let{value:o,handle:t,bounds:n,props:s}=e;const{allowCross:a,pushable:r}=s,i=Number(r),l=Q(o,s);let u=l;return!a&&t!=null&&n!==void 0&&(t>0&&l<=n[t-1]+i&&(u=n[t-1]+i),t<n.length-1&&l>=n[t+1]-i&&(u=n[t+1]-i)),ge(u,s)},_e={defaultValue:g.arrayOf(g.number),value:g.arrayOf(g.number),count:Number,pushable:Ve(g.oneOfType([g.looseBool,g.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:g.arrayOf(g.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},Ge=I({compatConfig:{MODE:3},name:"Range",mixins:[q],inheritAttrs:!1,props:de(_e,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:e,min:o,max:t}=this,n=Array(...Array(e+1)).map(()=>o),s=Y(this,"defaultValue")?this.defaultValue:n;let{value:a}=this;a===void 0&&(a=s);const r=a.map((l,u)=>_({value:l,handle:u,props:this.$props}));return{sHandle:null,recent:r[0]===t?0:r.length-1,bounds:r}},watch:{value:{handler(e){const{bounds:o}=this;this.setChangeValue(e||o)},deep:!0},min(){const{value:e}=this;this.setChangeValue(e||this.bounds)},max(){const{value:e}=this;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue(e){const{bounds:o}=this;let t=e.map((n,s)=>_({value:n,handle:s,bounds:o,props:this.$props}));if(o.length===t.length){if(t.every((n,s)=>n===o[s]))return null}else t=e.map((n,s)=>_({value:n,handle:s,props:this.$props}));if(this.setState({bounds:t}),e.some(n=>pe(n,this.$props))){const n=e.map(s=>Q(s,this.$props));this.$emit("change",n)}},onChange(e){if(!Y(this,"value"))this.setState(e);else{const s={};["sHandle","recent"].forEach(a=>{e[a]!==void 0&&(s[a]=e[a])}),Object.keys(s).length&&this.setState(s)}const n=f(f({},this.$data),e).bounds;this.$emit("change",n)},positionGetValue(e){const o=this.getValue(),t=this.calcValueByPos(e),n=this.getClosestBound(t),s=this.getBoundNeedMoving(t,n),a=o[s];if(t===a)return null;const r=[...o];return r[s]=t,r},onStart(e){const{bounds:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e;const n=this.getClosestBound(t);this.prevMovedHandleIndex=this.getBoundNeedMoving(t,n),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const s=o[this.prevMovedHandleIndex];if(t===s)return;const a=[...o];a[this.prevMovedHandleIndex]=t,this.onChange({bounds:a})},onEnd(e){const{sHandle:o}=this;this.removeDocumentEvents(),o||(this.dragTrack=!1),(o!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(e,o,t,n){A(e);const{$data:s,$props:a}=this,r=a.max||100,i=a.min||0;if(t){let b=a.vertical?-o:o;b=a.reverse?-b:b;const C=r-Math.max(...n),y=i-Math.min(...n),w=Math.min(Math.max(b/(this.getSliderLength()/100),y),C),h=n.map(S=>Math.floor(Math.max(Math.min(S+w,r),i)));s.bounds.map((S,c)=>S===h[c]).some(S=>!S)&&this.onChange({bounds:h});return}const{bounds:l,sHandle:u}=this,d=this.calcValueByPos(o),m=l[u];d!==m&&this.moveTo(d)},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{bounds:s,sHandle:a}=this,r=s[a===null?this.recent:a],i=n(r,this.$props),l=_({value:i,handle:a,bounds:s,props:this.$props});if(l===r)return;this.moveTo(l,!0)}},getClosestBound(e){const{bounds:o}=this;let t=0;for(let n=1;n<o.length-1;n+=1)e>=o[n]&&(t=n);return Math.abs(o[t+1]-e)<Math.abs(o[t]-e)&&(t+=1),t},getBoundNeedMoving(e,o){const{bounds:t,recent:n}=this;let s=o;const a=t[o+1]===t[o];return a&&t[n]===t[o]&&(s=n),a&&e!==t[o+1]&&(s=e<t[o+1]?o:o+1),s},getLowerBound(){return this.bounds[0]},getUpperBound(){const{bounds:e}=this;return e[e.length-1]},getPoints(){const{marks:e,step:o,min:t,max:n}=this,s=this.internalPointsCache;if(!s||s.marks!==e||s.step!==o){const a=f({},e);if(o!==null)for(let i=t;i<=n;i+=o)a[i]=i;const r=Object.keys(a).map(parseFloat);r.sort((i,l)=>i-l),this.internalPointsCache={marks:e,step:o,points:r}}return this.internalPointsCache.points},moveTo(e,o){const t=[...this.bounds],{sHandle:n,recent:s}=this,a=n===null?s:n;t[a]=e;let r=a;this.$props.pushable!==!1?this.pushSurroundingHandles(t,r):this.$props.allowCross&&(t.sort((i,l)=>i-l),r=t.indexOf(e)),this.onChange({recent:r,sHandle:r,bounds:t}),o&&(this.$emit("afterChange",t),this.setState({},()=>{this.handlesRefs[r].focus()}),this.onEnd())},pushSurroundingHandles(e,o){const t=e[o],{pushable:n}=this,s=Number(n);let a=0;if(e[o+1]-t<s&&(a=1),t-e[o-1]<s&&(a=-1),a===0)return;const r=o+a,i=a*(e[r]-t);this.pushHandle(e,r,a,s-i)||(e[o]=e[r]-a*s)},pushHandle(e,o,t,n){const s=e[o];let a=e[o];for(;t*(a-s)<n;){if(!this.pushHandleOnePoint(e,o,t))return e[o]=s,!1;a=e[o]}return!0},pushHandleOnePoint(e,o,t){const n=this.getPoints(),a=n.indexOf(e[o])+t;if(a>=n.length||a<0)return!1;const r=o+t,i=n[a],{pushable:l}=this,u=Number(l),d=t*(e[r]-i);return this.pushHandle(e,r,t,u-d)?(e[o]=i,!0):!1},trimAlignValue(e){const{sHandle:o,bounds:t}=this;return _({value:e,handle:o,bounds:t,props:this.$props})},ensureValueNotConflict(e,o,t){let{allowCross:n,pushable:s}=t;const a=this.$data||{},{bounds:r}=a;if(e=e===void 0?a.sHandle:e,s=Number(s),!n&&e!=null&&r!==void 0){if(e>0&&o<=r[e-1]+s)return r[e-1]+s;if(e<r.length-1&&o>=r[e+1]-s)return r[e+1]-s}return o},getTrack(e){let{bounds:o,prefixCls:t,reverse:n,vertical:s,included:a,offsets:r,trackStyle:i}=e;return o.slice(0,-1).map((l,u)=>{const d=u+1,m=R({[`${t}-track`]:!0,[`${t}-track-${d}`]:!0});return B(J,{class:m,vertical:s,reverse:n,included:a,offset:r[d-1],length:r[d]-r[d-1],style:i[u],key:d},null)})},renderSlider(){const{sHandle:e,bounds:o,prefixCls:t,vertical:n,included:s,disabled:a,min:r,max:i,reverse:l,handle:u,defaultHandle:d,trackStyle:m,handleStyle:b,tabindex:C,ariaLabelGroupForHandles:y,ariaLabelledByGroupForHandles:w,ariaValueTextFormatterGroupForHandles:h}=this,S=u||d,c=o.map(x=>this.calcOffset(x)),$=`${t}-handle`,V=o.map((x,v)=>{let p=C[v]||0;(a||C[v]===null)&&(p=null);const M=e===v;return S({class:R({[$]:!0,[`${$}-${v+1}`]:!0,[`${$}-dragging`]:M}),prefixCls:t,vertical:n,dragging:M,offset:c[v],value:x,index:v,tabindex:p,min:r,max:i,reverse:l,disabled:a,style:b[v],ref:O=>this.saveHandle(v,O),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:y[v],ariaLabelledBy:w[v],ariaValueTextFormatter:h[v]})});return{tracks:this.getTrack({bounds:o,prefixCls:t,reverse:l,vertical:n,included:s,offsets:c,trackStyle:m}),handles:V}}}}),Ue=be(Ge),Ke=I({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:Ee(),setup(e,o){let{attrs:t,slots:n}=o;const s=U(null),a=U(null);function r(){ee.cancel(a.value),a.value=null}function i(){a.value=ee(()=>{var u;(u=s.value)===null||u===void 0||u.forcePopupAlign(),a.value=null})}const l=()=>{r(),e.open&&i()};return Fe([()=>e.open,()=>e.title],()=>{l()},{flush:"post",immediate:!0}),Le(()=>{l()}),ie(()=>{r()}),()=>B(Ne,P(P({ref:s},e),t),n)}}),Xe=e=>{const{componentCls:o,controlSize:t,dotSize:n,marginFull:s,marginPart:a,colorFillContentHover:r}=e;return{[o]:f(f({},Me(e)),{position:"relative",height:t,margin:`${a}px ${s}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${s}px ${a}px`},[`${o}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${o}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${o}-rail`]:{backgroundColor:e.colorFillSecondary},[`${o}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${o}-dot`]:{borderColor:r},[`${o}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${o}-dot-active`]:{borderColor:e.colorPrimary}},[`${o}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${o}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:`
|
|
1
|
+
import{h as f,i as R,U as $e,f as P,P as g,a6 as Ce,aj as Y,av as Ve,l as Be,m as we,r as Me,S as Te,q as Pe,V as z,a0 as D,G as N,$ as He,t as Oe}from"./index-CEbbycgJ.js";import{B as q}from"./Trigger-kYPQmm6P.js";import{c as B,d as I,o as ke,e as ie,s as Z,f as le,w as Fe,aa as Le,r as U}from"./vendor-M5lGV-wr.js";import{s as ue,a as G}from"./motion-DFuREFOd.js";import{K as E}from"./KeyCode-D63Tfrq7.js";import{i as de}from"./initDefaultProps-CAgx2aHm.js";import{T as Ne,b as Ee}from"./index-B0KxtBNy.js";import{w as ee}from"./raf-Deuc0E8-.js";import{a as De}from"./FormItemContext-EopsCGez.js";import{T as je}from"./icons-NT6gy8Ee.js";import"./vnode-BQi3uWRC.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-BVc6NQ_K.js";import"./placementArrow-BlP2AN9q.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-qf63Eax9.js";import"./zoom-DaW-jbu7.js";import"./createContext-C8Lwrn-C.js";const J=(e,o)=>{let{attrs:t}=o;const{included:n,vertical:s,style:a,class:r}=t;let{length:i,offset:l,reverse:u}=t;i<0&&(u=!u,i=Math.abs(i),l=100-l);const d=s?{[u?"top":"bottom"]:`${l}%`,[u?"bottom":"top"]:"auto",height:`${i}%`}:{[u?"right":"left"]:`${l}%`,[u?"left":"right"]:"auto",width:`${i}%`},m=f(f({},a),d);return n?B("div",{class:r,style:m},null):null};J.inheritAttrs=!1;const Re=(e,o,t,n,s,a)=>{const r=Object.keys(o).map(parseFloat).sort((i,l)=>i-l);if(t&&n)for(let i=s;i<=a;i+=n)r.indexOf(i)===-1&&r.push(i);return r},ce=(e,o)=>{let{attrs:t}=o;const{prefixCls:n,vertical:s,reverse:a,marks:r,dots:i,step:l,included:u,lowerBound:d,upperBound:m,max:b,min:C,dotStyle:y,activeDotStyle:w}=t,h=b-C,S=Re(s,r,i,l,C,b).map(c=>{const $=`${Math.abs(c-C)/h*100}%`,V=!u&&c===m||u&&c<=m&&c>=d;let x=s?f(f({},y),{[a?"top":"bottom"]:$}):f(f({},y),{[a?"right":"left"]:$});V&&(x=f(f({},x),w));const v=R({[`${n}-dot`]:!0,[`${n}-dot-active`]:V,[`${n}-dot-reverse`]:a});return B("span",{class:v,style:x,key:c},null)});return B("div",{class:`${n}-step`},[S])};ce.inheritAttrs=!1;const he=(e,o)=>{let{attrs:t,slots:n}=o;const{class:s,vertical:a,reverse:r,marks:i,included:l,upperBound:u,lowerBound:d,max:m,min:b,onClickLabel:C}=t,y=Object.keys(i),w=n.mark,h=m-b,S=y.map(parseFloat).sort((c,$)=>c-$).map(c=>{const $=typeof i[c]=="function"?i[c]():i[c],V=typeof $=="object"&&!$e($);let x=V?$.label:$;if(!x&&x!==0)return null;w&&(x=w({point:c,label:x}));const v=!l&&c===u||l&&c<=u&&c>=d,p=R({[`${s}-text`]:!0,[`${s}-text-active`]:v}),M={marginBottom:"-50%",[r?"top":"bottom"]:`${(c-b)/h*100}%`},O={transform:`translateX(${r?"50%":"-50%"})`,msTransform:`translateX(${r?"50%":"-50%"})`,[r?"right":"left"]:`${(c-b)/h*100}%`},T=a?M:O,L=V?f(f({},T),$.style):T,H={[ue?"onTouchstartPassive":"onTouchstart"]:k=>C(k,c)};return B("span",P({class:p,style:L,key:c,onMousedown:k=>C(k,c)},H),[x])});return B("div",{class:s},[S])};he.inheritAttrs=!1;const fe=I({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(e,o){let{attrs:t,emit:n,expose:s}=o;const a=Z(!1),r=Z(),i=()=>{document.activeElement===r.value&&(a.value=!0)},l=h=>{a.value=!1,n("blur",h)},u=()=>{a.value=!1},d=()=>{var h;(h=r.value)===null||h===void 0||h.focus()},m=()=>{var h;(h=r.value)===null||h===void 0||h.blur()},b=()=>{a.value=!0,d()},C=h=>{h.preventDefault(),d(),n("mousedown",h)};s({focus:d,blur:m,clickFocus:b,ref:r});let y=null;ke(()=>{y=G(document,"mouseup",i)}),ie(()=>{y?.remove()});const w=le(()=>{const{vertical:h,offset:S,reverse:c}=e;return h?{[c?"top":"bottom"]:`${S}%`,[c?"bottom":"top"]:"auto",transform:c?null:"translateY(+50%)"}:{[c?"right":"left"]:`${S}%`,[c?"left":"right"]:"auto",transform:`translateX(${c?"+":"-"}50%)`}});return()=>{const{prefixCls:h,disabled:S,min:c,max:$,value:V,tabindex:x,ariaLabel:v,ariaLabelledBy:p,ariaValueTextFormatter:M,onMouseenter:O,onMouseleave:T}=e,L=R(t.class,{[`${h}-handle-click-focused`]:a.value}),H={"aria-valuemin":c,"aria-valuemax":$,"aria-valuenow":V,"aria-disabled":!!S},k=[t.style,w.value];let F=x||0;(S||x===null)&&(F=null);let W;M&&(W=M(V));const K=f(f(f(f({},t),{role:"slider",tabindex:F}),H),{class:L,onBlur:l,onKeydown:u,onMousedown:C,onMouseenter:O,onMouseleave:T,ref:r,style:k});return B("div",P(P({},K),{},{"aria-label":v,"aria-labelledby":p,"aria-valuetext":W}),null)}}});function X(e,o){try{return Object.keys(o).some(t=>e.target===o[t].ref)}catch{return!1}}function pe(e,o){let{min:t,max:n}=o;return e<t||e>n}function te(e){return e.touches.length>1||e.type.toLowerCase()==="touchend"&&e.touches.length>0}function ne(e,o){let{marks:t,step:n,min:s,max:a}=o;const r=Object.keys(t).map(parseFloat);if(n!==null){const l=Math.pow(10,me(n)),u=Math.floor((a*l-s*l)/(n*l)),d=Math.min((e-s)/n,u),m=Math.round(d)*n+s;r.push(m)}const i=r.map(l=>Math.abs(e-l));return r[i.indexOf(Math.min(...i))]}function me(e){const o=e.toString();let t=0;return o.indexOf(".")>=0&&(t=o.length-o.indexOf(".")-1),t}function oe(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.clientY:o.pageX)/t}function se(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.touches[0].clientY:o.touches[0].pageX)/t}function ae(e,o){const t=o.getBoundingClientRect();return e?t.top+t.height*.5:window.scrollX+t.left+t.width*.5}function Q(e,o){let{max:t,min:n}=o;return e<=n?n:e>=t?t:e}function ge(e,o){const{step:t}=o,n=isFinite(ne(e,o))?ne(e,o):0;return t===null?n:parseFloat(n.toFixed(me(t)))}function A(e){e.stopPropagation(),e.preventDefault()}function ze(e,o,t){const n={increase:(r,i)=>r+i,decrease:(r,i)=>r-i},s=n[e](Object.keys(t.marks).indexOf(JSON.stringify(o)),1),a=Object.keys(t.marks)[s];return t.step?n[e](o,t.step):Object.keys(t.marks).length&&t.marks[a]?t.marks[a]:o}function ve(e,o,t){const n="increase",s="decrease";let a=n;switch(e.keyCode){case E.UP:a=o&&t?s:n;break;case E.RIGHT:a=!o&&t?s:n;break;case E.DOWN:a=o&&t?n:s;break;case E.LEFT:a=!o&&t?n:s;break;case E.END:return(r,i)=>i.max;case E.HOME:return(r,i)=>i.min;case E.PAGE_UP:return(r,i)=>r+i.step*2;case E.PAGE_DOWN:return(r,i)=>r-i.step*2;default:return}return(r,i)=>ze(a,r,i)}var Ae=function(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)o.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(t[n[s]]=e[n[s]]);return t};function j(){}function be(e){const o={id:String,min:Number,max:Number,step:Number,marks:g.object,included:{type:Boolean,default:void 0},prefixCls:String,disabled:{type:Boolean,default:void 0},handle:Function,dots:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},minimumTrackStyle:g.object,maximumTrackStyle:g.object,handleStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),trackStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),railStyle:g.object,dotStyle:g.object,activeDotStyle:g.object,autofocus:{type:Boolean,default:void 0},draggableTrack:{type:Boolean,default:void 0}};return I({compatConfig:{MODE:3},name:"CreateSlider",mixins:[q,e],inheritAttrs:!1,props:de(o,{prefixCls:"rc-slider",min:0,max:100,step:1,marks:{},included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),emits:["change","blur","focus"],data(){const{step:t,max:n,min:s}=this;return this.handlesRefs={},{}},mounted(){this.$nextTick(()=>{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:t,disabled:n}=this;t&&!n&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(t){var{index:n,directives:s,className:a,style:r}=t,i=Ae(t,["index","directives","className","style"]);if(delete i.dragging,i.value===null)return null;const l=f(f({},i),{class:a,style:r,key:n});return B(fe,l,null)},onDown(t,n){let s=n;const{draggableTrack:a,vertical:r}=this.$props,{bounds:i}=this.$data,l=a&&this.positionGetValue?this.positionGetValue(s)||[]:[],u=X(t,this.handlesRefs);if(this.dragTrack=a&&i.length>=2&&!u&&!l.map((d,m)=>{const b=m?!0:d>=i[m];return m===l.length-1?d<=i[m]:b}).some(d=>!d),this.dragTrack)this.dragOffset=s,this.startBounds=[...i];else{if(!u)this.dragOffset=0;else{const d=ae(r,t.target);this.dragOffset=s-d,s=d}this.onStart(s)}},onMouseDown(t){if(t.button!==0)return;this.removeDocumentEvents();const n=this.$props.vertical,s=oe(n,t);this.onDown(t,s),this.addDocumentMouseEvents()},onTouchStart(t){if(te(t))return;const n=this.vertical,s=se(n,t);this.onDown(t,s),this.addDocumentTouchEvents(),A(t)},onFocus(t){const{vertical:n}=this;if(X(t,this.handlesRefs)&&!this.dragTrack){const s=ae(n,t.target);this.dragOffset=0,this.onStart(s),A(t),this.$emit("focus",t)}},onBlur(t){this.dragTrack||this.onEnd(),this.$emit("blur",t)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(t){if(!this.sliderRef){this.onEnd();return}const n=oe(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(t){if(te(t)||!this.sliderRef){this.onEnd();return}const n=se(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(t){this.sliderRef&&X(t,this.handlesRefs)&&this.onKeyboard(t)},onClickMarkLabel(t,n){t.stopPropagation(),this.onChange({sValue:n}),this.setState({sValue:n},()=>this.onEnd(!0))},getSliderStart(){const t=this.sliderRef,{vertical:n,reverse:s}=this,a=t.getBoundingClientRect();return n?s?a.bottom:a.top:window.scrollX+(s?a.right:a.left)},getSliderLength(){const t=this.sliderRef;if(!t)return 0;const n=t.getBoundingClientRect();return this.vertical?n.height:n.width},addDocumentTouchEvents(){this.onTouchMoveListener=G(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=G(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=G(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=G(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var t;this.$props.disabled||(t=this.handlesRefs[0])===null||t===void 0||t.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(t=>{var n,s;(s=(n=this.handlesRefs[t])===null||n===void 0?void 0:n.blur)===null||s===void 0||s.call(n)})},calcValue(t){const{vertical:n,min:s,max:a}=this,r=Math.abs(Math.max(t,0)/this.getSliderLength());return n?(1-r)*(a-s)+s:r*(a-s)+s},calcValueByPos(t){const s=(this.reverse?-1:1)*(t-this.getSliderStart());return this.trimAlignValue(this.calcValue(s))},calcOffset(t){const{min:n,max:s}=this,a=(t-n)/(s-n);return Math.max(0,a*100)},saveSlider(t){this.sliderRef=t},saveHandle(t,n){this.handlesRefs[t]=n}},render(){const{prefixCls:t,marks:n,dots:s,step:a,included:r,disabled:i,vertical:l,reverse:u,min:d,max:m,maximumTrackStyle:b,railStyle:C,dotStyle:y,activeDotStyle:w,id:h}=this,{class:S,style:c}=this.$attrs,{tracks:$,handles:V}=this.renderSlider(),x=R(t,S,{[`${t}-with-marks`]:Object.keys(n).length,[`${t}-disabled`]:i,[`${t}-vertical`]:l,[`${t}-horizontal`]:!l}),v={vertical:l,marks:n,included:r,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:d,reverse:u,class:`${t}-mark`,onClickLabel:i?j:this.onClickMarkLabel},p={[ue?"onTouchstartPassive":"onTouchstart"]:i?j:this.onTouchStart};return B("div",P(P({id:h,ref:this.saveSlider,tabindex:"-1",class:x},p),{},{onMousedown:i?j:this.onMouseDown,onMouseup:i?j:this.onMouseUp,onKeydown:i?j:this.onKeyDown,onFocus:i?j:this.onFocus,onBlur:i?j:this.onBlur,style:c}),[B("div",{class:`${t}-rail`,style:f(f({},b),C)},null),$,B(ce,{prefixCls:t,vertical:l,reverse:u,marks:n,dots:s,step:a,included:r,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:d,dotStyle:y,activeDotStyle:w},null),V,B(he,v,{mark:this.$slots.mark}),Ce(this)])}})}const Ie=I({compatConfig:{MODE:3},name:"Slider",mixins:[q],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const e=this.defaultValue!==void 0?this.defaultValue:this.min,o=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(o),dragging:!1}},watch:{value:{handler(e){this.setChangeValue(e)},deep:!0},min(){const{sValue:e}=this;this.setChangeValue(e)},max(){const{sValue:e}=this;this.setChangeValue(e)}},methods:{setChangeValue(e){const o=e!==void 0?e:this.sValue,t=this.trimAlignValue(o,this.$props);t!==this.sValue&&(this.setState({sValue:t}),pe(o,this.$props)&&this.$emit("change",t))},onChange(e){const o=!Y(this,"value"),t=e.sValue>this.max?f(f({},e),{sValue:this.max}):e;o&&this.setState(t);const n=t.sValue;this.$emit("change",n)},onStart(e){this.setState({dragging:!0});const{sValue:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e,t!==o&&(this.prevMovedHandleIndex=0,this.onChange({sValue:t}))},onEnd(e){const{dragging:o}=this;this.removeDocumentEvents(),(o||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(e,o){A(e);const{sValue:t}=this,n=this.calcValueByPos(o);n!==t&&this.onChange({sValue:n})},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{sValue:s}=this,a=n(s,this.$props),r=this.trimAlignValue(a);if(r===s)return;this.onChange({sValue:r}),this.$emit("afterChange",r),this.onEnd()}},getLowerBound(){const e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound(){return this.$data.sValue<this.$props.startPoint?this.$props.startPoint:this.$data.sValue},trimAlignValue(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;const t=f(f({},this.$props),o),n=Q(e,t);return ge(n,t)},getTrack(e){let{prefixCls:o,reverse:t,vertical:n,included:s,minimumTrackStyle:a,mergedTrackStyle:r,length:i,offset:l}=e;return B(J,{class:`${o}-track`,vertical:n,included:s,offset:l,reverse:t,length:i,style:f(f({},a),r)},null)},renderSlider(){const{prefixCls:e,vertical:o,included:t,disabled:n,minimumTrackStyle:s,trackStyle:a,handleStyle:r,tabindex:i,ariaLabelForHandle:l,ariaLabelledByForHandle:u,ariaValueTextFormatterForHandle:d,min:m,max:b,startPoint:C,reverse:y,handle:w,defaultHandle:h}=this,S=w||h,{sValue:c,dragging:$}=this,V=this.calcOffset(c),x=S({class:`${e}-handle`,prefixCls:e,vertical:o,offset:V,value:c,dragging:$,disabled:n,min:m,max:b,reverse:y,index:0,tabindex:i,ariaLabel:l,ariaLabelledBy:u,ariaValueTextFormatter:d,style:r[0]||r,ref:M=>this.saveHandle(0,M),onFocus:this.onFocus,onBlur:this.onBlur}),v=C!==void 0?this.calcOffset(C):0,p=a[0]||a;return{tracks:this.getTrack({prefixCls:e,reverse:y,vertical:o,included:t,offset:v,minimumTrackStyle:s,mergedTrackStyle:p,length:V-v}),handles:x}}}}),We=be(Ie),_=e=>{let{value:o,handle:t,bounds:n,props:s}=e;const{allowCross:a,pushable:r}=s,i=Number(r),l=Q(o,s);let u=l;return!a&&t!=null&&n!==void 0&&(t>0&&l<=n[t-1]+i&&(u=n[t-1]+i),t<n.length-1&&l>=n[t+1]-i&&(u=n[t+1]-i)),ge(u,s)},_e={defaultValue:g.arrayOf(g.number),value:g.arrayOf(g.number),count:Number,pushable:Ve(g.oneOfType([g.looseBool,g.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:g.arrayOf(g.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},Ge=I({compatConfig:{MODE:3},name:"Range",mixins:[q],inheritAttrs:!1,props:de(_e,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:e,min:o,max:t}=this,n=Array(...Array(e+1)).map(()=>o),s=Y(this,"defaultValue")?this.defaultValue:n;let{value:a}=this;a===void 0&&(a=s);const r=a.map((l,u)=>_({value:l,handle:u,props:this.$props}));return{sHandle:null,recent:r[0]===t?0:r.length-1,bounds:r}},watch:{value:{handler(e){const{bounds:o}=this;this.setChangeValue(e||o)},deep:!0},min(){const{value:e}=this;this.setChangeValue(e||this.bounds)},max(){const{value:e}=this;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue(e){const{bounds:o}=this;let t=e.map((n,s)=>_({value:n,handle:s,bounds:o,props:this.$props}));if(o.length===t.length){if(t.every((n,s)=>n===o[s]))return null}else t=e.map((n,s)=>_({value:n,handle:s,props:this.$props}));if(this.setState({bounds:t}),e.some(n=>pe(n,this.$props))){const n=e.map(s=>Q(s,this.$props));this.$emit("change",n)}},onChange(e){if(!Y(this,"value"))this.setState(e);else{const s={};["sHandle","recent"].forEach(a=>{e[a]!==void 0&&(s[a]=e[a])}),Object.keys(s).length&&this.setState(s)}const n=f(f({},this.$data),e).bounds;this.$emit("change",n)},positionGetValue(e){const o=this.getValue(),t=this.calcValueByPos(e),n=this.getClosestBound(t),s=this.getBoundNeedMoving(t,n),a=o[s];if(t===a)return null;const r=[...o];return r[s]=t,r},onStart(e){const{bounds:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e;const n=this.getClosestBound(t);this.prevMovedHandleIndex=this.getBoundNeedMoving(t,n),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const s=o[this.prevMovedHandleIndex];if(t===s)return;const a=[...o];a[this.prevMovedHandleIndex]=t,this.onChange({bounds:a})},onEnd(e){const{sHandle:o}=this;this.removeDocumentEvents(),o||(this.dragTrack=!1),(o!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(e,o,t,n){A(e);const{$data:s,$props:a}=this,r=a.max||100,i=a.min||0;if(t){let b=a.vertical?-o:o;b=a.reverse?-b:b;const C=r-Math.max(...n),y=i-Math.min(...n),w=Math.min(Math.max(b/(this.getSliderLength()/100),y),C),h=n.map(S=>Math.floor(Math.max(Math.min(S+w,r),i)));s.bounds.map((S,c)=>S===h[c]).some(S=>!S)&&this.onChange({bounds:h});return}const{bounds:l,sHandle:u}=this,d=this.calcValueByPos(o),m=l[u];d!==m&&this.moveTo(d)},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{bounds:s,sHandle:a}=this,r=s[a===null?this.recent:a],i=n(r,this.$props),l=_({value:i,handle:a,bounds:s,props:this.$props});if(l===r)return;this.moveTo(l,!0)}},getClosestBound(e){const{bounds:o}=this;let t=0;for(let n=1;n<o.length-1;n+=1)e>=o[n]&&(t=n);return Math.abs(o[t+1]-e)<Math.abs(o[t]-e)&&(t+=1),t},getBoundNeedMoving(e,o){const{bounds:t,recent:n}=this;let s=o;const a=t[o+1]===t[o];return a&&t[n]===t[o]&&(s=n),a&&e!==t[o+1]&&(s=e<t[o+1]?o:o+1),s},getLowerBound(){return this.bounds[0]},getUpperBound(){const{bounds:e}=this;return e[e.length-1]},getPoints(){const{marks:e,step:o,min:t,max:n}=this,s=this.internalPointsCache;if(!s||s.marks!==e||s.step!==o){const a=f({},e);if(o!==null)for(let i=t;i<=n;i+=o)a[i]=i;const r=Object.keys(a).map(parseFloat);r.sort((i,l)=>i-l),this.internalPointsCache={marks:e,step:o,points:r}}return this.internalPointsCache.points},moveTo(e,o){const t=[...this.bounds],{sHandle:n,recent:s}=this,a=n===null?s:n;t[a]=e;let r=a;this.$props.pushable!==!1?this.pushSurroundingHandles(t,r):this.$props.allowCross&&(t.sort((i,l)=>i-l),r=t.indexOf(e)),this.onChange({recent:r,sHandle:r,bounds:t}),o&&(this.$emit("afterChange",t),this.setState({},()=>{this.handlesRefs[r].focus()}),this.onEnd())},pushSurroundingHandles(e,o){const t=e[o],{pushable:n}=this,s=Number(n);let a=0;if(e[o+1]-t<s&&(a=1),t-e[o-1]<s&&(a=-1),a===0)return;const r=o+a,i=a*(e[r]-t);this.pushHandle(e,r,a,s-i)||(e[o]=e[r]-a*s)},pushHandle(e,o,t,n){const s=e[o];let a=e[o];for(;t*(a-s)<n;){if(!this.pushHandleOnePoint(e,o,t))return e[o]=s,!1;a=e[o]}return!0},pushHandleOnePoint(e,o,t){const n=this.getPoints(),a=n.indexOf(e[o])+t;if(a>=n.length||a<0)return!1;const r=o+t,i=n[a],{pushable:l}=this,u=Number(l),d=t*(e[r]-i);return this.pushHandle(e,r,t,u-d)?(e[o]=i,!0):!1},trimAlignValue(e){const{sHandle:o,bounds:t}=this;return _({value:e,handle:o,bounds:t,props:this.$props})},ensureValueNotConflict(e,o,t){let{allowCross:n,pushable:s}=t;const a=this.$data||{},{bounds:r}=a;if(e=e===void 0?a.sHandle:e,s=Number(s),!n&&e!=null&&r!==void 0){if(e>0&&o<=r[e-1]+s)return r[e-1]+s;if(e<r.length-1&&o>=r[e+1]-s)return r[e+1]-s}return o},getTrack(e){let{bounds:o,prefixCls:t,reverse:n,vertical:s,included:a,offsets:r,trackStyle:i}=e;return o.slice(0,-1).map((l,u)=>{const d=u+1,m=R({[`${t}-track`]:!0,[`${t}-track-${d}`]:!0});return B(J,{class:m,vertical:s,reverse:n,included:a,offset:r[d-1],length:r[d]-r[d-1],style:i[u],key:d},null)})},renderSlider(){const{sHandle:e,bounds:o,prefixCls:t,vertical:n,included:s,disabled:a,min:r,max:i,reverse:l,handle:u,defaultHandle:d,trackStyle:m,handleStyle:b,tabindex:C,ariaLabelGroupForHandles:y,ariaLabelledByGroupForHandles:w,ariaValueTextFormatterGroupForHandles:h}=this,S=u||d,c=o.map(x=>this.calcOffset(x)),$=`${t}-handle`,V=o.map((x,v)=>{let p=C[v]||0;(a||C[v]===null)&&(p=null);const M=e===v;return S({class:R({[$]:!0,[`${$}-${v+1}`]:!0,[`${$}-dragging`]:M}),prefixCls:t,vertical:n,dragging:M,offset:c[v],value:x,index:v,tabindex:p,min:r,max:i,reverse:l,disabled:a,style:b[v],ref:O=>this.saveHandle(v,O),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:y[v],ariaLabelledBy:w[v],ariaValueTextFormatter:h[v]})});return{tracks:this.getTrack({bounds:o,prefixCls:t,reverse:l,vertical:n,included:s,offsets:c,trackStyle:m}),handles:V}}}}),Ue=be(Ge),Ke=I({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:Ee(),setup(e,o){let{attrs:t,slots:n}=o;const s=U(null),a=U(null);function r(){ee.cancel(a.value),a.value=null}function i(){a.value=ee(()=>{var u;(u=s.value)===null||u===void 0||u.forcePopupAlign(),a.value=null})}const l=()=>{r(),e.open&&i()};return Fe([()=>e.open,()=>e.title],()=>{l()},{flush:"post",immediate:!0}),Le(()=>{l()}),ie(()=>{r()}),()=>B(Ne,P(P({ref:s},e),t),n)}}),Xe=e=>{const{componentCls:o,controlSize:t,dotSize:n,marginFull:s,marginPart:a,colorFillContentHover:r}=e;return{[o]:f(f({},Me(e)),{position:"relative",height:t,margin:`${a}px ${s}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${s}px ${a}px`},[`${o}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${o}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${o}-rail`]:{backgroundColor:e.colorFillSecondary},[`${o}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${o}-dot`]:{borderColor:r},[`${o}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${o}-dot-active`]:{borderColor:e.colorPrimary}},[`${o}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${o}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:`
|
|
2
2
|
inset-inline-start ${e.motionDurationMid},
|
|
3
3
|
inset-block-start ${e.motionDurationMid},
|
|
4
4
|
width ${e.motionDurationMid},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a6 as K,a7 as Q,a8 as Y,h as c,l as Z,m as k,r as ee,X as te,q as le,f as X,J as ne,P as B}from"./index-
|
|
1
|
+
import{a6 as K,a7 as Q,a8 as Y,h as c,l as Z,m as k,r as ee,X as te,q as le,f as X,J as ne,P as B}from"./index-CEbbycgJ.js";import{u as oe,r as F}from"./responsiveObserve-DuI2xGQd.js";import{c as i,i as ie,F as se,r as O,d as q,m as re,e as ae,f as de,p as ce,a8 as G}from"./vendor-M5lGV-wr.js";import{c as pe}from"./vnode-BQi3uWRC.js";import"./icons-NT6gy8Ee.js";function I(e){return e!=null}const E=e=>{const{itemPrefixCls:t,component:l,span:o,labelStyle:n,contentStyle:s,bordered:d,label:a,content:r,colon:u}=e,p=l;return d?i(p,{class:[{[`${t}-item-label`]:I(a),[`${t}-item-content`]:I(r)}],colSpan:o},{default:()=>[I(a)&&i("span",{style:n},[a]),I(r)&&i("span",{style:s},[r])]}):i(p,{class:[`${t}-item`],colSpan:o},{default:()=>[i("div",{class:`${t}-item-container`},[(a||a===0)&&i("span",{class:[`${t}-item-label`,{[`${t}-item-no-colon`]:!u}],style:n},[a]),(r||r===0)&&i("span",{class:`${t}-item-content`,style:s},[r])])]})},ue=e=>{const t=(u,p,P)=>{let{colon:m,prefixCls:x,bordered:b}=p,{component:y,type:w,showLabel:L,showContent:M,labelStyle:g,contentStyle:S}=P;return u.map((f,h)=>{var $,v;const z=f.props||{},{prefixCls:D=x,span:R=1,labelStyle:A=z["label-style"],contentStyle:H=z["content-style"],label:N=(v=($=f.children)===null||$===void 0?void 0:$.label)===null||v===void 0?void 0:v.call($)}=z,W=K(f),T=Q(f),_=Y(f),{key:j}=f;return typeof y=="string"?i(E,{key:`${w}-${String(j)||h}`,class:T,style:_,labelStyle:c(c({},g),A),contentStyle:c(c({},S),H),span:R,colon:m,component:y,itemPrefixCls:D,bordered:b,label:L?N:null,content:M?W:null},null):[i(E,{key:`label-${String(j)||h}`,class:T,style:c(c(c({},g),_),A),span:1,colon:m,component:y[0],itemPrefixCls:D,bordered:b,label:N},null),i(E,{key:`content-${String(j)||h}`,class:T,style:c(c(c({},S),_),H),span:R*2-1,component:y[1],itemPrefixCls:D,bordered:b,content:W},null)]})},{prefixCls:l,vertical:o,row:n,index:s,bordered:d}=e,{labelStyle:a,contentStyle:r}=ie(V,{labelStyle:O({}),contentStyle:O({})});return o?i(se,null,[i("tr",{key:`label-${s}`,class:`${l}-row`},[t(n,e,{component:"th",type:"label",showLabel:!0,labelStyle:a.value,contentStyle:r.value})]),i("tr",{key:`content-${s}`,class:`${l}-row`},[t(n,e,{component:"td",type:"content",showContent:!0,labelStyle:a.value,contentStyle:r.value})])]):i("tr",{key:s,class:`${l}-row`},[t(n,e,{component:d?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0,labelStyle:a.value,contentStyle:r.value})])},me=e=>{const{componentCls:t,descriptionsSmallPadding:l,descriptionsDefaultPadding:o,descriptionsMiddlePadding:n,descriptionsBg:s}=e;return{[`&${t}-bordered`]:{[`${t}-view`]:{border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto",borderCollapse:"collapse"}},[`${t}-item-label, ${t}-item-content`]:{padding:o,borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`${t}-item-label`]:{backgroundColor:s,"&::after":{display:"none"}},[`${t}-row`]:{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBottom:"none"}},[`&${t}-middle`]:{[`${t}-item-label, ${t}-item-content`]:{padding:n}},[`&${t}-small`]:{[`${t}-item-label, ${t}-item-content`]:{padding:l}}}}},fe=e=>{const{componentCls:t,descriptionsExtraColor:l,descriptionItemPaddingBottom:o,descriptionsItemLabelColonMarginRight:n,descriptionsItemLabelColonMarginLeft:s,descriptionsTitleMarginBottom:d}=e;return{[t]:c(c(c({},ee(e)),me(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:d},[`${t}-title`]:c(c({},te),{flex:"auto",color:e.colorText,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:l,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed"}},[`${t}-row`]:{"> th, > td":{paddingBottom:o},"&:last-child":{borderBottom:"none"}},[`${t}-item-label`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${s}px ${n}px`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}},be=Z("Descriptions",e=>{const t=e.colorFillAlter,l=e.fontSizeSM*e.lineHeightSM,o=e.colorText,n=`${e.paddingXS}px ${e.padding}px`,s=`${e.padding}px ${e.paddingLG}px`,d=`${e.paddingSM}px ${e.paddingLG}px`,a=e.padding,r=e.marginXS,u=e.marginXXS/2,p=k(e,{descriptionsBg:t,descriptionsTitleMarginBottom:l,descriptionsExtraColor:o,descriptionItemPaddingBottom:a,descriptionsSmallPadding:n,descriptionsDefaultPadding:s,descriptionsMiddlePadding:d,descriptionsItemLabelColonMarginRight:r,descriptionsItemLabelColonMarginLeft:u});return[fe(p)]}),Be={prefixCls:String,label:B.any,span:Number},ye=()=>({prefixCls:String,label:B.any,labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0},span:{type:Number,default:1}}),ge=q({compatConfig:{MODE:3},name:"ADescriptionsItem",props:ye(),setup(e,t){let{slots:l}=t;return()=>{var o;return(o=l.default)===null||o===void 0?void 0:o.call(l)}}}),J={xxxl:3,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1};function Se(e,t){if(typeof e=="number")return e;if(typeof e=="object")for(let l=0;l<F.length;l++){const o=F[l];if(t[o]&&e[o]!==void 0)return e[o]||J[o]}return 3}function U(e,t,l){let o=e;return(l===void 0||l>t)&&(o=pe(e,{span:t})),o}function $e(e,t){const l=ne(e),o=[];let n=[],s=t;return l.forEach((d,a)=>{var r;const u=(r=d.props)===null||r===void 0?void 0:r.span,p=u||1;if(a===l.length-1){n.push(U(d,s,u)),o.push(n);return}p<s?(s-=p,n.push(d)):(n.push(U(d,s,p)),o.push(n),s=t,n=[])}),o}const ve=()=>({prefixCls:String,bordered:{type:Boolean,default:void 0},size:{type:String,default:"default"},title:B.any,extra:B.any,column:{type:[Number,Object],default:()=>J},layout:String,colon:{type:Boolean,default:void 0},labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0}}),V=Symbol("descriptionsContext"),C=q({compatConfig:{MODE:3},name:"ADescriptions",inheritAttrs:!1,props:ve(),slots:Object,Item:ge,setup(e,t){let{slots:l,attrs:o}=t;const{prefixCls:n,direction:s}=le("descriptions",e);let d;const a=O({}),[r,u]=be(n),p=oe();re(()=>{d=p.value.subscribe(m=>{typeof e.column=="object"&&(a.value=m)})}),ae(()=>{p.value.unsubscribe(d)}),ce(V,{labelStyle:G(e,"labelStyle"),contentStyle:G(e,"contentStyle")});const P=de(()=>Se(e.column,a.value));return()=>{var m,x,b;const{size:y,bordered:w=!1,layout:L="horizontal",colon:M=!0,title:g=(m=l.title)===null||m===void 0?void 0:m.call(l),extra:S=(x=l.extra)===null||x===void 0?void 0:x.call(l)}=e,f=(b=l.default)===null||b===void 0?void 0:b.call(l),h=$e(f,P.value);return r(i("div",X(X({},o),{},{class:[n.value,{[`${n.value}-${y}`]:y!=="default",[`${n.value}-bordered`]:!!w,[`${n.value}-rtl`]:s.value==="rtl"},o.class,u.value]}),[(g||S)&&i("div",{class:`${n.value}-header`},[g&&i("div",{class:`${n.value}-title`},[g]),S&&i("div",{class:`${n.value}-extra`},[S])]),i("div",{class:`${n.value}-view`},[i("table",null,[i("tbody",null,[h.map(($,v)=>i(ue,{key:v,index:v,colon:M,prefixCls:n.value,vertical:L==="vertical",bordered:w,row:$},null))])])])]))}}});C.install=function(e){return e.component(C.name,C),e.component(C.Item.name,C.Item),e};export{ge as DescriptionsItem,Be as DescriptionsItemProps,C as default,V as descriptionsContext,ve as descriptionsProps};
|