chainlesschain 0.162.2 → 0.162.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/package.json +2 -1
  2. package/src/assets/web-panel/.build-hash +1 -1
  3. package/src/assets/web-panel/assets/{AIOps-D69_XwQf.js → AIOps-BHcJlF4M.js} +1 -1
  4. package/src/assets/web-panel/assets/{ActionButton-COVVHNnK.js → ActionButton-QNqNYP_E.js} +1 -1
  5. package/src/assets/web-panel/assets/{Analytics-m0Cuoraq.js → Analytics-DWrmU2MM.js} +2 -2
  6. package/src/assets/web-panel/assets/AppLayout-0BXhjvFX.js +3 -0
  7. package/src/assets/web-panel/assets/{AppLayout-BEZq_CS0.css → AppLayout-BLCe1k8m.css} +1 -1
  8. package/src/assets/web-panel/assets/{Audit-DB5RNs9K.js → Audit-Cns_OJ3y.js} +1 -1
  9. package/src/assets/web-panel/assets/{Backup-DD9SgVtq.js → Backup-BWXKm8S2.js} +1 -1
  10. package/src/assets/web-panel/assets/{BaseInput-CS2Y4V0O.js → BaseInput-DMtM90I4.js} +1 -1
  11. package/src/assets/web-panel/assets/{Chat-Cvw48zqw.js → Chat-CPSQIJkd.js} +1 -1
  12. package/src/assets/web-panel/assets/{Checkbox-DElRJpAL.js → Checkbox-CdoTzEcu.js} +1 -1
  13. package/src/assets/web-panel/assets/{Codegen-CHdMYssy.js → Codegen-DiMm-2CJ.js} +1 -1
  14. package/src/assets/web-panel/assets/{Col-BDk4BXjN.js → Col-Dw8uRsh8.js} +1 -1
  15. package/src/assets/web-panel/assets/{Community-ByDrN94M.js → Community-DF6oPrrt.js} +1 -1
  16. package/src/assets/web-panel/assets/{Compact-D4E0roed.js → Compact-DDeBOvFc.js} +1 -1
  17. package/src/assets/web-panel/assets/Compliance-cpcX8foc.js +1 -0
  18. package/src/assets/web-panel/assets/{Cowork-CMn6mzHv.js → Cowork-BnF4dCvO.js} +3 -3
  19. package/src/assets/web-panel/assets/{Cron-CARdrrMM.js → Cron-CNm5yzGt.js} +2 -2
  20. package/src/assets/web-panel/assets/{Crosschain-2pnRIGVn.js → Crosschain-1fdaoWnO.js} +1 -1
  21. package/src/assets/web-panel/assets/{DID-BRo55XlY.js → DID-CgWgrQjr.js} +2 -2
  22. package/src/assets/web-panel/assets/{Dashboard-DfNjjw7V.js → Dashboard-dGcTq_hg.js} +2 -2
  23. package/src/assets/web-panel/assets/{Dropdown-BDTTlG70.js → Dropdown-CMcWp2f1.js} +1 -1
  24. package/src/assets/web-panel/assets/{Federation-CKkeJ169.js → Federation-BVmtVOzD.js} +1 -1
  25. package/src/assets/web-panel/assets/{FormItemContext-C6DJ0oHT.js → FormItemContext-BTuMR6zf.js} +1 -1
  26. package/src/assets/web-panel/assets/{Git-DDQd8pDl.js → Git-2itzzOWU.js} +2 -2
  27. package/src/assets/web-panel/assets/{Governance-DZTuAASB.js → Governance-BD5nFtjx.js} +1 -1
  28. package/src/assets/web-panel/assets/{Inference-CIbj0XmL.js → Inference-BqTjotuw.js} +1 -1
  29. package/src/assets/web-panel/assets/KnowledgeGraph-CkJCUp_X.js +1 -0
  30. package/src/assets/web-panel/assets/{Logs-BrLBwq1m.js → Logs-BezIQuu3.js} +1 -1
  31. package/src/assets/web-panel/assets/{Marketplace-q9X5VK92.js → Marketplace-BQi8NC94.js} +1 -1
  32. package/src/assets/web-panel/assets/{McpTools-DfxuLN57.js → McpTools-UDm4tI8g.js} +1 -1
  33. package/src/assets/web-panel/assets/{Memory-DND9vjBx.js → Memory-b3k3SJXP.js} +2 -2
  34. package/src/assets/web-panel/assets/{MobileBridge-Ba2jSFl0.js → MobileBridge-CHysUGzj.js} +1 -1
  35. package/src/assets/web-panel/assets/{MobileProjects-CdclN769.js → MobileProjects-H5DjqNIw.js} +1 -1
  36. package/src/assets/web-panel/assets/{Mtc-BNKpFjlY.js → Mtc-B-kn2cbZ.js} +4 -4
  37. package/src/assets/web-panel/assets/{MtcAudit-BlZJm1Tf.js → MtcAudit-BSeDGJAO.js} +1 -1
  38. package/src/assets/web-panel/assets/{Multisig-DcX0uBmT.js → Multisig-BSwWbNCn.js} +2 -2
  39. package/src/assets/web-panel/assets/{NLProgramming-dDIA3V_a.js → NLProgramming-B7fTKT9-.js} +1 -1
  40. package/src/assets/web-panel/assets/{Notes-BDsTuZ5O.js → Notes-CE7Dxyik.js} +3 -3
  41. package/src/assets/web-panel/assets/{NotificationSettings-DzGuAAKt.js → NotificationSettings-BrWPb12X.js} +1 -1
  42. package/src/assets/web-panel/assets/{Organization-DFfncYaU.js → Organization-BvMcmpZ-.js} +4 -4
  43. package/src/assets/web-panel/assets/{Overflow-O5JDtvyx.js → Overflow-9VpUiyX3.js} +1 -1
  44. package/src/assets/web-panel/assets/{P2P-BTLl5rnf.js → P2P-CZiZLuH6.js} +2 -2
  45. package/src/assets/web-panel/assets/{Permissions-M-jmJa1X.js → Permissions-7xPYU8o3.js} +4 -4
  46. package/src/assets/web-panel/assets/PersonalDataHub-BoAsj3rP.js +1 -0
  47. package/src/assets/web-panel/assets/PersonalDataHub-C5HcGC5x.css +1 -0
  48. package/src/assets/web-panel/assets/{Pipeline-DyXoKp_J.js → Pipeline-BXmWkBtJ.js} +1 -1
  49. package/src/assets/web-panel/assets/{Privacy-Cvv_9eBQ.js → Privacy-Bowi-wqF.js} +1 -1
  50. package/src/assets/web-panel/assets/{ProjectInit-BS2s_sxy.js → ProjectInit-BW1Xj7_l.js} +2 -2
  51. package/src/assets/web-panel/assets/{ProjectSettings-CGfEpOL1.js → ProjectSettings-pDbBvJFG.js} +1 -1
  52. package/src/assets/web-panel/assets/{Projects-BkuTxL3o.js → Projects-D32hRs2K.js} +1 -1
  53. package/src/assets/web-panel/assets/{Providers-CkhZ5eii.js → Providers-fvnKRdFc.js} +1 -1
  54. package/src/assets/web-panel/assets/{QuickAsk-CvGT4zj2.js → QuickAsk-DBZrimTb.js} +1 -1
  55. package/src/assets/web-panel/assets/{Recommend-C-gDvXw6.js → Recommend-B_leuPdE.js} +1 -1
  56. package/src/assets/web-panel/assets/{Reputation-5zAdCzHT.js → Reputation-9YJu2Q0s.js} +1 -1
  57. package/src/assets/web-panel/assets/{Row-BsuDvMpO.js → Row-BwDaJw-R.js} +1 -1
  58. package/src/assets/web-panel/assets/{RssFeed-2QQb8p5X.js → RssFeed-CCwGtGbs.js} +3 -3
  59. package/src/assets/web-panel/assets/{Search-CFT_6Ljj.js → Search-CLdXqpfz.js} +1 -1
  60. package/src/assets/web-panel/assets/{Security-BrK_KNJK.js → Security-_It0GsWS.js} +3 -3
  61. package/src/assets/web-panel/assets/Services-jBxBWGGT.js +2 -0
  62. package/src/assets/web-panel/assets/{Skeleton--WjfL2Ay.js → Skeleton-DR_EuFFW.js} +1 -1
  63. package/src/assets/web-panel/assets/{Skills-1GWFYMGg.js → Skills-DsHcMNEk.js} +1 -1
  64. package/src/assets/web-panel/assets/{Sla-508cBkmT.js → Sla-Be0UaX-h.js} +1 -1
  65. package/src/assets/web-panel/assets/{SpeechSettings-DIeNRX6V.js → SpeechSettings-uUhDyyHj.js} +1 -1
  66. package/src/assets/web-panel/assets/{SyncSettings-BQDW6gsX.js → SyncSettings-CUAwaSnj.js} +1 -1
  67. package/src/assets/web-panel/assets/{Tasks-D39SBKyi.js → Tasks-CUVZww9Q.js} +1 -1
  68. package/src/assets/web-panel/assets/{Templates-tsObCBe6.js → Templates-WLZcNzJ_.js} +1 -1
  69. package/src/assets/web-panel/assets/{Tenant-Ccpw-S6R.js → Tenant-FgN0uYm6.js} +1 -1
  70. package/src/assets/web-panel/assets/Terminal-BzLHjHyj.js +3 -0
  71. package/src/assets/web-panel/assets/Tokens-z7lyRr40.js +1 -0
  72. package/src/assets/web-panel/assets/{Trigger-D4yonKuU.js → Trigger-HxLdC9ne.js} +1 -1
  73. package/src/assets/web-panel/assets/{Trust-DHDcLjma.js → Trust-DggmMxpI.js} +1 -1
  74. package/src/assets/web-panel/assets/{UkeySign-DBpW0j1p.js → UkeySign-BO-pKTZ_.js} +1 -1
  75. package/src/assets/web-panel/assets/{VideoEditing-BPr_46Py.js → VideoEditing-DdLdJ9Ps.js} +1 -1
  76. package/src/assets/web-panel/assets/{Wallet-4lfplIJV.js → Wallet-F8EfdQDN.js} +4 -4
  77. package/src/assets/web-panel/assets/{WebAuthn-DI13wkez.js → WebAuthn-Bi2Kf8Ev.js} +4 -4
  78. package/src/assets/web-panel/assets/{WorkflowEditor-CYbHpkQy.js → WorkflowEditor-DUHk4Y0A.js} +1 -1
  79. package/src/assets/web-panel/assets/{chat-BOH4vNJ7.js → chat-BMz8ik6R.js} +1 -1
  80. package/src/assets/web-panel/assets/{colors-qxXJ45GU.js → colors-DTTx1bVY.js} +1 -1
  81. package/src/assets/web-panel/assets/{compact-item-Cjb446yk.js → compact-item-BjZyyKpa.js} +1 -1
  82. package/src/assets/web-panel/assets/{createContext-CulBut34.js → createContext-D0Ztn7R_.js} +1 -1
  83. package/src/assets/web-panel/assets/{hasIn-DCnwRrNq.js → hasIn-BeXm1bJ2.js} +1 -1
  84. package/src/assets/web-panel/assets/{icons-DY9VpXfa.js → icons-BFHq5fEF.js} +1 -1
  85. package/src/assets/web-panel/assets/{index-CRsnuDGC.js → index-BDRzvi5v.js} +1 -1
  86. package/src/assets/web-panel/assets/{index-oGqObYfs.js → index-BDmMBKM_.js} +1 -1
  87. package/src/assets/web-panel/assets/{index-Cv2hQG7c.js → index-BHuIMHcS.js} +1 -1
  88. package/src/assets/web-panel/assets/{index-D3bXm2aZ.js → index-BODKOjRZ.js} +1 -1
  89. package/src/assets/web-panel/assets/{index-BKNbteyC.js → index-BUFpZk0I.js} +1 -1
  90. package/src/assets/web-panel/assets/{index-PP5MLidC.js → index-BWRsbH6v.js} +1 -1
  91. package/src/assets/web-panel/assets/{index-BAy0ks7N.js → index-B_juAGfN.js} +4 -4
  92. package/src/assets/web-panel/assets/{index-D80IlXq1.js → index-BiAjZ9Iq.js} +1 -1
  93. package/src/assets/web-panel/assets/{index-6xtj6SRQ.js → index-BxIq_rps.js} +1 -1
  94. package/src/assets/web-panel/assets/{index-C3ImsNgP.js → index-By4zsU8r.js} +1 -1
  95. package/src/assets/web-panel/assets/{index-DK5iJriy.js → index-C6Isxhje.js} +1 -1
  96. package/src/assets/web-panel/assets/{index-Civlun-X.js → index-CGudWWwE.js} +1 -1
  97. package/src/assets/web-panel/assets/{index-CW7a8O5w.js → index-CobyvwP0.js} +1 -1
  98. package/src/assets/web-panel/assets/{index-BCr0xH2Q.js → index-CqkwXe3s.js} +1 -1
  99. package/src/assets/web-panel/assets/{index-BBWR20mC.js → index-CuDNPqlD.js} +1 -1
  100. package/src/assets/web-panel/assets/{index-DpzjQM4w.js → index-D-niPBwZ.js} +1 -1
  101. package/src/assets/web-panel/assets/{index-cP5FNe0q.js → index-D1CV-6q1.js} +1 -1
  102. package/src/assets/web-panel/assets/{index-DQXojJvN.js → index-D1coHqyT.js} +1 -1
  103. package/src/assets/web-panel/assets/{index-DG1F9RZd.js → index-DB1i3Cfr.js} +1 -1
  104. package/src/assets/web-panel/assets/{index-BA8bUOYK.js → index-DIoinlAY.js} +1 -1
  105. package/src/assets/web-panel/assets/index-DJOgV0SI.js +1 -0
  106. package/src/assets/web-panel/assets/{index-hca2ku7U.js → index-DLDHcuz4.js} +1 -1
  107. package/src/assets/web-panel/assets/{index-C_029Hie.js → index-DLJnAsec.js} +1 -1
  108. package/src/assets/web-panel/assets/{index-Bp4_7Kow.js → index-DMvkBq2d.js} +1 -1
  109. package/src/assets/web-panel/assets/{index-Bb1KdW4J.js → index-DRNxWV3i.js} +1 -1
  110. package/src/assets/web-panel/assets/{index-C7reeGYU.js → index-DTzwBmBS.js} +1 -1
  111. package/src/assets/web-panel/assets/{index-D6-3yvOU.js → index-DXSXIknb.js} +1 -1
  112. package/src/assets/web-panel/assets/{index-Clxp_Rc0.js → index-Da_XUjv2.js} +1 -1
  113. package/src/assets/web-panel/assets/{index-DNooejFX.js → index-DfxUN2LB.js} +1 -1
  114. package/src/assets/web-panel/assets/{index-CFw2RtQ_.js → index-DnATlZR7.js} +1 -1
  115. package/src/assets/web-panel/assets/{index-DkYY9W4x.js → index-Dx7XPVkb.js} +1 -1
  116. package/src/assets/web-panel/assets/index-FpewH8xy.js +1 -0
  117. package/src/assets/web-panel/assets/{index-XMsNvoaz.js → index-JTN4jzka.js} +1 -1
  118. package/src/assets/web-panel/assets/{index-SHmkRPZ_.js → index-NppMuZBM.js} +1 -1
  119. package/src/assets/web-panel/assets/{index-CjJUQvIU.js → index-OjH2wDtW.js} +1 -1
  120. package/src/assets/web-panel/assets/{index-CV_vlbaU.js → index-aBdRRXWO.js} +1 -1
  121. package/src/assets/web-panel/assets/{index-BO-vFfxc.js → index-nwkYgoRS.js} +1 -1
  122. package/src/assets/web-panel/assets/{index-BOFep_rA.js → index-tUIluCPu.js} +1 -1
  123. package/src/assets/web-panel/assets/{index-DC38ymaH.js → index-xN0WCVmC.js} +1 -1
  124. package/src/assets/web-panel/assets/{initDefaultProps-Dp93Vlbv.js → initDefaultProps-DE_gVS_i.js} +1 -1
  125. package/src/assets/web-panel/assets/{motion-yBy7l6Td.js → motion-BiRUGscQ.js} +1 -1
  126. package/src/assets/web-panel/assets/{move-P6GgC8ZU.js → move-DMEzVMJZ.js} +1 -1
  127. package/src/assets/web-panel/assets/{omit-BMF4_2X_.js → omit-DBh74Ui4.js} +1 -1
  128. package/src/assets/web-panel/assets/{pickAttrs-C1bUV-iL.js → pickAttrs-D6PQbWuo.js} +1 -1
  129. package/src/assets/web-panel/assets/{placementArrow-CpNGMWxW.js → placementArrow-BYkdt9jF.js} +1 -1
  130. package/src/assets/web-panel/assets/{responsiveObserve-Bt3UzGUn.js → responsiveObserve-C2ES6P0V.js} +1 -1
  131. package/src/assets/web-panel/assets/{slide-B5t0Lgse.js → slide-zGdjevxe.js} +1 -1
  132. package/src/assets/web-panel/assets/{statusUtils-nHmUS8yg.js → statusUtils-Cf6eRpR7.js} +1 -1
  133. package/src/assets/web-panel/assets/{styleChecker-DgazP1mu.js → styleChecker-DZZx_bHs.js} +1 -1
  134. package/src/assets/web-panel/assets/{useFlexGapSupport-BQ4jJS_s.js → useFlexGapSupport-B6q6zt9X.js} +1 -1
  135. package/src/assets/web-panel/assets/{useFs-C8aeIQfU.js → useFs-DjaBUk_P.js} +1 -1
  136. package/src/assets/web-panel/assets/{vnode-DMH0ymoP.js → vnode-CDF4X084.js} +1 -1
  137. package/src/assets/web-panel/assets/{zoom-DRmMxFNC.js → zoom-C9FCvBpV.js} +1 -1
  138. package/src/assets/web-panel/index.html +2 -2
  139. package/src/commands/ui.js +21 -3
  140. package/src/gateways/ws/message-dispatcher.js +34 -0
  141. package/src/gateways/ws/personal-data-hub-protocol.js +133 -0
  142. package/src/lib/personal-data-hub-wiring.js +310 -0
  143. package/src/runtime/agent-runtime.js +85 -11
  144. package/src/assets/web-panel/assets/AppLayout-BzzvYjpq.js +0 -3
  145. package/src/assets/web-panel/assets/Compliance-DCkF4hfd.js +0 -1
  146. package/src/assets/web-panel/assets/KnowledgeGraph-nTHxy0Fw.js +0 -1
  147. package/src/assets/web-panel/assets/Services-DAmjLm-1.js +0 -2
  148. package/src/assets/web-panel/assets/Terminal-CgFg09NA.js +0 -3
  149. package/src/assets/web-panel/assets/Tokens-BBWOiqLq.js +0 -1
  150. package/src/assets/web-panel/assets/index-B0YFQoW_.js +0 -1
  151. package/src/assets/web-panel/assets/index-BX7snsTz.js +0 -1
@@ -1 +1 @@
1
- import{P as So,H as Z,h as e,l as Co,m as U,n as xo,q as io,I as Bo,J as ao,L as Eo,f as H}from"./index-BAy0ks7N.js";import{W as To}from"./index-CW7a8O5w.js";import{d as co}from"./devWarning-CNIS3FrJ.js";import{d as X,c as g,a4 as Io,n as Ho,a as wo,f as h,w as zo,b as Po,o as Do,q as Ao,e as Oo,s as w,T as Ro}from"./vendor-M5lGV-wr.js";import{L as k}from"./icons-DY9VpXfa.js";import{g as Wo}from"./compact-item-Cjb446yk.js";import{c as Lo}from"./createContext-CulBut34.js";import{u as _o}from"./Compact-D4E0roed.js";import{i as Mo}from"./initDefaultProps-Dp93Vlbv.js";function yr(o){return o==="danger"?{danger:!0}:{type:o}}const No=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:So.any,href:String,target:String,title:String,onClick:Z(),onMousedown:Z()}),oo=o=>{o&&(o.style.width="0px",o.style.opacity="0",o.style.transform="scale(0)")},ro=o=>{Ho(()=>{o&&(o.style.width=`${o.scrollWidth}px`,o.style.opacity="1",o.style.transform="scale(1)")})},eo=o=>{o&&o.style&&(o.style.width=null,o.style.opacity=null,o.style.transform=null)},jo=X({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(o){return()=>{const{existIcon:r,prefixCls:l,loading:n}=o;if(r)return g("span",{class:`${l}-loading-icon`},[g(k,null,null)]);const i=!!n;return g(Io,{name:`${l}-loading-icon-motion`,onBeforeEnter:oo,onEnter:ro,onAfterEnter:eo,onBeforeLeave:ro,onLeave:a=>{setTimeout(()=>{oo(a)})},onAfterLeave:eo},{default:()=>[i?g("span",{class:`${l}-loading-icon`},[g(k,null,null)]):null]})}}}),to=(o,r)=>({[`> span, > ${o}`]:{"&:not(:last-child)":{[`&, & > ${o}`]:{"&:not(:disabled)":{borderInlineEndColor:r}}},"&:not(:first-child)":{[`&, & > ${o}`]:{"&:not(:disabled)":{borderInlineStartColor:r}}}}}),Go=o=>{const{componentCls:r,fontSize:l,lineWidth:n,colorPrimaryHover:i,colorErrorHover:a}=o;return{[`${r}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${r}`]:{"&:not(:last-child)":{[`&, & > ${r}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-n,[`&, & > ${r}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[r]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${r}-icon-only`]:{fontSize:l}},to(`${r}-primary`,i),to(`${r}-danger`,a)]}};function Vo(o,r){return{[`&-item:not(${r}-last-item)`]:{marginBottom:-o.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function Uo(o,r){return{[`&-item:not(${r}-first-item):not(${r}-last-item)`]:{borderRadius:0},[`&-item${r}-first-item:not(${r}-last-item)`]:{[`&, &${o}-sm, &${o}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${r}-last-item:not(${r}-first-item)`]:{[`&, &${o}-sm, &${o}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Xo(o){const r=`${o.componentCls}-compact-vertical`;return{[r]:e(e({},Vo(o,r)),Uo(o.componentCls,r))}}const qo=o=>{const{componentCls:r,iconCls:l}=o;return{[r]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${o.lineWidth}px ${o.lineType} transparent`,cursor:"pointer",transition:`all ${o.motionDurationMid} ${o.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:o.lineHeight,color:o.colorText,"> span":{display:"inline-block"},[`> ${l} + span, > span + ${l}`]:{marginInlineStart:o.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":e({},xo(o)),[`&-icon-only${r}-compact-item`]:{flex:"none"},[`&-compact-item${r}-primary`]:{[`&:not([disabled]) + ${r}-compact-item${r}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-o.lineWidth,insetInlineStart:-o.lineWidth,display:"inline-block",width:o.lineWidth,height:`calc(100% + ${o.lineWidth*2}px)`,backgroundColor:o.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${r}-primary`]:{[`&:not([disabled]) + ${r}-compact-vertical-item${r}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-o.lineWidth,insetInlineStart:-o.lineWidth,display:"inline-block",width:`calc(100% + ${o.lineWidth*2}px)`,height:o.lineWidth,backgroundColor:o.colorPrimaryHover,content:'""'}}}}}}},f=(o,r)=>({"&:not(:disabled)":{"&:hover":o,"&:active":r}}),Fo=o=>({minWidth:o.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),Jo=o=>({borderRadius:o.controlHeight,paddingInlineStart:o.controlHeight/2,paddingInlineEnd:o.controlHeight/2}),V=o=>({cursor:"not-allowed",borderColor:o.colorBorder,color:o.colorTextDisabled,backgroundColor:o.colorBgContainerDisabled,boxShadow:"none"}),P=(o,r,l,n,i,a,d)=>({[`&${o}-background-ghost`]:e(e({color:r||void 0,backgroundColor:"transparent",borderColor:l||void 0,boxShadow:"none"},f(e({backgroundColor:"transparent"},a),e({backgroundColor:"transparent"},d))),{"&:disabled":{cursor:"not-allowed",color:n||void 0,borderColor:i||void 0}})}),q=o=>({"&:disabled":e({},V(o))}),so=o=>e({},q(o)),D=o=>({"&:disabled":{cursor:"not-allowed",color:o.colorTextDisabled}}),uo=o=>e(e(e(e(e({},so(o)),{backgroundColor:o.colorBgContainer,borderColor:o.colorBorder,boxShadow:`0 ${o.controlOutlineWidth}px 0 ${o.controlTmpOutline}`}),f({color:o.colorPrimaryHover,borderColor:o.colorPrimaryHover},{color:o.colorPrimaryActive,borderColor:o.colorPrimaryActive})),P(o.componentCls,o.colorBgContainer,o.colorBgContainer,o.colorTextDisabled,o.colorBorder)),{[`&${o.componentCls}-dangerous`]:e(e(e({color:o.colorError,borderColor:o.colorError},f({color:o.colorErrorHover,borderColor:o.colorErrorBorderHover},{color:o.colorErrorActive,borderColor:o.colorErrorActive})),P(o.componentCls,o.colorError,o.colorError,o.colorTextDisabled,o.colorBorder)),q(o))}),Ko=o=>e(e(e(e(e({},so(o)),{color:o.colorTextLightSolid,backgroundColor:o.colorPrimary,boxShadow:`0 ${o.controlOutlineWidth}px 0 ${o.controlOutline}`}),f({color:o.colorTextLightSolid,backgroundColor:o.colorPrimaryHover},{color:o.colorTextLightSolid,backgroundColor:o.colorPrimaryActive})),P(o.componentCls,o.colorPrimary,o.colorPrimary,o.colorTextDisabled,o.colorBorder,{color:o.colorPrimaryHover,borderColor:o.colorPrimaryHover},{color:o.colorPrimaryActive,borderColor:o.colorPrimaryActive})),{[`&${o.componentCls}-dangerous`]:e(e(e({backgroundColor:o.colorError,boxShadow:`0 ${o.controlOutlineWidth}px 0 ${o.colorErrorOutline}`},f({backgroundColor:o.colorErrorHover},{backgroundColor:o.colorErrorActive})),P(o.componentCls,o.colorError,o.colorError,o.colorTextDisabled,o.colorBorder,{color:o.colorErrorHover,borderColor:o.colorErrorHover},{color:o.colorErrorActive,borderColor:o.colorErrorActive})),q(o))}),Qo=o=>e(e({},uo(o)),{borderStyle:"dashed"}),Yo=o=>e(e(e({color:o.colorLink},f({color:o.colorLinkHover},{color:o.colorLinkActive})),D(o)),{[`&${o.componentCls}-dangerous`]:e(e({color:o.colorError},f({color:o.colorErrorHover},{color:o.colorErrorActive})),D(o))}),Zo=o=>e(e(e({},f({color:o.colorText,backgroundColor:o.colorBgTextHover},{color:o.colorText,backgroundColor:o.colorBgTextActive})),D(o)),{[`&${o.componentCls}-dangerous`]:e(e({color:o.colorError},D(o)),f({color:o.colorErrorHover,backgroundColor:o.colorErrorBg},{color:o.colorErrorHover,backgroundColor:o.colorErrorBg}))}),ko=o=>e(e({},V(o)),{[`&${o.componentCls}:hover`]:e({},V(o))}),or=o=>{const{componentCls:r}=o;return{[`${r}-default`]:uo(o),[`${r}-primary`]:Ko(o),[`${r}-dashed`]:Qo(o),[`${r}-link`]:Yo(o),[`${r}-text`]:Zo(o),[`${r}-disabled`]:ko(o)}},F=function(o){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:l,iconCls:n,controlHeight:i,fontSize:a,lineHeight:d,lineWidth:c,borderRadius:p,buttonPaddingHorizontal:O}=o,x=Math.max(0,(i-a*d)/2-c),R=O-c,y=`${l}-icon-only`;return[{[`${l}${r}`]:{fontSize:a,height:i,padding:`${x}px ${R}px`,borderRadius:p,[`&${y}`]:{width:i,paddingInlineStart:0,paddingInlineEnd:0,[`&${l}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${l}-loading`]:{opacity:o.opacityLoading,cursor:"default"},[`${l}-loading-icon`]:{transition:`width ${o.motionDurationSlow} ${o.motionEaseInOut}, opacity ${o.motionDurationSlow} ${o.motionEaseInOut}`},[`&:not(${y}) ${l}-loading-icon > ${n}`]:{marginInlineEnd:o.marginXS}}},{[`${l}${l}-circle${r}`]:Fo(o)},{[`${l}${l}-round${r}`]:Jo(o)}]},rr=o=>F(o),er=o=>{const r=U(o,{controlHeight:o.controlHeightSM,padding:o.paddingXS,buttonPaddingHorizontal:8,borderRadius:o.borderRadiusSM});return F(r,`${o.componentCls}-sm`)},tr=o=>{const r=U(o,{controlHeight:o.controlHeightLG,fontSize:o.fontSizeLG,borderRadius:o.borderRadiusLG});return F(r,`${o.componentCls}-lg`)},lr=o=>{const{componentCls:r}=o;return{[r]:{[`&${r}-block`]:{width:"100%"}}}},nr=Co("Button",o=>{const{controlTmpOutline:r,paddingContentHorizontal:l}=o,n=U(o,{colorOutlineDefault:r,buttonPaddingHorizontal:l});return[qo(n),er(n),rr(n),tr(n),lr(n),or(n),Go(n),Wo(o,{focus:!1}),Xo(o)]}),ir=()=>({prefixCls:String,size:{type:String}}),go=Lo(),A=X({compatConfig:{MODE:3},name:"AButtonGroup",props:ir(),setup(o,r){let{slots:l}=r;const{prefixCls:n,direction:i}=io("btn-group",o),[,,a]=Bo();go.useProvide(wo({size:h(()=>o.size)}));const d=h(()=>{const{size:c}=o;let p="";switch(c){case"large":p="lg";break;case"small":p="sm";break;case"middle":case void 0:break;default:co(!c,"Button.Group","Invalid prop `size`.")}return{[`${n.value}`]:!0,[`${n.value}-${p}`]:p,[`${n.value}-rtl`]:i.value==="rtl",[a.value]:!0}});return()=>{var c;return g("div",{class:d.value},[ao((c=l.default)===null||c===void 0?void 0:c.call(l))])}}}),lo=/^[\u4e00-\u9fa5]{2}$/,no=lo.test.bind(lo);function z(o){return o==="text"||o==="link"}const C=X({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Mo(No(),{type:"default"}),slots:Object,setup(o,r){let{slots:l,attrs:n,emit:i,expose:a}=r;const{prefixCls:d,autoInsertSpaceInButton:c,direction:p,size:O}=io("btn",o),[x,R]=nr(d),y=go.useInject(),mo=Eo(),W=h(()=>{var t;return(t=o.disabled)!==null&&t!==void 0?t:mo.value}),$=w(null),B=w(void 0);let L=!1;const v=w(!1),S=w(!1),J=h(()=>c.value!==!1),{compactSize:po,compactItemClassnames:bo}=_o(d,p),_=h(()=>typeof o.loading=="object"&&o.loading.delay?o.loading.delay||!0:!!o.loading);zo(_,t=>{clearTimeout(B.value),typeof _.value=="number"?B.value=setTimeout(()=>{v.value=t},_.value):v.value=t},{immediate:!0});const fo=h(()=>{const{type:t,shape:u="default",ghost:b,block:m,danger:M}=o,s=d.value,E={large:"lg",small:"sm",middle:void 0},T=po.value||y?.size||O.value,I=T&&E[T]||"";return[bo.value,{[R.value]:!0,[`${s}`]:!0,[`${s}-${u}`]:u!=="default"&&u,[`${s}-${t}`]:t,[`${s}-${I}`]:I,[`${s}-loading`]:v.value,[`${s}-background-ghost`]:b&&!z(t),[`${s}-two-chinese-chars`]:S.value&&J.value,[`${s}-block`]:m,[`${s}-dangerous`]:!!M,[`${s}-rtl`]:p.value==="rtl"}]}),K=()=>{const t=$.value;if(!t||c.value===!1)return;const u=t.textContent;L&&no(u)?S.value||(S.value=!0):S.value&&(S.value=!1)},vo=t=>{if(v.value||W.value){t.preventDefault();return}i("click",t)},yo=t=>{i("mousedown",t)},ho=(t,u)=>{const b=u?" ":"";if(t.type===Ro){let m=t.children.trim();return no(m)&&(m=m.split("").join(b)),g("span",null,[m])}return t};return Po(()=>{co(!(o.ghost&&z(o.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Do(K),Ao(K),Oo(()=>{B.value&&clearTimeout(B.value)}),a({focus:()=>{var t;(t=$.value)===null||t===void 0||t.focus()},blur:()=>{var t;(t=$.value)===null||t===void 0||t.blur()}}),()=>{var t,u;const{icon:b=(t=l.icon)===null||t===void 0?void 0:t.call(l)}=o,m=ao((u=l.default)===null||u===void 0?void 0:u.call(l));L=m.length===1&&!b&&!z(o.type);const{type:M,htmlType:s,href:E,title:T,target:I}=o,$o=v.value?"loading":b,N=e(e({},n),{title:T,disabled:W.value,class:[fo.value,n.class,{[`${d.value}-icon-only`]:m.length===0&&!!$o}],onClick:vo,onMousedown:yo});W.value||delete N.disabled;const Q=b&&!v.value?b:g(jo,{existIcon:!!b,prefixCls:d.value,loading:!!v.value},null),Y=m.map(G=>ho(G,L&&J.value));if(E!==void 0)return x(g("a",H(H({},N),{},{href:E,target:I,ref:$}),[Q,Y]));let j=g("button",H(H({},N),{},{ref:$,type:s}),[Q,Y]);if(!z(M)){const G=(function(){return j})();j=g(To,{ref:"wave",disabled:!!v.value},{default:()=>[G]})}return x(j)}}});C.Group=A;C.install=function(o){return o.component(C.name,C),o.component(A.name,A),o};const hr=Object.freeze(Object.defineProperty({__proto__:null,ButtonGroup:A,default:C},Symbol.toStringTag,{value:"Module"}));export{C as B,No as b,yr as c,hr as i};
1
+ import{P as So,H as Z,h as e,l as Co,m as U,n as xo,q as io,I as Bo,J as ao,L as Eo,f as H}from"./index-B_juAGfN.js";import{W as To}from"./index-CobyvwP0.js";import{d as co}from"./devWarning-CNIS3FrJ.js";import{d as X,c as g,a4 as Io,n as Ho,a as wo,f as h,w as zo,b as Po,o as Do,q as Ao,e as Oo,s as w,T as Ro}from"./vendor-M5lGV-wr.js";import{L as k}from"./icons-BFHq5fEF.js";import{g as Wo}from"./compact-item-BjZyyKpa.js";import{c as Lo}from"./createContext-D0Ztn7R_.js";import{u as _o}from"./Compact-DDeBOvFc.js";import{i as Mo}from"./initDefaultProps-DE_gVS_i.js";function yr(o){return o==="danger"?{danger:!0}:{type:o}}const No=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:So.any,href:String,target:String,title:String,onClick:Z(),onMousedown:Z()}),oo=o=>{o&&(o.style.width="0px",o.style.opacity="0",o.style.transform="scale(0)")},ro=o=>{Ho(()=>{o&&(o.style.width=`${o.scrollWidth}px`,o.style.opacity="1",o.style.transform="scale(1)")})},eo=o=>{o&&o.style&&(o.style.width=null,o.style.opacity=null,o.style.transform=null)},jo=X({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(o){return()=>{const{existIcon:r,prefixCls:l,loading:n}=o;if(r)return g("span",{class:`${l}-loading-icon`},[g(k,null,null)]);const i=!!n;return g(Io,{name:`${l}-loading-icon-motion`,onBeforeEnter:oo,onEnter:ro,onAfterEnter:eo,onBeforeLeave:ro,onLeave:a=>{setTimeout(()=>{oo(a)})},onAfterLeave:eo},{default:()=>[i?g("span",{class:`${l}-loading-icon`},[g(k,null,null)]):null]})}}}),to=(o,r)=>({[`> span, > ${o}`]:{"&:not(:last-child)":{[`&, & > ${o}`]:{"&:not(:disabled)":{borderInlineEndColor:r}}},"&:not(:first-child)":{[`&, & > ${o}`]:{"&:not(:disabled)":{borderInlineStartColor:r}}}}}),Go=o=>{const{componentCls:r,fontSize:l,lineWidth:n,colorPrimaryHover:i,colorErrorHover:a}=o;return{[`${r}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${r}`]:{"&:not(:last-child)":{[`&, & > ${r}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-n,[`&, & > ${r}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[r]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${r}-icon-only`]:{fontSize:l}},to(`${r}-primary`,i),to(`${r}-danger`,a)]}};function Vo(o,r){return{[`&-item:not(${r}-last-item)`]:{marginBottom:-o.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function Uo(o,r){return{[`&-item:not(${r}-first-item):not(${r}-last-item)`]:{borderRadius:0},[`&-item${r}-first-item:not(${r}-last-item)`]:{[`&, &${o}-sm, &${o}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${r}-last-item:not(${r}-first-item)`]:{[`&, &${o}-sm, &${o}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Xo(o){const r=`${o.componentCls}-compact-vertical`;return{[r]:e(e({},Vo(o,r)),Uo(o.componentCls,r))}}const qo=o=>{const{componentCls:r,iconCls:l}=o;return{[r]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${o.lineWidth}px ${o.lineType} transparent`,cursor:"pointer",transition:`all ${o.motionDurationMid} ${o.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:o.lineHeight,color:o.colorText,"> span":{display:"inline-block"},[`> ${l} + span, > span + ${l}`]:{marginInlineStart:o.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":e({},xo(o)),[`&-icon-only${r}-compact-item`]:{flex:"none"},[`&-compact-item${r}-primary`]:{[`&:not([disabled]) + ${r}-compact-item${r}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-o.lineWidth,insetInlineStart:-o.lineWidth,display:"inline-block",width:o.lineWidth,height:`calc(100% + ${o.lineWidth*2}px)`,backgroundColor:o.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${r}-primary`]:{[`&:not([disabled]) + ${r}-compact-vertical-item${r}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-o.lineWidth,insetInlineStart:-o.lineWidth,display:"inline-block",width:`calc(100% + ${o.lineWidth*2}px)`,height:o.lineWidth,backgroundColor:o.colorPrimaryHover,content:'""'}}}}}}},f=(o,r)=>({"&:not(:disabled)":{"&:hover":o,"&:active":r}}),Fo=o=>({minWidth:o.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),Jo=o=>({borderRadius:o.controlHeight,paddingInlineStart:o.controlHeight/2,paddingInlineEnd:o.controlHeight/2}),V=o=>({cursor:"not-allowed",borderColor:o.colorBorder,color:o.colorTextDisabled,backgroundColor:o.colorBgContainerDisabled,boxShadow:"none"}),P=(o,r,l,n,i,a,d)=>({[`&${o}-background-ghost`]:e(e({color:r||void 0,backgroundColor:"transparent",borderColor:l||void 0,boxShadow:"none"},f(e({backgroundColor:"transparent"},a),e({backgroundColor:"transparent"},d))),{"&:disabled":{cursor:"not-allowed",color:n||void 0,borderColor:i||void 0}})}),q=o=>({"&:disabled":e({},V(o))}),so=o=>e({},q(o)),D=o=>({"&:disabled":{cursor:"not-allowed",color:o.colorTextDisabled}}),uo=o=>e(e(e(e(e({},so(o)),{backgroundColor:o.colorBgContainer,borderColor:o.colorBorder,boxShadow:`0 ${o.controlOutlineWidth}px 0 ${o.controlTmpOutline}`}),f({color:o.colorPrimaryHover,borderColor:o.colorPrimaryHover},{color:o.colorPrimaryActive,borderColor:o.colorPrimaryActive})),P(o.componentCls,o.colorBgContainer,o.colorBgContainer,o.colorTextDisabled,o.colorBorder)),{[`&${o.componentCls}-dangerous`]:e(e(e({color:o.colorError,borderColor:o.colorError},f({color:o.colorErrorHover,borderColor:o.colorErrorBorderHover},{color:o.colorErrorActive,borderColor:o.colorErrorActive})),P(o.componentCls,o.colorError,o.colorError,o.colorTextDisabled,o.colorBorder)),q(o))}),Ko=o=>e(e(e(e(e({},so(o)),{color:o.colorTextLightSolid,backgroundColor:o.colorPrimary,boxShadow:`0 ${o.controlOutlineWidth}px 0 ${o.controlOutline}`}),f({color:o.colorTextLightSolid,backgroundColor:o.colorPrimaryHover},{color:o.colorTextLightSolid,backgroundColor:o.colorPrimaryActive})),P(o.componentCls,o.colorPrimary,o.colorPrimary,o.colorTextDisabled,o.colorBorder,{color:o.colorPrimaryHover,borderColor:o.colorPrimaryHover},{color:o.colorPrimaryActive,borderColor:o.colorPrimaryActive})),{[`&${o.componentCls}-dangerous`]:e(e(e({backgroundColor:o.colorError,boxShadow:`0 ${o.controlOutlineWidth}px 0 ${o.colorErrorOutline}`},f({backgroundColor:o.colorErrorHover},{backgroundColor:o.colorErrorActive})),P(o.componentCls,o.colorError,o.colorError,o.colorTextDisabled,o.colorBorder,{color:o.colorErrorHover,borderColor:o.colorErrorHover},{color:o.colorErrorActive,borderColor:o.colorErrorActive})),q(o))}),Qo=o=>e(e({},uo(o)),{borderStyle:"dashed"}),Yo=o=>e(e(e({color:o.colorLink},f({color:o.colorLinkHover},{color:o.colorLinkActive})),D(o)),{[`&${o.componentCls}-dangerous`]:e(e({color:o.colorError},f({color:o.colorErrorHover},{color:o.colorErrorActive})),D(o))}),Zo=o=>e(e(e({},f({color:o.colorText,backgroundColor:o.colorBgTextHover},{color:o.colorText,backgroundColor:o.colorBgTextActive})),D(o)),{[`&${o.componentCls}-dangerous`]:e(e({color:o.colorError},D(o)),f({color:o.colorErrorHover,backgroundColor:o.colorErrorBg},{color:o.colorErrorHover,backgroundColor:o.colorErrorBg}))}),ko=o=>e(e({},V(o)),{[`&${o.componentCls}:hover`]:e({},V(o))}),or=o=>{const{componentCls:r}=o;return{[`${r}-default`]:uo(o),[`${r}-primary`]:Ko(o),[`${r}-dashed`]:Qo(o),[`${r}-link`]:Yo(o),[`${r}-text`]:Zo(o),[`${r}-disabled`]:ko(o)}},F=function(o){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:l,iconCls:n,controlHeight:i,fontSize:a,lineHeight:d,lineWidth:c,borderRadius:p,buttonPaddingHorizontal:O}=o,x=Math.max(0,(i-a*d)/2-c),R=O-c,y=`${l}-icon-only`;return[{[`${l}${r}`]:{fontSize:a,height:i,padding:`${x}px ${R}px`,borderRadius:p,[`&${y}`]:{width:i,paddingInlineStart:0,paddingInlineEnd:0,[`&${l}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${l}-loading`]:{opacity:o.opacityLoading,cursor:"default"},[`${l}-loading-icon`]:{transition:`width ${o.motionDurationSlow} ${o.motionEaseInOut}, opacity ${o.motionDurationSlow} ${o.motionEaseInOut}`},[`&:not(${y}) ${l}-loading-icon > ${n}`]:{marginInlineEnd:o.marginXS}}},{[`${l}${l}-circle${r}`]:Fo(o)},{[`${l}${l}-round${r}`]:Jo(o)}]},rr=o=>F(o),er=o=>{const r=U(o,{controlHeight:o.controlHeightSM,padding:o.paddingXS,buttonPaddingHorizontal:8,borderRadius:o.borderRadiusSM});return F(r,`${o.componentCls}-sm`)},tr=o=>{const r=U(o,{controlHeight:o.controlHeightLG,fontSize:o.fontSizeLG,borderRadius:o.borderRadiusLG});return F(r,`${o.componentCls}-lg`)},lr=o=>{const{componentCls:r}=o;return{[r]:{[`&${r}-block`]:{width:"100%"}}}},nr=Co("Button",o=>{const{controlTmpOutline:r,paddingContentHorizontal:l}=o,n=U(o,{colorOutlineDefault:r,buttonPaddingHorizontal:l});return[qo(n),er(n),rr(n),tr(n),lr(n),or(n),Go(n),Wo(o,{focus:!1}),Xo(o)]}),ir=()=>({prefixCls:String,size:{type:String}}),go=Lo(),A=X({compatConfig:{MODE:3},name:"AButtonGroup",props:ir(),setup(o,r){let{slots:l}=r;const{prefixCls:n,direction:i}=io("btn-group",o),[,,a]=Bo();go.useProvide(wo({size:h(()=>o.size)}));const d=h(()=>{const{size:c}=o;let p="";switch(c){case"large":p="lg";break;case"small":p="sm";break;case"middle":case void 0:break;default:co(!c,"Button.Group","Invalid prop `size`.")}return{[`${n.value}`]:!0,[`${n.value}-${p}`]:p,[`${n.value}-rtl`]:i.value==="rtl",[a.value]:!0}});return()=>{var c;return g("div",{class:d.value},[ao((c=l.default)===null||c===void 0?void 0:c.call(l))])}}}),lo=/^[\u4e00-\u9fa5]{2}$/,no=lo.test.bind(lo);function z(o){return o==="text"||o==="link"}const C=X({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Mo(No(),{type:"default"}),slots:Object,setup(o,r){let{slots:l,attrs:n,emit:i,expose:a}=r;const{prefixCls:d,autoInsertSpaceInButton:c,direction:p,size:O}=io("btn",o),[x,R]=nr(d),y=go.useInject(),mo=Eo(),W=h(()=>{var t;return(t=o.disabled)!==null&&t!==void 0?t:mo.value}),$=w(null),B=w(void 0);let L=!1;const v=w(!1),S=w(!1),J=h(()=>c.value!==!1),{compactSize:po,compactItemClassnames:bo}=_o(d,p),_=h(()=>typeof o.loading=="object"&&o.loading.delay?o.loading.delay||!0:!!o.loading);zo(_,t=>{clearTimeout(B.value),typeof _.value=="number"?B.value=setTimeout(()=>{v.value=t},_.value):v.value=t},{immediate:!0});const fo=h(()=>{const{type:t,shape:u="default",ghost:b,block:m,danger:M}=o,s=d.value,E={large:"lg",small:"sm",middle:void 0},T=po.value||y?.size||O.value,I=T&&E[T]||"";return[bo.value,{[R.value]:!0,[`${s}`]:!0,[`${s}-${u}`]:u!=="default"&&u,[`${s}-${t}`]:t,[`${s}-${I}`]:I,[`${s}-loading`]:v.value,[`${s}-background-ghost`]:b&&!z(t),[`${s}-two-chinese-chars`]:S.value&&J.value,[`${s}-block`]:m,[`${s}-dangerous`]:!!M,[`${s}-rtl`]:p.value==="rtl"}]}),K=()=>{const t=$.value;if(!t||c.value===!1)return;const u=t.textContent;L&&no(u)?S.value||(S.value=!0):S.value&&(S.value=!1)},vo=t=>{if(v.value||W.value){t.preventDefault();return}i("click",t)},yo=t=>{i("mousedown",t)},ho=(t,u)=>{const b=u?" ":"";if(t.type===Ro){let m=t.children.trim();return no(m)&&(m=m.split("").join(b)),g("span",null,[m])}return t};return Po(()=>{co(!(o.ghost&&z(o.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Do(K),Ao(K),Oo(()=>{B.value&&clearTimeout(B.value)}),a({focus:()=>{var t;(t=$.value)===null||t===void 0||t.focus()},blur:()=>{var t;(t=$.value)===null||t===void 0||t.blur()}}),()=>{var t,u;const{icon:b=(t=l.icon)===null||t===void 0?void 0:t.call(l)}=o,m=ao((u=l.default)===null||u===void 0?void 0:u.call(l));L=m.length===1&&!b&&!z(o.type);const{type:M,htmlType:s,href:E,title:T,target:I}=o,$o=v.value?"loading":b,N=e(e({},n),{title:T,disabled:W.value,class:[fo.value,n.class,{[`${d.value}-icon-only`]:m.length===0&&!!$o}],onClick:vo,onMousedown:yo});W.value||delete N.disabled;const Q=b&&!v.value?b:g(jo,{existIcon:!!b,prefixCls:d.value,loading:!!v.value},null),Y=m.map(G=>ho(G,L&&J.value));if(E!==void 0)return x(g("a",H(H({},N),{},{href:E,target:I,ref:$}),[Q,Y]));let j=g("button",H(H({},N),{},{ref:$,type:s}),[Q,Y]);if(!z(M)){const G=(function(){return j})();j=g(To,{ref:"wave",disabled:!!v.value},{default:()=>[G]})}return x(j)}}});C.Group=A;C.install=function(o){return o.component(C.name,C),o.component(A.name,A),o};const hr=Object.freeze(Object.defineProperty({__proto__:null,ButtonGroup:A,default:C},Symbol.toStringTag,{value:"Module"}));export{C as B,No as b,yr as c,hr as i};
@@ -1 +1 @@
1
- import{P as v,h as i,ac as ee,t as I,i as k,l as te,m as q,r as oe,q as ne,M as re,U as le,ap as ae,s as ie,a8 as se,S as pe}from"./index-BAy0ks7N.js";import{T as ue}from"./Trigger-D4yonKuU.js";import{p as de,M as ce,g as fe,a as me}from"./placementArrow-CpNGMWxW.js";import{d as H,c as P,b as ge,s as R,r as z,w as ve,f as N}from"./vendor-M5lGV-wr.js";import{c as W}from"./vnode-DMH0ymoP.js";import{f as ye}from"./firstNotUndefined-CLFzEa0p.js";import{w as U}from"./raf-Deuc0E8-.js";import{i as be,g as Ce}from"./colors-qxXJ45GU.js";import{i as he}from"./zoom-DRmMxFNC.js";import{i as Pe}from"./initDefaultProps-Dp93Vlbv.js";const Oe={prefixCls:String,id:String,overlayInnerStyle:v.any},we=H({compatConfig:{MODE:3},name:"TooltipContent",props:Oe,setup(e,n){let{slots:a}=n;return()=>{var o;return P("div",{class:`${e.prefixCls}-inner`,id:e.id,role:"tooltip",style:e.overlayInnerStyle},[(o=a.overlay)===null||o===void 0?void 0:o.call(a)])}}});var Se=function(e,n){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(e);l<o.length;l++)n.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(a[o[l]]=e[o[l]]);return a};function X(){}const xe=H({compatConfig:{MODE:3},name:"Tooltip",inheritAttrs:!1,props:{trigger:v.any.def(["hover"]),defaultVisible:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:v.string.def("right"),transitionName:String,animation:v.any,afterVisibleChange:v.func.def(()=>{}),overlayStyle:{type:Object,default:void 0},overlayClassName:String,prefixCls:v.string.def("rc-tooltip"),mouseEnterDelay:v.number.def(.1),mouseLeaveDelay:v.number.def(.1),getPopupContainer:Function,destroyTooltipOnHide:{type:Boolean,default:!1},align:v.object.def(()=>({})),arrowContent:v.any.def(null),tipId:String,builtinPlacements:v.object,overlayInnerStyle:{type:Object,default:void 0},popupVisible:{type:Boolean,default:void 0},onVisibleChange:Function,onPopupAlign:Function,arrow:{type:Boolean,default:!0}},setup(e,n){let{slots:a,attrs:o,expose:l}=n;const p=R(),m=()=>{const{prefixCls:s,tipId:f,overlayInnerStyle:C}=e;return[e.arrow?P("div",{class:`${s}-arrow`,key:"arrow"},[ee(a,e,"arrowContent")]):null,P(we,{key:"content",prefixCls:s,id:f,overlayInnerStyle:C},{overlay:a.overlay})]};l({getPopupDomNode:()=>p.value.getPopupDomNode(),triggerDOM:p,forcePopupAlign:()=>{var s;return(s=p.value)===null||s===void 0?void 0:s.forcePopupAlign()}});const b=R(!1),w=R(!1);return ge(()=>{const{destroyTooltipOnHide:s}=e;if(typeof s=="boolean")b.value=s;else if(s&&typeof s=="object"){const{keepParent:f}=s;b.value=f===!0,w.value=f===!1}}),()=>{const{overlayClassName:s,trigger:f,mouseEnterDelay:C,mouseLeaveDelay:S,overlayStyle:O,prefixCls:B,afterVisibleChange:M,transitionName:_,animation:x,placement:$,align:j,destroyTooltipOnHide:F,defaultVisible:A}=e,V=Se(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible"]),D=i({},V);e.visible!==void 0&&(D.popupVisible=e.visible);const E=i(i(i({popupClassName:s,prefixCls:B,action:f,builtinPlacements:de,popupPlacement:$,popupAlign:j,afterPopupVisibleChange:M,popupTransitionName:_,popupAnimation:x,defaultPopupVisible:A,destroyPopupOnHide:b.value,autoDestroy:w.value,mouseLeaveDelay:S,popupStyle:O,mouseEnterDelay:C},D),o),{onPopupVisibleChange:e.onVisibleChange||X,onPopupAlign:e.onPopupAlign||X,ref:p,arrow:!!e.arrow,popup:m()});return P(ue,E,{default:a.default})}}}),Te=(()=>({trigger:[String,Array],open:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:String,color:String,transitionName:String,overlayStyle:I(),overlayInnerStyle:I(),overlayClassName:String,openClassName:String,prefixCls:String,mouseEnterDelay:Number,mouseLeaveDelay:Number,getPopupContainer:Function,arrowPointAtCenter:{type:Boolean,default:void 0},arrow:{type:[Boolean,Object],default:!0},autoAdjustOverflow:{type:[Boolean,Object],default:void 0},destroyTooltipOnHide:{type:Boolean,default:void 0},align:I(),builtinPlacements:I(),children:Array,onVisibleChange:Function,"onUpdate:visible":Function,onOpenChange:Function,"onUpdate:open":Function}));function Ae(e,n){const a=be(n),o=k({[`${e}-${n}`]:n&&a}),l={},p={};return n&&!a&&(l.background=n,p["--antd-arrow-background-color"]=n),{className:o,overlayStyle:l,arrowStyle:p}}const Ne=e=>{const{componentCls:n,tooltipMaxWidth:a,tooltipColor:o,tooltipBg:l,tooltipBorderRadius:p,zIndexPopup:m,controlHeight:y,boxShadowSecondary:b,paddingSM:w,paddingXS:s,tooltipRadiusOuter:f}=e;return[{[n]:i(i(i(i({},oe(e)),{position:"absolute",zIndex:m,display:"block","&":[{width:"max-content"},{width:"intrinsic"}],maxWidth:a,visibility:"visible","&-hidden":{display:"none"},"--antd-arrow-background-color":l,[`${n}-inner`]:{minWidth:y,minHeight:y,padding:`${w/2}px ${s}px`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:l,borderRadius:p,boxShadow:b},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:Math.min(p,ce)}},[`${n}-content`]:{position:"relative"}}),Ce(e,(C,S)=>{let{darkColor:O}=S;return{[`&${n}-${C}`]:{[`${n}-inner`]:{backgroundColor:O},[`${n}-arrow`]:{"--antd-arrow-background-color":O}}}})),{"&-rtl":{direction:"rtl"}})},fe(q(e,{borderRadiusOuter:f}),{colorBg:"var(--antd-arrow-background-color)",showArrowCls:"",contentRadius:p,limitVerticalRadius:!0}),{[`${n}-pure`]:{position:"relative",maxWidth:"none"}}]},_e=((e,n)=>te("Tooltip",o=>{if(n?.value===!1)return[];const{borderRadius:l,colorTextLightSolid:p,colorBgDefault:m,borderRadiusOuter:y}=o,b=q(o,{tooltipMaxWidth:250,tooltipColor:p,tooltipBorderRadius:l,tooltipBg:m,tooltipRadiusOuter:y>4?4:y});return[Ne(b),he(o,"zoom-big-fast")]},o=>{let{zIndexPopupBase:l,colorBgSpotlight:p}=o;return{zIndexPopup:l+70,colorBgDefault:p}})(e)),De=(e,n)=>{const a={},o=i({},e);return n.forEach(l=>{e&&l in e&&(a[l]=e[l],delete o[l])}),{picked:a,omitted:o}},Z=()=>i(i({},Te()),{title:v.any}),ze=()=>({trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),Ie=H({compatConfig:{MODE:3},name:"ATooltip",inheritAttrs:!1,props:Pe(Z(),{trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),slots:Object,setup(e,n){let{slots:a,emit:o,attrs:l,expose:p}=n;const{prefixCls:m,getPopupContainer:y,direction:b,rootPrefixCls:w}=ne("tooltip",e),s=N(()=>{var t;return(t=e.open)!==null&&t!==void 0?t:e.visible}),f=z(ye([e.open,e.visible])),C=z();let S;ve(s,t=>{U.cancel(S),S=U(()=>{f.value=!!t})});const O=()=>{var t;const r=(t=e.title)!==null&&t!==void 0?t:a.title;return!r&&r!==0},B=t=>{const r=O();s.value===void 0&&(f.value=r?!1:t),r||(o("update:visible",t),o("visibleChange",t),o("update:open",t),o("openChange",t))};p({getPopupDomNode:()=>C.value.getPopupDomNode(),open:f,forcePopupAlign:()=>{var t;return(t=C.value)===null||t===void 0?void 0:t.forcePopupAlign()}});const _=N(()=>{var t;const{builtinPlacements:r,autoAdjustOverflow:h,arrow:d,arrowPointAtCenter:g}=e;let u=g;return typeof d=="object"&&(u=(t=d.pointAtCenter)!==null&&t!==void 0?t:g),r||me({arrowPointAtCenter:u,autoAdjustOverflow:h})}),x=t=>t||t==="",$=t=>{const r=t.type;if(typeof r=="object"&&t.props&&((r.__ANT_BUTTON===!0||r==="button")&&x(t.props.disabled)||r.__ANT_SWITCH===!0&&(x(t.props.disabled)||x(t.props.loading))||r.__ANT_RADIO===!0&&x(t.props.disabled))){const{picked:h,omitted:d}=De(se(t),["position","left","right","top","bottom","float","display","zIndex"]),g=i(i({display:"inline-block"},h),{cursor:"not-allowed",lineHeight:1,width:t.props&&t.props.block?"100%":void 0}),u=i(i({},d),{pointerEvents:"none"}),c=W(t,{style:u},!0);return P("span",{style:g,class:`${m.value}-disabled-compatible-wrapper`},[c])}return t},j=()=>{var t,r;return(t=e.title)!==null&&t!==void 0?t:(r=a.title)===null||r===void 0?void 0:r.call(a)},F=(t,r)=>{const h=_.value,d=Object.keys(h).find(g=>{var u,c;return h[g].points[0]===((u=r.points)===null||u===void 0?void 0:u[0])&&h[g].points[1]===((c=r.points)===null||c===void 0?void 0:c[1])});if(d){const g=t.getBoundingClientRect(),u={top:"50%",left:"50%"};d.indexOf("top")>=0||d.indexOf("Bottom")>=0?u.top=`${g.height-r.offset[1]}px`:(d.indexOf("Top")>=0||d.indexOf("bottom")>=0)&&(u.top=`${-r.offset[1]}px`),d.indexOf("left")>=0||d.indexOf("Right")>=0?u.left=`${g.width-r.offset[0]}px`:(d.indexOf("right")>=0||d.indexOf("Left")>=0)&&(u.left=`${-r.offset[0]}px`),t.style.transformOrigin=`${u.left} ${u.top}`}},A=N(()=>Ae(m.value,e.color)),V=N(()=>l["data-popover-inject"]),[D,E]=_e(m,N(()=>!V.value));return()=>{var t,r;const{openClassName:h,overlayClassName:d,overlayStyle:g,overlayInnerStyle:u}=e;let c=(r=re((t=a.default)===null||t===void 0?void 0:t.call(a)))!==null&&r!==void 0?r:null;c=c.length===1?c[0]:c;let L=f.value;if(s.value===void 0&&O()&&(L=!1),!c)return null;const T=$(le(c)&&!ae(c)?c:P("span",null,[c])),G=k({[h||`${m.value}-open`]:!0,[T.props&&T.props.class]:T.props&&T.props.class}),J=k(d,{[`${m.value}-rtl`]:b.value==="rtl"},A.value.className,E.value),K=i(i({},A.value.overlayStyle),u),Q=A.value.arrowStyle,Y=i(i(i({},l),e),{prefixCls:m.value,arrow:!!e.arrow,getPopupContainer:y?.value,builtinPlacements:_.value,visible:L,ref:C,overlayClassName:J,overlayStyle:i(i({},Q),g),overlayInnerStyle:K,onVisibleChange:B,onPopupAlign:F,transitionName:ie(w.value,"zoom-big-fast",e.transitionName)});return D(P(xe,Y,{default:()=>[f.value?W(T,{class:G}):T],arrowContent:()=>P("span",{class:`${m.value}-arrow-content`},null),overlay:j}))}}}),Be=pe(Ie),We=Object.freeze(Object.defineProperty({__proto__:null,default:Be,tooltipProps:Z},Symbol.toStringTag,{value:"Module"}));export{Be as T,Te as a,Z as b,We as i,ze as t};
1
+ import{P as v,h as i,ac as ee,t as I,i as k,l as te,m as q,r as oe,q as ne,M as re,U as le,ap as ae,s as ie,a8 as se,S as pe}from"./index-B_juAGfN.js";import{T as ue}from"./Trigger-HxLdC9ne.js";import{p as de,M as ce,g as fe,a as me}from"./placementArrow-BYkdt9jF.js";import{d as H,c as P,b as ge,s as R,r as z,w as ve,f as N}from"./vendor-M5lGV-wr.js";import{c as W}from"./vnode-CDF4X084.js";import{f as ye}from"./firstNotUndefined-CLFzEa0p.js";import{w as U}from"./raf-Deuc0E8-.js";import{i as be,g as Ce}from"./colors-DTTx1bVY.js";import{i as he}from"./zoom-C9FCvBpV.js";import{i as Pe}from"./initDefaultProps-DE_gVS_i.js";const Oe={prefixCls:String,id:String,overlayInnerStyle:v.any},we=H({compatConfig:{MODE:3},name:"TooltipContent",props:Oe,setup(e,n){let{slots:a}=n;return()=>{var o;return P("div",{class:`${e.prefixCls}-inner`,id:e.id,role:"tooltip",style:e.overlayInnerStyle},[(o=a.overlay)===null||o===void 0?void 0:o.call(a)])}}});var Se=function(e,n){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(e);l<o.length;l++)n.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(a[o[l]]=e[o[l]]);return a};function X(){}const xe=H({compatConfig:{MODE:3},name:"Tooltip",inheritAttrs:!1,props:{trigger:v.any.def(["hover"]),defaultVisible:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:v.string.def("right"),transitionName:String,animation:v.any,afterVisibleChange:v.func.def(()=>{}),overlayStyle:{type:Object,default:void 0},overlayClassName:String,prefixCls:v.string.def("rc-tooltip"),mouseEnterDelay:v.number.def(.1),mouseLeaveDelay:v.number.def(.1),getPopupContainer:Function,destroyTooltipOnHide:{type:Boolean,default:!1},align:v.object.def(()=>({})),arrowContent:v.any.def(null),tipId:String,builtinPlacements:v.object,overlayInnerStyle:{type:Object,default:void 0},popupVisible:{type:Boolean,default:void 0},onVisibleChange:Function,onPopupAlign:Function,arrow:{type:Boolean,default:!0}},setup(e,n){let{slots:a,attrs:o,expose:l}=n;const p=R(),m=()=>{const{prefixCls:s,tipId:f,overlayInnerStyle:C}=e;return[e.arrow?P("div",{class:`${s}-arrow`,key:"arrow"},[ee(a,e,"arrowContent")]):null,P(we,{key:"content",prefixCls:s,id:f,overlayInnerStyle:C},{overlay:a.overlay})]};l({getPopupDomNode:()=>p.value.getPopupDomNode(),triggerDOM:p,forcePopupAlign:()=>{var s;return(s=p.value)===null||s===void 0?void 0:s.forcePopupAlign()}});const b=R(!1),w=R(!1);return ge(()=>{const{destroyTooltipOnHide:s}=e;if(typeof s=="boolean")b.value=s;else if(s&&typeof s=="object"){const{keepParent:f}=s;b.value=f===!0,w.value=f===!1}}),()=>{const{overlayClassName:s,trigger:f,mouseEnterDelay:C,mouseLeaveDelay:S,overlayStyle:O,prefixCls:B,afterVisibleChange:M,transitionName:_,animation:x,placement:$,align:j,destroyTooltipOnHide:F,defaultVisible:A}=e,V=Se(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible"]),D=i({},V);e.visible!==void 0&&(D.popupVisible=e.visible);const E=i(i(i({popupClassName:s,prefixCls:B,action:f,builtinPlacements:de,popupPlacement:$,popupAlign:j,afterPopupVisibleChange:M,popupTransitionName:_,popupAnimation:x,defaultPopupVisible:A,destroyPopupOnHide:b.value,autoDestroy:w.value,mouseLeaveDelay:S,popupStyle:O,mouseEnterDelay:C},D),o),{onPopupVisibleChange:e.onVisibleChange||X,onPopupAlign:e.onPopupAlign||X,ref:p,arrow:!!e.arrow,popup:m()});return P(ue,E,{default:a.default})}}}),Te=(()=>({trigger:[String,Array],open:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:String,color:String,transitionName:String,overlayStyle:I(),overlayInnerStyle:I(),overlayClassName:String,openClassName:String,prefixCls:String,mouseEnterDelay:Number,mouseLeaveDelay:Number,getPopupContainer:Function,arrowPointAtCenter:{type:Boolean,default:void 0},arrow:{type:[Boolean,Object],default:!0},autoAdjustOverflow:{type:[Boolean,Object],default:void 0},destroyTooltipOnHide:{type:Boolean,default:void 0},align:I(),builtinPlacements:I(),children:Array,onVisibleChange:Function,"onUpdate:visible":Function,onOpenChange:Function,"onUpdate:open":Function}));function Ae(e,n){const a=be(n),o=k({[`${e}-${n}`]:n&&a}),l={},p={};return n&&!a&&(l.background=n,p["--antd-arrow-background-color"]=n),{className:o,overlayStyle:l,arrowStyle:p}}const Ne=e=>{const{componentCls:n,tooltipMaxWidth:a,tooltipColor:o,tooltipBg:l,tooltipBorderRadius:p,zIndexPopup:m,controlHeight:y,boxShadowSecondary:b,paddingSM:w,paddingXS:s,tooltipRadiusOuter:f}=e;return[{[n]:i(i(i(i({},oe(e)),{position:"absolute",zIndex:m,display:"block","&":[{width:"max-content"},{width:"intrinsic"}],maxWidth:a,visibility:"visible","&-hidden":{display:"none"},"--antd-arrow-background-color":l,[`${n}-inner`]:{minWidth:y,minHeight:y,padding:`${w/2}px ${s}px`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:l,borderRadius:p,boxShadow:b},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:Math.min(p,ce)}},[`${n}-content`]:{position:"relative"}}),Ce(e,(C,S)=>{let{darkColor:O}=S;return{[`&${n}-${C}`]:{[`${n}-inner`]:{backgroundColor:O},[`${n}-arrow`]:{"--antd-arrow-background-color":O}}}})),{"&-rtl":{direction:"rtl"}})},fe(q(e,{borderRadiusOuter:f}),{colorBg:"var(--antd-arrow-background-color)",showArrowCls:"",contentRadius:p,limitVerticalRadius:!0}),{[`${n}-pure`]:{position:"relative",maxWidth:"none"}}]},_e=((e,n)=>te("Tooltip",o=>{if(n?.value===!1)return[];const{borderRadius:l,colorTextLightSolid:p,colorBgDefault:m,borderRadiusOuter:y}=o,b=q(o,{tooltipMaxWidth:250,tooltipColor:p,tooltipBorderRadius:l,tooltipBg:m,tooltipRadiusOuter:y>4?4:y});return[Ne(b),he(o,"zoom-big-fast")]},o=>{let{zIndexPopupBase:l,colorBgSpotlight:p}=o;return{zIndexPopup:l+70,colorBgDefault:p}})(e)),De=(e,n)=>{const a={},o=i({},e);return n.forEach(l=>{e&&l in e&&(a[l]=e[l],delete o[l])}),{picked:a,omitted:o}},Z=()=>i(i({},Te()),{title:v.any}),ze=()=>({trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),Ie=H({compatConfig:{MODE:3},name:"ATooltip",inheritAttrs:!1,props:Pe(Z(),{trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),slots:Object,setup(e,n){let{slots:a,emit:o,attrs:l,expose:p}=n;const{prefixCls:m,getPopupContainer:y,direction:b,rootPrefixCls:w}=ne("tooltip",e),s=N(()=>{var t;return(t=e.open)!==null&&t!==void 0?t:e.visible}),f=z(ye([e.open,e.visible])),C=z();let S;ve(s,t=>{U.cancel(S),S=U(()=>{f.value=!!t})});const O=()=>{var t;const r=(t=e.title)!==null&&t!==void 0?t:a.title;return!r&&r!==0},B=t=>{const r=O();s.value===void 0&&(f.value=r?!1:t),r||(o("update:visible",t),o("visibleChange",t),o("update:open",t),o("openChange",t))};p({getPopupDomNode:()=>C.value.getPopupDomNode(),open:f,forcePopupAlign:()=>{var t;return(t=C.value)===null||t===void 0?void 0:t.forcePopupAlign()}});const _=N(()=>{var t;const{builtinPlacements:r,autoAdjustOverflow:h,arrow:d,arrowPointAtCenter:g}=e;let u=g;return typeof d=="object"&&(u=(t=d.pointAtCenter)!==null&&t!==void 0?t:g),r||me({arrowPointAtCenter:u,autoAdjustOverflow:h})}),x=t=>t||t==="",$=t=>{const r=t.type;if(typeof r=="object"&&t.props&&((r.__ANT_BUTTON===!0||r==="button")&&x(t.props.disabled)||r.__ANT_SWITCH===!0&&(x(t.props.disabled)||x(t.props.loading))||r.__ANT_RADIO===!0&&x(t.props.disabled))){const{picked:h,omitted:d}=De(se(t),["position","left","right","top","bottom","float","display","zIndex"]),g=i(i({display:"inline-block"},h),{cursor:"not-allowed",lineHeight:1,width:t.props&&t.props.block?"100%":void 0}),u=i(i({},d),{pointerEvents:"none"}),c=W(t,{style:u},!0);return P("span",{style:g,class:`${m.value}-disabled-compatible-wrapper`},[c])}return t},j=()=>{var t,r;return(t=e.title)!==null&&t!==void 0?t:(r=a.title)===null||r===void 0?void 0:r.call(a)},F=(t,r)=>{const h=_.value,d=Object.keys(h).find(g=>{var u,c;return h[g].points[0]===((u=r.points)===null||u===void 0?void 0:u[0])&&h[g].points[1]===((c=r.points)===null||c===void 0?void 0:c[1])});if(d){const g=t.getBoundingClientRect(),u={top:"50%",left:"50%"};d.indexOf("top")>=0||d.indexOf("Bottom")>=0?u.top=`${g.height-r.offset[1]}px`:(d.indexOf("Top")>=0||d.indexOf("bottom")>=0)&&(u.top=`${-r.offset[1]}px`),d.indexOf("left")>=0||d.indexOf("Right")>=0?u.left=`${g.width-r.offset[0]}px`:(d.indexOf("right")>=0||d.indexOf("Left")>=0)&&(u.left=`${-r.offset[0]}px`),t.style.transformOrigin=`${u.left} ${u.top}`}},A=N(()=>Ae(m.value,e.color)),V=N(()=>l["data-popover-inject"]),[D,E]=_e(m,N(()=>!V.value));return()=>{var t,r;const{openClassName:h,overlayClassName:d,overlayStyle:g,overlayInnerStyle:u}=e;let c=(r=re((t=a.default)===null||t===void 0?void 0:t.call(a)))!==null&&r!==void 0?r:null;c=c.length===1?c[0]:c;let L=f.value;if(s.value===void 0&&O()&&(L=!1),!c)return null;const T=$(le(c)&&!ae(c)?c:P("span",null,[c])),G=k({[h||`${m.value}-open`]:!0,[T.props&&T.props.class]:T.props&&T.props.class}),J=k(d,{[`${m.value}-rtl`]:b.value==="rtl"},A.value.className,E.value),K=i(i({},A.value.overlayStyle),u),Q=A.value.arrowStyle,Y=i(i(i({},l),e),{prefixCls:m.value,arrow:!!e.arrow,getPopupContainer:y?.value,builtinPlacements:_.value,visible:L,ref:C,overlayClassName:J,overlayStyle:i(i({},Q),g),overlayInnerStyle:K,onVisibleChange:B,onPopupAlign:F,transitionName:ie(w.value,"zoom-big-fast",e.transitionName)});return D(P(xe,Y,{default:()=>[f.value?W(T,{class:G}):T],arrowContent:()=>P("span",{class:`${m.value}-arrow-content`},null),overlay:j}))}}}),Be=pe(Ie),We=Object.freeze(Object.defineProperty({__proto__:null,default:Be,tooltipProps:Z},Symbol.toStringTag,{value:"Module"}));export{Be as T,Te as a,Z as b,We as i,ze as t};
@@ -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-BAy0ks7N.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-DY9VpXfa.js";import{c as he}from"./vnode-DMH0ymoP.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},
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-B_juAGfN.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-BFHq5fEF.js";import{c as he}from"./vnode-CDF4X084.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{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-BAy0ks7N.js";import{u as W}from"./useFlexGapSupport-BQ4jJS_s.js";import{a as H,C as h}from"./Compact-D4E0roed.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-DY9VpXfa.js";import"./styleChecker-DgazP1mu.js";import"./createContext-CulBut34.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
+ 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-B_juAGfN.js";import{u as W}from"./useFlexGapSupport-B6q6zt9X.js";import{a as H,C as h}from"./Compact-DDeBOvFc.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-BFHq5fEF.js";import"./styleChecker-DZZx_bHs.js";import"./createContext-D0Ztn7R_.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};
@@ -0,0 +1 @@
1
+ import{A as o}from"./Row-BwDaJw-R.js";import{S as t}from"./index-B_juAGfN.js";import"./responsiveObserve-C2ES6P0V.js";import"./vendor-M5lGV-wr.js";import"./useFlexGapSupport-B6q6zt9X.js";import"./styleChecker-DZZx_bHs.js";import"./index-By4zsU8r.js";import"./icons-BFHq5fEF.js";const l=t(o);export{l as default};
@@ -1 +1 @@
1
- import{h as i,i as F,P as T,q as L,M as lt,l as it,m as st,r as Y,K as O,f as z,ac as ut,J as ct,g as dt}from"./index-BAy0ks7N.js";import{d as W,a as mt,w as G,x as gt,c as v,f,r as R,a4 as bt,a2 as ft,a3 as vt}from"./vendor-M5lGV-wr.js";import{c as Q}from"./vnode-DMH0ymoP.js";import{g as q,i as k}from"./colors-qxXJ45GU.js";import{i as pt}from"./isNumeric-DjvBa-1E.js";import"./icons-DY9VpXfa.js";function J(t){let{prefixCls:o,value:a,current:e,offset:n=0}=t,c;return n&&(c={position:"absolute",top:`${n}00%`,left:0}),v("p",{style:c,class:F(`${o}-only-unit`,{current:e})},[a])}function ht(t,o,a){let e=t,n=0;for(;(e+10)%10!==o;)e+=a,n+=a;return n}const $t=W({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(t){const o=f(()=>Number(t.value)),a=f(()=>Math.abs(t.count)),e=mt({prevValue:o.value,prevCount:a.value}),n=()=>{e.prevValue=o.value,e.prevCount=a.value},c=R();return G(o,()=>{clearTimeout(c.value),c.value=setTimeout(()=>{n()},1e3)},{flush:"post"}),gt(()=>{clearTimeout(c.value)}),()=>{let d,p={};const s=o.value;if(e.prevValue===s||Number.isNaN(s)||Number.isNaN(e.prevValue))d=[J(i(i({},t),{current:!0}))],p={transition:"none"};else{d=[];const h=s+10,m=[];for(let r=s;r<=h;r+=1)m.push(r);const l=m.findIndex(r=>r%10===e.prevValue);d=m.map((r,y)=>{const $=r%10;return J(i(i({},t),{value:$,offset:y-l,current:y===l}))});const u=e.prevCount<a.value?1:-1;p={transform:`translateY(${-ht(e.prevValue,s,u)}00%)`}}return v("span",{class:`${t.prefixCls}-only`,style:p,onTransitionend:()=>n()},[d])}}});var St=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const yt={prefixCls:String,count:T.any,component:String,title:T.any,show:Boolean},Ct=W({compatConfig:{MODE:3},name:"ScrollNumber",inheritAttrs:!1,props:yt,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n}=L("scroll-number",t);return()=>{var c;const d=i(i({},t),a),{prefixCls:p,count:s,title:h,show:m,component:l="sup",class:u,style:r}=d,y=St(d,["prefixCls","count","title","show","component","class","style"]),$=i(i({},y),{style:r,"data-show":t.show,class:F(n.value,u),title:h});let g=s;if(s&&Number(s)%1===0){const b=String(s).split("");g=b.map((P,B)=>v($t,{prefixCls:n.value,count:Number(s),value:P,key:b.length-B},null))}r&&r.borderColor&&($.style=i(i({},r),{boxShadow:`0 0 0 1px ${r.borderColor} inset`}));const S=lt((c=e.default)===null||c===void 0?void 0:c.call(e));return S&&S.length?Q(S,{class:F(`${n.value}-custom-component`)},!1):v(l,$,{default:()=>[g]})}}}),xt=new O("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),wt=new O("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Nt=new O("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Ot=new O("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Pt=new O("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),Bt=new O("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),It=t=>{const{componentCls:o,iconCls:a,antCls:e,badgeFontHeight:n,badgeShadowSize:c,badgeHeightSm:d,motionDurationSlow:p,badgeStatusSize:s,marginXS:h,badgeRibbonOffset:m}=t,l=`${e}-scroll-number`,u=`${e}-ribbon`,r=`${e}-ribbon-wrapper`,y=q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${o} ${o}-color-${g}`]:{background:b,[`&:not(${o}-count)`]:{color:b}}}}),$=q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${u}-color-${g}`]:{background:b,color:b}}});return{[o]:i(i(i(i({},Y(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${o}-count`]:{zIndex:t.badgeZIndex,minWidth:t.badgeHeight,height:t.badgeHeight,color:t.badgeTextColor,fontWeight:t.badgeFontWeight,fontSize:t.badgeFontSize,lineHeight:`${t.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:t.badgeHeight/2,boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${o}-count-sm`]:{minWidth:d,height:d,fontSize:t.badgeFontSizeSm,lineHeight:`${d}px`,borderRadius:d/2},[`${o}-multiple-words`]:{padding:`0 ${t.paddingXS}px`},[`${o}-dot`]:{zIndex:t.badgeZIndex,width:t.badgeDotSize,minWidth:t.badgeDotSize,height:t.badgeDotSize,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`},[`${o}-dot${l}`]:{transition:`background ${p}`},[`${o}-count, ${o}-dot, ${l}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${a}-spin`]:{animationName:Bt,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${o}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${o}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${o}-status-success`]:{backgroundColor:t.colorSuccess},[`${o}-status-processing`]:{overflow:"visible",color:t.colorPrimary,backgroundColor:t.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:c,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:xt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${o}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${o}-status-error`]:{backgroundColor:t.colorError},[`${o}-status-warning`]:{backgroundColor:t.colorWarning},[`${o}-status-text`]:{marginInlineStart:h,color:t.colorText,fontSize:t.fontSize}}}),y),{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:wt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${o}-zoom-leave`]:{animationName:Nt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${o}-not-a-wrapper`]:{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:Ot,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${o}-zoom-leave`]:{animationName:Pt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${o}-status)`]:{verticalAlign:"middle"},[`${l}-custom-component, ${o}-count`]:{transform:"none"},[`${l}-custom-component, ${l}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${l}`]:{overflow:"hidden",[`${l}-only`]:{position:"relative",display:"inline-block",height:t.badgeHeight,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${l}-only-unit`]:{height:t.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${l}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${o}-count, ${o}-dot, ${l}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${r}`]:{position:"relative"},[`${u}`]:i(i(i(i({},Y(t)),{position:"absolute",top:h,padding:`0 ${t.paddingXS}px`,color:t.colorPrimary,lineHeight:`${n}px`,whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${u}-text`]:{color:t.colorTextLightSolid},[`${u}-corner`]:{position:"absolute",top:"100%",width:m,height:m,color:"currentcolor",border:`${m/2}px solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),$),{[`&${u}-placement-end`]:{insetInlineEnd:-m,borderEndEndRadius:0,[`${u}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${u}-placement-start`]:{insetInlineStart:-m,borderEndStartRadius:0,[`${u}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},tt=it("Badge",t=>{const{fontSize:o,lineHeight:a,fontSizeSM:e,lineWidth:n,marginXS:c,colorBorderBg:d}=t,p=Math.round(o*a),s=n,h="auto",m=p-2*s,l=t.colorBgContainer,u="normal",r=e,y=t.colorError,$=t.colorErrorHover,g=o,S=e/2,b=e,P=e/2,B=st(t,{badgeFontHeight:p,badgeShadowSize:s,badgeZIndex:h,badgeHeight:m,badgeTextColor:l,badgeFontWeight:u,badgeFontSize:r,badgeColor:y,badgeColorHover:$,badgeShadowColor:d,badgeHeightSm:g,badgeDotSize:S,badgeFontSizeSm:b,badgeStatusSize:P,badgeProcessingDuration:"1.2s",badgeRibbonOffset:c,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[It(B)]});var zt=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const Tt=()=>({prefix:String,color:{type:String},text:T.any,placement:{type:String,default:"end"}}),V=W({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:Tt(),slots:Object,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n,direction:c}=L("ribbon",t),[d,p]=tt(n),s=f(()=>k(t.color,!1)),h=f(()=>[n.value,`${n.value}-placement-${t.placement}`,{[`${n.value}-rtl`]:c.value==="rtl",[`${n.value}-color-${t.color}`]:s.value}]);return()=>{var m,l;const{class:u,style:r}=a,y=zt(a,["class","style"]),$={},g={};return t.color&&!s.value&&($.background=t.color,g.color=t.color),d(v("div",z({class:`${n.value}-wrapper ${p.value}`},y),[(m=e.default)===null||m===void 0?void 0:m.call(e),v("div",{class:[h.value,u,p.value],style:i(i({},$),r)},[v("span",{class:`${n.value}-text`},[t.text||((l=e.text)===null||l===void 0?void 0:l.call(e))]),v("div",{class:`${n.value}-corner`,style:g},null)])]))}}}),Et=()=>({count:T.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:T.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),M=W({compatConfig:{MODE:3},name:"ABadge",Ribbon:V,inheritAttrs:!1,props:Et(),slots:Object,setup(t,o){let{slots:a,attrs:e}=o;const{prefixCls:n,direction:c}=L("badge",t),[d,p]=tt(n),s=f(()=>t.count>t.overflowCount?`${t.overflowCount}+`:t.count),h=f(()=>s.value==="0"||s.value===0),m=f(()=>t.count===null||h.value&&!t.showZero),l=f(()=>(t.status!==null&&t.status!==void 0||t.color!==null&&t.color!==void 0)&&m.value),u=f(()=>t.dot&&!h.value),r=f(()=>u.value?"":s.value),y=f(()=>(r.value===null||r.value===void 0||r.value===""||h.value&&!t.showZero)&&!u.value),$=R(t.count),g=R(r.value),S=R(u.value);G([()=>t.count,r,u],()=>{y.value||($.value=t.count,g.value=r.value,S.value=u.value)},{immediate:!0});const b=f(()=>k(t.color,!1)),P=f(()=>({[`${n.value}-status-dot`]:l.value,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value})),B=f(()=>t.color&&!b.value?{background:t.color,color:t.color}:{}),et=f(()=>({[`${n.value}-dot`]:S.value,[`${n.value}-count`]:!S.value,[`${n.value}-count-sm`]:t.size==="small",[`${n.value}-multiple-words`]:!S.value&&g.value&&g.value.toString().length>1,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value}));return()=>{var E,_;const{offset:N,title:Z,color:X}=t,U=e.style,j=ut(a,t,"text"),x=n.value,C=$.value;let w=ct((E=a.default)===null||E===void 0?void 0:E.call(a));w=w.length?w:null;const A=!!(!y.value||a.count),D=(()=>{if(!N)return i({},U);const I={marginTop:pt(N[1])?`${N[1]}px`:N[1]};return c.value==="rtl"?I.left=`${parseInt(N[0],10)}px`:I.right=`${-parseInt(N[0],10)}px`,i(i({},I),U)})(),ot=Z??(typeof C=="string"||typeof C=="number"?C:void 0),nt=A||!j?null:v("span",{class:`${x}-status-text`},[j]),at=typeof C=="object"||C===void 0&&a.count?Q(C??((_=a.count)===null||_===void 0?void 0:_.call(a)),{style:D},!1):null,K=F(x,{[`${x}-status`]:l.value,[`${x}-not-a-wrapper`]:!w,[`${x}-rtl`]:c.value==="rtl"},e.class,p.value);if(!w&&l.value){const I=D.color;return d(v("span",z(z({},e),{},{class:K,style:D}),[v("span",{class:P.value,style:B.value},null),v("span",{style:{color:I},class:`${x}-status-text`},[j])]))}const rt=dt(w?`${x}-zoom`:"",{appear:!1});let H=i(i({},D),t.numberStyle);return X&&!b.value&&(H=H||{},H.background=X),d(v("span",z(z({},e),{},{class:K}),[w,v(bt,rt,{default:()=>[ft(v(Ct,{prefixCls:t.scrollNumberPrefixCls,show:A,class:et.value,count:g.value,title:ot,style:H,key:"scrollNumber"},{default:()=>[at]}),[[vt,A]])]}),nt]))}}});M.install=function(t){return t.component(M.name,M),t.component(V.name,V),t};export{V as BadgeRibbon,M as default};
1
+ import{h as i,i as F,P as T,q as L,M as lt,l as it,m as st,r as Y,K as O,f as z,ac as ut,J as ct,g as dt}from"./index-B_juAGfN.js";import{d as W,a as mt,w as G,x as gt,c as v,f,r as R,a4 as bt,a2 as ft,a3 as vt}from"./vendor-M5lGV-wr.js";import{c as Q}from"./vnode-CDF4X084.js";import{g as q,i as k}from"./colors-DTTx1bVY.js";import{i as pt}from"./isNumeric-DjvBa-1E.js";import"./icons-BFHq5fEF.js";function J(t){let{prefixCls:o,value:a,current:e,offset:n=0}=t,c;return n&&(c={position:"absolute",top:`${n}00%`,left:0}),v("p",{style:c,class:F(`${o}-only-unit`,{current:e})},[a])}function ht(t,o,a){let e=t,n=0;for(;(e+10)%10!==o;)e+=a,n+=a;return n}const $t=W({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(t){const o=f(()=>Number(t.value)),a=f(()=>Math.abs(t.count)),e=mt({prevValue:o.value,prevCount:a.value}),n=()=>{e.prevValue=o.value,e.prevCount=a.value},c=R();return G(o,()=>{clearTimeout(c.value),c.value=setTimeout(()=>{n()},1e3)},{flush:"post"}),gt(()=>{clearTimeout(c.value)}),()=>{let d,p={};const s=o.value;if(e.prevValue===s||Number.isNaN(s)||Number.isNaN(e.prevValue))d=[J(i(i({},t),{current:!0}))],p={transition:"none"};else{d=[];const h=s+10,m=[];for(let r=s;r<=h;r+=1)m.push(r);const l=m.findIndex(r=>r%10===e.prevValue);d=m.map((r,y)=>{const $=r%10;return J(i(i({},t),{value:$,offset:y-l,current:y===l}))});const u=e.prevCount<a.value?1:-1;p={transform:`translateY(${-ht(e.prevValue,s,u)}00%)`}}return v("span",{class:`${t.prefixCls}-only`,style:p,onTransitionend:()=>n()},[d])}}});var St=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const yt={prefixCls:String,count:T.any,component:String,title:T.any,show:Boolean},Ct=W({compatConfig:{MODE:3},name:"ScrollNumber",inheritAttrs:!1,props:yt,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n}=L("scroll-number",t);return()=>{var c;const d=i(i({},t),a),{prefixCls:p,count:s,title:h,show:m,component:l="sup",class:u,style:r}=d,y=St(d,["prefixCls","count","title","show","component","class","style"]),$=i(i({},y),{style:r,"data-show":t.show,class:F(n.value,u),title:h});let g=s;if(s&&Number(s)%1===0){const b=String(s).split("");g=b.map((P,B)=>v($t,{prefixCls:n.value,count:Number(s),value:P,key:b.length-B},null))}r&&r.borderColor&&($.style=i(i({},r),{boxShadow:`0 0 0 1px ${r.borderColor} inset`}));const S=lt((c=e.default)===null||c===void 0?void 0:c.call(e));return S&&S.length?Q(S,{class:F(`${n.value}-custom-component`)},!1):v(l,$,{default:()=>[g]})}}}),xt=new O("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),wt=new O("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Nt=new O("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Ot=new O("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Pt=new O("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),Bt=new O("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),It=t=>{const{componentCls:o,iconCls:a,antCls:e,badgeFontHeight:n,badgeShadowSize:c,badgeHeightSm:d,motionDurationSlow:p,badgeStatusSize:s,marginXS:h,badgeRibbonOffset:m}=t,l=`${e}-scroll-number`,u=`${e}-ribbon`,r=`${e}-ribbon-wrapper`,y=q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${o} ${o}-color-${g}`]:{background:b,[`&:not(${o}-count)`]:{color:b}}}}),$=q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${u}-color-${g}`]:{background:b,color:b}}});return{[o]:i(i(i(i({},Y(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${o}-count`]:{zIndex:t.badgeZIndex,minWidth:t.badgeHeight,height:t.badgeHeight,color:t.badgeTextColor,fontWeight:t.badgeFontWeight,fontSize:t.badgeFontSize,lineHeight:`${t.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:t.badgeHeight/2,boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${o}-count-sm`]:{minWidth:d,height:d,fontSize:t.badgeFontSizeSm,lineHeight:`${d}px`,borderRadius:d/2},[`${o}-multiple-words`]:{padding:`0 ${t.paddingXS}px`},[`${o}-dot`]:{zIndex:t.badgeZIndex,width:t.badgeDotSize,minWidth:t.badgeDotSize,height:t.badgeDotSize,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`},[`${o}-dot${l}`]:{transition:`background ${p}`},[`${o}-count, ${o}-dot, ${l}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${a}-spin`]:{animationName:Bt,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${o}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${o}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${o}-status-success`]:{backgroundColor:t.colorSuccess},[`${o}-status-processing`]:{overflow:"visible",color:t.colorPrimary,backgroundColor:t.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:c,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:xt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${o}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${o}-status-error`]:{backgroundColor:t.colorError},[`${o}-status-warning`]:{backgroundColor:t.colorWarning},[`${o}-status-text`]:{marginInlineStart:h,color:t.colorText,fontSize:t.fontSize}}}),y),{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:wt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${o}-zoom-leave`]:{animationName:Nt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${o}-not-a-wrapper`]:{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:Ot,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${o}-zoom-leave`]:{animationName:Pt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${o}-status)`]:{verticalAlign:"middle"},[`${l}-custom-component, ${o}-count`]:{transform:"none"},[`${l}-custom-component, ${l}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${l}`]:{overflow:"hidden",[`${l}-only`]:{position:"relative",display:"inline-block",height:t.badgeHeight,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${l}-only-unit`]:{height:t.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${l}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${o}-count, ${o}-dot, ${l}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${r}`]:{position:"relative"},[`${u}`]:i(i(i(i({},Y(t)),{position:"absolute",top:h,padding:`0 ${t.paddingXS}px`,color:t.colorPrimary,lineHeight:`${n}px`,whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${u}-text`]:{color:t.colorTextLightSolid},[`${u}-corner`]:{position:"absolute",top:"100%",width:m,height:m,color:"currentcolor",border:`${m/2}px solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),$),{[`&${u}-placement-end`]:{insetInlineEnd:-m,borderEndEndRadius:0,[`${u}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${u}-placement-start`]:{insetInlineStart:-m,borderEndStartRadius:0,[`${u}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},tt=it("Badge",t=>{const{fontSize:o,lineHeight:a,fontSizeSM:e,lineWidth:n,marginXS:c,colorBorderBg:d}=t,p=Math.round(o*a),s=n,h="auto",m=p-2*s,l=t.colorBgContainer,u="normal",r=e,y=t.colorError,$=t.colorErrorHover,g=o,S=e/2,b=e,P=e/2,B=st(t,{badgeFontHeight:p,badgeShadowSize:s,badgeZIndex:h,badgeHeight:m,badgeTextColor:l,badgeFontWeight:u,badgeFontSize:r,badgeColor:y,badgeColorHover:$,badgeShadowColor:d,badgeHeightSm:g,badgeDotSize:S,badgeFontSizeSm:b,badgeStatusSize:P,badgeProcessingDuration:"1.2s",badgeRibbonOffset:c,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[It(B)]});var zt=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const Tt=()=>({prefix:String,color:{type:String},text:T.any,placement:{type:String,default:"end"}}),V=W({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:Tt(),slots:Object,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n,direction:c}=L("ribbon",t),[d,p]=tt(n),s=f(()=>k(t.color,!1)),h=f(()=>[n.value,`${n.value}-placement-${t.placement}`,{[`${n.value}-rtl`]:c.value==="rtl",[`${n.value}-color-${t.color}`]:s.value}]);return()=>{var m,l;const{class:u,style:r}=a,y=zt(a,["class","style"]),$={},g={};return t.color&&!s.value&&($.background=t.color,g.color=t.color),d(v("div",z({class:`${n.value}-wrapper ${p.value}`},y),[(m=e.default)===null||m===void 0?void 0:m.call(e),v("div",{class:[h.value,u,p.value],style:i(i({},$),r)},[v("span",{class:`${n.value}-text`},[t.text||((l=e.text)===null||l===void 0?void 0:l.call(e))]),v("div",{class:`${n.value}-corner`,style:g},null)])]))}}}),Et=()=>({count:T.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:T.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),M=W({compatConfig:{MODE:3},name:"ABadge",Ribbon:V,inheritAttrs:!1,props:Et(),slots:Object,setup(t,o){let{slots:a,attrs:e}=o;const{prefixCls:n,direction:c}=L("badge",t),[d,p]=tt(n),s=f(()=>t.count>t.overflowCount?`${t.overflowCount}+`:t.count),h=f(()=>s.value==="0"||s.value===0),m=f(()=>t.count===null||h.value&&!t.showZero),l=f(()=>(t.status!==null&&t.status!==void 0||t.color!==null&&t.color!==void 0)&&m.value),u=f(()=>t.dot&&!h.value),r=f(()=>u.value?"":s.value),y=f(()=>(r.value===null||r.value===void 0||r.value===""||h.value&&!t.showZero)&&!u.value),$=R(t.count),g=R(r.value),S=R(u.value);G([()=>t.count,r,u],()=>{y.value||($.value=t.count,g.value=r.value,S.value=u.value)},{immediate:!0});const b=f(()=>k(t.color,!1)),P=f(()=>({[`${n.value}-status-dot`]:l.value,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value})),B=f(()=>t.color&&!b.value?{background:t.color,color:t.color}:{}),et=f(()=>({[`${n.value}-dot`]:S.value,[`${n.value}-count`]:!S.value,[`${n.value}-count-sm`]:t.size==="small",[`${n.value}-multiple-words`]:!S.value&&g.value&&g.value.toString().length>1,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value}));return()=>{var E,_;const{offset:N,title:Z,color:X}=t,U=e.style,j=ut(a,t,"text"),x=n.value,C=$.value;let w=ct((E=a.default)===null||E===void 0?void 0:E.call(a));w=w.length?w:null;const A=!!(!y.value||a.count),D=(()=>{if(!N)return i({},U);const I={marginTop:pt(N[1])?`${N[1]}px`:N[1]};return c.value==="rtl"?I.left=`${parseInt(N[0],10)}px`:I.right=`${-parseInt(N[0],10)}px`,i(i({},I),U)})(),ot=Z??(typeof C=="string"||typeof C=="number"?C:void 0),nt=A||!j?null:v("span",{class:`${x}-status-text`},[j]),at=typeof C=="object"||C===void 0&&a.count?Q(C??((_=a.count)===null||_===void 0?void 0:_.call(a)),{style:D},!1):null,K=F(x,{[`${x}-status`]:l.value,[`${x}-not-a-wrapper`]:!w,[`${x}-rtl`]:c.value==="rtl"},e.class,p.value);if(!w&&l.value){const I=D.color;return d(v("span",z(z({},e),{},{class:K,style:D}),[v("span",{class:P.value,style:B.value},null),v("span",{style:{color:I},class:`${x}-status-text`},[j])]))}const rt=dt(w?`${x}-zoom`:"",{appear:!1});let H=i(i({},D),t.numberStyle);return X&&!b.value&&(H=H||{},H.background=X),d(v("span",z(z({},e),{},{class:K}),[w,v(bt,rt,{default:()=>[ft(v(Ct,{prefixCls:t.scrollNumberPrefixCls,show:A,class:et.value,count:g.value,title:ot,style:H,key:"scrollNumber"},{default:()=>[at]}),[[vt,A]])]}),nt]))}}});M.install=function(t){return t.component(M.name,M),t.component(V.name,V),t};export{V as BadgeRibbon,M as default};
@@ -1 +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-BAy0ks7N.js";import it from"./index-DK5iJriy.js";import{B as rt}from"./index-cP5FNe0q.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-DY9VpXfa.js";import"./initDefaultProps-Dp93Vlbv.js";import"./index-CW7a8O5w.js";import"./isVisible-C7tPsqfj.js";import"./useState-CSzR8F8O.js";import"./raf-Deuc0E8-.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./compact-item-Cjb446yk.js";import"./createContext-CulBut34.js";import"./Compact-D4E0roed.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-B_juAGfN.js";import it from"./index-C6Isxhje.js";import{B as rt}from"./index-D1CV-6q1.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-BFHq5fEF.js";import"./initDefaultProps-DE_gVS_i.js";import"./index-CobyvwP0.js";import"./isVisible-C7tPsqfj.js";import"./useState-CSzR8F8O.js";import"./raf-Deuc0E8-.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./compact-item-BjZyyKpa.js";import"./createContext-D0Ztn7R_.js";import"./Compact-DDeBOvFc.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{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-BAy0ks7N.js";import{B as q}from"./Trigger-D4yonKuU.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-yBy7l6Td.js";import{K as E}from"./KeyCode-D63Tfrq7.js";import{i as de}from"./initDefaultProps-Dp93Vlbv.js";import{T as Ne,b as Ee}from"./index-DQXojJvN.js";import{w as ee}from"./raf-Deuc0E8-.js";import{a as De}from"./FormItemContext-C6DJ0oHT.js";import{T as je}from"./icons-DY9VpXfa.js";import"./vnode-DMH0ymoP.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-BVc6NQ_K.js";import"./placementArrow-CpNGMWxW.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-qxXJ45GU.js";import"./zoom-DRmMxFNC.js";import"./createContext-CulBut34.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-B_juAGfN.js";import{B as q}from"./Trigger-HxLdC9ne.js";import{c as B,d as I,o as ke,e as ie,s as Z,f as le,w as Fe,aa as Le,r as U}from"./vendor-M5lGV-wr.js";import{s as ue,a as G}from"./motion-BiRUGscQ.js";import{K as E}from"./KeyCode-D63Tfrq7.js";import{i as de}from"./initDefaultProps-DE_gVS_i.js";import{T as Ne,b as Ee}from"./index-D1coHqyT.js";import{w as ee}from"./raf-Deuc0E8-.js";import{a as De}from"./FormItemContext-BTuMR6zf.js";import{T as je}from"./icons-BFHq5fEF.js";import"./vnode-CDF4X084.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-BVc6NQ_K.js";import"./placementArrow-BYkdt9jF.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-DTTx1bVY.js";import"./zoom-C9FCvBpV.js";import"./createContext-D0Ztn7R_.js";const J=(e,o)=>{let{attrs:t}=o;const{included:n,vertical:s,style:a,class:r}=t;let{length:i,offset:l,reverse:u}=t;i<0&&(u=!u,i=Math.abs(i),l=100-l);const d=s?{[u?"top":"bottom"]:`${l}%`,[u?"bottom":"top"]:"auto",height:`${i}%`}:{[u?"right":"left"]:`${l}%`,[u?"left":"right"]:"auto",width:`${i}%`},m=f(f({},a),d);return n?B("div",{class:r,style:m},null):null};J.inheritAttrs=!1;const Re=(e,o,t,n,s,a)=>{const r=Object.keys(o).map(parseFloat).sort((i,l)=>i-l);if(t&&n)for(let i=s;i<=a;i+=n)r.indexOf(i)===-1&&r.push(i);return r},ce=(e,o)=>{let{attrs:t}=o;const{prefixCls:n,vertical:s,reverse:a,marks:r,dots:i,step:l,included:u,lowerBound:d,upperBound:m,max:b,min:C,dotStyle:y,activeDotStyle:w}=t,h=b-C,S=Re(s,r,i,l,C,b).map(c=>{const $=`${Math.abs(c-C)/h*100}%`,V=!u&&c===m||u&&c<=m&&c>=d;let x=s?f(f({},y),{[a?"top":"bottom"]:$}):f(f({},y),{[a?"right":"left"]:$});V&&(x=f(f({},x),w));const v=R({[`${n}-dot`]:!0,[`${n}-dot-active`]:V,[`${n}-dot-reverse`]:a});return B("span",{class:v,style:x,key:c},null)});return B("div",{class:`${n}-step`},[S])};ce.inheritAttrs=!1;const he=(e,o)=>{let{attrs:t,slots:n}=o;const{class:s,vertical:a,reverse:r,marks:i,included:l,upperBound:u,lowerBound:d,max:m,min:b,onClickLabel:C}=t,y=Object.keys(i),w=n.mark,h=m-b,S=y.map(parseFloat).sort((c,$)=>c-$).map(c=>{const $=typeof i[c]=="function"?i[c]():i[c],V=typeof $=="object"&&!$e($);let x=V?$.label:$;if(!x&&x!==0)return null;w&&(x=w({point:c,label:x}));const v=!l&&c===u||l&&c<=u&&c>=d,p=R({[`${s}-text`]:!0,[`${s}-text-active`]:v}),M={marginBottom:"-50%",[r?"top":"bottom"]:`${(c-b)/h*100}%`},O={transform:`translateX(${r?"50%":"-50%"})`,msTransform:`translateX(${r?"50%":"-50%"})`,[r?"right":"left"]:`${(c-b)/h*100}%`},T=a?M:O,L=V?f(f({},T),$.style):T,H={[ue?"onTouchstartPassive":"onTouchstart"]:k=>C(k,c)};return B("span",P({class:p,style:L,key:c,onMousedown:k=>C(k,c)},H),[x])});return B("div",{class:s},[S])};he.inheritAttrs=!1;const fe=I({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(e,o){let{attrs:t,emit:n,expose:s}=o;const a=Z(!1),r=Z(),i=()=>{document.activeElement===r.value&&(a.value=!0)},l=h=>{a.value=!1,n("blur",h)},u=()=>{a.value=!1},d=()=>{var h;(h=r.value)===null||h===void 0||h.focus()},m=()=>{var h;(h=r.value)===null||h===void 0||h.blur()},b=()=>{a.value=!0,d()},C=h=>{h.preventDefault(),d(),n("mousedown",h)};s({focus:d,blur:m,clickFocus:b,ref:r});let y=null;ke(()=>{y=G(document,"mouseup",i)}),ie(()=>{y?.remove()});const w=le(()=>{const{vertical:h,offset:S,reverse:c}=e;return h?{[c?"top":"bottom"]:`${S}%`,[c?"bottom":"top"]:"auto",transform:c?null:"translateY(+50%)"}:{[c?"right":"left"]:`${S}%`,[c?"left":"right"]:"auto",transform:`translateX(${c?"+":"-"}50%)`}});return()=>{const{prefixCls:h,disabled:S,min:c,max:$,value:V,tabindex:x,ariaLabel:v,ariaLabelledBy:p,ariaValueTextFormatter:M,onMouseenter:O,onMouseleave:T}=e,L=R(t.class,{[`${h}-handle-click-focused`]:a.value}),H={"aria-valuemin":c,"aria-valuemax":$,"aria-valuenow":V,"aria-disabled":!!S},k=[t.style,w.value];let F=x||0;(S||x===null)&&(F=null);let W;M&&(W=M(V));const K=f(f(f(f({},t),{role:"slider",tabindex:F}),H),{class:L,onBlur:l,onKeydown:u,onMousedown:C,onMouseenter:O,onMouseleave:T,ref:r,style:k});return B("div",P(P({},K),{},{"aria-label":v,"aria-labelledby":p,"aria-valuetext":W}),null)}}});function X(e,o){try{return Object.keys(o).some(t=>e.target===o[t].ref)}catch{return!1}}function pe(e,o){let{min:t,max:n}=o;return e<t||e>n}function te(e){return e.touches.length>1||e.type.toLowerCase()==="touchend"&&e.touches.length>0}function ne(e,o){let{marks:t,step:n,min:s,max:a}=o;const r=Object.keys(t).map(parseFloat);if(n!==null){const l=Math.pow(10,me(n)),u=Math.floor((a*l-s*l)/(n*l)),d=Math.min((e-s)/n,u),m=Math.round(d)*n+s;r.push(m)}const i=r.map(l=>Math.abs(e-l));return r[i.indexOf(Math.min(...i))]}function me(e){const o=e.toString();let t=0;return o.indexOf(".")>=0&&(t=o.length-o.indexOf(".")-1),t}function oe(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.clientY:o.pageX)/t}function se(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.touches[0].clientY:o.touches[0].pageX)/t}function ae(e,o){const t=o.getBoundingClientRect();return e?t.top+t.height*.5:window.scrollX+t.left+t.width*.5}function Q(e,o){let{max:t,min:n}=o;return e<=n?n:e>=t?t:e}function ge(e,o){const{step:t}=o,n=isFinite(ne(e,o))?ne(e,o):0;return t===null?n:parseFloat(n.toFixed(me(t)))}function A(e){e.stopPropagation(),e.preventDefault()}function ze(e,o,t){const n={increase:(r,i)=>r+i,decrease:(r,i)=>r-i},s=n[e](Object.keys(t.marks).indexOf(JSON.stringify(o)),1),a=Object.keys(t.marks)[s];return t.step?n[e](o,t.step):Object.keys(t.marks).length&&t.marks[a]?t.marks[a]:o}function ve(e,o,t){const n="increase",s="decrease";let a=n;switch(e.keyCode){case E.UP:a=o&&t?s:n;break;case E.RIGHT:a=!o&&t?s:n;break;case E.DOWN:a=o&&t?n:s;break;case E.LEFT:a=!o&&t?n:s;break;case E.END:return(r,i)=>i.max;case E.HOME:return(r,i)=>i.min;case E.PAGE_UP:return(r,i)=>r+i.step*2;case E.PAGE_DOWN:return(r,i)=>r-i.step*2;default:return}return(r,i)=>ze(a,r,i)}var Ae=function(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)o.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(t[n[s]]=e[n[s]]);return t};function j(){}function be(e){const o={id:String,min:Number,max:Number,step:Number,marks:g.object,included:{type:Boolean,default:void 0},prefixCls:String,disabled:{type:Boolean,default:void 0},handle:Function,dots:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},minimumTrackStyle:g.object,maximumTrackStyle:g.object,handleStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),trackStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),railStyle:g.object,dotStyle:g.object,activeDotStyle:g.object,autofocus:{type:Boolean,default:void 0},draggableTrack:{type:Boolean,default:void 0}};return I({compatConfig:{MODE:3},name:"CreateSlider",mixins:[q,e],inheritAttrs:!1,props:de(o,{prefixCls:"rc-slider",min:0,max:100,step:1,marks:{},included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),emits:["change","blur","focus"],data(){const{step:t,max:n,min:s}=this;return this.handlesRefs={},{}},mounted(){this.$nextTick(()=>{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:t,disabled:n}=this;t&&!n&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(t){var{index:n,directives:s,className:a,style:r}=t,i=Ae(t,["index","directives","className","style"]);if(delete i.dragging,i.value===null)return null;const l=f(f({},i),{class:a,style:r,key:n});return B(fe,l,null)},onDown(t,n){let s=n;const{draggableTrack:a,vertical:r}=this.$props,{bounds:i}=this.$data,l=a&&this.positionGetValue?this.positionGetValue(s)||[]:[],u=X(t,this.handlesRefs);if(this.dragTrack=a&&i.length>=2&&!u&&!l.map((d,m)=>{const b=m?!0:d>=i[m];return m===l.length-1?d<=i[m]:b}).some(d=>!d),this.dragTrack)this.dragOffset=s,this.startBounds=[...i];else{if(!u)this.dragOffset=0;else{const d=ae(r,t.target);this.dragOffset=s-d,s=d}this.onStart(s)}},onMouseDown(t){if(t.button!==0)return;this.removeDocumentEvents();const n=this.$props.vertical,s=oe(n,t);this.onDown(t,s),this.addDocumentMouseEvents()},onTouchStart(t){if(te(t))return;const n=this.vertical,s=se(n,t);this.onDown(t,s),this.addDocumentTouchEvents(),A(t)},onFocus(t){const{vertical:n}=this;if(X(t,this.handlesRefs)&&!this.dragTrack){const s=ae(n,t.target);this.dragOffset=0,this.onStart(s),A(t),this.$emit("focus",t)}},onBlur(t){this.dragTrack||this.onEnd(),this.$emit("blur",t)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(t){if(!this.sliderRef){this.onEnd();return}const n=oe(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(t){if(te(t)||!this.sliderRef){this.onEnd();return}const n=se(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(t){this.sliderRef&&X(t,this.handlesRefs)&&this.onKeyboard(t)},onClickMarkLabel(t,n){t.stopPropagation(),this.onChange({sValue:n}),this.setState({sValue:n},()=>this.onEnd(!0))},getSliderStart(){const t=this.sliderRef,{vertical:n,reverse:s}=this,a=t.getBoundingClientRect();return n?s?a.bottom:a.top:window.scrollX+(s?a.right:a.left)},getSliderLength(){const t=this.sliderRef;if(!t)return 0;const n=t.getBoundingClientRect();return this.vertical?n.height:n.width},addDocumentTouchEvents(){this.onTouchMoveListener=G(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=G(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=G(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=G(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var t;this.$props.disabled||(t=this.handlesRefs[0])===null||t===void 0||t.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(t=>{var n,s;(s=(n=this.handlesRefs[t])===null||n===void 0?void 0:n.blur)===null||s===void 0||s.call(n)})},calcValue(t){const{vertical:n,min:s,max:a}=this,r=Math.abs(Math.max(t,0)/this.getSliderLength());return n?(1-r)*(a-s)+s:r*(a-s)+s},calcValueByPos(t){const s=(this.reverse?-1:1)*(t-this.getSliderStart());return this.trimAlignValue(this.calcValue(s))},calcOffset(t){const{min:n,max:s}=this,a=(t-n)/(s-n);return Math.max(0,a*100)},saveSlider(t){this.sliderRef=t},saveHandle(t,n){this.handlesRefs[t]=n}},render(){const{prefixCls:t,marks:n,dots:s,step:a,included:r,disabled:i,vertical:l,reverse:u,min:d,max:m,maximumTrackStyle:b,railStyle:C,dotStyle:y,activeDotStyle:w,id:h}=this,{class:S,style:c}=this.$attrs,{tracks:$,handles:V}=this.renderSlider(),x=R(t,S,{[`${t}-with-marks`]:Object.keys(n).length,[`${t}-disabled`]:i,[`${t}-vertical`]:l,[`${t}-horizontal`]:!l}),v={vertical:l,marks:n,included:r,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:d,reverse:u,class:`${t}-mark`,onClickLabel:i?j:this.onClickMarkLabel},p={[ue?"onTouchstartPassive":"onTouchstart"]:i?j:this.onTouchStart};return B("div",P(P({id:h,ref:this.saveSlider,tabindex:"-1",class:x},p),{},{onMousedown:i?j:this.onMouseDown,onMouseup:i?j:this.onMouseUp,onKeydown:i?j:this.onKeyDown,onFocus:i?j:this.onFocus,onBlur:i?j:this.onBlur,style:c}),[B("div",{class:`${t}-rail`,style:f(f({},b),C)},null),$,B(ce,{prefixCls:t,vertical:l,reverse:u,marks:n,dots:s,step:a,included:r,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:d,dotStyle:y,activeDotStyle:w},null),V,B(he,v,{mark:this.$slots.mark}),Ce(this)])}})}const Ie=I({compatConfig:{MODE:3},name:"Slider",mixins:[q],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const e=this.defaultValue!==void 0?this.defaultValue:this.min,o=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(o),dragging:!1}},watch:{value:{handler(e){this.setChangeValue(e)},deep:!0},min(){const{sValue:e}=this;this.setChangeValue(e)},max(){const{sValue:e}=this;this.setChangeValue(e)}},methods:{setChangeValue(e){const o=e!==void 0?e:this.sValue,t=this.trimAlignValue(o,this.$props);t!==this.sValue&&(this.setState({sValue:t}),pe(o,this.$props)&&this.$emit("change",t))},onChange(e){const o=!Y(this,"value"),t=e.sValue>this.max?f(f({},e),{sValue:this.max}):e;o&&this.setState(t);const n=t.sValue;this.$emit("change",n)},onStart(e){this.setState({dragging:!0});const{sValue:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e,t!==o&&(this.prevMovedHandleIndex=0,this.onChange({sValue:t}))},onEnd(e){const{dragging:o}=this;this.removeDocumentEvents(),(o||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(e,o){A(e);const{sValue:t}=this,n=this.calcValueByPos(o);n!==t&&this.onChange({sValue:n})},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{sValue:s}=this,a=n(s,this.$props),r=this.trimAlignValue(a);if(r===s)return;this.onChange({sValue:r}),this.$emit("afterChange",r),this.onEnd()}},getLowerBound(){const e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound(){return this.$data.sValue<this.$props.startPoint?this.$props.startPoint:this.$data.sValue},trimAlignValue(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;const t=f(f({},this.$props),o),n=Q(e,t);return ge(n,t)},getTrack(e){let{prefixCls:o,reverse:t,vertical:n,included:s,minimumTrackStyle:a,mergedTrackStyle:r,length:i,offset:l}=e;return B(J,{class:`${o}-track`,vertical:n,included:s,offset:l,reverse:t,length:i,style:f(f({},a),r)},null)},renderSlider(){const{prefixCls:e,vertical:o,included:t,disabled:n,minimumTrackStyle:s,trackStyle:a,handleStyle:r,tabindex:i,ariaLabelForHandle:l,ariaLabelledByForHandle:u,ariaValueTextFormatterForHandle:d,min:m,max:b,startPoint:C,reverse:y,handle:w,defaultHandle:h}=this,S=w||h,{sValue:c,dragging:$}=this,V=this.calcOffset(c),x=S({class:`${e}-handle`,prefixCls:e,vertical:o,offset:V,value:c,dragging:$,disabled:n,min:m,max:b,reverse:y,index:0,tabindex:i,ariaLabel:l,ariaLabelledBy:u,ariaValueTextFormatter:d,style:r[0]||r,ref:M=>this.saveHandle(0,M),onFocus:this.onFocus,onBlur:this.onBlur}),v=C!==void 0?this.calcOffset(C):0,p=a[0]||a;return{tracks:this.getTrack({prefixCls:e,reverse:y,vertical:o,included:t,offset:v,minimumTrackStyle:s,mergedTrackStyle:p,length:V-v}),handles:x}}}}),We=be(Ie),_=e=>{let{value:o,handle:t,bounds:n,props:s}=e;const{allowCross:a,pushable:r}=s,i=Number(r),l=Q(o,s);let u=l;return!a&&t!=null&&n!==void 0&&(t>0&&l<=n[t-1]+i&&(u=n[t-1]+i),t<n.length-1&&l>=n[t+1]-i&&(u=n[t+1]-i)),ge(u,s)},_e={defaultValue:g.arrayOf(g.number),value:g.arrayOf(g.number),count:Number,pushable:Ve(g.oneOfType([g.looseBool,g.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:g.arrayOf(g.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},Ge=I({compatConfig:{MODE:3},name:"Range",mixins:[q],inheritAttrs:!1,props:de(_e,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:e,min:o,max:t}=this,n=Array(...Array(e+1)).map(()=>o),s=Y(this,"defaultValue")?this.defaultValue:n;let{value:a}=this;a===void 0&&(a=s);const r=a.map((l,u)=>_({value:l,handle:u,props:this.$props}));return{sHandle:null,recent:r[0]===t?0:r.length-1,bounds:r}},watch:{value:{handler(e){const{bounds:o}=this;this.setChangeValue(e||o)},deep:!0},min(){const{value:e}=this;this.setChangeValue(e||this.bounds)},max(){const{value:e}=this;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue(e){const{bounds:o}=this;let t=e.map((n,s)=>_({value:n,handle:s,bounds:o,props:this.$props}));if(o.length===t.length){if(t.every((n,s)=>n===o[s]))return null}else t=e.map((n,s)=>_({value:n,handle:s,props:this.$props}));if(this.setState({bounds:t}),e.some(n=>pe(n,this.$props))){const n=e.map(s=>Q(s,this.$props));this.$emit("change",n)}},onChange(e){if(!Y(this,"value"))this.setState(e);else{const s={};["sHandle","recent"].forEach(a=>{e[a]!==void 0&&(s[a]=e[a])}),Object.keys(s).length&&this.setState(s)}const n=f(f({},this.$data),e).bounds;this.$emit("change",n)},positionGetValue(e){const o=this.getValue(),t=this.calcValueByPos(e),n=this.getClosestBound(t),s=this.getBoundNeedMoving(t,n),a=o[s];if(t===a)return null;const r=[...o];return r[s]=t,r},onStart(e){const{bounds:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e;const n=this.getClosestBound(t);this.prevMovedHandleIndex=this.getBoundNeedMoving(t,n),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const s=o[this.prevMovedHandleIndex];if(t===s)return;const a=[...o];a[this.prevMovedHandleIndex]=t,this.onChange({bounds:a})},onEnd(e){const{sHandle:o}=this;this.removeDocumentEvents(),o||(this.dragTrack=!1),(o!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(e,o,t,n){A(e);const{$data:s,$props:a}=this,r=a.max||100,i=a.min||0;if(t){let b=a.vertical?-o:o;b=a.reverse?-b:b;const C=r-Math.max(...n),y=i-Math.min(...n),w=Math.min(Math.max(b/(this.getSliderLength()/100),y),C),h=n.map(S=>Math.floor(Math.max(Math.min(S+w,r),i)));s.bounds.map((S,c)=>S===h[c]).some(S=>!S)&&this.onChange({bounds:h});return}const{bounds:l,sHandle:u}=this,d=this.calcValueByPos(o),m=l[u];d!==m&&this.moveTo(d)},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{bounds:s,sHandle:a}=this,r=s[a===null?this.recent:a],i=n(r,this.$props),l=_({value:i,handle:a,bounds:s,props:this.$props});if(l===r)return;this.moveTo(l,!0)}},getClosestBound(e){const{bounds:o}=this;let t=0;for(let n=1;n<o.length-1;n+=1)e>=o[n]&&(t=n);return Math.abs(o[t+1]-e)<Math.abs(o[t]-e)&&(t+=1),t},getBoundNeedMoving(e,o){const{bounds:t,recent:n}=this;let s=o;const a=t[o+1]===t[o];return a&&t[n]===t[o]&&(s=n),a&&e!==t[o+1]&&(s=e<t[o+1]?o:o+1),s},getLowerBound(){return this.bounds[0]},getUpperBound(){const{bounds:e}=this;return e[e.length-1]},getPoints(){const{marks:e,step:o,min:t,max:n}=this,s=this.internalPointsCache;if(!s||s.marks!==e||s.step!==o){const a=f({},e);if(o!==null)for(let i=t;i<=n;i+=o)a[i]=i;const r=Object.keys(a).map(parseFloat);r.sort((i,l)=>i-l),this.internalPointsCache={marks:e,step:o,points:r}}return this.internalPointsCache.points},moveTo(e,o){const t=[...this.bounds],{sHandle:n,recent:s}=this,a=n===null?s:n;t[a]=e;let r=a;this.$props.pushable!==!1?this.pushSurroundingHandles(t,r):this.$props.allowCross&&(t.sort((i,l)=>i-l),r=t.indexOf(e)),this.onChange({recent:r,sHandle:r,bounds:t}),o&&(this.$emit("afterChange",t),this.setState({},()=>{this.handlesRefs[r].focus()}),this.onEnd())},pushSurroundingHandles(e,o){const t=e[o],{pushable:n}=this,s=Number(n);let a=0;if(e[o+1]-t<s&&(a=1),t-e[o-1]<s&&(a=-1),a===0)return;const r=o+a,i=a*(e[r]-t);this.pushHandle(e,r,a,s-i)||(e[o]=e[r]-a*s)},pushHandle(e,o,t,n){const s=e[o];let a=e[o];for(;t*(a-s)<n;){if(!this.pushHandleOnePoint(e,o,t))return e[o]=s,!1;a=e[o]}return!0},pushHandleOnePoint(e,o,t){const n=this.getPoints(),a=n.indexOf(e[o])+t;if(a>=n.length||a<0)return!1;const r=o+t,i=n[a],{pushable:l}=this,u=Number(l),d=t*(e[r]-i);return this.pushHandle(e,r,t,u-d)?(e[o]=i,!0):!1},trimAlignValue(e){const{sHandle:o,bounds:t}=this;return _({value:e,handle:o,bounds:t,props:this.$props})},ensureValueNotConflict(e,o,t){let{allowCross:n,pushable:s}=t;const a=this.$data||{},{bounds:r}=a;if(e=e===void 0?a.sHandle:e,s=Number(s),!n&&e!=null&&r!==void 0){if(e>0&&o<=r[e-1]+s)return r[e-1]+s;if(e<r.length-1&&o>=r[e+1]-s)return r[e+1]-s}return o},getTrack(e){let{bounds:o,prefixCls:t,reverse:n,vertical:s,included:a,offsets:r,trackStyle:i}=e;return o.slice(0,-1).map((l,u)=>{const d=u+1,m=R({[`${t}-track`]:!0,[`${t}-track-${d}`]:!0});return B(J,{class:m,vertical:s,reverse:n,included:a,offset:r[d-1],length:r[d]-r[d-1],style:i[u],key:d},null)})},renderSlider(){const{sHandle:e,bounds:o,prefixCls:t,vertical:n,included:s,disabled:a,min:r,max:i,reverse:l,handle:u,defaultHandle:d,trackStyle:m,handleStyle:b,tabindex:C,ariaLabelGroupForHandles:y,ariaLabelledByGroupForHandles:w,ariaValueTextFormatterGroupForHandles:h}=this,S=u||d,c=o.map(x=>this.calcOffset(x)),$=`${t}-handle`,V=o.map((x,v)=>{let p=C[v]||0;(a||C[v]===null)&&(p=null);const M=e===v;return S({class:R({[$]:!0,[`${$}-${v+1}`]:!0,[`${$}-dragging`]:M}),prefixCls:t,vertical:n,dragging:M,offset:c[v],value:x,index:v,tabindex:p,min:r,max:i,reverse:l,disabled:a,style:b[v],ref:O=>this.saveHandle(v,O),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:y[v],ariaLabelledBy:w[v],ariaValueTextFormatter:h[v]})});return{tracks:this.getTrack({bounds:o,prefixCls:t,reverse:l,vertical:n,included:s,offsets:c,trackStyle:m}),handles:V}}}}),Ue=be(Ge),Ke=I({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:Ee(),setup(e,o){let{attrs:t,slots:n}=o;const s=U(null),a=U(null);function r(){ee.cancel(a.value),a.value=null}function i(){a.value=ee(()=>{var u;(u=s.value)===null||u===void 0||u.forcePopupAlign(),a.value=null})}const l=()=>{r(),e.open&&i()};return Fe([()=>e.open,()=>e.title],()=>{l()},{flush:"post",immediate:!0}),Le(()=>{l()}),ie(()=>{r()}),()=>B(Ne,P(P({ref:s},e),t),n)}}),Xe=e=>{const{componentCls:o,controlSize:t,dotSize:n,marginFull:s,marginPart:a,colorFillContentHover:r}=e;return{[o]:f(f({},Me(e)),{position:"relative",height:t,margin:`${a}px ${s}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${s}px ${a}px`},[`${o}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${o}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${o}-rail`]:{backgroundColor:e.colorFillSecondary},[`${o}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${o}-dot`]:{borderColor:r},[`${o}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${o}-dot-active`]:{borderColor:e.colorPrimary}},[`${o}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${o}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:`
2
2
  inset-inline-start ${e.motionDurationMid},
3
3
  inset-block-start ${e.motionDurationMid},
4
4
  width ${e.motionDurationMid},
@@ -1 +1 @@
1
- import{N as O,h}from"./index-BAy0ks7N.js";import{i as R}from"./ResizeObserver.es-D6qJbdzf.js";import{d as x,o as C,q as M,x as H,w as W,a as B,g as D}from"./vendor-M5lGV-wr.js";const _=x({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(i,v){let{slots:l}=v;const n=B({width:0,height:0,offsetHeight:0,offsetWidth:0});let c=null,s=null;const r=()=>{s&&(s.disconnect(),s=null)},b=e=>{const{onResize:t}=i,o=e[0].target,{width:p,height:w}=o.getBoundingClientRect(),{offsetWidth:d,offsetHeight:f}=o,g=Math.floor(p),m=Math.floor(w);if(n.width!==g||n.height!==m||n.offsetWidth!==d||n.offsetHeight!==f){const u={width:g,height:m,offsetWidth:d,offsetHeight:f};h(n,u),t&&Promise.resolve().then(()=>{t(h(h({},u),{offsetWidth:d,offsetHeight:f}),o)})}},z=D(),a=()=>{const{disabled:e}=i;if(e){r();return}const t=O(z);t!==c&&(r(),c=t),!s&&t&&(s=new R(b),s.observe(t))};return C(()=>{a()}),M(()=>{a()}),H(()=>{r()}),W(()=>i.disabled,()=>{a()},{flush:"post"}),()=>{var e;return(e=l.default)===null||e===void 0?void 0:e.call(l)[0]}}});export{_ as R};
1
+ import{N as O,h}from"./index-B_juAGfN.js";import{i as R}from"./ResizeObserver.es-D6qJbdzf.js";import{d as x,o as C,q as M,x as H,w as W,a as B,g as D}from"./vendor-M5lGV-wr.js";const _=x({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(i,v){let{slots:l}=v;const n=B({width:0,height:0,offsetHeight:0,offsetWidth:0});let c=null,s=null;const r=()=>{s&&(s.disconnect(),s=null)},b=e=>{const{onResize:t}=i,o=e[0].target,{width:p,height:w}=o.getBoundingClientRect(),{offsetWidth:d,offsetHeight:f}=o,g=Math.floor(p),m=Math.floor(w);if(n.width!==g||n.height!==m||n.offsetWidth!==d||n.offsetHeight!==f){const u={width:g,height:m,offsetWidth:d,offsetHeight:f};h(n,u),t&&Promise.resolve().then(()=>{t(h(h({},u),{offsetWidth:d,offsetHeight:f}),o)})}},z=D(),a=()=>{const{disabled:e}=i;if(e){r();return}const t=O(z);t!==c&&(r(),c=t),!s&&t&&(s=new R(b),s.observe(t))};return C(()=>{a()}),M(()=>{a()}),H(()=>{r()}),W(()=>i.disabled,()=>{a()},{flush:"post"}),()=>{var e;return(e=l.default)===null||e===void 0?void 0:e.call(l)[0]}}});export{_ as R};
@@ -1,4 +1,4 @@
1
- import{l as Ce,m as Te,h as r,r as ze,o as A,X as ie,q as v,f as m,i as I,aa as y,J as Be,ab as Me,P as x,ac as q,ad as j}from"./index-BAy0ks7N.js";import oe from"./index-BKNbteyC.js";import{i as we}from"./isPlainObject-_gz-soRW.js";import{d as Ae}from"./devWarning-CNIS3FrJ.js";import{u as D,E as X,s as H,S as s,a as ne}from"./Skeleton--WjfL2Ay.js";import{i as re}from"./initDefaultProps-Dp93Vlbv.js";import{d as $,c as o,f as T,k as ae}from"./vendor-M5lGV-wr.js";import{o as le}from"./omit-BMF4_2X_.js";import{a as Ie}from"./vnode-DMH0ymoP.js";import"./icons-DY9VpXfa.js";import"./raf-Deuc0E8-.js";import"./KeyCode-D63Tfrq7.js";import"./index-DkYY9W4x.js";import"./Trigger-D4yonKuU.js";import"./motion-yBy7l6Td.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-BVc6NQ_K.js";import"./_arrayIncludes-B8uzE354.js";import"./injectionKey-BXVc-oGP.js";import"./Overflow-O5JDtvyx.js";import"./index-Bb1KdW4J.js";import"./index-DQXojJvN.js";import"./placementArrow-CpNGMWxW.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-qxXJ45GU.js";import"./zoom-DRmMxFNC.js";import"./collapseMotion-CjFH_Jop.js";import"./slide-B5t0Lgse.js";import"./OverrideContext-x9ZzjLwk.js";import"./Dropdown-BDTTlG70.js";import"./useState-CSzR8F8O.js";import"./useRefs-0J6m8UWN.js";import"./hasIn-DCnwRrNq.js";import"./isSymbol-DAy2hlR5.js";import"./isMobile--2fOlCHx.js";import"./useMergedState-O7QXt4P5.js";import"./warning-Pq00owYb.js";const De=e=>{const{antCls:t,componentCls:a,cardHeadHeight:i,cardPaddingBase:n,cardHeadTabsMarginBottom:d}=e;return r(r({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${n}px`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,background:"transparent",borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},A()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":r(r({display:"inline-block",flex:1},ie),{[`
1
+ import{l as Ce,m as Te,h as r,r as ze,o as A,X as ie,q as v,f as m,i as I,aa as y,J as Be,ab as Me,P as x,ac as q,ad as j}from"./index-B_juAGfN.js";import oe from"./index-BUFpZk0I.js";import{i as we}from"./isPlainObject-_gz-soRW.js";import{d as Ae}from"./devWarning-CNIS3FrJ.js";import{u as D,E as X,s as H,S as s,a as ne}from"./Skeleton-DR_EuFFW.js";import{i as re}from"./initDefaultProps-DE_gVS_i.js";import{d as $,c as o,f as T,k as ae}from"./vendor-M5lGV-wr.js";import{o as le}from"./omit-DBh74Ui4.js";import{a as Ie}from"./vnode-CDF4X084.js";import"./icons-BFHq5fEF.js";import"./raf-Deuc0E8-.js";import"./KeyCode-D63Tfrq7.js";import"./index-Dx7XPVkb.js";import"./Trigger-HxLdC9ne.js";import"./motion-BiRUGscQ.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-BVc6NQ_K.js";import"./_arrayIncludes-B8uzE354.js";import"./injectionKey-BXVc-oGP.js";import"./Overflow-9VpUiyX3.js";import"./index-DRNxWV3i.js";import"./index-D1coHqyT.js";import"./placementArrow-BYkdt9jF.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-DTTx1bVY.js";import"./zoom-C9FCvBpV.js";import"./collapseMotion-CjFH_Jop.js";import"./slide-zGdjevxe.js";import"./OverrideContext-x9ZzjLwk.js";import"./Dropdown-CMcWp2f1.js";import"./useState-CSzR8F8O.js";import"./useRefs-0J6m8UWN.js";import"./hasIn-BeXm1bJ2.js";import"./isSymbol-DAy2hlR5.js";import"./isMobile--2fOlCHx.js";import"./useMergedState-O7QXt4P5.js";import"./warning-Pq00owYb.js";const De=e=>{const{antCls:t,componentCls:a,cardHeadHeight:i,cardPaddingBase:n,cardHeadTabsMarginBottom:d}=e;return r(r({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${n}px`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,background:"transparent",borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},A()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":r(r({display:"inline-block",flex:1},ie),{[`
2
2
  > ${a}-typography,
3
3
  > ${a}-typography-edit-content
4
4
  `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:d,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`}}})},He=e=>{const{cardPaddingBase:t,colorBorderSecondary:a,cardShadow:i,lineWidth:n}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
@@ -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-BAy0ks7N.js";import{b as U}from"./icons-DY9VpXfa.js";import{W as q}from"./index-CW7a8O5w.js";import{g as V,i as G,a as J}from"./colors-qxXJ45GU.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
+ 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-B_juAGfN.js";import{b as U}from"./icons-BFHq5fEF.js";import{W as q}from"./index-CobyvwP0.js";import{g as V,i as G,a as J}from"./colors-DTTx1bVY.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,2 +1,2 @@
1
- import{l as oo,m as eo,h as I,r as F,K as to,an as V,L as _,q as W,i as K,f as D,P as L,V as E,G as z,$ as j,Z as ro}from"./index-BAy0ks7N.js";import{V as no}from"./Checkbox-DElRJpAL.js";import{a as U,F as ao}from"./FormItemContext-C6DJ0oHT.js";import{o as io}from"./omit-BMF4_2X_.js";import{i as N,p as X,d as M,c as T,f as O,r as H,w as lo,n as so}from"./vendor-M5lGV-wr.js";import"./icons-DY9VpXfa.js";import"./initDefaultProps-Dp93Vlbv.js";import"./createContext-CulBut34.js";const q=Symbol("radioGroupContextKey"),co=o=>{X(q,o)},uo=()=>N(q,void 0),Z=Symbol("radioOptionTypeContextKey"),po=o=>{X(Z,o)},bo=()=>N(Z,void 0),go=new to("antRadioEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),ho=o=>{const{componentCls:r,antCls:n}=o,t=`${r}-group`;return{[t]:I(I({},F(o)),{display:"inline-block",fontSize:0,[`&${t}-rtl`]:{direction:"rtl"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},fo=o=>{const{componentCls:r,radioWrapperMarginRight:n,radioCheckedColor:t,radioSize:e,motionDurationSlow:d,motionDurationMid:s,motionEaseInOut:w,motionEaseInOutCirc:f,radioButtonBg:b,colorBorder:B,lineWidth:g,radioDotSize:C,colorBgContainerDisabled:x,colorTextDisabled:c,paddingXS:h,radioDotDisabledColor:a,lineType:m,radioDotDisabledSize:u,wireframe:p,colorWhite:y}=o,i=`${r}-inner`;return{[`${r}-wrapper`]:I(I({},F(o)),{position:"relative",display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",[`&${r}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:o.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${r}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${g}px ${m} ${t}`,borderRadius:"50%",visibility:"hidden",animationName:go,animationDuration:d,animationTimingFunction:w,animationFillMode:"both",content:'""'},[r]:I(I({},F(o)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center"}),[`${r}-wrapper:hover &,
1
+ import{l as oo,m as eo,h as I,r as F,K as to,an as V,L as _,q as W,i as K,f as D,P as L,V as E,G as z,$ as j,Z as ro}from"./index-B_juAGfN.js";import{V as no}from"./Checkbox-CdoTzEcu.js";import{a as U,F as ao}from"./FormItemContext-BTuMR6zf.js";import{o as io}from"./omit-DBh74Ui4.js";import{i as N,p as X,d as M,c as T,f as O,r as H,w as lo,n as so}from"./vendor-M5lGV-wr.js";import"./icons-BFHq5fEF.js";import"./initDefaultProps-DE_gVS_i.js";import"./createContext-D0Ztn7R_.js";const q=Symbol("radioGroupContextKey"),co=o=>{X(q,o)},uo=()=>N(q,void 0),Z=Symbol("radioOptionTypeContextKey"),po=o=>{X(Z,o)},bo=()=>N(Z,void 0),go=new to("antRadioEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),ho=o=>{const{componentCls:r,antCls:n}=o,t=`${r}-group`;return{[t]:I(I({},F(o)),{display:"inline-block",fontSize:0,[`&${t}-rtl`]:{direction:"rtl"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},fo=o=>{const{componentCls:r,radioWrapperMarginRight:n,radioCheckedColor:t,radioSize:e,motionDurationSlow:d,motionDurationMid:s,motionEaseInOut:w,motionEaseInOutCirc:f,radioButtonBg:b,colorBorder:B,lineWidth:g,radioDotSize:C,colorBgContainerDisabled:x,colorTextDisabled:c,paddingXS:h,radioDotDisabledColor:a,lineType:m,radioDotDisabledSize:u,wireframe:p,colorWhite:y}=o,i=`${r}-inner`;return{[`${r}-wrapper`]:I(I({},F(o)),{position:"relative",display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",[`&${r}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:o.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${r}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${g}px ${m} ${t}`,borderRadius:"50%",visibility:"hidden",animationName:go,animationDuration:d,animationTimingFunction:w,animationFillMode:"both",content:'""'},[r]:I(I({},F(o)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center"}),[`${r}-wrapper:hover &,
2
2
  &:hover ${i}`]:{borderColor:t},[`${r}-input:focus-visible + ${i}`]:I({},V(o)),[`${r}:hover::after, ${r}-wrapper:hover &::after`]:{visibility:"visible"},[`${r}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:e,height:e,marginBlockStart:e/-2,marginInlineStart:e/-2,backgroundColor:p?t:y,borderBlockStart:0,borderInlineStart:0,borderRadius:e,transform:"scale(0)",opacity:0,transition:`all ${d} ${f}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:e,height:e,backgroundColor:b,borderColor:B,borderStyle:"solid",borderWidth:g,borderRadius:"50%",transition:`all ${s}`},[`${r}-input`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,insetBlockEnd:0,insetInlineStart:0,zIndex:1,cursor:"pointer",opacity:0},[`${r}-checked`]:{[i]:{borderColor:t,backgroundColor:p?b:t,"&::after":{transform:`scale(${C/e})`,opacity:1,transition:`all ${d} ${f}`}}},[`${r}-disabled`]:{cursor:"not-allowed",[i]:{backgroundColor:x,borderColor:B,cursor:"not-allowed","&::after":{backgroundColor:a}},[`${r}-input`]:{cursor:"not-allowed"},[`${r}-disabled + span`]:{color:c,cursor:"not-allowed"},[`&${r}-checked`]:{[i]:{"&::after":{transform:`scale(${u/e})`}}}},[`span${r} + *`]:{paddingInlineStart:h,paddingInlineEnd:h}})}},Co=o=>{const{radioButtonColor:r,controlHeight:n,componentCls:t,lineWidth:e,lineType:d,colorBorder:s,motionDurationSlow:w,motionDurationMid:f,radioButtonPaddingHorizontal:b,fontSize:B,radioButtonBg:g,fontSizeLG:C,controlHeightLG:x,controlHeightSM:c,paddingXS:h,borderRadius:a,borderRadiusSM:m,borderRadiusLG:u,radioCheckedColor:p,radioButtonCheckedBg:y,radioButtonHoverColor:i,radioButtonActiveColor:v,radioSolidCheckedColor:R,colorTextDisabled:l,colorBgContainerDisabled:S,radioDisabledButtonCheckedColor:P,radioDisabledButtonCheckedBg:G}=o;return{[`${t}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:b,paddingBlock:0,color:r,fontSize:B,lineHeight:`${n-e*2}px`,background:g,border:`${e}px ${d} ${s}`,borderBlockStartWidth:e+.02,borderInlineStartWidth:0,borderInlineEndWidth:e,cursor:"pointer",transition:[`color ${f}`,`background ${f}`,`border-color ${f}`,`box-shadow ${f}`].join(","),a:{color:r},[`> ${t}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-e,insetInlineStart:-e,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:e,paddingInline:0,backgroundColor:s,transition:`background-color ${w}`,content:'""'}},"&:first-child":{borderInlineStart:`${e}px ${d} ${s}`,borderStartStartRadius:a,borderEndStartRadius:a},"&:last-child":{borderStartEndRadius:a,borderEndEndRadius:a},"&:first-child:last-child":{borderRadius:a},[`${t}-group-large &`]:{height:x,fontSize:C,lineHeight:`${x-e*2}px`,"&:first-child":{borderStartStartRadius:u,borderEndStartRadius:u},"&:last-child":{borderStartEndRadius:u,borderEndEndRadius:u}},[`${t}-group-small &`]:{height:c,paddingInline:h-e,paddingBlock:0,lineHeight:`${c-e*2}px`,"&:first-child":{borderStartStartRadius:m,borderEndStartRadius:m},"&:last-child":{borderStartEndRadius:m,borderEndEndRadius:m}},"&:hover":{position:"relative",color:p},"&:has(:focus-visible)":I({},V(o)),[`${t}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${t}-button-wrapper-disabled)`]:{zIndex:1,color:p,background:y,borderColor:p,"&::before":{backgroundColor:p},"&:first-child":{borderColor:p},"&:hover":{color:i,borderColor:i,"&::before":{backgroundColor:i}},"&:active":{color:v,borderColor:v,"&::before":{backgroundColor:v}}},[`${t}-group-solid &-checked:not(${t}-button-wrapper-disabled)`]:{color:R,background:p,borderColor:p,"&:hover":{color:R,background:i,borderColor:i},"&:active":{color:R,background:v,borderColor:v}},"&-disabled":{color:l,backgroundColor:S,borderColor:s,cursor:"not-allowed","&:first-child, &:hover":{color:l,backgroundColor:S,borderColor:s}},[`&-disabled${t}-button-wrapper-checked`]:{color:P,backgroundColor:G,borderColor:s,boxShadow:"none"}}}},J=oo("Radio",o=>{const{padding:r,lineWidth:n,controlItemBgActiveDisabled:t,colorTextDisabled:e,colorBgContainer:d,fontSizeLG:s,controlOutline:w,colorPrimaryHover:f,colorPrimaryActive:b,colorText:B,colorPrimary:g,marginXS:C,controlOutlineWidth:x,colorTextLightSolid:c,wireframe:h}=o,a=`0 0 0 ${x}px ${w}`,m=a,u=s,p=4,y=u-p*2,i=h?y:u-(p+n)*2,v=g,R=B,l=f,S=b,P=r-n,$=eo(o,{radioFocusShadow:a,radioButtonFocusShadow:m,radioSize:u,radioDotSize:i,radioDotDisabledSize:y,radioCheckedColor:v,radioDotDisabledColor:e,radioSolidCheckedColor:c,radioButtonBg:d,radioButtonCheckedBg:d,radioButtonColor:R,radioButtonHoverColor:l,radioButtonActiveColor:S,radioButtonPaddingHorizontal:P,radioDisabledButtonCheckedBg:t,radioDisabledButtonCheckedColor:e,radioWrapperMarginRight:C});return[ho($),fo($),Co($)]});var vo=function(o,r){var n={};for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&r.indexOf(t)<0&&(n[t]=o[t]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,t=Object.getOwnPropertySymbols(o);e<t.length;e++)r.indexOf(t[e])<0&&Object.prototype.propertyIsEnumerable.call(o,t[e])&&(n[t[e]]=o[t[e]]);return n};const Q=()=>({prefixCls:String,checked:z(),disabled:z(),isGroup:z(),value:L.any,name:String,id:String,autofocus:z(),onChange:E(),onFocus:E(),onBlur:E(),onClick:E(),"onUpdate:checked":E(),"onUpdate:value":E()}),k=M({compatConfig:{MODE:3},name:"ARadio",inheritAttrs:!1,props:Q(),setup(o,r){let{emit:n,expose:t,slots:e,attrs:d}=r;const s=U(),w=ao.useInject(),f=bo(),b=uo(),B=_(),g=O(()=>{var l;return(l=h.value)!==null&&l!==void 0?l:B.value}),C=H(),{prefixCls:x,direction:c,disabled:h}=W("radio",o),a=O(()=>b?.optionType.value==="button"||f==="button"?`${x.value}-button`:x.value),m=_(),[u,p]=J(x);t({focus:()=>{C.value.focus()},blur:()=>{C.value.blur()}});const v=l=>{const S=l.target.checked;n("update:checked",S),n("update:value",S),n("change",l),s.onFieldChange()},R=l=>{n("change",l),b&&b.onChange&&b.onChange(l)};return()=>{var l;const S=b,{prefixCls:P,id:G=s.id.value}=o,A=vo(o,["prefixCls","id"]),$=I(I({prefixCls:a.value,id:G},io(A,["onUpdate:checked","onUpdate:value"])),{disabled:(l=h.value)!==null&&l!==void 0?l:m.value});S?($.name=S.name.value,$.onChange=R,$.checked=o.value===S.value.value,$.disabled=g.value||S.disabled.value):$.onChange=v;const Y=K({[`${a.value}-wrapper`]:!0,[`${a.value}-wrapper-checked`]:$.checked,[`${a.value}-wrapper-disabled`]:$.disabled,[`${a.value}-wrapper-rtl`]:c.value==="rtl",[`${a.value}-wrapper-in-form-item`]:w.isFormItemInput},d.class,p.value);return u(T("label",D(D({},d),{},{class:Y}),[T(no,D(D({},$),{},{type:"radio",ref:C}),null),e.default&&T("span",null,[e.default()])]))}}}),mo=()=>({prefixCls:String,value:L.any,size:j(),options:ro(),disabled:z(),name:String,buttonStyle:j("outline"),id:String,optionType:j("default"),onChange:E(),"onUpdate:value":E()}),So=M({compatConfig:{MODE:3},name:"ARadioGroup",inheritAttrs:!1,props:mo(),setup(o,r){let{slots:n,emit:t,attrs:e}=r;const d=U(),{prefixCls:s,direction:w,size:f}=W("radio",o),[b,B]=J(s),g=H(o.value),C=H(!1);return lo(()=>o.value,c=>{g.value=c,C.value=!1}),co({onChange:c=>{const h=g.value,{value:a}=c.target;"value"in o||(g.value=a),!C.value&&a!==h&&(C.value=!0,t("update:value",a),t("change",c),d.onFieldChange()),so(()=>{C.value=!1})},value:g,disabled:O(()=>o.disabled),name:O(()=>o.name),optionType:O(()=>o.optionType)}),()=>{var c;const{options:h,buttonStyle:a,id:m=d.id.value}=o,u=`${s.value}-group`,p=K(u,`${u}-${a}`,{[`${u}-${f.value}`]:f.value,[`${u}-rtl`]:w.value==="rtl"},e.class,B.value);let y=null;return h&&h.length>0?y=h.map(i=>{if(typeof i=="string"||typeof i=="number")return T(k,{key:i,prefixCls:s.value,disabled:o.disabled,value:i,checked:g.value===i},{default:()=>[i]});const{value:v,disabled:R,label:l}=i;return T(k,{key:`radio-group-value-options-${v}`,prefixCls:s.value,disabled:R||o.disabled,value:v,checked:g.value===v},{default:()=>[l]})}):y=(c=n.default)===null||c===void 0?void 0:c.call(n),b(T("div",D(D({},e),{},{class:p,id:m}),[y]))}}}),$o=M({compatConfig:{MODE:3},name:"ARadioButton",inheritAttrs:!1,props:Q(),setup(o,r){let{slots:n,attrs:t}=r;const{prefixCls:e}=W("radio",o);return po("button"),()=>{var d;return T(k,D(D(D({},t),o),{},{prefixCls:e.value}),{default:()=>[(d=n.default)===null||d===void 0?void 0:d.call(n)]})}}});k.Group=So;k.Button=$o;k.install=function(o){return o.component(k.name,k),o.component(k.Group.name,k.Group),o.component(k.Button.name,k.Button),o};export{$o as Button,So as Group,$o as RadioButton,So as RadioGroup,k as default};