chainlesschain 0.161.12 → 0.162.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/package.json +1 -1
  2. package/src/assets/web-panel/.build-hash +1 -1
  3. package/src/assets/web-panel/assets/{AIOps-B1dwBvzW.js → AIOps-Dn8q-Cu4.js} +1 -1
  4. package/src/assets/web-panel/assets/{ActionButton-DfR4oLvh.js → ActionButton-BePEVs4O.js} +1 -1
  5. package/src/assets/web-panel/assets/{Analytics-D3ZYGXjr.js → Analytics-CKp-5Gi0.js} +1 -1
  6. package/src/assets/web-panel/assets/{AppLayout-CsmOoh-7.js → AppLayout-BSudqld0.js} +2 -2
  7. package/src/assets/web-panel/assets/{Audit-B4gwDm63.js → Audit-iefpSeRG.js} +1 -1
  8. package/src/assets/web-panel/assets/{Backup-T42uSArV.js → Backup-Ce43ZIhD.js} +1 -1
  9. package/src/assets/web-panel/assets/{BaseInput-CFi52nMs.js → BaseInput-BvGiwRav.js} +1 -1
  10. package/src/assets/web-panel/assets/{Chat-D7Vvok1V.js → Chat-BAaQg-Oc.js} +1 -1
  11. package/src/assets/web-panel/assets/{Checkbox-Dwaflpww.js → Checkbox-Dvn8uxKO.js} +1 -1
  12. package/src/assets/web-panel/assets/{Codegen-BIqx3G0b.js → Codegen-CTcZCayj.js} +1 -1
  13. package/src/assets/web-panel/assets/{Col-DzIUYUNu.js → Col-CBFpGgb5.js} +1 -1
  14. package/src/assets/web-panel/assets/{Community-DKePtzhk.js → Community-DmCYaV9M.js} +1 -1
  15. package/src/assets/web-panel/assets/{Compact-CirVV9Wq.js → Compact-DnOD5uMF.js} +1 -1
  16. package/src/assets/web-panel/assets/{Compliance-CrXOr0sy.js → Compliance-u53e9lg-.js} +1 -1
  17. package/src/assets/web-panel/assets/{Cowork-BEBP6Tht.js → Cowork-CL5ohuXH.js} +1 -1
  18. package/src/assets/web-panel/assets/{Cron-k7nNUuqh.js → Cron-DubcmRgt.js} +1 -1
  19. package/src/assets/web-panel/assets/{Crosschain-CBnX0Dhq.js → Crosschain-BWXcUXc3.js} +1 -1
  20. package/src/assets/web-panel/assets/{DID-B48FszWS.js → DID-Cw0i8WjE.js} +1 -1
  21. package/src/assets/web-panel/assets/{Dashboard-Pb3qfFpp.js → Dashboard-BbofvIWH.js} +2 -2
  22. package/src/assets/web-panel/assets/{Dropdown-pUHy4CQ2.js → Dropdown-DN6ur5xV.js} +1 -1
  23. package/src/assets/web-panel/assets/{Federation-CT0Qs-kR.js → Federation-CA-rIdkY.js} +1 -1
  24. package/src/assets/web-panel/assets/{FormItemContext-CbJJp5BR.js → FormItemContext-D_HGU4aA.js} +1 -1
  25. package/src/assets/web-panel/assets/{Git-B3mGNLQe.js → Git-CBWFs6Uk.js} +1 -1
  26. package/src/assets/web-panel/assets/{Governance-BKf4733q.js → Governance-Cx6PTC43.js} +1 -1
  27. package/src/assets/web-panel/assets/{Inference-DZjU541G.js → Inference-Ubk1VstS.js} +1 -1
  28. package/src/assets/web-panel/assets/{KnowledgeGraph-C8L-7Dd1.js → KnowledgeGraph-DTB10MYO.js} +1 -1
  29. package/src/assets/web-panel/assets/{Logs-CwDwOiKv.js → Logs-Tfk4FBVC.js} +1 -1
  30. package/src/assets/web-panel/assets/{Marketplace-C2YWWU0M.js → Marketplace-BAsztG4O.js} +1 -1
  31. package/src/assets/web-panel/assets/{McpTools-dIbkOypF.js → McpTools-DliPfvuK.js} +1 -1
  32. package/src/assets/web-panel/assets/{Memory-7eF8WzcY.js → Memory-hkw6Xwyv.js} +1 -1
  33. package/src/assets/web-panel/assets/{MobileBridge-C74GHLbX.js → MobileBridge-eeNMFGj6.js} +1 -1
  34. package/src/assets/web-panel/assets/{Mtc-CSEDo5Fo.js → Mtc-BP3Riowm.js} +1 -1
  35. package/src/assets/web-panel/assets/{MtcAudit-DiJXxOrB.js → MtcAudit-DvD7pE7V.js} +1 -1
  36. package/src/assets/web-panel/assets/Multisig-CPtc-fVL.js +7 -0
  37. package/src/assets/web-panel/assets/Multisig-kwPDnXnl.css +1 -0
  38. package/src/assets/web-panel/assets/{NLProgramming-DjF-gIUw.js → NLProgramming-1y__Epjg.js} +1 -1
  39. package/src/assets/web-panel/assets/{Notes-BUE5CvMO.js → Notes-CEvJqMP8.js} +1 -1
  40. package/src/assets/web-panel/assets/{NotificationSettings-Dfbrobje.js → NotificationSettings-wmCYm99r.js} +1 -1
  41. package/src/assets/web-panel/assets/{Organization-C6YvqjQB.js → Organization-CSoz8gGr.js} +1 -1
  42. package/src/assets/web-panel/assets/{Overflow-BvHNhdMR.js → Overflow-kf1mnFrM.js} +1 -1
  43. package/src/assets/web-panel/assets/{P2P-BO0hQHFS.js → P2P-C4GfXJ8Z.js} +1 -1
  44. package/src/assets/web-panel/assets/{Permissions-CCPlrJeP.js → Permissions-CW1Mn95X.js} +1 -1
  45. package/src/assets/web-panel/assets/{Pipeline-DTCL3FjJ.js → Pipeline-CM1ppddn.js} +1 -1
  46. package/src/assets/web-panel/assets/{Privacy-08DYgOe_.js → Privacy-DuAY5fEm.js} +1 -1
  47. package/src/assets/web-panel/assets/{ProjectInit-B7j-Z8sa.js → ProjectInit-C72779b6.js} +1 -1
  48. package/src/assets/web-panel/assets/{ProjectSettings-CFqLhV1w.js → ProjectSettings-CAilXWam.js} +1 -1
  49. package/src/assets/web-panel/assets/{Projects-BPlpx2UN.js → Projects-DTIlVTkF.js} +1 -1
  50. package/src/assets/web-panel/assets/{Providers-BCBPbVbF.js → Providers-Cf6Yv8bu.js} +1 -1
  51. package/src/assets/web-panel/assets/{QuickAsk-C8Job6zl.js → QuickAsk-CK1_VVzw.js} +1 -1
  52. package/src/assets/web-panel/assets/{Recommend-DOV_Aje-.js → Recommend-QBC7KgvR.js} +1 -1
  53. package/src/assets/web-panel/assets/{Reputation-DOgK_dIK.js → Reputation-ju6lWzMM.js} +1 -1
  54. package/src/assets/web-panel/assets/{Row-8jdU1xYg.js → Row-DQwipGEm.js} +1 -1
  55. package/src/assets/web-panel/assets/{RssFeed-B289OgNZ.js → RssFeed-DkLGmeLW.js} +1 -1
  56. package/src/assets/web-panel/assets/{Search-cr0AndFE.js → Search-YYhitzkt.js} +1 -1
  57. package/src/assets/web-panel/assets/{Security-w4diykaE.js → Security-DEllaBqe.js} +1 -1
  58. package/src/assets/web-panel/assets/{Services-dTxAI5cG.js → Services-BgPHBq9S.js} +1 -1
  59. package/src/assets/web-panel/assets/{Skeleton-B3FiUiRo.js → Skeleton-DHEyJI7c.js} +1 -1
  60. package/src/assets/web-panel/assets/{Skills-DgtBTAFC.js → Skills-c212vgf3.js} +1 -1
  61. package/src/assets/web-panel/assets/{Sla-B4Y6bvbL.js → Sla-COqhw_no.js} +1 -1
  62. package/src/assets/web-panel/assets/{SpeechSettings-C8FEvArc.js → SpeechSettings-Bmds06su.js} +1 -1
  63. package/src/assets/web-panel/assets/{SyncSettings-CHvV5L0m.js → SyncSettings-Bx1_A34Y.js} +1 -1
  64. package/src/assets/web-panel/assets/{Tasks-B4Py5ORS.js → Tasks-B0Lo_9aN.js} +1 -1
  65. package/src/assets/web-panel/assets/{Templates-MeTyXM5u.js → Templates-D0RcpfuW.js} +1 -1
  66. package/src/assets/web-panel/assets/{Tenant-Doiz7wyQ.js → Tenant-G0yVctLy.js} +1 -1
  67. package/src/assets/web-panel/assets/{Terminal-DSEAdwWN.js → Terminal-DqgLtK3c.js} +1 -1
  68. package/src/assets/web-panel/assets/{Tokens-BBrtaEKt.js → Tokens-Cdt0aqCc.js} +1 -1
  69. package/src/assets/web-panel/assets/{Trigger-nPvjho27.js → Trigger-DFbfZFuJ.js} +1 -1
  70. package/src/assets/web-panel/assets/{Trust-BFwPyS_6.js → Trust-BQXsWPz6.js} +1 -1
  71. package/src/assets/web-panel/assets/{UkeySign-DFsHoY1J.js → UkeySign-DBem5Xkj.js} +1 -1
  72. package/src/assets/web-panel/assets/{VideoEditing-FkSKqHE9.js → VideoEditing-B1yipKKv.js} +1 -1
  73. package/src/assets/web-panel/assets/{Wallet-AXo-_4-w.js → Wallet-iPJtU5QZ.js} +1 -1
  74. package/src/assets/web-panel/assets/{WebAuthn-DoScnQ-4.js → WebAuthn-HLb9srUL.js} +1 -1
  75. package/src/assets/web-panel/assets/{WorkflowEditor-IEMfIax-.js → WorkflowEditor-BSqXL8GD.js} +1 -1
  76. package/src/assets/web-panel/assets/{chat-pc1ciH6T.js → chat-D_J-ZVBh.js} +1 -1
  77. package/src/assets/web-panel/assets/{colors-CjkIkB0e.js → colors-B126JcB4.js} +1 -1
  78. package/src/assets/web-panel/assets/{compact-item-CQZnkP5p.js → compact-item-Bw5EEKw4.js} +1 -1
  79. package/src/assets/web-panel/assets/{createContext-B1McGnV-.js → createContext-xLJXI46O.js} +1 -1
  80. package/src/assets/web-panel/assets/{hasIn-CbkA6peP.js → hasIn-K8QCNlyy.js} +1 -1
  81. package/src/assets/web-panel/assets/{index-ChCCGHwz.js → index-85lab9HJ.js} +1 -1
  82. package/src/assets/web-panel/assets/{index-DYAWIXFt.js → index-B9ztiTnX.js} +1 -1
  83. package/src/assets/web-panel/assets/index-BEYypR_d.js +1 -0
  84. package/src/assets/web-panel/assets/{index-wwQ_ZkWN.js → index-BQ_NIMQS.js} +1 -1
  85. package/src/assets/web-panel/assets/{index-BNLeseG1.js → index-BSgvvXgq.js} +1 -1
  86. package/src/assets/web-panel/assets/{index-DcSe5y5O.js → index-BWUG9yVI.js} +1 -1
  87. package/src/assets/web-panel/assets/{index-uWvLy_3T.js → index-B_PqXUkT.js} +1 -1
  88. package/src/assets/web-panel/assets/{index-CJr12ypE.js → index-BaXXyyT0.js} +1 -1
  89. package/src/assets/web-panel/assets/{index-NRWBOo4F.js → index-Bptjq-wQ.js} +1 -1
  90. package/src/assets/web-panel/assets/{index-Dzfj71tf.js → index-BsbKjK1o.js} +1 -1
  91. package/src/assets/web-panel/assets/{index-DMjPzhsp.js → index-Bv9odL87.js} +1 -1
  92. package/src/assets/web-panel/assets/{index-5c4JzwY3.js → index-C2CgD7TN.js} +1 -1
  93. package/src/assets/web-panel/assets/{index-CzZ3LxPK.js → index-COCq6xuZ.js} +1 -1
  94. package/src/assets/web-panel/assets/{index-Dn7SHV2e.js → index-CVeuzjxG.js} +1 -1
  95. package/src/assets/web-panel/assets/{index-DGb36exe.js → index-CWBajOcE.js} +1 -1
  96. package/src/assets/web-panel/assets/{index-C5mpCgak.js → index-CvAey6iD.js} +1 -1
  97. package/src/assets/web-panel/assets/{index-CKledOCh.js → index-DFPVNSby.js} +1 -1
  98. package/src/assets/web-panel/assets/{index-B8r6OBuk.js → index-DFwF_JeQ.js} +1 -1
  99. package/src/assets/web-panel/assets/{index-DjxVsyn_.js → index-DLZZi1Km.js} +1 -1
  100. package/src/assets/web-panel/assets/{index-DPzT5L14.js → index-DY5Oc3z6.js} +3 -3
  101. package/src/assets/web-panel/assets/index-DZWfmuM2.js +1 -0
  102. package/src/assets/web-panel/assets/{index-CFCQl1hk.js → index-DZcij18m.js} +1 -1
  103. package/src/assets/web-panel/assets/{index-D4rhVRSV.js → index-Da7bZewp.js} +1 -1
  104. package/src/assets/web-panel/assets/{index-C052wi94.js → index-DdMzLeDn.js} +1 -1
  105. package/src/assets/web-panel/assets/{index-BTyhXFDW.js → index-Dj8BNg-z.js} +1 -1
  106. package/src/assets/web-panel/assets/{index-DHtiecyM.js → index-DlX09aXr.js} +1 -1
  107. package/src/assets/web-panel/assets/{index-DjM0jsm1.js → index-DrfiELFa.js} +1 -1
  108. package/src/assets/web-panel/assets/{index-CGke5qZp.js → index-Dt0Tp8TS.js} +1 -1
  109. package/src/assets/web-panel/assets/{index-CKwkP66s.js → index-DvNCyE3A.js} +1 -1
  110. package/src/assets/web-panel/assets/{index-DWq64zmv.js → index-LZYGhjVr.js} +1 -1
  111. package/src/assets/web-panel/assets/{index-Di5tuS0d.js → index-fMwtau_-.js} +1 -1
  112. package/src/assets/web-panel/assets/{index-CEENN81t.js → index-mqHxeING.js} +1 -1
  113. package/src/assets/web-panel/assets/{index-DHpwwlmv.js → index-mzNWO8Yy.js} +1 -1
  114. package/src/assets/web-panel/assets/{index-DJWYN-AT.js → index-p3d5_s7V.js} +1 -1
  115. package/src/assets/web-panel/assets/{index-C0Lj7Yl0.js → index-qJbfToeQ.js} +1 -1
  116. package/src/assets/web-panel/assets/{index-fqI1KnP_.js → index-sAfwWh0R.js} +1 -1
  117. package/src/assets/web-panel/assets/{index-DsChgzu2.js → index-xJkPbv0L.js} +1 -1
  118. package/src/assets/web-panel/assets/{index-CJbqE5Sw.js → index-yhA-qP4Y.js} +1 -1
  119. package/src/assets/web-panel/assets/{index-Bs-romIz.js → index-zEr6BW9X.js} +1 -1
  120. package/src/assets/web-panel/assets/{initDefaultProps-BTloFqyf.js → initDefaultProps-CacwmJft.js} +1 -1
  121. package/src/assets/web-panel/assets/{motion-44iMBc1o.js → motion-BWrP7Lz6.js} +1 -1
  122. package/src/assets/web-panel/assets/{move-CyWQI5eW.js → move-imnbiy1n.js} +1 -1
  123. package/src/assets/web-panel/assets/{omit-CXfJtuFy.js → omit-BlaOv91I.js} +1 -1
  124. package/src/assets/web-panel/assets/{pickAttrs-ANFpSZes.js → pickAttrs-DUGKp0ro.js} +1 -1
  125. package/src/assets/web-panel/assets/{placementArrow-CigX-url.js → placementArrow-P0ZA4yAK.js} +1 -1
  126. package/src/assets/web-panel/assets/{responsiveObserve-Ch48RA0m.js → responsiveObserve-CZz-M9cI.js} +1 -1
  127. package/src/assets/web-panel/assets/{slide-BEz3LORF.js → slide-BEnICwoX.js} +1 -1
  128. package/src/assets/web-panel/assets/{statusUtils-D9EniG8V.js → statusUtils-DdYKRSiH.js} +1 -1
  129. package/src/assets/web-panel/assets/{styleChecker-C1IvuY3L.js → styleChecker-DgUxvOQt.js} +1 -1
  130. package/src/assets/web-panel/assets/{useFlexGapSupport-C92oHeXB.js → useFlexGapSupport-BUEmeWdR.js} +1 -1
  131. package/src/assets/web-panel/assets/{useFs-CJhvFpgB.js → useFs-BXsj6Z5e.js} +1 -1
  132. package/src/assets/web-panel/assets/{vnode-BPkyunN_.js → vnode-B3Pp583L.js} +1 -1
  133. package/src/assets/web-panel/assets/{zoom-B6Ipb64r.js → zoom-D-LYfiQh.js} +1 -1
  134. package/src/assets/web-panel/index.html +1 -1
  135. package/src/commands/crosschain.js +403 -1
  136. package/src/commands/pair.js +291 -0
  137. package/src/index.js +2 -0
  138. package/src/lib/cross-chain-mtc.js +275 -6
  139. package/src/lib/cross-chain.js +48 -2
  140. package/src/lib/lan-pairing-preflight.js +425 -0
  141. package/src/lib/lan-pairing-tokens.js +264 -0
  142. package/src/assets/web-panel/assets/Multisig-D-IuEDLa.css +0 -1
  143. package/src/assets/web-panel/assets/Multisig-FZTU5ri6.js +0 -1
  144. package/src/assets/web-panel/assets/index-BXfePRef.js +0 -1
  145. package/src/assets/web-panel/assets/index-Dc4fj_Ys.js +0 -1
@@ -1,4 +1,4 @@
1
- import{h as S,P as R,f as k,i as ue,U as Qe,J as Tt,A as vn,r as Je,X as Ye,m as be,af as Mt,l as gn,q as hn,L as bn,as as Sn,V as yn,$ as Te,G as wn,a0 as vt,s as In,at as Cn}from"./index-DPzT5L14.js";import{T as xn}from"./Trigger-nPvjho27.js";import{d as fe,c as T,f as V,r as me,k as $n,a5 as Et,i as Ne,b as Ce,o as Se,w as ne,O as Xe,F as Ee,s as X,e as Pe,p as Ze,j as On,a as xe,t as Tn,x as Mn,n as Me,q as En,z as ke,a8 as ge}from"./vendor-M5lGV-wr.js";import{K as _}from"./KeyCode-D63Tfrq7.js";import{c as Ft}from"./vnode-BPkyunN_.js";import{B as Fn}from"./BaseInput-CFi52nMs.js";import{p as et}from"./pickAttrs-ANFpSZes.js";import{O as Pn}from"./Overflow-BvHNhdMR.js";import{i as Rn}from"./isMobile--2fOlCHx.js";import{i as tt}from"./initDefaultProps-BTloFqyf.js";import{R as Dn}from"./index-CJbqE5Sw.js";import{w as ve}from"./raf-Deuc0E8-.js";import{s as he}from"./motion-44iMBc1o.js";import{o as Le}from"./omit-CXfJtuFy.js";import{u as gt}from"./useMergedState-O7QXt4P5.js";import{u as ht}from"./useState-CSzR8F8O.js";import{C as Vn,L as Hn,ag as Nn,b as Ln,t as Bn,ae as _n}from"./icons-NT6gy8Ee.js";import{a as An,F as zn}from"./FormItemContext-CbJJp5BR.js";import{g as Wn,a as Kn}from"./statusUtils-D9EniG8V.js";import{u as jn}from"./Compact-CirVV9Wq.js";import{i as bt}from"./move-CyWQI5eW.js";import{s as Un,a as Gn,b as Yn,c as Xn,i as St}from"./slide-BEz3LORF.js";import{g as qn}from"./compact-item-CQZnkP5p.js";function yt(e,t){const{key:o}=e;let n;return"value"in e&&({value:n}=e),o??(n!==void 0?n:`rc-index-key-${t}`)}function Pt(e,t){const{label:o,value:n,options:l}=e||{};return{label:o||(t?"children":"label"),value:n||"value",options:l||"options"}}function Qn(e){let{fieldNames:t,childrenAsData:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=[],{label:l,value:i,options:d}=Pt(t,!1);function a(f,s){f.forEach(r=>{const v=r[l];if(s||!(d in r)){const b=r[i];n.push({key:yt(r,n.length),groupOption:s,data:r,label:v,value:b})}else{let b=v;b===void 0&&o&&(b=r.label),n.push({key:yt(r,n.length),group:!0,data:r,label:b}),a(r[d],!0)}})}return a(e,!1),n}function qe(e){const t=S({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return t}}),t}function Jn(e,t){if(!t||!t.length)return null;let o=!1;function n(i,d){let[a,...f]=d;if(!a)return[i];const s=i.split(a);return o=o||s.length>1,s.reduce((r,v)=>[...r,...n(v,f)],[]).filter(r=>r)}const l=n(e,t);return o?l:null}var Zn=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const kn=e=>{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},eo=fe({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:R.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:R.oneOfType([Number,Boolean]).def(!0),popupElement:R.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(e,t){let{slots:o,attrs:n,expose:l}=t;const i=V(()=>{const{dropdownMatchSelectWidth:a}=e;return kn(a)}),d=me();return l({getPopupElement:()=>d.value}),()=>{const a=S(S({},e),n),{empty:f=!1}=a,s=Zn(a,["empty"]),{visible:r,dropdownAlign:v,prefixCls:b,popupElement:$,dropdownClassName:h,dropdownStyle:y,direction:w="ltr",placement:C,dropdownMatchSelectWidth:D,containerWidth:N,dropdownRender:E,animation:g,transitionName:P,getPopupContainer:x,getTriggerDOMNode:F,onPopupVisibleChange:L,onPopupMouseEnter:A,onPopupFocusin:B,onPopupFocusout:U}=s,Y=`${b}-dropdown`;let W=$;E&&(W=E({menuNode:$,props:e}));const G=g?`${Y}-${g}`:P,z=S({minWidth:`${N}px`},y);return typeof D=="number"?z.width=`${D}px`:D&&(z.width=`${N}px`),T(xn,k(k({},e),{},{showAction:L?["click"]:[],hideAction:L?["click"]:[],popupPlacement:C||(w==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:i.value,prefixCls:Y,popupTransitionName:G,popupAlign:v,popupVisible:r,getPopupContainer:x,popupClassName:ue(h,{[`${Y}-empty`]:f}),popupStyle:z,getTriggerDOMNode:F,onPopupVisibleChange:L}),{default:o.default,popup:()=>T("div",{ref:d,onMouseenter:A,onFocusin:B,onFocusout:U},[W])})}}}),we=(e,t)=>{let{slots:o}=t;var n;const{class:l,customizeIcon:i,customizeIconProps:d,onMousedown:a,onClick:f}=e;let s;return typeof i=="function"?s=i(d):s=$n(i)?Et(i):i,T("span",{class:l,onMousedown:r=>{r.preventDefault(),a&&a(r)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:f,"aria-hidden":!0},[s!==void 0?s:T("span",{class:l.split(/\s+/).map(r=>`${r}-icon`)},[(n=o.default)===null||n===void 0?void 0:n.call(o)])])};we.inheritAttrs=!1;we.displayName="TransBtn";we.props={class:String,customizeIcon:R.any,customizeIconProps:R.any,onMousedown:Function,onClick:Function};const to={inputRef:R.any,prefixCls:String,id:String,inputElement:R.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:R.oneOfType([R.number,R.string]),attrs:R.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},Rt=fe({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:to,setup(e){let t=null;const o=Ne("VCSelectContainerEvent");return()=>{var n;const{prefixCls:l,id:i,inputElement:d,disabled:a,tabindex:f,autofocus:s,autocomplete:r,editable:v,activeDescendantId:b,value:$,onKeydown:h,onMousedown:y,onChange:w,onPaste:C,onCompositionstart:D,onCompositionend:N,onFocus:E,onBlur:g,open:P,inputRef:x,attrs:F}=e;let L=d||T(Fn,null,null);const A=L.props||{},{onKeydown:B,onInput:U,onFocus:Y,onBlur:W,onMousedown:G,onCompositionstart:z,onCompositionend:oe,style:ie}=A;return L=Ft(L,S(S(S(S(S({type:"search"},A),{id:i,ref:x,disabled:a,tabindex:f,lazy:!1,autocomplete:r||"off",autofocus:s,class:ue(`${l}-selection-search-input`,(n=L?.props)===null||n===void 0?void 0:n.class),role:"combobox","aria-expanded":P,"aria-haspopup":"listbox","aria-owns":`${i}_list`,"aria-autocomplete":"list","aria-controls":`${i}_list`,"aria-activedescendant":b}),F),{value:v?$:"",readonly:!v,unselectable:v?null:"on",style:S(S({},ie),{opacity:v?null:0}),onKeydown:p=>{h(p),B&&B(p)},onMousedown:p=>{y(p),G&&G(p)},onInput:p=>{w(p),U&&U(p)},onCompositionstart(p){D(p),z&&z(p)},onCompositionend(p){N(p),oe&&oe(p)},onPaste:C,onFocus:function(){clearTimeout(t),Y&&Y(arguments.length<=0?void 0:arguments[0]),E&&E(arguments.length<=0?void 0:arguments[0]),o?.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var p=arguments.length,H=new Array(p),O=0;O<p;O++)H[O]=arguments[O];t=setTimeout(()=>{W&&W(H[0]),g&&g(H[0]),o?.blur(H[0])},100)}}),L.type==="textarea"?{}:{type:"search"}),!0,!0),L}}}),no=Symbol("TreeSelectLegacyContextPropsKey");function nt(){return Ne(no,{})}const oo={id:String,prefixCls:String,values:R.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:R.any,placeholder:R.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:R.oneOfType([R.number,R.string]),compositionStatus:Boolean,removeIcon:R.any,choiceTransitionName:String,maxTagCount:R.oneOfType([R.number,R.string]),maxTagTextLength:Number,maxTagPlaceholder:R.any.def(()=>e=>`+ ${e.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},wt=e=>{e.preventDefault(),e.stopPropagation()},lo=fe({name:"MultipleSelectSelector",inheritAttrs:!1,props:oo,setup(e){const t=X(),o=X(0),n=X(!1),l=nt(),i=V(()=>`${e.prefixCls}-selection`),d=V(()=>e.open||e.mode==="tags"?e.searchValue:""),a=V(()=>e.mode==="tags"||e.showSearch&&(e.open||n.value)),f=me("");Ce(()=>{f.value=d.value}),Se(()=>{ne(f,()=>{o.value=t.value.scrollWidth},{flush:"post",immediate:!0})});function s(h,y,w,C,D){return T("span",{class:ue(`${i.value}-item`,{[`${i.value}-item-disabled`]:w}),title:typeof h=="string"||typeof h=="number"?h.toString():void 0},[T("span",{class:`${i.value}-item-content`},[y]),C&&T(we,{class:`${i.value}-item-remove`,onMousedown:wt,onClick:D,customizeIcon:e.removeIcon},{default:()=>[Xe("×")]})])}function r(h,y,w,C,D,N){var E;const g=x=>{wt(x),e.onToggleOpen(!open)};let P=N;return l.keyEntities&&(P=((E=l.keyEntities[h])===null||E===void 0?void 0:E.node)||{}),T("span",{key:h,onMousedown:g},[e.tagRender({label:y,value:h,disabled:w,closable:C,onClose:D,option:P})])}function v(h){const{disabled:y,label:w,value:C,option:D}=h,N=!e.disabled&&!y;let E=w;if(typeof e.maxTagTextLength=="number"&&(typeof w=="string"||typeof w=="number")){const P=String(E);P.length>e.maxTagTextLength&&(E=`${P.slice(0,e.maxTagTextLength)}...`)}const g=P=>{var x;P&&P.stopPropagation(),(x=e.onRemove)===null||x===void 0||x.call(e,h)};return typeof e.tagRender=="function"?r(C,E,y,N,g,D):s(w,E,y,N,g)}function b(h){const{maxTagPlaceholder:y=C=>`+ ${C.length} ...`}=e,w=typeof y=="function"?y(h):y;return s(w,w,!1)}const $=h=>{const y=h.target.composing;f.value=h.target.value,y||e.onInputChange(h)};return()=>{const{id:h,prefixCls:y,values:w,open:C,inputRef:D,placeholder:N,disabled:E,autofocus:g,autocomplete:P,activeDescendantId:x,tabindex:F,compositionStatus:L,onInputPaste:A,onInputKeyDown:B,onInputMouseDown:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=T("div",{class:`${i.value}-search`,style:{width:o.value+"px"},key:"input"},[T(Rt,{inputRef:D,open:C,prefixCls:y,id:h,inputElement:null,disabled:E,autofocus:g,autocomplete:P,editable:a.value,activeDescendantId:x,value:f.value,onKeydown:B,onMousedown:U,onChange:$,onPaste:A,onCompositionstart:Y,onCompositionend:W,tabindex:F,attrs:et(e,!0),onFocus:()=>n.value=!0,onBlur:()=>n.value=!1},null),T("span",{ref:t,class:`${i.value}-search-mirror`,"aria-hidden":!0},[f.value,Xe(" ")])]),z=T(Pn,{prefixCls:`${i.value}-overflow`,data:w,renderItem:v,renderRest:b,suffix:G,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return T(Ee,null,[z,!w.length&&!d.value&&!L&&T("span",{class:`${i.value}-placeholder`},[N])])}}}),io={inputElement:R.any,id:String,prefixCls:String,values:R.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:R.any,placeholder:R.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:R.oneOfType([R.number,R.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},ot=fe({name:"SingleSelector",setup(e){const t=X(!1),o=V(()=>e.mode==="combobox"),n=V(()=>o.value||e.showSearch),l=V(()=>{let r=e.searchValue||"";return o.value&&e.activeValue&&!t.value&&(r=e.activeValue),r}),i=nt();ne([o,()=>e.activeValue],()=>{o.value&&(t.value=!1)},{immediate:!0});const d=V(()=>e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!l.value||e.compositionStatus),a=V(()=>{const r=e.values[0];return r&&(typeof r.label=="string"||typeof r.label=="number")?r.label.toString():void 0}),f=()=>{if(e.values[0])return null;const r=d.value?{visibility:"hidden"}:void 0;return T("span",{class:`${e.prefixCls}-selection-placeholder`,style:r},[e.placeholder])},s=r=>{r.target.composing||(t.value=!0,e.onInputChange(r))};return()=>{var r,v,b,$;const{inputElement:h,prefixCls:y,id:w,values:C,inputRef:D,disabled:N,autofocus:E,autocomplete:g,activeDescendantId:P,open:x,tabindex:F,optionLabelRender:L,onInputKeyDown:A,onInputMouseDown:B,onInputPaste:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=C[0];let z=null;if(G&&i.customSlots){const oe=(r=G.key)!==null&&r!==void 0?r:G.value,ie=((v=i.keyEntities[oe])===null||v===void 0?void 0:v.node)||{};z=i.customSlots[(b=ie.slots)===null||b===void 0?void 0:b.title]||i.customSlots.title||G.label,typeof z=="function"&&(z=z(ie))}else z=L&&G?L(G.option):G?.label;return T(Ee,null,[T("span",{class:`${y}-selection-search`},[T(Rt,{inputRef:D,prefixCls:y,id:w,open:x,inputElement:h,disabled:N,autofocus:E,autocomplete:g,editable:n.value,activeDescendantId:P,value:l.value,onKeydown:A,onMousedown:B,onChange:s,onPaste:U,onCompositionstart:Y,onCompositionend:W,tabindex:F,attrs:et(e,!0)},null)]),!o.value&&G&&!d.value&&T("span",{class:`${y}-selection-item`,title:a.value},[T(Ee,{key:($=G.key)!==null&&$!==void 0?$:G.value},[z])]),f()])}}});ot.props=io;ot.inheritAttrs=!1;function ao(e){return![_.ESC,_.SHIFT,_.BACKSPACE,_.TAB,_.WIN_KEY,_.ALT,_.META,_.WIN_KEY_RIGHT,_.CTRL,_.SEMICOLON,_.EQUALS,_.CAPS_LOCK,_.CONTEXT_MENU,_.F1,_.F2,_.F3,_.F4,_.F5,_.F6,_.F7,_.F8,_.F9,_.F10,_.F11,_.F12].includes(e)}function Dt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=null,o;Pe(()=>{clearTimeout(o)});function n(l){(l||t===null)&&(t=l),clearTimeout(o),o=setTimeout(()=>{t=null},e)}return[()=>t,n]}function Fe(){const e=t=>{e.current=t};return e}const ro=fe({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:R.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:R.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:R.oneOfType([R.number,R.string]),disabled:{type:Boolean,default:void 0},placeholder:R.any,removeIcon:R.any,maxTagCount:R.oneOfType([R.number,R.string]),maxTagTextLength:Number,maxTagPlaceholder:R.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(e,t){let{expose:o}=t;const n=Fe(),l=me(!1),[i,d]=Dt(0),a=C=>{const{which:D}=C;(D===_.UP||D===_.DOWN)&&C.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(C),D===_.ENTER&&e.mode==="tags"&&!l.value&&!e.open&&e.onSearchSubmit(C.target.value),ao(D)&&e.onToggleOpen(!0)},f=()=>{d(!0)};let s=null;const r=C=>{e.onSearch(C,!0,l.value)!==!1&&e.onToggleOpen(!0)},v=()=>{l.value=!0},b=C=>{l.value=!1,e.mode!=="combobox"&&r(C.target.value)},$=C=>{let{target:{value:D}}=C;if(e.tokenWithEnter&&s&&/[\r\n]/.test(s)){const N=s.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");D=D.replace(N,s)}s=null,r(D)},h=C=>{const{clipboardData:D}=C;s=D.getData("text")},y=C=>{let{target:D}=C;D!==n.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{n.current.focus()}):n.current.focus())},w=C=>{const D=i();C.target!==n.current&&!D&&C.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!D)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return o({focus:()=>{n.current.focus()},blur:()=>{n.current.blur()}}),()=>{const{prefixCls:C,domRef:D,mode:N}=e,E={inputRef:n,onInputKeyDown:a,onInputMouseDown:f,onInputChange:$,onInputPaste:h,compositionStatus:l.value,onInputCompositionStart:v,onInputCompositionEnd:b},g=N==="multiple"||N==="tags"?T(lo,k(k({},e),E),null):T(ot,k(k({},e),E),null);return T("div",{ref:D,class:`${C}-selector`,onClick:y,onMousedown:w},[g])}}});function so(e,t,o){function n(l){var i,d,a;let f=l.target;f.shadowRoot&&l.composed&&(f=l.composedPath()[0]||f);const s=[(i=e[0])===null||i===void 0?void 0:i.value,(a=(d=e[1])===null||d===void 0?void 0:d.value)===null||a===void 0?void 0:a.getPopupElement()];t.value&&s.every(r=>r&&!r.contains(f)&&r!==f)&&o(!1)}Se(()=>{window.addEventListener("mousedown",n)}),Pe(()=>{window.removeEventListener("mousedown",n)})}function uo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const t=X(!1);let o;const n=()=>{clearTimeout(o)};return Se(()=>{n()}),[t,(i,d)=>{n(),o=setTimeout(()=>{t.value=i,d&&d()},e)},n]}const Vt=Symbol("BaseSelectContextKey");function co(e){return Ze(Vt,e)}function fo(){return Ne(Vt,{})}function Ht(e){if(!On(e))return xe(e);const t=new Proxy({},{get(o,n,l){return Reflect.get(e.value,n,l)},set(o,n,l){return e.value[n]=l,!0},deleteProperty(o,n){return Reflect.deleteProperty(e.value,n)},has(o,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return xe(t)}var po=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const mo=["value","onChange","removeIcon","placeholder","autofocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabindex","OptionList","notFoundContent"],vo=()=>({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:R.any,emptyOptions:Boolean}),Nt=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:R.any,placeholder:R.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:R.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:R.any,clearIcon:R.any,removeIcon:R.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),go=()=>S(S({},vo()),Nt());function Lt(e){return e==="tags"||e==="multiple"}const ho=fe({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:tt(go(),{showAction:[],notFoundContent:"Not Found"}),setup(e,t){let{attrs:o,expose:n,slots:l}=t;const i=V(()=>Lt(e.mode)),d=V(()=>e.showSearch!==void 0?e.showSearch:i.value||e.mode==="combobox"),a=X(!1);Se(()=>{a.value=Rn()});const f=nt(),s=X(null),r=Fe(),v=X(null),b=X(null),$=X(null),h=me(!1),[y,w,C]=uo();n({focus:()=>{var u;(u=b.value)===null||u===void 0||u.focus()},blur:()=>{var u;(u=b.value)===null||u===void 0||u.blur()},scrollTo:u=>{var c;return(c=$.value)===null||c===void 0?void 0:c.scrollTo(u)}});const E=V(()=>{var u;if(e.mode!=="combobox")return e.searchValue;const c=(u=e.displayValues[0])===null||u===void 0?void 0:u.value;return typeof c=="string"||typeof c=="number"?String(c):""}),g=e.open!==void 0?e.open:e.defaultOpen,P=X(g),x=X(g),F=u=>{P.value=e.open!==void 0?e.open:u,x.value=P.value};ne(()=>e.open,()=>{F(e.open)});const L=V(()=>!e.notFoundContent&&e.emptyOptions);Ce(()=>{x.value=P.value,(e.disabled||L.value&&x.value&&e.mode==="combobox")&&(x.value=!1)});const A=V(()=>L.value?!1:x.value),B=u=>{const c=u!==void 0?u:!x.value;x.value!==c&&!e.disabled&&(F(c),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(c),!c&&K.value&&(K.value=!1,w(!1,()=>{H.value=!1,h.value=!1})))},U=V(()=>(e.tokenSeparators||[]).some(u=>[`
1
+ import{h as S,P as R,f as k,i as ue,U as Qe,J as Tt,A as vn,r as Je,X as Ye,m as be,af as Mt,l as gn,q as hn,L as bn,as as Sn,V as yn,$ as Te,G as wn,a0 as vt,s as In,at as Cn}from"./index-DY5Oc3z6.js";import{T as xn}from"./Trigger-DFbfZFuJ.js";import{d as fe,c as T,f as V,r as me,k as $n,a5 as Et,i as Ne,b as Ce,o as Se,w as ne,O as Xe,F as Ee,s as X,e as Pe,p as Ze,j as On,a as xe,t as Tn,x as Mn,n as Me,q as En,z as ke,a8 as ge}from"./vendor-M5lGV-wr.js";import{K as _}from"./KeyCode-D63Tfrq7.js";import{c as Ft}from"./vnode-B3Pp583L.js";import{B as Fn}from"./BaseInput-BvGiwRav.js";import{p as et}from"./pickAttrs-DUGKp0ro.js";import{O as Pn}from"./Overflow-kf1mnFrM.js";import{i as Rn}from"./isMobile--2fOlCHx.js";import{i as tt}from"./initDefaultProps-CacwmJft.js";import{R as Dn}from"./index-yhA-qP4Y.js";import{w as ve}from"./raf-Deuc0E8-.js";import{s as he}from"./motion-BWrP7Lz6.js";import{o as Le}from"./omit-BlaOv91I.js";import{u as gt}from"./useMergedState-O7QXt4P5.js";import{u as ht}from"./useState-CSzR8F8O.js";import{C as Vn,L as Hn,ag as Nn,b as Ln,t as Bn,ae as _n}from"./icons-NT6gy8Ee.js";import{a as An,F as zn}from"./FormItemContext-D_HGU4aA.js";import{g as Wn,a as Kn}from"./statusUtils-DdYKRSiH.js";import{u as jn}from"./Compact-DnOD5uMF.js";import{i as bt}from"./move-imnbiy1n.js";import{s as Un,a as Gn,b as Yn,c as Xn,i as St}from"./slide-BEnICwoX.js";import{g as qn}from"./compact-item-Bw5EEKw4.js";function yt(e,t){const{key:o}=e;let n;return"value"in e&&({value:n}=e),o??(n!==void 0?n:`rc-index-key-${t}`)}function Pt(e,t){const{label:o,value:n,options:l}=e||{};return{label:o||(t?"children":"label"),value:n||"value",options:l||"options"}}function Qn(e){let{fieldNames:t,childrenAsData:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=[],{label:l,value:i,options:d}=Pt(t,!1);function a(f,s){f.forEach(r=>{const v=r[l];if(s||!(d in r)){const b=r[i];n.push({key:yt(r,n.length),groupOption:s,data:r,label:v,value:b})}else{let b=v;b===void 0&&o&&(b=r.label),n.push({key:yt(r,n.length),group:!0,data:r,label:b}),a(r[d],!0)}})}return a(e,!1),n}function qe(e){const t=S({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return t}}),t}function Jn(e,t){if(!t||!t.length)return null;let o=!1;function n(i,d){let[a,...f]=d;if(!a)return[i];const s=i.split(a);return o=o||s.length>1,s.reduce((r,v)=>[...r,...n(v,f)],[]).filter(r=>r)}const l=n(e,t);return o?l:null}var Zn=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const kn=e=>{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},eo=fe({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:R.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:R.oneOfType([Number,Boolean]).def(!0),popupElement:R.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(e,t){let{slots:o,attrs:n,expose:l}=t;const i=V(()=>{const{dropdownMatchSelectWidth:a}=e;return kn(a)}),d=me();return l({getPopupElement:()=>d.value}),()=>{const a=S(S({},e),n),{empty:f=!1}=a,s=Zn(a,["empty"]),{visible:r,dropdownAlign:v,prefixCls:b,popupElement:$,dropdownClassName:h,dropdownStyle:y,direction:w="ltr",placement:C,dropdownMatchSelectWidth:D,containerWidth:N,dropdownRender:E,animation:g,transitionName:P,getPopupContainer:x,getTriggerDOMNode:F,onPopupVisibleChange:L,onPopupMouseEnter:A,onPopupFocusin:B,onPopupFocusout:U}=s,Y=`${b}-dropdown`;let W=$;E&&(W=E({menuNode:$,props:e}));const G=g?`${Y}-${g}`:P,z=S({minWidth:`${N}px`},y);return typeof D=="number"?z.width=`${D}px`:D&&(z.width=`${N}px`),T(xn,k(k({},e),{},{showAction:L?["click"]:[],hideAction:L?["click"]:[],popupPlacement:C||(w==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:i.value,prefixCls:Y,popupTransitionName:G,popupAlign:v,popupVisible:r,getPopupContainer:x,popupClassName:ue(h,{[`${Y}-empty`]:f}),popupStyle:z,getTriggerDOMNode:F,onPopupVisibleChange:L}),{default:o.default,popup:()=>T("div",{ref:d,onMouseenter:A,onFocusin:B,onFocusout:U},[W])})}}}),we=(e,t)=>{let{slots:o}=t;var n;const{class:l,customizeIcon:i,customizeIconProps:d,onMousedown:a,onClick:f}=e;let s;return typeof i=="function"?s=i(d):s=$n(i)?Et(i):i,T("span",{class:l,onMousedown:r=>{r.preventDefault(),a&&a(r)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:f,"aria-hidden":!0},[s!==void 0?s:T("span",{class:l.split(/\s+/).map(r=>`${r}-icon`)},[(n=o.default)===null||n===void 0?void 0:n.call(o)])])};we.inheritAttrs=!1;we.displayName="TransBtn";we.props={class:String,customizeIcon:R.any,customizeIconProps:R.any,onMousedown:Function,onClick:Function};const to={inputRef:R.any,prefixCls:String,id:String,inputElement:R.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:R.oneOfType([R.number,R.string]),attrs:R.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},Rt=fe({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:to,setup(e){let t=null;const o=Ne("VCSelectContainerEvent");return()=>{var n;const{prefixCls:l,id:i,inputElement:d,disabled:a,tabindex:f,autofocus:s,autocomplete:r,editable:v,activeDescendantId:b,value:$,onKeydown:h,onMousedown:y,onChange:w,onPaste:C,onCompositionstart:D,onCompositionend:N,onFocus:E,onBlur:g,open:P,inputRef:x,attrs:F}=e;let L=d||T(Fn,null,null);const A=L.props||{},{onKeydown:B,onInput:U,onFocus:Y,onBlur:W,onMousedown:G,onCompositionstart:z,onCompositionend:oe,style:ie}=A;return L=Ft(L,S(S(S(S(S({type:"search"},A),{id:i,ref:x,disabled:a,tabindex:f,lazy:!1,autocomplete:r||"off",autofocus:s,class:ue(`${l}-selection-search-input`,(n=L?.props)===null||n===void 0?void 0:n.class),role:"combobox","aria-expanded":P,"aria-haspopup":"listbox","aria-owns":`${i}_list`,"aria-autocomplete":"list","aria-controls":`${i}_list`,"aria-activedescendant":b}),F),{value:v?$:"",readonly:!v,unselectable:v?null:"on",style:S(S({},ie),{opacity:v?null:0}),onKeydown:p=>{h(p),B&&B(p)},onMousedown:p=>{y(p),G&&G(p)},onInput:p=>{w(p),U&&U(p)},onCompositionstart(p){D(p),z&&z(p)},onCompositionend(p){N(p),oe&&oe(p)},onPaste:C,onFocus:function(){clearTimeout(t),Y&&Y(arguments.length<=0?void 0:arguments[0]),E&&E(arguments.length<=0?void 0:arguments[0]),o?.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var p=arguments.length,H=new Array(p),O=0;O<p;O++)H[O]=arguments[O];t=setTimeout(()=>{W&&W(H[0]),g&&g(H[0]),o?.blur(H[0])},100)}}),L.type==="textarea"?{}:{type:"search"}),!0,!0),L}}}),no=Symbol("TreeSelectLegacyContextPropsKey");function nt(){return Ne(no,{})}const oo={id:String,prefixCls:String,values:R.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:R.any,placeholder:R.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:R.oneOfType([R.number,R.string]),compositionStatus:Boolean,removeIcon:R.any,choiceTransitionName:String,maxTagCount:R.oneOfType([R.number,R.string]),maxTagTextLength:Number,maxTagPlaceholder:R.any.def(()=>e=>`+ ${e.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},wt=e=>{e.preventDefault(),e.stopPropagation()},lo=fe({name:"MultipleSelectSelector",inheritAttrs:!1,props:oo,setup(e){const t=X(),o=X(0),n=X(!1),l=nt(),i=V(()=>`${e.prefixCls}-selection`),d=V(()=>e.open||e.mode==="tags"?e.searchValue:""),a=V(()=>e.mode==="tags"||e.showSearch&&(e.open||n.value)),f=me("");Ce(()=>{f.value=d.value}),Se(()=>{ne(f,()=>{o.value=t.value.scrollWidth},{flush:"post",immediate:!0})});function s(h,y,w,C,D){return T("span",{class:ue(`${i.value}-item`,{[`${i.value}-item-disabled`]:w}),title:typeof h=="string"||typeof h=="number"?h.toString():void 0},[T("span",{class:`${i.value}-item-content`},[y]),C&&T(we,{class:`${i.value}-item-remove`,onMousedown:wt,onClick:D,customizeIcon:e.removeIcon},{default:()=>[Xe("×")]})])}function r(h,y,w,C,D,N){var E;const g=x=>{wt(x),e.onToggleOpen(!open)};let P=N;return l.keyEntities&&(P=((E=l.keyEntities[h])===null||E===void 0?void 0:E.node)||{}),T("span",{key:h,onMousedown:g},[e.tagRender({label:y,value:h,disabled:w,closable:C,onClose:D,option:P})])}function v(h){const{disabled:y,label:w,value:C,option:D}=h,N=!e.disabled&&!y;let E=w;if(typeof e.maxTagTextLength=="number"&&(typeof w=="string"||typeof w=="number")){const P=String(E);P.length>e.maxTagTextLength&&(E=`${P.slice(0,e.maxTagTextLength)}...`)}const g=P=>{var x;P&&P.stopPropagation(),(x=e.onRemove)===null||x===void 0||x.call(e,h)};return typeof e.tagRender=="function"?r(C,E,y,N,g,D):s(w,E,y,N,g)}function b(h){const{maxTagPlaceholder:y=C=>`+ ${C.length} ...`}=e,w=typeof y=="function"?y(h):y;return s(w,w,!1)}const $=h=>{const y=h.target.composing;f.value=h.target.value,y||e.onInputChange(h)};return()=>{const{id:h,prefixCls:y,values:w,open:C,inputRef:D,placeholder:N,disabled:E,autofocus:g,autocomplete:P,activeDescendantId:x,tabindex:F,compositionStatus:L,onInputPaste:A,onInputKeyDown:B,onInputMouseDown:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=T("div",{class:`${i.value}-search`,style:{width:o.value+"px"},key:"input"},[T(Rt,{inputRef:D,open:C,prefixCls:y,id:h,inputElement:null,disabled:E,autofocus:g,autocomplete:P,editable:a.value,activeDescendantId:x,value:f.value,onKeydown:B,onMousedown:U,onChange:$,onPaste:A,onCompositionstart:Y,onCompositionend:W,tabindex:F,attrs:et(e,!0),onFocus:()=>n.value=!0,onBlur:()=>n.value=!1},null),T("span",{ref:t,class:`${i.value}-search-mirror`,"aria-hidden":!0},[f.value,Xe(" ")])]),z=T(Pn,{prefixCls:`${i.value}-overflow`,data:w,renderItem:v,renderRest:b,suffix:G,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return T(Ee,null,[z,!w.length&&!d.value&&!L&&T("span",{class:`${i.value}-placeholder`},[N])])}}}),io={inputElement:R.any,id:String,prefixCls:String,values:R.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:R.any,placeholder:R.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:R.oneOfType([R.number,R.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},ot=fe({name:"SingleSelector",setup(e){const t=X(!1),o=V(()=>e.mode==="combobox"),n=V(()=>o.value||e.showSearch),l=V(()=>{let r=e.searchValue||"";return o.value&&e.activeValue&&!t.value&&(r=e.activeValue),r}),i=nt();ne([o,()=>e.activeValue],()=>{o.value&&(t.value=!1)},{immediate:!0});const d=V(()=>e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!l.value||e.compositionStatus),a=V(()=>{const r=e.values[0];return r&&(typeof r.label=="string"||typeof r.label=="number")?r.label.toString():void 0}),f=()=>{if(e.values[0])return null;const r=d.value?{visibility:"hidden"}:void 0;return T("span",{class:`${e.prefixCls}-selection-placeholder`,style:r},[e.placeholder])},s=r=>{r.target.composing||(t.value=!0,e.onInputChange(r))};return()=>{var r,v,b,$;const{inputElement:h,prefixCls:y,id:w,values:C,inputRef:D,disabled:N,autofocus:E,autocomplete:g,activeDescendantId:P,open:x,tabindex:F,optionLabelRender:L,onInputKeyDown:A,onInputMouseDown:B,onInputPaste:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=C[0];let z=null;if(G&&i.customSlots){const oe=(r=G.key)!==null&&r!==void 0?r:G.value,ie=((v=i.keyEntities[oe])===null||v===void 0?void 0:v.node)||{};z=i.customSlots[(b=ie.slots)===null||b===void 0?void 0:b.title]||i.customSlots.title||G.label,typeof z=="function"&&(z=z(ie))}else z=L&&G?L(G.option):G?.label;return T(Ee,null,[T("span",{class:`${y}-selection-search`},[T(Rt,{inputRef:D,prefixCls:y,id:w,open:x,inputElement:h,disabled:N,autofocus:E,autocomplete:g,editable:n.value,activeDescendantId:P,value:l.value,onKeydown:A,onMousedown:B,onChange:s,onPaste:U,onCompositionstart:Y,onCompositionend:W,tabindex:F,attrs:et(e,!0)},null)]),!o.value&&G&&!d.value&&T("span",{class:`${y}-selection-item`,title:a.value},[T(Ee,{key:($=G.key)!==null&&$!==void 0?$:G.value},[z])]),f()])}}});ot.props=io;ot.inheritAttrs=!1;function ao(e){return![_.ESC,_.SHIFT,_.BACKSPACE,_.TAB,_.WIN_KEY,_.ALT,_.META,_.WIN_KEY_RIGHT,_.CTRL,_.SEMICOLON,_.EQUALS,_.CAPS_LOCK,_.CONTEXT_MENU,_.F1,_.F2,_.F3,_.F4,_.F5,_.F6,_.F7,_.F8,_.F9,_.F10,_.F11,_.F12].includes(e)}function Dt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=null,o;Pe(()=>{clearTimeout(o)});function n(l){(l||t===null)&&(t=l),clearTimeout(o),o=setTimeout(()=>{t=null},e)}return[()=>t,n]}function Fe(){const e=t=>{e.current=t};return e}const ro=fe({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:R.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:R.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:R.oneOfType([R.number,R.string]),disabled:{type:Boolean,default:void 0},placeholder:R.any,removeIcon:R.any,maxTagCount:R.oneOfType([R.number,R.string]),maxTagTextLength:Number,maxTagPlaceholder:R.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(e,t){let{expose:o}=t;const n=Fe(),l=me(!1),[i,d]=Dt(0),a=C=>{const{which:D}=C;(D===_.UP||D===_.DOWN)&&C.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(C),D===_.ENTER&&e.mode==="tags"&&!l.value&&!e.open&&e.onSearchSubmit(C.target.value),ao(D)&&e.onToggleOpen(!0)},f=()=>{d(!0)};let s=null;const r=C=>{e.onSearch(C,!0,l.value)!==!1&&e.onToggleOpen(!0)},v=()=>{l.value=!0},b=C=>{l.value=!1,e.mode!=="combobox"&&r(C.target.value)},$=C=>{let{target:{value:D}}=C;if(e.tokenWithEnter&&s&&/[\r\n]/.test(s)){const N=s.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");D=D.replace(N,s)}s=null,r(D)},h=C=>{const{clipboardData:D}=C;s=D.getData("text")},y=C=>{let{target:D}=C;D!==n.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{n.current.focus()}):n.current.focus())},w=C=>{const D=i();C.target!==n.current&&!D&&C.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!D)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return o({focus:()=>{n.current.focus()},blur:()=>{n.current.blur()}}),()=>{const{prefixCls:C,domRef:D,mode:N}=e,E={inputRef:n,onInputKeyDown:a,onInputMouseDown:f,onInputChange:$,onInputPaste:h,compositionStatus:l.value,onInputCompositionStart:v,onInputCompositionEnd:b},g=N==="multiple"||N==="tags"?T(lo,k(k({},e),E),null):T(ot,k(k({},e),E),null);return T("div",{ref:D,class:`${C}-selector`,onClick:y,onMousedown:w},[g])}}});function so(e,t,o){function n(l){var i,d,a;let f=l.target;f.shadowRoot&&l.composed&&(f=l.composedPath()[0]||f);const s=[(i=e[0])===null||i===void 0?void 0:i.value,(a=(d=e[1])===null||d===void 0?void 0:d.value)===null||a===void 0?void 0:a.getPopupElement()];t.value&&s.every(r=>r&&!r.contains(f)&&r!==f)&&o(!1)}Se(()=>{window.addEventListener("mousedown",n)}),Pe(()=>{window.removeEventListener("mousedown",n)})}function uo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const t=X(!1);let o;const n=()=>{clearTimeout(o)};return Se(()=>{n()}),[t,(i,d)=>{n(),o=setTimeout(()=>{t.value=i,d&&d()},e)},n]}const Vt=Symbol("BaseSelectContextKey");function co(e){return Ze(Vt,e)}function fo(){return Ne(Vt,{})}function Ht(e){if(!On(e))return xe(e);const t=new Proxy({},{get(o,n,l){return Reflect.get(e.value,n,l)},set(o,n,l){return e.value[n]=l,!0},deleteProperty(o,n){return Reflect.deleteProperty(e.value,n)},has(o,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return xe(t)}var po=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const mo=["value","onChange","removeIcon","placeholder","autofocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabindex","OptionList","notFoundContent"],vo=()=>({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:R.any,emptyOptions:Boolean}),Nt=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:R.any,placeholder:R.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:R.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:R.any,clearIcon:R.any,removeIcon:R.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),go=()=>S(S({},vo()),Nt());function Lt(e){return e==="tags"||e==="multiple"}const ho=fe({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:tt(go(),{showAction:[],notFoundContent:"Not Found"}),setup(e,t){let{attrs:o,expose:n,slots:l}=t;const i=V(()=>Lt(e.mode)),d=V(()=>e.showSearch!==void 0?e.showSearch:i.value||e.mode==="combobox"),a=X(!1);Se(()=>{a.value=Rn()});const f=nt(),s=X(null),r=Fe(),v=X(null),b=X(null),$=X(null),h=me(!1),[y,w,C]=uo();n({focus:()=>{var u;(u=b.value)===null||u===void 0||u.focus()},blur:()=>{var u;(u=b.value)===null||u===void 0||u.blur()},scrollTo:u=>{var c;return(c=$.value)===null||c===void 0?void 0:c.scrollTo(u)}});const E=V(()=>{var u;if(e.mode!=="combobox")return e.searchValue;const c=(u=e.displayValues[0])===null||u===void 0?void 0:u.value;return typeof c=="string"||typeof c=="number"?String(c):""}),g=e.open!==void 0?e.open:e.defaultOpen,P=X(g),x=X(g),F=u=>{P.value=e.open!==void 0?e.open:u,x.value=P.value};ne(()=>e.open,()=>{F(e.open)});const L=V(()=>!e.notFoundContent&&e.emptyOptions);Ce(()=>{x.value=P.value,(e.disabled||L.value&&x.value&&e.mode==="combobox")&&(x.value=!1)});const A=V(()=>L.value?!1:x.value),B=u=>{const c=u!==void 0?u:!x.value;x.value!==c&&!e.disabled&&(F(c),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(c),!c&&K.value&&(K.value=!1,w(!1,()=>{H.value=!1,h.value=!1})))},U=V(()=>(e.tokenSeparators||[]).some(u=>[`
2
2
  `,`\r
3
3
  `].includes(u))),Y=(u,c,M)=>{var I,j;let Q=!0,J=u;(I=e.onActiveValueChange)===null||I===void 0||I.call(e,null);const Z=M?null:Jn(u,e.tokenSeparators);return e.mode!=="combobox"&&Z&&(J="",(j=e.onSearchSplit)===null||j===void 0||j.call(e,Z),B(!1),Q=!1),e.onSearch&&E.value!==J&&e.onSearch(J,{source:c?"typing":"effect"}),Q},W=u=>{var c;!u||!u.trim()||(c=e.onSearch)===null||c===void 0||c.call(e,u,{source:"submit"})};ne(x,()=>{!x.value&&!i.value&&e.mode!=="combobox"&&Y("",!1,!1)},{immediate:!0,flush:"post"}),ne(()=>e.disabled,()=>{P.value&&e.disabled&&F(!1),e.disabled&&!h.value&&w(!1)},{immediate:!0});const[G,z]=Dt(),oe=function(u){var c;const M=G(),{which:I}=u;if(I===_.ENTER&&(e.mode!=="combobox"&&u.preventDefault(),x.value||B(!0)),z(!!E.value),I===_.BACKSPACE&&!M&&i.value&&!E.value&&e.displayValues.length){const Z=[...e.displayValues];let q=null;for(let le=Z.length-1;le>=0;le-=1){const ae=Z[le];if(!ae.disabled){Z.splice(le,1),q=ae;break}}q&&e.onDisplayValuesChange(Z,{type:"remove",values:[q]})}for(var j=arguments.length,Q=new Array(j>1?j-1:0),J=1;J<j;J++)Q[J-1]=arguments[J];x.value&&$.value&&$.value.onKeydown(u,...Q),(c=e.onKeydown)===null||c===void 0||c.call(e,u,...Q)},ie=function(u){for(var c=arguments.length,M=new Array(c>1?c-1:0),I=1;I<c;I++)M[I-1]=arguments[I];x.value&&$.value&&$.value.onKeyup(u,...M),e.onKeyup&&e.onKeyup(u,...M)},p=u=>{const c=e.displayValues.filter(M=>M!==u);e.onDisplayValuesChange(c,{type:"remove",values:[u]})},H=X(!1),O=function(){w(!0),e.disabled||(e.onFocus&&!H.value&&e.onFocus(...arguments),e.showAction&&e.showAction.includes("focus")&&B(!0)),H.value=!0},K=me(!1),te=function(){if(K.value||(h.value=!0,w(!1,()=>{H.value=!1,h.value=!1,B(!1)}),e.disabled))return;const u=E.value;u&&(e.mode==="tags"?e.onSearch(u,{source:"submit"}):e.mode==="multiple"&&e.onSearch("",{source:"blur"})),e.onBlur&&e.onBlur(...arguments)},re=()=>{K.value=!0},se=()=>{K.value=!1};Ze("VCSelectContainerEvent",{focus:O,blur:te});const ee=[];Se(()=>{ee.forEach(u=>clearTimeout(u)),ee.splice(0,ee.length)}),Pe(()=>{ee.forEach(u=>clearTimeout(u)),ee.splice(0,ee.length)});const ce=function(u){var c,M;const{target:I}=u,j=(c=v.value)===null||c===void 0?void 0:c.getPopupElement();if(j&&j.contains(I)){const q=setTimeout(()=>{var le;const ae=ee.indexOf(q);ae!==-1&&ee.splice(ae,1),C(),!a.value&&!j.contains(document.activeElement)&&((le=b.value)===null||le===void 0||le.focus())});ee.push(q)}for(var Q=arguments.length,J=new Array(Q>1?Q-1:0),Z=1;Z<Q;Z++)J[Z-1]=arguments[Z];(M=e.onMousedown)===null||M===void 0||M.call(e,u,...J)},de=X(null),m=()=>{};return Se(()=>{ne(A,()=>{var u;if(A.value){const c=Math.ceil((u=s.value)===null||u===void 0?void 0:u.offsetWidth);de.value!==c&&!Number.isNaN(c)&&(de.value=c)}},{immediate:!0,flush:"post"})}),so([s,v],A,B),co(Ht(S(S({},Tn(e)),{open:x,triggerOpen:A,showSearch:d,multiple:i,toggleOpen:B}))),()=>{const u=S(S({},e),o),{prefixCls:c,id:M,open:I,defaultOpen:j,mode:Q,showSearch:J,searchValue:Z,onSearch:q,allowClear:le,clearIcon:ae,showArrow:Re,inputIcon:De,disabled:$e,loading:Ve,getInputElement:at,getPopupContainer:Gt,placement:Yt,animation:Xt,transitionName:qt,dropdownStyle:Qt,dropdownClassName:Jt,dropdownMatchSelectWidth:Zt,dropdownRender:kt,dropdownAlign:en,showAction:il,direction:tn,tokenSeparators:al,tagRender:nn,optionLabelRender:on,onPopupScroll:rl,onDropdownVisibleChange:sl,onFocus:ul,onBlur:cl,onKeyup:dl,onKeydown:fl,onMousedown:pl,onClear:_e,omitDomProps:Ae,getRawInputElement:rt,displayValues:He,onDisplayValuesChange:ln,emptyOptions:an,activeDescendantId:rn,activeValue:sn,OptionList:un}=u,cn=po(u,["prefixCls","id","open","defaultOpen","mode","showSearch","searchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","disabled","loading","getInputElement","getPopupContainer","placement","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","optionLabelRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyup","onKeydown","onMousedown","onClear","omitDomProps","getRawInputElement","displayValues","onDisplayValuesChange","emptyOptions","activeDescendantId","activeValue","OptionList"]),st=Q==="combobox"&&at&&at()||null,Oe=typeof rt=="function"&&rt(),ze=S({},cn);let ut;Oe&&(ut=ye=>{B(ye)}),mo.forEach(ye=>{delete ze[ye]}),Ae?.forEach(ye=>{delete ze[ye]});const ct=Re!==void 0?Re:Ve||!i.value&&Q!=="combobox";let dt;ct&&(dt=T(we,{class:ue(`${c}-arrow`,{[`${c}-arrow-loading`]:Ve}),customizeIcon:De,customizeIconProps:{loading:Ve,searchValue:E.value,open:x.value,focused:y.value,showSearch:d.value}},null));let ft;const dn=()=>{_e?.(),ln([],{type:"clear",values:He}),Y("",!1,!1)};!$e&&le&&(He.length||E.value)&&(ft=T(we,{class:`${c}-clear`,onMousedown:dn,customizeIcon:ae},{default:()=>[Xe("×")]}));const fn=T(un,{ref:$},S(S({},f.customSlots),{option:l.option})),pn=ue(c,o.class,{[`${c}-focused`]:y.value,[`${c}-multiple`]:i.value,[`${c}-single`]:!i.value,[`${c}-allow-clear`]:le,[`${c}-show-arrow`]:ct,[`${c}-disabled`]:$e,[`${c}-loading`]:Ve,[`${c}-open`]:x.value,[`${c}-customize-input`]:st,[`${c}-show-search`]:d.value}),pt=T(eo,{ref:v,disabled:$e,prefixCls:c,visible:A.value,popupElement:fn,containerWidth:de.value,animation:Xt,transitionName:qt,dropdownStyle:Qt,dropdownClassName:Jt,direction:tn,dropdownMatchSelectWidth:Zt,dropdownRender:kt,dropdownAlign:en,placement:Yt,getPopupContainer:Gt,empty:an,getTriggerDOMNode:()=>r.current,onPopupVisibleChange:ut,onPopupMouseEnter:m,onPopupFocusin:re,onPopupFocusout:se},{default:()=>Oe?Qe(Oe)&&Ft(Oe,{ref:r},!1,!0):T(ro,k(k({},e),{},{domRef:r,prefixCls:c,inputElement:st,ref:b,id:M,showSearch:d.value,mode:Q,activeDescendantId:rn,tagRender:nn,optionLabelRender:on,values:He,open:x.value,onToggleOpen:B,activeValue:sn,searchValue:E.value,onSearch:Y,onSearchSubmit:W,onRemove:p,tokenWithEnter:U.value}),null)});let We;return Oe?We=pt:We=T("div",k(k({},ze),{},{class:pn,ref:s,onMousedown:ce,onKeydown:oe,onKeyup:ie}),[y.value&&!x.value&&T("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},[`${He.map(ye=>{let{label:mt,value:mn}=ye;return["number","string"].includes(typeof mt)?mt:mn}).join(", ")}`]),pt,dt,ft]),We}}}),Be=(e,t)=>{let{height:o,offset:n,prefixCls:l,onInnerResize:i}=e,{slots:d}=t;var a;let f={},s={display:"flex",flexDirection:"column"};return n!==void 0&&(f={height:`${o}px`,position:"relative",overflow:"hidden"},s=S(S({},s),{transform:`translateY(${n}px)`,position:"absolute",left:0,right:0,top:0})),T("div",{style:f},[T(Dn,{onResize:r=>{let{offsetHeight:v}=r;v&&i&&i()}},{default:()=>[T("div",{style:s,class:ue({[`${l}-holder-inner`]:l})},[(a=d.default)===null||a===void 0?void 0:a.call(d)])]})])};Be.displayName="Filter";Be.inheritAttrs=!1;Be.props={prefixCls:String,height:Number,offset:Number,onInnerResize:Function};const Bt=(e,t)=>{let{setRef:o}=e,{slots:n}=t;var l;const i=Tt((l=n.default)===null||l===void 0?void 0:l.call(n));return i&&i.length?Et(i[0],{ref:o}):i};Bt.props={setRef:{type:Function,default:()=>{}}};const bo=20;function It(e){return"touches"in e?e.touches[0].pageY:e.pageY}const So=fe({compatConfig:{MODE:3},name:"ScrollBar",inheritAttrs:!1,props:{prefixCls:String,scrollTop:Number,scrollHeight:Number,height:Number,count:Number,onScroll:{type:Function},onStartMove:{type:Function},onStopMove:{type:Function}},setup(){return{moveRaf:null,scrollbarRef:Fe(),thumbRef:Fe(),visibleTimeout:null,state:xe({dragging:!1,pageY:null,startTop:null,visible:!1})}},watch:{scrollTop:{handler(){this.delayHidden()},flush:"post"}},mounted(){var e,t;(e=this.scrollbarRef.current)===null||e===void 0||e.addEventListener("touchstart",this.onScrollbarTouchStart,he?{passive:!1}:!1),(t=this.thumbRef.current)===null||t===void 0||t.addEventListener("touchstart",this.onMouseDown,he?{passive:!1}:!1)},beforeUnmount(){this.removeEvents(),clearTimeout(this.visibleTimeout)},methods:{delayHidden(){clearTimeout(this.visibleTimeout),this.state.visible=!0,this.visibleTimeout=setTimeout(()=>{this.state.visible=!1},2e3)},onScrollbarTouchStart(e){e.preventDefault()},onContainerMouseDown(e){e.stopPropagation(),e.preventDefault()},patchEvents(){window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),this.thumbRef.current.addEventListener("touchmove",this.onMouseMove,he?{passive:!1}:!1),this.thumbRef.current.addEventListener("touchend",this.onMouseUp)},removeEvents(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),this.scrollbarRef.current.removeEventListener("touchstart",this.onScrollbarTouchStart,he?{passive:!1}:!1),this.thumbRef.current&&(this.thumbRef.current.removeEventListener("touchstart",this.onMouseDown,he?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchmove",this.onMouseMove,he?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchend",this.onMouseUp)),ve.cancel(this.moveRaf)},onMouseDown(e){const{onStartMove:t}=this.$props;S(this.state,{dragging:!0,pageY:It(e),startTop:this.getTop()}),t(),this.patchEvents(),e.stopPropagation(),e.preventDefault()},onMouseMove(e){const{dragging:t,pageY:o,startTop:n}=this.state,{onScroll:l}=this.$props;if(ve.cancel(this.moveRaf),t){const i=It(e)-o,d=n+i,a=this.getEnableScrollRange(),f=this.getEnableHeightRange(),s=f?d/f:0,r=Math.ceil(s*a);this.moveRaf=ve(()=>{l(r)})}},onMouseUp(){const{onStopMove:e}=this.$props;this.state.dragging=!1,e(),this.removeEvents()},getSpinHeight(){const{height:e,scrollHeight:t}=this.$props;let o=e/t*100;return o=Math.max(o,bo),o=Math.min(o,e/2),Math.floor(o)},getEnableScrollRange(){const{scrollHeight:e,height:t}=this.$props;return e-t||0},getEnableHeightRange(){const{height:e}=this.$props,t=this.getSpinHeight();return e-t||0},getTop(){const{scrollTop:e}=this.$props,t=this.getEnableScrollRange(),o=this.getEnableHeightRange();return e===0||t===0?0:e/t*o},showScroll(){const{height:e,scrollHeight:t}=this.$props;return t>e}},render(){const{dragging:e,visible:t}=this.state,{prefixCls:o}=this.$props,n=this.getSpinHeight()+"px",l=this.getTop()+"px",i=this.showScroll(),d=i&&t;return T("div",{ref:this.scrollbarRef,class:ue(`${o}-scrollbar`,{[`${o}-scrollbar-show`]:i}),style:{width:"8px",top:0,bottom:0,right:0,position:"absolute",display:d?void 0:"none"},onMousedown:this.onContainerMouseDown,onMousemove:this.delayHidden},[T("div",{ref:this.thumbRef,class:ue(`${o}-scrollbar-thumb`,{[`${o}-scrollbar-thumb-moving`]:e}),style:{width:"100%",height:n,top:l,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:"99px",cursor:"pointer",userSelect:"none"},onMousedown:this.onMouseDown},null)])}});function yo(e,t,o,n){const l=new Map,i=new Map,d=me(Symbol("update"));ne(e,()=>{d.value=Symbol("update")});let a;function f(){ve.cancel(a)}function s(){f(),a=ve(()=>{l.forEach((v,b)=>{if(v&&v.offsetParent){const{offsetHeight:$}=v;i.get(b)!==$&&(d.value=Symbol("update"),i.set(b,v.offsetHeight))}})})}function r(v,b){const $=t(v);l.get($),b?(l.set($,b.$el||b),s()):l.delete($)}return Mn(()=>{f()}),[r,s,i,d]}function wo(e,t,o,n,l,i,d,a){let f;return s=>{if(s==null){a();return}ve.cancel(f);const r=t.value,v=n.itemHeight;if(typeof s=="number")d(s);else if(s&&typeof s=="object"){let b;const{align:$}=s;"index"in s?{index:b}=s:b=r.findIndex(w=>l(w)===s.key);const{offset:h=0}=s,y=(w,C)=>{if(w<0||!e.value)return;const D=e.value.clientHeight;let N=!1,E=C;if(D){const g=C||$;let P=0,x=0,F=0;const L=Math.min(r.length,b);for(let U=0;U<=L;U+=1){const Y=l(r[U]);x=P;const W=o.get(Y);F=x+(W===void 0?v:W),P=F,U===b&&W===void 0&&(N=!0)}const A=e.value.scrollTop;let B=null;switch(g){case"top":B=x-h;break;case"bottom":B=F-D+h;break;default:{const U=A+D;x<A?E="top":F>U&&(E="bottom")}}B!==null&&B!==A&&d(B)}f=ve(()=>{N&&i(),y(w-1,E)},2)};y(5)}}}const Io=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),_t=((e,t)=>{let o=!1,n=null;function l(){clearTimeout(n),o=!0,n=setTimeout(()=>{o=!1},50)}return function(i){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const a=i<0&&e.value||i>0&&t.value;return d&&a?(clearTimeout(n),o=!1):(!a||o)&&l(),!o&&a}});function Co(e,t,o,n){let l=0,i=null,d=null,a=!1;const f=_t(t,o);function s(v){if(!e.value)return;ve.cancel(i);const{deltaY:b}=v;l+=b,d=b,!f(b)&&(Io||v.preventDefault(),i=ve(()=>{n(l*(a?10:1)),l=0}))}function r(v){e.value&&(a=v.detail===d)}return[s,r]}const xo=14/15;function $o(e,t,o){let n=!1,l=0,i=null,d=null;const a=()=>{i&&(i.removeEventListener("touchmove",f),i.removeEventListener("touchend",s))},f=b=>{if(n){const $=Math.ceil(b.touches[0].pageY);let h=l-$;l=$,o(h)&&b.preventDefault(),clearInterval(d),d=setInterval(()=>{h*=xo,(!o(h,!0)||Math.abs(h)<=.1)&&clearInterval(d)},16)}},s=()=>{n=!1,a()},r=b=>{a(),b.touches.length===1&&!n&&(n=!0,l=Math.ceil(b.touches[0].pageY),i=b.target,i.addEventListener("touchmove",f,{passive:!1}),i.addEventListener("touchend",s))},v=()=>{};Se(()=>{document.addEventListener("touchmove",v,{passive:!1}),ne(e,b=>{t.value.removeEventListener("touchstart",r),a(),clearInterval(d),b&&t.value.addEventListener("touchstart",r,{passive:!1})},{immediate:!0})}),Pe(()=>{document.removeEventListener("touchmove",v)})}var Oo=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const To=[],Mo={overflowY:"auto",overflowAnchor:"none"};function Eo(e,t,o,n,l,i){let{getKey:d}=i;return e.slice(t,o+1).map((a,f)=>{const s=t+f,r=l(a,s,{}),v=d(a);return T(Bt,{key:v,setRef:b=>n(a,b)},{default:()=>[r]})})}const Fo=fe({compatConfig:{MODE:3},name:"List",inheritAttrs:!1,props:{prefixCls:String,data:R.array,height:Number,itemHeight:Number,fullHeight:{type:Boolean,default:void 0},itemKey:{type:[String,Number,Function],required:!0},component:{type:[String,Object]},virtual:{type:Boolean,default:void 0},children:Function,onScroll:Function,onMousedown:Function,onMouseenter:Function,onVisibleChange:Function},setup(e,t){let{expose:o}=t;const n=V(()=>{const{height:p,itemHeight:H,virtual:O}=e;return!!(O!==!1&&p&&H)}),l=V(()=>{const{height:p,itemHeight:H,data:O}=e;return n.value&&O&&H*O.length>p}),i=xe({scrollTop:0,scrollMoving:!1}),d=V(()=>e.data||To),a=X([]);ne(d,()=>{a.value=ke(d.value).slice()},{immediate:!0});const f=X(p=>{});ne(()=>e.itemKey,p=>{typeof p=="function"?f.value=p:f.value=H=>H?.[p]},{immediate:!0});const s=X(),r=X(),v=X(),b=p=>f.value(p),$={getKey:b};function h(p){let H;typeof p=="function"?H=p(i.scrollTop):H=p;const O=P(H);s.value&&(s.value.scrollTop=O),i.scrollTop=O}const[y,w,C,D]=yo(a,b),N=xe({scrollHeight:void 0,start:0,end:0,offset:void 0}),E=X(0);Se(()=>{Me(()=>{var p;E.value=((p=r.value)===null||p===void 0?void 0:p.offsetHeight)||0})}),En(()=>{Me(()=>{var p;E.value=((p=r.value)===null||p===void 0?void 0:p.offsetHeight)||0})}),ne([n,a],()=>{n.value||S(N,{scrollHeight:void 0,start:0,end:a.value.length-1,offset:void 0})},{immediate:!0}),ne([n,a,E,l],()=>{n.value&&!l.value&&S(N,{scrollHeight:E.value,start:0,end:a.value.length-1,offset:void 0}),s.value&&(i.scrollTop=s.value.scrollTop)},{immediate:!0}),ne([l,n,()=>i.scrollTop,a,D,()=>e.height,E],()=>{if(!n.value||!l.value)return;let p=0,H,O,K;const te=a.value.length,re=a.value,se=i.scrollTop,{itemHeight:ee,height:ce}=e,de=se+ce;for(let m=0;m<te;m+=1){const u=re[m],c=b(u);let M=C.get(c);M===void 0&&(M=ee);const I=p+M;H===void 0&&I>=se&&(H=m,O=p),K===void 0&&I>de&&(K=m),p=I}H===void 0&&(H=0,O=0,K=Math.ceil(ce/ee)),K===void 0&&(K=te-1),K=Math.min(K+1,te),S(N,{scrollHeight:p,start:H,end:K,offset:O})},{immediate:!0});const g=V(()=>N.scrollHeight-e.height);function P(p){let H=p;return Number.isNaN(g.value)||(H=Math.min(H,g.value)),H=Math.max(H,0),H}const x=V(()=>i.scrollTop<=0),F=V(()=>i.scrollTop>=g.value),L=_t(x,F);function A(p){h(p)}function B(p){var H;const{scrollTop:O}=p.currentTarget;O!==i.scrollTop&&h(O),(H=e.onScroll)===null||H===void 0||H.call(e,p)}const[U,Y]=Co(n,x,F,p=>{h(H=>H+p)});$o(n,s,(p,H)=>L(p,H)?!1:(U({preventDefault(){},deltaY:p}),!0));function W(p){n.value&&p.preventDefault()}const G=()=>{s.value&&(s.value.removeEventListener("wheel",U,he?{passive:!1}:!1),s.value.removeEventListener("DOMMouseScroll",Y),s.value.removeEventListener("MozMousePixelScroll",W))};Ce(()=>{Me(()=>{s.value&&(G(),s.value.addEventListener("wheel",U,he?{passive:!1}:!1),s.value.addEventListener("DOMMouseScroll",Y),s.value.addEventListener("MozMousePixelScroll",W))})}),Pe(()=>{G()});const z=wo(s,a,C,e,b,w,h,()=>{var p;(p=v.value)===null||p===void 0||p.delayHidden()});o({scrollTo:z});const oe=V(()=>{let p=null;return e.height&&(p=S({[e.fullHeight?"height":"maxHeight"]:e.height+"px"},Mo),n.value&&(p.overflowY="hidden",i.scrollMoving&&(p.pointerEvents="none"))),p});return ne([()=>N.start,()=>N.end,a],()=>{if(e.onVisibleChange){const p=a.value.slice(N.start,N.end+1);e.onVisibleChange(p,a.value)}},{flush:"post"}),{state:i,mergedData:a,componentStyle:oe,onFallbackScroll:B,onScrollBar:A,componentRef:s,useVirtual:n,calRes:N,collectHeight:w,setInstance:y,sharedConfig:$,scrollBarRef:v,fillerInnerRef:r,delayHideScrollBar:()=>{var p;(p=v.value)===null||p===void 0||p.delayHidden()}}},render(){const e=S(S({},this.$props),this.$attrs),{prefixCls:t="rc-virtual-list",height:o,itemHeight:n,fullHeight:l,data:i,itemKey:d,virtual:a,component:f="div",onScroll:s,children:r=this.$slots.default,style:v,class:b}=e,$=Oo(e,["prefixCls","height","itemHeight","fullHeight","data","itemKey","virtual","component","onScroll","children","style","class"]),h=ue(t,b),{scrollTop:y}=this.state,{scrollHeight:w,offset:C,start:D,end:N}=this.calRes,{componentStyle:E,onFallbackScroll:g,onScrollBar:P,useVirtual:x,collectHeight:F,sharedConfig:L,setInstance:A,mergedData:B,delayHideScrollBar:U}=this;return T("div",k({style:S(S({},v),{position:"relative"}),class:h},$),[T(f,{class:`${t}-holder`,style:E,ref:"componentRef",onScroll:g,onMouseenter:U},{default:()=>[T(Be,{prefixCls:t,height:w,offset:C,onInnerResize:F,ref:"fillerInnerRef"},{default:()=>Eo(B,D,N,A,r,L)})]}),x&&T(So,{ref:"scrollBarRef",prefixCls:t,scrollTop:y,height:o,scrollHeight:w,count:B.length,onScroll:P,onStartMove:()=>{this.state.scrollMoving=!0},onStopMove:()=>{this.state.scrollMoving=!1}},null)])}});function Po(e,t,o){const n=me(e());return ne(t,(l,i)=>{o?o(l,i)&&(n.value=e()):n.value=e()}),n}function Ro(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}const At=Symbol("SelectContextKey");function Do(e){return Ze(At,e)}function Vo(){return Ne(At,{})}var Ho=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};function Ct(e){return typeof e=="string"||typeof e=="number"}const No=fe({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(e,t){let{expose:o,slots:n}=t;const l=fo(),i=Vo(),d=V(()=>`${l.prefixCls}-item`),a=Po(()=>i.flattenOptions,[()=>l.open,()=>i.flattenOptions],g=>g[0]),f=Fe(),s=g=>{g.preventDefault()},r=g=>{f.current&&f.current.scrollTo(typeof g=="number"?{index:g}:g)},v=function(g){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const x=a.value.length;for(let F=0;F<x;F+=1){const L=(g+F*P+x)%x,{group:A,data:B}=a.value[L];if(!A&&!B.disabled)return L}return-1},b=xe({activeIndex:v(0)}),$=function(g){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;b.activeIndex=g;const x={source:P?"keyboard":"mouse"},F=a.value[g];if(!F){i.onActiveValue(null,-1,x);return}i.onActiveValue(F.value,g,x)};ne([()=>a.value.length,()=>l.searchValue],()=>{$(i.defaultActiveFirstOption!==!1?v(0):-1)},{immediate:!0});const h=g=>i.rawValues.has(g)&&l.mode!=="combobox";ne([()=>l.open,()=>l.searchValue],()=>{if(!l.multiple&&l.open&&i.rawValues.size===1){const g=Array.from(i.rawValues)[0],P=ke(a.value).findIndex(x=>{let{data:F}=x;return F[i.fieldNames.value]===g});P!==-1&&($(P),Me(()=>{r(P)}))}l.open&&Me(()=>{var g;(g=f.current)===null||g===void 0||g.scrollTo(void 0)})},{immediate:!0,flush:"post"});const y=g=>{g!==void 0&&i.onSelect(g,{selected:!i.rawValues.has(g)}),l.multiple||l.toggleOpen(!1)},w=g=>typeof g.label=="function"?g.label():g.label;function C(g){const P=a.value[g];if(!P)return null;const x=P.data||{},{value:F}=x,{group:L}=P,A=et(x,!0),B=w(P);return P?T("div",k(k({"aria-label":typeof B=="string"&&!L?B:null},A),{},{key:g,role:L?"presentation":"option",id:`${l.id}_list_${g}`,"aria-selected":h(F)}),[F]):null}return o({onKeydown:g=>{const{which:P,ctrlKey:x}=g;switch(P){case _.N:case _.P:case _.UP:case _.DOWN:{let F=0;if(P===_.UP?F=-1:P===_.DOWN?F=1:Ro()&&x&&(P===_.N?F=1:P===_.P&&(F=-1)),F!==0){const L=v(b.activeIndex+F,F);r(L),$(L,!0)}break}case _.ENTER:{const F=a.value[b.activeIndex];F&&!F.data.disabled?y(F.value):y(void 0),l.open&&g.preventDefault();break}case _.ESC:l.toggleOpen(!1),l.open&&g.stopPropagation()}},onKeyup:()=>{},scrollTo:g=>{r(g)}}),()=>{const{id:g,notFoundContent:P,onPopupScroll:x}=l,{menuItemSelectedIcon:F,fieldNames:L,virtual:A,listHeight:B,listItemHeight:U}=i,Y=n.option,{activeIndex:W}=b,G=Object.keys(L).map(z=>L[z]);return a.value.length===0?T("div",{role:"listbox",id:`${g}_list`,class:`${d.value}-empty`,onMousedown:s},[P]):T(Ee,null,[T("div",{role:"listbox",id:`${g}_list`,style:{height:0,width:0,overflow:"hidden"}},[C(W-1),C(W),C(W+1)]),T(Fo,{itemKey:"key",ref:f,data:a.value,height:B,itemHeight:U,fullHeight:!1,onMousedown:s,onScroll:x,virtual:A},{default:(z,oe)=>{var ie;const{group:p,groupOption:H,data:O,value:K}=z,{key:te}=O,re=typeof z.label=="function"?z.label():z.label;if(p){const ae=(ie=O.title)!==null&&ie!==void 0?ie:Ct(re)&&re;return T("div",{class:ue(d.value,`${d.value}-group`),title:ae},[Y?Y(O):re!==void 0?re:te])}const{disabled:se,title:ee,children:ce,style:de,class:m,className:u}=O,c=Ho(O,["disabled","title","children","style","class","className"]),M=Le(c,G),I=h(K),j=`${d.value}-option`,Q=ue(d.value,j,m,u,{[`${j}-grouped`]:H,[`${j}-active`]:W===oe&&!se,[`${j}-disabled`]:se,[`${j}-selected`]:I}),J=w(z),Z=!F||typeof F=="function"||I,q=typeof J=="number"?J:J||K;let le=Ct(q)?q.toString():void 0;return ee!==void 0&&(le=ee),T("div",k(k({},M),{},{"aria-selected":I,class:Q,title:le,onMousemove:ae=>{c.onMousemove&&c.onMousemove(ae),!(W===oe||se)&&$(oe)},onClick:ae=>{se||y(K),c.onClick&&c.onClick(ae)},style:de}),[T("div",{class:`${j}-content`},[Y?Y(O):q]),Qe(F)||I,Z&&T(we,{class:`${d.value}-option-state`,customizeIcon:F,customizeIconProps:{isSelected:I}},{default:()=>[I?"✓":null]})])}})])}}});var Lo=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};function Bo(e){const t=e,{key:o,children:n}=t,l=t.props,{value:i,disabled:d}=l,a=Lo(l,["value","disabled"]),f=n?.default;return S({key:o,value:i!==void 0?i:o,children:f,disabled:d||d===""},a)}function zt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Tt(e).map((n,l)=>{var i;if(!Qe(n)||!n.type)return null;const{type:{isSelectOptGroup:d},key:a,children:f,props:s}=n;if(t||!d)return Bo(n);const r=f&&f.default?f.default():void 0,v=s?.label||((i=f.label)===null||i===void 0?void 0:i.call(f))||a;return S(S({key:`__RC_SELECT_GRP__${a===null?l:String(a)}__`},s),{label:v,options:zt(r||[])})}).filter(n=>n)}function _o(e,t,o){const n=X(),l=X(),i=X(),d=X([]);return ne([e,t],()=>{e.value?d.value=ke(e.value).slice():d.value=zt(t.value)},{immediate:!0,deep:!0}),Ce(()=>{const a=d.value,f=new Map,s=new Map,r=o.value;function v(b){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(let h=0;h<b.length;h+=1){const y=b[h];!y[r.options]||$?(f.set(y[r.value],y),s.set(y[r.label],y)):v(y[r.options],!0)}}v(a),n.value=a,l.value=f,i.value=s}),{options:n,valueOptions:l,labelOptions:i}}let xt=0;const Ao=vn();function zo(){let e;return Ao?(e=xt,xt+=1):e="TEST_OR_SSR",e}function Wo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:me("");const t=`rc_select_${zo()}`;return e.value||t}function Wt(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Ke(e,t){return Wt(e).join("").toUpperCase().includes(t)}const Ko=((e,t,o,n,l)=>V(()=>{const i=o.value,d=l?.value,a=n?.value;if(!i||a===!1)return e.value;const{options:f,label:s,value:r}=t.value,v=[],b=typeof a=="function",$=i.toUpperCase(),h=b?a:(w,C)=>d?Ke(C[d],$):C[f]?Ke(C[s!=="children"?s:"label"],$):Ke(C[r],$),y=b?w=>qe(w):w=>w;return e.value.forEach(w=>{if(w[f]){if(h(i,y(w)))v.push(w);else{const D=w[f].filter(N=>h(i,y(N)));D.length&&v.push(S(S({},w),{[f]:D}))}return}h(i,y(w))&&v.push(w)}),v})),jo=((e,t)=>{const o=X({values:new Map,options:new Map});return[V(()=>{const{values:i,options:d}=o.value,a=e.value.map(r=>{var v;return r.label===void 0?S(S({},r),{label:(v=i.get(r.value))===null||v===void 0?void 0:v.label}):r}),f=new Map,s=new Map;return a.forEach(r=>{f.set(r.value,r),s.set(r.value,t.value.get(r.value)||d.get(r.value))}),o.value.values=f,o.value.options=s,a}),i=>t.value.get(i)||o.value.options.get(i)]}),Uo=["inputValue"];function Kt(){return S(S({},Nt()),{prefixCls:String,id:String,backfill:{type:Boolean,default:void 0},fieldNames:Object,inputValue:String,searchValue:String,onSearch:Function,autoClearSearchValue:{type:Boolean,default:void 0},onSelect:Function,onDeselect:Function,filterOption:{type:[Boolean,Function],default:void 0},filterSort:Function,optionFilterProp:String,optionLabelProp:String,options:Array,defaultActiveFirstOption:{type:Boolean,default:void 0},virtual:{type:Boolean,default:void 0},listHeight:Number,listItemHeight:Number,menuItemSelectedIcon:R.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:R.any,defaultValue:R.any,onChange:Function,children:Array})}function Go(e){return!e||typeof e!="object"}const Yo=fe({compatConfig:{MODE:3},name:"VcSelect",inheritAttrs:!1,props:tt(Kt(),{prefixCls:"vc-select",autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup(e,t){let{expose:o,attrs:n,slots:l}=t;const i=Wo(ge(e,"id")),d=V(()=>Lt(e.mode)),a=V(()=>!!(!e.options&&e.children)),f=V(()=>e.filterOption===void 0&&e.mode==="combobox"?!1:e.filterOption),s=V(()=>Pt(e.fieldNames,a.value)),[r,v]=gt("",{value:V(()=>e.searchValue!==void 0?e.searchValue:e.inputValue),postState:m=>m||""}),b=_o(ge(e,"options"),ge(e,"children"),s),{valueOptions:$,labelOptions:h,options:y}=b,w=m=>Wt(m).map(c=>{var M,I;let j,Q,J,Z;Go(c)?j=c:(J=c.key,Q=c.label,j=(M=c.value)!==null&&M!==void 0?M:J);const q=$.value.get(j);return q&&(Q===void 0&&(Q=q?.[e.optionLabelProp||s.value.label]),J===void 0&&(J=(I=q?.key)!==null&&I!==void 0?I:j),Z=q?.disabled),{label:Q,value:j,key:J,disabled:Z,option:q}}),[C,D]=gt(e.defaultValue,{value:ge(e,"value")}),N=V(()=>{var m;const u=w(C.value);return e.mode==="combobox"&&!(!((m=u[0])===null||m===void 0)&&m.value)?[]:u}),[E,g]=jo(N,$),P=V(()=>{if(!e.mode&&E.value.length===1){const m=E.value[0];if(m.value===null&&(m.label===null||m.label===void 0))return[]}return E.value.map(m=>{var u;return S(S({},m),{label:(u=typeof m.label=="function"?m.label():m.label)!==null&&u!==void 0?u:m.value})})}),x=V(()=>new Set(E.value.map(m=>m.value)));Ce(()=>{var m;if(e.mode==="combobox"){const u=(m=E.value[0])===null||m===void 0?void 0:m.value;u!=null&&v(String(u))}},{flush:"post"});const F=(m,u)=>{const c=u??m;return{[s.value.value]:m,[s.value.label]:c}},L=X();Ce(()=>{if(e.mode!=="tags"){L.value=y.value;return}const m=y.value.slice(),u=c=>$.value.has(c);[...E.value].sort((c,M)=>c.value<M.value?-1:1).forEach(c=>{const M=c.value;u(M)||m.push(F(M,c.label))}),L.value=m});const A=Ko(L,s,r,f,ge(e,"optionFilterProp")),B=V(()=>e.mode!=="tags"||!r.value||A.value.some(m=>m[e.optionFilterProp||"value"]===r.value)?A.value:[F(r.value),...A.value]),U=V(()=>e.filterSort?[...B.value].sort((m,u)=>e.filterSort(m,u)):B.value),Y=V(()=>Qn(U.value,{fieldNames:s.value,childrenAsData:a.value})),W=m=>{const u=w(m);if(D(u),e.onChange&&(u.length!==E.value.length||u.some((c,M)=>{var I;return((I=E.value[M])===null||I===void 0?void 0:I.value)!==c?.value}))){const c=e.labelInValue?u.map(I=>S(S({},I),{originLabel:I.label,label:typeof I.label=="function"?I.label():I.label})):u.map(I=>I.value),M=u.map(I=>qe(g(I.value)));e.onChange(d.value?c:c[0],d.value?M:M[0])}},[G,z]=ht(null),[oe,ie]=ht(0),p=V(()=>e.defaultActiveFirstOption!==void 0?e.defaultActiveFirstOption:e.mode!=="combobox"),H=function(m,u){let{source:c="keyboard"}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ie(u),e.backfill&&e.mode==="combobox"&&m!==null&&c==="keyboard"&&z(String(m))},O=(m,u)=>{const c=()=>{var M;const I=g(m),j=I?.[s.value.label];return[e.labelInValue?{label:typeof j=="function"?j():j,originLabel:j,value:m,key:(M=I?.key)!==null&&M!==void 0?M:m}:m,qe(I)]};if(u&&e.onSelect){const[M,I]=c();e.onSelect(M,I)}else if(!u&&e.onDeselect){const[M,I]=c();e.onDeselect(M,I)}},K=(m,u)=>{let c;const M=d.value?u.selected:!0;M?c=d.value?[...E.value,m]:[m]:c=E.value.filter(I=>I.value!==m),W(c),O(m,M),e.mode==="combobox"?z(""):(!d.value||e.autoClearSearchValue)&&(v(""),z(""))},te=(m,u)=>{W(m),(u.type==="remove"||u.type==="clear")&&u.values.forEach(c=>{O(c.value,!1)})},re=(m,u)=>{var c;if(v(m),z(null),u.source==="submit"){const M=(m||"").trim();if(M){const I=Array.from(new Set([...x.value,M]));W(I),O(M,!0),v("")}return}u.source!=="blur"&&(e.mode==="combobox"&&W(m),(c=e.onSearch)===null||c===void 0||c.call(e,m))},se=m=>{let u=m;e.mode!=="tags"&&(u=m.map(M=>{const I=h.value.get(M);return I?.value}).filter(M=>M!==void 0));const c=Array.from(new Set([...x.value,...u]));W(c),c.forEach(M=>{O(M,!0)})},ee=V(()=>e.virtual!==!1&&e.dropdownMatchSelectWidth!==!1);Do(Ht(S(S({},b),{flattenOptions:Y,onActiveValue:H,defaultActiveFirstOption:p,onSelect:K,menuItemSelectedIcon:ge(e,"menuItemSelectedIcon"),rawValues:x,fieldNames:s,virtual:ee,listHeight:ge(e,"listHeight"),listItemHeight:ge(e,"listItemHeight"),childrenAsData:a})));const ce=me();o({focus(){var m;(m=ce.value)===null||m===void 0||m.focus()},blur(){var m;(m=ce.value)===null||m===void 0||m.blur()},scrollTo(m){var u;(u=ce.value)===null||u===void 0||u.scrollTo(m)}});const de=V(()=>Le(e,["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"]));return()=>T(ho,k(k(k({},de.value),n),{},{id:i,prefixCls:e.prefixCls,ref:ce,omitDomProps:Uo,mode:e.mode,displayValues:P.value,onDisplayValuesChange:te,searchValue:r.value,onSearch:re,onSearchSplit:se,dropdownMatchSelectWidth:e.dropdownMatchSelectWidth,OptionList:No,emptyOptions:!Y.value.length,activeValue:G.value,activeDescendantId:`${i}_list_${oe.value}`}),l)}}),lt=()=>null;lt.isSelectOption=!0;lt.displayName="ASelectOption";const it=()=>null;it.isSelectOptGroup=!0;it.displayName="ASelectOptGroup";function Xo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{loading:o,multiple:n,prefixCls:l,hasFeedback:i,feedbackIcon:d,showArrow:a}=e,f=e.suffixIcon||t.suffixIcon&&t.suffixIcon(),s=e.clearIcon||t.clearIcon&&t.clearIcon(),r=e.menuItemSelectedIcon||t.menuItemSelectedIcon&&t.menuItemSelectedIcon(),v=e.removeIcon||t.removeIcon&&t.removeIcon(),b=s??T(Vn,null,null),$=C=>T(Ee,null,[a!==!1&&C,i&&d]);let h=null;if(f!==void 0)h=$(f);else if(o)h=$(T(Hn,{spin:!0},null));else{const C=`${l}-suffix`;h=D=>{let{open:N,showSearch:E}=D;return $(N&&E?T(Bn,{class:C},null):T(_n,{class:C},null))}}let y=null;r!==void 0?y=r:n?y=T(Nn,null,null):y=null;let w=null;return v!==void 0?w=v:w=T(Ln,null,null),{clearIcon:b,suffixIcon:h,itemIcon:y,removeIcon:w}}const $t=e=>{const{controlPaddingHorizontal:t}=e;return{position:"relative",display:"block",minHeight:e.controlHeight,padding:`${(e.controlHeight-e.fontSize*e.lineHeight)/2}px ${t}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,boxSizing:"border-box"}},qo=e=>{const{antCls:t,componentCls:o}=e,n=`${o}-item`;return[{[`${o}-dropdown`]:S(S({},Je(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
4
4
  &${t}-slide-up-enter${t}-slide-up-enter-active${o}-dropdown-placement-bottomLeft,
@@ -1,4 +1,4 @@
1
- import{o as be,x as Ce,s as pe,b as $e,d as R,c as a,r as ve,f as Q,O as de,a8 as Se}from"./vendor-M5lGV-wr.js";import{h as l,P as s,i as v,al as xe,f as N,U as ne,aj as K,ak as ye,am as Ie,l as Pe,m as Oe,r as Te,n as ze,an as re,q as Be,p as we,V as M,G as F,$ as Ne,a0 as Me,Z as Ee,ao as je,S as De}from"./index-DPzT5L14.js";import{af as ae,b5 as oe,b6 as le,b7 as se}from"./icons-NT6gy8Ee.js";import{S as G,s as ge}from"./index-uWvLy_3T.js";import{u as Re}from"./responsiveObserve-Ch48RA0m.js";import{i as Ae,g as _e,h as He}from"./index-Di5tuS0d.js";import{B as Ke}from"./Trigger-nPvjho27.js";import{B as me}from"./BaseInput-CFi52nMs.js";import{c as ue}from"./vnode-BPkyunN_.js";import{f as ce}from"./firstNotUndefined-CLFzEa0p.js";function Fe(){const e=pe({});let t=null;const i=Re();return be(()=>{t=i.value.subscribe(n=>{e.value=n})}),Ce(()=>{i.value.unsubscribe(t)}),e}function ft(e){const t=pe();return $e(()=>{t.value=e()},{flush:"sync"}),t}const Ve=R({name:"MiniSelect",compatConfig:{MODE:3},inheritAttrs:!1,props:ge(),Option:G.Option,setup(e,t){let{attrs:i,slots:n}=t;return()=>{const r=l(l(l({},e),{size:"small"}),i);return a(G,r,n)}}}),We=R({name:"MiddleSelect",inheritAttrs:!1,props:ge(),Option:G.Option,setup(e,t){let{attrs:i,slots:n}=t;return()=>{const r=l(l(l({},e),{size:"middle"}),i);return a(G,r,n)}}}),E=R({compatConfig:{MODE:3},name:"Pager",inheritAttrs:!1,props:{rootPrefixCls:String,page:Number,active:{type:Boolean,default:void 0},last:{type:Boolean,default:void 0},locale:s.object,showTitle:{type:Boolean,default:void 0},itemRender:{type:Function,default:()=>{}},onClick:{type:Function},onKeypress:{type:Function}},eimt:["click","keypress"],setup(e,t){let{emit:i,attrs:n}=t;const r=()=>{i("click",e.page)},O=g=>{i("keypress",g,r,e.page)};return()=>{const{showTitle:g,page:p,itemRender:c}=e,{class:h,style:u}=n,b=`${e.rootPrefixCls}-item`,$=v(b,`${b}-${e.page}`,{[`${b}-active`]:e.active,[`${b}-disabled`]:!e.page},h);return a("li",{onClick:r,onKeypress:O,title:g?String(p):null,tabindex:"0",class:$,style:u},[c({page:p,type:"page",originalElement:a("a",{rel:"nofollow"},[p])})])}}}),j={ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Je=R({compatConfig:{MODE:3},props:{disabled:{type:Boolean,default:void 0},changeSize:Function,quickGo:Function,selectComponentClass:s.any,current:Number,pageSizeOptions:s.array.def(["10","20","50","100"]),pageSize:Number,buildOptionText:Function,locale:s.object,rootPrefixCls:String,selectPrefixCls:String,goButton:s.any},setup(e){const t=ve(""),i=Q(()=>!t.value||isNaN(t.value)?void 0:Number(t.value)),n=c=>`${c.value} ${e.locale.items_per_page}`,r=c=>{const{value:h}=c.target;t.value!==h&&(t.value=h)},O=c=>{const{goButton:h,quickGo:u,rootPrefixCls:b}=e;if(!(h||t.value===""))if(c.relatedTarget&&(c.relatedTarget.className.indexOf(`${b}-item-link`)>=0||c.relatedTarget.className.indexOf(`${b}-item`)>=0)){t.value="";return}else u(i.value),t.value=""},g=c=>{t.value!==""&&(c.keyCode===j.ENTER||c.type==="click")&&(e.quickGo(i.value),t.value="")},p=Q(()=>{const{pageSize:c,pageSizeOptions:h}=e;return h.some(u=>u.toString()===c.toString())?h:h.concat([c.toString()]).sort((u,b)=>{const $=isNaN(Number(u))?0:Number(u),S=isNaN(Number(b))?0:Number(b);return $-S})});return()=>{const{rootPrefixCls:c,locale:h,changeSize:u,quickGo:b,goButton:$,selectComponentClass:S,selectPrefixCls:m,pageSize:T,disabled:x}=e,o=`${c}-options`;let C=null,y=null,z=null;if(!u&&!b)return null;if(u&&S){const D=e.buildOptionText||n,d=p.value.map((f,V)=>a(S.Option,{key:V,value:f},{default:()=>[D({value:f})]}));C=a(S,{disabled:x,prefixCls:m,showSearch:!1,class:`${o}-size-changer`,optionLabelProp:"children",value:(T||p.value[0]).toString(),onChange:f=>u(Number(f)),getPopupContainer:f=>f.parentNode},{default:()=>[d]})}return b&&($&&(z=typeof $=="boolean"?a("button",{type:"button",onClick:g,onKeyup:g,disabled:x,class:`${o}-quick-jumper-button`},[h.jump_to_confirm]):a("span",{onClick:g,onKeyup:g},[$])),y=a("div",{class:`${o}-quick-jumper`},[h.jump_to,a(me,{disabled:x,type:"text",value:t.value,onInput:r,onChange:r,onKeyup:g,onBlur:O},null),h.page,z])),a("li",{class:`${o}`},[C,y])}}});var Le=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i};function Xe(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Ge(e){let{originalElement:t}=e;return t}function P(e,t,i){const n=typeof e>"u"?t.statePageSize:e;return Math.floor((i.total-1)/n)+1}const Ue=R({compatConfig:{MODE:3},name:"Pagination",mixins:[Ke],inheritAttrs:!1,props:{disabled:{type:Boolean,default:void 0},prefixCls:s.string.def("rc-pagination"),selectPrefixCls:s.string.def("rc-select"),current:Number,defaultCurrent:s.number.def(1),total:s.number.def(0),pageSize:Number,defaultPageSize:s.number.def(10),hideOnSinglePage:{type:Boolean,default:!1},showSizeChanger:{type:Boolean,default:void 0},showLessItems:{type:Boolean,default:!1},selectComponentClass:s.any,showPrevNextJumpers:{type:Boolean,default:!0},showQuickJumper:s.oneOfType([s.looseBool,s.object]).def(!1),showTitle:{type:Boolean,default:!0},pageSizeOptions:s.arrayOf(s.oneOfType([s.number,s.string])),buildOptionText:Function,showTotal:Function,simple:{type:Boolean,default:void 0},locale:s.object.def(Ie),itemRender:s.func.def(Ge),prevIcon:s.any,nextIcon:s.any,jumpPrevIcon:s.any,jumpNextIcon:s.any,totalBoundaryShowSizeChanger:s.number.def(50)},data(){const e=this.$props;let t=ce([this.current,this.defaultCurrent]);const i=ce([this.pageSize,this.defaultPageSize]);return t=Math.min(t,P(i,void 0,e)),{stateCurrent:t,stateCurrentInputValue:t,statePageSize:i}},watch:{current(e){this.setState({stateCurrent:e,stateCurrentInputValue:e})},pageSize(e){const t={};let i=this.stateCurrent;const n=P(e,this.$data,this.$props);i=i>n?n:i,K(this,"current")||(t.stateCurrent=i,t.stateCurrentInputValue=i),t.statePageSize=e,this.setState(t)},stateCurrent(e,t){this.$nextTick(()=>{if(this.$refs.paginationNode){const i=this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);i&&document.activeElement===i&&i.blur()}})},total(){const e={},t=P(this.pageSize,this.$data,this.$props);if(K(this,"current")){const i=Math.min(this.current,t);e.stateCurrent=i,e.stateCurrentInputValue=i}else{let i=this.stateCurrent;i===0&&t>0?i=1:i=Math.min(this.stateCurrent,t),e.stateCurrent=i}this.setState(e)}},methods:{getJumpPrevPage(){return Math.max(1,this.stateCurrent-(this.showLessItems?3:5))},getJumpNextPage(){return Math.min(P(void 0,this.$data,this.$props),this.stateCurrent+(this.showLessItems?3:5))},getItemIcon(e,t){const{prefixCls:i}=this.$props;return ye(this,e,this.$props)||a("button",{type:"button","aria-label":t,class:`${i}-item-link`},null)},getValidValue(e){const t=e.target.value,i=P(void 0,this.$data,this.$props),{stateCurrentInputValue:n}=this.$data;let r;return t===""?r=t:isNaN(Number(t))?r=n:t>=i?r=i:r=Number(t),r},isValid(e){return Xe(e)&&e!==this.stateCurrent},shouldDisplayQuickJumper(){const{showQuickJumper:e,pageSize:t,total:i}=this.$props;return i<=t?!1:e},handleKeyDown(e){(e.keyCode===j.ARROW_UP||e.keyCode===j.ARROW_DOWN)&&e.preventDefault()},handleKeyUp(e){const t=this.getValidValue(e),i=this.stateCurrentInputValue;t!==i&&this.setState({stateCurrentInputValue:t}),e.keyCode===j.ENTER?this.handleChange(t):e.keyCode===j.ARROW_UP?this.handleChange(t-1):e.keyCode===j.ARROW_DOWN&&this.handleChange(t+1)},changePageSize(e){let t=this.stateCurrent;const i=t,n=P(e,this.$data,this.$props);t=t>n?n:t,n===0&&(t=this.stateCurrent),typeof e=="number"&&(K(this,"pageSize")||this.setState({statePageSize:e}),K(this,"current")||this.setState({stateCurrent:t,stateCurrentInputValue:t})),this.__emit("update:pageSize",e),t!==i&&this.__emit("update:current",t),this.__emit("showSizeChange",t,e),this.__emit("change",t,e)},handleChange(e){const{disabled:t}=this.$props;let i=e;if(this.isValid(i)&&!t){const n=P(void 0,this.$data,this.$props);return i>n?i=n:i<1&&(i=1),K(this,"current")||this.setState({stateCurrent:i,stateCurrentInputValue:i}),this.__emit("update:current",i),this.__emit("change",i,this.statePageSize),i}return this.stateCurrent},prev(){this.hasPrev()&&this.handleChange(this.stateCurrent-1)},next(){this.hasNext()&&this.handleChange(this.stateCurrent+1)},jumpPrev(){this.handleChange(this.getJumpPrevPage())},jumpNext(){this.handleChange(this.getJumpNextPage())},hasPrev(){return this.stateCurrent>1},hasNext(){return this.stateCurrent<P(void 0,this.$data,this.$props)},getShowSizeChanger(){const{showSizeChanger:e,total:t,totalBoundaryShowSizeChanger:i}=this.$props;return typeof e<"u"?e:t>i},runIfEnter(e,t){if(e.key==="Enter"||e.charCode===13){e.preventDefault();for(var i=arguments.length,n=new Array(i>2?i-2:0),r=2;r<i;r++)n[r-2]=arguments[r];t(...n)}},runIfEnterPrev(e){this.runIfEnter(e,this.prev)},runIfEnterNext(e){this.runIfEnter(e,this.next)},runIfEnterJumpPrev(e){this.runIfEnter(e,this.jumpPrev)},runIfEnterJumpNext(e){this.runIfEnter(e,this.jumpNext)},handleGoTO(e){(e.keyCode===j.ENTER||e.type==="click")&&this.handleChange(this.stateCurrentInputValue)},renderPrev(e){const{itemRender:t}=this.$props,i=t({page:e,type:"prev",originalElement:this.getItemIcon("prevIcon","prev page")}),n=!this.hasPrev();return ne(i)?ue(i,n?{disabled:n}:{}):i},renderNext(e){const{itemRender:t}=this.$props,i=t({page:e,type:"next",originalElement:this.getItemIcon("nextIcon","next page")}),n=!this.hasNext();return ne(i)?ue(i,n?{disabled:n}:{}):i}},render(){const{prefixCls:e,disabled:t,hideOnSinglePage:i,total:n,locale:r,showQuickJumper:O,showLessItems:g,showTitle:p,showTotal:c,simple:h,itemRender:u,showPrevNextJumpers:b,jumpPrevIcon:$,jumpNextIcon:S,selectComponentClass:m,selectPrefixCls:T,pageSizeOptions:x}=this.$props,{stateCurrent:o,statePageSize:C}=this,y=xe(this.$attrs).extraAttrs,{class:z}=y,D=Le(y,["class"]);if(i===!0&&this.total<=C)return null;const d=P(void 0,this.$data,this.$props),f=[];let V=null,Y=null,Z=null,k=null,A=null;const W=O&&O.goButton,I=g?1:2,ee=o-1>0?o-1:0,te=o+1<d?o+1:d,J=this.hasPrev(),L=this.hasNext();if(h)return W&&(typeof W=="boolean"?A=a("button",{type:"button",onClick:this.handleGoTO,onKeyup:this.handleGoTO},[r.jump_to_confirm]):A=a("span",{onClick:this.handleGoTO,onKeyup:this.handleGoTO},[W]),A=a("li",{title:p?`${r.jump_to}${o}/${d}`:null,class:`${e}-simple-pager`},[A])),a("ul",N({class:v(`${e} ${e}-simple`,{[`${e}-disabled`]:t},z)},D),[a("li",{title:p?r.prev_page:null,onClick:this.prev,tabindex:J?0:null,onKeypress:this.runIfEnterPrev,class:v(`${e}-prev`,{[`${e}-disabled`]:!J}),"aria-disabled":!J},[this.renderPrev(ee)]),a("li",{title:p?`${o}/${d}`:null,class:`${e}-simple-pager`},[a(me,{type:"text",value:this.stateCurrentInputValue,disabled:t,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onInput:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"},null),a("span",{class:`${e}-slash`},[de("/")]),d]),a("li",{title:p?r.next_page:null,onClick:this.next,tabindex:L?0:null,onKeypress:this.runIfEnterNext,class:v(`${e}-next`,{[`${e}-disabled`]:!L}),"aria-disabled":!L},[this.renderNext(te)]),A]);if(d<=3+I*2){const X={locale:r,rootPrefixCls:e,showTitle:p,itemRender:u,onClick:this.handleChange,onKeypress:this.runIfEnter};d||f.push(a(E,N(N({},X),{},{key:"noPager",page:1,class:`${e}-item-disabled`}),null));for(let B=1;B<=d;B+=1){const w=o===B;f.push(a(E,N(N({},X),{},{key:B,page:B,active:w}),null))}}else{const X=g?r.prev_3:r.prev_5,B=g?r.next_3:r.next_5;b&&(V=a("li",{title:this.showTitle?X:null,key:"prev",onClick:this.jumpPrev,tabindex:"0",onKeypress:this.runIfEnterJumpPrev,class:v(`${e}-jump-prev`,{[`${e}-jump-prev-custom-icon`]:!!$})},[u({page:this.getJumpPrevPage(),type:"jump-prev",originalElement:this.getItemIcon("jumpPrevIcon","prev page")})]),Y=a("li",{title:this.showTitle?B:null,key:"next",tabindex:"0",onClick:this.jumpNext,onKeypress:this.runIfEnterJumpNext,class:v(`${e}-jump-next`,{[`${e}-jump-next-custom-icon`]:!!S})},[u({page:this.getJumpNextPage(),type:"jump-next",originalElement:this.getItemIcon("jumpNextIcon","next page")})])),k=a(E,{locale:r,last:!0,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:d,page:d,active:!1,showTitle:p,itemRender:u},null),Z=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:1,page:1,active:!1,showTitle:p,itemRender:u},null);let w=Math.max(1,o-I),_=Math.min(o+I,d);o-1<=I&&(_=1+I*2),d-o<=I&&(w=d-I*2);for(let H=w;H<=_;H+=1){const fe=o===H;f.push(a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:H,page:H,active:fe,showTitle:p,itemRender:u},null))}o-1>=I*2&&o!==3&&(f[0]=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:w,page:w,class:`${e}-item-after-jump-prev`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.unshift(V)),d-o>=I*2&&o!==d-2&&(f[f.length-1]=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:_,page:_,class:`${e}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.push(Y)),w!==1&&f.unshift(Z),_!==d&&f.push(k)}let ie=null;c&&(ie=a("li",{class:`${e}-total-text`},[c(n,[n===0?0:(o-1)*C+1,o*C>n?n:o*C])]));const U=!J||!d,q=!L||!d,he=this.buildOptionText||this.$slots.buildOptionText;return a("ul",N(N({unselectable:"on",ref:"paginationNode"},D),{},{class:v({[`${e}`]:!0,[`${e}-disabled`]:t},z)}),[ie,a("li",{title:p?r.prev_page:null,onClick:this.prev,tabindex:U?null:0,onKeypress:this.runIfEnterPrev,class:v(`${e}-prev`,{[`${e}-disabled`]:U}),"aria-disabled":U},[this.renderPrev(ee)]),f,a("li",{title:p?r.next_page:null,onClick:this.next,tabindex:q?null:0,onKeypress:this.runIfEnterNext,class:v(`${e}-next`,{[`${e}-disabled`]:q}),"aria-disabled":q},[this.renderNext(te)]),a(Je,{disabled:t,locale:r,rootPrefixCls:e,selectComponentClass:m,selectPrefixCls:T,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:o,pageSize:C,pageSizeOptions:x,buildOptionText:he||null,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:W},null)])}}),qe=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`&${t}-mini`]:{[`
1
+ import{o as be,x as Ce,s as pe,b as $e,d as R,c as a,r as ve,f as Q,O as de,a8 as Se}from"./vendor-M5lGV-wr.js";import{h as l,P as s,i as v,al as xe,f as N,U as ne,aj as K,ak as ye,am as Ie,l as Pe,m as Oe,r as Te,n as ze,an as re,q as Be,p as we,V as M,G as F,$ as Ne,a0 as Me,Z as Ee,ao as je,S as De}from"./index-DY5Oc3z6.js";import{af as ae,b5 as oe,b6 as le,b7 as se}from"./icons-NT6gy8Ee.js";import{S as G,s as ge}from"./index-B_PqXUkT.js";import{u as Re}from"./responsiveObserve-CZz-M9cI.js";import{i as Ae,g as _e,h as He}from"./index-fMwtau_-.js";import{B as Ke}from"./Trigger-DFbfZFuJ.js";import{B as me}from"./BaseInput-BvGiwRav.js";import{c as ue}from"./vnode-B3Pp583L.js";import{f as ce}from"./firstNotUndefined-CLFzEa0p.js";function Fe(){const e=pe({});let t=null;const i=Re();return be(()=>{t=i.value.subscribe(n=>{e.value=n})}),Ce(()=>{i.value.unsubscribe(t)}),e}function ft(e){const t=pe();return $e(()=>{t.value=e()},{flush:"sync"}),t}const Ve=R({name:"MiniSelect",compatConfig:{MODE:3},inheritAttrs:!1,props:ge(),Option:G.Option,setup(e,t){let{attrs:i,slots:n}=t;return()=>{const r=l(l(l({},e),{size:"small"}),i);return a(G,r,n)}}}),We=R({name:"MiddleSelect",inheritAttrs:!1,props:ge(),Option:G.Option,setup(e,t){let{attrs:i,slots:n}=t;return()=>{const r=l(l(l({},e),{size:"middle"}),i);return a(G,r,n)}}}),E=R({compatConfig:{MODE:3},name:"Pager",inheritAttrs:!1,props:{rootPrefixCls:String,page:Number,active:{type:Boolean,default:void 0},last:{type:Boolean,default:void 0},locale:s.object,showTitle:{type:Boolean,default:void 0},itemRender:{type:Function,default:()=>{}},onClick:{type:Function},onKeypress:{type:Function}},eimt:["click","keypress"],setup(e,t){let{emit:i,attrs:n}=t;const r=()=>{i("click",e.page)},O=g=>{i("keypress",g,r,e.page)};return()=>{const{showTitle:g,page:p,itemRender:c}=e,{class:h,style:u}=n,b=`${e.rootPrefixCls}-item`,$=v(b,`${b}-${e.page}`,{[`${b}-active`]:e.active,[`${b}-disabled`]:!e.page},h);return a("li",{onClick:r,onKeypress:O,title:g?String(p):null,tabindex:"0",class:$,style:u},[c({page:p,type:"page",originalElement:a("a",{rel:"nofollow"},[p])})])}}}),j={ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Je=R({compatConfig:{MODE:3},props:{disabled:{type:Boolean,default:void 0},changeSize:Function,quickGo:Function,selectComponentClass:s.any,current:Number,pageSizeOptions:s.array.def(["10","20","50","100"]),pageSize:Number,buildOptionText:Function,locale:s.object,rootPrefixCls:String,selectPrefixCls:String,goButton:s.any},setup(e){const t=ve(""),i=Q(()=>!t.value||isNaN(t.value)?void 0:Number(t.value)),n=c=>`${c.value} ${e.locale.items_per_page}`,r=c=>{const{value:h}=c.target;t.value!==h&&(t.value=h)},O=c=>{const{goButton:h,quickGo:u,rootPrefixCls:b}=e;if(!(h||t.value===""))if(c.relatedTarget&&(c.relatedTarget.className.indexOf(`${b}-item-link`)>=0||c.relatedTarget.className.indexOf(`${b}-item`)>=0)){t.value="";return}else u(i.value),t.value=""},g=c=>{t.value!==""&&(c.keyCode===j.ENTER||c.type==="click")&&(e.quickGo(i.value),t.value="")},p=Q(()=>{const{pageSize:c,pageSizeOptions:h}=e;return h.some(u=>u.toString()===c.toString())?h:h.concat([c.toString()]).sort((u,b)=>{const $=isNaN(Number(u))?0:Number(u),S=isNaN(Number(b))?0:Number(b);return $-S})});return()=>{const{rootPrefixCls:c,locale:h,changeSize:u,quickGo:b,goButton:$,selectComponentClass:S,selectPrefixCls:m,pageSize:T,disabled:x}=e,o=`${c}-options`;let C=null,y=null,z=null;if(!u&&!b)return null;if(u&&S){const D=e.buildOptionText||n,d=p.value.map((f,V)=>a(S.Option,{key:V,value:f},{default:()=>[D({value:f})]}));C=a(S,{disabled:x,prefixCls:m,showSearch:!1,class:`${o}-size-changer`,optionLabelProp:"children",value:(T||p.value[0]).toString(),onChange:f=>u(Number(f)),getPopupContainer:f=>f.parentNode},{default:()=>[d]})}return b&&($&&(z=typeof $=="boolean"?a("button",{type:"button",onClick:g,onKeyup:g,disabled:x,class:`${o}-quick-jumper-button`},[h.jump_to_confirm]):a("span",{onClick:g,onKeyup:g},[$])),y=a("div",{class:`${o}-quick-jumper`},[h.jump_to,a(me,{disabled:x,type:"text",value:t.value,onInput:r,onChange:r,onKeyup:g,onBlur:O},null),h.page,z])),a("li",{class:`${o}`},[C,y])}}});var Le=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i};function Xe(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Ge(e){let{originalElement:t}=e;return t}function P(e,t,i){const n=typeof e>"u"?t.statePageSize:e;return Math.floor((i.total-1)/n)+1}const Ue=R({compatConfig:{MODE:3},name:"Pagination",mixins:[Ke],inheritAttrs:!1,props:{disabled:{type:Boolean,default:void 0},prefixCls:s.string.def("rc-pagination"),selectPrefixCls:s.string.def("rc-select"),current:Number,defaultCurrent:s.number.def(1),total:s.number.def(0),pageSize:Number,defaultPageSize:s.number.def(10),hideOnSinglePage:{type:Boolean,default:!1},showSizeChanger:{type:Boolean,default:void 0},showLessItems:{type:Boolean,default:!1},selectComponentClass:s.any,showPrevNextJumpers:{type:Boolean,default:!0},showQuickJumper:s.oneOfType([s.looseBool,s.object]).def(!1),showTitle:{type:Boolean,default:!0},pageSizeOptions:s.arrayOf(s.oneOfType([s.number,s.string])),buildOptionText:Function,showTotal:Function,simple:{type:Boolean,default:void 0},locale:s.object.def(Ie),itemRender:s.func.def(Ge),prevIcon:s.any,nextIcon:s.any,jumpPrevIcon:s.any,jumpNextIcon:s.any,totalBoundaryShowSizeChanger:s.number.def(50)},data(){const e=this.$props;let t=ce([this.current,this.defaultCurrent]);const i=ce([this.pageSize,this.defaultPageSize]);return t=Math.min(t,P(i,void 0,e)),{stateCurrent:t,stateCurrentInputValue:t,statePageSize:i}},watch:{current(e){this.setState({stateCurrent:e,stateCurrentInputValue:e})},pageSize(e){const t={};let i=this.stateCurrent;const n=P(e,this.$data,this.$props);i=i>n?n:i,K(this,"current")||(t.stateCurrent=i,t.stateCurrentInputValue=i),t.statePageSize=e,this.setState(t)},stateCurrent(e,t){this.$nextTick(()=>{if(this.$refs.paginationNode){const i=this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);i&&document.activeElement===i&&i.blur()}})},total(){const e={},t=P(this.pageSize,this.$data,this.$props);if(K(this,"current")){const i=Math.min(this.current,t);e.stateCurrent=i,e.stateCurrentInputValue=i}else{let i=this.stateCurrent;i===0&&t>0?i=1:i=Math.min(this.stateCurrent,t),e.stateCurrent=i}this.setState(e)}},methods:{getJumpPrevPage(){return Math.max(1,this.stateCurrent-(this.showLessItems?3:5))},getJumpNextPage(){return Math.min(P(void 0,this.$data,this.$props),this.stateCurrent+(this.showLessItems?3:5))},getItemIcon(e,t){const{prefixCls:i}=this.$props;return ye(this,e,this.$props)||a("button",{type:"button","aria-label":t,class:`${i}-item-link`},null)},getValidValue(e){const t=e.target.value,i=P(void 0,this.$data,this.$props),{stateCurrentInputValue:n}=this.$data;let r;return t===""?r=t:isNaN(Number(t))?r=n:t>=i?r=i:r=Number(t),r},isValid(e){return Xe(e)&&e!==this.stateCurrent},shouldDisplayQuickJumper(){const{showQuickJumper:e,pageSize:t,total:i}=this.$props;return i<=t?!1:e},handleKeyDown(e){(e.keyCode===j.ARROW_UP||e.keyCode===j.ARROW_DOWN)&&e.preventDefault()},handleKeyUp(e){const t=this.getValidValue(e),i=this.stateCurrentInputValue;t!==i&&this.setState({stateCurrentInputValue:t}),e.keyCode===j.ENTER?this.handleChange(t):e.keyCode===j.ARROW_UP?this.handleChange(t-1):e.keyCode===j.ARROW_DOWN&&this.handleChange(t+1)},changePageSize(e){let t=this.stateCurrent;const i=t,n=P(e,this.$data,this.$props);t=t>n?n:t,n===0&&(t=this.stateCurrent),typeof e=="number"&&(K(this,"pageSize")||this.setState({statePageSize:e}),K(this,"current")||this.setState({stateCurrent:t,stateCurrentInputValue:t})),this.__emit("update:pageSize",e),t!==i&&this.__emit("update:current",t),this.__emit("showSizeChange",t,e),this.__emit("change",t,e)},handleChange(e){const{disabled:t}=this.$props;let i=e;if(this.isValid(i)&&!t){const n=P(void 0,this.$data,this.$props);return i>n?i=n:i<1&&(i=1),K(this,"current")||this.setState({stateCurrent:i,stateCurrentInputValue:i}),this.__emit("update:current",i),this.__emit("change",i,this.statePageSize),i}return this.stateCurrent},prev(){this.hasPrev()&&this.handleChange(this.stateCurrent-1)},next(){this.hasNext()&&this.handleChange(this.stateCurrent+1)},jumpPrev(){this.handleChange(this.getJumpPrevPage())},jumpNext(){this.handleChange(this.getJumpNextPage())},hasPrev(){return this.stateCurrent>1},hasNext(){return this.stateCurrent<P(void 0,this.$data,this.$props)},getShowSizeChanger(){const{showSizeChanger:e,total:t,totalBoundaryShowSizeChanger:i}=this.$props;return typeof e<"u"?e:t>i},runIfEnter(e,t){if(e.key==="Enter"||e.charCode===13){e.preventDefault();for(var i=arguments.length,n=new Array(i>2?i-2:0),r=2;r<i;r++)n[r-2]=arguments[r];t(...n)}},runIfEnterPrev(e){this.runIfEnter(e,this.prev)},runIfEnterNext(e){this.runIfEnter(e,this.next)},runIfEnterJumpPrev(e){this.runIfEnter(e,this.jumpPrev)},runIfEnterJumpNext(e){this.runIfEnter(e,this.jumpNext)},handleGoTO(e){(e.keyCode===j.ENTER||e.type==="click")&&this.handleChange(this.stateCurrentInputValue)},renderPrev(e){const{itemRender:t}=this.$props,i=t({page:e,type:"prev",originalElement:this.getItemIcon("prevIcon","prev page")}),n=!this.hasPrev();return ne(i)?ue(i,n?{disabled:n}:{}):i},renderNext(e){const{itemRender:t}=this.$props,i=t({page:e,type:"next",originalElement:this.getItemIcon("nextIcon","next page")}),n=!this.hasNext();return ne(i)?ue(i,n?{disabled:n}:{}):i}},render(){const{prefixCls:e,disabled:t,hideOnSinglePage:i,total:n,locale:r,showQuickJumper:O,showLessItems:g,showTitle:p,showTotal:c,simple:h,itemRender:u,showPrevNextJumpers:b,jumpPrevIcon:$,jumpNextIcon:S,selectComponentClass:m,selectPrefixCls:T,pageSizeOptions:x}=this.$props,{stateCurrent:o,statePageSize:C}=this,y=xe(this.$attrs).extraAttrs,{class:z}=y,D=Le(y,["class"]);if(i===!0&&this.total<=C)return null;const d=P(void 0,this.$data,this.$props),f=[];let V=null,Y=null,Z=null,k=null,A=null;const W=O&&O.goButton,I=g?1:2,ee=o-1>0?o-1:0,te=o+1<d?o+1:d,J=this.hasPrev(),L=this.hasNext();if(h)return W&&(typeof W=="boolean"?A=a("button",{type:"button",onClick:this.handleGoTO,onKeyup:this.handleGoTO},[r.jump_to_confirm]):A=a("span",{onClick:this.handleGoTO,onKeyup:this.handleGoTO},[W]),A=a("li",{title:p?`${r.jump_to}${o}/${d}`:null,class:`${e}-simple-pager`},[A])),a("ul",N({class:v(`${e} ${e}-simple`,{[`${e}-disabled`]:t},z)},D),[a("li",{title:p?r.prev_page:null,onClick:this.prev,tabindex:J?0:null,onKeypress:this.runIfEnterPrev,class:v(`${e}-prev`,{[`${e}-disabled`]:!J}),"aria-disabled":!J},[this.renderPrev(ee)]),a("li",{title:p?`${o}/${d}`:null,class:`${e}-simple-pager`},[a(me,{type:"text",value:this.stateCurrentInputValue,disabled:t,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onInput:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"},null),a("span",{class:`${e}-slash`},[de("/")]),d]),a("li",{title:p?r.next_page:null,onClick:this.next,tabindex:L?0:null,onKeypress:this.runIfEnterNext,class:v(`${e}-next`,{[`${e}-disabled`]:!L}),"aria-disabled":!L},[this.renderNext(te)]),A]);if(d<=3+I*2){const X={locale:r,rootPrefixCls:e,showTitle:p,itemRender:u,onClick:this.handleChange,onKeypress:this.runIfEnter};d||f.push(a(E,N(N({},X),{},{key:"noPager",page:1,class:`${e}-item-disabled`}),null));for(let B=1;B<=d;B+=1){const w=o===B;f.push(a(E,N(N({},X),{},{key:B,page:B,active:w}),null))}}else{const X=g?r.prev_3:r.prev_5,B=g?r.next_3:r.next_5;b&&(V=a("li",{title:this.showTitle?X:null,key:"prev",onClick:this.jumpPrev,tabindex:"0",onKeypress:this.runIfEnterJumpPrev,class:v(`${e}-jump-prev`,{[`${e}-jump-prev-custom-icon`]:!!$})},[u({page:this.getJumpPrevPage(),type:"jump-prev",originalElement:this.getItemIcon("jumpPrevIcon","prev page")})]),Y=a("li",{title:this.showTitle?B:null,key:"next",tabindex:"0",onClick:this.jumpNext,onKeypress:this.runIfEnterJumpNext,class:v(`${e}-jump-next`,{[`${e}-jump-next-custom-icon`]:!!S})},[u({page:this.getJumpNextPage(),type:"jump-next",originalElement:this.getItemIcon("jumpNextIcon","next page")})])),k=a(E,{locale:r,last:!0,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:d,page:d,active:!1,showTitle:p,itemRender:u},null),Z=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:1,page:1,active:!1,showTitle:p,itemRender:u},null);let w=Math.max(1,o-I),_=Math.min(o+I,d);o-1<=I&&(_=1+I*2),d-o<=I&&(w=d-I*2);for(let H=w;H<=_;H+=1){const fe=o===H;f.push(a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:H,page:H,active:fe,showTitle:p,itemRender:u},null))}o-1>=I*2&&o!==3&&(f[0]=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:w,page:w,class:`${e}-item-after-jump-prev`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.unshift(V)),d-o>=I*2&&o!==d-2&&(f[f.length-1]=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:_,page:_,class:`${e}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.push(Y)),w!==1&&f.unshift(Z),_!==d&&f.push(k)}let ie=null;c&&(ie=a("li",{class:`${e}-total-text`},[c(n,[n===0?0:(o-1)*C+1,o*C>n?n:o*C])]));const U=!J||!d,q=!L||!d,he=this.buildOptionText||this.$slots.buildOptionText;return a("ul",N(N({unselectable:"on",ref:"paginationNode"},D),{},{class:v({[`${e}`]:!0,[`${e}-disabled`]:t},z)}),[ie,a("li",{title:p?r.prev_page:null,onClick:this.prev,tabindex:U?null:0,onKeypress:this.runIfEnterPrev,class:v(`${e}-prev`,{[`${e}-disabled`]:U}),"aria-disabled":U},[this.renderPrev(ee)]),f,a("li",{title:p?r.next_page:null,onClick:this.next,tabindex:q?null:0,onKeypress:this.runIfEnterNext,class:v(`${e}-next`,{[`${e}-disabled`]:q}),"aria-disabled":q},[this.renderNext(te)]),a(Je,{disabled:t,locale:r,rootPrefixCls:e,selectComponentClass:m,selectPrefixCls:T,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:o,pageSize:C,pageSizeOptions:x,buildOptionText:he||null,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:W},null)])}}),qe=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`&${t}-mini`]:{[`
2
2
  &:hover ${t}-item:not(${t}-item-active),
3
3
  &:active ${t}-item:not(${t}-item-active),
4
4
  &:hover ${t}-item-link,
@@ -1 +1 @@
1
- import{q as J,P as B,J as lt,f as E,i as ot,ae as pt,ab as vt,l as $t,m as ft,h as M,r as ht,t as et,ad as G,G as it,V as St,a0 as q,Z as yt}from"./index-DPzT5L14.js";import xt from"./index-DHpwwlmv.js";import{u as bt,e as Ct,P as It}from"./index-CJr12ypE.js";import{A as _t}from"./Row-8jdU1xYg.js";import{C as Lt}from"./Col-DzIUYUNu.js";import{c as zt}from"./vnode-BPkyunN_.js";import{d as Y,c as r,i as Mt,r as W,w as Pt,f as I,p as wt,a8 as nt}from"./vendor-M5lGV-wr.js";import{i as Et}from"./initDefaultProps-BTloFqyf.js";import{r as at}from"./responsiveObserve-Ch48RA0m.js";import"./icons-NT6gy8Ee.js";import"./index-uWvLy_3T.js";import"./Trigger-nPvjho27.js";import"./raf-Deuc0E8-.js";import"./motion-44iMBc1o.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-BVc6NQ_K.js";import"./KeyCode-D63Tfrq7.js";import"./BaseInput-CFi52nMs.js";import"./pickAttrs-ANFpSZes.js";import"./Overflow-BvHNhdMR.js";import"./index-CJbqE5Sw.js";import"./isMobile--2fOlCHx.js";import"./omit-CXfJtuFy.js";import"./useMergedState-O7QXt4P5.js";import"./useState-CSzR8F8O.js";import"./FormItemContext-CbJJp5BR.js";import"./createContext-B1McGnV-.js";import"./statusUtils-D9EniG8V.js";import"./Compact-CirVV9Wq.js";import"./move-CyWQI5eW.js";import"./slide-BEz3LORF.js";import"./compact-item-CQZnkP5p.js";import"./index-Di5tuS0d.js";import"./firstNotUndefined-CLFzEa0p.js";import"./useFlexGapSupport-C92oHeXB.js";import"./styleChecker-C1IvuY3L.js";import"./index-D4rhVRSV.js";const Tt=()=>({avatar:B.any,description:B.any,prefixCls:String,title:B.any}),Bt=Y({compatConfig:{MODE:3},name:"AListItemMeta",props:Tt(),displayName:"AListItemMeta",__ANT_LIST_ITEM_META:!0,slots:Object,setup(t,e){let{slots:i}=e;const{prefixCls:l}=J("list",t);return()=>{var o,c,p,a,S,d;const m=`${l.value}-item-meta`,u=(o=t.title)!==null&&o!==void 0?o:(c=i.title)===null||c===void 0?void 0:c.call(i),s=(p=t.description)!==null&&p!==void 0?p:(a=i.description)===null||a===void 0?void 0:a.call(i),f=(S=t.avatar)!==null&&S!==void 0?S:(d=i.avatar)===null||d===void 0?void 0:d.call(i),v=r("div",{class:`${l.value}-item-meta-content`},[u&&r("h4",{class:`${l.value}-item-meta-title`},[u]),s&&r("div",{class:`${l.value}-item-meta-description`},[s])]);return r("div",{class:m},[f&&r("div",{class:`${l.value}-item-meta-avatar`},[f]),(u||s)&&v])}}}),rt=Symbol("ListContextKey");var At=function(t,e){var i={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&e.indexOf(l)<0&&(i[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,l=Object.getOwnPropertySymbols(t);o<l.length;o++)e.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(t,l[o])&&(i[l[o]]=t[l[o]]);return i};const Ot=()=>({prefixCls:String,extra:B.any,actions:B.array,grid:Object,colStyle:{type:Object,default:void 0}}),jt=Y({compatConfig:{MODE:3},name:"AListItem",inheritAttrs:!1,Meta:Bt,props:Ot(),slots:Object,setup(t,e){let{slots:i,attrs:l}=e;const{itemLayout:o,grid:c}=Mt(rt,{grid:W(),itemLayout:W()}),{prefixCls:p}=J("list",t),a=()=>{var d;const m=((d=i.default)===null||d===void 0?void 0:d.call(i))||[];let u;return m.forEach(s=>{pt(s)&&!vt(s)&&(u=!0)}),u&&m.length>1},S=()=>{var d,m;const u=(d=t.extra)!==null&&d!==void 0?d:(m=i.extra)===null||m===void 0?void 0:m.call(i);return o.value==="vertical"?!!u:!a()};return()=>{var d,m,u,s,f;const{class:v}=l,b=At(l,["class"]),h=p.value,_=(d=t.extra)!==null&&d!==void 0?d:(m=i.extra)===null||m===void 0?void 0:m.call(i),A=(u=i.default)===null||u===void 0?void 0:u.call(i);let $=(s=t.actions)!==null&&s!==void 0?s:lt((f=i.actions)===null||f===void 0?void 0:f.call(i));$=$&&!Array.isArray($)?[$]:$;const P=$&&$.length>0&&r("ul",{class:`${h}-item-action`,key:"actions"},[$.map((C,T)=>r("li",{key:`${h}-item-action-${T}`},[C,T!==$.length-1&&r("em",{class:`${h}-item-action-split`},null)]))]),O=c.value?"div":"li",j=r(O,E(E({},b),{},{class:ot(`${h}-item`,{[`${h}-item-no-flex`]:!S()},v)}),{default:()=>[o.value==="vertical"&&_?[r("div",{class:`${h}-item-main`,key:"content"},[A,P]),r("div",{class:`${h}-item-extra`,key:"extra"},[_])]:[A,P,zt(_,{key:"extra"})]]});return c.value?r(Lt,{flex:1,style:t.colStyle},{default:()=>[j]}):j}}}),Ht=t=>{const{listBorderedCls:e,componentCls:i,paddingLG:l,margin:o,padding:c,listItemPaddingSM:p,marginLG:a,borderRadiusLG:S}=t;return{[`${e}`]:{border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:S,[`${i}-header,${i}-footer,${i}-item`]:{paddingInline:l},[`${i}-pagination`]:{margin:`${o}px ${a}px`}},[`${e}${i}-sm`]:{[`${i}-item,${i}-header,${i}-footer`]:{padding:p}},[`${e}${i}-lg`]:{[`${i}-item,${i}-header,${i}-footer`]:{padding:`${c}px ${l}px`}}}},Gt=t=>{const{componentCls:e,screenSM:i,screenMD:l,marginLG:o,marginSM:c,margin:p}=t;return{[`@media screen and (max-width:${l})`]:{[`${e}`]:{[`${e}-item`]:{[`${e}-item-action`]:{marginInlineStart:o}}},[`${e}-vertical`]:{[`${e}-item`]:{[`${e}-item-extra`]:{marginInlineStart:o}}}},[`@media screen and (max-width: ${i})`]:{[`${e}`]:{[`${e}-item`]:{flexWrap:"wrap",[`${e}-action`]:{marginInlineStart:c}}},[`${e}-vertical`]:{[`${e}-item`]:{flexWrap:"wrap-reverse",[`${e}-item-main`]:{minWidth:t.contentWidth},[`${e}-item-extra`]:{margin:`auto auto ${p}px`}}}}}},Wt=t=>{const{componentCls:e,antCls:i,controlHeight:l,minHeight:o,paddingSM:c,marginLG:p,padding:a,listItemPadding:S,colorPrimary:d,listItemPaddingSM:m,listItemPaddingLG:u,paddingXS:s,margin:f,colorText:v,colorTextDescription:b,motionDurationSlow:h,lineWidth:_}=t;return{[`${e}`]:M(M({},ht(t)),{position:"relative","*":{outline:"none"},[`${e}-header, ${e}-footer`]:{background:"transparent",paddingBlock:c},[`${e}-pagination`]:{marginBlockStart:p,textAlign:"end",[`${i}-pagination-options`]:{textAlign:"start"}},[`${e}-spin`]:{minHeight:o,textAlign:"center"},[`${e}-items`]:{margin:0,padding:0,listStyle:"none"},[`${e}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:S,color:v,[`${e}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${e}-item-meta-avatar`]:{marginInlineEnd:a},[`${e}-item-meta-content`]:{flex:"1 0",width:0,color:v},[`${e}-item-meta-title`]:{marginBottom:t.marginXXS,color:v,fontSize:t.fontSize,lineHeight:t.lineHeight,"> a":{color:v,transition:`all ${h}`,"&:hover":{color:d}}},[`${e}-item-meta-description`]:{color:b,fontSize:t.fontSize,lineHeight:t.lineHeight}},[`${e}-item-action`]:{flex:"0 0 auto",marginInlineStart:t.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${s}px`,color:b,fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${e}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:_,height:Math.ceil(t.fontSize*t.lineHeight)-t.marginXXS*2,transform:"translateY(-50%)",backgroundColor:t.colorSplit}}},[`${e}-empty`]:{padding:`${a}px 0`,color:b,fontSize:t.fontSizeSM,textAlign:"center"},[`${e}-empty-text`]:{padding:a,color:t.colorTextDisabled,fontSize:t.fontSize,textAlign:"center"},[`${e}-item-no-flex`]:{display:"block"}}),[`${e}-grid ${i}-col > ${e}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:f,paddingBlock:0,borderBlockEnd:"none"},[`${e}-vertical ${e}-item`]:{alignItems:"initial",[`${e}-item-main`]:{display:"block",flex:1},[`${e}-item-extra`]:{marginInlineStart:p},[`${e}-item-meta`]:{marginBlockEnd:a,[`${e}-item-meta-title`]:{marginBlockEnd:c,color:v,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}},[`${e}-item-action`]:{marginBlockStart:a,marginInlineStart:"auto","> li":{padding:`0 ${a}px`,"&:first-child":{paddingInlineStart:0}}}},[`${e}-split ${e}-item`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${e}-split ${e}-header`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-split${e}-empty ${e}-footer`]:{borderTop:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-loading ${e}-spin-nested-loading`]:{minHeight:l},[`${e}-split${e}-something-after-last-item ${i}-spin-container > ${e}-items > ${e}-item:last-child`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-lg ${e}-item`]:{padding:u},[`${e}-sm ${e}-item`]:{padding:m},[`${e}:not(${e}-vertical)`]:{[`${e}-item-no-flex`]:{[`${e}-item-action`]:{float:"right"}}}}},Dt=$t("List",t=>{const e=ft(t,{listBorderedCls:`${t.componentCls}-bordered`,minHeight:t.controlHeightLG,listItemPadding:`${t.paddingContentVertical}px ${t.paddingContentHorizontalLG}px`,listItemPaddingSM:`${t.paddingContentVerticalSM}px ${t.paddingContentHorizontal}px`,listItemPaddingLG:`${t.paddingContentVerticalLG}px ${t.paddingContentHorizontalLG}px`});return[Wt(e),Ht(e),Gt(e)]},{contentWidth:220}),Kt=()=>({bordered:it(),dataSource:yt(),extra:G(),grid:et(),itemLayout:String,loading:q([Boolean,Object]),loadMore:G(),pagination:q([Boolean,Object]),prefixCls:String,rowKey:q([String,Number,Function]),renderItem:St(),size:String,split:it(),header:G(),footer:G(),locale:et()}),z=Y({compatConfig:{MODE:3},name:"AList",inheritAttrs:!1,Item:jt,props:Et(Kt(),{dataSource:[],bordered:!1,split:!0,loading:!1,pagination:!1}),slots:Object,setup(t,e){let{slots:i,attrs:l}=e;var o,c;wt(rt,{grid:nt(t,"grid"),itemLayout:nt(t,"itemLayout")});const p={current:1,total:0},{prefixCls:a,direction:S,renderEmpty:d}=J("list",t),[m,u]=Dt(a),s=I(()=>t.pagination&&typeof t.pagination=="object"?t.pagination:{}),f=W((o=s.value.defaultCurrent)!==null&&o!==void 0?o:1),v=W((c=s.value.defaultPageSize)!==null&&c!==void 0?c:10);Pt(s,()=>{"current"in s.value&&(f.value=s.value.current),"pageSize"in s.value&&(v.value=s.value.pageSize)});const b=[],h=n=>(g,y)=>{f.value=g,v.value=y,s.value[n]&&s.value[n](g,y)},_=h("onChange"),A=h("onShowSizeChange"),$=I(()=>typeof t.loading=="boolean"?{spinning:t.loading}:t.loading),P=I(()=>$.value&&$.value.spinning),O=I(()=>{let n="";switch(t.size){case"large":n="lg";break;case"small":n="sm";break}return n}),j=I(()=>({[`${a.value}`]:!0,[`${a.value}-vertical`]:t.itemLayout==="vertical",[`${a.value}-${O.value}`]:O.value,[`${a.value}-split`]:t.split,[`${a.value}-bordered`]:t.bordered,[`${a.value}-loading`]:P.value,[`${a.value}-grid`]:!!t.grid,[`${a.value}-rtl`]:S.value==="rtl"})),C=I(()=>{const n=M(M(M({},p),{total:t.dataSource.length,current:f.value,pageSize:v.value}),t.pagination||{}),g=Math.ceil(n.total/n.pageSize);return n.current>g&&(n.current=g),n}),T=I(()=>{let n=[...t.dataSource];return t.pagination&&t.dataSource.length>(C.value.current-1)*C.value.pageSize&&(n=[...t.dataSource].splice((C.value.current-1)*C.value.pageSize,C.value.pageSize)),n}),st=bt(),D=Ct(()=>{for(let n=0;n<at.length;n+=1){const g=at[n];if(st.value[g])return g}}),dt=I(()=>{if(!t.grid)return;const n=D.value&&t.grid[D.value]?t.grid[D.value]:t.grid.column;if(n)return{width:`${100/n}%`,maxWidth:`${100/n}%`}}),ct=(n,g)=>{var y;const w=(y=t.renderItem)!==null&&y!==void 0?y:i.renderItem;if(!w)return null;let x;const L=typeof t.rowKey;return L==="function"?x=t.rowKey(n):L==="string"||L==="number"?x=n[t.rowKey]:x=n.key,x||(x=`list-item-${g}`),b[g]=x,w({item:n,index:g})};return()=>{var n,g,y,w,x,L,K,N;const Z=(n=t.loadMore)!==null&&n!==void 0?n:(g=i.loadMore)===null||g===void 0?void 0:g.call(i),X=(y=t.footer)!==null&&y!==void 0?y:(w=i.footer)===null||w===void 0?void 0:w.call(i),Q=(x=t.header)!==null&&x!==void 0?x:(L=i.header)===null||L===void 0?void 0:L.call(i),U=lt((K=i.default)===null||K===void 0?void 0:K.call(i)),mt=!!(Z||t.pagination||X),ut=ot(M(M({},j.value),{[`${a.value}-something-after-last-item`]:mt}),l.class,u.value),k=t.pagination?r("div",{class:`${a.value}-pagination`},[r(It,E(E({},C.value),{},{onChange:_,onShowSizeChange:A}),null)]):null;let R=P.value&&r("div",{style:{minHeight:"53px"}},null);if(T.value.length>0){b.length=0;const tt=T.value.map((V,F)=>ct(V,F)),gt=tt.map((V,F)=>r("div",{key:b[F],style:dt.value},[V]));R=t.grid?r(_t,{gutter:t.grid.gutter},{default:()=>[gt]}):r("ul",{class:`${a.value}-items`},[tt])}else!U.length&&!P.value&&(R=r("div",{class:`${a.value}-empty-text`},[((N=t.locale)===null||N===void 0?void 0:N.emptyText)||d("List")]));const H=C.value.position||"bottom";return m(r("div",E(E({},l),{},{class:ut}),[(H==="top"||H==="both")&&k,Q&&r("div",{class:`${a.value}-header`},[Q]),r(xt,$.value,{default:()=>[R,U]}),X&&r("div",{class:`${a.value}-footer`},[X]),Z||(H==="bottom"||H==="both")&&k]))}}});z.install=function(t){return t.component(z.name,z),t.component(z.Item.name,z.Item),t.component(z.Item.Meta.name,z.Item.Meta),t};export{jt as ListItem,Bt as ListItemMeta,z as default,Kt as listProps};
1
+ import{q as J,P as B,J as lt,f as E,i as ot,ae as pt,ab as vt,l as $t,m as ft,h as M,r as ht,t as et,ad as G,G as it,V as St,a0 as q,Z as yt}from"./index-DY5Oc3z6.js";import xt from"./index-mzNWO8Yy.js";import{u as bt,e as Ct,P as It}from"./index-BaXXyyT0.js";import{A as _t}from"./Row-DQwipGEm.js";import{C as Lt}from"./Col-CBFpGgb5.js";import{c as zt}from"./vnode-B3Pp583L.js";import{d as Y,c as r,i as Mt,r as W,w as Pt,f as I,p as wt,a8 as nt}from"./vendor-M5lGV-wr.js";import{i as Et}from"./initDefaultProps-CacwmJft.js";import{r as at}from"./responsiveObserve-CZz-M9cI.js";import"./icons-NT6gy8Ee.js";import"./index-B_PqXUkT.js";import"./Trigger-DFbfZFuJ.js";import"./raf-Deuc0E8-.js";import"./motion-BWrP7Lz6.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-BVc6NQ_K.js";import"./KeyCode-D63Tfrq7.js";import"./BaseInput-BvGiwRav.js";import"./pickAttrs-DUGKp0ro.js";import"./Overflow-kf1mnFrM.js";import"./index-yhA-qP4Y.js";import"./isMobile--2fOlCHx.js";import"./omit-BlaOv91I.js";import"./useMergedState-O7QXt4P5.js";import"./useState-CSzR8F8O.js";import"./FormItemContext-D_HGU4aA.js";import"./createContext-xLJXI46O.js";import"./statusUtils-DdYKRSiH.js";import"./Compact-DnOD5uMF.js";import"./move-imnbiy1n.js";import"./slide-BEnICwoX.js";import"./compact-item-Bw5EEKw4.js";import"./index-fMwtau_-.js";import"./firstNotUndefined-CLFzEa0p.js";import"./useFlexGapSupport-BUEmeWdR.js";import"./styleChecker-DgUxvOQt.js";import"./index-Da7bZewp.js";const Tt=()=>({avatar:B.any,description:B.any,prefixCls:String,title:B.any}),Bt=Y({compatConfig:{MODE:3},name:"AListItemMeta",props:Tt(),displayName:"AListItemMeta",__ANT_LIST_ITEM_META:!0,slots:Object,setup(t,e){let{slots:i}=e;const{prefixCls:l}=J("list",t);return()=>{var o,c,p,a,S,d;const m=`${l.value}-item-meta`,u=(o=t.title)!==null&&o!==void 0?o:(c=i.title)===null||c===void 0?void 0:c.call(i),s=(p=t.description)!==null&&p!==void 0?p:(a=i.description)===null||a===void 0?void 0:a.call(i),f=(S=t.avatar)!==null&&S!==void 0?S:(d=i.avatar)===null||d===void 0?void 0:d.call(i),v=r("div",{class:`${l.value}-item-meta-content`},[u&&r("h4",{class:`${l.value}-item-meta-title`},[u]),s&&r("div",{class:`${l.value}-item-meta-description`},[s])]);return r("div",{class:m},[f&&r("div",{class:`${l.value}-item-meta-avatar`},[f]),(u||s)&&v])}}}),rt=Symbol("ListContextKey");var At=function(t,e){var i={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&e.indexOf(l)<0&&(i[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,l=Object.getOwnPropertySymbols(t);o<l.length;o++)e.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(t,l[o])&&(i[l[o]]=t[l[o]]);return i};const Ot=()=>({prefixCls:String,extra:B.any,actions:B.array,grid:Object,colStyle:{type:Object,default:void 0}}),jt=Y({compatConfig:{MODE:3},name:"AListItem",inheritAttrs:!1,Meta:Bt,props:Ot(),slots:Object,setup(t,e){let{slots:i,attrs:l}=e;const{itemLayout:o,grid:c}=Mt(rt,{grid:W(),itemLayout:W()}),{prefixCls:p}=J("list",t),a=()=>{var d;const m=((d=i.default)===null||d===void 0?void 0:d.call(i))||[];let u;return m.forEach(s=>{pt(s)&&!vt(s)&&(u=!0)}),u&&m.length>1},S=()=>{var d,m;const u=(d=t.extra)!==null&&d!==void 0?d:(m=i.extra)===null||m===void 0?void 0:m.call(i);return o.value==="vertical"?!!u:!a()};return()=>{var d,m,u,s,f;const{class:v}=l,b=At(l,["class"]),h=p.value,_=(d=t.extra)!==null&&d!==void 0?d:(m=i.extra)===null||m===void 0?void 0:m.call(i),A=(u=i.default)===null||u===void 0?void 0:u.call(i);let $=(s=t.actions)!==null&&s!==void 0?s:lt((f=i.actions)===null||f===void 0?void 0:f.call(i));$=$&&!Array.isArray($)?[$]:$;const P=$&&$.length>0&&r("ul",{class:`${h}-item-action`,key:"actions"},[$.map((C,T)=>r("li",{key:`${h}-item-action-${T}`},[C,T!==$.length-1&&r("em",{class:`${h}-item-action-split`},null)]))]),O=c.value?"div":"li",j=r(O,E(E({},b),{},{class:ot(`${h}-item`,{[`${h}-item-no-flex`]:!S()},v)}),{default:()=>[o.value==="vertical"&&_?[r("div",{class:`${h}-item-main`,key:"content"},[A,P]),r("div",{class:`${h}-item-extra`,key:"extra"},[_])]:[A,P,zt(_,{key:"extra"})]]});return c.value?r(Lt,{flex:1,style:t.colStyle},{default:()=>[j]}):j}}}),Ht=t=>{const{listBorderedCls:e,componentCls:i,paddingLG:l,margin:o,padding:c,listItemPaddingSM:p,marginLG:a,borderRadiusLG:S}=t;return{[`${e}`]:{border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:S,[`${i}-header,${i}-footer,${i}-item`]:{paddingInline:l},[`${i}-pagination`]:{margin:`${o}px ${a}px`}},[`${e}${i}-sm`]:{[`${i}-item,${i}-header,${i}-footer`]:{padding:p}},[`${e}${i}-lg`]:{[`${i}-item,${i}-header,${i}-footer`]:{padding:`${c}px ${l}px`}}}},Gt=t=>{const{componentCls:e,screenSM:i,screenMD:l,marginLG:o,marginSM:c,margin:p}=t;return{[`@media screen and (max-width:${l})`]:{[`${e}`]:{[`${e}-item`]:{[`${e}-item-action`]:{marginInlineStart:o}}},[`${e}-vertical`]:{[`${e}-item`]:{[`${e}-item-extra`]:{marginInlineStart:o}}}},[`@media screen and (max-width: ${i})`]:{[`${e}`]:{[`${e}-item`]:{flexWrap:"wrap",[`${e}-action`]:{marginInlineStart:c}}},[`${e}-vertical`]:{[`${e}-item`]:{flexWrap:"wrap-reverse",[`${e}-item-main`]:{minWidth:t.contentWidth},[`${e}-item-extra`]:{margin:`auto auto ${p}px`}}}}}},Wt=t=>{const{componentCls:e,antCls:i,controlHeight:l,minHeight:o,paddingSM:c,marginLG:p,padding:a,listItemPadding:S,colorPrimary:d,listItemPaddingSM:m,listItemPaddingLG:u,paddingXS:s,margin:f,colorText:v,colorTextDescription:b,motionDurationSlow:h,lineWidth:_}=t;return{[`${e}`]:M(M({},ht(t)),{position:"relative","*":{outline:"none"},[`${e}-header, ${e}-footer`]:{background:"transparent",paddingBlock:c},[`${e}-pagination`]:{marginBlockStart:p,textAlign:"end",[`${i}-pagination-options`]:{textAlign:"start"}},[`${e}-spin`]:{minHeight:o,textAlign:"center"},[`${e}-items`]:{margin:0,padding:0,listStyle:"none"},[`${e}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:S,color:v,[`${e}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${e}-item-meta-avatar`]:{marginInlineEnd:a},[`${e}-item-meta-content`]:{flex:"1 0",width:0,color:v},[`${e}-item-meta-title`]:{marginBottom:t.marginXXS,color:v,fontSize:t.fontSize,lineHeight:t.lineHeight,"> a":{color:v,transition:`all ${h}`,"&:hover":{color:d}}},[`${e}-item-meta-description`]:{color:b,fontSize:t.fontSize,lineHeight:t.lineHeight}},[`${e}-item-action`]:{flex:"0 0 auto",marginInlineStart:t.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${s}px`,color:b,fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${e}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:_,height:Math.ceil(t.fontSize*t.lineHeight)-t.marginXXS*2,transform:"translateY(-50%)",backgroundColor:t.colorSplit}}},[`${e}-empty`]:{padding:`${a}px 0`,color:b,fontSize:t.fontSizeSM,textAlign:"center"},[`${e}-empty-text`]:{padding:a,color:t.colorTextDisabled,fontSize:t.fontSize,textAlign:"center"},[`${e}-item-no-flex`]:{display:"block"}}),[`${e}-grid ${i}-col > ${e}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:f,paddingBlock:0,borderBlockEnd:"none"},[`${e}-vertical ${e}-item`]:{alignItems:"initial",[`${e}-item-main`]:{display:"block",flex:1},[`${e}-item-extra`]:{marginInlineStart:p},[`${e}-item-meta`]:{marginBlockEnd:a,[`${e}-item-meta-title`]:{marginBlockEnd:c,color:v,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}},[`${e}-item-action`]:{marginBlockStart:a,marginInlineStart:"auto","> li":{padding:`0 ${a}px`,"&:first-child":{paddingInlineStart:0}}}},[`${e}-split ${e}-item`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${e}-split ${e}-header`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-split${e}-empty ${e}-footer`]:{borderTop:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-loading ${e}-spin-nested-loading`]:{minHeight:l},[`${e}-split${e}-something-after-last-item ${i}-spin-container > ${e}-items > ${e}-item:last-child`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-lg ${e}-item`]:{padding:u},[`${e}-sm ${e}-item`]:{padding:m},[`${e}:not(${e}-vertical)`]:{[`${e}-item-no-flex`]:{[`${e}-item-action`]:{float:"right"}}}}},Dt=$t("List",t=>{const e=ft(t,{listBorderedCls:`${t.componentCls}-bordered`,minHeight:t.controlHeightLG,listItemPadding:`${t.paddingContentVertical}px ${t.paddingContentHorizontalLG}px`,listItemPaddingSM:`${t.paddingContentVerticalSM}px ${t.paddingContentHorizontal}px`,listItemPaddingLG:`${t.paddingContentVerticalLG}px ${t.paddingContentHorizontalLG}px`});return[Wt(e),Ht(e),Gt(e)]},{contentWidth:220}),Kt=()=>({bordered:it(),dataSource:yt(),extra:G(),grid:et(),itemLayout:String,loading:q([Boolean,Object]),loadMore:G(),pagination:q([Boolean,Object]),prefixCls:String,rowKey:q([String,Number,Function]),renderItem:St(),size:String,split:it(),header:G(),footer:G(),locale:et()}),z=Y({compatConfig:{MODE:3},name:"AList",inheritAttrs:!1,Item:jt,props:Et(Kt(),{dataSource:[],bordered:!1,split:!0,loading:!1,pagination:!1}),slots:Object,setup(t,e){let{slots:i,attrs:l}=e;var o,c;wt(rt,{grid:nt(t,"grid"),itemLayout:nt(t,"itemLayout")});const p={current:1,total:0},{prefixCls:a,direction:S,renderEmpty:d}=J("list",t),[m,u]=Dt(a),s=I(()=>t.pagination&&typeof t.pagination=="object"?t.pagination:{}),f=W((o=s.value.defaultCurrent)!==null&&o!==void 0?o:1),v=W((c=s.value.defaultPageSize)!==null&&c!==void 0?c:10);Pt(s,()=>{"current"in s.value&&(f.value=s.value.current),"pageSize"in s.value&&(v.value=s.value.pageSize)});const b=[],h=n=>(g,y)=>{f.value=g,v.value=y,s.value[n]&&s.value[n](g,y)},_=h("onChange"),A=h("onShowSizeChange"),$=I(()=>typeof t.loading=="boolean"?{spinning:t.loading}:t.loading),P=I(()=>$.value&&$.value.spinning),O=I(()=>{let n="";switch(t.size){case"large":n="lg";break;case"small":n="sm";break}return n}),j=I(()=>({[`${a.value}`]:!0,[`${a.value}-vertical`]:t.itemLayout==="vertical",[`${a.value}-${O.value}`]:O.value,[`${a.value}-split`]:t.split,[`${a.value}-bordered`]:t.bordered,[`${a.value}-loading`]:P.value,[`${a.value}-grid`]:!!t.grid,[`${a.value}-rtl`]:S.value==="rtl"})),C=I(()=>{const n=M(M(M({},p),{total:t.dataSource.length,current:f.value,pageSize:v.value}),t.pagination||{}),g=Math.ceil(n.total/n.pageSize);return n.current>g&&(n.current=g),n}),T=I(()=>{let n=[...t.dataSource];return t.pagination&&t.dataSource.length>(C.value.current-1)*C.value.pageSize&&(n=[...t.dataSource].splice((C.value.current-1)*C.value.pageSize,C.value.pageSize)),n}),st=bt(),D=Ct(()=>{for(let n=0;n<at.length;n+=1){const g=at[n];if(st.value[g])return g}}),dt=I(()=>{if(!t.grid)return;const n=D.value&&t.grid[D.value]?t.grid[D.value]:t.grid.column;if(n)return{width:`${100/n}%`,maxWidth:`${100/n}%`}}),ct=(n,g)=>{var y;const w=(y=t.renderItem)!==null&&y!==void 0?y:i.renderItem;if(!w)return null;let x;const L=typeof t.rowKey;return L==="function"?x=t.rowKey(n):L==="string"||L==="number"?x=n[t.rowKey]:x=n.key,x||(x=`list-item-${g}`),b[g]=x,w({item:n,index:g})};return()=>{var n,g,y,w,x,L,K,N;const Z=(n=t.loadMore)!==null&&n!==void 0?n:(g=i.loadMore)===null||g===void 0?void 0:g.call(i),X=(y=t.footer)!==null&&y!==void 0?y:(w=i.footer)===null||w===void 0?void 0:w.call(i),Q=(x=t.header)!==null&&x!==void 0?x:(L=i.header)===null||L===void 0?void 0:L.call(i),U=lt((K=i.default)===null||K===void 0?void 0:K.call(i)),mt=!!(Z||t.pagination||X),ut=ot(M(M({},j.value),{[`${a.value}-something-after-last-item`]:mt}),l.class,u.value),k=t.pagination?r("div",{class:`${a.value}-pagination`},[r(It,E(E({},C.value),{},{onChange:_,onShowSizeChange:A}),null)]):null;let R=P.value&&r("div",{style:{minHeight:"53px"}},null);if(T.value.length>0){b.length=0;const tt=T.value.map((V,F)=>ct(V,F)),gt=tt.map((V,F)=>r("div",{key:b[F],style:dt.value},[V]));R=t.grid?r(_t,{gutter:t.grid.gutter},{default:()=>[gt]}):r("ul",{class:`${a.value}-items`},[tt])}else!U.length&&!P.value&&(R=r("div",{class:`${a.value}-empty-text`},[((N=t.locale)===null||N===void 0?void 0:N.emptyText)||d("List")]));const H=C.value.position||"bottom";return m(r("div",E(E({},l),{},{class:ut}),[(H==="top"||H==="both")&&k,Q&&r("div",{class:`${a.value}-header`},[Q]),r(xt,$.value,{default:()=>[R,U]}),X&&r("div",{class:`${a.value}-footer`},[X]),Z||(H==="bottom"||H==="both")&&k]))}}});z.install=function(t){return t.component(z.name,z),t.component(z.Item.name,z.Item),t.component(z.Item.Meta.name,z.Item.Meta),t};export{jt as ListItem,Bt as ListItemMeta,z as default,Kt as listProps};
@@ -1,4 +1,4 @@
1
- import{l as te,m as le,K as ie,h as s,r as E,an as se,G as m,V as I,Z as A,P as ce,$ as de,q as K,L as ue,w as be,J as ve,i as N,f as D}from"./index-DPzT5L14.js";import{V as fe}from"./Checkbox-Dwaflpww.js";import{a as X,F as he}from"./FormItemContext-CbJJp5BR.js";import{d as L,i as me,b as pe,e as ge,o as xe,c as P,f as S,r as w,w as U,p as Ce}from"./vendor-M5lGV-wr.js";const $e=new ie("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),ye=e=>{const{checkboxCls:a}=e,n=`${a}-wrapper`;return[{[`${a}-group`]:s(s({},E(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:s(s({},E(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[a]:s(s({},E(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",[`${a}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${a}-inner`]:s({},se(e))},[`${a}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[a]:{"&-indeterminate":{[`${a}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}:hover ${a}:after`]:{visibility:"visible"},[`
1
+ import{l as te,m as le,K as ie,h as s,r as E,an as se,G as m,V as I,Z as A,P as ce,$ as de,q as K,L as ue,w as be,J as ve,i as N,f as D}from"./index-DY5Oc3z6.js";import{V as fe}from"./Checkbox-Dvn8uxKO.js";import{a as X,F as he}from"./FormItemContext-D_HGU4aA.js";import{d as L,i as me,b as pe,e as ge,o as xe,c as P,f as S,r as w,w as U,p as Ce}from"./vendor-M5lGV-wr.js";const $e=new ie("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),ye=e=>{const{checkboxCls:a}=e,n=`${a}-wrapper`;return[{[`${a}-group`]:s(s({},E(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:s(s({},E(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[a]:s(s({},E(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",[`${a}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${a}-inner`]:s({},se(e))},[`${a}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[a]:{"&-indeterminate":{[`${a}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}:hover ${a}:after`]:{visibility:"visible"},[`
2
2
  ${n}:not(${n}-disabled),
3
3
  ${a}:not(${a}-disabled)
4
4
  `]:{[`&:hover ${a}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${a}-checked:not(${a}-disabled) ${a}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${a}-checked:not(${a}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${a}-checked`]:{[`${a}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}},"&:after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderRadius:e.borderRadiusSM,visibility:"hidden",border:`${e.lineWidthBold}px solid ${e.colorPrimary}`,animationName:$e,animationDuration:e.motionDurationSlow,animationTimingFunction:"ease-in-out",animationFillMode:"backwards",content:'""',transition:`all ${e.motionDurationSlow}`}},[`
@@ -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-DPzT5L14.js";import{d as le,c as s,a4 as ie,s as w,f as ae,a2 as se,a3 as re}from"./vendor-M5lGV-wr.js";import{c as ce,d as de,e as ue,f as ge,E as pe,C as me,I as fe,a as ve,b as $e}from"./icons-NT6gy8Ee.js";import{c as he}from"./vnode-BPkyunN_.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-DY5Oc3z6.js";import{d as le,c as s,a4 as ie,s as w,f as ae,a2 as se,a3 as re}from"./vendor-M5lGV-wr.js";import{c as ce,d as de,e as ue,f as ge,E as pe,C as me,I as fe,a as ve,b as $e}from"./icons-NT6gy8Ee.js";import{c as he}from"./vnode-B3Pp583L.js";const B=(e,o,n,i,a)=>({backgroundColor:e,border:`${i.lineWidth}px ${i.lineType} ${o}`,[`${a}-icon`]:{color:n}}),ye=e=>{const{componentCls:o,motionDurationSlow:n,marginXS:i,marginSM:a,fontSize:u,fontSizeLG:r,lineHeight:g,borderRadiusLG:$,motionEaseInOutCirc:c,alertIconSizeLG:d,colorText:m,paddingContentVerticalSM:f,alertPaddingHorizontal:h,paddingMD:C,paddingContentHorizontalLG:S}=e;return{[o]:H(H({},Q(e)),{position:"relative",display:"flex",alignItems:"center",padding:`${f}px ${h}px`,wordWrap:"break-word",borderRadius:$,[`&${o}-rtl`]:{direction:"rtl"},[`${o}-content`]:{flex:1,minWidth:0},[`${o}-icon`]:{marginInlineEnd:i,lineHeight:0},"&-description":{display:"none",fontSize:u,lineHeight:g},"&-message":{color:m},[`&${o}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c},
2
2
  padding-top ${n} ${c}, padding-bottom ${n} ${c},
3
3
  margin-bottom ${n} ${c}`},[`&${o}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${o}-with-description`]:{alignItems:"flex-start",paddingInline:S,paddingBlock:C,[`${o}-icon`]:{marginInlineEnd:a,fontSize:d,lineHeight:0},[`${o}-message`]:{display:"block",marginBottom:i,color:m,fontSize:r},[`${o}-description`]:{display:"block"}},[`${o}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},Ce=e=>{const{componentCls:o,colorSuccess:n,colorSuccessBorder:i,colorSuccessBg:a,colorWarning:u,colorWarningBorder:r,colorWarningBg:g,colorError:$,colorErrorBorder:c,colorErrorBg:d,colorInfo:m,colorInfoBorder:f,colorInfoBg:h}=e;return{[o]:{"&-success":B(a,i,n,e,o),"&-info":B(h,f,m,e,o),"&-warning":B(g,r,u,e,o),"&-error":H(H({},B(d,c,$,e,o)),{[`${o}-description > pre`]:{margin:0,padding:0}})}}},Se=e=>{const{componentCls:o,iconCls:n,motionDurationMid:i,marginXS:a,fontSizeIcon:u,colorIcon:r,colorIconHover:g}=e;return{[o]:{"&-action":{marginInlineStart:a},[`${o}-close-icon`]:{marginInlineStart:a,padding:0,overflow:"hidden",fontSize:u,lineHeight:`${u}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:r,transition:`color ${i}`,"&:hover":{color:g}}},"&-close-text":{color:r,transition:`color ${i}`,"&:hover":{color:g}}}}},xe=e=>[ye(e),Ce(e),Se(e)],Ie=J("Alert",e=>{const{fontSizeHeading3:o}=e,n=K(e,{alertIconSizeLG:o,alertPaddingHorizontal:12});return[xe(n)]}),be={success:ve,info:fe,error:me,warning:pe},we={success:ge,info:ue,error:de,warning:ce},Be=te("success","info","warning","error"),He=()=>({type:v.oneOf(Be),closable:{type:Boolean,default:void 0},closeText:v.any,message:v.any,description:v.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:v.any,closeIcon:v.any,onClose:Function}),Te=le({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:He(),setup(e,o){let{slots:n,emit:i,attrs:a,expose:u}=o;const{prefixCls:r,direction:g}=Z("alert",e),[$,c]=Ie(r),d=w(!1),m=w(!1),f=w(),h=l=>{l.preventDefault();const p=f.value;p.style.height=`${p.offsetHeight}px`,p.style.height=`${p.offsetHeight}px`,d.value=!0,i("close",l)},C=()=>{var l;d.value=!1,m.value=!0,(l=e.afterClose)===null||l===void 0||l.call(e)},S=ae(()=>{const{type:l}=e;return l!==void 0?l:e.banner?"warning":"info"});u({animationEnd:C});const V=w({});return()=>{var l,p,T,E,_,z,A,O,L,F;const{banner:D,closeIcon:W=(l=n.closeIcon)===null||l===void 0?void 0:l.call(n)}=e;let{closable:M,showIcon:y}=e;const P=(p=e.closeText)!==null&&p!==void 0?p:(T=n.closeText)===null||T===void 0?void 0:T.call(n),x=(E=e.description)!==null&&E!==void 0?E:(_=n.description)===null||_===void 0?void 0:_.call(n),G=(z=e.message)!==null&&z!==void 0?z:(A=n.message)===null||A===void 0?void 0:A.call(n),I=(O=e.icon)!==null&&O!==void 0?O:(L=n.icon)===null||L===void 0?void 0:L.call(n),R=(F=n.action)===null||F===void 0?void 0:F.call(n);y=D&&y===void 0?!0:y;const j=(x?we:be)[S.value]||null;P&&(M=!0);const t=r.value,k=ee(t,{[`${t}-${S.value}`]:!0,[`${t}-closing`]:d.value,[`${t}-with-description`]:!!x,[`${t}-no-icon`]:!y,[`${t}-banner`]:!!D,[`${t}-closable`]:M,[`${t}-rtl`]:g.value==="rtl",[c.value]:!0}),X=M?s("button",{type:"button",onClick:h,class:`${t}-close-icon`,tabindex:0},[P?s("span",{class:`${t}-close-text`},[P]):W===void 0?s($e,null,null):W]):null,q=I&&(oe(I)?he(I,{class:`${t}-icon`}):s("span",{class:`${t}-icon`},[I]))||s(j,{class:`${t}-icon`},null),U=ne(`${t}-motion`,{appear:!1,css:!0,onAfterLeave:C,onBeforeLeave:b=>{b.style.maxHeight=`${b.offsetHeight}px`},onLeave:b=>{b.style.maxHeight="0px"}});return $(m.value?null:s(ie,U,{default:()=>[se(s("div",N(N({role:"alert"},a),{},{style:[a.style,V.value],class:[a.class,k],"data-show":!d.value,ref:f}),[y?q:null,s("div",{class:`${t}-content`},[G?s("div",{class:`${t}-message`},[G]):null,x?s("div",{class:`${t}-description`},[x]):null]),R?s("div",{class:`${t}-action`},[R]):null,X]),[[re,!d.value]])]}))}}}),Oe=Y(Te);export{He as alertProps,Oe as default};
@@ -1 +1 @@
1
- import{l as q,m as J,h as N,r as Q,$ as P,t as tt,f as b,S as et,p as nt,q as ot,I as st}from"./index-DPzT5L14.js";import it from"./index-DHpwwlmv.js";import{B as rt}from"./index-DcSe5y5O.js";import{d as L,b as F,w as lt,c as C,F as D,f as O,s as y,r as at}from"./vendor-M5lGV-wr.js";import{R as ut}from"./icons-NT6gy8Ee.js";import"./initDefaultProps-BTloFqyf.js";import"./index-BTyhXFDW.js";import"./isVisible-C7tPsqfj.js";import"./useState-CSzR8F8O.js";import"./raf-Deuc0E8-.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./compact-item-CQZnkP5p.js";import"./createContext-B1McGnV-.js";import"./Compact-CirVV9Wq.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-DY5Oc3z6.js";import it from"./index-mzNWO8Yy.js";import{B as rt}from"./index-BWUG9yVI.js";import{d as L,b as F,w as lt,c as C,F as D,f as O,s as y,r as at}from"./vendor-M5lGV-wr.js";import{R as ut}from"./icons-NT6gy8Ee.js";import"./initDefaultProps-CacwmJft.js";import"./index-Dj8BNg-z.js";import"./isVisible-C7tPsqfj.js";import"./useState-CSzR8F8O.js";import"./raf-Deuc0E8-.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./compact-item-Bw5EEKw4.js";import"./createContext-xLJXI46O.js";import"./Compact-DnOD5uMF.js";import"./_getTag-BVc6NQ_K.js";const ct=r=>{const{componentCls:s}=r;return{[s]:N(N({},Q(r)),{display:"flex",justifyContent:"center",alignItems:"center",padding:r.paddingSM,backgroundColor:r.colorWhite,borderRadius:r.borderRadiusLG,border:`${r.lineWidth}px ${r.lineType} ${r.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${s}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:r.colorText,lineHeight:r.lineHeight,background:r.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${s}-expired , & > ${s}-scanned`]:{color:r.QRCodeTextColor}},"&-icon":{marginBlockEnd:r.marginXS,fontSize:r.controlHeight}}),[`${s}-borderless`]:{borderColor:"transparent"}}},ht=q("QRCode",r=>ct(J(r,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"}))),z=()=>({size:{type:Number,default:160},value:{type:String,required:!0},type:P("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:tt()}),ft=()=>N(N({},z()),{errorLevel:P("M"),icon:String,iconSize:{type:Number,default:40},status:P("active"),bordered:{type:Boolean,default:!0}});var p;(function(r){class s{static encodeText(t,n){const e=r.QrSegment.makeSegments(t);return s.encodeSegments(e,n)}static encodeBinary(t,n){const e=r.QrSegment.makeBytes(t);return s.encodeSegments([e],n)}static encodeSegments(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(s.MIN_VERSION<=e&&e<=o&&o<=s.MAX_VERSION)||i<-1||i>7)throw new RangeError("Invalid value");let a,g;for(a=e;;a++){const m=s.getNumDataCodewords(a,n)*8,M=l.getTotalBits(t,a);if(M<=m){g=M;break}if(a>=o)throw new RangeError("Data too long")}for(const m of[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH])c&&g<=s.getNumDataCodewords(a,m)*8&&(n=m);const f=[];for(const m of t){u(m.mode.modeBits,4,f),u(m.numChars,m.mode.numCharCountBits(a),f);for(const M of m.getData())f.push(M)}h(f.length==g);const R=s.getNumDataCodewords(a,n)*8;h(f.length<=R),u(0,Math.min(4,R-f.length),f),u(0,(8-f.length%8)%8,f),h(f.length%8==0);for(let m=236;f.length<R;m^=253)u(m,8,f);const w=[];for(;w.length*8<f.length;)w.push(0);return f.forEach((m,M)=>w[M>>>3]|=m<<7-(M&7)),new s(a,n,w,i)}constructor(t,n,e,o){if(this.version=t,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=[];for(let a=0;a<this.size;a++)i.push(!1);for(let a=0;a<this.size;a++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();const c=this.addEccAndInterleave(e);if(this.drawCodewords(c),o==-1){let a=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const f=this.getPenaltyScore();f<a&&(o=g,a=f),this.applyMask(g)}}h(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}getModule(t,n){return 0<=t&&t<this.size&&0<=n&&n<this.size&&this.modules[n][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),n=t.length;for(let e=0;e<n;e++)for(let o=0;o<n;o++)e==0&&o==0||e==0&&o==n-1||e==n-1&&o==0||this.drawAlignmentPattern(t[e],t[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.errorCorrectionLevel.formatBits<<3|t;let e=n;for(let i=0;i<10;i++)e=e<<1^(e>>>9)*1335;const o=(n<<10|e)^21522;h(o>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,d(o,i));this.setFunctionModule(8,7,d(o,6)),this.setFunctionModule(8,8,d(o,7)),this.setFunctionModule(7,8,d(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,d(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,d(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,d(o,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let e=0;e<12;e++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;h(n>>>18==0);for(let e=0;e<18;e++){const o=d(n,e),i=this.size-11+e%3,c=Math.floor(e/3);this.setFunctionModule(i,c,o),this.setFunctionModule(c,i,o)}}drawFinderPattern(t,n){for(let e=-4;e<=4;e++)for(let o=-4;o<=4;o++){const i=Math.max(Math.abs(o),Math.abs(e)),c=t+o,a=n+e;0<=c&&c<this.size&&0<=a&&a<this.size&&this.setFunctionModule(c,a,i!=2&&i!=4)}}drawAlignmentPattern(t,n){for(let e=-2;e<=2;e++)for(let o=-2;o<=2;o++)this.setFunctionModule(t+o,n+e,Math.max(Math.abs(o),Math.abs(e))!=1)}setFunctionModule(t,n,e){this.modules[n][t]=e,this.isFunction[n][t]=!0}addEccAndInterleave(t){const n=this.version,e=this.errorCorrectionLevel;if(t.length!=s.getNumDataCodewords(n,e))throw new RangeError("Invalid argument");const o=s.NUM_ERROR_CORRECTION_BLOCKS[e.ordinal][n],i=s.ECC_CODEWORDS_PER_BLOCK[e.ordinal][n],c=Math.floor(s.getNumRawDataModules(n)/8),a=o-c%o,g=Math.floor(c/o),f=[],R=s.reedSolomonComputeDivisor(i);for(let m=0,M=0;m<o;m++){const v=t.slice(M,M+g-i+(m<a?0:1));M+=v.length;const A=s.reedSolomonComputeRemainder(v,R);m<a&&v.push(0),f.push(v.concat(A))}const w=[];for(let m=0;m<f[0].length;m++)f.forEach((M,v)=>{(m!=g-i||v>=a)&&w.push(M[m])});return h(w.length==c),w}drawCodewords(t){if(t.length!=Math.floor(s.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let e=this.size-1;e>=1;e-=2){e==6&&(e=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){const c=e-i,g=(e+1&2)==0?this.size-1-o:o;!this.isFunction[g][c]&&n<t.length*8&&(this.modules[g][c]=d(t[n>>>3],7-(n&7)),n++)}}h(n==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let e=0;e<this.size;e++){let o;switch(t){case 0:o=(e+n)%2==0;break;case 1:o=n%2==0;break;case 2:o=e%3==0;break;case 3:o=(e+n)%3==0;break;case 4:o=(Math.floor(e/3)+Math.floor(n/2))%2==0;break;case 5:o=e*n%2+e*n%3==0;break;case 6:o=(e*n%2+e*n%3)%2==0;break;case 7:o=((e+n)%2+e*n%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[n][e]&&o&&(this.modules[n][e]=!this.modules[n][e])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let f=0;f<this.size;f++)this.modules[i][f]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[i][f],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let f=0;f<this.size;f++)this.modules[f][i]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[f][i],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size-1;i++)for(let c=0;c<this.size-1;c++){const a=this.modules[i][c];a==this.modules[i][c+1]&&a==this.modules[i+1][c]&&a==this.modules[i+1][c+1]&&(t+=s.PENALTY_N2)}let n=0;for(const i of this.modules)n=i.reduce((c,a)=>c+(a?1:0),n);const e=this.size*this.size,o=Math.ceil(Math.abs(n*20-e*10)/e)-1;return h(0<=o&&o<=9),t+=o*s.PENALTY_N4,h(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{const t=Math.floor(this.version/7)+2,n=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,e=[6];for(let o=this.size-7;e.length<t;o-=n)e.splice(1,0,o);return e}}static getNumRawDataModules(t){if(t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*t+128)*t+64;if(t>=2){const e=Math.floor(t/7)+2;n-=(25*e-10)*e-55,t>=7&&(n-=36)}return h(208<=n&&n<=29648),n}static getNumDataCodewords(t,n){return Math.floor(s.getNumRawDataModules(t)/8)-s.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*s.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");const n=[];for(let o=0;o<t-1;o++)n.push(0);n.push(1);let e=1;for(let o=0;o<t;o++){for(let i=0;i<n.length;i++)n[i]=s.reedSolomonMultiply(n[i],e),i+1<n.length&&(n[i]^=n[i+1]);e=s.reedSolomonMultiply(e,2)}return n}static reedSolomonComputeRemainder(t,n){const e=n.map(o=>0);for(const o of t){const i=o^e.shift();e.push(0),n.forEach((c,a)=>e[a]^=s.reedSolomonMultiply(c,i))}return e}static reedSolomonMultiply(t,n){if(t>>>8||n>>>8)throw new RangeError("Byte out of range");let e=0;for(let o=7;o>=0;o--)e=e<<1^(e>>>7)*285,e^=(n>>>o&1)*t;return h(e>>>8==0),e}finderPenaltyCountPatterns(t){const n=t[1];h(n<=this.size*3);const e=n>0&&t[2]==n&&t[3]==n*3&&t[4]==n&&t[5]==n;return(e&&t[0]>=n*4&&t[6]>=n?1:0)+(e&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,e){return t&&(this.finderPenaltyAddHistory(n,e),n=0),n+=this.size,this.finderPenaltyAddHistory(n,e),this.finderPenaltyCountPatterns(e)}finderPenaltyAddHistory(t,n){n[0]==0&&(t+=this.size),n.pop(),n.unshift(t)}}s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],r.QrCode=s;function u(E,t,n){if(t<0||t>31||E>>>t)throw new RangeError("Value out of range");for(let e=t-1;e>=0;e--)n.push(E>>>e&1)}function d(E,t){return(E>>>t&1)!=0}function h(E){if(!E)throw new Error("Assertion error")}class l{static makeBytes(t){const n=[];for(const e of t)u(e,8,n);return new l(l.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!l.isNumeric(t))throw new RangeError("String contains non-numeric characters");const n=[];for(let e=0;e<t.length;){const o=Math.min(t.length-e,3);u(parseInt(t.substring(e,e+o),10),o*3+1,n),e+=o}return new l(l.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!l.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");const n=[];let e;for(e=0;e+2<=t.length;e+=2){let o=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e))*45;o+=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e+1)),u(o,11,n)}return e<t.length&&u(l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e)),6,n),new l(l.Mode.ALPHANUMERIC,t.length,n)}static makeSegments(t){return t==""?[]:l.isNumeric(t)?[l.makeNumeric(t)]:l.isAlphanumeric(t)?[l.makeAlphanumeric(t)]:[l.makeBytes(l.toUtf8ByteArray(t))]}static makeEci(t){const n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)u(t,8,n);else if(t<16384)u(2,2,n),u(t,14,n);else if(t<1e6)u(6,3,n),u(t,21,n);else throw new RangeError("ECI assignment value out of range");return new l(l.Mode.ECI,0,n)}static isNumeric(t){return l.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return l.ALPHANUMERIC_REGEX.test(t)}constructor(t,n,e){if(this.mode=t,this.numChars=n,this.bitData=e,n<0)throw new RangeError("Invalid argument");this.bitData=e.slice()}getData(){return this.bitData.slice()}static getTotalBits(t,n){let e=0;for(const o of t){const i=o.mode.numCharCountBits(n);if(o.numChars>=1<<i)return 1/0;e+=4+i+o.bitData.length}return e}static toUtf8ByteArray(t){t=encodeURI(t);const n=[];for(let e=0;e<t.length;e++)t.charAt(e)!="%"?n.push(t.charCodeAt(e)):(n.push(parseInt(t.substring(e+1,e+3),16)),e+=2);return n}}l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",r.QrSegment=l})(p||(p={}));(function(r){(function(s){class u{constructor(h,l){this.ordinal=h,this.formatBits=l}}u.LOW=new u(0,1),u.MEDIUM=new u(1,0),u.QUARTILE=new u(2,3),u.HIGH=new u(3,2),s.Ecc=u})(r.QrCode||(r.QrCode={}))})(p||(p={}));(function(r){(function(s){class u{constructor(h,l){this.modeBits=h,this.numBitsCharCount=l}numCharCountBits(h){return this.numBitsCharCount[Math.floor((h+7)/17)]}}u.NUMERIC=new u(1,[10,12,14]),u.ALPHANUMERIC=new u(2,[9,11,13]),u.BYTE=new u(4,[8,16,16]),u.KANJI=new u(8,[8,10,12]),u.ECI=new u(7,[0,0,0]),s.Mode=u})(r.QrSegment||(r.QrSegment={}))})(p||(p={}));const U={L:p.QrCode.Ecc.LOW,M:p.QrCode.Ecc.MEDIUM,Q:p.QrCode.Ecc.QUARTILE,H:p.QrCode.Ecc.HIGH},S=128,$="L",k="#FFFFFF",H="#000000",G=!1,dt=4,gt=0,mt=.1;function Y(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const u=[];return r.forEach(function(d,h){let l=null;d.forEach(function(E,t){if(!E&&l!==null){u.push(`M${l+s} ${h+s}h${t-l}v1H${l+s}z`),l=null;return}if(t===d.length-1){if(!E)return;l===null?u.push(`M${t+s},${h+s} h1v1H${t+s}z`):u.push(`M${l+s},${h+s} h${t+1-l}v1H${l+s}z`);return}E&&l===null&&(l=t)})}),u.join("")}function V(r,s){return r.slice().map((u,d)=>d<s.y||d>=s.y+s.h?u:u.map((h,l)=>l<s.x||l>=s.x+s.w?h:!1))}function X(r,s,u,d){if(d==null)return null;const h=r.length+u*2,l=Math.floor(s*mt),E=h/s,t=(d.width||l)*E,n=(d.height||l)*E,e=d.x==null?r.length/2-t/2:d.x*E,o=d.y==null?r.length/2-n/2:d.y*E;let i=null;if(d.excavate){const c=Math.floor(e),a=Math.floor(o),g=Math.ceil(t+e-c),f=Math.ceil(n+o-a);i={x:c,y:a,w:g,h:f}}return{x:e,y:o,h:n,w:t,excavation:i}}function _(r,s){return s!=null?Math.floor(s):r?dt:gt}const Et=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Mt=L({name:"QRCodeCanvas",inheritAttrs:!1,props:N(N({},z()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(r,s){let{attrs:u,expose:d}=s;const h=O(()=>{var n;return(n=r.imageSettings)===null||n===void 0?void 0:n.src}),l=y(null),E=y(null),t=y(!1);return d({toDataURL:(n,e)=>{var o;return(o=l.value)===null||o===void 0?void 0:o.toDataURL(n,e)}}),F(()=>{const{value:n,size:e=S,level:o=$,bgColor:i=k,fgColor:c=H,includeMargin:a=G,marginSize:g,imageSettings:f}=r;if(l.value!=null){const R=l.value,w=R.getContext("2d");if(!w)return;let m=p.QrCode.encodeText(n,U[o]).getModules();const M=_(a,g),v=m.length+M*2,A=X(m,e,M,f),I=E.value,x=t.value&&A!=null&&I!==null&&I.complete&&I.naturalHeight!==0&&I.naturalWidth!==0;x&&A.excavation!=null&&(m=V(m,A.excavation));const B=window.devicePixelRatio||1;R.height=R.width=e*B;const T=e/v*B;w.scale(T,T),w.fillStyle=i,w.fillRect(0,0,v,v),w.fillStyle=c,Et?w.fill(new Path2D(Y(m,M))):m.forEach(function(W,j){W.forEach(function(K,Z){K&&w.fillRect(Z+M,j+M,1,1)})}),x&&w.drawImage(I,A.x+M,A.y+M,A.w,A.h)}},{flush:"post"}),lt(h,()=>{t.value=!1}),()=>{var n;const e=(n=r.size)!==null&&n!==void 0?n:S,o={height:`${e}px`,width:`${e}px`};let i=null;return h.value!=null&&(i=C("img",{src:h.value,key:h.value,style:{display:"none"},onLoad:()=>{t.value=!0},ref:E},null)),C(D,null,[C("canvas",b(b({},u),{},{style:[o,u.style],ref:l}),null),i])}}}),wt=L({name:"QRCodeSVG",inheritAttrs:!1,props:N(N({},z()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(r){let s=null,u=null,d=null,h=null,l=null,E=null;return F(()=>{const{value:t,size:n=S,level:e=$,includeMargin:o=G,marginSize:i,imageSettings:c}=r;s=p.QrCode.encodeText(t,U[e]).getModules(),u=_(o,i),d=s.length+u*2,h=X(s,n,u,c),c!=null&&h!=null&&(h.excavation!=null&&(s=V(s,h.excavation)),E=C("image",{"xlink:href":c.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"},null)),l=Y(s,u)}),()=>{const t=r.bgColor&&k,n=r.fgColor&&H;return C("svg",{height:r.size,width:r.size,viewBox:`0 0 ${d} ${d}`},[!!r.title&&C("title",null,[r.title]),C("path",{fill:t,d:`M0,0 h${d}v${d}H0z`,"shape-rendering":"crispEdges"},null),C("path",{fill:n,d:l,"shape-rendering":"crispEdges"},null),E])}}}),Ct=L({name:"AQrcode",inheritAttrs:!1,props:ft(),emits:["refresh"],setup(r,s){let{emit:u,attrs:d,expose:h}=s;const[l]=nt("QRCode"),{prefixCls:E}=ot("qrcode",r),[t,n]=ht(E),[,e]=st(),o=at();h({toDataURL:(c,a)=>{var g;return(g=o.value)===null||g===void 0?void 0:g.toDataURL(c,a)}});const i=O(()=>{const{value:c,icon:a="",size:g=160,iconSize:f=40,color:R=e.value.colorText,bgColor:w="transparent",errorLevel:m="M"}=r,M={src:a,x:void 0,y:void 0,height:f,width:f,excavate:!0};return{value:c,size:g-(e.value.paddingSM+e.value.lineWidth)*2,level:m,bgColor:w,fgColor:R,imageSettings:a?M:void 0}});return()=>{const c=E.value;return t(C("div",b(b({},d),{},{style:[d.style,{width:`${r.size}px`,height:`${r.size}px`,backgroundColor:i.value.bgColor}],class:[n.value,c,{[`${c}-borderless`]:!r.bordered}]}),[r.status!=="active"&&C("div",{class:`${c}-mask`},[r.status==="loading"&&C(it,null,null),r.status==="expired"&&C(D,null,[C("p",{class:`${c}-expired`},[l.value.expired]),C(rt,{type:"link",onClick:a=>u("refresh",a)},{default:()=>[l.value.refresh],icon:()=>C(ut,null,null)})]),r.status==="scanned"&&C("p",{class:`${c}-scanned`},[l.value.scanned])]),r.type==="canvas"?C(Mt,b({ref:o},i.value),null):C(wt,i.value,null)]))}}}),Dt=et(Ct);export{Dt as default};
@@ -1 +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-DPzT5L14.js";import{b as U}from"./icons-NT6gy8Ee.js";import{W as q}from"./index-BTyhXFDW.js";import{g as V,i as G,a as J}from"./colors-CjkIkB0e.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-DY5Oc3z6.js";import{b as U}from"./icons-NT6gy8Ee.js";import{W as q}from"./index-Dj8BNg-z.js";import{g as V,i as G,a as J}from"./colors-B126JcB4.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};