@fudanda/admin-antd 1.20261015.1-beta.1 → 2.20261024.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +58 -42
  3. package/THIRD_PARTY_NOTICES.md +55 -55
  4. package/dist/automation.js +3 -3
  5. package/dist/chunks/App-DNjXLysb.js +79 -0
  6. package/dist/chunks/{AppModal-B_xvSaeq.js → AppModal-DJzQA6FR.js} +1 -1
  7. package/dist/chunks/ArcBaseAdmin-BZrHGq2f.js +1 -0
  8. package/dist/chunks/ConfigurableTable-DzmZDd8F.js +55 -0
  9. package/dist/chunks/{DashboardPage-BTLufKzi.js → DashboardPage-BohGodSl.js} +1 -1
  10. package/dist/chunks/DataScopePanel-B2-x8Jcz.js +1 -0
  11. package/dist/chunks/{DateTimeText-rk9NeYgA.js → DateTimeText-CIt0Qy45.js} +1 -1
  12. package/dist/chunks/DepartmentsPage-DMWY__Y_.js +1 -0
  13. package/dist/chunks/DictTag-2-adKbYg.js +1 -0
  14. package/dist/chunks/DictsPage-DILDyHi-.js +15 -0
  15. package/dist/chunks/EditFormModal-DNHOZHxM.js +1 -0
  16. package/dist/chunks/EntityContextRuntime-DMklAv-k.js +1 -0
  17. package/dist/chunks/{EntityContextRuntime-BrAz-aCV.js → EntityContextRuntime-sslBZqYD.js} +1 -1
  18. package/dist/chunks/{EntityRelationButton-C8Cl8wyh.js → EntityRelationButton-DWn1rC2J.js} +2 -2
  19. package/dist/chunks/{ExportButton-D4IvZKHy.js → ExportButton-AzH4D0oW.js} +1 -1
  20. package/dist/chunks/FileNameCell-DPyi64Rv.js +1 -0
  21. package/dist/chunks/FileStorageConfigsPage-CzuOgeK0.js +15 -0
  22. package/dist/chunks/FileTypeIcon-DIih3XQG.js +1 -0
  23. package/dist/chunks/{FileViewerPreviewPanel-wbXzgqxc.js → FileViewerPreviewPanel-CMqVtGCr.js} +2 -2
  24. package/dist/chunks/FilesPage-BaEBCOCs.js +43 -0
  25. package/dist/chunks/IdentitySecurityPage-BO7nY8id.js +1 -0
  26. package/dist/chunks/{JsonPreviewPanel-D8YpZD1A.js → JsonPreviewPanel-Dhbza-Uu.js} +1 -1
  27. package/dist/chunks/LogStatsScaffold-CLycj3da.js +1 -0
  28. package/dist/chunks/LoginLogsPage-DTmHi8u0.js +1 -0
  29. package/dist/chunks/LoginLogsTable-DVmHnC6V.js +1 -0
  30. package/dist/chunks/{MasterDetailLayout-DDVFodpX.js → MasterDetailLayout-sjPWw8BI.js} +2 -2
  31. package/dist/chunks/{MemberAssignmentSheet-NWm5vThg.js → MemberAssignmentSheet-Czbt6_zv.js} +1 -1
  32. package/dist/chunks/MenuCommandPalette-BCOzf-Kq.js +8 -0
  33. package/dist/chunks/MenusPage-DN8DTGB1.js +1 -0
  34. package/dist/chunks/{ModalFooter-vXDpmYTM.js → ModalFooter-RMlvqrO9.js} +1 -1
  35. package/dist/chunks/NavListPanel-vjIOIqK0.js +1 -0
  36. package/dist/chunks/OnlineSessionsPage-FoHYZKlR.js +1 -0
  37. package/dist/chunks/OperationLogsPage-BeRnGcBJ.js +1 -0
  38. package/dist/chunks/OperationLogsTable-COI-Lp-y.js +1 -0
  39. package/dist/chunks/PDFPreviewPanel-BIQuBnZZ.js +37 -0
  40. package/dist/chunks/PasswordInput-DGEJO9yx.js +1 -0
  41. package/dist/chunks/PositionsPage-DohI0luX.js +1 -0
  42. package/dist/chunks/PreferencesSheetBody-B9niQABW.js +43 -0
  43. package/dist/chunks/ProfilePage-CVTRv7xb.js +15 -0
  44. package/dist/chunks/RelationPanel-B1X6AVaM.js +36 -0
  45. package/dist/chunks/RolesPage-CtUw93L8.js +1 -0
  46. package/dist/chunks/{SearchToolbar-BAh56OAa.js → SearchToolbar-CvgYKUjr.js} +1 -1
  47. package/dist/chunks/{SessionClientTag-DafwXf-o.js → SessionClientTag-DIwnYodW.js} +2 -2
  48. package/dist/chunks/SessionConflictModal-BLNuDsN_.js +1 -0
  49. package/dist/chunks/SettingRow-DVNmTJWC.js +1 -0
  50. package/dist/chunks/SettingsPage-BRnCxYQm.js +26 -0
  51. package/dist/chunks/StatCard-Czjfs0fa.js +4 -0
  52. package/dist/chunks/{UserDisplay-BYhcfa84.js → UserDisplay-J0Re8z-7.js} +1 -1
  53. package/dist/chunks/UserGroupsPage-CNwbejx-.js +1 -0
  54. package/dist/chunks/{UserLogsPanels-3ZlKQsCu.js → UserLogsPanels-BHeSxWrk.js} +2 -2
  55. package/dist/chunks/UserTransferSelect-CAeyxdor.js +22 -0
  56. package/dist/chunks/UsersPage-BXt9fOru.js +36 -0
  57. package/dist/chunks/{archive-D0BSMQmn.js → archive-B_IKvysI.js} +4 -4
  58. package/dist/chunks/chart-data-DImT_Mzn.js +5 -0
  59. package/dist/chunks/{chart-renderer-BWLqOvLF.js → chart-renderer-k-Rd8vdL.js} +1 -1
  60. package/dist/chunks/{user-cC0uCe3d.js → chevron-right-EBApfX6q.js} +2 -2
  61. package/dist/chunks/{clipboard-BKPNFY58.js → clipboard-ERcMSMRH.js} +1 -1
  62. package/dist/chunks/{confirm-CC2F8XXe.js → confirm-BtBBEqk8.js} +1 -1
  63. package/dist/chunks/{data-DPCozzrG.js → data-B05HzECj.js} +1 -1
  64. package/dist/chunks/{deleteAction-NGTDhZud.js → deleteAction-CCocr5uV.js} +1 -1
  65. package/dist/chunks/{diagram-vBbcsoK2.js → diagram-D9cwc7QH.js} +3 -3
  66. package/dist/chunks/dist-Bauqz5on.js +1 -0
  67. package/dist/chunks/{drawing-CUAfa3D5.js → drawing-D2Qrun-P.js} +2 -2
  68. package/dist/chunks/{email-U025DuXM.js → email-ByshRsFv.js} +2 -2
  69. package/dist/chunks/{export-CCaKk9VN.js → export-DlTz5dc2.js} +5 -5
  70. package/dist/chunks/{eye-DNBTmA6c.js → eye-off-BtJoIT5n.js} +1 -8
  71. package/dist/chunks/feedback-BnjMKZpz.js +1 -0
  72. package/dist/chunks/file-utils-DyvnVEoH.js +1 -0
  73. package/dist/chunks/fit-CsnhEncA.js +1 -0
  74. package/dist/chunks/{form-DhQiOMvp.js → form-CQutQFiD.js} +1 -1
  75. package/dist/chunks/geo-DR0fL7r2.js +38 -0
  76. package/dist/chunks/{image-C52XMTxg.js → image-ez9hvzKT.js} +1 -1
  77. package/dist/chunks/{lib-DZsU27Fn.js → lib-BlRm3nk1.js} +4 -4
  78. package/dist/chunks/line-BV7qVRkM.js +1 -0
  79. package/dist/chunks/{msg-DNXH9mKo.js → msg-BzZbudMm.js} +1 -1
  80. package/dist/chunks/{ofd-B0_-rey2.js → ofd-C7DKqJ6Z.js} +1 -1
  81. package/dist/chunks/{openDocument-DW7w0HpR.js → openDocument-DGzqlyJg.js} +1 -1
  82. package/dist/chunks/parse-6ZQGx714.js +1 -0
  83. package/dist/chunks/{parser-BFNqF7wU.js → parser-DC3PvpL4.js} +1 -1
  84. package/dist/chunks/ppt-B0WY5Gks.js +30 -0
  85. package/dist/chunks/pptx-DX5KDFZ7.js +109 -0
  86. package/dist/chunks/{print-mask-DTiml6Ox.js → print-mask-Dguzv0rv.js} +2 -2
  87. package/dist/chunks/{psd-yU36O76Y.js → psd-hjeNFQZ-.js} +1 -1
  88. package/dist/chunks/{search-filters-BoRMIesR.js → search-filters-CRIhZ0gL.js} +1 -1
  89. package/dist/chunks/spreadsheet-BzbBEhmY.js +1 -0
  90. package/dist/chunks/{spreadsheet-DiZ31XlH.js → spreadsheet-LR3SOG-x.js} +3 -3
  91. package/dist/chunks/toolbar-controls-CThS0xuP.js +15 -0
  92. package/dist/chunks/ui-BFsHoY7a.js +1 -0
  93. package/dist/chunks/{useCrudOperationColumn-PObQMk2y.js → useCrudOperationColumn-D935tixd.js} +1 -1
  94. package/dist/chunks/useListPage-CbcOQG4m.js +1 -0
  95. package/dist/chunks/{useStatusToggle-B7KSIN75.js → useStatusToggle-B2qZaoc-.js} +1 -1
  96. package/dist/chunks/wordDoc-BZY3ZnxN.js +152 -0
  97. package/dist/chunks/wordDocx-Bt2mlB3C.js +77 -0
  98. package/dist/chunks/{xmind-B9BtGBNI.js → xmind-CF9YwkOD.js} +2 -2
  99. package/dist/file-viewer/flyfish-viewer-assets.json +5 -5
  100. package/dist/file-viewer/vendor/docx/jszip.min.js +0 -0
  101. package/dist/file-viewer/wasm/data/sql-wasm.wasm +0 -0
  102. package/dist/index.js +1 -1
  103. package/dist/{src-DVwjbBTf.js → src-LbWcrSWe.js} +1 -1
  104. package/dist/styles.css +1 -1
  105. package/package.json +7 -7
  106. package/dist/chunks/App-DX7JOOmP.js +0 -79
  107. package/dist/chunks/ArcBaseAdmin-CdB_roNY.js +0 -1
  108. package/dist/chunks/ConfigurableTable-CyfZLgG0.js +0 -55
  109. package/dist/chunks/DataScopePanel-CubtBhTT.js +0 -1
  110. package/dist/chunks/DepartmentsPage-ECexbzsK.js +0 -1
  111. package/dist/chunks/DictTag-BerYvaUM.js +0 -1
  112. package/dist/chunks/DictsPage-65kAxYFd.js +0 -15
  113. package/dist/chunks/DirectoryLoginModal-rRXvoqV7.js +0 -1
  114. package/dist/chunks/EditFormModal-D68dOnaj.js +0 -1
  115. package/dist/chunks/EntityContextRuntime-D9mWi5xC.js +0 -1
  116. package/dist/chunks/FileNameCell-C_V1k0q-.js +0 -1
  117. package/dist/chunks/FilePreviewModal-D7v5seXB.js +0 -1
  118. package/dist/chunks/FileStorageConfigsPage-D2UYESb5.js +0 -15
  119. package/dist/chunks/FileTypeIcon-C77EVWXZ.js +0 -1
  120. package/dist/chunks/FilesPage-By81A2i7.js +0 -43
  121. package/dist/chunks/ForgotPasswordModal-DTlunJpM.js +0 -1
  122. package/dist/chunks/IdentitySecurityPage-Dp5EP7aT.js +0 -1
  123. package/dist/chunks/LogStatsScaffold-BFwbN_MU.js +0 -1
  124. package/dist/chunks/LoginField-Bu4C0-Mk.js +0 -1
  125. package/dist/chunks/LoginLogsPage-BuMJ6U8I.js +0 -1
  126. package/dist/chunks/LoginLogsTable-DfAlWPZb.js +0 -1
  127. package/dist/chunks/MenuCommandPalette-BvW2kEU4.js +0 -8
  128. package/dist/chunks/MenusPage-DT3kxAfi.js +0 -1
  129. package/dist/chunks/NavListPanel-agMt2kc6.js +0 -1
  130. package/dist/chunks/OnlineSessionsPage-BJJAB2pV.js +0 -1
  131. package/dist/chunks/OperationLogsPage-CP-wUt_N.js +0 -1
  132. package/dist/chunks/OperationLogsTable-BX0vV3fT.js +0 -1
  133. package/dist/chunks/PDFPreviewPanel-D8-74Zqs.js +0 -30
  134. package/dist/chunks/PasswordInput--G8GKd5g.js +0 -1
  135. package/dist/chunks/PositionsPage-Cs7xq89s.js +0 -1
  136. package/dist/chunks/PreferencesSheetBody-CdA4Ig_g.js +0 -43
  137. package/dist/chunks/ProfilePage-Bt3yP6D-.js +0 -15
  138. package/dist/chunks/RelationPanel-B-KAfl9B.js +0 -36
  139. package/dist/chunks/RolesPage-DDNGkGAq.js +0 -1
  140. package/dist/chunks/SessionConflictModal-DgFNCU3j.js +0 -1
  141. package/dist/chunks/SettingRow-BIb1ruW2.js +0 -1
  142. package/dist/chunks/SettingsPage-rhqkPOJ9.js +0 -16
  143. package/dist/chunks/StatCard-BwhGDWpE.js +0 -4
  144. package/dist/chunks/UserGroupsPage-D3_aji58.js +0 -1
  145. package/dist/chunks/UserTransferSelect-S-GUw2Y9.js +0 -1
  146. package/dist/chunks/UsersPage-CLRJX-V9.js +0 -29
  147. package/dist/chunks/WorkflowPrintButton-BVa-xw-8.js +0 -1
  148. package/dist/chunks/chart-data-DOMSCLwj.js +0 -5
  149. package/dist/chunks/chevron-left-DnDEG_PI.js +0 -8
  150. package/dist/chunks/chevron-right-CzizTV5i.js +0 -8
  151. package/dist/chunks/dist-BqNhxPp5.js +0 -1
  152. package/dist/chunks/feedback-D4BIfDNd.js +0 -1
  153. package/dist/chunks/file-utils-DJ9ksj-g.js +0 -1
  154. package/dist/chunks/geo-Bf8ymo43.js +0 -38
  155. package/dist/chunks/line-DSFA8EqT.js +0 -1
  156. package/dist/chunks/mail-Cduf1OFr.js +0 -8
  157. package/dist/chunks/mono-icons-CxCoktev.js +0 -1
  158. package/dist/chunks/plus-Bvdn6bx1.js +0 -8
  159. package/dist/chunks/ppt-C9RgrmNU.js +0 -30
  160. package/dist/chunks/pptx-_T8ZPVQn.js +0 -109
  161. package/dist/chunks/printer-DL8WQci4.js +0 -8
  162. package/dist/chunks/shield-check-DZGK8n9u.js +0 -8
  163. package/dist/chunks/spreadsheet-CHFSQY8j.js +0 -1
  164. package/dist/chunks/table-columns-XaoxVUJN.js +0 -1
  165. package/dist/chunks/toolbar-controls-BFOuV86W.js +0 -8
  166. package/dist/chunks/ui-DoIHGuTR.js +0 -1
  167. package/dist/chunks/useDebouncedValue-DFoJN77o.js +0 -22
  168. package/dist/chunks/useListPage-1Upr_ala.js +0 -1
  169. package/dist/chunks/wordDoc-CtetBfzo.js +0 -152
  170. package/dist/chunks/wordDocx-8ak39HcF.js +0 -77
  171. package/dist/chunks/zoom-8Eo2fTNd.js +0 -1
  172. package/dist/public/monaco/vs/editor/editor.worker.js +0 -1
  173. package/dist/public/monaco/vs/language/css/css.worker.js +0 -66
  174. package/dist/public/monaco/vs/language/html/html.worker.js +0 -443
  175. package/dist/public/monaco/vs/language/json/json.worker.js +0 -17
  176. package/dist/public/monaco/vs/language/typescript/ts.worker.js +0 -67693
@@ -1 +0,0 @@
1
- import{n as e,r as t}from"./rolldown-runtime-BKuNeK48.js";import{n,t as r}from"./tabs-BobA_IcO.js";import{c as i,l as a}from"./ConfigurableTable-CyfZLgG0.js";import{a as o,i as s,n as c,o as l,r as u,t as d}from"./search-filters-BoRMIesR.js";import{w as f}from"./ui-DoIHGuTR.js";import{i as p,t as m}from"./table-columns-XaoxVUJN.js";import{An as h,Ar as g,Dr as _,Er as v,Gn as y,Hn as b,In as x,Jn as S,Kn as C,Mn as ee,Nn as w,Or as T,Rn as te,Tr as ne,Yn as re,_r as E,at as ie,b as ae,bn as oe,cn as se,cr as ce,ct as le,dn as D,dr as ue,er as de,fr as fe,g as pe,gn as me,gr as O,h as he,it as ge,jr as k,kr as A,ln as _e,lr as ve,nr as ye,pr as j,rr as be,tr as xe,un as Se,ur as Ce,ut as we,v as Te,vr as Ee,wr as De,x as Oe,xn as ke,yr as Ae,zn as je}from"./chart-data-DOMSCLwj.js";import{n as Me,t as Ne}from"./OperationLogsTable-BX0vV3fT.js";import{n as Pe,t as Fe}from"./ExportButton-D4IvZKHy.js";import{$ as Ie,$r as Le,A as Re,An as ze,Ar as Be,At as Ve,B as He,Bn as Ue,Br as We,C as Ge,Ci as Ke,Cn as qe,Cr as Je,Ct as Ye,D as Xe,Dr as Ze,Dt as Qe,E as $e,Et as et,F as tt,Fn as nt,Fr as rt,Ft as it,Gn as at,Gt as ot,H as st,Hn as ct,Hr as M,Ht as lt,I as ut,In as dt,It as ft,Jn as pt,Jr as mt,Kn as ht,Kr as gt,L as _t,Ln as vt,Lr as N,Lt as yt,Mn as bt,Mt as xt,Nn as St,Nt as Ct,Or as wt,Ot as Tt,P as Et,Pn as Dt,Pr as Ot,Pt as kt,Q as At,Qn as jt,Rn as Mt,Rr as Nt,S as P,Sn as Pt,Sr as F,St as Ft,T as It,Ti as Lt,Tn as Rt,Tr as zt,Tt as Bt,U as Vt,Un as Ht,Ur as Ut,Ut as Wt,V as Gt,Vn as Kt,Vr as qt,Wn as Jt,Wt as Yt,X as Xt,Xn as Zt,Yn as Qt,Yr as $t,Z as en,Zn as tn,Zr as nn,_ as rn,_r as I,_t as an,a as on,ar as sn,at as cn,b as ln,bi as un,bn as dn,bt as fn,cr as pn,ct as mn,d as hn,di as gn,dn as _n,dt as vn,ei as yn,er as bn,et as xn,f as Sn,fi as L,fr as Cn,ft as wn,g as Tn,gi as En,gt as Dn,h as On,ht as kn,i as An,ir as jn,it as Mn,j as Nn,jn as Pn,jt as Fn,kn as In,kr as Ln,kt as Rn,l as zn,lr as Bn,lt as Vn,m as R,n as Hn,ni as z,nt as Un,o as B,or as Wn,ot as Gn,p as Kn,pi as qn,qn as Jn,qr as Yn,r as Xn,ri as V,rr as Zn,rt as Qn,sr as $n,st as er,t as tr,ti as nr,tt as rr,u as ir,ui as ar,un as or,ur as sr,ut as cr,vi as lr,vr as ur,vt as dr,w as fr,wi as pr,wn as mr,wr as H,wt as hr,x as gr,xn as _r,xt as vr,yn as yr,yr as U,yt as br,zn as xr,zr as Sr}from"./StatCard-BwhGDWpE.js";import{$n as Cr,Cr as wr,Nn as Tr,R as Er,ar as Dr,ir as Or,ln as kr,nr as Ar,rr as jr,tr as Mr,un as Nr,z as Pr}from"./chart-renderer-BWLqOvLF.js";import{n as Fr,t as Ir}from"./line-DSFA8EqT.js";import{C as Lr,S as Rr,T as zr,_ as Br,a as Vr,b as Hr,c as Ur,d as Wr,f as Gr,g as Kr,h as qr,i as Jr,l as Yr,m as Xr,n as Zr,o as Qr,p as $r,s as ei,u as ti,v as ni,w as ri,x as ii,y as ai}from"./LogStatsScaffold-BFwbN_MU.js";import{useMemo as W,useState as oi}from"react";import{Fragment as si,jsx as G,jsxs as K}from"react/jsx-runtime";import{enumValueOf as ci}from"@fudanda/shared/core";import{useFilterQuery as li}from"@fudanda/react-core/hooks/useFilterQuery";import{useListSearch as ui}from"@fudanda/react-core/hooks/useListSearch";import{formatDateTimeRangeForApi as di,parseDateTimeParam as fi,shortDate as pi}from"@fudanda/react-core/utils/date";import{useListDeepLink as mi}from"@fudanda/react-core/hooks/useListDeepLink";import{OPERATION_LOG_RESULTS as hi,OPERATION_LOG_RESULT_OPTIONS as gi}from"@fudanda/shared/platform";import{useUrlTabState as _i}from"@fudanda/react-core/hooks/useUrlTabState";import{buildUserChartLabels as vi,formatUserLabel as yi}from"@fudanda/react-core/utils/user-labels";import{operationLogKeys as bi,useCleanOperationLogs as xi,useOperationLogList as Si,useOperationLogStats as Ci}from"@fudanda/react-core/hooks/queries/operation-logs";var wi,Ti,Ei,Di,Oi;function ki(){return(ki=e((()=>{pe(),wi=[10,20],Ti=he.Linear,Ei=`circle`,Di=he.Ordinal,Oi=[`circle`,`square`,`triangle`,`diamond`,`star`]})))()}var Ai,ji;function Mi(){return(Mi=e((()=>{V(),sr(),Ai=(e,t)=>t===`fadeIn`?{type:`fadeIn`}:{type:`scaleIn`},ji=()=>{z.registerAnimation(`scatter`,((e,t)=>Object.assign({appear:Ai(0,t)},Bn)))}})))()}var Ni;function Pi(){return(Pi=e((()=>{vt(),Ni=Object.assign(Object.assign({},dt),{point:{name:`point`,type:`symbol`}})})))()}var Fi;function Ii(){return(Ii=e((()=>{ze(),Fi=class extends In{_transformLabelSpec(e){this._addMarkLabelSpec(e,`point`)}}})))()}var Li;function Ri(){return(Ri=e((()=>{Li={point:{style:{size:8,symbolType:`circle`,lineWidth:0,fillOpacity:.8}},label:{visible:!1,offset:5,position:`top`,style:{lineWidth:2,stroke:{type:`palette`,key:`backgroundColor`}}}}})))()}var zi,q,Bi;function Vi(){return(Vi=e((()=>{nr(),qe(),T(),v(),De(),g(),Ee(),O(),fe(),Ce(),ie(),zt(),qn(),Je(),ki(),bt(),Mi(),or(),Pi(),V(),Ii(),Rt(),lt(),Yt(),Ri(),zi={sizeField:!0},q=class e extends Pt{constructor(){super(...arguments),this.type=L.scatter,this.transformerConstructor=Fi,this._invalidType=`zero`}_getSpecUpdatePolicy(){let e=super._getSpecUpdatePolicy();return Object.assign(Object.assign({},e),{dataRelatedKeys:Object.assign(Object.assign({},e.dataRelatedKeys),zi)})}setAttrFromSpec(){super.setAttrFromSpec(),this._size=this._spec.size,this._sizeField=this._spec.sizeField,this._shape=this._spec.shape,this._shapeField=this._spec.shapeField}_getSeriesAttribute(e,t,{defaultScaleType:n,defaultRange:r},i){var a,o,s,c;if(k(t))return t;if(E(t)){if(A(e))return(a=this._option)==null||a.onError(`${i}Field is required.`),t;if(n!==`ordinal`&&t.length>2)return(o=this._option)==null||o.onError(`${i} length is invalid, specify up to 2 ${i}s.`),t;let r=`${yn}_series_scatter_${this.id}_scale_${i}`;return this._option.globalScale.registerModelScale({id:r,type:n,domain:[{dataId:this._rawData.name,fields:[e]}],range:t}),{scale:r,field:e}}if(ne(t)){if(A(e))return(s=this._option)==null||s.onError(`${i}Field is required.`),t;let a=`${yn}_series_scatter_${this.id}_scale_${i}`,o=Object.assign({id:a,type:n,domain:[{dataId:this._rawData.name,fields:[e]}],range:r},t);return this._option.globalScale.registerModelScale(o),{scale:o.id,field:e}}return(c=this._option)==null||c.onError(`${i} attribute is invalid.`),t}getSizeAttribute(e,t){return A(t)?10:j(t)?t:Ae(t)&&ue(t)?parseFloat(t):this._getSeriesAttribute(e,t,{defaultScaleType:Ti,defaultRange:wi},`size`)}getShapeAttribute(e,t){return A(t)?Ei:Ae(t)?t:this._getSeriesAttribute(e,t,{defaultScaleType:Di,defaultRange:Oi},`shape`)}initMark(){this._symbolMark=this._createMark(e.mark.point,{groupKey:this._seriesField,isSeriesMark:!0},{morph:Dt(this._spec,e.mark.point.name),morphElementKey:this.getDimensionField()[0]})}initMarkStyle(){this.initSymbolMarkStyle()}initAnimation(){let e=mr(this),t=this._spec?.animationAppear?.preset;this._symbolMark.setAnimationConfig(Pn(z.getAnimationInKey(`scatter`)?.({},t),nt(`point`,this._spec,this._markAttributeContext),e))}initSymbolMarkStyle(){let e=this._symbolMark;e&&(this._invalidType!==`zero`&&this.setMarkStyle(e,{visible:this._getInvalidDefined.bind(this)}),this.setMarkStyle(e,{x:this.dataToPositionX.bind(this),y:this.dataToPositionY.bind(this),z:this._fieldZ?this.dataToPositionZ.bind(this):null,fill:this.getColorAttribute(),size:j(this._size)||k(this._size)?this._size:10,symbolType:Ae(this._shape)||k(this._shape)?this._shape:`circle`},F.STATE_NORMAL,H.Series),(_(this._sizeField)||_(this._size))&&this.setMarkStyle(e,{size:this.getSizeAttribute(this._sizeField,this._size)},F.STATE_NORMAL,H.User_Mark),(_(this._shapeField)||_(this._shape))&&this.setMarkStyle(e,{symbolType:this.getShapeAttribute(this._shapeField,this._shape)},F.STATE_NORMAL,H.User_Mark))}initTooltip(){super.initTooltip(),this._symbolMark&&this._tooltipHelper.activeTriggerSet.mark.add(this._symbolMark)}viewDataStatisticsUpdate(e){super.viewDataStatisticsUpdate(e);let t=[this.getDimensionField()[0],this.getStackValueField()].every((e=>e&&this.getViewDataStatistics()?.latestData?.[e]?.allValid));this._invalidType===`zero`||t?this.setMarkStyle(this._symbolMark,{visible:!0},`normal`,H.Series):this.setMarkStyle(this._symbolMark,{visible:this._getInvalidDefined.bind(this)},`normal`,H.Series),this._symbolMark.getProduct()&&this._symbolMark.compileEncode()}initLabelMarkStyle(e){e&&(this._labelMark=e,this.setMarkStyle(e,{fill:this.getColorAttribute(),text:e=>e[this.getStackValueField()],z:this._fieldZ?this.dataToPositionZ.bind(this):null},F.STATE_NORMAL,H.Series),this._invalidType!==`zero`&&this.setMarkStyle(e,{visible:this._getInvalidDefined.bind(this)},F.STATE_NORMAL,H.Series))}_updateSymbolGraphicPosition(){let e=this._symbolMark?.getGraphics();e&&e.length&&e.forEach((e=>{let t=e?.context?.data?.[0],n=this.dataToPosition(t);n&&e&&e.setAttributes({x:n.x,y:n.y})}))}_ensureLabelGraphicPostMatrix(){let e=(this._labelMark?.getComponent())?.getComponent();return e&&!e.attribute.postMatrix&&e.setAttributes({postMatrix:new ge}),e}handleZoom(e){let{scale:t,scaleCenter:n}=e;if(t===1)return;this._updateSymbolGraphicPosition();let r=this._ensureLabelGraphicPostMatrix();r&&r.scale(t,t,n)}handlePan(e){let{delta:t}=e;if(t?.[0]===0&&t?.[1]===0)return;this._updateSymbolGraphicPosition();let n=this._ensureLabelGraphicPostMatrix();n&&n.translate(t[0],t[1])}onLayoutEnd(){super.onLayoutEnd(),this._updateSymbolGraphicPosition();let e=(this._labelMark?.getComponent())?.getComponent();e!=null&&e.attribute.postMatrix&&e.setAttributes({postMatrix:new ge});let t=this._labelMark?.getComponent();t&&t.renderInner()}getDefaultShapeType(){return`circle`}getActiveMarks(){return[this._symbolMark]}},q.type=L.scatter,q.mark=Ni,q.builtInTheme={scatter:Li},q.transformerConstructor=Fi,Bi=()=>{_n(),ji(),ot(),Wt(),z.registerSeries(q.type,q)}})))()}var Hi;function Ui(){return(Ui=e((()=>{Ct(),Hi=class extends xt{_getDefaultSeriesSpec(e){return super._getDefaultSeriesSpec(e,[`point`,`size`,`shape`,`shapeField`,`sizeField`])}}})))()}var J,Wi;function Gi(){return(Gi=e((()=>{Vi(),qn(),V(),Ui(),yt(),Fn(),Tt(),et(),Bt(),Ft(),br(),an(),J=class extends ft{constructor(){super(...arguments),this.transformerConstructor=Hi,this.type=`scatter`,this.seriesType=L.scatter}_setModelOption(){this._modelOption.getDimensionInfo=Ye,this._modelOption.getDimensionInfoByValue=hr,this._modelOption.getRectByDimensionData=vr}},J.type=`scatter`,J.seriesType=L.scatter,J.transformerConstructor=Hi,b(J,Ve),Wi=()=>{fn(),dr(),Qe(),Rn(),Bi(),z.registerChart(J.type,J)}})))()}var Ki,qi;function Ji(){return(Ji=e((()=>{T(),Se(),Ki=(e,t,n=0,r=-1,i,a,o=`value`)=>{let s=0,c=r??-1,l=n;return e.forEach(((e,r)=>{let u={flattenIndex:++c,key:a?a(e):`${i?.key??``}-${r}`,maxDepth:-1,depth:n,index:r,value:e[o],isLeaf:!0,datum:i?i.datum.concat(e):[e],parentKey:i?.key};if(e.children?.length){u.children=[],u.isLeaf=!1;let t=Ki(e.children,u.children,n+1,c,u,a,o);u.value=A(e[o])?t.sum:Math.max(t.sum,D(e[o])),c=t.flattenIndex,l=Math.max(t.maxDepth,l)}else u.isLeaf=!0,u.value=D(e[o]);s+=Math.abs(u.value),t.push(u)})),{sum:s,maxDepth:l,flattenIndex:c}},qi=(e,t=[],n)=>{let r=n?.maxDepth>=0;return e.forEach((e=>{(!r||e.depth<=n.maxDepth)&&(t.push(n?.callback?n.callback(e):e),e.children&&(r&&e.depth===n.maxDepth?(e.children=null,e.isLeaf=!0):qi(e.children,t,n)))})),t}})))()}function Yi(e,t,n=[],r={},i){Qi(e);let a=(e,o,s)=>{e.forEach(((e,c)=>{let l=t?t(e):s?`${s[s.length-1].key}-${c}`:`${o}-${c}`,u=A(e.value)?0:D(e.value);if(r[l])r[l].value=void 0;else{let t={depth:o,datum:e,index:c,key:l,value:u,sourceLinks:[],targetLinks:[]};r[l]=t,n.push(t)}s&&i&&i.push({source:s[s.length-1].key,target:l,value:u,parents:s}),e.children&&e.children.length&&a(e.children,o+1,s?s.concat([r[l]]):[r[l]])}))};return a(e,0,null),n}function Xi(e,t){let n=[],r=[],i={},a={},o=[];return Yi(e,t,n,i,o),o.forEach(((e,t)=>{let n=`${e.source}-${e.target}`,o=C(e,[`parents`]);if(o.parents=e.parents.map((e=>C(e,[`sourceLinks`,`targetLinks`]))),a[n])return a[n].value+=D(e.value),void a[n].datum.push(o);let s={index:t,key:`${e.source}-${e.target}`,source:e.source,target:e.target,datum:[o],value:e.value,parents:e.parents.map((e=>e.key))};r.push(s),i[e.source].sourceLinks.push(s),i[e.target].targetLinks.push(s),a[n]=s})),{nodes:n,links:r,nodeMap:i}}function Zi(e){for(let t=0,n=e.length;t<n;t++){let n=e[t];n.value=Math.max(A(n.value)?0:D(n.value),n.sourceLinks.reduce(((e,t)=>e+(D(t.value)??0)),0),n.targetLinks.reduce(((e,t)=>e+(D(t.value)??0)),0))}}var Qi;function $i(){return($i=e((()=>{T(),y(),Se(),Qi=e=>{let t=0;return e.forEach(((e,n)=>{A(e.value)&&(e.value=e.children?.length?Qi(e.children):0),t+=Math.abs(e.value)})),t}})))()}function ea(e){return e.depth}function ta(e,t){return t-1-e.endDepth}function na(e,t){return e.sourceLinks.length?e.depth:t-1}function ra(e,t,n){return e.targetLinks.length?e.depth:e.sourceLinks.length?je(e.sourceLinks.map((e=>n[e.target].depth)))-1:0}var ia,aa,oa,sa,ca;function la(){return(la=e((()=>{ke(),_e(),g(),T(),fe(),Ee(),x(),ee(),$i(),ia=(e,t)=>e?.y0-t?.y0,aa=(e,t)=>{if(A(e.value))return null;let n=(t?e.targetLinks:e.sourceLinks).reduce(((e,t)=>(A(t.value)?e.count+=1:e.sum+=t.value,e)),{sum:0,count:0});return n.count>0?(e.value-n.sum)/n.count:null},oa={left:ea,right:ta,justify:na,center:ra,start:ea,end:ta},sa=me(0,1),ca=class e{constructor(t){this._ascendingSourceBreadth=(e,t)=>ia(this._nodeMap[e.source],this._nodeMap[t.source])||e.index-t.index,this._ascendingTargetBreadth=(e,t)=>ia(this._nodeMap[e.target],this._nodeMap[t.target])||e.index-t.index,this.options=Object.assign({},e.defaultOptions,t);let n=this.options.nodeKey,r=k(n)?n:n?se(n):null;this._getNodeKey=r,this._logger=h.getInstance(),this._alignFunc=k(this.options.setNodeLayer)?e=>this.options.setNodeLayer(e.datum):oa[this.options.nodeAlign]}layout(e,t){if(!e)return null;let n=`width`in t?{x0:0,x1:t.width,y0:0,y1:t.height,width:t.width,height:t.height}:{x0:Math.min(t.x0,t.x1),x1:Math.max(t.x0,t.x1),y0:Math.min(t.y0,t.y1),y1:Math.max(t.y0,t.y1),width:Math.abs(t.x1-t.x0),height:Math.abs(t.y1-t.y0)};this._viewBox=this.options.direction===`vertical`?{x0:n.y0,x1:n.y1,y0:n.x0,y1:n.x1,width:n.height,height:n.width}:n;let r=this.computeNodeLinks(e),i=r.nodes,a=r.links;if(this._nodeMap=r.nodeMap,this.computeNodeValues(i),this.computeNodeDepths(i),[`right`,`end`,`justify`].includes(this.options.nodeAlign)&&this.computeNodeEndDepths(i),this._maxDepth<=0)return null;let o=this.computeNodeBreadths(i);if(this.computeLinkBreadths(i),i.forEach((e=>{e.sourceLinks=e.sourceLinks.filter((e=>!A(e.source)&&!A(e.target))),e.targetLinks=e.targetLinks.filter((e=>!A(e.source)&&!A(e.target)))})),a=a.filter((e=>!A(e.source)&&!A(e.target))),this.options.direction===`vertical`){if(this.options.inverse){let e=this._viewBox.x1;i.forEach((t=>{let{y0:n,y1:r,x0:i,x1:a}=t;t.y0=e-a,t.y1=e-i,t.x0=n,t.x1=r})),a.forEach((t=>{t.vertical=!0;let{x0:n,x1:r,y0:i,y1:a}=t;t.x0=i,t.x1=a,t.y0=e-n,t.y1=e-r}))}else i.forEach((e=>{let{y0:t,y1:n}=e;e.y0=e.x0,e.y1=e.x1,e.x0=t,e.x1=n})),a.forEach((e=>{e.vertical=!0;let t=e.x0,n=e.x1;e.x0=e.y0,e.x1=e.y1,e.y0=t,e.y1=n}))}else this.options.inverse&&(i.forEach((e=>{let{x0:t,x1:r}=e;e.x0=n.x1-r,e.x1=n.x1-t})),a.forEach((e=>{e.x0=n.x1-e.x0,e.x1=n.x1-e.x1})));return a.forEach((e=>{let t=this._nodeMap[e.source],n=this._nodeMap[e.target];e.sourceRect={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1},e.targetRect={x0:n.x0,x1:n.x1,y1:n.y1,y0:n.y0}})),{nodes:i,links:a,columns:o}}computeHierarchicNodeLinks(e){return Xi(e,this._getNodeKey)}computeSourceTargetNodeLinks(e){let t=[],n=[],r={};e.nodes&&e.nodes.forEach(((e,n)=>{let i={depth:-1,datum:e,index:n,key:this._getNodeKey?this._getNodeKey(e):n,value:e.value,sourceLinks:[],targetLinks:[]};r[i.key]=i,t.push(i)}));let i=[];return e.links.forEach(((a,o)=>{let s=!A(a.source),c=!A(a.target);if(e.nodes&&(!r[a.source]||!r[a.target]))return;e.nodes||!s||r[a.source]||(r[a.source]={value:void 0,depth:-1,index:t.length,key:a.source,datum:null,sourceLinks:[],targetLinks:[]},t.push(r[a.source])),e.nodes||!c||r[a.target]||(r[a.target]={value:void 0,depth:-1,index:t.length,key:a.target,datum:null,sourceLinks:[],targetLinks:[]},t.push(r[a.target]));let l={index:o,source:a.source,target:a.target,datum:a,value:a.value};this.options.divideNodeValueToLink&&A(a.value)&&i.push(l),n.push(l),s&&r[a.source].sourceLinks.push(l),c&&r[a.target].targetLinks.push(l)})),this.options.divideNodeValueToLink&&i.length&&i.forEach((e=>{let t=[aa(r[e.source]),aa(r[e.target],!0)].filter((e=>!A(e)));t.length&&(e.value=je(t))})),{nodeMap:r,nodes:t,links:n}}computeNodeLinks(e){let t;`links`in e?t=this.computeSourceTargetNodeLinks(e):(this._isHierarchic=!0,t=this.computeHierarchicNodeLinks(e.nodes));let n=t.nodes,r=t.links;if(this.options.linkSortBy)for(let e=0,t=n.length;e<t;e++)n[e].sourceLinks.sort(this.options.linkSortBy),n[e].targetLinks.sort(this.options.linkSortBy);return this.options.dropIsolatedNode&&(n=n.filter((e=>e.targetLinks.length||e.sourceLinks.length))),{nodes:n,links:r,nodeMap:t.nodeMap}}computeNodeValues(e){return Zi(e)}computeNodeDepths(e){var t;let n=e.length,r,i,a=e,o=0,s=-1,c=k(this.options.setNodeLayer)?this.options.setNodeLayer:null;for(;a.length&&o<n;){r=[],i={};for(let e=0,n=a.length;e<n;e++){let n=a[e];if(n&&(n.depth=c&&(t=c(n.datum))!=null?t:o,c&&(s=Math.max(n.depth,s)),n.sourceLinks&&n.sourceLinks.length))for(let e=0,t=n.sourceLinks.length;e<t;e++){let t=n.sourceLinks[e];i[t.target]||(r.push(this._nodeMap[t.target]),i[t.target]=!0)}}a=r,o+=1}o>n&&this._logger.warn(`Error: there is a circular link`),this._maxDepth=c?s+1:o}computeNodeEndDepths(e){let t=e.length,n,r,i=e,a=0;for(;i.length&&a<t;){n=[],r={};for(let e=0,t=i.length;e<t;e++){let t=i[e];if(t){t.endDepth=a;for(let e=0,i=t.targetLinks.length;e<i;e++){let i=t.targetLinks[e];r[i.source]||(n.push(this._nodeMap[i.source]),r[i.source]=!0)}}}i=n,a+=1}a>t&&this._logger.warn(`Error: there is a circular link`)}computeNodeLayers(e){let t=this.options.nodeWidth,n=this.options.linkWidth,r=this.options.minStepWidth,i=this._viewBox.width,a=null,o=null,s=!1;if(Ae(t)){let e=oe(parseFloat(t.replace(`%`,``))/100,0,1),n=i/(this._maxDepth-1+e);r>0&&(n=Math.max(r,n)),a=n*e,o=n*(1-e),s=!0}else if(j(t)){if(a=t,j(n))o=n;else if(A(n)){let e=(i-t)/(this._maxDepth-1);r>0&&(e=Math.max(r,e)),o=e-t}s=!0}else k(t)&&j(n)&&(o=n);let c=[];for(let t=0,n=e.length;t<n;t++){let n=e[t];n.layer=this._isHierarchic?n.depth:oe(Math.floor(this._alignFunc(n,this._maxDepth,this._nodeMap)),0,this._maxDepth-1);let r=n.layer;r===this._maxDepth-1&&(n.isLastLayer=!0),s&&(n.x0=this._viewBox.x0+r*(a+o),n.x1=n.x0+a),c[r]?c[r].push(n):c[r]=[n]}if(this.options.nodeSortBy)for(let e=0,t=c.length;e<t;e++)c[e].sort(this.options.nodeSortBy);if(!s&&k(t)){let e=this._viewBox.x0;for(let r=0;r<this._maxDepth;r++){let i=c[r],s=0,l=0;for(let r=0,c=i&&i.length;r<c;r++){let c=i[r],u=t(c);c.x0=e,c.x1=e+u,s=Math.max(a,u);let d=c.sourceLinks;for(let e=0,t=d.length;e<t;e++){let t=d[e],r=k(n)?n(t,this._viewBox):o;l=Math.max(l,r)}}e+=s+l}}return c}initializeNodeBreadths(e){let t=this.options.minLinkHeight??0,n=this.options.minNodeHeight??0,r=this.options.maxNodeHeight??1/0,i=this.options.maxLinkHeight;(A(n)||n<t)&&(n=t),(A(i)||i>r)&&(i=r);let a=0,o=null,s=null;if(k(this.options.nodeGap))o=this.options.nodeGap,a=e.reduce(((e,t)=>{let n=t.reduce(((e,t)=>e+t.value),0),r=t.reduce(((e,t)=>e+this.options.nodeGap(t)),0);return Math.min(e,(this._viewBox.height-r)/n)}),1/0);else{let t=e.reduce(((e,t)=>Math.max(e,t.length)),0),r=this._viewBox.height/t,i=Math.min(this.options.nodeGap,r);if(n+i>r&&(i=n>=r?r/2:(r-n)/2,n=Math.min(r-i,n)),o=()=>i,this._gapY=i,this.options.equalNodeHeight)s=this._viewBox.height/t-i;else{let t=n>0?Math.max(i,n):i;a=e.reduce(((e,r)=>{let i=r.reduce(((e,t)=>e+t.value),0);return Math.min(e,(this._viewBox.height-((r.length-1)*t+n))/i)}),1/0)}}let c=this.options.gapPosition===`start`,l=!c&&this.options.gapPosition!==`end`,u=j(this.options.nodeHeight)?e=>this.options.nodeHeight:k(this.options.nodeHeight)?this.options.nodeHeight:s>0?e=>s:e=>Math.max(e.value*a,0),d=j(this.options.linkHeight)?()=>this.options.linkHeight:k(this.options.linkHeight)?this.options.linkHeight:(e,n,r)=>Math.min(Math.max(n.value?r*sa(e.value/n.value):0,t,0),i);for(let t=0,i=e.length;t<i;t++){let i=e[t];if(!i||!i.length)continue;let a=this._viewBox.y0,s=0,f=0,p=0;for(let t=0,l=i.length;t<l;t++){let l=i[t];s=o(l),c&&(a+=s),p=u(l,e),f=Math.min(Math.max(p,n),r),l.y0=a,l.y1=a+f,a=c?l.y1:l.y1+s;for(let e=0,t=l.sourceLinks.length;e<t;e++){let t=l.sourceLinks[e];t.thickness=d(t,l,p)}}let m=this._viewBox.y1-a+(l?s:0);if(m>0){if(this.options.crossNodeAlign!==`start`){if(this.options.crossNodeAlign===`end`)for(let e=0,t=i.length;e<t;++e){let t=i[e];t.y0+=m,t.y1+=m}else if(this.options.crossNodeAlign===`parent`){let n=i.reduce(((e,t)=>(t.targetLinks&&t.targetLinks.length&&t.targetLinks.forEach((t=>{e[t.source]=!0})),e)),{});if(Object.keys(n).length&&e[t-1]&&e[t-1].length){let r=e[t-1].filter((e=>n[e.key]));if(r&&r.length&&r[0].y0!==i[0].y0){let e=r[0].y0-i[0].y0;for(let t=0,n=i.length;t<n;++t){let n=i[t];n.y0+=e,n.y1+=e}}}}else{m/=i.length+1;for(let e=0,t=i.length;e<t;++e){let t=i[e];t.y0+=m*(e+1),t.y1+=m*(e+1)}}}}else if(m<0&&i.length>1&&(m/=i.length-1,s+m>=0)){s+=m,this._gapY=Math.min(s);for(let e=1,t=i.length;e<t;++e){let t=i[e];t.y0+=m*e,t.y1+=m*e}}this.reorderLinks(i)}}computeNodeBreadths(e){let t=this.computeNodeLayers(e);this.initializeNodeBreadths(t);let n=this.options.iterations;if(!this._isHierarchic&&!k(this.options.setNodeLayer)&&!k(this.options.nodeGap))for(let e=0;e<n;++e){let r=.99**e,i=Math.max(1-r,(e+1)/n);this.relaxRightToLeft(t,r,i),this.relaxLeftToRight(t,r,i)}return t}relaxLeftToRight(e,t,n){for(let r=1,i=e.length;r<i;++r){let i=e[r];for(let e=0,n=i.length;e<n;e++){let n=i[e],r=0,a=0;for(let e=0,t=n.targetLinks.length;e<t;e++){let t=n.targetLinks[e],i=t.value*(n.layer-this._nodeMap[t.source].layer);r+=this.targetTop(this._nodeMap[t.source],n)*i,a+=i}if(!(a>0))continue;let o=(r/a-n.y0)*t;n.y0+=o,n.y1+=o,this.reorderNodeLinks(n)}A(this.options.nodeSortBy)&&i.sort(ia),this.resolveCollisions(i,n)}}relaxRightToLeft(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e=0,n=i.length;e<n;e++){let n=i[e],r=0,a=0;for(let e=0,t=n.sourceLinks.length;e<t;e++){let t=n.sourceLinks[e],i=t.value*(this._nodeMap[t.target].layer-n.layer);r+=this.sourceTop(n,this._nodeMap[t.target])*i,a+=i}if(!(a>0))continue;let o=(r/a-n.y0)*t;n.y0+=o,n.y1+=o,this.reorderNodeLinks(n)}this.options.nodeSortBy===void 0&&i.sort(ia),this.resolveCollisions(i,n)}}resolveCollisions(e,t){let n=e.length>>1,r=e[n];this.resolveCollisionsBottomToTop(e,r.y0-this._gapY,n-1,t),this.resolveCollisionsTopToBottom(e,r.y1+this._gapY,n+1,t),this.resolveCollisionsBottomToTop(e,this._viewBox.y1,e.length-1,t),this.resolveCollisionsTopToBottom(e,this._viewBox.y0,0,t)}resolveCollisionsTopToBottom(e,t,n,r){for(;n<e.length;++n){let i=e[n],a=(t-i.y0)*r;a>1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+this._gapY}}resolveCollisionsBottomToTop(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-this._gapY}}targetTop(e,t){let n,r,i,a=e.y0-(e.sourceLinks.length-1)*this._gapY/2;for(n=0,r=e.sourceLinks.length;n<r&&(i=e.sourceLinks[n],i.target!==t.key);n++)a+=i.thickness+this._gapY;for(n=0,r=t.targetLinks.length;n<r&&(i=t.targetLinks[n],i.source!==e.key);n++)a-=i.thickness;return a}sourceTop(e,t){let n,r,i,a=t.y0-(t.targetLinks.length-1)*this._gapY/2;for(n=0,r=t.targetLinks.length;n<r&&(i=t.targetLinks[n],i.source!==e.key);n++)a+=i.thickness+this._gapY;for(n=0,r=e.sourceLinks.length;n<r&&(i=e.sourceLinks[n],i.target!==t.key);n++)a-=i.thickness;return a}computeLinkBreadthsNoOverlap(e){for(let t=0,n=e.length;t<n;t++){let n=e[t],r=n.y0,i=!1;for(let e=0,t=n.sourceLinks.length;e<t;e++){let t=n.sourceLinks[e];i||(t.y0=r+t.thickness/2),t.x0=n.x1,r+t.thickness>n.y1||i?(t.y0=n.y1-t.thickness/2,i=!0):r+=t.thickness}let a=n.y0;i=!1;for(let e=0,t=n.targetLinks.length;e<t;e++){let t=n.targetLinks[e];i||(t.y1=a+t.thickness/2),t.x1=n.x0,a+t.thickness>n.y1||i?(t.y1=n.y1-t.thickness/2,i=!0):a+=t.thickness}}}computeLinkBreadthsOverlap(e){let t=this.options.linkOverlap;for(let n=0,r=e.length;n<r;n++){let r=e[n],i=t===`start`?r.y0:t===`end`?r.y1:(r.y0+r.y1)/2,a=t===`start`?.5:t===`end`?-.5:0;for(let e=0,t=r.sourceLinks.length;e<t;e++){let t=r.sourceLinks[e];t.y0=i+a*t.thickness,t.x0=r.x1}for(let e=0,t=r.targetLinks.length;e<t;e++){let t=r.targetLinks[e];t.y1=i+a*t.thickness,t.x1=r.x0}}}computeLinkBreadths(e){this.options.linkOverlap?this.computeLinkBreadthsOverlap(e):this.computeLinkBreadthsNoOverlap(e)}reorderNodeLinks(e){if(A(this.options.linkSortBy)){let t=e.targetLinks,n=e.sourceLinks;for(let e=0,n=t.length;e<n;e++){let n=t[e];this._nodeMap[n.source].sourceLinks.sort(this._ascendingTargetBreadth)}for(let e=0,t=n.length;e<t;e++){let t=n[e];this._nodeMap[t.target].targetLinks.sort(this._ascendingSourceBreadth)}}}reorderLinks(e){if(A(this.options.linkSortBy))for(let t=0,n=e.length;t<n;t++){let n=e[t];n.sourceLinks.sort(this._ascendingTargetBreadth),n.targetLinks.sort(this._ascendingSourceBreadth)}}},ca.defaultOptions={iterations:6,nodeAlign:`justify`,direction:`horizontal`,nodeWidth:24,nodeGap:8,crossNodeAlign:`middle`,dropIsolatedNode:!0}})))()}function ua(e,t,n,r,i,a={x0:`x0`,x1:`x1`,y0:`y0`,y1:`y1`}){let o=e.children,s,c=-1,l=o.length,u=e.value&&(r-t)/e.value;for(;++c<l;)s=o[c],s[a.y0]=n,s[a.y1]=i,s[a.x0]=t,s[a.x1]=t+=s.value*u}function da(e,t,n,r,i){let a=e.children,o=a.length,s=0,c=Array(o+1);c[0]=0;for(let e=0;e<o;++e)s+=a[e].value,c[e+1]=s;let l=(e,t,n,r,i,o,s)=>{if(e>=t-1){let t=a[e];t.x0=r,t.y0=i,t.x1=o,t.y1=s;return}let u=c[e],d=n/2+u,f=e+1,p=t-1;for(;f<p;){let e=f+p>>>1;c[e]<d?f=e+1:p=e}d-c[f-1]<c[f]-d&&e+1<f&&--f;let m=c[f]-u,h=n-m;if(o-r>s-i){let a=n?(r*h+o*m)/n:o;l(e,f,m,r,i,a,s),l(f,t,h,a,i,o,s)}else{let a=n?(i*h+s*m)/n:s;l(e,f,m,r,i,o,a),l(f,t,h,r,a,o,s)}};l(0,o,e.value,t,n,r,i)}function fa(e,t,n,r,i){let a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;for(;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,n+=o.value*l,o.y1=n}function pa(e,t,n,r,i){(e.depth%2==1?fa:ua)(e,t,n,r,i)}function ma(){return(ma=e((()=>{})))()}function ha(e,t,n,r,i,a){let o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h,g,_,v,y,b,x,S=t.value;for(;u<f;){p=i-n,m=a-r;do h=s[d++].value;while(!h&&d<f);for(g=h,_=h,b=Math.max(m/p,p/m)/(S*e),x=h*h*b,y=Math.max(_/x,x/g);d<f;++d){if(l=s[d].value,h+=l,l<g&&(g=l),l>_&&(_=l),x=h*h*b,v=Math.max(_/x,x/g),v>y){h-=l;break}y=v}c=Object.assign({},t,{value:h,children:s.slice(u,d)}),o.push(c),p<m?ua(c,n,r,i,S?r+=m*h/S:a):fa(c,n,r,S?n+=p*h/S:i,a),S-=h,u=d}return o}var ga;function _a(){return(_a=e((()=>{ga=e=>(t,n,r,i,a)=>{ha(e,t,n,r,i,a)}})))()}var va,ya;function ba(){return(ba=e((()=>{ma(),_a(),Ji(),_e(),O(),g(),fe(),va={binary:da,dice:ua,slice:fa,sliceDice:pa},ya=class e{constructor(t){this._filterByArea=(e,t)=>{let n=this._getMinAreaByDepth(e.depth);if(n>0&&e.value*t<n)return!1;if(e.children?.length){let n=e.children.filter((e=>this._filterByArea(e,t)));n.length?n.length!==e.children.length&&(e.children=n):(e.isLeaf=!0,e.children=null)}return!0},this._getMinAreaByDepth=e=>e<0?0:(E(this.options.minVisibleArea)?this.options.minVisibleArea[e]:this.options.minVisibleArea)??0,this._getGapWidthByDepth=e=>e<0?0:(E(this.options.gapWidth)?this.options.gapWidth[e]:this.options.gapWidth)??0,this._getPaddingByDepth=e=>e<0?0:(E(this.options.padding)?this.options.padding[e]:this.options.padding)??0,this._getLabelPaddingByDepth=e=>e<0?0:(E(this.options.labelPadding)?this.options.labelPadding[e]:this.options.labelPadding)??0,this._layoutNode=e=>{let t=this._getGapWidthByDepth(e.depth),n=e.x0,r=e.y0,i=e.x1,a=e.y1;if(e.maxDepth=this._maxDepth,t>0&&(n+=t/2,i-=t/2,r+=t/2,a-=t/2,n>i&&(n=(n+i)/2,i=n),r>a&&(r=(r+a)/2,a=r),e.x0=n,e.x1=i,e.y0=r,e.y1=a),e.children){let t=this._getLabelPaddingByDepth(e.depth),o=this._getPaddingByDepth(e.depth);o>0&&o<Math.min(i-n,a-r)/2&&(r+=o,a-=o,n+=o,i-=o),t>0&&(this.options.labelPosition===`top`&&r+t<a?(e.labelRect={x0:n,y0:r,x1:i,y1:r+t},r+=t):this.options.labelPosition===`bottom`&&a-t>r?(e.labelRect={x0:n,y0:a-t,x1:i,y1:a},a-=t):this.options.labelPosition===`left`&&n+t<i?(e.labelRect={x0:n,y0:r,x1:n+t,y1:a},n+=t):this.options.labelPosition===`right`&&i-t>n&&(e.labelRect={x0:i-t,y0:r,x1:i,y1:a},i-=t));let s=this._getGapWidthByDepth(e.depth+1);s>0&&(n-=s/2,i+=s/2,r-=s/2,a+=s/2),this._splitNode(e,n,r,i,a)}},this.options=Object.assign({},e.defaultOpionts,t);let n=this.options.nodeKey,r=k(n)?n:n?se(n):null;this._getNodeKey=r,this._splitNode=this.options.splitType===`squarify`?ga(this.options.aspectRatio):va[this.options.splitType]??va.binary,this._maxDepth=-1}layout(e,t){if(!e||!e.length)return[];let n=`width`in t?{x0:0,x1:t.width,y0:0,y1:t.height,width:t.width,height:t.height}:{x0:Math.min(t.x0,t.x1),x1:Math.max(t.x0,t.x1),y0:Math.min(t.y0,t.y1),y1:Math.max(t.y0,t.y1),width:Math.abs(t.x1-t.x0),height:Math.abs(t.y1-t.y0)},r=[],i=Ki(e,r,0,-1,null,this._getNodeKey,this.options.valueField);if(this._maxDepth=i.maxDepth,i.sum<=0)return[];let a={flattenIndex:-1,maxDepth:-1,key:`-1`,depth:-1,index:-1,value:i.sum,datum:null,x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1,children:r},o=n.width*n.height/i.sum;return this._filterByArea(a,o),this._layout(a),a.children??[]}_filterChildren(e){let t=this.options.maxDepth;if(j(t)&&t>=0&&e.depth>=t)return!1;let n=this.options.minChildrenVisibleArea;if(j(n)&&Math.abs((e.x1-e.x0)*(e.y1-e.y0))<n)return!1;let r=this.options.minChildrenVisibleSize;return!j(r)||!(Math.abs(e.x1-e.x0)<r||Math.abs(e.y1-e.y0)<r)}_layout(e){var t;this._filterChildren(e)||(e.children=null,e.isLeaf=!0),this._layoutNode(e),(t=e.children)!=null&&t.length&&e.children.forEach((e=>{e?.children?.length?this._layout(e):this._layoutNode(e)}))}},ya.defaultOpionts={aspectRatio:(1+Math.sqrt(5))/2,gapWidth:0,labelPadding:0,labelPosition:`top`,splitType:`binary`,minVisibleArea:10}})))()}var xa;function Sa(){return(Sa=e((()=>{Ji(),xa=(e,t={})=>{if(!e)return[];let n=[];return qi(e,n,t),n}})))()}var Y,Ca;function wa(){return(wa=e((()=>{$t(),x(),T(),(function(e){e.DrillDown=`drillDown`,e.DrillUp=`drillUp`})(Y||={}),Ca=(e,t)=>{let n=t.info(),r=t.keyField(),i=n?.key;if(A(i))return e;if(n.type===Y.DrillDown){let t=gt(e,i,r,`children`);return w(t)}if(n.type===Y.DrillUp){let t=Yn(e,i,r,`children`);if(t)return w(t)}return e}})))()}var Ta;function Ea(){return(Ea=e((()=>{O(),ye(),T(),wa(),Mn(),$t(),qt(),Lt(),Ta=class{_getDrillTriggerEvent(e){let{mode:t}=this._drillParams;return Qn(t)?.[e]}_hideTooltip(){let e=this.getChart().getComponentsByType(pr.tooltip)[0];e&&e.hideTooltip()}initDrillable(e){this._drillParams=e}initDrillableData(e){let{getRawData:t}=this._drillParams;N(e,`drillFilter`,Ca),t().transform({type:`drillFilter`,options:{info:()=>this._drillInfo,keyField:()=>this._drillParams.drillField()}})}bindDrillEvent(){let{event:e,getRawData:t,drillField:n}=this._drillParams,r=n();this._getDrillTriggerEvent(`start`)&&e.on(this._getDrillTriggerEvent(`start`),(e=>{if(A(e.datum)||A(e.datum?.[r]))return void this.drillUp();this._hideTooltip();let n=e.datum[r],i=this._drillInfo?.path??[],a=mt(t().rawData,n,r,`children`);i[i.length-1]===a[a.length-1]?this.drillUp():this.drillDown(a)}))}drillDown(e=[]){let{getRawData:t,event:n}=this._drillParams;if(!E(e)||be(e))return e;let r=e[e.length-1];return this._drillInfo={key:r,path:e,type:Y.DrillDown},t().reRunAllTransform(),n.emit(Nt.drill,{value:{path:e,type:Y.DrillDown},model:this}),e}drillUp(){let{getRawData:e,event:t}=this._drillParams,n=this._drillInfo?.path??[];if(!E(n)||be(n))return n;let r=n.pop();return this._drillInfo={key:r,path:n,type:Y.DrillUp},e().reRunAllTransform(),t.emit(Nt.drill,{value:{path:n,type:Y.DrillUp},model:this}),n}}})))()}var Da;function Oa(){return(Oa=e((()=>{at(),Da=(e,t,n)=>(e.push({key:t,operations:[`values`]}),e.push({key:n,operations:[`max`,`min`]}),e.push({key:Ht,operations:[`max`,`min`,`values`]}),e.push({key:Jt,operations:[`values`]}),e)})))()}var ka,Aa,ja,Ma;function Na(){return(Na=e((()=>{la(),O(),g(),T(),ka=(e,t,n)=>{t.forEach((t=>{A(t[n])||e.add(t[n]),t.children&&t.children.length>0&&ka(e,t.children,n)}))},Aa=e=>{if(!e||!E(e))return[];if(e.length>1){let t={links:[],nodes:[]};return e.forEach((e=>{e.id!==`links`&&e.id!==`nodes`||(t[e.id]=e.values)})),[t]}return e[0]?.latestData?e[0].latestData:e},ja=(e,t)=>{let n=k(t)?t():t;if(!e||!n?.view||!e.length)return[];let r=n.view();if(r.x1-r.x0==0||r.y1-r.y0==0||r.x1-r.x0==-1/0||r.x1-r.x0==1/0||r.y1-r.y0==-1/0||r.y1-r.y0==1/0)return[];let i=e[0],a=Ma(i,n),o=new ca(n),s=[];return s.push(o.layout(a,r)),s},Ma=(e,t)=>{if(t.sourceField===`source`&&t.targetField===`target`&&t.valueField===`value`)return e;let n=e.links;return n?Object.assign(Object.assign({},e),{links:n.map((e=>{let n={};return Object.keys(e).forEach((r=>{r===t.sourceField?n.source=e[t.sourceField]:r===t.targetField?n.target=e[t.targetField]:r===t.valueField?n.value=e[t.valueField]:n[r]=e[r]})),n}))}):e}})))()}var Pa;function Fa(){return(Fa=e((()=>{O(),Pa=e=>{var t;return e&&E(e)&&e[0]?.latestData&&e[0].latestData.length&&e[0].latestData[0]&&(t=e[0].latestData[0].nodes)!=null?t:[]}})))()}var Ia;function La(){return(La=e((()=>{O(),Ia=e=>{var t;return e&&E(e)&&e[0]?.latestData&&e[0].latestData.length&&e[0].latestData[0]&&(t=e[0].latestData[0].links)!=null?t:[]}})))()}var Ra;function za(){return(za=e((()=>{Qt(),T(),fe(),Ra=class extends pt{constructor(){super(...arguments),this._getDimensionData=e=>{if(!A(e?.source)&&!A(e?.target)){if(j(e.source)){let t=this.series.getSeriesKeys();return t[e.source]+` => `+t[e.target]}return e.source+` => `+e.target}return e.datum?e.datum[this.series.getSpec().categoryField]:e.key},this.markTooltipValueCallback=e=>e.value}}})))()}var Ba,Va,Ha,Ua,Wa,Ga,Ka,qa;function Ja(){return(Ja=e((()=>{V(),sr(),Mr(),jr(),Ba=(e,t=!0)=>({type:e.direction===`horizontal`?`growWidthIn`:`growHeightIn`,options:{overall:t&&e.growFrom(),orient:`positive`}}),Va=(e,t)=>t===`fadeIn`?{type:`fadeIn`}:Ba(e),Ha=e=>e===`fadeIn`?{type:`fadeIn`}:{type:`linkPathGrowIn`},Ua=(e,t,n)=>{let r={x0:e.getFinalAttribute().x0,x1:e.getFinalAttribute().x1,y0:e.getFinalAttribute().y0,y1:e.getFinalAttribute().y1,thickness:e.getFinalAttribute().thickness};return{from:Object.assign({},r,{x1:r.x0,y1:r.y0}),to:r}},Wa=(e,t,n)=>{let r={x0:e.getFinalAttribute().x0,x1:e.getFinalAttribute().x1,y0:e.getFinalAttribute().y0,y1:e.getFinalAttribute().y1,thickness:e.getFinalAttribute().thickness};return{from:r,to:Object.assign({},r,{x1:r.x0,y1:r.y0})}},Ga=class extends Cr{onBind(){var e;super.onBind(),(e=this.params)!=null&&e.diffAttrs&&this.target.setAttributes(this.params.diffAttrs);let{from:t,to:n}=Ua(this.target,this.params.options,this.params),r=this.target.context?.lastAttrs??t,i=this.target.getFinalAttribute();i&&Object.assign(this.target.attribute,i),this.props=n,this.propKeys=Object.keys(n).filter((e=>n[e]!=null)),this.animate.reSyncProps(),this.from=r,this.to=n,this.target.setAttributes(r)}onUpdate(e,t,n){let r=this.target.attribute;this.propKeys.forEach((e=>{r[e]=this.from[e]+(this.to[e]-this.from[e])*t})),this.target.setAttributes(r)}},Ka=class extends Cr{onBind(){var e;super.onBind(),(e=this.params)!=null&&e.diffAttrs&&this.target.setAttributes(this.params.diffAttrs);let{from:t,to:n}=Wa(this.target,this.params.options,this.params),r=this.target.context?.lastAttrs??t;this.props=n,this.propKeys=Object.keys(n).filter((e=>n[e]!=null)),this.animate.reSyncProps(),this.from=r,this.to=n,this.target.setAttributes(r)}onUpdate(e,t,n){let r=this.target.attribute;this.propKeys.forEach((e=>{r[e]=this.from[e]+(this.to[e]-this.from[e])*t})),this.target.setAttributes(r)}},qa=()=>{z.registerAnimation(`sankeyNode`,((e,t)=>Object.assign({appear:Va(e,t)},pn))),z.registerAnimation(`sankeyLinkPath`,((e,t)=>({appear:Ha(t),enter:{type:`linkPathGrowIn`},exit:{type:`linkPathGrowOut`},disappear:{duration:$n.disappear.duration}}))),Ar.registerBuiltInAnimate(`linkPathGrowOut`,Ka),Ar.registerBuiltInAnimate(`linkPathGrowIn`,Ga)}})))()}var Ya,Xa,Za,Qa,$a;function eo(){return(eo=e((()=>{V(),Ie(),Ke(),Je(),Ya={[F.STATE_SANKEY_EMPHASIS]:[`ratio`]},Xa=(e,t)=>{let n=e.curvature??.5,r=typeof t==`number`?e.thickness*t:e.thickness,i=e.x0,a=e.x1,o=e.y0,s=e.y1,c=i+n*(a-i),l=a+n*(i-a),u=e=>e;!1!==e.round&&(i=Math.round(i),a=Math.round(a),o=Math.round(o),s=Math.round(s),c=Math.round(c),l=Math.round(l),u=Math.round),e.pathType===`line`||e.pathType,e.align===`center`?(o=u(e.y0-r/2),s=u(e.y1-r/2)):e.align===`end`?(o=u(e.y0+e.thickness/2-r),s=u(e.y1+e.thickness/2-r)):(o=u(e.y0-e.thickness/2),s=u(e.y1-e.thickness/2));let d=u(o+r),f=u(s+r),p=Math.abs(a-i)>1e-6,m=e.endArrow&&p?`L${a},${u(s-r/2)}L${u(a+r)},${u((s+f)/2)}L${a},${u(f+r/2)}`:``,h=e.startArrow&&p?`L${i},${u(d+r/2)}L${u(i-r)},${u((o+d)/2)}L${i},${u(o-r/2)}`:``;return e.pathType===`line`?`M${i},${o}L${a},${s}${m}L${a},${f}L${i},${d}${h}Z`:e.pathType===`polyline`?`M${i},${o}L${c},${o}L${c},${s}L${a},${s}\n ${m}L${a},${f}L${c},${f}L${c},${d}L${i},${d}${h}Z`:`M${i},${o}C${c},${o},${l},${s},${a},${s}\n ${m}L${a},${f}C${l},${f},${c},${d},${i},${d}${h}Z`},Za=(e,t)=>{let n=e.curvature??.5,r=typeof t==`number`?e.thickness*t:e.thickness,i=e.y0,a=e.y1,o=e.x0,s=e.x1,c=i+n*(a-i),l=a+n*(i-a),u=e=>e;!1!==e.round&&(u=Math.round,i=Math.round(i),a=Math.round(a),o=Math.round(o),s=Math.round(s),c=Math.round(c),l=Math.round(l)),e.pathType===`line`||e.pathType,e.align===`center`?(o=u(e.x0-r/2),s=u(e.x1-r/2)):e.align===`end`?(o=u(e.x0+e.thickness/2-r),s=u(e.x1+e.thickness/2-r)):(o=u(e.x0-e.thickness/2),s=u(e.x1-e.thickness/2));let d=u(o+r),f=u(s+r),p=Math.abs(a-i)>1e-6,m=e.endArrow&&p?`L${u(s-r/2)},${a}L${u((s+f)/2)},${u(a+r)}L${u(f+r/2)},${a}`:``,h=e.startArrow&&p?`L${u(d+r/2)},${i}L${u((d+o)/2)},${u(i-r)}L${u(o-r/2)},${i}`:``;return e.pathType===`line`?`M${o},${i}L${s},${a}${m}L${f},${a}L${d},${i}${h}Z`:e.pathType===`polyline`?`M${o},${i}L${o},${c}L${s},${c}L${s},${a}\n ${m}L${f},${a}L${f},${c}L${d},${c}L${d},${i}${h}Z`:`M${o},${i}C${o},${c},${s},${l},${s},${a}\n ${m}L${f},${a}C${f},${l},${d},${c},${d},${i}${h}Z`},Qa=class e extends At{constructor(){super(...arguments),this.type=e.type,this._subMarks={back:{type:`path`,defaultAttributes:{zIndex:0}},front:{type:`path`,defaultAttributes:{zIndex:1}}},this._positionChannels=[`x0`,`y0`,`x1`,`y1`,`thickness`,`round`,`curvature`,`ratio`,`pathType`,`align`,`endArrow`,`startArrow`,`direction`],this._channelEncoder={backgroundStyle:e=>({back:e})},this._positionEncoder=(e,t,n)=>{let r=e,i=r.direction??this._glyphConfig?.direction,a=[`vertical`,`TB`,`BT`].includes(i)?Za:Xa,o=typeof r.ratio==`number`&&r.ratio>=0&&r.ratio<=1;return{back:{path:o?a(r,1):``},front:{path:a(r,o?r.ratio:1)}}}}_getRuntimeStateKeys(){return Ya}_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{x:0,y:0,x0:0,y0:0,x1:100,y1:100,thickness:1,round:!0})}},Qa.type=`linkPath`,$a=()=>{xn(),Tr(),z.registerGraphicComponent(`path`,(e=>wr(e))),z.registerMark(Qa.type,Qa)}})))()}var to;function no(){return(no=e((()=>{vt(),to=Object.assign(Object.assign({},dt),{node:{name:`node`,type:`rect`},link:{name:`link`,type:`linkPath`}})})))()}var ro;function io(){return(io=e((()=>{ze(),ro=class extends In{_transformLabelSpec(e){this._addMarkLabelSpec(e,`node`)}}})))()}var X;function ao(){return(ao=e((()=>{ur(),X=(e,t,n,r=!0,i)=>{e.runtimeStateCache||={},e.runtimeStateCache[t]=n,I(e,t,r,i)}})))()}var oo;function so(){return(so=e((()=>{oo={link:{style:{fillOpacity:.15,round:!0}}}})))()}var co,lo;function uo(){return(uo=e((()=>{qe(),qn(),bt(),sr(),Na(),Fa(),La(),Je(),Oe(),wt(),zt(),qt(),za(),x(),T(),v(),fe(),O(),we(),Ja(),gn(),er(),Xt(),eo(),no(),Sa(),V(),rt(),ct(),io(),bn(),Ut(),ao(),so(),ur(),co=class e extends Pt{constructor(){super(...arguments),this.type=L.sankey,this.transformerConstructor=ro,this._nodeLayoutZIndex=Ze.Node,this._labelLayoutZIndex=Ze.Label,this._viewBox=new le,this._fillByNode=e=>{if(e&&e.sourceRect&&e.targetRect)return this._fillByLink(e);let t=this._spec.node?.style?.fill;if(_(t))return t;if(_(this._spec.seriesField)){let t=(this._option?.globalScale)?.getScale(`color`),n=e?.datum?e.datum:e;return t?.scale(n?.[this._spec.seriesField])}return this._colorScale?.scale(this._getNodeNameFromData(e))},this._fillByLink=e=>{let t=this._spec.link?.style?.fill;if(t)return t;if(_(this._spec.seriesField)){let t=this._nodesSeriesData.latestData?.find((t=>e.source===t.key))?.datum;return((this._option?.globalScale)?.getScale(`color`))?.scale(t?.[this._spec.seriesField])}let n=j(e.source)?this.getNodeList()[e.source]:e.source;return this._colorScale?.scale(n)},this._handleEmphasisElement=e=>{let t=this._spec.emphasis??{},n=e.item;t.effect===`adjacency`?n&&e.mark===this._nodeMark?this._handleNodeAdjacencyClick(n):n&&e.mark===this._linkMark?this._handleLinkAdjacencyClick(n):this._handleClearEmpty():t.effect===`related`&&(n&&e.mark===this._nodeMark?this._handleNodeRelatedClick(n):n&&e.mark===this._linkMark?this._handleLinkRelatedClick(n):this._handleClearEmpty())},this._handleClearEmpty=()=>{if(!this._needClear)return;let e=this._nodeMark?.getGraphics();if(!e||!e.length)return;let t=this._linkMark?.getGraphics();t&&t.length&&(e.forEach((e=>{U(e,[F.STATE_SANKEY_EMPHASIS,F.STATE_SANKEY_EMPHASIS_REVERSE])})),t.forEach((e=>{U(e,[F.STATE_SANKEY_EMPHASIS,F.STATE_SANKEY_EMPHASIS_REVERSE])})),this._needClear=!1)},this._handleNodeAdjacencyClick=e=>{let t=M(e),n=[t.key];if(this._linkMark){let e=this._linkMark.getGraphics();if(!e||!e.length)return;e.forEach(((e,r)=>{let i=M(e);i.source===t.key?(n.includes(i.target)||n.push(i.target),U(e,F.STATE_SANKEY_EMPHASIS_REVERSE),I(e,F.STATE_SANKEY_EMPHASIS,!0,this._hasLinkStateAnimation())):i.target===t.key?(n.includes(i.source)||n.push(i.source),U(e,F.STATE_SANKEY_EMPHASIS_REVERSE),I(e,F.STATE_SANKEY_EMPHASIS,!0,this._hasLinkStateAnimation())):(U(e,F.STATE_SANKEY_EMPHASIS),I(e,F.STATE_SANKEY_EMPHASIS_REVERSE,!0,this._hasLinkStateAnimation()))}))}this._nodeMark&&this._highLightElements(this._nodeMark.getGraphics(),n),this._needClear=!0},this._handleLinkAdjacencyClick=e=>{let t=M(e),n=[t.source,t.target];if(this._linkMark){let t=this._linkMark.getGraphics();if(!t||!t.length)return;t.forEach((t=>{t===e?(U(t,F.STATE_SANKEY_EMPHASIS_REVERSE),X(t,F.STATE_SANKEY_EMPHASIS,{ratio:1},!0,this._hasLinkStateAnimation())):(U(t,F.STATE_SANKEY_EMPHASIS),I(t,F.STATE_SANKEY_EMPHASIS_REVERSE,!0,this._hasLinkStateAnimation()))}))}this._nodeMark&&this._highLightElements(this._nodeMark.getGraphics(),n),this._needClear=!0},this._handleNodeRelatedClick=e=>{let t=M(e),n=this._nodeMark.getGraphics();if(!n||!n.length)return;let r=this._linkMark.getGraphics();if(!r||!r.length)return;let i=M(r[0])?.parents?`parents`:`source`;if(i===`source`){let e=[t.key],i=[];if(r.forEach(((r,a)=>{let o=M(r),s=o?.parents?`parents`:`source`;if(w(o[s]).includes(t.key)){if(i.includes(o.key??o.index)||i.push(o.key??o.index),e.includes(o.source)||e.push(o.source),!e.includes(o.target)){e.push(o.target);let t=n.find((e=>e.data[0].key===o.target)).data[0].sourceLinks;for(;t?.length>0;){let r=[];t.forEach((t=>{if(!i.includes(t.key??t.index)&&(i.push(t.key??t.index),!e.includes(t.target))){e.push(t.target);let i=n.find((e=>e.data[0].key===t.target));r.push(i.data[0].targetLinks)}})),t=r;return}}}else if(o.target===t.key&&(i.includes(o.key??o.index)||i.push(o.key??o.index),!e.includes(o.source))){e.push(o.source);let t=n.find((e=>e.data[0].key===o.source)).data[0].targetLinks;for(;t?.length>0;){let r=[];t.forEach((t=>{if(!i.includes(t.key??t.index)&&(i.push(t.key??t.index),!e.includes(t.source))){e.push(t.source);let i=n.find((e=>e.data[0].key===t.source));r.push(i.data[0].targetLinks)}})),t=r;return}}})),this._linkMark){let e=this._linkMark.getGraphics();if(!e||!e.length)return;e.forEach(((e,t)=>{let n=M(e);i.includes(n.key??n.index)?(U(e,F.STATE_SANKEY_EMPHASIS_REVERSE),I(e,F.STATE_SANKEY_EMPHASIS,!0,this._hasLinkStateAnimation())):(U(e,F.STATE_SANKEY_EMPHASIS),I(e,F.STATE_SANKEY_EMPHASIS_REVERSE,!0,this._hasLinkStateAnimation()))}))}this._nodeMark&&this._highLightElements(this._nodeMark.getGraphics(),e)}else{let e=[t.key],n=t.targetLinks.reduce(((e,n)=>(w(n.datum).forEach((n=>{let r=n.parents,i=r.length;for(let a=0;a<i;a++){let i=r[a].key,o=r[a+1]?r[a+1].key:t.key,s=n.value,c=e.find((e=>e.source===i&&e.target===o));c?c.value+=s:e.push({source:i,target:o,value:s})}})),e)),[]);r.forEach(((r,a)=>{let o=M(r),s=o.datum,c=s?s.filter((e=>e[i].some((e=>e.key===t.key)))):null,l=n.find((e=>e.source===o.source&&e.target===o.target));if(c&&c.length){e.includes(o.source)||e.push(o.source),e.includes(o.target)||e.push(o.target);let t=c.reduce(((e,t)=>e+t.value),0)/o.value;U(r,F.STATE_SANKEY_EMPHASIS_REVERSE),X(r,F.STATE_SANKEY_EMPHASIS,{ratio:t},!0,this._hasLinkStateAnimation())}else{if(l)return e.includes(o.source)||e.push(o.source),e.includes(o.target)||e.push(o.target),U(r,F.STATE_SANKEY_EMPHASIS_REVERSE),void X(r,F.STATE_SANKEY_EMPHASIS,{ratio:l.value/o.value},!0,this._hasLinkStateAnimation());U(r,F.STATE_SANKEY_EMPHASIS),I(r,F.STATE_SANKEY_EMPHASIS_REVERSE,!0,this._hasLinkStateAnimation())}})),this._nodeMark&&this._highLightElements(this._nodeMark.getGraphics(),e)}this._needClear=!0},this._handleLinkRelatedClick=e=>{let t=this._nodeMark.getGraphics();if(!t||!t.length)return;let n=this._linkMark.getGraphics();if(n&&n.length){if((M(e)?`parents`:`source`)==`source`)this._linkMark&&n.forEach((e=>{U(e,[F.STATE_SANKEY_EMPHASIS,F.STATE_SANKEY_EMPHASIS_REVERSE])})),this._nodeMark&&t.forEach((e=>{U(e,[F.STATE_SANKEY_EMPHASIS,F.STATE_SANKEY_EMPHASIS_REVERSE])}));else{let r=M(e),i=[r.source,r.target],a=[];w(r.datum).forEach((e=>{let t=e.parents,n=t.length;for(let r=0;r<n-1;r++){let n=t[r].key,i=t[r+1].key,o=e.value,s=a.find((e=>e.source===n&&e.target===i));a.push({source:t[r].key,target:t[r+1].key,value:e.value}),s?s.value+=o:a.push({source:n,target:i,value:o})}})),n.forEach((e=>{let t=M(e),n=t.datum;if(t.source===r.source&&t.target===r.target)return U(e,F.STATE_SANKEY_EMPHASIS_REVERSE),void X(e,F.STATE_SANKEY_EMPHASIS,{ratio:1},!0,this._hasLinkStateAnimation());let o=n?n.filter((e=>{let t=e.parents.map((e=>e.key));return t.includes(r.source)&&t.includes(r.target)})):null;if(o&&o.length){i.includes(t.source)||i.push(t.source),i.includes(t.target)||i.push(t.target);let n=o.filter((e=>e.parents.some(((t,n)=>t.key===r.source&&e.parents[n+1]?.key===r.target)))).reduce(((e,t)=>e+t.value),0)/t.value;U(e,F.STATE_SANKEY_EMPHASIS_REVERSE),X(e,F.STATE_SANKEY_EMPHASIS,{ratio:n},!0,this._hasLinkStateAnimation());return}let s=a.find((e=>e.source===t.source&&e.target===t.target));if(s)return i.includes(t.source)||i.push(t.source),i.includes(t.target)||i.push(t.target),U(e,F.STATE_SANKEY_EMPHASIS_REVERSE),void X(e,F.STATE_SANKEY_EMPHASIS,{ratio:s.value/t.value},!0,this._hasLinkStateAnimation());U(e,F.STATE_SANKEY_EMPHASIS),I(e,F.STATE_SANKEY_EMPHASIS_REVERSE,!0,this._hasLinkStateAnimation())})),this._highLightElements(t,i)}this._needClear=!0}}}get direction(){return this._spec.direction??`horizontal`}_hasStateAnimation(e){return St(this)&&!!(e?.hasAnimationByState)?.call(e,`state`)}_hasLinkStateAnimation(){return this._hasStateAnimation(this._linkMark)}_hasNodeStateAnimation(){return this._hasStateAnimation(this._nodeMark)}getCategoryField(){return this._categoryField}setCategoryField(e){return this._categoryField=e,this._categoryField}getValueField(){return this._valueField}setValueField(e){return this._valueField=e,this._valueField}setAttrFromSpec(){super.setAttrFromSpec(),this.setCategoryField(this._spec.categoryField),this.setValueField(this._spec.valueField),this.setSeriesField(this._spec.seriesField??this._spec.categoryField)}initData(){super.initData();let e=this.getViewData(),t=this.getRawData();if(t&&e){N(this._dataSet,`sankeyLayout`,ja),N(this._dataSet,`sankeyFormat`,Aa),t.transform({type:`sankeyFormat`},!1),e.transform({type:`sankeyLayout`,options:()=>({view:()=>({x0:this._viewBox.x1,x1:this._viewBox.x2,y0:this._viewBox.y1,y1:this._viewBox.y2}),sourceField:this._spec.sourceField,targetField:this._spec.targetField,valueField:this._spec.valueField,direction:this.direction,crossNodeAlign:this._spec.crossNodeAlign,nodeAlign:this._spec.nodeAlign??`justify`,nodeGap:this._spec.nodeGap??8,nodeWidth:this._spec.nodeWidth??10,linkWidth:this._spec.linkWidth,minStepWidth:this._spec.minStepWidth,minNodeHeight:this._spec.minNodeHeight??4,maxNodeHeight:this._spec.maxNodeHeight,minLinkHeight:this._spec.minLinkHeight,maxLinkHeight:this._spec.maxLinkHeight,iterations:this._spec.iterations,nodeKey:this._spec.nodeKey,linkSortBy:this._spec.linkSortBy,nodeSortBy:this._spec.nodeSortBy,setNodeLayer:this._spec.setNodeLayer,dropIsolatedNode:this._spec.dropIsolatedNode,nodeHeight:this._spec.nodeHeight,linkHeight:this._spec.linkHeight,equalNodeHeight:this._spec.equalNodeHeight,linkOverlap:this._spec.linkOverlap,inverse:this._spec.inverse}),level:Ot.sankeyLayout});let{dataSet:n}=this._option;N(n,`sankeyNodes`,Pa),N(n,`flatten`,xa);let r=new ae(n,{name:`sankey-node-${this.id}-data`});r.parse([this.getViewData()],{type:`dataview`}),r.transform({type:`sankeyNodes`}),r.transform({type:`flatten`,options:{callback:e=>{if(e.datum){let t=e.datum[e.depth];return Object.assign(Object.assign({},e),t)}return e}}},!1),r.transform({type:`addVChartProperty`,options:{beforeCall:Kt.bind(this),call:Mt}},!1),this._nodesSeriesData=r,N(n,`sankeyLinks`,Ia);let i=new ae(n,{name:`sankey-link-${this.id}-data`});i.parse([this.getViewData()],{type:`dataview`}),i.transform({type:`sankeyLinks`}),i.transform({type:`addVChartProperty`,options:{beforeCall:Kt.bind(this),call:Mt}},!1),this._linksSeriesData=i}}compileData(){var e,t;super.compileData(),(e=this._linkMark)==null||e.compileData(),(t=this._nodeMark)==null||t.compileData()}initMark(){this._rootMark.setMarkConfig({overflow:this._spec.overflow,interactive:!!this._spec.overflow});let t=this._createMark(e.mark.node,{isSeriesMark:!0,dataView:this._nodesSeriesData});t&&(t.setMarkConfig({zIndex:this._nodeLayoutZIndex}),this._nodeMark=t);let n=this._createMark(e.mark.link,{dataView:this._linksSeriesData});n&&(this._linkMark=n)}_buildMarkAttributeContext(){super._buildMarkAttributeContext(),this._markAttributeContext.valueToNode=this.valueToNode.bind(this),this._markAttributeContext.valueToLink=this.valueToLink.bind(this)}valueToNode(e){let t=this._nodesSeriesData.latestData,n=w(e)[0];return t&&t.find((e=>e.key===n))}valueToLink(e){let t=this._linksSeriesData.latestData,n=w(e);return t&&t.find((e=>e&&e.source===n[0]&&e.target===n[1]))}valueToPositionX(e){return this.valueToNode(e)?.x0}valueToPositionY(e){return this.valueToNode(e)?.y0}initMarkStyle(){this._initNodeMarkStyle(),this._initLinkMarkStyle()}_initNodeMarkStyle(){let e=this._nodeMark;e&&(this.setMarkStyle(e,{x:e=>e.x0,x1:e=>e.x1,y:e=>e.y0,y1:e=>e.y1},F.STATE_NORMAL,H.Mark),this.setMarkStyle(e,{fill:this._spec.node.style?.fill??this._fillByNode},`normal`,H.User_Mark))}_initLinkMarkStyle(){let e=this._linkMark;e&&(e.setGlyphConfig({direction:this.direction}),this.setMarkStyle(e,{x0:e=>e.x0,x1:e=>e.x1,y0:e=>e.y0,y1:e=>e.y1,thickness:e=>e.thickness},F.STATE_NORMAL,H.Series),this.setMarkStyle(e,{fill:this._spec.link.style?.fill??this._fillByLink},`normal`,H.User_Mark))}initLabelMarkStyle(e,t){if(!e)return;let n=t.position;n&&n.includes(`inside`)?this.setMarkStyle(e,{fill:`#ffffff`,text:e=>this._createText(e,t),maxLineWidth:e=>t.limit??e.x1-e.x0}):this.setMarkStyle(e,{fill:this._fillByNode,text:e=>this._createText(e,t),maxLineWidth:t.limit}),e.setMarkConfig({zIndex:this._labelLayoutZIndex})}_createText(e,t){if(A(e)||A(e.datum))return``;let n=e.datum[this._spec.categoryField]||``,{formatMethod:r,formatter:i}=t||{},{formatFunc:a,args:o}=jt(r,i,n,e.datum);return a&&(n=a(...o,{series:this})),n}initAnimation(){let e={direction:this.direction,growFrom:()=>this.direction===`horizontal`?this._xAxisHelper?.getScale(0).scale(0):this._yAxisHelper?.getScale(0).scale(0)},t=this._spec?.animationAppear?.preset;this._nodeMark&&this._nodeMark.setAnimationConfig(Pn(z.getAnimationInKey(`sankeyNode`)?.(e,t),nt(`node`,this._spec,this._markAttributeContext))),this._linkMark&&this._linkMark.setAnimationConfig(Pn(z.getAnimationInKey(`sankeyLinkPath`)?.(e,t),nt(`link`,this._spec,this._markAttributeContext)))}initEvent(){var e,t;super.initEvent(),(e=this._nodesSeriesData)==null||e.target.addListener(`change`,this.nodesSeriesDataUpdate.bind(this)),(t=this._linksSeriesData)==null||t.target.addListener(`change`,this.linksSeriesDataUpdate.bind(this));let n=this._spec.emphasis??{};if(!0!==this._option.disableTriggerEvent&&n.enable&&(n.effect===`adjacency`||n.effect===`related`)){let e=n.trigger===`hover`?`pointerover`:`pointerdown`;this.event.on(e,{level:Sr.chart},this._handleEmphasisElement)}}nodesSeriesDataUpdate(){this._nodeMark.getData().updateData(),this._nodeList=null,this._setNodeOrdinalColorScale()}linksSeriesDataUpdate(){this._linkMark.getData().updateData()}_highLightElements(e,t){e&&e.length&&e.forEach((e=>{U(e,[F.STATE_SANKEY_EMPHASIS_REVERSE,F.STATE_SANKEY_EMPHASIS]),t.includes(M(e).key)?I(e,F.STATE_SANKEY_EMPHASIS,!0,this._hasNodeStateAnimation()):I(e,F.STATE_SANKEY_EMPHASIS_REVERSE,!0,this._hasNodeStateAnimation())}))}initTooltip(){this._tooltipHelper=new Ra(this),this._nodeMark&&this._tooltipHelper.activeTriggerSet.mark.add(this._nodeMark),this._linkMark&&this._tooltipHelper.activeTriggerSet.mark.add(this._linkMark)}_setNodeOrdinalColorScale(){var e,t;let n=(this._option?.globalScale)?.getScale(`color`);if(n?._specified)return void(this._colorScale=n);let r,i;n&&(r=n.domain(),i=n.range()),i||=this._getDataScheme(),r&&!A(r[0])||(r=this.getNodeList(),r&&r.length>10&&(i=this._getDataScheme()[1]?.scheme));let a=new ar;(t=(e=a.domain(r)).range)==null||t.call(e,i),this._colorScale=a}getNodeList(){if(this._nodeList)return this._nodeList;let e=this._rawData.latestData[0],t=e?.nodes?e.nodes[0]?.children?Array.from(this.extractNamesFromTree(e.nodes,this._spec.categoryField)):e.nodes.map(((e,t)=>e[this._spec.categoryField])):e?.links?Array.from(this.extractNamesFromLink(e.links)):(e?.values)?.map(((e,t)=>e[this._spec.categoryField]));return this._nodeList=t,t}_getNodeNameFromData(e){return e?.datum?e.datum[this._spec.categoryField]:e.key??e[this._spec.categoryField]}extractNamesFromTree(e,t){let n=/* @__PURE__ */ new Set;return e.forEach((e=>{n.add(e[t]),e.children&&this.extractNamesFromTree(e.children,t).forEach((e=>n.add(e)))})),n}extractNamesFromLink(e){let t=/* @__PURE__ */ new Set,{sourceField:n,targetField:r}=this._spec;return e.forEach((e=>{_(e[n])&&t.add(e[n]),_(e[r])&&t.add(e[r])})),t}getDimensionField(){return[this._spec.categoryField]}getMeasureField(){return[this._valueField]}getRawDataStatisticsByField(e,t){return this._rawStatisticsCache||={},!this._rawStatisticsCache[e]&&(this._viewDataStatistics&&this.getViewData().transformsArr.length<=1&&this._viewDataStatistics.latestData?.[e]?this._rawStatisticsCache[e]=this._viewDataStatistics.latestData[e]:this._rawData&&(this._rawStatisticsCache[e]={values:this._collectByField(e)})),this._rawStatisticsCache[e]}_collectByField(e){var t;let n=[],r=this.getRawData()?.latestData?.[0];if(!r)return[];if(r.links)(t=r.nodes)!=null&&t.length&&r.nodes.forEach((e=>{e[this._seriesField]&&n.push(e[this._seriesField])}));else if(r.nodes){let e=/* @__PURE__ */ new Set;return ka(e,r.nodes,this._seriesField),Array.from(e)}return n}onLayoutEnd(){super.onLayoutEnd(),this._viewBox.set(0,0,this._region.getLayoutRect().width,this._region.getLayoutRect().height),this.getViewData().reRunAllTransform()}getDefaultShapeType(){return`square`}_noAnimationDataKey(e,t){}getActiveMarks(){return[this._nodeMark,this._linkMark]}getMarkData(e){return e.datum?E(e.datum)?e.datum[e.datum.length-1]:e.datum:e}},co.type=L.sankey,co.transformerConstructor=ro,co.mark=to,co.builtInTheme={sankey:oo},lo=()=>{mn(),$a(),en(),qa(),Cn(),z.registerSeries(co.type,co)}})))()}var fo;function po(){return(po=e((()=>{g(),Jn(),Sa(),fo=(e,t)=>{let n={},r=t.fields;if(k(r)&&(r=r()),!r?.length||!e?.length||!e[0].latestData)return n;let i=e[0].latestData,a=xa(i);return n=ht([{latestData:a}],t),n}})))()}var mo;function ho(){return(ho=e((()=>{Qt(),mo=class extends pt{constructor(){super(...arguments),this.markTooltipKeyCallback=e=>this.series?.getMarkData(e)?.[this.series.getDimensionField()[0]],this.markTooltipValueCallback=e=>{let{measureFields:t}=this._seriesCacheInfo,n=this.series?.getMarkData(e);if(t[0]&&n)return n[t[0]]??e.value},this.dimensionTooltipTitleCallback=e=>{let{dimensionFields:t}=this._seriesCacheInfo,n=this.series?.getMarkData(e);if(t[0]&&n)return n[t[0]]}}get defaultShapeType(){return`square`}}})))()}var go;function _o(){return(_o=e((()=>{vt(),go=Object.assign(Object.assign({},dt),{nonLeaf:{name:`nonLeaf`,type:`rect`},leaf:{name:`leaf`,type:`rect`},nonLeafLabel:{name:`nonLeafLabel`,type:`text`}})})))()}var vo,yo;function bo(){return(bo=e((()=>{V(),sr(),vo=e=>e===`fadeIn`?{type:`fadeIn`}:{type:`growCenterIn`},yo=()=>{z.registerAnimation(`treemap`,((e,t)=>({appear:vo(t),enter:{type:`growCenterIn`},exit:{type:`growCenterOut`},disappear:{duration:$n.disappear.duration}})))}})))()}var xo;function So(){return(So=e((()=>{ze(),xo=class extends In{_transformLabelSpec(e){this._addMarkLabelSpec(e,`nonLeaf`,`nonLeafLabel`,`initNonLeafLabelMarkStyle`),this._addMarkLabelSpec(e,`leaf`)}}})))()}var Co;function wo(){return(wo=e((()=>{V(),Co=()=>{z.registerGrammarTransform(`filter`,{transform:(e,t)=>t?.filter(e.callback)})}})))()}var To;function Eo(){return(Eo=e((()=>{V(),To=()=>{z.registerGrammarTransform(`map`,{transform:(e,t)=>(t?.forEach(((t,n)=>{e.callback(t)})),t)})}})))()}var Do;function Oo(){return(Oo=e((()=>{Ji(),ba(),g(),at(),Do=(e,t)=>{let n=k(t)?t():t,r=n.getViewBox();if(r){let t=new ya(n).layout(e,r),i=[];return qi(t,i,{maxDepth:n?.maxDepth}),i.forEach((e=>{e&&[Jt,`name`].forEach((t=>{e[t]=e.datum[e.depth][n.nameField]}))})),i}return[]}})))()}var ko;function Ao(){return(Ao=e((()=>{ko={gapWidth:1,nodePadding:[5],nonLeaf:{visible:!1,style:{fillOpacity:.5}},label:{style:{fill:`white`,textBaseline:`middle`,textAlign:`center`,fontSize:{type:`token`,key:`l5FontSize`},lineHeight:{type:`token`,key:`l5LineHeight`}}},nonLeafLabel:{padding:24,style:{fill:`black`,stroke:{type:`palette`,key:`backgroundColor`},lineWidth:2,fontSize:{type:`token`,key:`l5FontSize`},lineHeight:{type:`token`,key:`l5LineHeight`},textBaseline:`middle`,textAlign:`center`}}}})))()}var Z,jo;function Mo(){return(Mo=e((()=>{Je(),qt(),zt(),Le(),qe(),qn(),Sa(),ce(),S(),we(),ie(),Oe(),po(),tn(),ct(),at(),ho(),bt(),sr(),Un(),Ea(),er(),Xt(),_o(),V(),bo(),So(),Oa(),wo(),Eo(),Oo(),Ao(),Z=class e extends Pt{constructor(){super(...arguments),this.type=L.treemap,this.transformerConstructor=xo,this._categoryField=`name`,this._valueField=`value`,this._viewBox=new le,this._enableAnimationHook=this.enableMarkAnimation.bind(this),this.isHierarchyData=()=>!0}getCategoryField(){return this._categoryField}setCategoryField(e){return this._categoryField=e,this._categoryField}getValueField(){return this._valueField}setValueField(e){return this._valueField=e,this._valueField}setAttrFromSpec(){super.setAttrFromSpec(),this.setCategoryField(this._spec.categoryField),this.setValueField(this._spec.valueField),this.setSeriesField(this._spec.seriesField??Jt),this._spec.roam&&(this.initZoomable(this.event,this._option.mode),this._matrix=new ge),this._spec.drill&&this.initDrillable({event:this.event,mode:this._option.mode,drillField:()=>this._spec.drillField??this._categoryField??nn,getRawData:()=>this.getRawData()}),ve(this._spec.maxDepth)&&(this._maxDepth=this._spec.maxDepth-1)}initData(){var e;super.initData(),N(this._dataSet,`treemap`,Do),(e=this._data.getDataView())==null||e.transform({type:`treemap`,options:()=>({nameField:this._categoryField,valueField:this._valueField,getViewBox:()=>this._viewBox.empty()?null:{x0:this._viewBox.x1,x1:this._viewBox.x2,y0:this._viewBox.y1,y1:this._viewBox.y2},maxDepth:this._maxDepth,gapWidth:this._spec.gapWidth,padding:this._spec.nodePadding,splitType:this._spec.splitType,aspectRatio:this._spec.aspectRatio,labelPadding:this._spec.nonLeafLabel?.visible?this._spec.nonLeafLabel?.padding:0,labelPosition:this._spec.nonLeafLabel?.position,minVisibleArea:this._spec.minVisibleArea??10,minChildrenVisibleArea:this._spec.minChildrenVisibleArea,minChildrenVisibleSize:this._spec.minChildrenVisibleSize})}),this.getViewData()&&this._spec.drill&&this.initDrillableData(this._dataSet)}_runTreemapTransform(e=!1){this._data.getDataView().reRunAllTransform(),e&&this.getCompiler().renderNextTick()}_addDataIndexAndKey(){var e;(e=this._rawData)!=null&&e.dataSet&&(N(this._rawData.dataSet,`addVChartProperty`,Zt),this._rawData.transform({type:`addVChartProperty`,options:{beforeCall:Ue.bind(this),call:xr}}))}getRawDataStatisticsByField(e,t){if(this._rawStatisticsCache||={},!this._rawStatisticsCache[e]&&this._rawData){let n=fo([this._rawData],{fields:[{key:e,operations:t?[`min`,`max`]:[`values`]}]})[e];this._rawStatisticsCache[e]=re(this._rawStatisticsCache[e]??{},n)}return this._rawStatisticsCache[e]}_createHierarchyDataStatistics(e,t){N(this._dataSet,`hierarchyDimensionStatistics`,fo),N(this._dataSet,`flatten`,xa);let n=new ae(this._dataSet,{name:e});return n.parse(t,{type:`dataview`}),n.transform({type:`hierarchyDimensionStatistics`,options:{fields:()=>{let e=this.getStatisticFields();return this._seriesField&&this._seriesField!==this._categoryField&&e.push({key:this._seriesField,operations:[`values`]}),e}}},!1),n}getStatisticFields(){return Da(super.getStatisticFields(),this._categoryField,this._valueField)}initMark(){let t=this._createMark(e.mark.nonLeaf,{isSeriesMark:!0});t&&(t.setTransform([{type:`filter`,callback:e=>!this._shouldFilterElement(e,`nonLeaf`)}]),this._nonLeafMark=t);let n=this._createMark(e.mark.leaf,{isSeriesMark:!0});n&&(n.setTransform([{type:`filter`,callback:e=>!this._shouldFilterElement(e,`leaf`)}]),this._leafMark=n)}initMarkStyle(){this._initLeafMarkStyle(),this._initNonLeafMarkStyle()}_initLeafMarkStyle(){this._leafMark&&this.setMarkStyle(this._leafMark,{x:e=>e.x0,y:e=>e.y0,x1:e=>e.x1,y1:e=>e.y1,fill:this.getColorAttribute()},F.STATE_NORMAL,H.Series)}_initNonLeafMarkStyle(){this._nonLeafMark&&this.setMarkStyle(this._nonLeafMark,{x:e=>e.x0,y:e=>e.y0,x1:e=>e.x1,y1:e=>e.y1,fill:this.getColorAttribute()},F.STATE_NORMAL,H.Series)}_initRichStyleOfLabelMark(e){e.getTextType()===`rich`&&this.setMarkStyle(e,{maxWidth:e=>Math.abs(e.x0-e.x1),maxHeight:e=>Math.abs(e.y0-e.y1),ellipsis:!0},F.STATE_NORMAL,H.Series)}initLabelMarkStyle(e){e&&(this._labelMark=e,e.setRule(`treemap`),this.setMarkStyle(e,{x:e=>(e.x0+e.x1)/2,y:e=>(e.y0+e.y1)/2,text:e=>e.datum[e.depth]?.[this.getDimensionField()[0]],maxLineWidth:e=>e.x1===e.x0?Number.MIN_VALUE:e.x1-e.x0},F.STATE_NORMAL,H.Series),this._initRichStyleOfLabelMark(e))}initNonLeafLabelMarkStyle(e){e&&(this._nonLeafLabelMark=e,e.setRule(`treemap`),this.setMarkStyle(e,{x:e=>e.labelRect?(e.labelRect.x0+e.labelRect.x1)/2:(e.x0+e.x1)/2,y:e=>e.labelRect?(e.labelRect.y0+e.labelRect.y1)/2:(e.y0+e.y1)/2,text:e=>e.datum[e.depth]?.[this.getDimensionField()[0]],maxLineWidth:e=>e.x1===e.x0?Number.MIN_VALUE:e.x1-e.x0},F.STATE_NORMAL,H.Series),this._initRichStyleOfLabelMark(e))}initAnimation(){this.getMarksInType(`rect`).forEach((e=>{e.setAnimationConfig(Pn(z.getAnimationInKey(`treemap`)?.(),nt(e.name,this._spec,this._markAttributeContext)))}))}initEvent(){super.initEvent(),this._spec.roam&&(this.initDragEventOfSeries(this),this.event.on(`panmove`,(e=>{this.handlePan(e)})),this.initZoomEventOfSeries(this),this.event.on(`zoom`,(e=>{this.handleZoom(e)}))),this._spec.drill&&this.bindDrillEvent()}_getDataIdKey(){return`key`}initTooltip(){this._tooltipHelper=new mo(this),this._leafMark&&this._tooltipHelper.activeTriggerSet.mark.add(this._leafMark),this._nonLeafMark&&this._tooltipHelper.activeTriggerSet.mark.add(this._nonLeafMark)}_shouldFilterElement(e,t){let n=e.isLeaf;return t===`leaf`?!n:n}handlePan(e){let{delta:t}=e;if(t[0]===0&&t[1]===0)return;this._matrix.reset(),this._matrix.translate(t[0],t[1]);let{a:n,b:r,c:i,d:a,e:o,f:s}=this._matrix;this._matrix.multiply(n,r,i,a,o,s),this._viewBox.transformWithMatrix(this._matrix),this._runTreemapTransform(!0)}handleZoom(e){let{scale:t,scaleCenter:n}=e;if(t===1)return;this._matrix.reset();let{x:r,y:i}=n;this._matrix.translate(r,i),this._matrix.scale(t,t),this._matrix.translate(-r,-i);let{a,b:o,c:s,d:c,e:l,f:u}=this._matrix;this._matrix.multiply(a,o,s,c,l,u),this.disableMarkAnimation(),this.event.on(We.AFTER_DO_RENDER,this._enableAnimationHook),this._viewBox.transformWithMatrix(this._matrix),this._runTreemapTransform(!0)}getDimensionField(){return[this._categoryField]}getMeasureField(){return[this._valueField]}onLayoutEnd(){super.onLayoutEnd(),this._viewBox.set(0,0,this.getLayoutRect().width,this.getLayoutRect().height),this._runTreemapTransform()}enableMarkAnimation(){this.getMarks().forEach((e=>{})),[this._labelMark,this._nonLeafLabelMark].forEach((e=>{e&&e.getComponent()&&e.getComponent().getProduct().enableAnimation()})),this.event.off(We.AFTER_DO_RENDER,this._enableAnimationHook)}disableMarkAnimation(){this.getMarks().forEach((e=>{})),[this._labelMark,this._nonLeafLabelMark].forEach((e=>{e&&e.getComponent()&&e.getComponent().getProduct().disableAnimation()}))}getDefaultShapeType(){return`square`}getActiveMarks(){return[this._nonLeafMark,this._leafMark]}getMarkData(e){return e?.datum?e.datum[e.datum.length-1]:e}},Z.type=L.treemap,Z.mark=go,Z.builtInTheme={treemap:ko},Z.transformerConstructor=xo,b(Z,Ta),b(Z,rr),jo=()=>{Co(),To(),mn(),en(),yo(),Cn(),z.registerSeries(Z.type,Z)}})))()}var No,Po;function Fo(){return(Fo=e((()=>{pe(),_r(),T(),x(),lr(),No=(e,t)=>{let n=2*Math.PI,r=je(t),i=te(t);return e<r?e+=Math.ceil((r-e)/n)*n:e>i&&(e-=Math.ceil((e-i)/n)*n),e},Po=(e,t)=>{if(!e)return null;let n=yr(e,(e=>e.getOrient()===`angle`),t),r=yr(e,(e=>e.getOrient()===`radius`),t);if(!(n&&n.length||r&&r.length))return null;let i=[],a=e=>e.getDimensionField()[0],{x:o,y:s}=t;return n&&n.forEach((e=>{let t=e.getScale();if(t&&Te(t.type)){let n=t.domain(),c=t.range(),l=e.getCenter(),u={x:o-e.getLayoutStartPoint().x-l.x,y:s-e.getLayoutStartPoint().y-l.y},d=un({x:1,y:0},u);d=No(d,c);let f=En(u),p=(r[0]?.getScale())?.range();if((d-c?.[0])*(d-c?.[1])>0||(f-p?.[0])*(f-p?.[1])>0)return;let m=e.invert(d);if(A(m))return;let h=n.findIndex((e=>e?.toString()===m.toString()));h<0&&(h=void 0);let g=dn(m,e,`polar`,a);i.push({index:h,value:m,position:t.scale(m),axis:e,data:g})}})),r&&r.forEach((e=>{let t=e.getScale(),r=t?.range();if(t&&Te(t.type)){let c=e.getCenter(),l={x:o-e.getLayoutStartPoint().x-c.x,y:s-e.getLayoutStartPoint().y-c.y},u=un({x:1,y:0},l);u<-Math.PI/2&&(u=2*Math.PI+u);let d=En(l),f=(n[0]?.getScale())?.range();if((u-f?.[0])*(u-f?.[1])>0||(d-r?.[0])*(d-r?.[1])>0)return;let p=t.invert(d);if(A(p))return;let m=t.domain().findIndex((e=>e?.toString()===p.toString()));m<0&&(m=void 0);let h=dn(p,e,`polar`,a);i.push({index:m,value:p,position:t.scale(p),axis:e,data:h})}})),i.length?i:null}})))()}var Io;function Lo(){return(Lo=e((()=>{xe(),De(),it(),Be(),kr(),Io=class extends kt{_getDefaultSeriesSpec(e){let t=super._getDefaultSeriesSpec(e);return delete t.data,t}_transformAxisSpec(e){e.axes&&e.autoBandSize&&e.series.forEach(((t,n)=>{var r;if(t.type===`bar`){let i=this._findBandAxisBySeries(t,n,e.axes);if(i&&!i.bandSize&&!i.maxBandSize&&!i.minBandSize){let e=ne(t.autoBandSize)&&(r=t.autoBandSize.extend)!=null?r:0,{barMaxWidth:n,barMinWidth:a,barWidth:o,barGapInGroup:s}=t;this._applyAxisBandSize(i,e,{barMaxWidth:n,barMinWidth:a,barWidth:o,barGapInGroup:s})}}}))}transformSpec(e){if(super.transformSpec(e),e.series&&e.series.length){let t=this._getDefaultSeriesSpec(e);e.series.forEach((e=>{this._isValidSeries(e.type)&&Object.keys(t).forEach((n=>{n in e||(e[n]=t[n])}))}))}e.axes&&e.axes.length&&e.axes.forEach((t=>{de(t,`trimPadding`)&&Nr(t,Ln(this.type,e))})),this._transformAxisSpec(e)}}})))()}var Ro,zo;function Bo(){return(Bo=e((()=>{yt(),V(),Lo(),Fn(),Tt(),et(),Bt(),Fo(),Ft(),br(),an(),kn(),Ro=class extends ft{constructor(){super(...arguments),this.transformerConstructor=Io,this.type=`common`}_setModelOption(){this._modelOption.getDimensionInfo=(e,t,n)=>[...Ye(e,t,n)??[],...Po(e,t)??[]],this._modelOption.getDimensionInfoByValue=hr,this._modelOption.getRectByDimensionData=vr}},Ro.type=`common`,Ro.transformerConstructor=Io,b(Ro,Ve),zo=()=>{fn(),dr(),Dn(),Qe(),z.registerChart(Ro.type,Ro),Rn()}})))()}var Vo;function Ho(){return(Ho=e((()=>{it(),Vo=class extends kt{_getDefaultSeriesSpec(e){return super._getDefaultSeriesSpec(e,[`categoryField`,`valueField`,`aspectRatio`,`splitType`,`maxDepth`,`gapWidth`,`nodePadding`,`minVisibleArea`,`minChildrenVisibleArea`,`minChildrenVisibleSize`,`roam`,`drill`,`drillField`,`leaf`,`nonLeaf`,`nonLeafLabel`])}transformSpec(e){super.transformSpec(e),this.transformSeriesSpec(e)}}})))()}var Uo,Wo;function Go(){return(Go=e((()=>{qn(),yt(),Mo(),V(),Ho(),an(),Uo=class extends ft{constructor(){super(...arguments),this.transformerConstructor=Vo,this.type=`treemap`,this.seriesType=L.treemap}},Uo.type=`treemap`,Uo.seriesType=L.treemap,Uo.transformerConstructor=Vo,Wo=()=>{dr(),jo(),z.registerChart(Uo.type,Uo)}})))()}var Ko;function qo(){return(qo=e((()=>{it(),Ko=class extends kt{_getDefaultSeriesSpec(e){return super._getDefaultSeriesSpec(e,/* @__PURE__ */ `categoryField.valueField.sourceField.targetField.direction.nodeAlign.crossNodeAlign.nodeGap.nodeWidth.linkWidth.minStepWidth.minNodeHeight.maxNodeHeight.minLinkHeight.maxLinkHeight.dropIsolatedNode.nodeHeight.linkHeight.equalNodeHeight.linkOverlap.iterations.nodeKey.linkSortBy.nodeSortBy.setNodeLayer.node.link.emphasis.inverse.overflow`.split(`.`))}transformSpec(e){super.transformSpec(e),this.transformSeriesSpec(e)}}})))()}var Jo,Yo;function Xo(){return(Xo=e((()=>{yt(),qn(),uo(),V(),qo(),O(),Er(),an(),Ut(),Jo=class extends ft{constructor(){super(...arguments),this.transformerConstructor=Ko,this.type=`sankey`,this.seriesType=L.sankey}_setStateInDatum(e,t,n,r){let i=E(t)?t[0]:t;if(!i)return void this._interaction.clearByState(e);let a=null;this.filterGraphicsByDatum(i,{filter:(e,t)=>t.type!==`text`&&t.getProduct()&&(!n||n(e,t)),region:r,getDatum:e=>{let t=M(e)?.datum;return E(t)&&(t=t[0]),t},callback:(e,t,n,r)=>{var i,a;let o=t.getProductId();o&&(o.includes(`node`)||o.includes(`link`))&&((a=(i=n)._handleEmphasisElement)==null||a.call(i,{item:e,mark:t}))},regionCallback:(e,t)=>{i&&e.length&&(a=e[0])}}),a&&this._interaction.updateStateOfGraphics(e,[a])}},Jo.type=`sankey`,Jo.seriesType=L.sankey,Jo.transformerConstructor=Ko,Yo=()=>{dr(),Pr(),lo(),z.registerChart(Jo.type,Jo)}})))()}var Zo;function Qo(){return(Qo=e((()=>{jn(),Bo(),lt(),Yt(),vn(),Vn(),He(),ut(),Et(),ri(),cn(),Ir(),Vi(),Rr(),sn(),Or(),st(),Re(),Xe(),Zo=$e(`CommonChart`,{type:`common`,vchartConstructor:Zn},[Wn,Dr,Vt,Nn,zo,Wt,ot,wn,cr,Gt,_t,tt,zr,Gn,Fr,Bi,Lr])})))()}var $o;function es(){return(es=e((()=>{jn(),ut(),Xo(),ni(),Xe(),$o=$e(`SankeyChart`,{type:`sankey`,vchartConstructor:Zn},[Yo,_t,...ai])})))()}var ts;function ns(){return(ns=e((()=>{jn(),Gi(),ut(),fr(),Xe(),ts=$e(`ScatterChart`,{type:`scatter`,vchartConstructor:Zn},[Wi,_t,...It])})))()}var rs;function is(){return(is=e((()=>{jn(),ut(),Go(),ni(),Xe(),rs=$e(`TreemapChart`,{type:`treemap`,vchartConstructor:Zn},[Wo,_t,...ai])})))()}function as({data:e,height:t=200,empty:n=null,onSliceClick:r}){let i=gr(),a=W(()=>{let t=[...e].sort((e,t)=>t.count-e.count),n=t.slice(0,os.length),r=t.slice(os.length).reduce((e,t)=>e+t.count,0),a=[...n.map((e,t)=>({...e,fill:os[t%os.length]})),...r>0?[{module:cs,count:r,fill:ss}]:[]];return ir({data:a,categoryField:`module`,valueField:`count`,donut:!1,colors:a.map(e=>e.fill),palette:i,label:`percent`,valueUnit:`次`})},[e,i]),o=r?e=>{let t=e?.datum?.module;typeof t==`string`&&t!==cs&&r(t)}:void 0;return e.length===0?/* @__PURE__ */ G(si,{children:n}):/* @__PURE__ */ G(Kr,{...a,options:R,height:t,onClick:o})}var os,ss,cs;function ls(){return(ls=e((()=>{Br(),rn(),An(),ln(),os=[`#4A90E2`,`#52C41A`,`#FA8C16`,`#13C2C2`,`#722ED1`,`#F5222D`,`#EB2F96`,`#1677FF`],ss=`#94A3B8`,cs=`其他`})))()}function us(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${e}ms`}function ds(){let e=gr(),[t,n]=oi(30),r=Ci({days:t}),i=r.data??null,a=W(()=>[...i?.moduleStats??[]].slice(0,10).reverse(),[i]),{userChartData:o,userChartTitleOf:s}=W(()=>{let e=[...i?.userStats??[]].reverse(),{nameOf:t,fullOf:n}=vi(e);return{userChartData:e.map(e=>({displayName:t(e),count:e.count})),userChartTitleOf:e=>n.get(e)??e}},[i]),c=W(()=>[...i?.moduleTimingStats??[]].slice(0,10).reverse(),[i]),l=W(()=>(i?.methodStats??[]).map(e=>({...e,fill:fs[e.method]??ps})),[i]),u=W(()=>[...i?.hourlyStats??[]],[i]),d=W(()=>[...i?.dailyStats??[]],[i]),f=W(()=>(i?.statusClassStats??[]).map(e=>({...e,fill:gs[e.statusClass]??ps})),[i]),p=W(()=>[...i?.durationHistogram??[]],[i]),h=W(()=>[...i?.slowPaths??[]].reverse(),[i]),g=W(()=>[...i?.failModuleStats??[]].reverse(),[i]),_=W(()=>(i?.dailyStats??[]).map(e=>({...e,avgMs:e.avgMs??0})),[i]),v=W(()=>(i?.moduleStats??[]).map(e=>({name:e.module,value:e.count})),[i]),y=W(()=>i?.moduleTimingStats??[],[i]),b=W(()=>{let e=i?.userModuleFlows??[];if(e.length===0)return{nodes:[],links:[]};let t=t=>{let n=/* @__PURE__ */ new Map;for(let r of e)n.set(r[t],(n.get(r[t])??0)+r.count);return n},n=new Set([...t(`username`).entries()].sort((e,t)=>t[1]-e[1]).slice(0,8).map(([e])=>e)),r=new Set([...t(`module`).entries()].sort((e,t)=>t[1]-e[1]).slice(0,8).map(([e])=>e)),a=e.filter(e=>n.has(e.username)&&r.has(e.module)),o=[...new Map(e.map(e=>[e.username,{username:e.username,nickname:e.nickname}])).values()],{nameOf:s}=vi(o),c=new Map(o.map(e=>[e.username,s(e)])),l=new Map(o.map(e=>[e.username,yi(e.username,e.nickname)])),u=/* @__PURE__ */ new Map;for(let e of a)u.set(`u:${e.username}`,(u.get(`u:${e.username}`)??0)+e.count),u.set(`m:${e.module}`,(u.get(`m:${e.module}`)??0)+e.count);return{nodes:[...u.entries()].map(([e,t])=>({id:e,label:e.startsWith(`u:`)?c.get(e.slice(2))??e.slice(2):e.slice(2),fullLabel:e.startsWith(`u:`)?l.get(e.slice(2))??e.slice(2):e.slice(2),value:t})),links:a.map(e=>({source:`u:${e.username}`,target:`m:${e.module}`,value:e.count}))}},[i]),x=W(()=>Ur(i?.dailyStats),[i]),S=i?.summary,C=i?.prevSummary,ee=Jr(S),w=S?.avgDurationMs==null?null:us(S.avgDurationMs),T=Vr(S,C),te=W(()=>B({data:a,xField:`module`,series:[{field:`count`,name:`操作次数`,color:`#3b82f6`}],palette:e,horizontal:!0,categoryAxisWidth:88,showLabel:!0,tooltip:{value:e=>`${e} 次`}}),[a,e]),ne=W(()=>B({data:o,xField:`displayName`,series:[{field:`count`,name:`操作次数`,color:`#10b981`}],palette:e,horizontal:!0,categoryAxisWidth:96,showLabel:!0,tooltip:{title:s,value:e=>`${e} 次`}}),[o,s,e]),re=W(()=>B({data:c,xField:`module`,series:[{field:`avgMs`,name:`平均耗时`,color:`#f59e0b`},{field:`maxMs`,name:`最大耗时`,color:`rgba(239, 68, 68, 0.5)`}],palette:e,horizontal:!0,categoryAxisWidth:88,axis:{xLabel:e=>`${e}ms`},tooltip:{value:e=>`${e} ms`}}),[c,e]),E=W(()=>ir({data:l,categoryField:`method`,valueField:`count`,donut:!0,colors:l.map(e=>e.fill),palette:e,label:`none`,valueUnit:`次`}),[l,e]),ie=W(()=>B({data:u,xField:`hour`,series:[{field:`count`,name:`操作次数`,color:`#8b5cf6`}],palette:e,axis:{xLabel:e=>`${String(e).padStart(2,`0`)}h`},tooltip:{title:e=>`${String(e).padStart(2,`0`)}:00 – ${String(e).padStart(2,`0`)}:59`,value:e=>`${e} 次`}}),[u,e]),ae=W(()=>on({data:d,xField:`date`,series:[{field:`successCount`,name:`成功`,color:ms},{field:`failCount`,name:`失败`,color:hs}],palette:e,fillOpacity:.28,axis:{xLabel:pi},tooltip:{title:e=>`日期:${e}`,value:e=>`${e} 次`}}),[d,e]),oe=W(()=>B({data:x,xField:`name`,series:[{field:`count`,name:`操作次数`,color:`#6366f1`}],palette:e,showLabel:!0,tooltip:{value:e=>`${e} 次`}}),[x,e]),se=W(()=>ir({data:f,categoryField:`statusClass`,valueField:`count`,donut:!0,colors:f.map(e=>e.fill),palette:e,label:`none`,valueUnit:`次`}),[f,e]),ce=W(()=>B({data:p,xField:`bucket`,series:[{field:`count`,name:`请求数`,color:`#f59e0b`}],palette:e,showLabel:!0,tooltip:{value:e=>`${e} 次`}}),[p,e]),le=W(()=>B({data:h,xField:`path`,series:[{field:`avgMs`,name:`平均耗时`,color:`#f59e0b`},{field:`maxMs`,name:`最大耗时`,color:`rgba(239, 68, 68, 0.5)`}],palette:e,horizontal:!0,categoryAxisWidth:200,axis:{xLabel:e=>`${e}ms`},tooltip:{value:e=>`${e} ms`}}),[h,e]),D=W(()=>B({data:g,xField:`module`,series:[{field:`count`,name:`失败次数`,color:hs}],palette:e,horizontal:!0,categoryAxisWidth:88,showLabel:!0,labelColor:hs,tooltip:{value:e=>`${e} 次`}}),[g,e]),ue=W(()=>zn({data:_,xField:`date`,palette:e,bar:{field:`count`,name:`请求数`,color:e.dataColors[0]??e.primary},line:{field:`avgMs`,name:`平均耗时`,color:`#f59e0b`},axis:{xLabel:pi,rightLabel:e=>`${e}ms`},tooltip:{title:e=>`日期:${e}`,barValue:e=>`${e} 次`,lineValue:e=>`${e} ms`}}),[_,e]),de=W(()=>Kn({data:v,palette:e,tooltipItems:[{key:`操作次数`,value:e=>`${On(e,`value`)} 次`}]}),[v,e]),fe=W(()=>{let t=Math.max(1,...y.map(e=>e.maxMs));return Sn({data:y,xField:`count`,yField:`avgMs`,palette:e,point:{size:e=>8+Math.sqrt(On(e,`maxMs`)/t)*20,fill:e.primary,fillOpacity:.55,stroke:e.primary,lineWidth:1},xAxis:{label:e=>`${e} 次`},yAxis:{label:e=>`${e}ms`},tooltip:{title:e=>Tn(e,`module`),items:[{key:`请求数`,value:e=>`${On(e,`count`)} 次`},{key:`平均耗时`,value:e=>`${On(e,`avgMs`)} ms`},{key:`最大耗时`,value:e=>`${On(e,`maxMs`)} ms`}]}})},[y,e]),pe=W(()=>hn({nodes:b.nodes,links:b.links,palette:e,nodeLayer:e=>+!e.id.startsWith(`u:`),valueFormatter:e=>`${e} 次`,tooltip:{nodeTitle:e=>String(e.fullLabel??e.name??``)}}),[b,e]);return/* @__PURE__ */ K(Zr,{days:t,onDaysChange:n,loading:r.isLoading,fetching:r.isFetching,children:[/* @__PURE__ */ K(Hn,{style:{marginBottom:16},children:[/* @__PURE__ */ G(tr,{title:`总请求数`,value:S?S.total.toLocaleString():m,sub:`近 ${t} 天累计`,accent:`var(--arc-antd-color-primary)`,delta:S&&C?Qr(S.total,C.total):null,deltaLabel:`较上一周期`}),/* @__PURE__ */ G(tr,{title:`请求成功率`,value:ee==null?m:`${ee}%`,sub:S?`成功 ${S.successCount.toLocaleString()} · 失败 ${S.failCount.toLocaleString()}`:void 0,accent:`var(--arc-antd-color-success)`,delta:T,deltaLabel:`较上一周期`,deltaFormat:`ratio`}),/* @__PURE__ */ G(tr,{title:`平均响应时间`,value:w??m,sub:`基于有记录的请求`,accent:`var(--arc-antd-color-warning)`}),/* @__PURE__ */ G(tr,{title:`P95 响应时间`,value:S?.p95DurationMs==null?m:us(S.p95DurationMs),sub:S?.p50DurationMs==null?void 0:`P50 ${us(S.p50DurationMs)}`,accent:`var(--arc-antd-color-warning)`}),/* @__PURE__ */ G(tr,{title:`P99 响应时间`,value:S?.p99DurationMs==null?m:us(S.p99DurationMs),sub:`长尾请求耗时`,accent:S?.p99DurationMs!=null&&S.p99DurationMs>=3e3?`var(--arc-antd-color-danger)`:`var(--arc-antd-color-warning)`}),/* @__PURE__ */ G(tr,{title:`活跃用户数`,value:S?S.uniqueUsers.toLocaleString():m,sub:`不重复用户账号`,accent:`var(--arc-antd-color-data-2)`,delta:S&&C?Qr(S.uniqueUsers,C.uniqueUsers):null,deltaLabel:`较上一周期`})]}),/* @__PURE__ */ K(`div`,{className:`chart-grid chart-grid--3`,style:{marginBottom:16},children:[/* @__PURE__ */ K(`div`,{className:`zx-panel`,children:[/* @__PURE__ */ G(`div`,{style:Q,children:`按模块操作统计(Top 10)`}),a.length===0?/* @__PURE__ */ G(`div`,{style:$,children:`暂无数据`}):/* @__PURE__ */ G(P,{...te,options:R,height:260})]}),/* @__PURE__ */ K(`div`,{className:`zx-panel`,children:[/* @__PURE__ */ G(`div`,{style:Q,children:`按模块操作分布`}),/* @__PURE__ */ G(as,{data:i?.moduleStats??[],height:260,empty:/* @__PURE__ */ G(`div`,{style:$,children:`暂无数据`})})]}),/* @__PURE__ */ K(`div`,{className:`zx-panel`,children:[/* @__PURE__ */ G(`div`,{style:Q,children:`Top 10 操作用户`}),o.length===0?/* @__PURE__ */ G(`div`,{style:$,children:`暂无数据`}):/* @__PURE__ */ G(P,{...ne,options:R,height:260})]})]}),/* @__PURE__ */ K(`div`,{className:`zx-panel`,style:{marginBottom:16},children:[/* @__PURE__ */ G(`div`,{style:Q,children:`各模块平均响应时间(取有耗时记录的请求,Top 10)`}),c.length===0?/* @__PURE__ */ G(`div`,{style:$,children:`暂无耗时数据`}):/* @__PURE__ */ G(P,{...re,options:R,height:260})]}),/* @__PURE__ */ K(`div`,{className:`chart-grid`,style:{marginBottom:16},children:[/* @__PURE__ */ K(`div`,{className:`zx-panel`,children:[/* @__PURE__ */ G(`div`,{style:Q,children:`HTTP 方法分布`}),l.length===0?/* @__PURE__ */ G(`div`,{style:{...$,height:240},children:`暂无数据`}):/* @__PURE__ */ G(Kr,{...E,options:R,height:240})]}),/* @__PURE__ */ K(`div`,{className:`zx-panel`,children:[/* @__PURE__ */ G(`div`,{style:Q,children:`按小时操作分布`}),/* @__PURE__ */ G(P,{...ie,options:R,height:240})]})]}),/* @__PURE__ */ K(`div`,{className:`chart-grid`,style:{marginBottom:16},children:[/* @__PURE__ */ K(`div`,{className:`zx-panel`,children:[/* @__PURE__ */ G(`div`,{style:Q,children:`响应状态码分布`}),f.length===0?/* @__PURE__ */ G(`div`,{style:{...$,height:240},children:`暂无数据`}):/* @__PURE__ */ G(Kr,{...se,options:R,height:240})]}),/* @__PURE__ */ K(`div`,{className:`zx-panel`,children:[/* @__PURE__ */ G(`div`,{style:Q,children:`耗时区间分布`}),p.length===0?/* @__PURE__ */ G(`div`,{style:{...$,height:240},children:`暂无耗时数据`}):/* @__PURE__ */ G(P,{...ce,options:R,height:240})]})]}),/* @__PURE__ */ K(`div`,{className:`chart-grid`,style:{marginBottom:16},children:[/* @__PURE__ */ K(`div`,{className:`zx-panel`,children:[/* @__PURE__ */ G(`div`,{style:Q,children:`慢接口 Top 10(按平均耗时)`}),h.length===0?/* @__PURE__ */ G(`div`,{style:$,children:`暂无耗时数据`}):/* @__PURE__ */ G(P,{...le,options:R,height:260})]}),/* @__PURE__ */ K(`div`,{className:`zx-panel`,children:[/* @__PURE__ */ G(`div`,{style:{...Q,color:g.length>0?hs:Q.color},children:`失败热点模块 Top 10`}),g.length===0?/* @__PURE__ */ G(Xr,{tone:`success`,text:`该时间段无失败请求`,height:260}):/* @__PURE__ */ G(P,{...D,options:R,height:260})]})]}),/* @__PURE__ */ K(`div`,{className:`zx-panel`,style:{marginBottom:16},children:[/* @__PURE__ */ G(`div`,{style:Q,children:`每日操作趋势(成功 / 失败)`}),/* @__PURE__ */ G(Hr,{...ae,options:R,height:210})]}),/* @__PURE__ */ K(`div`,{className:`zx-panel`,style:{marginBottom:16},children:[/* @__PURE__ */ G(`div`,{style:Q,children:`每日请求量与平均耗时`}),_.length===0?/* @__PURE__ */ G(`div`,{style:$,children:`暂无数据`}):/* @__PURE__ */ G(Zo,{...ue,options:R,height:240})]}),/* @__PURE__ */ K(`div`,{className:`chart-grid`,style:{marginBottom:16},children:[/* @__PURE__ */ K(`div`,{className:`zx-panel`,children:[/* @__PURE__ */ G(`div`,{style:Q,children:`模块操作量占比`}),v.length===0?/* @__PURE__ */ G(`div`,{style:$,children:`暂无数据`}):/* @__PURE__ */ G(rs,{...de,options:R,height:280})]}),/* @__PURE__ */ K(`div`,{className:`zx-panel`,children:[/* @__PURE__ */ G(`div`,{style:Q,children:`模块耗时 vs 请求量(气泡大小 = 最大耗时)`}),y.length===0?/* @__PURE__ */ G(`div`,{style:$,children:`暂无耗时数据`}):/* @__PURE__ */ G(ts,{...fe,options:R,height:280})]})]}),/* @__PURE__ */ K(`div`,{className:`zx-panel`,style:{marginBottom:16},children:[/* @__PURE__ */ G(`div`,{style:Q,children:`用户 → 模块操作流向(Top 8 用户 × Top 8 模块)`}),b.links.length===0?/* @__PURE__ */ G(`div`,{style:$,children:`暂无数据`}):/* @__PURE__ */ G($o,{...pe,options:R,height:320})]}),/* @__PURE__ */ K(`div`,{className:`zx-panel`,children:[/* @__PURE__ */ K(`div`,{style:Q,children:[`按星期操作分布(近 `,t,` 天)`]}),i?/* @__PURE__ */ G(P,{...oe,options:R,height:220}):/* @__PURE__ */ G(Xr,{height:220})]})]})}var fs,ps,ms,hs,gs,Q,$;function _s(){return(_s=e((()=>{ii(),Ge(),Qo(),Br(),es(),ns(),is(),qr(),ln(),rn(),An(),Xn(),ls(),ei(),p(),fs={GET:`#3b82f6`,POST:`#10b981`,PUT:`#f59e0b`,DELETE:`#ef4444`,PATCH:`#8b5cf6`},ps=`#6b7280`,ms=`#10b981`,hs=`#ef4444`,gs={"2xx":`#10b981`,"3xx":`#3b82f6`,"4xx":`#f59e0b`,"5xx":`#ef4444`},Q={fontSize:14,fontWeight:600,color:`var(--arc-antd-color-text-0)`,marginBottom:12},$={height:260,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`var(--arc-antd-color-text-2)`}})))()}var vs=/* @__PURE__ */ t({default:()=>ys});function ys(){let[e,t]=_i([`list`,`stats`],`list`),{page:a,pageSize:l,setPage:f,buildPagination:p,bind:m,bindKeyword:h,submittedParams:g,handleSearch:_,handleReset:v,applySearch:y}=ui({defaults:Ss,listKey:bi.all});mi([`description`,`module`,`startTime`,`endTime`],e=>{let t=fi(e.startTime),n=fi(e.endTime);y({...Ss,description:e.description??``,module:e.module??``,timeRange:t&&n?[t,n]:null})},{getNextParams:e=>e.module?{tab:`list`}:void 0});let b=li({username:g.username,module:g.module,description:g.description,ip:g.ip,method:g.method,path:g.path,status:ci(hi,g.status),content:g.content,impersonated:g.impersonated===`true`||g.impersonated!==`false`&&void 0,...di(g.timeRange),minDurationMs:g.minDurationMs,maxDurationMs:g.maxDurationMs}),x=Si({page:a,pageSize:l,...b}),S=x.data?.list??[],C=x.data?.total??0,ee=xi(),w=ee.isPending,T=$r({clean:e=>ee.mutateAsync({query:{days:e}}),onCleared:()=>f(1)});return/* @__PURE__ */ K(`div`,{className:`page-container page-tabs-page`,children:[/* @__PURE__ */ K(n,{collapsible:`auto`,activeKey:e,onChange:e=>t(e),type:`line`,lazyRender:!0,keepDOM:!1,children:[/* @__PURE__ */ G(r,{tab:`日志列表`,itemKey:`list`,children:/* @__PURE__ */ G(Ne,{searchConfig:i({keyword:/* @__PURE__ */ G(u,{placeholder:`操作人用户名 / 昵称`,...h(`username`),width:160}),filters:/* @__PURE__ */ K(si,{children:[/* @__PURE__ */ G(u,{placeholder:`请输入功能模块`,...h(`module`),width:160}),/* @__PURE__ */ G(u,{placeholder:`请输入操作描述`,...h(`description`),width:160}),/* @__PURE__ */ G(c,{placeholder:`全部请求方法`,items:bs,...m(`method`),width:140}),/* @__PURE__ */ G(u,{placeholder:`请输入请求路径`,...h(`path`),width:180}),/* @__PURE__ */ G(u,{placeholder:`请输入 IP 地址`,...h(`ip`),width:160}),/* @__PURE__ */ G(u,{placeholder:`请求/变更内容包含…`,...h(`content`),width:180}),/* @__PURE__ */ G(o,{items:gi,...m(`status`)}),/* @__PURE__ */ G(c,{placeholder:`全部操作来源`,items:xs,...m(`impersonated`),width:140}),/* @__PURE__ */ G(d,{searchLabel:`操作时间`,...m(`timeRange`)}),/* @__PURE__ */ G(s,{placeholder:`耗时 ≥ (ms)`,min:0,...m(`minDurationMs`)}),/* @__PURE__ */ G(s,{placeholder:`耗时 ≤ (ms)`,min:0,...m(`maxDurationMs`)})]}),onSearch:_,onReset:v,actions:/* @__PURE__ */ K(si,{children:[/* @__PURE__ */ G(Fe,{entity:`system.operation-logs`,query:b}),/* @__PURE__ */ G(Yr,{loading:w,onClear:T.openClearModal})]}),filterTitle:`操作日志筛选`,actionTitle:`日志操作`}),dataSource:S,loading:x.isFetching,onRefresh:()=>void x.refetch(),pagination:p(C)})}),/* @__PURE__ */ G(r,{tab:`统计分析`,itemKey:`stats`,children:/* @__PURE__ */ G(ds,{})})]}),/* @__PURE__ */ G(ti,{logName:`操作日志`,control:T})]})}var bs,xs,Ss;function Cs(){return(Cs=e((()=>{f(),a(),Pe(),Me(),Wr(),Gr(),_s(),l(),bs=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`].map(e=>({value:e,label:e})),xs=[{value:`true`,label:`仅模拟操作`},{value:`false`,label:`仅本人操作`}],Ss={username:``,module:``,description:``,method:void 0,path:``,ip:``,status:void 0,content:``,impersonated:void 0,timeRange:null,minDurationMs:void 0,maxDurationMs:void 0}})))()}export{wo as i,Cs as n,Eo as r,vs as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{t}from"./typography-DKK_iHcj.js";import{n,t as r}from"./tabs-BobA_IcO.js";import{t as i}from"./json-viewer-DHYRjY8I.js";import{n as a,t as o}from"./ConfigurableTable-CyfZLgG0.js";import{n as s,r as c}from"./EntityRelationButton-C8Cl8wyh.js";import{C as l,a as u,b as d,c as f,w as p}from"./ui-DoIHGuTR.js";import{n as m,t as h}from"./ResponsiveTableActions-y54aSdhs.js";import{i as g,r as _,s as v}from"./table-columns-XaoxVUJN.js";import{n as y,t as b}from"./AppModal-B_xvSaeq.js";import{n as x,t as S}from"./UserDisplay-BYhcfa84.js";import{useEffect as C,useMemo as w,useState as T}from"react";import{Fragment as E,jsx as D,jsxs as O}from"react/jsx-runtime";import{useNavigate as k,useSearchParams as A}from"react-router-dom";import{usePermission as j}from"@fudanda/react-core/hooks/usePermission";import{formatDateTime as M}from"@fudanda/react-core/utils/date";import{formatUserLabel as N}from"@fudanda/react-core/utils/user-labels";import{useOperationLogDetail as P}from"@fudanda/react-core/hooks/queries/operation-logs";function F(e,t=e=>e.id,{fixed:n}={}){return{title:`关联信息`,key:`entityRelations`,width:120,fixed:n,render:(n,r)=>{let i=t(r);return i==null?null:/* @__PURE__ */ D(s,{entityRef:{type:e,key:String(i)}})}}}function I(){return(I=e((()=>{c()})))()}function L({label:e,children:t}){return/* @__PURE__ */ O(`div`,{style:H,children:[/* @__PURE__ */ D(`div`,{style:B,children:e}),/* @__PURE__ */ D(`div`,{style:V,children:t})]})}function R({beforeData:e,afterData:t}){let n=e=>{if(!e)return null;try{return JSON.parse(e)}catch{return null}},r=n(e),i=n(t);if(!r&&!i)return/* @__PURE__ */ D(`span`,{style:{color:`var(--arc-antd-color-text-2)`},children:`无变更数据`});let a=Array.from(/* @__PURE__ */ new Set([...Object.keys(r??{}),...Object.keys(i??{})])),o=a.filter(e=>JSON.stringify(r?.[e])!==JSON.stringify(i?.[e]));if(o.length===0&&r&&i)return/* @__PURE__ */ D(`span`,{style:{color:`var(--arc-antd-color-text-2)`},children:`数据未发生变化`});let s=o.length>0?o:a,c=e=>e==null?null:typeof e==`object`?JSON.stringify(e):`${e}`;return/* @__PURE__ */ O(`table`,{style:{width:`100%`,borderCollapse:`collapse`,fontSize:12},children:[/* @__PURE__ */ D(`thead`,{children:/* @__PURE__ */ O(`tr`,{style:{background:`var(--arc-antd-color-fill-0)`},children:[/* @__PURE__ */ D(`th`,{style:{padding:`4px 8px`,textAlign:`left`,width:`30%`},children:`字段`}),/* @__PURE__ */ D(`th`,{style:{padding:`4px 8px`,textAlign:`left`,color:`var(--arc-antd-color-danger)`},children:`变更前`}),/* @__PURE__ */ D(`th`,{style:{padding:`4px 8px`,textAlign:`left`,color:`var(--arc-antd-color-success)`},children:`变更后`})]})}),/* @__PURE__ */ D(`tbody`,{children:s.map(e=>{let t=r?.[e],n=i?.[e],a=JSON.stringify(t)!==JSON.stringify(n);return/* @__PURE__ */ O(`tr`,{style:{background:a?`var(--arc-antd-color-warning-light-default)`:void 0},children:[/* @__PURE__ */ D(`td`,{style:{padding:`3px 8px`,fontWeight:500},children:e}),/* @__PURE__ */ D(`td`,{style:{padding:`3px 8px`,color:a?`var(--arc-antd-color-danger)`:void 0},children:c(t)==null?/* @__PURE__ */ D(`span`,{style:{opacity:.4},children:`—`}):c(t)}),/* @__PURE__ */ D(`td`,{style:{padding:`3px 8px`,color:a?`var(--arc-antd-color-success)`:void 0},children:c(n)==null?/* @__PURE__ */ D(`span`,{style:{opacity:.4},children:`—`}):c(n)})]},e)})})]})}function z({searchConfig:e,dataSource:a,loading:s,pagination:c,onRefresh:p,columnSettings:m,columnSettingsKey:g}){let[y,x]=A(),I=y.get(`operationLogId`),z=I&&/^[1-9]\d*$/.test(I)&&Number.isSafeInteger(Number(I))?Number(I):void 0,[B,V]=T(null),H=P(z,z!==void 0),[U,W]=T(`basic`),G=k(),{hasPermission:K}=j();C(()=>{if(!z||!H.data)return;V(H.data);let e=new URLSearchParams(y);e.delete(`operationLogId`),x(e,{replace:!0})},[z,H.data,y,x]);let q=()=>{if(V(null),W(`basic`),!y.has(`operationLogId`))return;let e=new URLSearchParams(y);e.delete(`operationLogId`),x(e,{replace:!0})},J=w(()=>[{title:`ID`,dataIndex:`id`,width:70,defaultHidden:!0},{title:`操作人`,dataIndex:`username`,width:130,render:(e,t)=>/* @__PURE__ */ O(`span`,{className:`operation-log-actor`,children:[/* @__PURE__ */ D(S,{username:e,nickname:t.nickname}),t.impersonatorName&&/* @__PURE__ */ D(l,{content:`模拟登录:实际由 ${t.impersonatorName} 操作`,children:/* @__PURE__ */ O(d,{size:`small`,color:`orange`,style:{marginLeft:6},children:[`由 `,t.impersonatorName,` 模拟`]})})]})},{title:`功能模块`,dataIndex:`module`,width:110,ellipsis:{showTitle:!1},render:v},{title:`操作描述`,dataIndex:`description`,minWidth:180,render:v},{title:`请求方法`,dataIndex:`method`,width:80,render:e=>/* @__PURE__ */ D(d,{color:`blue`,children:e})},{title:`请求路径`,dataIndex:`path`,width:200,defaultHidden:!0,render:v},{title:`IP 地址`,dataIndex:`ip`,width:130,render:e=>e??`-`},{title:`操作地点`,dataIndex:`location`,width:160,defaultHidden:!0,render:v},{title:`操作系统`,dataIndex:`os`,width:130,defaultHidden:!0,render:v},{title:`浏览器`,dataIndex:`browser`,width:150,defaultHidden:!0,render:v},{title:`耗时`,align:`right`,dataIndex:`durationMs`,width:90,render:e=>e===null?`-`:`${e} ms`},_(`操作时间`,`createdAt`),{...F(`platform.operation-log`,void 0,{fixed:`right`}),defaultHidden:!0},{title:`状态`,dataIndex:`responseCode`,width:80,fixed:`right`,render:e=>{let t=e!=null&&e>=200&&e<400;return/* @__PURE__ */ D(d,{color:t?`green`:`red`,children:t?`成功`:`失败`})}},h({width:80,actions:e=>[{key:`detail`,label:`详情`,onClick:()=>V(e)}]})],[]);return/* @__PURE__ */ O(E,{children:[/* @__PURE__ */ D(o,{searchConfig:e,bordered:!0,columns:J,dataSource:a,loading:s,pagination:c,rowKey:`id`,onRefresh:p,columnSettings:m,columnSettingsKey:g}),/* @__PURE__ */ D(b,{title:`操作日志详情`,visible:B!==null,onCancel:q,footer:null,width:700,style:{top:40},bodyStyle:{padding:`0 0 4px`},children:B&&(()=>{let e=B.responseCode,a=e!=null&&e>=200&&e<400,o=B.durationMs==null?`-`:`${B.durationMs} ms`,s=!!(B.beforeData??B.afterData);return/* @__PURE__ */ O(n,{collapsible:`auto`,type:`line`,style:{padding:`0 4px`},activeKey:U,onChange:W,children:[/* @__PURE__ */ D(r,{tab:`基础信息`,itemKey:`basic`,children:/* @__PURE__ */ D(f,{data:[{key:`ID`,value:B.id},{key:`操作人`,value:N(B.username,B.nickname)},...B.impersonatorName?[{key:`实际操作人`,value:/* @__PURE__ */ O(d,{color:`orange`,size:`small`,children:[B.impersonatorName,`(模拟登录)`]})}]:[],{key:`功能模块`,value:B.module??`-`},{key:`操作描述`,value:B.description},{key:`请求方法`,value:/* @__PURE__ */ D(d,{color:`blue`,size:`small`,children:B.method})},{key:`响应状态`,value:/* @__PURE__ */ D(d,{color:a?`green`:`red`,size:`small`,children:e??`-`})},{key:`耗时`,value:o},{key:`操作时间`,value:M(B.createdAt)},{key:`IP 地址`,value:B.ip??`-`},{key:`操作地点`,value:B.location??`-`},{key:`浏览器`,value:B.browser??`-`,span:2},{key:`操作系统`,value:B.os??`-`},{key:`链路 ID`,span:2,value:B.requestId?/* @__PURE__ */ O(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:8,flexWrap:`wrap`},children:[/* @__PURE__ */ D(t.Text,{copyable:!0,size:`small`,children:B.requestId}),K(`system:trace:view`)&&/* @__PURE__ */ D(u,{size:`small`,theme:`borderless`,type:`primary`,onClick:()=>G(`/system/trace?traceId=${encodeURIComponent(B.requestId)}`),children:`查看链路`})]}):`-`}],column:2,layout:`horizontal`,align:`left`})}),/* @__PURE__ */ D(r,{tab:`请求详情`,itemKey:`request`,children:/* @__PURE__ */ O(`div`,{style:{padding:`4px 0 8px`},children:[/* @__PURE__ */ D(L,{label:`请求路径`,children:B.path}),B.userAgent&&/* @__PURE__ */ D(L,{label:`User-Agent`,children:B.userAgent}),B.requestBody?/* @__PURE__ */ D(L,{label:`请求体`,children:U===`request`&&/* @__PURE__ */ D(i,{className:`operation-log-json-viewer`,value:(()=>{try{return JSON.stringify(JSON.parse(B.requestBody),null,2)}catch{return B.requestBody}})(),height:220,width:`100%`,options:{readOnly:!0,autoWrap:!0,formatOptions:{tabSize:2,insertSpaces:!0}}},B.id)}):/* @__PURE__ */ D(`div`,{style:{padding:`20px 0`,textAlign:`center`,color:`var(--arc-antd-color-text-2)`,fontSize:13},children:`无请求体`})]})}),s&&/* @__PURE__ */ D(r,{tab:`数据变更`,itemKey:`diff`,children:/* @__PURE__ */ D(`div`,{style:{padding:`4px 0 8px`},children:/* @__PURE__ */ D(R,{beforeData:B.beforeData,afterData:B.afterData})})}),/* @__PURE__ */ D(r,{tab:`响应详情`,itemKey:`response`,children:/* @__PURE__ */ D(`div`,{style:{padding:`4px 0 8px`},children:B.responseBody?/* @__PURE__ */ D(L,{label:`完整响应体`,children:U===`response`&&/* @__PURE__ */ D(i,{className:`operation-log-json-viewer`,value:(()=>{try{return JSON.stringify(JSON.parse(B.responseBody),null,2)}catch{return B.responseBody}})(),height:360,width:`100%`,options:{readOnly:!0,autoWrap:!0,formatOptions:{tabSize:2,insertSpaces:!0}}},`res-${B.id}`)}):/* @__PURE__ */ D(`div`,{style:{padding:`20px 0`,textAlign:`center`,color:`var(--arc-antd-color-text-2)`,fontSize:13},children:`无响应体`})})})]})})()})]})}var B,V,H;function U(){return(U=e((()=>{p(),y(),a(),m(),g(),x(),I(),B={color:`var(--arc-antd-color-text-2)`,fontSize:12,marginBottom:2},V={fontSize:13,wordBreak:`break-all`},H={padding:`8px 0`,borderBottom:`1px solid var(--arc-antd-color-border)`}})))()}export{U as n,z as t};