coding-tool-x 3.8.9 → 3.8.10

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 (124) hide show
  1. package/README.md +56 -388
  2. package/dist/web/assets/AgentsDrawer-Bam7kBjG.js +1 -0
  3. package/dist/web/assets/Analytics-D5dUWXEa.js +1 -0
  4. package/dist/web/assets/AssetPathField-CLqalYv-.js +1 -0
  5. package/dist/web/assets/{ChatHistoryDrawer-BTmQ1aQr.js → ChatHistoryDrawer-C1At65O3.js} +1 -1
  6. package/dist/web/assets/{CollapseItem-CwqJk3bE.js → CollapseItem-CVWojShK.js} +1 -1
  7. package/dist/web/assets/CommandsDrawer-BEoypGBf.js +1 -0
  8. package/dist/web/assets/ConfigExportDrawer-DBvFDDWK.js +1 -0
  9. package/dist/web/assets/{ConfigTemplates-gyERg9iC.js → ConfigTemplates-BpaWG-iC.js} +1 -1
  10. package/dist/web/assets/{ConfigTemplatesDrawer-B17RqFi4.js → ConfigTemplatesDrawer-C2lvyKMf.js} +1 -1
  11. package/dist/web/assets/ConfigTemplatesPanel-CorOY7kY.js +1 -0
  12. package/dist/web/assets/{Divider-DsdbkHrG.js → Divider-BLLhMTSt.js} +1 -1
  13. package/dist/web/assets/FavoritesDrawer-uW88N6te.js +1 -0
  14. package/dist/web/assets/GatewayConvertDrawer-i5Wt9Dd9.js +1 -0
  15. package/dist/web/assets/Home-BIxWvm29.js +1 -0
  16. package/dist/web/assets/{MarkdownEditor-9TTwTS-U.js → MarkdownEditor-Ul0bSGj-.js} +1 -1
  17. package/dist/web/assets/McpDrawer-Cc2xq77I.js +1 -0
  18. package/dist/web/assets/McpFormDrawer-DLHX_nrI.js +1 -0
  19. package/dist/web/assets/{PluginManager-BuRcWuBj.js → PluginManager-BGQ0xF2F.js} +1 -1
  20. package/dist/web/assets/{PluginsDrawer-_zZENaQn.js → PluginsDrawer-STwHEqiF.js} +1 -1
  21. package/dist/web/assets/PluginsPanel-1zuNP7da.js +1 -0
  22. package/dist/web/assets/ProjectList-_pe2nk9c.js +1 -0
  23. package/dist/web/assets/PromptsDrawer-CJN1xZk7.js +1 -0
  24. package/dist/web/assets/RecentSessionsDrawer-DX1HI8Nm.js +1 -0
  25. package/dist/web/assets/SessionCard-Op6PHvi0.js +1 -0
  26. package/dist/web/assets/SessionList-Da_TAEYr.js +1 -0
  27. package/dist/web/assets/SettingsDrawer-DKLd4Sjy.js +1 -0
  28. package/dist/web/assets/{SkillManager-S698Hns8.js → SkillManager-PcAa5EbF.js} +1 -1
  29. package/dist/web/assets/{SkillsDrawer-Ms4lPCow.js → SkillsDrawer-DPdU4p6C.js} +1 -1
  30. package/dist/web/assets/SkillsPanel-B9qzRqjd.js +1 -0
  31. package/dist/web/assets/Upload-e1M9Yp5z.js +1 -0
  32. package/dist/web/assets/{WorkspaceDrawer-L7HJRc6u.js → WorkspaceDrawer-oS6mB1VZ.js} +1 -1
  33. package/dist/web/assets/{WorkspaceManager-DsoNg2z8.js → WorkspaceManager-6VvRWe3r.js} +1 -1
  34. package/dist/web/assets/WorkspacePanel-CYq0Z8iY.js +1 -0
  35. package/dist/web/assets/client-BgcNg4Bt.js +1 -0
  36. package/dist/web/assets/{headers-B5JWGn3v.js → headers-DbowkmZJ.js} +1 -1
  37. package/dist/web/assets/{icons-DmFe4b5j.js → icons-B-AzZoeE.js} +1 -1
  38. package/dist/web/assets/index-BlUXw84U.js +2 -0
  39. package/dist/web/assets/index-Bn8BUnwP.css +1 -0
  40. package/dist/web/assets/{light-0eavxNvt.js → light-C2X7hegj.js} +1 -1
  41. package/dist/web/assets/platforms-DrzAtnjY.js +1 -0
  42. package/dist/web/assets/platforms-mqqe_82d.js +1 -0
  43. package/dist/web/assets/project-config-BVt5s-pH.js +1 -0
  44. package/dist/web/assets/sessions-53-Fr68H.js +1 -0
  45. package/dist/web/assets/{sessions-D4yQtfKb.js → sessions-CaWUaysM.js} +1 -1
  46. package/dist/web/assets/use-message-DBsCm7FJ.js +1 -0
  47. package/dist/web/assets/{useResponsiveDrawer-V_onl9NV.js → useResponsiveDrawer-ChHZrTfl.js} +1 -1
  48. package/dist/web/assets/{workspaces-mjyPVGS8.js → workspaces-DQuZd4qw.js} +1 -1
  49. package/dist/web/index.html +8 -8
  50. package/package.json +4 -2
  51. package/src/commands/export-config.js +17 -211
  52. package/src/config/model-metadata.json +180 -16
  53. package/src/platforms/channel-auth-service.js +1 -1
  54. package/src/platforms/commands-service.js +28 -0
  55. package/src/platforms/driver-registry.js +1 -0
  56. package/src/platforms/drivers/claude/channels-implementation.js +79 -90
  57. package/src/platforms/drivers/claude/native-config-implementation.js +3 -4
  58. package/src/platforms/drivers/codex/channels-implementation.js +34 -49
  59. package/src/platforms/drivers/codex/native-config-implementation.js +3 -51
  60. package/src/platforms/drivers/dsh/api-operations.js +1 -1
  61. package/src/platforms/drivers/dsh/channels-implementation.js +28 -8
  62. package/src/platforms/drivers/dsh/channels.js +0 -18
  63. package/src/platforms/drivers/dsh/common.js +7 -0
  64. package/src/platforms/drivers/dsh/native-config.js +7 -2
  65. package/src/platforms/drivers/gemini/channels-implementation.js +47 -55
  66. package/src/platforms/drivers/gemini/native-config-implementation.js +8 -20
  67. package/src/platforms/drivers/generic-native-config.js +20 -0
  68. package/src/platforms/drivers/native-config-snapshot.js +30 -4
  69. package/src/platforms/drivers/omp/channels-implementation.js +51 -17
  70. package/src/platforms/drivers/omp/native-config-implementation.js +10 -17
  71. package/src/platforms/drivers/opencode/channels-implementation.js +6 -0
  72. package/src/platforms/drivers/opencode/native-config-implementation.js +3 -67
  73. package/src/platforms/manifest-schema.js +35 -2
  74. package/src/platforms/manifests/claude.json +0 -8
  75. package/src/platforms/manifests/codex.json +0 -8
  76. package/src/platforms/manifests/dsh.json +6 -9
  77. package/src/platforms/manifests/gemini.json +0 -8
  78. package/src/platforms/manifests/omp.json +0 -8
  79. package/src/platforms/manifests/opencode.json +0 -8
  80. package/src/platforms/native-oauth-adapters.js +33 -33
  81. package/src/server/index.js +2 -0
  82. package/src/server/services/bounded-content.js +60 -0
  83. package/src/server/services/channel-balance.js +10 -4
  84. package/src/server/services/config-export-service.js +2 -2
  85. package/src/server/services/config-templates-service.js +5 -1
  86. package/src/server/services/plugins-service.js +162 -85
  87. package/src/server/services/session-history-maintenance-worker.js +71 -0
  88. package/src/server/services/session-history-maintenance.js +166 -0
  89. package/src/server/services/skill-service.js +23 -3
  90. package/src/server/services/speed-test.js +0 -72
  91. package/src/shared/channel-driver.js +16 -0
  92. package/src/shared/driver-factories/api.js +1 -0
  93. package/src/utils/native-config-patcher.js +474 -0
  94. package/dist/web/assets/AgentsDrawer-Cj5CJ4d9.js +0 -1
  95. package/dist/web/assets/Analytics-1doS-8uC.js +0 -1
  96. package/dist/web/assets/AssetPathField-C9TOPl7o.js +0 -1
  97. package/dist/web/assets/CommandsDrawer-CaZWDI_G.js +0 -1
  98. package/dist/web/assets/ConfigExportDrawer-C3vSZEsS.js +0 -1
  99. package/dist/web/assets/ConfigTemplatesPanel-DKIC_FqG.js +0 -1
  100. package/dist/web/assets/FavoritesDrawer-DaziQmBp.js +0 -1
  101. package/dist/web/assets/GatewayConvertDrawer-OMgWUUSc.js +0 -1
  102. package/dist/web/assets/Home-DOSUTfrE.js +0 -1
  103. package/dist/web/assets/McpDrawer-I8rl8lGH.js +0 -1
  104. package/dist/web/assets/McpFormDrawer-DEP3C7ut.js +0 -1
  105. package/dist/web/assets/PluginsPanel-Bs5qZ-TK.js +0 -1
  106. package/dist/web/assets/ProjectList-BSxuL2td.js +0 -1
  107. package/dist/web/assets/PromptsDrawer-CoZ-ZtsY.js +0 -1
  108. package/dist/web/assets/RecentSessionsDrawer-B_17aJBG.js +0 -1
  109. package/dist/web/assets/SessionCard-BL_x0d3t.js +0 -1
  110. package/dist/web/assets/SessionList-DhRYZ6vl.js +0 -1
  111. package/dist/web/assets/SettingsDrawer-fYb0DU7X.js +0 -1
  112. package/dist/web/assets/SkillsPanel-rqnqAOGL.js +0 -1
  113. package/dist/web/assets/SpeedTestDrawer-Bbn38SfV.js +0 -1
  114. package/dist/web/assets/SpeedTestDrawer-Dc0WToJ_.css +0 -1
  115. package/dist/web/assets/Upload-CdyVHxCI.js +0 -1
  116. package/dist/web/assets/WorkspacePanel-Be8PVZah.js +0 -1
  117. package/dist/web/assets/client-UDwXBP9i.js +0 -1
  118. package/dist/web/assets/index-3Lp6z8TQ.css +0 -1
  119. package/dist/web/assets/index-BKlAWTH-.js +0 -2
  120. package/dist/web/assets/platforms-BmzzwnSw.js +0 -1
  121. package/dist/web/assets/platforms-DWXgmy2w.js +0 -1
  122. package/dist/web/assets/project-config-B2baPzYL.js +0 -1
  123. package/dist/web/assets/sessions-CC0j-KH_.js +0 -1
  124. package/dist/web/assets/use-message-DqCwefG6.js +0 -1
@@ -0,0 +1 @@
1
+ import{At as e,Ct as t,Dn as n,Dt as r,L as i,N as a,Ot as o,Qt as s,St as l,Tt as u,Yt as c,Zt as d,bn as h,c as p,ft as f,gn as v,gt as g,hn as m,ht as y,i as _,j as x,k as b,mt as w,pn as S,s as C,t as k,vn as M,xn as T,xt as D,y as I,yn as A,zt as P}from"./_plugin-vue_export-helper-BeLZJZij.js";import{$ as O,A as R,C as L,D as z,G as N,I as B,K as F,M as E,N as V,O as H,Q as Y,S as W,U as $,V as G,W as U,X as j,Z,_ as q,_t as X,b as K,ct as Q,dt as J,et as ee,g as te,ht as ne,it as re,j as ie,l as ae,lt as oe,mt as se,pt as le,st as ue,tt as ce,w as de,x as he,z as pe}from"./vue-vendor-BqZbbXHA.js";import{Q as fe,X as ve,at as ge}from"./icons-B-AzZoeE.js";import{D as me,O as ye,h as _e,k as xe,t as be,w as we}from"./use-message-DBsCm7FJ.js";import{i as Se,n as Ce,r as ke,t as Me}from"./Forward-DLCL7aMY.js";import{$ as Te,Ct as De,J as Ie,K as Ae,M as Pe,S as Oe,Tt as Re,b as Le,mt as ze,q as Ne,st as Be,wt as Fe,x as Ee}from"./index-BlUXw84U.js";Math.pow(10,8);var Ve=6048e5,He=Symbol.for("constructDateFrom");function Ye(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&He in e?e[He](t):e instanceof Date?new e.constructor(t):new Date(t)}function We(e,...t){const n=Ye.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}var $e={};function Ge(){return $e}function Ue(e,t){return Ye(t||e,e)}function je(e,t){const n=Ge(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Ue(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}var Ze=b("date",()=>E("svg",{width:"28px",height:"28px",viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},E("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},E("g",{"fill-rule":"nonzero"},E("path",{d:"M21.75,3 C23.5449254,3 25,4.45507456 25,6.25 L25,21.75 C25,23.5449254 23.5449254,25 21.75,25 L6.25,25 C4.45507456,25 3,23.5449254 3,21.75 L3,6.25 C3,4.45507456 4.45507456,3 6.25,3 L21.75,3 Z M23.5,9.503 L4.5,9.503 L4.5,21.75 C4.5,22.7164983 5.28350169,23.5 6.25,23.5 L21.75,23.5 C22.7164983,23.5 23.5,22.7164983 23.5,21.75 L23.5,9.503 Z M21.75,4.5 L6.25,4.5 C5.28350169,4.5 4.5,5.28350169 4.5,6.25 L4.5,8.003 L23.5,8.003 L23.5,6.25 C23.5,5.28350169 22.7164983,4.5 21.75,4.5 Z"}))))),qe=b("time",()=>E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},E("path",{d:"M256,64C150,64,64,150,64,256s86,192,192,192,192-86,192-192S362,64,256,64Z",style:"\n fill: none;\n stroke: currentColor;\n stroke-miterlimit: 10;\n stroke-width: 32px;\n "}),E("polyline",{points:"256 128 256 272 352 272",style:"\n fill: none;\n stroke: currentColor;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 32px;\n "}))),Xe=b("to",()=>E("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},E("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},E("g",{fill:"currentColor","fill-rule":"nonzero"},E("path",{d:"M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z"})))));function Ke(e,t,n){const r=Ue(e,n?.in);return isNaN(t)?Ye(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function Qe(e,t,n){const r=Ue(e,n?.in);if(isNaN(t))return Ye(n?.in||e,NaN);if(!t)return r;const i=r.getDate(),a=Ye(n?.in||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function Je(e,t){return je(e,{...t,weekStartsOn:1})}function et(e,t){const n=Ue(e,t?.in),r=n.getFullYear(),i=Ye(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=Je(i),o=Ye(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const s=Je(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function tt(e){const t=Ue(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function nt(e,t){const n=Ue(e,t?.in);return n.setHours(0,0,0,0),n}function rt(e,t,n){return Qe(e,3*t,n)}function it(e,t,n){return Qe(e,12*t,n)}function at(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+Ue(e)));var t}function ot(e,t){const n=Ue(e,t?.in);return Math.trunc(n.getMonth()/3)+1}function st(e,t){const n=Ue(e,t?.in),r=n.getMonth(),i=r-r%3;return n.setMonth(i,1),n.setHours(0,0,0,0),n}function lt(e,t){const n=Ue(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function ut(e,t){const n=Ue(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ct(e,t){const n=Ue(e,t?.in);return function(e,t,n){const[r,i]=We(n?.in,e,t),a=nt(r),o=nt(i),s=+a-tt(a),l=+o-tt(o);return Math.round((s-l)/864e5)}(n,ut(n))+1}function dt(e,t){const n=Ue(e,t?.in),r=+Je(n)-+function(e,t){const n=et(e,t),r=Ye(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Je(r)}(n);return Math.round(r/Ve)+1}function ht(e,t){const n=Ue(e,t?.in),r=n.getFullYear(),i=Ge(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=Ye(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=je(o,t),l=Ye(t?.in||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=je(l,t);return+n>=+s?r+1:+n>=+u?r:r-1}function pt(e,t){const n=Ue(e,t?.in),r=+je(n,t)-+function(e,t){const n=Ge(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=ht(e,t),a=Ye(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),je(a,t)}(n,t);return Math.round(r/Ve)+1}function ft(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}var vt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ft("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):ft(n+1,2)},d:(e,t)=>ft(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>ft(e.getHours()%12||12,t.length),H:(e,t)=>ft(e.getHours(),t.length),m:(e,t)=>ft(e.getMinutes(),t.length),s:(e,t)=>ft(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return ft(Math.trunc(r*Math.pow(10,n-3)),t.length)}},gt="midnight",mt="noon",yt="morning",_t="afternoon",xt="evening",bt="night",wt={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return vt.y(e,t)},Y:function(e,t,n,r){const i=ht(e,r),a=i>0?i:1-i;if("YY"===t){return ft(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):ft(a,t.length)},R:function(e,t){return ft(et(e),t.length)},u:function(e,t){return ft(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ft(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ft(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return vt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ft(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=pt(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):ft(i,t.length)},I:function(e,t,n){const r=dt(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):ft(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):vt.d(e,t)},D:function(e,t,n){const r=ct(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):ft(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ft(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ft(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return ft(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(i=12===r?mt:0===r?gt:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(i=r>=17?xt:r>=12?_t:r>=4?yt:bt,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return vt.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):vt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):ft(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):ft(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):vt.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):vt.s(e,t)},S:function(e,t){return vt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Ct(r);case"XXXX":case"XX":return kt(r);default:return kt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ct(r);case"xxxx":case"xx":return kt(r);default:return kt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+St(r,":");default:return"GMT"+kt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+St(r,":");default:return"GMT"+kt(r,":")}},t:function(e,t,n){return ft(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return ft(+e,t.length)}};function St(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return 0===a?n+String(i):n+String(i)+t+ft(a,2)}function Ct(e,t){return e%60==0?(e>0?"-":"+")+ft(Math.abs(e)/60,2):kt(e,t)}function kt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+ft(Math.trunc(r/60),2)+t+ft(r%60,2)}var Mt=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Tt=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Dt={p:Tt,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Mt(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",Mt(r,t)).replace("{{time}}",Tt(i,t))}},It=/^D+$/,At=/^Y+$/,Pt=["D","DD","YY","YYYY"];function Ot(e){return It.test(e)}function Rt(e){return At.test(e)}function Lt(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(Pt.includes(e))throw new RangeError(r)}var zt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Nt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bt=/^'([^]*?)'?$/,Ft=/''/g,Et=/[a-zA-Z]/;function Vt(e,t,n){const r=Ge(),i=n?.locale??r.locale??f,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Ue(e,n?.in);if(!at(s))throw new RangeError("Invalid time value");let l=t.match(Nt).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,Dt[t])(e,i.formatLong)}return e}).join("").match(zt).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Ht(e)};if(wt[t])return{isToken:!0,value:e};if(t.match(Et))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return l.map(r=>{if(!r.isToken)return r.value;const a=r.value;(!n?.useAdditionalWeekYearTokens&&Rt(a)||!n?.useAdditionalDayOfYearTokens&&Ot(a))&&Lt(a,t,String(e));return(0,wt[a[0]])(s,a,i.localize,u)}).join("")}function Ht(e){const t=e.match(Bt);return t?t[1].replace(Ft,"'"):e}function Yt(e,t){return Ue(e,t?.in).getDate()}function Wt(e,t){return Ue(e,t?.in).getDay()}function $t(){return Object.assign({},Ge())}function Gt(e,t){return Ue(e,t?.in).getHours()}function Ut(e,t){return Ue(e,t?.in).getMinutes()}function jt(e,t){return Ue(e,t?.in).getMonth()}function Zt(e){return Ue(e).getSeconds()}function qt(e){return+Ue(e)}function Xt(e,t){return Ue(e,t?.in).getFullYear()}var Kt=class{subPriority=0;validate(e,t){return!0}},Qt=class extends Kt{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}},Jt=class extends Kt{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>Ye(t,e))}set(e,t){return t.timestampIsSet?e:Ye(e,function(e,t){const n=function(e){return"function"==typeof e&&e.prototype?.constructor===e}(t)?new t(0):Ye(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}(e,this.context))}},en=class{run(e,t,n,r){const i=this.parse(e,t,n,r);return i?{setter:new Qt(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,n){return!0}},tn=/^(1[0-2]|0?\d)/,nn=/^(3[0-1]|[0-2]?\d)/,rn=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,an=/^(5[0-3]|[0-4]?\d)/,on=/^(2[0-3]|[0-1]?\d)/,sn=/^(2[0-4]|[0-1]?\d)/,ln=/^(1[0-1]|0?\d)/,un=/^(1[0-2]|0?\d)/,cn=/^[0-5]?\d/,dn=/^[0-5]?\d/,hn=/^\d/,pn=/^\d{1,2}/,fn=/^\d{1,3}/,vn=/^\d{1,4}/,gn=/^-?\d+/,mn=/^-?\d/,yn=/^-?\d{1,2}/,_n=/^-?\d{1,3}/,xn=/^-?\d{1,4}/,bn=/^([+-])(\d{2})(\d{2})?|Z/,wn=/^([+-])(\d{2})(\d{2})|Z/,Sn=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Cn=/^([+-])(\d{2}):(\d{2})|Z/,kn=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Mn(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Tn(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Dn(e,t){const n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};return{value:("+"===n[1]?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:t.slice(n[0].length)}}function In(e){return Tn(gn,e)}function An(e,t){switch(e){case 1:return Tn(hn,t);case 2:return Tn(pn,t);case 3:return Tn(fn,t);case 4:return Tn(vn,t);default:return Tn(new RegExp("^\\d{1,"+e+"}"),t)}}function Pn(e,t){switch(e){case 1:return Tn(mn,t);case 2:return Tn(yn,t);case 3:return Tn(_n,t);case 4:return Tn(xn,t);default:return Tn(new RegExp("^-?\\d{1,"+e+"}"),t)}}function On(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Rn(e,t){const n=t>0,r=n?t:1-t;let i;if(r<=50)i=e||100;else{const t=r+50;i=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?i:1-i}function Ln(e){return e%400==0||e%4==0&&e%100!=0}var zn=[31,28,31,30,31,30,31,31,30,31,30,31],Nn=[31,29,31,30,31,30,31,31,30,31,30,31];function Bn(e,t,n){const r=Ge(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Ue(e,n?.in),o=a.getDay(),s=7-i;return Ke(a,t<0||t>6?t-(o+s)%7:((t%7+7)%7+s)%7-(o+s)%7,n)}function Fn(e,t,n){const r=Ue(e,n?.in),i=t-function(e,t){const n=Ue(e,t?.in).getDay();return 0===n?7:n}(r,n);return Ke(r,i,n)}var En={G:new class extends en{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends en{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return Mn(An(4,e),r);case"yo":return Mn(n.ordinalNumber(e,{unit:"year"}),r);default:return Mn(An(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const t=Rn(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const i="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},Y:new class extends en{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return Mn(An(4,e),r);case"Yo":return Mn(n.ordinalNumber(e,{unit:"year"}),r);default:return Mn(An(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const i=ht(e,r);if(n.isTwoDigitYear){const t=Rn(n.year,i);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),je(e,r)}const a="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(a,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),je(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends en{priority=130;parse(e,t){return Pn("R"===t?4:t.length,e)}set(e,t,n){const r=Ye(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Je(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends en{priority=130;parse(e,t){return Pn("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends en{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return An(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends en{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return An(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends en{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"M":return Mn(Tn(tn,e),r);case"MM":return Mn(An(2,e),r);case"Mo":return Mn(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends en{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return Mn(Tn(tn,e),r);case"LL":return Mn(An(2,e),r);case"Lo":return Mn(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends en{priority=100;parse(e,t,n){switch(t){case"w":return Tn(an,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return An(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return je(function(e,t,n){const r=Ue(e,n?.in),i=pt(r,n)-t;return r.setDate(r.getDate()-7*i),Ue(r,n?.in)}(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends en{priority=100;parse(e,t,n){switch(t){case"I":return Tn(an,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return An(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return Je(function(e,t,n){const r=Ue(e,n?.in),i=dt(r,n)-t;return r.setDate(r.getDate()-7*i),r}(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends en{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return Tn(nn,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return An(t.length,e)}}validate(e,t){const n=Ln(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=Nn[r]:t>=1&&t<=zn[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends en{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return Tn(rn,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return An(t.length,e)}}validate(e,t){return Ln(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends en{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Bn(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends en{priority=90;parse(e,t,n,r){const i=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Mn(An(t.length,e),i);case"eo":return Mn(n.ordinalNumber(e,{unit:"day"}),i);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Bn(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends en{priority=90;parse(e,t,n,r){const i=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Mn(An(t.length,e),i);case"co":return Mn(n.ordinalNumber(e,{unit:"day"}),i);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Bn(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends en{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return An(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return Mn(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return Mn(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Mn(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return Mn(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=Fn(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends en{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(On(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends en{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(On(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends en{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(On(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends en{priority=70;parse(e,t,n){switch(t){case"h":return Tn(un,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return An(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends en{priority=70;parse(e,t,n){switch(t){case"H":return Tn(on,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return An(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends en{priority=70;parse(e,t,n){switch(t){case"K":return Tn(ln,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return An(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends en{priority=70;parse(e,t,n){switch(t){case"k":return Tn(sn,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return An(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends en{priority=60;parse(e,t,n){switch(t){case"m":return Tn(cn,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return An(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends en{priority=50;parse(e,t,n){switch(t){case"s":return Tn(dn,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return An(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends en{priority=30;parse(e,t){return Mn(An(t.length,e),e=>Math.trunc(e*Math.pow(10,3-t.length)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends en{priority=10;parse(e,t){switch(t){case"X":return Dn(bn,e);case"XX":return Dn(wn,e);case"XXXX":return Dn(Sn,e);case"XXXXX":return Dn(kn,e);default:return Dn(Cn,e)}}set(e,t,n){return t.timestampIsSet?e:Ye(e,e.getTime()-tt(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends en{priority=10;parse(e,t){switch(t){case"x":return Dn(bn,e);case"xx":return Dn(wn,e);case"xxxx":return Dn(Sn,e);case"xxxxx":return Dn(kn,e);default:return Dn(Cn,e)}}set(e,t,n){return t.timestampIsSet?e:Ye(e,e.getTime()-tt(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends en{priority=40;parse(e){return In(e)}set(e,t,n){return[Ye(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends en{priority=20;parse(e){return In(e)}set(e,t,n){return[Ye(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Vn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Hn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Yn=/^'([^]*?)'?$/,Wn=/''/g,$n=/\S/,Gn=/[a-zA-Z]/;function Un(e){return e.match(Yn)[1].replace(Wn,"'")}function jn(e,t,n){const[r,i]=We(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function Zn(e,t,n){const[r,i]=We(n?.in,e,t);return+st(r)===+st(i)}function qn(e,t){const n=Ue(e,t?.in);return n.setMilliseconds(0),n}function Xn(e,t,n){const[r,i]=We(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function Kn(e,t,n){const r=Ue(e,n?.in),i=r.getFullYear(),a=r.getDate(),o=Ye(n?.in||e,0);o.setFullYear(i,t,15),o.setHours(0,0,0,0);const s=function(e,t){const n=Ue(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=Ye(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}(o);return r.setMonth(t,Math.min(a,s)),r}function Qn(e,t,n){let r=Ue(e,n?.in);return isNaN(+r)?Ye(n?.in||e,NaN):(null!=t.year&&r.setFullYear(t.year),null!=t.month&&(r=Kn(r,t.month)),null!=t.date&&r.setDate(t.date),null!=t.hours&&r.setHours(t.hours),null!=t.minutes&&r.setMinutes(t.minutes),null!=t.seconds&&r.setSeconds(t.seconds),null!=t.milliseconds&&r.setMilliseconds(t.milliseconds),r)}function Jn(e,t,n){const r=Ue(e,n?.in);return r.setHours(t),r}function er(e,t,n){const r=Ue(e,n?.in);return r.setMinutes(t),r}function tr(e,t,n){const r=Ue(e,n?.in);return r.setSeconds(t),r}function nr(e,t,n){const r=Ue(e,n?.in);return isNaN(+r)?Ye(n?.in||e,NaN):(r.setFullYear(t),r)}var rr={date:function(e,t,n){const[r,i]=We(n?.in,e,t);return+nt(r)===+nt(i)},month:jn,year:Xn,quarter:Zn};function ir(e){return(t,n)=>{const r=function(e){return(e+1)%7}(e);return function(e,t,n){const[r,i]=We(n?.in,e,t);return+je(r,n)===+je(i,n)}(t,n,{weekStartsOn:r})}}function ar(e,t,n,r=0){return("week"===n?ir(r):rr[n])(e,t)}function or(e,t,n,r,i,a){return"date"===i?function(e,t,n,r){let i=!1,a=!1,o=!1;Array.isArray(n)&&(n[0]<e&&e<n[1]&&(i=!0),ar(n[0],e,"date")&&(a=!0),ar(n[1],e,"date")&&(o=!0));const s=null!==n&&(Array.isArray(n)?ar(n[0],e,"date")||ar(n[1],e,"date"):ar(n,e,"date"));return{type:"date",dateObject:{date:Yt(e),month:jt(e),year:Xt(e)},inCurrentMonth:jn(e,t),isCurrentDate:ar(r,e,"date"),inSpan:i,inSelectedWeek:!1,startOfSpan:a,endOfSpan:o,selected:s,ts:qt(e)}}(e,t,n,r):function(e,t,n,r,i){let a=!1,o=!1,s=!1;Array.isArray(n)&&(n[0]<e&&e<n[1]&&(a=!0),ar(n[0],e,"week",i)&&(o=!0),ar(n[1],e,"week",i)&&(s=!0));const l=null!==n&&(Array.isArray(n)?ar(n[0],e,"week",i)||ar(n[1],e,"week",i):ar(n,e,"week",i));return{type:"date",dateObject:{date:Yt(e),month:jt(e),year:Xt(e)},inCurrentMonth:jn(e,t),isCurrentDate:ar(r,e,"date"),inSpan:a,startOfSpan:o,endOfSpan:s,selected:!1,inSelectedWeek:l,ts:qt(e)}}(e,t,n,r,a)}function sr(e,t,n){return Vt(new Date(2e3,e,1).getTime(),t,{locale:n})}function lr(e,t,n){return Vt(new Date(e,1,1).getTime(),t,{locale:n})}function ur(e,t,n){return Vt(new Date(2e3,3*e-2,1).getTime(),t,{locale:n})}function cr(e,t,n,{monthFormat:r}){return{type:"month",monthFormat:r,dateObject:{month:jt(e),year:Xt(e)},isCurrent:jn(n,e),selected:null!==t&&ar(t,e,"month"),ts:qt(e)}}function dr(e,t,n,{yearFormat:r}){return{type:"year",yearFormat:r,dateObject:{year:Xt(e)},isCurrent:Xn(n,e),selected:null!==t&&ar(t,e,"year"),ts:qt(e)}}function hr(e,t,n,{quarterFormat:r}){return{type:"quarter",quarterFormat:r,dateObject:{quarter:ot(e),year:Xt(e)},isCurrent:Zn(n,e),selected:null!==t&&ar(t,e,"quarter"),ts:qt(e)}}function pr(e,t,n,r,i=!1,a=!1){const o=a?"week":"date",s=jt(e);let l=qt(lt(e)),u=qt(Ke(l,-1));const c=[];let d=!i;for(;Wt(u)!==r||d;)c.unshift(or(u,e,t,n,o,r)),u=qt(Ke(u,-1)),d=!1;for(;jt(l)===s;)c.push(or(l,e,t,n,o,r)),l=qt(Ke(l,1));const h=i?c.length<=28?28:c.length<=35?35:42:42;for(;c.length<h;)c.push(or(l,e,t,n,o,r)),l=qt(Ke(l,1));return c}function fr(e,t,n,r){const i=[],a=ut(e);for(let o=0;o<12;o++)i.push(cr(qt(Qe(a,o)),t,n,r));return i}function vr(e,t,n,r){const i=[],a=ut(e);for(let o=0;o<4;o++)i.push(hr(qt(rt(a,o)),t,n,r));return i}function gr(e,t,n,r){const i=r.value,a=[],o=ut(nr(new Date,i[0]));for(let s=0;s<i[1]-i[0];s++)a.push(dr(qt(it(o,s)),e,t,n));return a}function mr(e,t,n,r){const i=function(e,t,n,r){const i=()=>Ye(r?.in||n,NaN),a=$t(),o=r?.locale??a.locale??f,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!t)return e?i():Ue(n,r?.in);const u={firstWeekContainsDate:s,weekStartsOn:l,locale:o},c=[new Jt(r?.in,n)],d=t.match(Hn).map(e=>{const t=e[0];return t in Dt?(0,Dt[t])(e,o.formatLong):e}).join("").match(Vn),h=[];for(let f of d){!r?.useAdditionalWeekYearTokens&&Rt(f)&&Lt(f,t,e),!r?.useAdditionalDayOfYearTokens&&Ot(f)&&Lt(f,t,e);const n=f[0],a=En[n];if(a){const{incompatibleTokens:t}=a;if(Array.isArray(t)){const e=h.find(e=>t.includes(e.token)||e.token===n);if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${f}\` at the same time`)}else if("*"===a.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${f}\` and any other token at the same time`);h.push({token:n,fullToken:f});const r=a.run(e,f,o.match,u);if(!r)return i();c.push(r.setter),e=r.rest}else{if(n.match(Gn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===f?f="'":"'"===n&&(f=Un(f)),0!==e.indexOf(f))return i();e=e.slice(f.length)}}if(e.length>0&&$n.test(e))return i();const p=c.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>c.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]);let v=Ue(n,r?.in);if(isNaN(+v))return i();const g={};for(const f of p){if(!f.validate(v,u))return i();const e=f.set(v,g,u);Array.isArray(e)?(v=e[0],Object.assign(g,e[1])):v=e}return v}(e,t,n,r);return at(i)?Vt(i,t,r)===e?i:new Date(NaN):i}function yr(e,t,n,r){return _r(t(e,n,r))}function _r(e){if(void 0===e)return;if("number"==typeof e)return e;const[t,n,r]=e.split(":");return{hours:Number(t),minutes:Number(n),seconds:Number(r)}}function xr(e,t){return Array.isArray(e)?e["start"===t?0:1]:null}var br=c("n-date-picker"),wr={active:Boolean,dateFormat:String,calendarDayFormat:String,calendarHeaderYearFormat:String,calendarHeaderMonthFormat:String,calendarHeaderMonthYearSeparator:{type:String,required:!0},calendarHeaderMonthBeforeYear:{type:Boolean,default:void 0},timePickerFormat:{type:String,value:"HH:mm:ss"},value:{type:[Array,Number],default:null},shortcuts:Object,defaultTime:[Number,String,Array,Function],inputReadonly:Boolean,onClear:Function,onConfirm:Function,onClose:Function,onTabOut:Function,onKeydown:Function,actions:Array,onUpdateValue:{type:Function,required:!0},themeClass:String,onRender:Function,panel:Boolean,onNextMonth:Function,onPrevMonth:Function,onNextYear:Function,onPrevYear:Function};function Sr(e){const{dateLocaleRef:t,timePickerSizeRef:n,timePickerPropsRef:r,localeRef:i,mergedClsPrefixRef:a,mergedThemeRef:o}=V(br),s=K(()=>({locale:t.value.locale})),l=ue(null),u=Fe();function c(t,n){const{onUpdateValue:r}=e;r(t,n)}function d(t=!1){const{onClose:n}=e;n&&n(t)}function h(){const{onTabOut:t}=e;t&&t()}let p=null,f=!1;function v(){f&&(c(p,!1),f=!1)}const g=ue(!1);return{mergedTheme:o,mergedClsPrefix:a,dateFnsOptions:s,timePickerSize:n,timePickerProps:r,selfRef:l,locale:i,doConfirm:function(){const{onConfirm:t,value:n}=e;t&&t(n)},doClose:d,doUpdateValue:c,doTabOut:h,handleClearClick:function(){c(null,!0),d(!0),function(){const{onClear:t}=e;t&&t()}()},handleFocusDetectorFocus:function(){h()},disableTransitionOneTick:function(){(e.active||e.panel)&&B(()=>{const{value:e}=l;if(!e)return;const t=e.querySelectorAll("[data-n-date]");t.forEach(e=>{e.classList.add("transition-disabled")}),e.offsetWidth,t.forEach(e=>{e.classList.remove("transition-disabled")})})},handlePanelKeyDown:function(e){"Tab"===e.key&&e.target===l.value&&u.shift&&(e.preventDefault(),h())},handlePanelFocus:function(e){const{value:t}=l;u.tab&&e.target===t&&(null==t?void 0:t.contains(e.relatedTarget))&&h()},cachePendingValue:function(){p=e.value,f=!0},clearPendingValue:function(){f=!1},restorePendingValue:v,getShortcutValue:function(e){return"function"==typeof e?e():e},handleShortcutMouseleave:v,showMonthYearPanel:g,handleOpenQuickSelectMonthPanel:function(){g.value=!g.value}}}var Cr=Object.assign(Object.assign({},wr),{defaultCalendarStartTime:Number,actions:{type:Array,default:()=>["now","clear","confirm"]}});function kr(e,t){var n;const r=Sr(e),{isValueInvalidRef:i,isDateDisabledRef:a,isDateInvalidRef:o,isTimeInvalidRef:s,isDateTimeInvalidRef:l,isHourDisabledRef:u,isMinuteDisabledRef:c,isSecondDisabledRef:d,localeRef:h,firstDayOfWeekRef:p,datePickerSlots:f,yearFormatRef:v,monthFormatRef:g,quarterFormatRef:m,yearRangeRef:y}=V(br),_={isValueInvalid:i,isDateDisabled:a,isDateInvalid:o,isTimeInvalid:s,isDateTimeInvalid:l,isHourDisabled:u,isMinuteDisabled:c,isSecondDisabled:d},x=K(()=>e.dateFormat||h.value.dateFormat),b=K(()=>e.calendarDayFormat||h.value.dayFormat),w=ue(null===e.value||Array.isArray(e.value)?"":Vt(e.value,x.value)),S=ue(null===e.value||Array.isArray(e.value)?null!==(n=e.defaultCalendarStartTime)&&void 0!==n?n:Date.now():e.value),C=ue(null),k=ue(null),M=ue(null),T=ue(Date.now()),D=K(()=>{var n;return pr(S.value,e.value,T.value,null!==(n=p.value)&&void 0!==n?n:h.value.firstDayOfWeek,!1,"week"===t)}),I=K(()=>{const{value:t}=e;return fr(S.value,Array.isArray(t)?null:t,T.value,{monthFormat:g.value})}),A=K(()=>{const{value:t}=e;return gr(Array.isArray(t)?null:t,T.value,{yearFormat:v.value},y)}),P=K(()=>{const{value:t}=e;return vr(S.value,Array.isArray(t)?null:t,T.value,{quarterFormat:m.value})}),O=K(()=>D.value.slice(0,7).map(e=>{const{ts:t}=e;return Vt(t,b.value,r.dateFnsOptions.value)})),R=K(()=>Vt(S.value,e.calendarHeaderMonthFormat||h.value.monthFormat,r.dateFnsOptions.value)),L=K(()=>Vt(S.value,e.calendarHeaderYearFormat||h.value.yearFormat,r.dateFnsOptions.value)),z=K(()=>{var t;return null!==(t=e.calendarHeaderMonthBeforeYear)&&void 0!==t?t:h.value.monthBeforeYear});function N(e){var n;if("datetime"===t)return qt(qn(e));if("month"===t)return qt(lt(e));if("year"===t)return qt(ut(e));if("quarter"===t)return qt(st(e));if("week"===t){return qt(je(e,{weekStartsOn:((null!==(n=p.value)&&void 0!==n?n:h.value.firstDayOfWeek)+1)%7}))}return qt(nt(e))}function B(e,t){const{isDateDisabled:{value:n}}=_;return!!n&&n(e,t)}Z(S,(e,n)=>{"date"!==t&&"datetime"!==t||jn(e,n)||r.disableTransitionOneTick()}),Z(K(()=>e.value),e=>{null===e||Array.isArray(e)?w.value="":(w.value=Vt(e,x.value,r.dateFnsOptions.value),S.value=e)});const F=ue(null);function E(){_.isDateInvalid.value||_.isTimeInvalid.value||(r.doConfirm(),e.active&&r.doClose())}function H(t){const{value:n}=e;if(M.value){const e=jt(void 0===t?null===n?Date.now():n:t);M.value.scrollTo({top:40*e})}if(C.value){const e=Xt(void 0===t?null===n?Date.now():n:t)-y.value[0];C.value.scrollTo({top:40*e})}}const Y={monthScrollbarRef:M,yearScrollbarRef:k,yearVlRef:C};return Object.assign(Object.assign(Object.assign(Object.assign({dateArray:D,monthArray:I,yearArray:A,quarterArray:P,calendarYear:L,calendarMonth:R,weekdays:O,calendarMonthBeforeYear:z,mergedIsDateDisabled:B,nextYear:function(){var t;S.value=qt(it(S.value,1)),null===(t=e.onNextYear)||void 0===t||t.call(e)},prevYear:function(){var t;S.value=qt(it(S.value,-1)),null===(t=e.onPrevYear)||void 0===t||t.call(e)},nextMonth:function(){var t;S.value=qt(Qe(S.value,1)),null===(t=e.onNextMonth)||void 0===t||t.call(e)},prevMonth:function(){var t;S.value=qt(Qe(S.value,-1)),null===(t=e.onPrevMonth)||void 0===t||t.call(e)},handleNowClick:function(){r.doUpdateValue(qt(N(Date.now())),!0);const n=Date.now();S.value=n,r.doClose(!0),!e.panel||"month"!==t&&"quarter"!==t&&"year"!==t||(r.disableTransitionOneTick(),H(n))},handleConfirmClick:E,handleSingleShortcutMouseenter:function(e){r.cachePendingValue();const t=r.getShortcutValue(e);"number"==typeof t&&r.doUpdateValue(t,!1)},handleSingleShortcutClick:function(t){const n=r.getShortcutValue(t);"number"==typeof n&&(r.doUpdateValue(n,e.panel),r.clearPendingValue(),E())}},_),r),Y),{handleDateClick:function(n){if(B(n.ts,"date"===n.type?{type:"date",year:n.dateObject.year,month:n.dateObject.month,date:n.dateObject.date}:"month"===n.type?{type:"month",year:n.dateObject.year,month:n.dateObject.month}:"year"===n.type?{type:"year",year:n.dateObject.year}:{type:"quarter",year:n.dateObject.year,quarter:n.dateObject.quarter}))return;let i;if(i=null===e.value||Array.isArray(e.value)?Date.now():e.value,"datetime"===t&&null!==e.defaultTime&&!Array.isArray(e.defaultTime)){let t;"function"==typeof e.defaultTime?(a=n.ts,t=_r((0,e.defaultTime)(a))):t=_r(e.defaultTime),t&&(i=qt(Qn(i,t)))}var a;switch(i=qt("quarter"===n.type&&n.dateObject.quarter?function(e,t,n){const r=Ue(e,n?.in),i=t-(Math.trunc(r.getMonth()/3)+1);return Kn(r,r.getMonth()+3*i)}(nr(i,n.dateObject.year),n.dateObject.quarter):Qn(i,n.dateObject)),r.doUpdateValue(N(i),e.panel||"date"===t||"week"===t||"year"===t),t){case"date":case"week":r.doClose();break;case"year":e.panel&&r.disableTransitionOneTick(),r.doClose();break;case"month":case"quarter":r.disableTransitionOneTick(),H(i)}},handleDateInputBlur:function(){const t=mr(w.value,x.value,new Date,r.dateFnsOptions.value);if(at(t)){if(null===e.value)r.doUpdateValue(qt(N(Date.now())),!1);else if(!Array.isArray(e.value)){const n=Qn(e.value,{year:Xt(t),month:jt(t),date:Yt(t)});r.doUpdateValue(qt(N(qt(n))),!1)}}else!function(t){if(null===e.value||Array.isArray(e.value))return void(w.value="");void 0===t&&(t=e.value);w.value=Vt(t,x.value,r.dateFnsOptions.value)}()},handleDateInput:function(t){const n=mr(t,x.value,new Date,r.dateFnsOptions.value);if(at(n)){if(null===e.value)r.doUpdateValue(qt(N(Date.now())),e.panel);else if(!Array.isArray(e.value)){const t=Qn(e.value,{year:Xt(n),month:jt(n),date:Yt(n)});r.doUpdateValue(qt(N(qt(t))),e.panel)}}else w.value=t},handleDateMouseEnter:function(e){"date"===e.type&&"week"===t&&(F.value=N(qt(e.ts)))},isWeekHovered:function(e){return"date"===e.type&&"week"===t&&N(qt(e.ts))===F.value},handleTimePickerChange:function(t){null!==t&&r.doUpdateValue(t,e.panel)},clearSelectedDateTime:function(){r.doUpdateValue(null,!0),w.value="",r.doClose(!0),r.handleClearClick()},virtualListContainer:function(){const{value:e}=C;return(null==e?void 0:e.listElRef)||null},virtualListContent:function(){const{value:e}=C;return(null==e?void 0:e.itemsElRef)||null},handleVirtualListScroll:function(){var e;null===(e=k.value)||void 0===e||e.sync()},timePickerSize:r.timePickerSize,dateInputValue:w,datePickerSlots:f,handleQuickMonthClick:function(t,n){let r;r=null===e.value||Array.isArray(e.value)?Date.now():e.value,r=qt("month"===t.type?Kn(r,t.dateObject.month):nr(r,t.dateObject.year)),n(r),H(r)},justifyColumnsScrollState:H,calendarValue:S,onUpdateCalendarValue:function(e){S.value=e}})}var Mr=R({name:"MonthPanel",props:Object.assign(Object.assign({},Cr),{type:{type:String,required:!0},useAsQuickJump:Boolean}),setup(e){const t=kr(e,e.type),{dateLocaleRef:n}=i("DatePicker"),{useAsQuickJump:r}=e;return G(()=>{t.justifyColumnsScrollState()}),Object.assign(Object.assign({},t),{renderItem:(i,a,o)=>{const{mergedIsDateDisabled:s,handleDateClick:l,handleQuickMonthClick:u}=t;return E("div",{"data-n-date":!0,key:a,class:[`${o}-date-panel-month-calendar__picker-col-item`,i.isCurrent&&`${o}-date-panel-month-calendar__picker-col-item--current`,i.selected&&`${o}-date-panel-month-calendar__picker-col-item--selected`,!r&&s(i.ts,"year"===i.type?{type:"year",year:i.dateObject.year}:"month"===i.type?{type:"month",year:i.dateObject.year,month:i.dateObject.month}:"quarter"===i.type?{type:"month",year:i.dateObject.year,month:i.dateObject.quarter}:null)&&`${o}-date-panel-month-calendar__picker-col-item--disabled`],onClick:()=>{r?u(i,t=>{e.onUpdateValue(t,!1)}):l(i)}},(e=>{switch(e.type){case"year":return lr(e.dateObject.year,e.yearFormat,n.value.locale);case"month":return sr(e.dateObject.month,e.monthFormat,n.value.locale);case"quarter":return ur(e.dateObject.quarter,e.quarterFormat,n.value.locale)}})(i))}})},render(){const{mergedClsPrefix:e,mergedTheme:n,shortcuts:r,actions:i,renderItem:a,type:o,onRender:s}=this;return null==s||s(),E("div",{ref:"selfRef",tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--month`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onFocus:this.handlePanelFocus,onKeydown:this.handlePanelKeyDown},E("div",{class:`${e}-date-panel-month-calendar`},E(I,{ref:"yearScrollbarRef",class:`${e}-date-panel-month-calendar__picker-col`,theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,container:this.virtualListContainer,content:this.virtualListContent,horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>E(De,{ref:"yearVlRef",items:this.yearArray,itemSize:40,showScrollbar:!1,keyField:"ts",onScroll:this.handleVirtualListScroll,paddingBottom:4},{default:({item:t,index:n})=>a(t,n,e)})}),"month"===o||"quarter"===o?E("div",{class:`${e}-date-panel-month-calendar__picker-col`},E(I,{ref:"monthScrollbarRef",theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar},{default:()=>[("month"===o?this.monthArray:this.quarterArray).map((t,n)=>a(t,n,e)),E("div",{class:`${e}-date-panel-${o}-calendar__padding`})]})):null),t(this.datePickerSlots.footer,t=>t?E("div",{class:`${e}-date-panel-footer`},t):null),(null==i?void 0:i.length)||r?E("div",{class:`${e}-date-panel-actions`},E("div",{class:`${e}-date-panel-actions__prefix`},r&&Object.keys(r).map(e=>{const t=r[e];return Array.isArray(t)?null:E(p,{size:"tiny",onMouseenter:()=>{this.handleSingleShortcutMouseenter(t)},onClick:()=>{this.handleSingleShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e})})),E("div",{class:`${e}-date-panel-actions__suffix`},(null==i?void 0:i.includes("clear"))?l(this.datePickerSlots.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[E(C,{theme:n.peers.Button,themeOverrides:n.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,(null==i?void 0:i.includes("now"))?l(this.datePickerSlots.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[E(C,{theme:n.peers.Button,themeOverrides:n.peerOverrides.Button,size:"tiny",onClick:this.handleNowClick},{default:()=>this.locale.now})]):null,(null==i?void 0:i.includes("confirm"))?l(this.datePickerSlots.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isDateInvalid,text:this.locale.confirm},()=>[E(C,{theme:n.peers.Button,themeOverrides:n.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isDateInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,E(ze,{onFocus:this.handleFocusDetectorFocus}))}}),Tr=R({props:{mergedClsPrefix:{type:String,required:!0},value:Number,monthBeforeYear:{type:Boolean,required:!0},monthYearSeparator:{type:String,required:!0},calendarMonth:{type:String,required:!0},calendarYear:{type:String,required:!0},onUpdateValue:{type:Function,required:!0}},setup(){const e=ue(null),t=ue(null),n=ue(!1);return{show:n,triggerRef:e,monthPanelRef:t,handleHeaderClick:function(){n.value=!n.value},handleClickOutside:function(t){var r;n.value&&!(null===(r=e.value)||void 0===r?void 0:r.contains(S(t)))&&(n.value=!1)}}},render(){const{handleClickOutside:e,mergedClsPrefix:t}=this;return E("div",{class:`${t}-date-panel-month__month-year`,ref:"triggerRef"},E(ye,null,{default:()=>[E(me,null,{default:()=>E("div",{class:[`${t}-date-panel-month__text`,this.show&&`${t}-date-panel-month__text--active`],onClick:this.handleHeaderClick},this.monthBeforeYear?[this.calendarMonth,this.monthYearSeparator,this.calendarYear]:[this.calendarYear,this.monthYearSeparator,this.calendarMonth])}),E(we,{show:this.show,teleportDisabled:!0},{default:()=>E(ae,{name:"fade-in-scale-up-transition",appear:!0},{default:()=>this.show?ce(E(Mr,{ref:"monthPanelRef",onUpdateValue:this.onUpdateValue,actions:[],calendarHeaderMonthYearSeparator:this.monthYearSeparator,type:"month",key:"month",useAsQuickJump:!0,value:this.value}),[[P,e,void 0,{capture:!0}]]):null})})]}))}}),Dr=R({name:"DatePanel",props:Object.assign(Object.assign({},Cr),{type:{type:String,required:!0}}),setup:e=>kr(e,e.type),render(){var e,t,n;const{mergedClsPrefix:r,mergedTheme:i,shortcuts:a,onRender:o,datePickerSlots:s,type:u}=this;return null==o||o(),E("div",{ref:"selfRef",tabindex:0,class:[`${r}-date-panel`,`${r}-date-panel--${u}`,!this.panel&&`${r}-date-panel--shadow`,this.themeClass],onFocus:this.handlePanelFocus,onKeydown:this.handlePanelKeyDown},E("div",{class:`${r}-date-panel-calendar`},E("div",{class:`${r}-date-panel-month`},E("div",{class:`${r}-date-panel-month__fast-prev`,onClick:this.prevYear},D(s["prev-year"],()=>[E(ke,null)])),E("div",{class:`${r}-date-panel-month__prev`,onClick:this.prevMonth},D(s["prev-month"],()=>[E(Se,null)])),E(Tr,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.calendarValue,onUpdateValue:this.onUpdateCalendarValue,mergedClsPrefix:r,calendarMonth:this.calendarMonth,calendarYear:this.calendarYear}),E("div",{class:`${r}-date-panel-month__next`,onClick:this.nextMonth},D(s["next-month"],()=>[E(Me,null)])),E("div",{class:`${r}-date-panel-month__fast-next`,onClick:this.nextYear},D(s["next-year"],()=>[E(Ce,null)]))),E("div",{class:`${r}-date-panel-weekdays`},this.weekdays.map(e=>E("div",{key:e,class:`${r}-date-panel-weekdays__day`},e))),E("div",{class:`${r}-date-panel-dates`},this.dateArray.map((e,t)=>E("div",{"data-n-date":!0,key:t,class:[`${r}-date-panel-date`,{[`${r}-date-panel-date--current`]:e.isCurrentDate,[`${r}-date-panel-date--selected`]:e.selected,[`${r}-date-panel-date--excluded`]:!e.inCurrentMonth,[`${r}-date-panel-date--disabled`]:this.mergedIsDateDisabled(e.ts,{type:"date",year:e.dateObject.year,month:e.dateObject.month,date:e.dateObject.date}),[`${r}-date-panel-date--week-hovered`]:this.isWeekHovered(e),[`${r}-date-panel-date--week-selected`]:e.inSelectedWeek}],onClick:()=>{this.handleDateClick(e)},onMouseenter:()=>{this.handleDateMouseEnter(e)}},E("div",{class:`${r}-date-panel-date__trigger`}),e.dateObject.date,e.isCurrentDate?E("div",{class:`${r}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?E("div",{class:`${r}-date-panel-footer`},this.datePickerSlots.footer()):null,(null===(e=this.actions)||void 0===e?void 0:e.length)||a?E("div",{class:`${r}-date-panel-actions`},E("div",{class:`${r}-date-panel-actions__prefix`},a&&Object.keys(a).map(e=>{const t=a[e];return Array.isArray(t)?null:E(p,{size:"tiny",onMouseenter:()=>{this.handleSingleShortcutMouseenter(t)},onClick:()=>{this.handleSingleShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e})})),E("div",{class:`${r}-date-panel-actions__suffix`},(null===(t=this.actions)||void 0===t?void 0:t.includes("clear"))?l(this.$slots.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[E(C,{theme:i.peers.Button,themeOverrides:i.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,(null===(n=this.actions)||void 0===n?void 0:n.includes("now"))?l(this.$slots.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[E(C,{theme:i.peers.Button,themeOverrides:i.peerOverrides.Button,size:"tiny",onClick:this.handleNowClick},{default:()=>this.locale.now})]):null)):null,E(ze,{onFocus:this.handleFocusDetectorFocus}))}}),Ir=Object.assign(Object.assign({},wr),{defaultCalendarStartTime:Number,defaultCalendarEndTime:Number,bindCalendarMonths:Boolean,actions:{type:Array,default:()=>["clear","confirm"]}});function Ar(e,t){var n,r;const{isDateDisabledRef:i,isStartHourDisabledRef:a,isEndHourDisabledRef:o,isStartMinuteDisabledRef:s,isEndMinuteDisabledRef:l,isStartSecondDisabledRef:u,isEndSecondDisabledRef:c,isStartDateInvalidRef:d,isEndDateInvalidRef:h,isStartTimeInvalidRef:p,isEndTimeInvalidRef:f,isStartValueInvalidRef:v,isEndValueInvalidRef:g,isRangeInvalidRef:m,localeRef:y,rangesRef:_,closeOnSelectRef:x,updateValueOnCloseRef:b,firstDayOfWeekRef:w,datePickerSlots:S,monthFormatRef:C,yearFormatRef:k,quarterFormatRef:M,yearRangeRef:T}=V(br),D={isDateDisabled:i,isStartHourDisabled:a,isEndHourDisabled:o,isStartMinuteDisabled:s,isEndMinuteDisabled:l,isStartSecondDisabled:u,isEndSecondDisabled:c,isStartDateInvalid:d,isEndDateInvalid:h,isStartTimeInvalid:p,isEndTimeInvalid:f,isStartValueInvalid:v,isEndValueInvalid:g,isRangeInvalid:m},I=Sr(e),A=ue(null),P=ue(null),O=ue(null),R=ue(null),L=ue(null),z=ue(null),N=ue(null),B=ue(null),{value:F}=e,E=null!==(n=e.defaultCalendarStartTime)&&void 0!==n?n:Array.isArray(F)&&"number"==typeof F[0]?F[0]:Date.now(),H=ue(E),Y=ue(null!==(r=e.defaultCalendarEndTime)&&void 0!==r?r:Array.isArray(F)&&"number"==typeof F[1]?F[1]:qt(Qe(E,1)));ye(!0);const W=ue(Date.now()),$=ue(!1),G=ue(0),U=K(()=>e.dateFormat||y.value.dateFormat),j=K(()=>e.calendarDayFormat||y.value.dayFormat),q=ue(Array.isArray(F)?Vt(F[0],U.value,I.dateFnsOptions.value):""),X=ue(Array.isArray(F)?Vt(F[1],U.value,I.dateFnsOptions.value):""),Q=K(()=>$.value?"end":"start"),J=K(()=>{var t;return pr(H.value,e.value,W.value,null!==(t=w.value)&&void 0!==t?t:y.value.firstDayOfWeek)}),ee=K(()=>{var t;return pr(Y.value,e.value,W.value,null!==(t=w.value)&&void 0!==t?t:y.value.firstDayOfWeek)}),te=K(()=>J.value.slice(0,7).map(e=>{const{ts:t}=e;return Vt(t,j.value,I.dateFnsOptions.value)})),ne=K(()=>Vt(H.value,e.calendarHeaderMonthFormat||y.value.monthFormat,I.dateFnsOptions.value)),re=K(()=>Vt(Y.value,e.calendarHeaderMonthFormat||y.value.monthFormat,I.dateFnsOptions.value)),ie=K(()=>Vt(H.value,e.calendarHeaderYearFormat||y.value.yearFormat,I.dateFnsOptions.value)),ae=K(()=>Vt(Y.value,e.calendarHeaderYearFormat||y.value.yearFormat,I.dateFnsOptions.value)),oe=K(()=>{const{value:t}=e;return Array.isArray(t)?t[0]:null}),se=K(()=>{const{value:t}=e;return Array.isArray(t)?t[1]:null}),le=K(()=>{const{shortcuts:t}=e;return t||_.value}),ce=K(()=>gr(xr(e.value,"start"),W.value,{yearFormat:k.value},T)),de=K(()=>gr(xr(e.value,"end"),W.value,{yearFormat:k.value},T)),he=K(()=>{const t=xr(e.value,"start");return vr(null!=t?t:Date.now(),t,W.value,{quarterFormat:M.value})}),pe=K(()=>{const t=xr(e.value,"end");return vr(null!=t?t:Date.now(),t,W.value,{quarterFormat:M.value})}),fe=K(()=>{const t=xr(e.value,"start");return fr(null!=t?t:Date.now(),t,W.value,{monthFormat:C.value})}),ve=K(()=>{const t=xr(e.value,"end");return fr(null!=t?t:Date.now(),t,W.value,{monthFormat:C.value})}),ge=K(()=>{var t;return null!==(t=e.calendarHeaderMonthBeforeYear)&&void 0!==t?t:y.value.monthBeforeYear});function me(e,n){"daterange"!==t&&"datetimerange"!==t||Xt(e)===Xt(n)&&jt(e)===jt(n)||I.disableTransitionOneTick()}function ye(t){const n=lt(H.value),r=lt(Y.value);(e.bindCalendarMonths||n>=r)&&(t?Y.value=qt(Qe(n,1)):H.value=qt(Qe(r,-1)))}function _e(t){const n=i.value;if(!n)return!1;if(!Array.isArray(e.value))return n(t,"start",null);if("start"===Q.value)return n(t,"start",null);{const{value:e}=G;return t<G.value?n(t,"start",[e,e]):n(t,"end",[e,e])}}function xe(){m.value||(I.doConfirm(),be())}function be(){$.value=!1,e.active&&I.doClose()}function we(t){"number"!=typeof t&&(t=qt(t)),null===e.value?I.doUpdateValue([t,t],e.panel):Array.isArray(e.value)&&I.doUpdateValue([t,Math.max(e.value[1],t)],e.panel)}function Se(t){"number"!=typeof t&&(t=qt(t)),null===e.value?I.doUpdateValue([t,t],e.panel):Array.isArray(e.value)&&I.doUpdateValue([Math.min(e.value[0],t),t],e.panel)}function Ce(n,r,i){if("number"!=typeof n&&(n=qt(n)),"shortcutPreview"!==i&&"shortcutDone"!==i){let i,a;if("datetimerange"===t){const{defaultTime:t}=e;"function"==typeof t?(i=yr(n,t,"start",[n,r]),a=yr(r,t,"end",[n,r])):Array.isArray(t)?(i=_r(t[0]),a=_r(t[1])):(i=_r(t),a=i)}i&&(n=qt(Qn(n,i))),a&&(r=qt(Qn(r,a)))}I.doUpdateValue([n,r],e.panel&&("done"===i||"shortcutDone"===i))}function ke(e){return qt("datetimerange"===t?qn(e):"monthrange"===t?lt(e):nt(e))}function Me(t){const{value:n}=e;if(null===n||!Array.isArray(n))return q.value="",void(X.value="");void 0===t&&(t=n),q.value=Vt(t[0],U.value,I.dateFnsOptions.value),X.value=Vt(t[1],U.value,I.dateFnsOptions.value)}function Te(t,n){const r=void 0===t?e.value:t;if(void 0===t||"start"===n){if(N.value){const e=Array.isArray(r)?jt(r[0]):jt(Date.now());N.value.scrollTo({debounce:!1,index:e,elSize:40})}if(L.value){const e=(Array.isArray(r)?Xt(r[0]):Xt(Date.now()))-T.value[0];L.value.scrollTo({index:e,debounce:!1})}}if(void 0===t||"end"===n){if(B.value){const e=Array.isArray(r)?jt(r[1]):jt(Date.now());B.value.scrollTo({debounce:!1,index:e,elSize:40})}if(z.value){const e=(Array.isArray(r)?Xt(r[1]):Xt(Date.now()))-T.value[0];z.value.scrollTo({index:e,debounce:!1})}}}Z(K(()=>e.value),e=>{if(null!==e&&Array.isArray(e)){const[t,n]=e;q.value=Vt(t,U.value,I.dateFnsOptions.value),X.value=Vt(n,U.value,I.dateFnsOptions.value),$.value||function(e){if(null===e)return;const[t,n]=e;H.value=t,lt(n)<=lt(t)?Y.value=qt(lt(Qe(t,1))):Y.value=qt(lt(n))}(e)}else q.value="",X.value=""}),Z(H,me),Z(Y,me);const De={startYearVlRef:L,endYearVlRef:z,startMonthScrollbarRef:N,endMonthScrollbarRef:B,startYearScrollbarRef:O,endYearScrollbarRef:R};return Object.assign(Object.assign(Object.assign(Object.assign({startDatesElRef:A,endDatesElRef:P,handleDateClick:function(n){if($.value){$.value=!1;const{value:n}=e;e.panel&&Array.isArray(n)?Ce(n[0],n[1],"done"):x.value&&"daterange"===t&&(b.value?be():xe())}else $.value=!0,G.value=n.ts,Ce(n.ts,n.ts,"done")},handleColItemClick:function(n,r){const{value:i}=e,a=!Array.isArray(i),o="year"===n.type&&"yearrange"!==t?a?Qn(n.ts,{month:jt("quarterrange"===t?st(new Date):new Date)}).valueOf():Qn(n.ts,{month:jt("quarterrange"===t?st(i["start"===r?0:1]):i["start"===r?0:1])}).valueOf():n.ts;if(a){const t=ke(o),n=[t,t];return I.doUpdateValue(n,e.panel),Te(n,"start"),Te(n,"end"),void I.disableTransitionOneTick()}const s=[i[0],i[1]];let l=!1;switch("start"===r?(s[0]=ke(o),s[0]>s[1]&&(s[1]=s[0],l=!0)):(s[1]=ke(o),s[0]>s[1]&&(s[0]=s[1],l=!0)),I.doUpdateValue(s,e.panel),t){case"monthrange":case"quarterrange":I.disableTransitionOneTick(),l?(Te(s,"start"),Te(s,"end")):Te(s,r);break;case"yearrange":I.disableTransitionOneTick(),Te(s,"start"),Te(s,"end")}},handleDateMouseEnter:function(e){if($.value){if(_e(e.ts))return;e.ts>=G.value?Ce(G.value,e.ts,"wipPreview"):Ce(e.ts,G.value,"wipPreview")}},handleConfirmClick:xe,startCalendarPrevYear:function(){H.value=qt(Qe(H.value,-12)),ye(!0)},startCalendarPrevMonth:function(){H.value=qt(Qe(H.value,-1)),ye(!0)},startCalendarNextYear:function(){H.value=qt(Qe(H.value,12)),ye(!0)},startCalendarNextMonth:function(){H.value=qt(Qe(H.value,1)),ye(!0)},endCalendarPrevYear:function(){Y.value=qt(Qe(Y.value,-12)),ye(!1)},endCalendarPrevMonth:function(){Y.value=qt(Qe(Y.value,-1)),ye(!1)},endCalendarNextMonth:function(){Y.value=qt(Qe(Y.value,1)),ye(!1)},endCalendarNextYear:function(){Y.value=qt(Qe(Y.value,12)),ye(!1)},mergedIsDateDisabled:_e,changeStartEndTime:Ce,ranges:_,calendarMonthBeforeYear:ge,startCalendarMonth:ne,startCalendarYear:ie,endCalendarMonth:re,endCalendarYear:ae,weekdays:te,startDateArray:J,endDateArray:ee,startYearArray:ce,startMonthArray:fe,startQuarterArray:he,endYearArray:de,endMonthArray:ve,endQuarterArray:pe,isSelecting:$,handleRangeShortcutMouseenter:function(e){I.cachePendingValue();const t=I.getShortcutValue(e);Array.isArray(t)&&Ce(t[0],t[1],"shortcutPreview")},handleRangeShortcutClick:function(e){const t=I.getShortcutValue(e);Array.isArray(t)&&(Ce(t[0],t[1],"shortcutDone"),I.clearPendingValue(),xe())}},I),D),De),{startDateDisplayString:q,endDateInput:X,timePickerSize:I.timePickerSize,startTimeValue:oe,endTimeValue:se,datePickerSlots:S,shortcuts:le,startCalendarDateTime:H,endCalendarDateTime:Y,justifyColumnsScrollState:Te,handleFocusDetectorFocus:I.handleFocusDetectorFocus,handleStartTimePickerChange:function(e){null!==e&&we(e)},handleEndTimePickerChange:function(e){null!==e&&Se(e)},handleStartDateInput:function(t){const n=mr(t,U.value,new Date,I.dateFnsOptions.value);if(at(n))if(e.value){if(Array.isArray(e.value)){we(ke(qt(Qn(e.value[0],{year:Xt(n),month:jt(n),date:Yt(n)}))))}}else{we(ke(qt(Qn(new Date,{year:Xt(n),month:jt(n),date:Yt(n)}))))}else q.value=t},handleStartDateInputBlur:function(){const t=mr(q.value,U.value,new Date,I.dateFnsOptions.value),{value:n}=e;if(at(t)){if(null===n){we(ke(qt(Qn(new Date,{year:Xt(t),month:jt(t),date:Yt(t)}))))}else if(Array.isArray(n)){we(ke(qt(Qn(n[0],{year:Xt(t),month:jt(t),date:Yt(t)}))))}}else Me()},handleEndDateInput:function(t){const n=mr(t,U.value,new Date,I.dateFnsOptions.value);if(at(n)){if(null===e.value){Se(ke(qt(Qn(new Date,{year:Xt(n),month:jt(n),date:Yt(n)}))))}else if(Array.isArray(e.value)){Se(ke(qt(Qn(e.value[1],{year:Xt(n),month:jt(n),date:Yt(n)}))))}}else X.value=t},handleEndDateInputBlur:function(){const t=mr(X.value,U.value,new Date,I.dateFnsOptions.value),{value:n}=e;if(at(t)){if(null===n){Se(ke(qt(Qn(new Date,{year:Xt(t),month:jt(t),date:Yt(t)}))))}else if(Array.isArray(n)){Se(ke(qt(Qn(n[1],{year:Xt(t),month:jt(t),date:Yt(t)}))))}}else Me()},handleStartYearVlScroll:function(){var e;null===(e=O.value)||void 0===e||e.sync()},handleEndYearVlScroll:function(){var e;null===(e=R.value)||void 0===e||e.sync()},virtualListContainer:function(e){var t,n;return"start"===e?(null===(t=L.value)||void 0===t?void 0:t.listElRef)||null:(null===(n=z.value)||void 0===n?void 0:n.listElRef)||null},virtualListContent:function(e){var t,n;return"start"===e?(null===(t=L.value)||void 0===t?void 0:t.itemsElRef)||null:(null===(n=z.value)||void 0===n?void 0:n.itemsElRef)||null},onUpdateStartCalendarValue:function(e){H.value=e,ye(!0)},onUpdateEndCalendarValue:function(e){Y.value=e,ye(!1)}})}var Pr=R({name:"DateRangePanel",props:Ir,setup:e=>Ar(e,"daterange"),render(){var e,t,n;const{mergedClsPrefix:r,mergedTheme:i,shortcuts:a,onRender:o,datePickerSlots:s}=this;return null==o||o(),E("div",{ref:"selfRef",tabindex:0,class:[`${r}-date-panel`,`${r}-date-panel--daterange`,!this.panel&&`${r}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},E("div",{ref:"startDatesElRef",class:`${r}-date-panel-calendar ${r}-date-panel-calendar--start`},E("div",{class:`${r}-date-panel-month`},E("div",{class:`${r}-date-panel-month__fast-prev`,onClick:this.startCalendarPrevYear},D(s["prev-year"],()=>[E(ke,null)])),E("div",{class:`${r}-date-panel-month__prev`,onClick:this.startCalendarPrevMonth},D(s["prev-month"],()=>[E(Se,null)])),E(Tr,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.startCalendarDateTime,onUpdateValue:this.onUpdateStartCalendarValue,mergedClsPrefix:r,calendarMonth:this.startCalendarMonth,calendarYear:this.startCalendarYear}),E("div",{class:`${r}-date-panel-month__next`,onClick:this.startCalendarNextMonth},D(s["next-month"],()=>[E(Me,null)])),E("div",{class:`${r}-date-panel-month__fast-next`,onClick:this.startCalendarNextYear},D(s["next-year"],()=>[E(Ce,null)]))),E("div",{class:`${r}-date-panel-weekdays`},this.weekdays.map(e=>E("div",{key:e,class:`${r}-date-panel-weekdays__day`},e))),E("div",{class:`${r}-date-panel__divider`}),E("div",{class:`${r}-date-panel-dates`},this.startDateArray.map((e,t)=>E("div",{"data-n-date":!0,key:t,class:[`${r}-date-panel-date`,{[`${r}-date-panel-date--excluded`]:!e.inCurrentMonth,[`${r}-date-panel-date--current`]:e.isCurrentDate,[`${r}-date-panel-date--selected`]:e.selected,[`${r}-date-panel-date--covered`]:e.inSpan,[`${r}-date-panel-date--start`]:e.startOfSpan,[`${r}-date-panel-date--end`]:e.endOfSpan,[`${r}-date-panel-date--disabled`]:this.mergedIsDateDisabled(e.ts)}],onClick:()=>{this.handleDateClick(e)},onMouseenter:()=>{this.handleDateMouseEnter(e)}},E("div",{class:`${r}-date-panel-date__trigger`}),e.dateObject.date,e.isCurrentDate?E("div",{class:`${r}-date-panel-date__sup`}):null)))),E("div",{class:`${r}-date-panel__vertical-divider`}),E("div",{ref:"endDatesElRef",class:`${r}-date-panel-calendar ${r}-date-panel-calendar--end`},E("div",{class:`${r}-date-panel-month`},E("div",{class:`${r}-date-panel-month__fast-prev`,onClick:this.endCalendarPrevYear},D(s["prev-year"],()=>[E(ke,null)])),E("div",{class:`${r}-date-panel-month__prev`,onClick:this.endCalendarPrevMonth},D(s["prev-month"],()=>[E(Se,null)])),E(Tr,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.endCalendarDateTime,onUpdateValue:this.onUpdateEndCalendarValue,mergedClsPrefix:r,calendarMonth:this.endCalendarMonth,calendarYear:this.endCalendarYear}),E("div",{class:`${r}-date-panel-month__next`,onClick:this.endCalendarNextMonth},D(s["next-month"],()=>[E(Me,null)])),E("div",{class:`${r}-date-panel-month__fast-next`,onClick:this.endCalendarNextYear},D(s["next-year"],()=>[E(Ce,null)]))),E("div",{class:`${r}-date-panel-weekdays`},this.weekdays.map(e=>E("div",{key:e,class:`${r}-date-panel-weekdays__day`},e))),E("div",{class:`${r}-date-panel__divider`}),E("div",{class:`${r}-date-panel-dates`},this.endDateArray.map((e,t)=>E("div",{"data-n-date":!0,key:t,class:[`${r}-date-panel-date`,{[`${r}-date-panel-date--excluded`]:!e.inCurrentMonth,[`${r}-date-panel-date--current`]:e.isCurrentDate,[`${r}-date-panel-date--selected`]:e.selected,[`${r}-date-panel-date--covered`]:e.inSpan,[`${r}-date-panel-date--start`]:e.startOfSpan,[`${r}-date-panel-date--end`]:e.endOfSpan,[`${r}-date-panel-date--disabled`]:this.mergedIsDateDisabled(e.ts)}],onClick:()=>{this.handleDateClick(e)},onMouseenter:()=>{this.handleDateMouseEnter(e)}},E("div",{class:`${r}-date-panel-date__trigger`}),e.dateObject.date,e.isCurrentDate?E("div",{class:`${r}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?E("div",{class:`${r}-date-panel-footer`},this.datePickerSlots.footer()):null,(null===(e=this.actions)||void 0===e?void 0:e.length)||a?E("div",{class:`${r}-date-panel-actions`},E("div",{class:`${r}-date-panel-actions__prefix`},a&&Object.keys(a).map(e=>{const t=a[e];return Array.isArray(t)||"function"==typeof t?E(p,{size:"tiny",onMouseenter:()=>{this.handleRangeShortcutMouseenter(t)},onClick:()=>{this.handleRangeShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e}):null})),E("div",{class:`${r}-date-panel-actions__suffix`},(null===(t=this.actions)||void 0===t?void 0:t.includes("clear"))?l(s.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[E(C,{theme:i.peers.Button,themeOverrides:i.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,(null===(n=this.actions)||void 0===n?void 0:n.includes("confirm"))?l(s.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isRangeInvalid||this.isSelecting,text:this.locale.confirm},()=>[E(C,{theme:i.peers.Button,themeOverrides:i.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isRangeInvalid||this.isSelecting,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,E(ze,{onFocus:this.handleFocusDetectorFocus}))}});function Or(e,t,n){const r=$t(),i=function(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale??r.locale);return"formatToParts"in i?function(e,t){const n=e.formatToParts(t);for(let r=n.length-1;r>=0;--r)if("timeZoneName"===n[r].type)return n[r].value}(i,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}(i,t)}function Rr(e,t){const n=function(e){zr[e]||(zr[e]=Br?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}));return zr[e]}(t);return"formatToParts"in n?function(e,t){try{const n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){const t=Lr[n[e].type];void 0!==t&&(r[t]=parseInt(n[e].value,10))}return r}catch(Mc){if(Mc instanceof RangeError)return[NaN];throw Mc}}(n,e):function(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}(n,e)}var Lr={year:0,month:1,day:2,hour:3,minute:4,second:5};var zr={},Nr=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),Br="06/25/2014, 00:00:00"===Nr||"‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00"===Nr;function Fr(e,t,n,r,i,a,o){const s=new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(r,i,a,o),s}var Er=36e5,Vr={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Hr(e,t,n){if(!e)return 0;let r,i,a=Vr.timezoneZ.exec(e);if(a)return 0;if(a=Vr.timezoneHH.exec(e),a)return r=parseInt(a[1],10),Wr(r)?-r*Er:NaN;if(a=Vr.timezoneHHMM.exec(e),a){r=parseInt(a[2],10);const e=parseInt(a[3],10);return Wr(r,e)?(i=Math.abs(r)*Er+6e4*e,"+"===a[1]?-i:i):NaN}if(function(e){if($r[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),$r[e]=!0,!0}catch(Mc){return!1}}(e)){t=new Date(t||Date.now());const r=Yr(n?t:function(e){return Fr(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),e);return-(n?r:function(e,t,n){let r=e.getTime()-t;const i=Yr(new Date(r),n);if(t===i)return t;r-=i-t;const a=Yr(new Date(r),n);return i===a?i:Math.max(i,a)}(t,r,e))}return NaN}function Yr(e,t){const n=Rr(e,t),r=Fr(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let i=e.getTime();const a=i%1e3;return i-=a>=0?a:1e3+a,r-i}function Wr(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var $r={};var Gr={X:function(e,t,n){const r=Ur(n.timeZone,e);if(0===r)return"Z";switch(t){case"X":return qr(r);case"XXXX":case"XX":return Zr(r);default:return Zr(r,":")}},x:function(e,t,n){const r=Ur(n.timeZone,e);switch(t){case"x":return qr(r);case"xxxx":case"xx":return Zr(r);default:return Zr(r,":")}},O:function(e,t,n){const r=Ur(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),a=r%60;return 0===a?n+String(i):n+String(i)+t+jr(a,2)}(r,":");default:return"GMT"+Zr(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return Or("short",e,n);default:return Or("long",e,n)}}};function Ur(e,t){const n=e?Hr(e,t,!0)/6e4:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function jr(e,t){const n=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length<t;)r="0"+r;return n+r}function Zr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+jr(Math.floor(r/60),2)+t+jr(Math.floor(r%60),2)}function qr(e,t){return e%60==0?(e>0?"-":"+")+jr(Math.abs(e)/60,2):Zr(e,t)}function Xr(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}var Kr=36e5,Qr=6e4,Jr={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function ei(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);const n=null==t.additionalDigits?2:Number(t.additionalDigits);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);const r=function(e){const t={};let n,r=Jr.dateTimePattern.exec(e);r?(t.date=r[1],n=r[3]):(r=Jr.datePattern.exec(e),r?(t.date=r[1],n=r[2]):(t.date=null,n=e));if(n){const e=Jr.timeZone.exec(n);e?(t.time=n.replace(e[1],""),t.timeZone=e[1].trim()):t.time=n}return t}(e),{year:i,restDateString:a}=function(e,t){if(e){const n=Jr.YYY[t],r=Jr.YYYYY[t];let i=Jr.YYYY.exec(e)||r.exec(e);if(i){const t=i[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(i=Jr.YY.exec(e)||n.exec(e),i){const t=i[1];return{year:100*parseInt(t,10),restDateString:e.slice(t.length)}}}return{year:null}}(r.date,n),o=function(e,t){if(null===t)return null;let n,r,i;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let a=Jr.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,ai(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=Jr.DDD.exec(e),a){n=new Date(0);const e=parseInt(a[1],10);return function(e,t){if(t<1)return!1;const n=ii(e);return!(n&&t>366)&&!(!n&&t>365)}(t,e)?(n.setUTCFullYear(t,0,e),n):new Date(NaN)}if(a=Jr.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;const e=parseInt(a[2],10);return ai(t,r,e)?(n.setUTCFullYear(t,r,e),n):new Date(NaN)}if(a=Jr.Www.exec(e),a)return i=parseInt(a[1],10)-1,oi(i)?ti(t,i):new Date(NaN);if(a=Jr.WwwD.exec(e),a){i=parseInt(a[1],10)-1;const e=parseInt(a[2],10)-1;return oi(i,e)?ti(t,i,e):new Date(NaN)}return null}(a,i);if(null===o||isNaN(o.getTime()))return new Date(NaN);if(o){const e=o.getTime();let n,i=0;if(r.time&&(i=function(e){let t,n,r=Jr.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),si(t)?t%24*Kr:NaN;if(r=Jr.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),si(t,n)?t%24*Kr+n*Qr:NaN;if(r=Jr.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const e=parseFloat(r[3].replace(",","."));return si(t,n,e)?t%24*Kr+n*Qr+1e3*e:NaN}return null}(r.time),null===i||isNaN(i)))return new Date(NaN);if(r.timeZone||t.timeZone){if(n=Hr(r.timeZone||t.timeZone,new Date(e+i)),isNaN(n))return new Date(NaN)}else n=Xr(new Date(e+i)),n=Xr(new Date(e+i+n));return new Date(e+i+n)}return new Date(NaN)}function ti(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const i=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}var ni=[31,28,31,30,31,30,31,31,30,31,30,31],ri=[31,29,31,30,31,30,31,31,30,31,30,31];function ii(e){return e%400==0||e%4==0&&e%100!=0}function ai(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;const r=ii(e);if(r&&n>ri[t])return!1;if(!r&&n>ni[t])return!1}return!0}function oi(e,t){return!(e<0||e>52)&&(null==t||!(t<0||t>6))}function si(e,t,n){return!(e<0||e>=25)&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}var li=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function ui(e,t,n,r){return function(e,t,n={}){const r=(t=String(t)).match(li);if(r){const i=ei(n.originalDate||e,n);t=r.reduce(function(e,t){if("'"===t[0])return e;const r=e.indexOf(t),a="'"===e[r-1],o=e.replace(t,"'"+Gr[t[0]](i,t,n)+"'");return a?o.substring(0,r-1)+o.substring(r+1):o},t)}return Vt(e,t,n)}(function(e,t,n){const r=Hr(t,e=ei(e,n),!0),i=new Date(e.getTime()-r),a=new Date(0);return a.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),a.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),a}(e,t,{timeZone:(r={...r,timeZone:t,originalDate:e}).timeZone}),n,r)}var ci=c("n-time-picker"),di=R({name:"TimePickerPanelCol",props:{clsPrefix:{type:String,required:!0},data:{type:Array,required:!0},activeValue:{type:[Number,String],default:null},onItemClick:Function},render(){const{activeValue:e,onItemClick:t,clsPrefix:n}=this;return this.data.map(r=>{const{label:i,disabled:a,value:o}=r,s=e===o;return E("div",{key:i,"data-active":s?"":null,class:[`${n}-time-picker-col__item`,s&&`${n}-time-picker-col__item--active`,a&&`${n}-time-picker-col__item--disabled`],onClick:t&&!a?()=>{t(o)}:void 0},i)})}}),hi={amHours:["00","01","02","03","04","05","06","07","08","09","10","11"],pmHours:["12","01","02","03","04","05","06","07","08","09","10","11"],hours:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],minutes:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"],seconds:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"],period:["AM","PM"]};function pi(e){return`00${e}`.slice(-2)}function fi(e,t,n){return Array.isArray(t)?("am"===n?t.filter(e=>e<12):"pm"===n?t.filter(e=>e>=12).map(e=>12===e?12:e-12):t).map(e=>pi(e)):"number"==typeof t?"am"===n?e.filter(e=>{const n=Number(e);return n<12&&n%t===0}):"pm"===n?e.filter(e=>{const n=Number(e);return n>=12&&n%t===0}).map(e=>{const t=Number(e);return pi(12===t?12:t-12)}):e.filter(e=>Number(e)%t===0):"am"===n?e.filter(e=>Number(e)<12):"pm"===n?e.map(e=>Number(e)).filter(e=>Number(e)>=12).map(e=>pi(12===e?12:e-12)):e}function vi(e,t,n){return!n||("number"==typeof n?e%n===0:n.includes(e))}var gi=R({name:"TimePickerPanel",props:{actions:{type:Array,default:()=>["now","confirm"]},showHour:{type:Boolean,default:!0},showMinute:{type:Boolean,default:!0},showSecond:{type:Boolean,default:!0},showPeriod:{type:Boolean,default:!0},isHourInvalid:Boolean,isMinuteInvalid:Boolean,isSecondInvalid:Boolean,isAmPmInvalid:Boolean,isValueInvalid:Boolean,hourValue:{type:Number,default:null},minuteValue:{type:Number,default:null},secondValue:{type:Number,default:null},amPmValue:{type:String,default:null},isHourDisabled:Function,isMinuteDisabled:Function,isSecondDisabled:Function,onHourClick:{type:Function,required:!0},onMinuteClick:{type:Function,required:!0},onSecondClick:{type:Function,required:!0},onAmPmClick:{type:Function,required:!0},onNowClick:Function,clearText:String,nowText:String,confirmText:String,transitionDisabled:Boolean,onClearClick:Function,onConfirmClick:Function,onFocusin:Function,onFocusout:Function,onFocusDetectorFocus:Function,onKeydown:Function,hours:[Number,Array],minutes:[Number,Array],seconds:[Number,Array],use12Hours:Boolean},setup(e){const{mergedThemeRef:t,mergedClsPrefixRef:n}=V(ci);return{mergedTheme:t,mergedClsPrefix:n,hours:K(()=>{const{isHourDisabled:t,hours:n,use12Hours:r,amPmValue:i}=e;if(r){const e=null!=i?i:Gt(Date.now())<12?"am":"pm";return fi(hi.hours,n,e).map(n=>{const r=Number(n),i="pm"===e&&12!==r?r+12:r;return{label:n,value:i,disabled:!!t&&t(i)}})}return fi(hi.hours,n).map(e=>({label:e,value:Number(e),disabled:!!t&&t(Number(e))}))}),minutes:K(()=>{const{isMinuteDisabled:t,minutes:n}=e;return fi(hi.minutes,n).map(n=>({label:n,value:Number(n),disabled:!!t&&t(Number(n),e.hourValue)}))}),seconds:K(()=>{const{isSecondDisabled:t,seconds:n}=e;return fi(hi.seconds,n).map(n=>({label:n,value:Number(n),disabled:!!t&&t(Number(n),e.minuteValue,e.hourValue)}))}),amPm:K(()=>{const{isHourDisabled:t}=e;let n=!0,r=!0;for(let e=0;e<12;++e)if(!(null==t?void 0:t(e))){n=!1;break}for(let e=12;e<24;++e)if(!(null==t?void 0:t(e))){r=!1;break}return[{label:"AM",value:"am",disabled:n},{label:"PM",value:"pm",disabled:r}]}),hourScrollRef:ue(null),minuteScrollRef:ue(null),secondScrollRef:ue(null),amPmScrollRef:ue(null)}},render(){var e,t,n,r;const{mergedClsPrefix:i,mergedTheme:a}=this;return E("div",{tabindex:0,class:`${i}-time-picker-panel`,onFocusin:this.onFocusin,onFocusout:this.onFocusout,onKeydown:this.onKeydown},E("div",{class:`${i}-time-picker-cols`},this.showHour?E("div",{class:[`${i}-time-picker-col`,this.isHourInvalid&&`${i}-time-picker-col--invalid`,this.transitionDisabled&&`${i}-time-picker-col--transition-disabled`]},E(I,{ref:"hourScrollRef",theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar},{default:()=>[E(di,{clsPrefix:i,data:this.hours,activeValue:this.hourValue,onItemClick:this.onHourClick}),E("div",{class:`${i}-time-picker-col__padding`})]})):null,this.showMinute?E("div",{class:[`${i}-time-picker-col`,this.transitionDisabled&&`${i}-time-picker-col--transition-disabled`,this.isMinuteInvalid&&`${i}-time-picker-col--invalid`]},E(I,{ref:"minuteScrollRef",theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar},{default:()=>[E(di,{clsPrefix:i,data:this.minutes,activeValue:this.minuteValue,onItemClick:this.onMinuteClick}),E("div",{class:`${i}-time-picker-col__padding`})]})):null,this.showSecond?E("div",{class:[`${i}-time-picker-col`,this.isSecondInvalid&&`${i}-time-picker-col--invalid`,this.transitionDisabled&&`${i}-time-picker-col--transition-disabled`]},E(I,{ref:"secondScrollRef",theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar},{default:()=>[E(di,{clsPrefix:i,data:this.seconds,activeValue:this.secondValue,onItemClick:this.onSecondClick}),E("div",{class:`${i}-time-picker-col__padding`})]})):null,this.use12Hours?E("div",{class:[`${i}-time-picker-col`,this.isAmPmInvalid&&`${i}-time-picker-col--invalid`,this.transitionDisabled&&`${i}-time-picker-col--transition-disabled`]},E(I,{ref:"amPmScrollRef",theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar},{default:()=>[E(di,{clsPrefix:i,data:this.amPm,activeValue:this.amPmValue,onItemClick:this.onAmPmClick}),E("div",{class:`${i}-time-picker-col__padding`})]})):null),(null===(e=this.actions)||void 0===e?void 0:e.length)?E("div",{class:`${i}-time-picker-actions`},(null===(t=this.actions)||void 0===t?void 0:t.includes("clear"))?E(C,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.onClearClick},{default:()=>this.clearText}):null,(null===(n=this.actions)||void 0===n?void 0:n.includes("now"))?E(C,{size:"tiny",theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,onClick:this.onNowClick},{default:()=>this.nowText}):null,(null===(r=this.actions)||void 0===r?void 0:r.includes("confirm"))?E(C,{size:"tiny",type:"primary",class:`${i}-time-picker-actions__confirm`,theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,disabled:this.isValueInvalid,onClick:this.onConfirmClick},{default:()=>this.confirmText}):null):null,E(ze,{onFocus:this.onFocusDetectorFocus}))}}),mi=m([v("time-picker","\n z-index: auto;\n position: relative;\n ",[v("time-picker-icon","\n color: var(--n-icon-color-override);\n transition: color .3s var(--n-bezier);\n "),A("disabled",[v("time-picker-icon","\n color: var(--n-icon-color-disabled-override);\n ")])]),v("time-picker-panel","\n transition:\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n outline: none;\n font-size: var(--n-item-font-size);\n border-radius: var(--n-border-radius);\n margin: 4px 0;\n min-width: 104px;\n overflow: hidden;\n background-color: var(--n-panel-color);\n box-shadow: var(--n-panel-box-shadow);\n ",[_e(),v("time-picker-actions","\n padding: var(--n-panel-action-padding);\n align-items: center;\n display: flex;\n justify-content: space-evenly;\n "),v("time-picker-cols","\n height: calc(var(--n-item-height) * 6);\n display: flex;\n position: relative;\n transition: border-color .3s var(--n-bezier);\n border-bottom: 1px solid var(--n-panel-divider-color);\n "),v("time-picker-col","\n flex-grow: 1;\n min-width: var(--n-item-width);\n height: calc(var(--n-item-height) * 6);\n flex-direction: column;\n transition: box-shadow .3s var(--n-bezier);\n ",[A("transition-disabled",[M("item","transition: none;",[m("&::before","transition: none;")])]),M("padding","\n height: calc(var(--n-item-height) * 5);\n "),m("&:first-child","min-width: calc(var(--n-item-width) + 4px);",[M("item",[m("&::before","left: 4px;")])]),M("item","\n cursor: pointer;\n height: var(--n-item-height);\n display: flex;\n align-items: center;\n justify-content: center;\n transition: \n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n opacity .3s var(--n-bezier),\n text-decoration-color .3s var(--n-bezier);\n background: #0000;\n text-decoration-color: #0000;\n color: var(--n-item-text-color);\n z-index: 0;\n box-sizing: border-box;\n padding-top: 4px;\n position: relative;\n ",[m("&::before",'\n content: "";\n transition: background-color .3s var(--n-bezier);\n z-index: -1;\n position: absolute;\n left: 0;\n right: 4px;\n top: 4px;\n bottom: 0;\n border-radius: var(--n-item-border-radius);\n '),h("disabled",[m("&:hover::before","\n background-color: var(--n-item-color-hover);\n ")]),A("active","\n color: var(--n-item-text-color-active);\n ",[m("&::before","\n background-color: var(--n-item-color-hover);\n ")]),A("disabled","\n opacity: var(--n-item-opacity-disabled);\n cursor: not-allowed;\n ")]),A("invalid",[M("item",[A("active","\n text-decoration: line-through;\n text-decoration-color: var(--n-item-text-color-active);\n ")])])])])]);function yi(e,t){return void 0===e||(Array.isArray(e)?e.every(e=>e>=0&&e<=t):e>=0&&e<=t)}var _i=R({name:"TimePicker",props:Object.assign(Object.assign({},a.props),{to:xe.propTo,bordered:{type:Boolean,default:void 0},actions:Array,defaultValue:{type:Number,default:null},defaultFormattedValue:String,placeholder:String,placement:{type:String,default:"bottom-start"},value:Number,format:{type:String,default:"HH:mm:ss"},valueFormat:String,formattedValue:String,isHourDisabled:Function,size:String,isMinuteDisabled:Function,isSecondDisabled:Function,inputReadonly:Boolean,clearable:Boolean,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onUpdateFormattedValue:[Function,Array],"onUpdate:formattedValue":[Function,Array],onBlur:[Function,Array],onConfirm:[Function,Array],onClear:Function,onFocus:[Function,Array],timeZone:String,showIcon:{type:Boolean,default:!0},disabled:{type:Boolean,default:void 0},show:{type:Boolean,default:void 0},hours:{type:[Number,Array],validator:e=>yi(e,23)},minutes:{type:[Number,Array],validator:e=>yi(e,59)},seconds:{type:[Number,Array],validator:e=>yi(e,59)},use12Hours:Boolean,stateful:{type:Boolean,default:!0},onChange:[Function,Array]}),setup(t){const{mergedBorderedRef:n,mergedClsPrefixRef:o,namespaceRef:l,inlineThemeDisabled:c}=g(t),{localeRef:h,dateLocaleRef:p}=i("TimePicker"),f=w(t),{mergedSizeRef:v,mergedDisabledRef:m,mergedStatusRef:_}=f,x=a("TimePicker","-time-picker",mi,Ne,t,o),b=Fe(),C=ue(null),k=ue(null),M=K(()=>({locale:p.value.locale}));function T(e){return null===e?null:mr(e,t.valueFormat||t.format,new Date,M.value).getTime()}const{defaultValue:D,defaultFormattedValue:I}=t,A=ue(void 0!==I?T(I):D),P=K(()=>{const{formattedValue:e}=t;if(void 0!==e)return T(e);const{value:n}=t;return void 0!==n?n:A.value}),O=K(()=>{const{timeZone:e}=t;return e?(t,n,r)=>ui(t,e,n,r):(e,t,n)=>Vt(e,t,n)}),R=ue("");Z(()=>t.timeZone,()=>{const e=P.value;R.value=null===e?"":O.value(e,t.format,M.value)},{immediate:!0});const L=ue(!1),z=J(t,"show"),F=s(z,L),E=ue(P.value),V=ue(!1),H=K(()=>h.value.clear),Y=K(()=>h.value.now),W=K(()=>void 0!==t.placeholder?t.placeholder:h.value.placeholder),$=K(()=>h.value.negativeText),G=K(()=>h.value.positiveText),U=K(()=>/H|h|K|k/.test(t.format)),j=K(()=>t.format.includes("m")),q=K(()=>t.format.includes("s")),X=K(()=>{const{value:e}=P;return null===e?null:Number(O.value(e,"HH",M.value))}),Q=K(()=>{const{value:e}=P;return null===e?null:Number(O.value(e,"mm",M.value))}),ee=K(()=>{const{value:e}=P;return null===e?null:Number(O.value(e,"ss",M.value))}),te=K(()=>{const{isHourDisabled:e}=t;return null!==X.value&&(!vi(X.value,0,t.hours)||!!e&&e(X.value))}),ne=K(()=>{const{value:e}=Q,{value:n}=X;if(null===e||null===n)return!1;if(!vi(e,0,t.minutes))return!0;const{isMinuteDisabled:r}=t;return!!r&&r(e,n)}),re=K(()=>{const{value:e}=Q,{value:n}=X,{value:r}=ee;if(null===r||null===e||null===n)return!1;if(!vi(r,0,t.seconds))return!0;const{isSecondDisabled:i}=t;return!!i&&i(r,e,n)}),ie=K(()=>te.value||ne.value||re.value),ae=K(()=>t.format.length+4),oe=K(()=>{const{value:e}=P;return null===e?null:Gt(e)<12?"am":"pm"});function se(e){return null===e?null:O.value(e,t.valueFormat||t.format)}function le(e){const{onUpdateValue:n,"onUpdate:value":r,onChange:i}=t,{nTriggerFormChange:a,nTriggerFormInput:o}=f,s=se(e);n&&u(n,e,s),r&&u(r,e,s),i&&u(i,e,s),function(e,n){const{onUpdateFormattedValue:r,"onUpdate:formattedValue":i}=t;r&&u(r,e,n),i&&u(i,e,n)}(s,e),A.value=e,a(),o()}function ce(e){const{onBlur:n}=t,{nTriggerFormBlur:r}=f;n&&u(n,e),r()}function de(e){void 0===e&&(e=P.value),R.value=null===e?"":O.value(e,t.format,M.value)}function he(){if(!k.value)return;const{hourScrollRef:e,minuteScrollRef:t,secondScrollRef:n,amPmScrollRef:r}=k.value;[e,t,n,r].forEach(e=>{var t;if(!e)return;const n=null===(t=e.contentRef)||void 0===t?void 0:t.querySelector("[data-active]");n&&e.scrollTo({top:n.offsetTop})})}function pe(e){L.value=e;const{onUpdateShow:n,"onUpdate:show":r}=t;n&&u(n,e),r&&u(r,e)}function fe(e){var t,n,r;return!(!(null===(n=null===(t=C.value)||void 0===t?void 0:t.wrapperElRef)||void 0===n?void 0:n.contains(e.relatedTarget))&&!(null===(r=k.value)||void 0===r?void 0:r.$el.contains(e.relatedTarget)))}function ve(){E.value=P.value,pe(!0),B(he)}function ge({returnFocus:e}){var t;F.value&&(pe(!1),e&&(null===(t=C.value)||void 0===t||t.focus()))}Z(P,e=>{de(e),V.value=!0,B(()=>{V.value=!1}),B(he)}),Z(F,()=>{ie.value&&le(E.value)}),N(ci,{mergedThemeRef:x,mergedClsPrefixRef:o});const me={focus:()=>{var e;null===(e=C.value)||void 0===e||e.focus()},blur:()=>{var e;null===(e=C.value)||void 0===e||e.blur()}},ye=K(()=>{const{common:{cubicBezierEaseInOut:e},self:{iconColor:t,iconColorDisabled:n}}=x.value;return{"--n-icon-color-override":t,"--n-icon-color-disabled-override":n,"--n-bezier":e}}),_e=c?y("time-picker-trigger",void 0,ye,t):void 0,be=K(()=>{const{self:{panelColor:e,itemTextColor:t,itemTextColorActive:n,itemColorHover:r,panelDividerColor:i,panelBoxShadow:a,itemOpacityDisabled:o,borderRadius:s,itemFontSize:l,itemWidth:u,itemHeight:c,panelActionPadding:d,itemBorderRadius:h},common:{cubicBezierEaseInOut:p}}=x.value;return{"--n-bezier":p,"--n-border-radius":s,"--n-item-color-hover":r,"--n-item-font-size":l,"--n-item-height":c,"--n-item-opacity-disabled":o,"--n-item-text-color":t,"--n-item-text-color-active":n,"--n-item-width":u,"--n-panel-action-padding":d,"--n-panel-box-shadow":a,"--n-panel-color":e,"--n-panel-divider-color":i,"--n-item-border-radius":h}}),we=c?y("time-picker",void 0,be,t):void 0;return{focus:me.focus,blur:me.blur,mergedStatus:_,mergedBordered:n,mergedClsPrefix:o,namespace:l,uncontrolledValue:A,mergedValue:P,isMounted:d(),inputInstRef:C,panelInstRef:k,adjustedTo:xe(t),mergedShow:F,localizedClear:H,localizedNow:Y,localizedPlaceholder:W,localizedNegativeText:$,localizedPositiveText:G,hourInFormat:U,minuteInFormat:j,secondInFormat:q,mergedAttrSize:ae,displayTimeString:R,mergedSize:v,mergedDisabled:m,isValueInvalid:ie,isHourInvalid:te,isMinuteInvalid:ne,isSecondInvalid:re,transitionDisabled:V,hourValue:X,minuteValue:Q,secondValue:ee,amPmValue:oe,handleInputKeydown:function(t){"Escape"===t.key&&F.value&&e(t)},handleTimeInputFocus:function(e){fe(e)||function(e){const{onFocus:n}=t,{nTriggerFormFocus:r}=f;n&&u(n,e),r()}(e)},handleTimeInputBlur:function(e){var t;if(!fe(e))if(F.value){const n=null===(t=k.value)||void 0===t?void 0:t.$el;(null==n?void 0:n.contains(e.relatedTarget))||(de(),ce(e),ge({returnFocus:!1}))}else de(),ce(e)},handleNowClick:function(){const e=new Date,n={hours:Gt,minutes:Ut,seconds:Zt},[i,a,o]=["hours","minutes","seconds"].map(i=>!t[i]||vi(n[i](e),0,t[i])?n[i](e):function(e,t,n){const i=fi(hi[t],n).map(Number);let a,o;for(let r=0;r<i.length;++r){const t=i[r];if(t===e)return t;if(t>e){o=t;break}a=t}return void 0===a?(o||r("time-picker","Please set 'hours' or 'minutes' or 'seconds' props"),o):void 0===o||o-e>e-a?a:o}(n[i](e),i,t[i])),s=tr(er(Jn(P.value?P.value:qt(e),i),a),o);le(qt(s))},handleConfirmClick:function(){de(),function(){const{onConfirm:e}=t;e&&u(e,P.value,se(P.value))}(),ge({returnFocus:!0})},handleTimeInputUpdateValue:function(e){if(""===e)return void le(null);const n=mr(e,t.format,new Date,M.value);if(R.value=e,at(n)){const{value:e}=P;if(null!==e){le(qt(Qn(e,{hours:Gt(n),minutes:Ut(n),seconds:Zt(n),milliseconds:(r=n,Ue(r).getMilliseconds())})))}else le(qt(n))}var r},handleMenuFocusOut:function(e){fe(e)||(de(),ce(e),ge({returnFocus:!1}))},handleCancelClick:function(){le(E.value),pe(!1)},handleClickOutside:function(e){var t,n;F.value&&!(null===(n=null===(t=C.value)||void 0===t?void 0:t.wrapperElRef)||void 0===n?void 0:n.contains(S(e)))&&ge({returnFocus:!1})},handleTimeInputActivate:function(){m.value||F.value||ve()},handleTimeInputDeactivate:function(){m.value||(de(),ge({returnFocus:!1}))},handleHourClick:function(e){"string"!=typeof e&&(null===P.value?le(qt(Jn(function(e,t){const n=Ue(e,t?.in);return n.setMinutes(0,0,0),n}(new Date),e))):le(qt(Jn(P.value,e))))},handleMinuteClick:function(e){"string"!=typeof e&&(null===P.value?le(qt(er(function(e,t){const n=Ue(e,t?.in);return n.setSeconds(0,0),n}(new Date),e))):le(qt(er(P.value,e))))},handleSecondClick:function(e){"string"!=typeof e&&(null===P.value?le(qt(tr(qn(new Date),e))):le(qt(tr(P.value,e))))},handleAmPmClick:function(e){const{value:t}=P;if(null===t){const t=new Date,n=Gt(t);"pm"===e&&n<12?le(qt(Jn(t,n+12))):"am"===e&&n>=12&&le(qt(Jn(t,n-12))),le(qt(t))}else{const n=Gt(t);"pm"===e&&n<12?le(qt(Jn(t,n+12))):"am"===e&&n>=12&&le(qt(Jn(t,n-12)))}},handleTimeInputClear:function(e){var n;e.stopPropagation(),le(null),de(null),null===(n=t.onClear)||void 0===n||n.call(t)},handleFocusDetectorFocus:function(){ge({returnFocus:!0})},handleMenuKeydown:function(t){var n;switch(t.key){case"Escape":F.value&&(e(t),ge({returnFocus:!0}));break;case"Tab":b.shift&&t.target===(null===(n=k.value)||void 0===n?void 0:n.$el)&&(t.preventDefault(),ge({returnFocus:!0}))}},handleTriggerClick:function(e){m.value||Re(e,"clear")||F.value||ve()},mergedTheme:x,triggerCssVars:c?void 0:ye,triggerThemeClass:null==_e?void 0:_e.themeClass,triggerOnRender:null==_e?void 0:_e.onRender,cssVars:c?void 0:be,themeClass:null==we?void 0:we.themeClass,onRender:null==we?void 0:we.onRender,clearSelectedValue:function(){le(null),de(null),ge({returnFocus:!0})}}},render(){const{mergedClsPrefix:e,$slots:t,triggerOnRender:n}=this;return null==n||n(),E("div",{class:[`${e}-time-picker`,this.triggerThemeClass],style:this.triggerCssVars},E(ye,null,{default:()=>[E(me,null,{default:()=>E(Be,{ref:"inputInstRef",status:this.mergedStatus,value:this.displayTimeString,bordered:this.mergedBordered,passivelyActivated:!0,attrSize:this.mergedAttrSize,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,stateful:this.stateful,size:this.mergedSize,placeholder:this.localizedPlaceholder,clearable:this.clearable,disabled:this.mergedDisabled,textDecoration:this.isValueInvalid?"line-through":void 0,onFocus:this.handleTimeInputFocus,onBlur:this.handleTimeInputBlur,onActivate:this.handleTimeInputActivate,onDeactivate:this.handleTimeInputDeactivate,onUpdateValue:this.handleTimeInputUpdateValue,onClear:this.handleTimeInputClear,internalDeactivateOnEnter:!0,internalForceFocus:this.mergedShow,readonly:this.inputReadonly||this.mergedDisabled,onClick:this.handleTriggerClick,onKeydown:this.handleInputKeydown},this.showIcon?{[this.clearable?"clear-icon-placeholder":"suffix"]:()=>E(x,{clsPrefix:e,class:`${e}-time-picker-icon`},{default:()=>t.icon?t.icon():E(qe,null)})}:null)}),E(we,{teleportDisabled:this.adjustedTo===xe.tdkey,show:this.mergedShow,to:this.adjustedTo,containerClass:this.namespace,placement:this.placement},{default:()=>E(ae,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>{var e;return this.mergedShow?(null===(e=this.onRender)||void 0===e||e.call(this),ce(E(gi,{ref:"panelInstRef",actions:this.actions,class:this.themeClass,style:this.cssVars,seconds:this.seconds,minutes:this.minutes,hours:this.hours,transitionDisabled:this.transitionDisabled,hourValue:this.hourValue,showHour:this.hourInFormat,isHourInvalid:this.isHourInvalid,isHourDisabled:this.isHourDisabled,minuteValue:this.minuteValue,showMinute:this.minuteInFormat,isMinuteInvalid:this.isMinuteInvalid,isMinuteDisabled:this.isMinuteDisabled,secondValue:this.secondValue,amPmValue:this.amPmValue,showSecond:this.secondInFormat,isSecondInvalid:this.isSecondInvalid,isSecondDisabled:this.isSecondDisabled,isValueInvalid:this.isValueInvalid,clearText:this.localizedClear,nowText:this.localizedNow,confirmText:this.localizedPositiveText,use12Hours:this.use12Hours,onFocusout:this.handleMenuFocusOut,onKeydown:this.handleMenuKeydown,onHourClick:this.handleHourClick,onMinuteClick:this.handleMinuteClick,onSecondClick:this.handleSecondClick,onAmPmClick:this.handleAmPmClick,onNowClick:this.handleNowClick,onConfirmClick:this.handleConfirmClick,onClearClick:this.clearSelectedValue,onFocusDetectorFocus:this.handleFocusDetectorFocus}),[[P,this.handleClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),xi=R({name:"DateTimePanel",props:Cr,setup:e=>kr(e,"datetime"),render(){var e,t,n,r;const{mergedClsPrefix:i,mergedTheme:a,shortcuts:o,timePickerProps:s,datePickerSlots:u,onRender:c}=this;return null==c||c(),E("div",{ref:"selfRef",tabindex:0,class:[`${i}-date-panel`,`${i}-date-panel--datetime`,!this.panel&&`${i}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},E("div",{class:`${i}-date-panel-header`},E(Be,{value:this.dateInputValue,theme:a.peers.Input,themeOverrides:a.peerOverrides.Input,stateful:!1,size:this.timePickerSize,readonly:this.inputReadonly,class:`${i}-date-panel-date-input`,textDecoration:this.isDateInvalid?"line-through":"",placeholder:this.locale.selectDate,onBlur:this.handleDateInputBlur,onUpdateValue:this.handleDateInput}),E(_i,Object.assign({size:this.timePickerSize,placeholder:this.locale.selectTime,format:this.timePickerFormat},Array.isArray(s)?void 0:s,{showIcon:!1,to:!1,theme:a.peers.TimePicker,themeOverrides:a.peerOverrides.TimePicker,value:Array.isArray(this.value)?null:this.value,isHourDisabled:this.isHourDisabled,isMinuteDisabled:this.isMinuteDisabled,isSecondDisabled:this.isSecondDisabled,onUpdateValue:this.handleTimePickerChange,stateful:!1}))),E("div",{class:`${i}-date-panel-calendar`},E("div",{class:`${i}-date-panel-month`},E("div",{class:`${i}-date-panel-month__fast-prev`,onClick:this.prevYear},D(u["prev-year"],()=>[E(ke,null)])),E("div",{class:`${i}-date-panel-month__prev`,onClick:this.prevMonth},D(u["prev-month"],()=>[E(Se,null)])),E(Tr,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.calendarValue,onUpdateValue:this.onUpdateCalendarValue,mergedClsPrefix:i,calendarMonth:this.calendarMonth,calendarYear:this.calendarYear}),E("div",{class:`${i}-date-panel-month__next`,onClick:this.nextMonth},D(u["next-month"],()=>[E(Me,null)])),E("div",{class:`${i}-date-panel-month__fast-next`,onClick:this.nextYear},D(u["next-year"],()=>[E(Ce,null)]))),E("div",{class:`${i}-date-panel-weekdays`},this.weekdays.map(e=>E("div",{key:e,class:`${i}-date-panel-weekdays__day`},e))),E("div",{class:`${i}-date-panel-dates`},this.dateArray.map((e,t)=>E("div",{"data-n-date":!0,key:t,class:[`${i}-date-panel-date`,{[`${i}-date-panel-date--current`]:e.isCurrentDate,[`${i}-date-panel-date--selected`]:e.selected,[`${i}-date-panel-date--excluded`]:!e.inCurrentMonth,[`${i}-date-panel-date--disabled`]:this.mergedIsDateDisabled(e.ts,{type:"date",year:e.dateObject.year,month:e.dateObject.month,date:e.dateObject.date})}],onClick:()=>{this.handleDateClick(e)}},E("div",{class:`${i}-date-panel-date__trigger`}),e.dateObject.date,e.isCurrentDate?E("div",{class:`${i}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?E("div",{class:`${i}-date-panel-footer`},this.datePickerSlots.footer()):null,(null===(e=this.actions)||void 0===e?void 0:e.length)||o?E("div",{class:`${i}-date-panel-actions`},E("div",{class:`${i}-date-panel-actions__prefix`},o&&Object.keys(o).map(e=>{const t=o[e];return Array.isArray(t)?null:E(p,{size:"tiny",onMouseenter:()=>{this.handleSingleShortcutMouseenter(t)},onClick:()=>{this.handleSingleShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e})})),E("div",{class:`${i}-date-panel-actions__suffix`},(null===(t=this.actions)||void 0===t?void 0:t.includes("clear"))?l(this.datePickerSlots.clear,{onClear:this.clearSelectedDateTime,text:this.locale.clear},()=>[E(C,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.clearSelectedDateTime},{default:()=>this.locale.clear})]):null,(null===(n=this.actions)||void 0===n?void 0:n.includes("now"))?l(u.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[E(C,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.handleNowClick},{default:()=>this.locale.now})]):null,(null===(r=this.actions)||void 0===r?void 0:r.includes("confirm"))?l(u.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isDateInvalid,text:this.locale.confirm},()=>[E(C,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isDateInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,E(ze,{onFocus:this.handleFocusDetectorFocus}))}}),bi=R({name:"DateTimeRangePanel",props:Ir,setup:e=>Ar(e,"datetimerange"),render(){var e,t,n;const{mergedClsPrefix:r,mergedTheme:i,shortcuts:a,timePickerProps:o,onRender:s,datePickerSlots:u}=this;return null==s||s(),E("div",{ref:"selfRef",tabindex:0,class:[`${r}-date-panel`,`${r}-date-panel--datetimerange`,!this.panel&&`${r}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},E("div",{class:`${r}-date-panel-header`},E(Be,{value:this.startDateDisplayString,theme:i.peers.Input,themeOverrides:i.peerOverrides.Input,size:this.timePickerSize,stateful:!1,readonly:this.inputReadonly,class:`${r}-date-panel-date-input`,textDecoration:this.isStartValueInvalid?"line-through":"",placeholder:this.locale.selectDate,onBlur:this.handleStartDateInputBlur,onUpdateValue:this.handleStartDateInput}),E(_i,Object.assign({placeholder:this.locale.selectTime,format:this.timePickerFormat,size:this.timePickerSize},Array.isArray(o)?o[0]:o,{value:this.startTimeValue,to:!1,showIcon:!1,disabled:this.isSelecting,theme:i.peers.TimePicker,themeOverrides:i.peerOverrides.TimePicker,stateful:!1,isHourDisabled:this.isStartHourDisabled,isMinuteDisabled:this.isStartMinuteDisabled,isSecondDisabled:this.isStartSecondDisabled,onUpdateValue:this.handleStartTimePickerChange})),E(Be,{value:this.endDateInput,theme:i.peers.Input,themeOverrides:i.peerOverrides.Input,stateful:!1,size:this.timePickerSize,readonly:this.inputReadonly,class:`${r}-date-panel-date-input`,textDecoration:this.isEndValueInvalid?"line-through":"",placeholder:this.locale.selectDate,onBlur:this.handleEndDateInputBlur,onUpdateValue:this.handleEndDateInput}),E(_i,Object.assign({placeholder:this.locale.selectTime,format:this.timePickerFormat,size:this.timePickerSize},Array.isArray(o)?o[1]:o,{disabled:this.isSelecting,showIcon:!1,theme:i.peers.TimePicker,themeOverrides:i.peerOverrides.TimePicker,to:!1,stateful:!1,value:this.endTimeValue,isHourDisabled:this.isEndHourDisabled,isMinuteDisabled:this.isEndMinuteDisabled,isSecondDisabled:this.isEndSecondDisabled,onUpdateValue:this.handleEndTimePickerChange}))),E("div",{ref:"startDatesElRef",class:`${r}-date-panel-calendar ${r}-date-panel-calendar--start`},E("div",{class:`${r}-date-panel-month`},E("div",{class:`${r}-date-panel-month__fast-prev`,onClick:this.startCalendarPrevYear},D(u["prev-year"],()=>[E(ke,null)])),E("div",{class:`${r}-date-panel-month__prev`,onClick:this.startCalendarPrevMonth},D(u["prev-month"],()=>[E(Se,null)])),E(Tr,{monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.startCalendarDateTime,onUpdateValue:this.onUpdateStartCalendarValue,mergedClsPrefix:r,calendarMonth:this.startCalendarMonth,calendarYear:this.startCalendarYear}),E("div",{class:`${r}-date-panel-month__next`,onClick:this.startCalendarNextMonth},D(u["next-month"],()=>[E(Me,null)])),E("div",{class:`${r}-date-panel-month__fast-next`,onClick:this.startCalendarNextYear},D(u["next-year"],()=>[E(Ce,null)]))),E("div",{class:`${r}-date-panel-weekdays`},this.weekdays.map(e=>E("div",{key:e,class:`${r}-date-panel-weekdays__day`},e))),E("div",{class:`${r}-date-panel__divider`}),E("div",{class:`${r}-date-panel-dates`},this.startDateArray.map((e,t)=>{const n=this.mergedIsDateDisabled(e.ts);return E("div",{"data-n-date":!0,key:t,class:[`${r}-date-panel-date`,{[`${r}-date-panel-date--excluded`]:!e.inCurrentMonth,[`${r}-date-panel-date--current`]:e.isCurrentDate,[`${r}-date-panel-date--selected`]:e.selected,[`${r}-date-panel-date--covered`]:e.inSpan,[`${r}-date-panel-date--start`]:e.startOfSpan,[`${r}-date-panel-date--end`]:e.endOfSpan,[`${r}-date-panel-date--disabled`]:n}],onClick:n?void 0:()=>{this.handleDateClick(e)},onMouseenter:n?void 0:()=>{this.handleDateMouseEnter(e)}},E("div",{class:`${r}-date-panel-date__trigger`}),e.dateObject.date,e.isCurrentDate?E("div",{class:`${r}-date-panel-date__sup`}):null)}))),E("div",{class:`${r}-date-panel__vertical-divider`}),E("div",{ref:"endDatesElRef",class:`${r}-date-panel-calendar ${r}-date-panel-calendar--end`},E("div",{class:`${r}-date-panel-month`},E("div",{class:`${r}-date-panel-month__fast-prev`,onClick:this.endCalendarPrevYear},D(u["prev-year"],()=>[E(ke,null)])),E("div",{class:`${r}-date-panel-month__prev`,onClick:this.endCalendarPrevMonth},D(u["prev-month"],()=>[E(Se,null)])),E(Tr,{monthBeforeYear:this.calendarMonthBeforeYear,value:this.endCalendarDateTime,onUpdateValue:this.onUpdateEndCalendarValue,mergedClsPrefix:r,monthYearSeparator:this.calendarHeaderMonthYearSeparator,calendarMonth:this.endCalendarMonth,calendarYear:this.endCalendarYear}),E("div",{class:`${r}-date-panel-month__next`,onClick:this.endCalendarNextMonth},D(u["next-month"],()=>[E(Me,null)])),E("div",{class:`${r}-date-panel-month__fast-next`,onClick:this.endCalendarNextYear},D(u["next-year"],()=>[E(Ce,null)]))),E("div",{class:`${r}-date-panel-weekdays`},this.weekdays.map(e=>E("div",{key:e,class:`${r}-date-panel-weekdays__day`},e))),E("div",{class:`${r}-date-panel__divider`}),E("div",{class:`${r}-date-panel-dates`},this.endDateArray.map((e,t)=>{const n=this.mergedIsDateDisabled(e.ts);return E("div",{"data-n-date":!0,key:t,class:[`${r}-date-panel-date`,{[`${r}-date-panel-date--excluded`]:!e.inCurrentMonth,[`${r}-date-panel-date--current`]:e.isCurrentDate,[`${r}-date-panel-date--selected`]:e.selected,[`${r}-date-panel-date--covered`]:e.inSpan,[`${r}-date-panel-date--start`]:e.startOfSpan,[`${r}-date-panel-date--end`]:e.endOfSpan,[`${r}-date-panel-date--disabled`]:n}],onClick:n?void 0:()=>{this.handleDateClick(e)},onMouseenter:n?void 0:()=>{this.handleDateMouseEnter(e)}},E("div",{class:`${r}-date-panel-date__trigger`}),e.dateObject.date,e.isCurrentDate?E("div",{class:`${r}-date-panel-date__sup`}):null)}))),this.datePickerSlots.footer?E("div",{class:`${r}-date-panel-footer`},this.datePickerSlots.footer()):null,(null===(e=this.actions)||void 0===e?void 0:e.length)||a?E("div",{class:`${r}-date-panel-actions`},E("div",{class:`${r}-date-panel-actions__prefix`},a&&Object.keys(a).map(e=>{const t=a[e];return Array.isArray(t)||"function"==typeof t?E(p,{size:"tiny",onMouseenter:()=>{this.handleRangeShortcutMouseenter(t)},onClick:()=>{this.handleRangeShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e}):null})),E("div",{class:`${r}-date-panel-actions__suffix`},(null===(t=this.actions)||void 0===t?void 0:t.includes("clear"))?l(u.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[E(C,{theme:i.peers.Button,themeOverrides:i.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,(null===(n=this.actions)||void 0===n?void 0:n.includes("confirm"))?l(u.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isRangeInvalid||this.isSelecting,text:this.locale.confirm},()=>[E(C,{theme:i.peers.Button,themeOverrides:i.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isRangeInvalid||this.isSelecting,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,E(ze,{onFocus:this.handleFocusDetectorFocus}))}}),wi=R({name:"MonthRangePanel",props:Object.assign(Object.assign({},Ir),{type:{type:String,required:!0}}),setup(e){const t=Ar(e,e.type),{dateLocaleRef:n}=i("DatePicker");return G(()=>{t.justifyColumnsScrollState()}),Object.assign(Object.assign({},t),{renderItem:(e,r,i,a)=>{const{handleColItemClick:o}=t;return E("div",{"data-n-date":!0,key:r,class:[`${i}-date-panel-month-calendar__picker-col-item`,e.isCurrent&&`${i}-date-panel-month-calendar__picker-col-item--current`,e.selected&&`${i}-date-panel-month-calendar__picker-col-item--selected`,!1],onClick:()=>{o(e,a)}},"month"===e.type?sr(e.dateObject.month,e.monthFormat,n.value.locale):"quarter"===e.type?ur(e.dateObject.quarter,e.quarterFormat,n.value.locale):lr(e.dateObject.year,e.yearFormat,n.value.locale))}})},render(){var e,n,r;const{mergedClsPrefix:i,mergedTheme:a,shortcuts:o,type:s,renderItem:u,onRender:c}=this;return null==c||c(),E("div",{ref:"selfRef",tabindex:0,class:[`${i}-date-panel`,`${i}-date-panel--daterange`,!this.panel&&`${i}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},E("div",{ref:"startDatesElRef",class:`${i}-date-panel-calendar ${i}-date-panel-calendar--start`},E("div",{class:`${i}-date-panel-month-calendar`},E(I,{ref:"startYearScrollbarRef",class:`${i}-date-panel-month-calendar__picker-col`,theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar,container:()=>this.virtualListContainer("start"),content:()=>this.virtualListContent("start"),horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>E(De,{ref:"startYearVlRef",items:this.startYearArray,itemSize:40,showScrollbar:!1,keyField:"ts",onScroll:this.handleStartYearVlScroll,paddingBottom:4},{default:({item:e,index:t})=>u(e,t,i,"start")})}),"monthrange"===s||"quarterrange"===s?E("div",{class:`${i}-date-panel-month-calendar__picker-col`},E(I,{ref:"startMonthScrollbarRef",theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar},{default:()=>[("monthrange"===s?this.startMonthArray:this.startQuarterArray).map((e,t)=>u(e,t,i,"start")),"monthrange"===s&&E("div",{class:`${i}-date-panel-month-calendar__padding`})]})):null)),E("div",{class:`${i}-date-panel__vertical-divider`}),E("div",{ref:"endDatesElRef",class:`${i}-date-panel-calendar ${i}-date-panel-calendar--end`},E("div",{class:`${i}-date-panel-month-calendar`},E(I,{ref:"endYearScrollbarRef",class:`${i}-date-panel-month-calendar__picker-col`,theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar,container:()=>this.virtualListContainer("end"),content:()=>this.virtualListContent("end"),horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>E(De,{ref:"endYearVlRef",items:this.endYearArray,itemSize:40,showScrollbar:!1,keyField:"ts",onScroll:this.handleEndYearVlScroll,paddingBottom:4},{default:({item:e,index:t})=>u(e,t,i,"end")})}),"monthrange"===s||"quarterrange"===s?E("div",{class:`${i}-date-panel-month-calendar__picker-col`},E(I,{ref:"endMonthScrollbarRef",theme:a.peers.Scrollbar,themeOverrides:a.peerOverrides.Scrollbar},{default:()=>[("monthrange"===s?this.endMonthArray:this.endQuarterArray).map((e,t)=>u(e,t,i,"end")),"monthrange"===s&&E("div",{class:`${i}-date-panel-month-calendar__padding`})]})):null)),t(this.datePickerSlots.footer,e=>e?E("div",{class:`${i}-date-panel-footer`},e):null),(null===(e=this.actions)||void 0===e?void 0:e.length)||o?E("div",{class:`${i}-date-panel-actions`},E("div",{class:`${i}-date-panel-actions__prefix`},o&&Object.keys(o).map(e=>{const t=o[e];return Array.isArray(t)||"function"==typeof t?E(p,{size:"tiny",onMouseenter:()=>{this.handleRangeShortcutMouseenter(t)},onClick:()=>{this.handleRangeShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e}):null})),E("div",{class:`${i}-date-panel-actions__suffix`},(null===(n=this.actions)||void 0===n?void 0:n.includes("clear"))?l(this.datePickerSlots.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[E(p,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,(null===(r=this.actions)||void 0===r?void 0:r.includes("confirm"))?l(this.datePickerSlots.confirm,{disabled:this.isRangeInvalid,onConfirm:this.handleConfirmClick,text:this.locale.confirm},()=>[E(p,{theme:a.peers.Button,themeOverrides:a.peerOverrides.Button,size:"tiny",type:"primary",disabled:this.isRangeInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,E(ze,{onFocus:this.handleFocusDetectorFocus}))}}),Si=Object.assign(Object.assign({},a.props),{to:xe.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,updateValueOnClose:Boolean,calendarDayFormat:String,calendarHeaderYearFormat:String,calendarHeaderMonthFormat:String,calendarHeaderMonthYearSeparator:{type:String,default:" "},calendarHeaderMonthBeforeYear:{type:Boolean,default:void 0},defaultValue:[Number,Array],defaultFormattedValue:[String,Array],defaultTime:[Number,String,Array,Function],disabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom-start"},value:[Number,Array],formattedValue:[String,Array],size:String,type:{type:String,default:"date"},valueFormat:String,separator:String,placeholder:String,startPlaceholder:String,endPlaceholder:String,format:String,dateFormat:String,timePickerFormat:String,actions:Array,shortcuts:Object,isDateDisabled:Function,isTimeDisabled:Function,show:{type:Boolean,default:void 0},panel:Boolean,ranges:Object,firstDayOfWeek:Number,inputReadonly:Boolean,closeOnSelect:Boolean,status:String,timePickerProps:[Object,Array],onClear:Function,onConfirm:Function,defaultCalendarStartTime:Number,defaultCalendarEndTime:Number,bindCalendarMonths:Boolean,monthFormat:{type:String,default:"M"},yearFormat:{type:String,default:"y"},quarterFormat:{type:String,default:"'Q'Q"},yearRange:{type:Array,default:()=>[1901,2100]},"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],"onUpdate:formattedValue":[Function,Array],onUpdateFormattedValue:[Function,Array],"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onNextMonth:Function,onPrevMonth:Function,onNextYear:Function,onPrevYear:Function,onChange:[Function,Array]}),Ci=m([v("date-picker","\n position: relative;\n z-index: auto;\n ",[v("date-picker-icon","\n color: var(--n-icon-color-override);\n transition: color .3s var(--n-bezier);\n "),v("icon","\n color: var(--n-icon-color-override);\n transition: color .3s var(--n-bezier);\n "),A("disabled",[v("date-picker-icon","\n color: var(--n-icon-color-disabled-override);\n "),v("icon","\n color: var(--n-icon-color-disabled-override);\n ")])]),v("date-panel","\n width: fit-content;\n outline: none;\n margin: 4px 0;\n display: grid;\n grid-template-columns: 0fr;\n border-radius: var(--n-panel-border-radius);\n background-color: var(--n-panel-color);\n color: var(--n-panel-text-color);\n user-select: none;\n ",[_e(),A("shadow","\n box-shadow: var(--n-panel-box-shadow);\n "),v("date-panel-calendar",{padding:"var(--n-calendar-left-padding)",display:"grid",gridTemplateColumns:"1fr",gridArea:"left-calendar"},[A("end",{padding:"var(--n-calendar-right-padding)",gridArea:"right-calendar"})]),v("date-panel-month-calendar",{display:"flex",gridArea:"left-calendar"},[M("picker-col","\n min-width: var(--n-scroll-item-width);\n height: calc(var(--n-scroll-item-height) * 6);\n user-select: none;\n -webkit-user-select: none;\n ",[m("&:first-child","\n min-width: calc(var(--n-scroll-item-width) + 4px);\n ",[M("picker-col-item",[m("&::before","left: 4px;")])]),M("padding","\n height: calc(var(--n-scroll-item-height) * 5)\n ")]),M("picker-col-item","\n z-index: 0;\n cursor: pointer;\n height: var(--n-scroll-item-height);\n box-sizing: border-box;\n padding-top: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n transition: \n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n background: #0000;\n color: var(--n-item-text-color);\n ",[m("&::before",'\n z-index: -1;\n content: "";\n position: absolute;\n left: 0;\n right: 4px;\n top: 4px;\n bottom: 0;\n border-radius: var(--n-scroll-item-border-radius);\n transition: \n background-color .3s var(--n-bezier);\n '),h("disabled",[m("&:hover::before","\n background-color: var(--n-item-color-hover);\n "),A("selected","\n color: var(--n-item-color-active);\n ",[m("&::before","background-color: var(--n-item-color-hover);")])]),A("disabled","\n color: var(--n-item-text-color-disabled);\n cursor: not-allowed;\n ",[A("selected",[m("&::before","\n background-color: var(--n-item-color-disabled);\n ")])])])]),A("date",{gridTemplateAreas:'\n "left-calendar"\n "footer"\n "action"\n '}),A("week",{gridTemplateAreas:'\n "left-calendar"\n "footer"\n "action"\n '}),A("daterange",{gridTemplateAreas:'\n "left-calendar divider right-calendar"\n "footer footer footer"\n "action action action"\n '}),A("datetime",{gridTemplateAreas:'\n "header"\n "left-calendar"\n "footer"\n "action"\n '}),A("datetimerange",{gridTemplateAreas:'\n "header header header"\n "left-calendar divider right-calendar"\n "footer footer footer"\n "action action action"\n '}),A("month",{gridTemplateAreas:'\n "left-calendar"\n "footer"\n "action"\n '}),v("date-panel-footer",{gridArea:"footer"}),v("date-panel-actions",{gridArea:"action"}),v("date-panel-header",{gridArea:"header"}),v("date-panel-header","\n box-sizing: border-box;\n width: 100%;\n align-items: center;\n padding: var(--n-panel-header-padding);\n display: flex;\n justify-content: space-between;\n border-bottom: 1px solid var(--n-panel-header-divider-color);\n ",[m(">",[m("*:not(:last-child)",{marginRight:"10px"}),m("*",{flex:1,width:0}),v("time-picker",{zIndex:1})])]),v("date-panel-month","\n box-sizing: border-box;\n display: grid;\n grid-template-columns: var(--n-calendar-title-grid-template-columns);\n align-items: center;\n justify-items: center;\n padding: var(--n-calendar-title-padding);\n height: var(--n-calendar-title-height);\n ",[M("prev, next, fast-prev, fast-next","\n line-height: 0;\n cursor: pointer;\n width: var(--n-arrow-size);\n height: var(--n-arrow-size);\n color: var(--n-arrow-color);\n "),M("month-year","\n user-select: none;\n -webkit-user-select: none;\n flex-grow: 1;\n position: relative;\n ",[M("text","\n font-size: var(--n-calendar-title-font-size);\n line-height: var(--n-calendar-title-font-size);\n font-weight: var(--n-calendar-title-font-weight);\n padding: 6px 8px;\n text-align: center;\n color: var(--n-calendar-title-text-color);\n cursor: pointer;\n transition: background-color .3s var(--n-bezier);\n border-radius: var(--n-panel-border-radius);\n ",[A("active","\n background-color: var(--n-calendar-title-color-hover);\n "),m("&:hover","\n background-color: var(--n-calendar-title-color-hover);\n ")])])]),v("date-panel-weekdays","\n display: grid;\n margin: auto;\n grid-template-columns: repeat(7, var(--n-item-cell-width));\n grid-template-rows: repeat(1, var(--n-item-cell-height));\n align-items: center;\n justify-items: center;\n margin-bottom: 4px;\n border-bottom: 1px solid var(--n-calendar-days-divider-color);\n ",[M("day","\n white-space: nowrap;\n user-select: none;\n -webkit-user-select: none;\n line-height: 15px;\n width: var(--n-item-size);\n text-align: center;\n font-size: var(--n-calendar-days-font-size);\n color: var(--n-item-text-color);\n display: flex;\n align-items: center;\n justify-content: center;\n ")]),v("date-panel-dates","\n margin: auto;\n display: grid;\n grid-template-columns: repeat(7, var(--n-item-cell-width));\n grid-template-rows: repeat(6, var(--n-item-cell-height));\n align-items: center;\n justify-items: center;\n flex-wrap: wrap;\n ",[v("date-panel-date","\n user-select: none;\n -webkit-user-select: none;\n position: relative;\n width: var(--n-item-size);\n height: var(--n-item-size);\n line-height: var(--n-item-size);\n text-align: center;\n font-size: var(--n-item-font-size);\n border-radius: var(--n-item-border-radius);\n z-index: 0;\n cursor: pointer;\n transition:\n background-color .2s var(--n-bezier),\n color .2s var(--n-bezier);\n ",[M("trigger","\n position: absolute;\n left: calc(var(--n-item-size) / 2 - var(--n-item-cell-width) / 2);\n top: calc(var(--n-item-size) / 2 - var(--n-item-cell-height) / 2);\n width: var(--n-item-cell-width);\n height: var(--n-item-cell-height);\n "),A("current",[M("sup",'\n position: absolute;\n top: 2px;\n right: 2px;\n content: "";\n height: 4px;\n width: 4px;\n border-radius: 2px;\n background-color: var(--n-item-color-active);\n transition:\n background-color .2s var(--n-bezier);\n ')]),m("&::after",'\n content: "";\n z-index: -1;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: inherit;\n transition: background-color .3s var(--n-bezier);\n '),A("covered, start, end",[h("excluded",[m("&::before",'\n content: "";\n z-index: -2;\n position: absolute;\n left: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2);\n right: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2);\n top: 0;\n bottom: 0;\n background-color: var(--n-item-color-included);\n '),m("&:nth-child(7n + 1)::before",{borderTopLeftRadius:"var(--n-item-border-radius)",borderBottomLeftRadius:"var(--n-item-border-radius)"}),m("&:nth-child(7n + 7)::before",{borderTopRightRadius:"var(--n-item-border-radius)",borderBottomRightRadius:"var(--n-item-border-radius)"})])]),A("selected",{color:"var(--n-item-text-color-active)"},[m("&::after",{backgroundColor:"var(--n-item-color-active)"}),A("start",[m("&::before",{left:"50%"})]),A("end",[m("&::before",{right:"50%"})]),M("sup",{backgroundColor:"var(--n-panel-color)"})]),A("excluded",{color:"var(--n-item-text-color-disabled)"},[A("selected",[m("&::after",{backgroundColor:"var(--n-item-color-disabled)"})])]),A("disabled",{cursor:"not-allowed",color:"var(--n-item-text-color-disabled)"},[A("covered",[m("&::before",{backgroundColor:"var(--n-item-color-disabled)"})]),A("selected",[m("&::before",{backgroundColor:"var(--n-item-color-disabled)"}),m("&::after",{backgroundColor:"var(--n-item-color-disabled)"})])]),A("week-hovered",[m("&::before","\n background-color: var(--n-item-color-included);\n "),m("&:nth-child(7n + 1)::before","\n border-top-left-radius: var(--n-item-border-radius);\n border-bottom-left-radius: var(--n-item-border-radius);\n "),m("&:nth-child(7n + 7)::before","\n border-top-right-radius: var(--n-item-border-radius);\n border-bottom-right-radius: var(--n-item-border-radius);\n ")]),A("week-selected","\n color: var(--n-item-text-color-active)\n ",[m("&::before","\n background-color: var(--n-item-color-active);\n "),m("&:nth-child(7n + 1)::before","\n border-top-left-radius: var(--n-item-border-radius);\n border-bottom-left-radius: var(--n-item-border-radius);\n "),m("&:nth-child(7n + 7)::before","\n border-top-right-radius: var(--n-item-border-radius);\n border-bottom-right-radius: var(--n-item-border-radius);\n ")])])]),h("week",[v("date-panel-dates",[v("date-panel-date",[h("disabled",[h("selected",[m("&:hover","\n background-color: var(--n-item-color-hover);\n ")])])])])]),A("week",[v("date-panel-dates",[v("date-panel-date",[m("&::before",'\n content: "";\n z-index: -2;\n position: absolute;\n left: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2);\n right: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2);\n top: 0;\n bottom: 0;\n transition: background-color .3s var(--n-bezier);\n ')])])]),M("vertical-divider","\n grid-area: divider;\n height: 100%;\n width: 1px;\n background-color: var(--n-calendar-divider-color);\n "),v("date-panel-footer","\n border-top: 1px solid var(--n-panel-action-divider-color);\n padding: var(--n-panel-extra-footer-padding);\n "),v("date-panel-actions","\n flex: 1;\n padding: var(--n-panel-action-padding);\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-top: 1px solid var(--n-panel-action-divider-color);\n ",[M("prefix, suffix","\n display: flex;\n margin-bottom: -8px;\n "),M("suffix","\n align-self: flex-end;\n "),M("prefix","\n flex-wrap: wrap;\n "),v("button","\n margin-bottom: 8px;\n ",[m("&:not(:last-child)","\n margin-right: 8px;\n ")])])]),m("[data-n-date].transition-disabled",{transition:"none !important"},[m("&::before, &::after",{transition:"none !important"})])]);var ki=R({name:"DatePicker",props:Si,slots:Object,setup(t,{slots:n}){var r;const{localeRef:l,dateLocaleRef:c}=i("DatePicker"),h=w(t),{mergedSizeRef:p,mergedDisabledRef:f,mergedStatusRef:v}=h,{mergedComponentPropsRef:m,mergedClsPrefixRef:_,mergedBorderedRef:x,namespaceRef:b,inlineThemeDisabled:C}=g(t),k=ue(null),M=ue(null),D=ue(null),I=ue(!1),A=J(t,"show"),P=s(A,I),O=K(()=>({locale:c.value.locale,useAdditionalWeekYearTokens:!0})),R=K(()=>{const{format:e}=t;if(e)return e;switch(t.type){case"date":case"daterange":return l.value.dateFormat;case"datetime":case"datetimerange":return l.value.dateTimeFormat;case"year":case"yearrange":return l.value.yearTypeFormat;case"month":case"monthrange":return l.value.monthTypeFormat;case"quarter":case"quarterrange":return l.value.quarterFormat;case"week":return l.value.weekFormat}}),L=K(()=>{var e;return null!==(e=t.valueFormat)&&void 0!==e?e:R.value});function z(e){if(null===e)return null;const{value:t}=L,{value:n}=O;return Array.isArray(e)?[mr(e[0],t,new Date,n).getTime(),mr(e[1],t,new Date,n).getTime()]:mr(e,t,new Date,n).getTime()}const{defaultFormattedValue:B,defaultValue:F}=t,E=ue(null!==(r=void 0!==B?z(B):F)&&void 0!==r?r:null),V=K(()=>{const{formattedValue:e}=t;return void 0!==e?z(e):t.value}),H=s(V,E),W=ue(null);Y(()=>{W.value=H.value});const $=ue(""),G=ue(""),U=ue(""),j=a("DatePicker","-date-picker",Ci,Ae,t,_),q=K(()=>{var e,t;return(null===(t=null===(e=null==m?void 0:m.value)||void 0===e?void 0:e.DatePicker)||void 0===t?void 0:t.timePickerSize)||"small"}),X=K(()=>["daterange","datetimerange","monthrange","quarterrange","yearrange"].includes(t.type)),Q=K(()=>{const{placeholder:e}=t;if(void 0!==e)return e;{const{type:e}=t;switch(e){case"date":return l.value.datePlaceholder;case"datetime":return l.value.datetimePlaceholder;case"month":return l.value.monthPlaceholder;case"year":return l.value.yearPlaceholder;case"quarter":return l.value.quarterPlaceholder;case"week":return l.value.weekPlaceholder;default:return""}}}),ee=K(()=>void 0===t.startPlaceholder?"daterange"===t.type?l.value.startDatePlaceholder:"datetimerange"===t.type?l.value.startDatetimePlaceholder:"monthrange"===t.type?l.value.startMonthPlaceholder:"":t.startPlaceholder),te=K(()=>void 0===t.endPlaceholder?"daterange"===t.type?l.value.endDatePlaceholder:"datetimerange"===t.type?l.value.endDatetimePlaceholder:"monthrange"===t.type?l.value.endMonthPlaceholder:"":t.endPlaceholder),ne=K(()=>{const{actions:e,type:n,clearable:r}=t;if(null===e)return[];if(void 0!==e)return e;const i=r?["clear"]:[];switch(n){case"date":case"week":case"year":return i.push("now"),i;case"datetime":case"month":case"quarter":return i.push("now","confirm"),i;case"daterange":case"datetimerange":case"monthrange":case"yearrange":case"quarterrange":return i.push("confirm"),i;default:o("date-picker","The type is wrong, n-date-picker's type only supports `date`, `datetime`, `daterange` and `datetimerange`.")}});function re(e,n){const{"onUpdate:value":r,onUpdateValue:i,onChange:a}=t,{nTriggerFormChange:o,nTriggerFormInput:s}=h,l=function(e){if(null===e)return null;if(Array.isArray(e)){const{value:t}=L,{value:n}=O;return[Vt(e[0],t,n),Vt(e[1],t,O.value)]}return Vt(e,L.value,O.value)}(e);n.doConfirm&&function(e,n){const{onConfirm:r}=t;r&&r(e,n)}(e,l),i&&u(i,e,l),r&&u(r,e,l),a&&u(a,e,l),E.value=e,function(e,n){const{"onUpdate:formattedValue":r,onUpdateFormattedValue:i}=t;r&&u(r,e,n),i&&u(i,e,n)}(l,e),o(),s()}function ie(){const{onClear:e}=t;null==e||e()}function ae(e){const{"onUpdate:show":n,onUpdateShow:r}=t;n&&u(n,e),r&&u(r,e),I.value=e}function oe(){const e=W.value;re(Array.isArray(e)?[e[0],e[1]]:e,{doConfirm:!0})}function se(){const{value:e}=W;X.value?(Array.isArray(e)||null===e)&&function(e){if(null===e)G.value="",U.value="";else{const t=O.value;G.value=Vt(e[0],R.value,t),U.value=Vt(e[1],R.value,t)}}(e):Array.isArray(e)||function(e){$.value=null===e?"":Vt(e,R.value,O.value)}(e)}function le(){f.value||P.value||ae(!0)}function ce({returnFocus:e,disableUpdateOnClose:n}){var r;P.value&&(ae(!1),"date"!==t.type&&t.updateValueOnClose&&!n&&oe(),e&&(null===(r=D.value)||void 0===r||r.focus()))}Z(W,()=>{se()}),se(),Z(P,e=>{e||(W.value=H.value)});const de=function(e,t){const n=K(()=>{const{isTimeDisabled:n}=e,{value:r}=t;if(null!==r&&!Array.isArray(r))return null==n?void 0:n(r)}),r=K(()=>{var e;return null===(e=n.value)||void 0===e?void 0:e.isHourDisabled}),i=K(()=>{var e;return null===(e=n.value)||void 0===e?void 0:e.isMinuteDisabled}),a=K(()=>{var e;return null===(e=n.value)||void 0===e?void 0:e.isSecondDisabled}),o=K(()=>{const{type:n,isDateDisabled:r}=e,{value:i}=t;return!(null===i||Array.isArray(i)||!["date","datetime"].includes(n)||!r)&&r(i,{type:"input"})}),s=K(()=>{const{type:n}=e,{value:o}=t;if(null===o||"datetime"===n||Array.isArray(o))return!1;const s=new Date(o),l=s.getHours(),u=s.getMinutes(),c=s.getMinutes();return!!r.value&&r.value(l)||!!i.value&&i.value(u,l)||!!a.value&&a.value(c,u,l)}),l=K(()=>o.value||s.value);return{isValueInvalidRef:K(()=>{const{type:t}=e;return"date"===t?o.value:"datetime"===t&&l.value}),isDateInvalidRef:o,isTimeInvalidRef:s,isDateTimeInvalidRef:l,isHourDisabledRef:r,isMinuteDisabledRef:i,isSecondDisabledRef:a}}(t,W),he=function(e,t){const n=K(()=>{const{isTimeDisabled:n}=e,{value:r}=t;return Array.isArray(r)&&n?[null==n?void 0:n(r[0],"start",r),null==n?void 0:n(r[1],"end",r)]:[void 0,void 0]}),r={isStartHourDisabledRef:K(()=>{var e;return null===(e=n.value[0])||void 0===e?void 0:e.isHourDisabled}),isEndHourDisabledRef:K(()=>{var e;return null===(e=n.value[1])||void 0===e?void 0:e.isHourDisabled}),isStartMinuteDisabledRef:K(()=>{var e;return null===(e=n.value[0])||void 0===e?void 0:e.isMinuteDisabled}),isEndMinuteDisabledRef:K(()=>{var e;return null===(e=n.value[1])||void 0===e?void 0:e.isMinuteDisabled}),isStartSecondDisabledRef:K(()=>{var e;return null===(e=n.value[0])||void 0===e?void 0:e.isSecondDisabled}),isEndSecondDisabledRef:K(()=>{var e;return null===(e=n.value[1])||void 0===e?void 0:e.isSecondDisabled})},i=K(()=>{const{type:n,isDateDisabled:r}=e,{value:i}=t;return!!(null!==i&&Array.isArray(i)&&["daterange","datetimerange"].includes(n)&&r)&&r(i[0],"start",i)}),a=K(()=>{const{type:n,isDateDisabled:r}=e,{value:i}=t;return!!(null!==i&&Array.isArray(i)&&["daterange","datetimerange"].includes(n)&&r)&&r(i[1],"end",i)}),o=K(()=>{const{type:n}=e,{value:i}=t;if(null===i||!Array.isArray(i)||"datetimerange"!==n)return!1;const a=Gt(i[0]),o=Ut(i[0]),s=Zt(i[0]),{isStartHourDisabledRef:l,isStartMinuteDisabledRef:u,isStartSecondDisabledRef:c}=r;return!!l.value&&l.value(a)||!!u.value&&u.value(o,a)||!!c.value&&c.value(s,o,a)}),s=K(()=>{const{type:n}=e,{value:i}=t;if(null===i||!Array.isArray(i)||"datetimerange"!==n)return!1;const a=Gt(i[1]),o=Ut(i[1]),s=Zt(i[1]),{isEndHourDisabledRef:l,isEndMinuteDisabledRef:u,isEndSecondDisabledRef:c}=r;return!!l.value&&l.value(a)||!!u.value&&u.value(o,a)||!!c.value&&c.value(s,o,a)}),l=K(()=>i.value||o.value),u=K(()=>a.value||s.value),c=K(()=>l.value||u.value);return Object.assign(Object.assign({},r),{isStartDateInvalidRef:i,isEndDateInvalidRef:a,isStartTimeInvalidRef:o,isEndTimeInvalidRef:s,isStartValueInvalidRef:l,isEndValueInvalidRef:u,isRangeInvalidRef:c})}(t,W);N(br,Object.assign(Object.assign(Object.assign({mergedClsPrefixRef:_,mergedThemeRef:j,timePickerSizeRef:q,localeRef:l,dateLocaleRef:c,firstDayOfWeekRef:J(t,"firstDayOfWeek"),isDateDisabledRef:J(t,"isDateDisabled"),rangesRef:J(t,"ranges"),timePickerPropsRef:J(t,"timePickerProps"),closeOnSelectRef:J(t,"closeOnSelect"),updateValueOnCloseRef:J(t,"updateValueOnClose"),monthFormatRef:J(t,"monthFormat"),yearFormatRef:J(t,"yearFormat"),quarterFormatRef:J(t,"quarterFormat"),yearRangeRef:J(t,"yearRange")},de),he),{datePickerSlots:n}));const pe={focus:()=>{var e;null===(e=D.value)||void 0===e||e.focus()},blur:()=>{var e;null===(e=D.value)||void 0===e||e.blur()}},fe=K(()=>{const{common:{cubicBezierEaseInOut:e},self:{iconColor:t,iconColorDisabled:n}}=j.value;return{"--n-bezier":e,"--n-icon-color-override":t,"--n-icon-color-disabled-override":n}}),ve=C?y("date-picker-trigger",void 0,fe,t):void 0,ge=K(()=>{const{type:e}=t,{common:{cubicBezierEaseInOut:n},self:{calendarTitleFontSize:r,calendarDaysFontSize:i,itemFontSize:a,itemTextColor:o,itemColorDisabled:s,itemColorIncluded:l,itemColorHover:u,itemColorActive:c,itemBorderRadius:d,itemTextColorDisabled:h,itemTextColorActive:p,panelColor:f,panelTextColor:v,arrowColor:g,calendarTitleTextColor:m,panelActionDividerColor:y,panelHeaderDividerColor:_,calendarDaysDividerColor:x,panelBoxShadow:b,panelBorderRadius:w,calendarTitleFontWeight:S,panelExtraFooterPadding:C,panelActionPadding:k,itemSize:M,itemCellWidth:D,itemCellHeight:I,scrollItemWidth:A,scrollItemHeight:P,calendarTitlePadding:O,calendarTitleHeight:R,calendarDaysHeight:L,calendarDaysTextColor:z,arrowSize:N,panelHeaderPadding:B,calendarDividerColor:F,calendarTitleGridTempateColumns:E,iconColor:V,iconColorDisabled:H,scrollItemBorderRadius:Y,calendarTitleColorHover:W,[T("calendarLeftPadding",e)]:$,[T("calendarRightPadding",e)]:G}}=j.value;return{"--n-bezier":n,"--n-panel-border-radius":w,"--n-panel-color":f,"--n-panel-box-shadow":b,"--n-panel-text-color":v,"--n-panel-header-padding":B,"--n-panel-header-divider-color":_,"--n-calendar-left-padding":$,"--n-calendar-right-padding":G,"--n-calendar-title-color-hover":W,"--n-calendar-title-height":R,"--n-calendar-title-padding":O,"--n-calendar-title-font-size":r,"--n-calendar-title-font-weight":S,"--n-calendar-title-text-color":m,"--n-calendar-title-grid-template-columns":E,"--n-calendar-days-height":L,"--n-calendar-days-divider-color":x,"--n-calendar-days-font-size":i,"--n-calendar-days-text-color":z,"--n-calendar-divider-color":F,"--n-panel-action-padding":k,"--n-panel-extra-footer-padding":C,"--n-panel-action-divider-color":y,"--n-item-font-size":a,"--n-item-border-radius":d,"--n-item-size":M,"--n-item-cell-width":D,"--n-item-cell-height":I,"--n-item-text-color":o,"--n-item-color-included":l,"--n-item-color-disabled":s,"--n-item-color-hover":u,"--n-item-color-active":c,"--n-item-text-color-disabled":h,"--n-item-text-color-active":p,"--n-scroll-item-width":A,"--n-scroll-item-height":P,"--n-scroll-item-border-radius":Y,"--n-arrow-size":N,"--n-arrow-color":g,"--n-icon-color":V,"--n-icon-color-disabled":H}}),me=C?y("date-picker",K(()=>t.type),ge,t):void 0;return Object.assign(Object.assign({},pe),{mergedStatus:v,mergedClsPrefix:_,mergedBordered:x,namespace:b,uncontrolledValue:E,pendingValue:W,panelInstRef:k,triggerElRef:M,inputInstRef:D,isMounted:d(),displayTime:$,displayStartTime:G,displayEndTime:U,mergedShow:P,adjustedTo:xe(t),isRange:X,localizedStartPlaceholder:ee,localizedEndPlaceholder:te,mergedSize:p,mergedDisabled:f,localizedPlacehoder:Q,isValueInvalid:de.isValueInvalidRef,isStartValueInvalid:he.isStartValueInvalidRef,isEndValueInvalid:he.isEndValueInvalidRef,handleInputKeydown:function(t){"Escape"===t.key&&P.value&&e(t)},handleClickOutside:function(e){var t;P.value&&!(null===(t=M.value)||void 0===t?void 0:t.contains(S(e)))&&ce({returnFocus:!1})},handleKeydown:function(t){"Escape"===t.key&&P.value&&(e(t),ce({returnFocus:!0}))},handleClear:function(){var e;ae(!1),null===(e=D.value)||void 0===e||e.deactivate(),ie()},handlePanelClear:function(){var e;null===(e=D.value)||void 0===e||e.deactivate(),ie()},handleTriggerClick:function(e){f.value||Re(e,"clear")||P.value||le()},handleInputActivate:function(){P.value||le()},handleInputDeactivate:function(){f.value||(se(),ce({returnFocus:!1}))},handleInputFocus:function(e){f.value||function(e){const{onFocus:n}=t,{nTriggerFormFocus:r}=h;n&&u(n,e),r()}(e)},handleInputBlur:function(e){var n;(null===(n=k.value)||void 0===n?void 0:n.$el.contains(e.relatedTarget))||(!function(e){const{onBlur:n}=t,{nTriggerFormBlur:r}=h;n&&u(n,e),r()}(e),se(),ce({returnFocus:!1}))},handlePanelTabOut:function(){ce({returnFocus:!0})},handlePanelClose:function(e){ce({returnFocus:!0,disableUpdateOnClose:e})},handleRangeUpdateValue:function(e,{source:t}){if(""===e[0]&&""===e[1])return re(null,{doConfirm:!1}),W.value=null,G.value="",void(U.value="");const[n,r]=e,i=mr(n,R.value,new Date,O.value),a=mr(r,R.value,new Date,O.value);if(at(i)&&at(a)){let e=qt(i),n=qt(a);a<i&&(0===t?n=e:e=n),re([e,n],{doConfirm:!1}),se()}else[G.value,U.value]=e},handleSingleUpdateValue:function(e){if(""===e)return re(null,{doConfirm:!1}),W.value=null,void($.value="");const t=mr(e,R.value,new Date,O.value);at(t)?(re(qt(t),{doConfirm:!1}),se()):$.value=e},handlePanelUpdateValue:function(e,t){t?re(e,{doConfirm:!1}):function(e){W.value=e}(e)},handlePanelConfirm:oe,mergedTheme:j,actions:ne,triggerCssVars:C?void 0:fe,triggerThemeClass:null==ve?void 0:ve.themeClass,triggerOnRender:null==ve?void 0:ve.onRender,cssVars:C?void 0:ge,themeClass:null==me?void 0:me.themeClass,onRender:null==me?void 0:me.onRender,onNextMonth:t.onNextMonth,onPrevMonth:t.onPrevMonth,onNextYear:t.onNextYear,onPrevYear:t.onPrevYear})},render(){const{clearable:e,triggerOnRender:t,mergedClsPrefix:n,$slots:r}=this,i={onUpdateValue:this.handlePanelUpdateValue,onTabOut:this.handlePanelTabOut,onClose:this.handlePanelClose,onClear:this.handlePanelClear,onKeydown:this.handleKeydown,onConfirm:this.handlePanelConfirm,ref:"panelInstRef",value:this.pendingValue,active:this.mergedShow,actions:this.actions,shortcuts:this.shortcuts,style:this.cssVars,defaultTime:this.defaultTime,themeClass:this.themeClass,panel:this.panel,inputReadonly:this.inputReadonly||this.mergedDisabled,onRender:this.onRender,onNextMonth:this.onNextMonth,onPrevMonth:this.onPrevMonth,onNextYear:this.onNextYear,onPrevYear:this.onPrevYear,timePickerFormat:this.timePickerFormat,dateFormat:this.dateFormat,calendarDayFormat:this.calendarDayFormat,calendarHeaderYearFormat:this.calendarHeaderYearFormat,calendarHeaderMonthFormat:this.calendarHeaderMonthFormat,calendarHeaderMonthYearSeparator:this.calendarHeaderMonthYearSeparator,calendarHeaderMonthBeforeYear:this.calendarHeaderMonthBeforeYear},a=()=>{const{type:e}=this;return"datetime"===e?E(xi,Object.assign({},i,{defaultCalendarStartTime:this.defaultCalendarStartTime}),r):"daterange"===e?E(Pr,Object.assign({},i,{defaultCalendarStartTime:this.defaultCalendarStartTime,defaultCalendarEndTime:this.defaultCalendarEndTime,bindCalendarMonths:this.bindCalendarMonths}),r):"datetimerange"===e?E(bi,Object.assign({},i,{defaultCalendarStartTime:this.defaultCalendarStartTime,defaultCalendarEndTime:this.defaultCalendarEndTime,bindCalendarMonths:this.bindCalendarMonths}),r):"month"===e||"year"===e||"quarter"===e?E(Mr,Object.assign({},i,{type:e,key:e})):"monthrange"===e||"yearrange"===e||"quarterrange"===e?E(wi,Object.assign({},i,{type:e})):E(Dr,Object.assign({},i,{type:e,defaultCalendarStartTime:this.defaultCalendarStartTime}),r)};if(this.panel)return a();null==t||t();const o={bordered:this.mergedBordered,size:this.mergedSize,passivelyActivated:!0,disabled:this.mergedDisabled,readonly:this.inputReadonly||this.mergedDisabled,clearable:e,onClear:this.handleClear,onClick:this.handleTriggerClick,onKeydown:this.handleInputKeydown,onActivate:this.handleInputActivate,onDeactivate:this.handleInputDeactivate,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur};return E("div",{ref:"triggerElRef",class:[`${n}-date-picker`,this.mergedDisabled&&`${n}-date-picker--disabled`,this.isRange&&`${n}-date-picker--range`,this.triggerThemeClass],style:this.triggerCssVars,onKeydown:this.handleKeydown},E(ye,null,{default:()=>[E(me,null,{default:()=>this.isRange?E(Be,Object.assign({ref:"inputInstRef",status:this.mergedStatus,value:[this.displayStartTime,this.displayEndTime],placeholder:[this.localizedStartPlaceholder,this.localizedEndPlaceholder],textDecoration:[this.isStartValueInvalid?"line-through":"",this.isEndValueInvalid?"line-through":""],pair:!0,onUpdateValue:this.handleRangeUpdateValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,internalForceFocus:this.mergedShow,internalDeactivateOnEnter:!0},o),{separator:()=>void 0===this.separator?D(r.separator,()=>[E(x,{clsPrefix:n,class:`${n}-date-picker-icon`},{default:()=>E(Xe,null)})]):this.separator,[e?"clear-icon-placeholder":"suffix"]:()=>D(r["date-icon"],()=>[E(x,{clsPrefix:n,class:`${n}-date-picker-icon`},{default:()=>E(Ze,null)})])}):E(Be,Object.assign({ref:"inputInstRef",status:this.mergedStatus,value:this.displayTime,placeholder:this.localizedPlacehoder,textDecoration:this.isValueInvalid&&!this.isRange?"line-through":"",onUpdateValue:this.handleSingleUpdateValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,internalForceFocus:this.mergedShow,internalDeactivateOnEnter:!0},o),{[e?"clear-icon-placeholder":"suffix"]:()=>E(x,{clsPrefix:n,class:`${n}-date-picker-icon`},{default:()=>D(r["date-icon"],()=>[E(Ze,null)])})})}),E(we,{show:this.mergedShow,containerClass:this.namespace,to:this.adjustedTo,teleportDisabled:this.adjustedTo===xe.tdkey,placement:this.placement},{default:()=>E(ae,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>this.mergedShow?ce(a(),[[P,this.handleClickOutside,void 0,{capture:!0}]]):null})})]}))}}),Mi=function(e,t){return Mi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Mi(e,t)};function Ti(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Mi(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Di=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},Ii=new function(){this.browser=new Di,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(Ii.wxa=!0,Ii.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?Ii.worker=!0:!Ii.hasGlobalWindow||"Deno"in window||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Node.js")>-1?(Ii.node=!0,Ii.svgSupported=!0):function(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]);i&&(n.ie=!0,n.version=i[1]);a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(".")[0]>18);o&&(n.weChat=!0);if(t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}(navigator.userAgent,Ii);var Ai,Pi,Oi=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n<e.length;n++){t[String.fromCharCode(n+32)]=(e.charCodeAt(n)-20)/100}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),Ri={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(e,t){if(!Ai){var n=Ri.createCanvas();Ai=n&&n.getContext("2d")}if(Ai)return Pi!==t&&(Pi=Ai.font=t||"12px sans-serif"),Ai.measureText(e);e=e||"";var r=/((?:\d+)?\.?\d*)px/.exec(t=t||"12px sans-serif"),i=r&&+r[1]||12,a=0;if(t.indexOf("mono")>=0)a=i*e.length;else for(var o=0;o<e.length;o++){var s=Oi[e[o]];a+=null==s?i:s*i}return{width:a}},loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}},Li=ia(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),zi=ia(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),Ni=Object.prototype.toString,Bi=Array.prototype,Fi=Bi.forEach,Ei=Bi.filter,Vi=Bi.slice,Hi=Bi.map,Yi=function(){}.constructor,Wi=Yi?Yi.prototype:null,$i="__proto__",Gi=2311,Ui=Math.pow(2,53)-1;function ji(){return Gi>=Ui&&(Gi=0),Gi++}function Zi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}function qi(e){if(null==e||"object"!=typeof e)return e;var t=e,n=Ni.call(e);if("[object Array]"===n){if(!Ia(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=qi(e[r])}}else if(zi[n]){if(!Ia(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!Li[n]&&!Ia(e)&&!ma(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==$i&&(t[o]=qi(e[o]));return t}function Xi(e,t,n){if(!fa(t)||!fa(e))return n?qi(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==$i){var i=e[r],a=t[r];!fa(a)||!fa(i)||ua(a)||ua(i)||ma(a)||ma(i)||va(a)||va(i)||Ia(a)||Ia(i)?!n&&r in e||(e[r]=qi(t[r])):Xi(i,a,n)}return e}function Ki(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==$i&&(e[n]=t[n]);return e}function Qi(e,t,n){for(var r=oa(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}return e}Ri.createCanvas;function Ji(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function ea(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];"constructor"!==a&&(n?null!=t[a]:null==e[a])&&(e[a]=t[a])}else Qi(e,t,n)}function ta(e){return!!e&&("string"!=typeof e&&"number"==typeof e.length)}function na(e,t,n){if(e&&t)if(e.forEach&&e.forEach===Fi)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}function ra(e,t,n){if(!e)return[];if(!t)return Sa(e);if(e.map&&e.map===Hi)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function ia(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function aa(e,t,n){if(!e)return[];if(!t)return Sa(e);if(e.filter&&e.filter===Ei)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function oa(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}var sa=Wi&&ca(Wi.bind)?Wi.call.bind(Wi.bind):function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(Vi.call(arguments)))}};function la(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(Vi.call(arguments)))}}function ua(e){return Array.isArray?Array.isArray(e):"[object Array]"===Ni.call(e)}function ca(e){return"function"==typeof e}function da(e){return"string"==typeof e}function ha(e){return"[object String]"===Ni.call(e)}function pa(e){return"number"==typeof e}function fa(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function va(e){return!!Li[Ni.call(e)]}function ga(e){return!!zi[Ni.call(e)]}function ma(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function ya(e){return null!=e.colorStops}function _a(e){return e!=e}function xa(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(null!=e[n])return e[n]}function ba(e,t){return null!=e?e:t}function wa(e,t,n){return null!=e?e:null!=t?t:n}function Sa(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Vi.apply(e,t)}function Ca(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function ka(e,t){if(!e)throw new Error(t)}function Ma(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Ta="__ec_primitive__";function Da(e){e[Ta]=!0}function Ia(e){return e[Ta]}var Aa=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return oa(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Pa="function"==typeof Map;var Oa=function(){function e(t){var n=ua(t);this.data=Pa?new Map:new Aa;var r=this;function i(e,t){n?r.set(e,t):r.set(t,e)}t instanceof e?t.each(i):t&&na(t,i)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Pa?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function Ra(e){return new Oa(e)}function La(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&Ki(n,t),n}function za(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function Na(e,t){return e.hasOwnProperty(t)}function Ba(){}var Fa=180/Math.PI;Number.EPSILON||Math.pow(2,-52);function Ea(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function Va(e){return[e[0],e[1]]}function Ha(e,t,n){return e[0]=t,e[1]=n,e}function Ya(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Wa(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function $a(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Ga(e,t){var n=function(e){return Math.sqrt(function(e){return e[0]*e[0]+e[1]*e[1]}(e))}(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Ua(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var ja=Ua;var Za=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function qa(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function Xa(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Ka(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Qa=function(e,t){this.target=e,this.topTarget=t&&t.topTarget},Ja=function(){function e(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Qa(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new Qa(t,e),"drag",e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new Qa(s,e),"dragleave",e.event),o&&o!==s&&this.handler.dispatchToElement(new Qa(o,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Qa(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Qa(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),eo=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var i=this._$handlers;if("function"==typeof t&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;null!=t&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},l=i[e].length-1,u=i[e][l];return u&&u.callAtLast?i[e].splice(l,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=r.length,s=0;s<o;s++){var l=r[s];if(!i||!i.filter||null==l.query||i.filter(e,l.query))switch(a){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,t[0]);break;case 2:l.h.call(l.ctx,t[0],t[1]);break;default:l.h.apply(l.ctx,t)}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=t[a-1],s=r.length,l=0;l<s;l++){var u=r[l];if(!i||!i.filter||null==u.query||i.filter(e,u.query))switch(a){case 0:u.h.call(o);break;case 1:u.h.call(o,t[0]);break;case 2:u.h.call(o,t[0],t[1]);break;default:u.h.apply(o,t.slice(1,a-1))}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),to=Math.log(2);function no(e,t,n,r,i,a){var o=r+"-"+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(1===t){var l=Math.round(Math.log((1<<s)-1&~i)/to);return e[n][l]}for(var u=r|1<<n,c=n+1;r&1<<c;)c++;for(var d=0,h=0,p=0;h<s;h++){var f=1<<h;f&i||(d+=(p%2?-1:1)*e[n][h]*no(e,t-1,c,u,i|f,a),p++)}return a[o]=d,d}function ro(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=no(n,8,0,0,0,r);if(0!==i){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*no(n,7,0===o?1:0,1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var io="___zrEVENTSAVED",ao=[];function oo(e,t,n,r,i){if(t.getBoundingClientRect&&Ii.domSupported&&!so(t)){var a=t[io]||(t[io]={}),o=function(e,t,n){for(var r=n?"invTrans":"trans",i=t[r],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,h=c.left,p=c.top;o.push(h,p),l=l&&a&&h===a[d]&&p===a[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[r]=n?ro(s,o):ro(o,s))}(function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=a%2,l=(a>>1)%2;o.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",i[l]+":0",r[1-s]+":auto",i[1-l]+":auto",""].join("!important;"),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){na(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function so(e){return"CANVAS"===e.nodeName.toUpperCase()}var lo=/([&<>"'])/g,uo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function co(e){return null==e?"":(e+"").replace(lo,function(e,t){return uo[t]})}var ho=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,po=[],fo=Ii.browser.firefox&&+Ii.browser.version.split(".")[0]<39;function vo(e,t,n,r){return n=n||{},r?go(e,t,n):fo&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):go(e,t,n),n}function go(e,t,n){if(Ii.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(so(e)){var a=e.getBoundingClientRect();return n.zrX=r-a.left,void(n.zrY=i-a.top)}if(oo(po,e,r,i))return n.zrX=po[0],void(n.zrY=po[1])}n.zrX=n.zrY=0}function mo(e){return e||window.event}function yo(e,t,n){if(null!=(t=mo(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];i&&vo(e,i,t,n)}else{vo(e,t,t,n);var a=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;return null==n||null==r?t:3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return null==t.which&&void 0!==o&&ho.test(t.type)&&(t.which=1&o?1:2&o?3:4&o?2:0),t}function _o(e,t,n,r){e.removeEventListener(t,n,r)}var xo=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function bo(e){return 2===e.which||3===e.which}var wo=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],l=vo(n,s,{});i.points.push([l.zrX,l.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in Co)if(Co.hasOwnProperty(t)){var n=Co[t](this._track,e);if(n)return n}},e}();function So(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var Co={pinch:function(e,t){var n=e.length;if(n){var r,i=(e[n-1]||{}).points,a=(e[n-2]||{}).points||i;if(a&&a.length>1&&i&&i.length>1){var o=So(i)/So(a);!isFinite(o)&&(o=1),t.pinchScale=o;var s=[((r=i)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}};function ko(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Mo(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function To(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e}function Do(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Io(e,t,n,r){void 0===r&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*c,e[1]=-i*c+s*d,e[2]=a*d+l*c,e[3]=-a*c+d*l,e[4]=d*(o-r[0])+c*(u-r[1])+r[0],e[5]=d*(u-r[1])-c*(o-r[0])+r[1],e}function Ao(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=n*o-a*r;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-o*i)*l,e[5]=(a*i-n*s)*l,e):null}var Po=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Oo=Math.min,Ro=Math.max,Lo=Math.abs,zo=["x","y"],No=["width","height"],Bo=new Po,Fo=new Po,Eo=new Po,Vo=new Po,Ho=Jo(),Yo=Ho.minTv,Wo=Ho.maxTv,$o=[0,0],Go=function(){function e(e,t,n,r){Uo(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=Oo(e.x,this.x),n=Oo(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Ro(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Ro(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return Zo([1,0,0,1,0,0],this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&Po.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=Uo(qo,t.x,t.y,t.width,t.height)),n instanceof e||(n=Uo(Xo,n.x,n.y,n.width,n.height));var s=!!r;Ho.reset(i,s);var l=Ho.touchThreshold,u=t.x+l,c=t.x+t.width-l,d=t.y+l,h=t.y+t.height-l,p=n.x+l,f=n.x+n.width-l,v=n.y+l,g=n.y+n.height-l;if(u>c||d>h||p>f||v>g)return!1;var m=!(c<p||f<u||h<v||g<d);return(s||a)&&($o[0]=1/0,$o[1]=0,Qo(u,c,p,f,0,s,a,o),Qo(d,h,v,g,1,s,a,o),s&&Po.copy(r,m?Ho.useDir?Ho.dirMinTv:Yo:Wo)),m},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){jo(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(n){if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];return e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}Bo.x=Eo.x=t.x,Bo.y=Vo.y=t.y,Fo.x=Vo.x=t.x+t.width,Fo.y=Eo.y=t.y+t.height,Bo.transform(n),Vo.transform(n),Fo.transform(n),Eo.transform(n),e.x=Oo(Bo.x,Fo.x,Eo.x,Vo.x),e.y=Oo(Bo.y,Fo.y,Eo.y,Vo.y);var s=Ro(Bo.x,Fo.x,Eo.x,Vo.x),l=Ro(Bo.y,Fo.y,Eo.y,Vo.y);e.width=s-e.x,e.height=l-e.y}else e!==t&&jo(e,t)},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return Do(e=ko(e||[]),e,Ha(Ko,-t.x,-t.y)),function(e,t,n){var r=n[0],i=n[1];e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i}(e,e,Ha(Ko,r,i)),Do(e,e,Ha(Ko,n.x,n.y)),e},e}(),Uo=(Go.create,Go.set),jo=Go.copy,Zo=Go.calculateTransform,qo=(Go.applyTransform,Go.contain,new Go(0,0,0,0)),Xo=new Go(0,0,0,0),Ko=[];function Qo(e,t,n,r,i,a,o,s){var l=Lo(t-n),u=Lo(r-e),c=Oo(l,u),d=zo[i],h=zo[1-i],p=No[i];t<n||r<e?l<u?(a&&(Wo[d]=-l),s&&(o[d]=t,o[p]=0)):(a&&(Wo[d]=u),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=Ro(e,n),o[p]=Oo(t,r)-o[d]),a&&(c<$o[0]||Ho.useDir)&&($o[0]=Oo(c,$o[0]),(l<u||!Ho.bidirectional)&&(Yo[d]=l,Yo[h]=0,Ho.useDir&&Ho.calcDirMTV()),(l>=u||!Ho.bidirectional)&&(Yo[d]=-u,Yo[h]=0,Ho.useDir&&Ho.calcDirMTV())))}function Jo(){var e=0,t=new Po,n=new Po,r={minTv:new Po,maxTv:new Po,useDir:!1,dirMinTv:new Po,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&null!=i.touchThreshold&&(r.touchThreshold=Ro(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&null!=i.direction&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=null==i.bidirectional||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(e),u=Math.cos(e),c=l*a.y+u*a.x;i(c)?i(a.x)&&i(a.y)&&o.set(0,0):(n.x=s*u/c,n.y=s*l/c,i(n.x)&&i(n.y)?o.set(0,0):(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n))}};function i(e){return Lo(e)<1e-10}return r}var es="silent";function ts(){xo(this.event)}var ns=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return Ti(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(eo),rs=function(e,t){this.x=e,this.y=t},is=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],as=new Go(0,0,0,0),os=function(e){function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new rs(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r=r||new ns,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Ja(o),o}return Ti(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(na(is,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=us(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(a=(i=this.findHover(i.x,i.y)).target);var o=this._hovered=r?new rs(t,n):this.findHover(t,n),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(i,"mouseout",e),this.dispatchToElement(o,"mousemove",e),s&&s!==a&&this.dispatchToElement(o,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new rs(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var i="on"+t,a=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ts}}(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){"function"==typeof e[i]&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new rs(e,t);if(ls(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,l=new Go(e-s,t-s,o,o),u=r.length-1;u>=0;u--){var c=r[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(as.copy(c.getBoundingRect()),c.transform&&as.applyTransform(c.transform),as.intersect(l)&&a.push(c))}if(a.length)for(var d=Math.PI/12,h=2*Math.PI,p=0;p<s;p+=4)for(var f=0;f<h;f+=d)if(ls(a,i,e+p*Math.cos(f),t+p*Math.sin(f),n),i.target)return i}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new wo);var n=this._gestureMgr;"start"===t&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new rs;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(eo);function ss(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||es}return!1}function ls(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=ss(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==es)){t.target=o;break}}}function us(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}na(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){os.prototype[e]=function(t){var n,r,i=t.zrX,a=t.zrY,o=us(this,i,a);if("mouseup"===e&&o||(r=(n=this.findHover(i,a)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||ja(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}});function cs(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;!function(e,t,n){n--;for(;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function ds(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a,o=e[r],s=t,l=r;s<l;)i(o,e[a=s+l>>>1])<0?l=a:s=a+1;var u=r-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=o}}function hs(e,t,n,r,i,a){var o=0,s=0,l=1;if(a(e,t[n+i])>0){for(s=r-i;l<s&&a(e,t[n+i+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(e,t[n+i-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var c=o+(l-o>>>1);a(e,t[n+c])>0?o=c+1:l=c}return l}function ps(e,t,n,r,i,a){var o=0,s=0,l=1;if(a(e,t[n+i])<0){for(s=i+1;l<s&&a(e,t[n+i-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=r-i;l<s&&a(e,t[n+i+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var c=o+(l-o>>>1);a(e,t[n+c])<0?l=c:o=c+1}return l}function fs(e,t){var n,r,i=7,a=0,o=[];function s(s){var l=n[s],u=r[s],c=n[s+1],d=r[s+1];r[s]=u+d,s===a-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),a--;var h=ps(e[c],e,l,u,0,t);l+=h,0!==(u-=h)&&0!==(d=hs(e[l+u-1],e,c,d,d-1,t))&&(u<=d?function(n,r,a,s){var l=0;for(l=0;l<r;l++)o[l]=e[n+l];var u=0,c=a,d=n;if(e[d++]=e[c++],0===--s){for(l=0;l<r;l++)e[d+l]=o[u+l];return}if(1===r){for(l=0;l<s;l++)e[d+l]=e[c+l];return void(e[d+s]=o[u])}var h,p,f,v=i;for(;;){h=0,p=0,f=!1;do{if(t(e[c],o[u])<0){if(e[d++]=e[c++],p++,h=0,0===--s){f=!0;break}}else if(e[d++]=o[u++],h++,p=0,1===--r){f=!0;break}}while((h|p)<v);if(f)break;do{if(0!==(h=ps(e[c],o,u,r,0,t))){for(l=0;l<h;l++)e[d+l]=o[u+l];if(d+=h,u+=h,(r-=h)<=1){f=!0;break}}if(e[d++]=e[c++],0===--s){f=!0;break}if(0!==(p=hs(o[u],e,c,s,0,t))){for(l=0;l<p;l++)e[d+l]=e[c+l];if(d+=p,c+=p,0===(s-=p)){f=!0;break}}if(e[d++]=o[u++],1===--r){f=!0;break}v--}while(h>=7||p>=7);if(f)break;v<0&&(v=0),v+=2}if((i=v)<1&&(i=1),1===r){for(l=0;l<s;l++)e[d+l]=e[c+l];e[d+s]=o[u]}else{if(0===r)throw new Error;for(l=0;l<r;l++)e[d+l]=o[u+l]}}(l,u,c,d):function(n,r,a,s){var l=0;for(l=0;l<s;l++)o[l]=e[a+l];var u=n+r-1,c=s-1,d=a+s-1,h=0,p=0;if(e[d--]=e[u--],0===--r){for(h=d-(s-1),l=0;l<s;l++)e[h+l]=o[l];return}if(1===s){for(p=(d-=r)+1,h=(u-=r)+1,l=r-1;l>=0;l--)e[p+l]=e[h+l];return void(e[d]=o[c])}var f=i;for(;;){var v=0,g=0,m=!1;do{if(t(o[c],e[u])<0){if(e[d--]=e[u--],v++,g=0,0===--r){m=!0;break}}else if(e[d--]=o[c--],g++,v=0,1===--s){m=!0;break}}while((v|g)<f);if(m)break;do{if(0!==(v=r-ps(o[c],e,n,r,r-1,t))){for(r-=v,p=(d-=v)+1,h=(u-=v)+1,l=v-1;l>=0;l--)e[p+l]=e[h+l];if(0===r){m=!0;break}}if(e[d--]=o[c--],1===--s){m=!0;break}if(0!==(g=s-hs(e[u],o,0,s,s-1,t))){for(s-=g,p=(d-=g)+1,h=(c-=g)+1,l=0;l<g;l++)e[p+l]=o[h+l];if(s<=1){m=!0;break}}if(e[d--]=e[u--],0===--r){m=!0;break}f--}while(v>=7||g>=7);if(m)break;f<0&&(f=0),f+=2}(i=f)<1&&(i=1);if(1===s){for(p=(d-=r)+1,h=(u-=r)+1,l=r-1;l>=0;l--)e[p+l]=e[h+l];e[d]=o[c]}else{if(0===s)throw new Error;for(h=d-(s-1),l=0;l<s;l++)e[h+l]=o[l]}}(l,u,c,d))}return n=[],r=[],{mergeRuns:function(){for(;a>1;){var e=a-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]<r[e+1]&&e--;else if(r[e]>r[e+1])break;s(e)}},forceMergeRuns:function(){for(;a>1;){var e=a-2;e>0&&r[e-1]<r[e+1]&&e--,s(e)}},pushRun:function(e,t){n[a]=e,r[a]=t,a+=1}}}function vs(e,t,n,r){n||(n=0),r||(r=e.length);var i=r-n;if(!(i<2)){var a=0;if(i<32)ds(e,n,r,n+(a=cs(e,n,r,t)),t);else{var o=fs(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(i);do{if((a=cs(e,n,r,t))<s){var l=i;l>s&&(l=s),ds(e,n,n+l,n+a,t),a=l}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(0!==i);o.forceMergeRuns()}}}var gs=!1;function ms(){gs||(gs=!0)}function ys(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var _s=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=ys}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return!e&&n.length||this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,vs(n,ys)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||(o=e.__clipPaths=[]),i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var l=r,u=e;l;)l.parent=u,l.updateTransform(),o[a++]=l,u=l,l=l.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var c=e.childrenRef(),d=0;d<c.length;d++){var h=c[d];e.__dirty&&(h.__dirty|=1),this._updateAndAddDisplayable(h,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(ms(),p.z=0),isNaN(p.z2)&&(ms(),p.z2=0),isNaN(p.zlevel)&&(ms(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var f=e.getDecalElement&&e.getDecalElement();f&&this._updateAndAddDisplayable(f,o,n);var v=e.getTextGuideLine();v&&this._updateAndAddDisplayable(v,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var r=Ji(this._roots,e);r>=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),xs=Ii.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},bs={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-bs.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*bs.bounceIn(2*e):.5*bs.bounceOut(2*e-1)+.5}},ws=Math.pow,Ss=Math.sqrt,Cs=1e-8,ks=1e-4,Ms=Ss(3),Ts=1/3,Ds=Ea(),Is=Ea(),As=Ea();function Ps(e){return e>-1e-8&&e<Cs}function Os(e){return e>Cs||e<-1e-8}function Rs(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function Ls(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function zs(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-i,c=s*s-3*o*l,d=s*l-9*o*u,h=l*l-3*s*u,p=0;if(Ps(c)&&Ps(d)){if(Ps(s))a[0]=0;else(C=-l/s)>=0&&C<=1&&(a[p++]=C)}else{var f=d*d-4*c*h;if(Ps(f)){var v=d/c,g=-v/2;(C=-s/o+v)>=0&&C<=1&&(a[p++]=C),g>=0&&g<=1&&(a[p++]=g)}else if(f>0){var m=Ss(f),y=c*s+1.5*o*(-d+m),_=c*s+1.5*o*(-d-m);(C=(-s-((y=y<0?-ws(-y,Ts):ws(y,Ts))+(_=_<0?-ws(-_,Ts):ws(_,Ts))))/(3*o))>=0&&C<=1&&(a[p++]=C)}else{var x=(2*c*s-3*o*d)/(2*Ss(c*c*c)),b=Math.acos(x)/3,w=Ss(c),S=Math.cos(b),C=(-s-2*w*S)/(3*o),k=(g=(-s+w*(S+Ms*Math.sin(b)))/(3*o),(-s+w*(S-Ms*Math.sin(b)))/(3*o));C>=0&&C<=1&&(a[p++]=C),g>=0&&g<=1&&(a[p++]=g),k>=0&&k<=1&&(a[p++]=k)}}return p}function Ns(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(Ps(o)){if(Os(a))(c=-s/a)>=0&&c<=1&&(i[l++]=c)}else{var u=a*a-4*o*s;if(Ps(u))i[0]=-a/(2*o);else if(u>0){var c,d=Ss(u),h=(-a-d)/(2*o);(c=(-a+d)/(2*o))>=0&&c<=1&&(i[l++]=c),h>=0&&h<=1&&(i[l++]=h)}}return l}function Bs(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,l=(r-n)*i+n,u=(s-o)*i+o,c=(l-s)*i+s,d=(c-u)*i+u;a[0]=e,a[1]=o,a[2]=u,a[3]=d,a[4]=d,a[5]=c,a[6]=l,a[7]=r}function Fs(e,t,n,r,i,a,o,s,l){for(var u=e,c=t,d=0,h=1/l,p=1;p<=l;p++){var f=p*h,v=Rs(e,n,i,o,f),g=Rs(t,r,a,s,f),m=v-u,y=g-c;d+=Math.sqrt(m*m+y*y),u=v,c=g}return d}function Es(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function Vs(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function Hs(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function Ys(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function Ws(e,t,n,r,i,a,o){for(var s=e,l=t,u=0,c=1/o,d=1;d<=o;d++){var h=d*c,p=Es(e,n,i,h),f=Es(t,r,a,h),v=p-s,g=f-l;u+=Math.sqrt(v*v+g*g),s=p,l=f}return u}var $s=/cubic-bezier\(([0-9,\.e ]+)\)/;function Gs(e){var t=e&&$s.exec(e);if(t){var n=t[1].split(","),r=+Ma(n[0]),i=+Ma(n[1]),a=+Ma(n[2]),o=+Ma(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:zs(0,r,a,1,e,s)&&Rs(0,i,o,1,s[0])}}}var Us=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ba,this.ondestroy=e.ondestroy||Ba,this.onrestart=e.onrestart||Ba,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),1===i){if(!this.loop)return!0;var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=ca(e)?e:bs[e]||Gs(e)},e}(),js=function(e){this.value=e},Zs=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new js(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),qs=function(){function e(e){this._list=new Zs,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(null==r[e]){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new js(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Xs={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ks(e){return(e=Math.round(e))<0?0:e>255?255:e}function Qs(e){return e<0?0:e>1?1:e}function Js(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?Ks(parseFloat(t)/100*255):Ks(parseInt(t,10))}function el(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?Qs(parseFloat(t)/100):Qs(parseFloat(t))}function tl(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function nl(e,t,n){return e+(t-e)*n}function rl(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function il(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var al=new qs(20),ol=null;function sl(e,t){ol&&il(ol,t),ol=al.put(e,ol||t.slice())}function ll(e,t){if(e){t=t||[];var n=al.get(e);if(n)return il(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in Xs)return il(t,Xs[r]),sl(e,t),t;var i,a=r.length;if("#"===r.charAt(0))return 4===a||5===a?(i=parseInt(r.slice(1,4),16))>=0&&i<=4095?(rl(t,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,5===a?parseInt(r.slice(4),16)/15:1),sl(e,t),t):void rl(t,0,0,0,1):7===a||9===a?(i=parseInt(r.slice(1,7),16))>=0&&i<=16777215?(rl(t,(16711680&i)>>16,(65280&i)>>8,255&i,9===a?parseInt(r.slice(7),16)/255:1),sl(e,t),t):void rl(t,0,0,0,1):void 0;var o=r.indexOf("("),s=r.indexOf(")");if(-1!==o&&s+1===a){var l=r.substr(0,o),u=r.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?rl(t,+u[0],+u[1],+u[2],1):rl(t,0,0,0,1);c=el(u.pop());case"rgb":return u.length>=3?(rl(t,Js(u[0]),Js(u[1]),Js(u[2]),3===u.length?c:el(u[3])),sl(e,t),t):void rl(t,0,0,0,1);case"hsla":return 4!==u.length?void rl(t,0,0,0,1):(u[3]=el(u[3]),ul(u,t),sl(e,t),t);case"hsl":return 3!==u.length?void rl(t,0,0,0,1):(ul(u,t),sl(e,t),t);default:return}}rl(t,0,0,0,1)}}function ul(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=el(e[1]),i=el(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=2*i-a;return rl(t=t||[],Ks(255*tl(o,a,n+1/3)),Ks(255*tl(o,a,n)),Ks(255*tl(o,a,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function cl(e,t){var n=ll(e);if(n){for(var r=0;r<3;r++)n[r]=t<0?n[r]*(1-t)|0:(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return pl(n,4===n.length?"rgba":"rgb")}}function dl(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=ll(t[i]),s=ll(t[a]),l=r-i,u=pl([Ks(nl(o[0],s[0],l)),Ks(nl(o[1],s[1],l)),Ks(nl(o[2],s[2],l)),Qs(nl(o[3],s[3],l))],"rgba");return n?{color:u,leftIndex:i,rightIndex:a,value:r}:u}}function hl(e,t,n,r){var i,a=ll(e);if(e)return a=function(e){if(e){var t,n,r=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(r,i,a),s=Math.max(r,i,a),l=s-o,u=(s+o)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+o):l/(2-s-o);var c=((s-r)/6+l/2)/l,d=((s-i)/6+l/2)/l,h=((s-a)/6+l/2)/l;r===s?t=h-d:i===s?t=1/3+c-h:a===s&&(t=2/3+d-c),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,n,u];return null!=e[3]&&p.push(e[3]),p}}(a),null!=t&&(a[0]=(i=ca(t)?t(a[0]):t,(i=Math.round(i))<0?0:i>360?360:i)),null!=n&&(a[1]=el(ca(n)?n(a[1]):n)),null!=r&&(a[2]=el(ca(r)?r(a[2]):r)),pl(ul(a),"rgba")}function pl(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}function fl(e,t){var n=ll(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var vl=new qs(100);function gl(e){if(da(e)){var t=vl.get(e);return t||(t=cl(e,-.1),vl.put(e,t)),t}if(ya(e)){var n=Ki({},e);return n.colorStops=ra(e.colorStops,function(e){return{offset:e.offset,color:cl(e.color,-.1)}}),n}return e}"undefined"!=typeof Buffer&&Buffer.from;var ml=Array.prototype.slice;function yl(e,t,n){return(t-e)*n+e}function _l(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=yl(t[a],n[a],r);return e}function xl(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function bl(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function wl(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function Sl(e,t,n){var r=e,i=t;if(r.push&&i.push){var a=r.length,o=i.length;if(a!==o)if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(1===n?i[s]:ml.call(i[s]));var l=r[0]&&r[0].length;for(s=0;s<r.length;s++)if(1===n)isNaN(r[s])&&(r[s]=i[s]);else for(var u=0;u<l;u++)isNaN(r[s][u])&&(r[s][u]=i[s][u])}}function Cl(e){if(ta(e)){var t=e.length;if(ta(e[0])){for(var n=[],r=0;r<t;r++)n.push(ml.call(e[r]));return n}return ml.call(e)}return e}function kl(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function Ml(e){return 4===e||5===e}function Tl(e){return 1===e||2===e}var Dl=[0,0,0,0],Il=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=6,s=t;if(ta(t)){var l=function(e){return ta(e&&e[0])?2:1}(t);o=l,(1===l&&!pa(t[0])||2===l&&!pa(t[0][0]))&&(a=!0)}else if(pa(t)&&!_a(t))o=0;else if(da(t))if(isNaN(+t)){var u=ll(t);u&&(s=u,o=3)}else o=0;else if(ya(t)){var c=Ki({},s);c.colorStops=ra(t.colorStops,function(e){return{offset:e.offset,color:ll(e.color)}}),"linear"===t.type?o=4:function(e){return"radial"===e.type}(t)&&(o=5),s=c}0===i?this.valType=o:o===this.valType&&6!==o||(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=ca(n)?n:bs[n]||Gs(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Tl(r),l=Ml(r),u=0;u<i;u++){var c=n[u],d=c.value,h=a.value;c.percent=c.time/e,o||(s&&u!==i-1?Sl(d,h,r):l&&wl(d.colorStops,h.colorStops))}if(!o&&5!==r&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;var p=n[0].value;for(u=0;u<i;u++)0===r?n[u].additiveValue=n[u].value-p:3===r?n[u].additiveValue=xl([],n[u].value,p,-1):Tl(r)&&(n[u].additiveValue=1===r?xl([],n[u].value,p,-1):bl([],n[u].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,r,i,a=null!=this._additiveTrack,o=a?"additiveValue":"value",s=this.valType,l=this.keyframes,u=l.length,c=this.propName,d=3===s,h=this._lastFr,p=Math.min;if(1===u)r=i=l[0];else{if(t<0)n=0;else if(t<this._lastFrP){for(n=p(h+1,u-1);n>=0&&!(l[n].percent<=t);n--);n=p(n,u-2)}else{for(n=h;n<u&&!(l[n].percent>t);n++);n=p(n-1,u-2)}i=l[n+1],r=l[n]}if(r&&i){this._lastFr=n,this._lastFrP=t;var f=i.percent-r.percent,v=0===f?1:p((t-r.percent)/f,1);i.easingFunc&&(v=i.easingFunc(v));var g=a?this._additiveValue:d?Dl:e[c];if(!Tl(s)&&!d||g||(g=this._additiveValue=[]),this.discrete)e[c]=v<1?r.rawValue:i.rawValue;else if(Tl(s))1===s?_l(g,r[o],i[o],v):function(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=yl(t[o][s],n[o][s],r)}}(g,r[o],i[o],v);else if(Ml(s)){var m=r[o],y=i[o],_=4===s;e[c]={type:_?"linear":"radial",x:yl(m.x,y.x,v),y:yl(m.y,y.y,v),colorStops:ra(m.colorStops,function(e,t){var n=y.colorStops[t];return{offset:yl(e.offset,n.offset,v),color:kl(_l([],e.color,n.color,v))}}),global:y.global},_?(e[c].x2=yl(m.x2,y.x2,v),e[c].y2=yl(m.y2,y.y2,v)):e[c].r=yl(m.r,y.r,v)}else if(d)_l(g,r[o],i[o],v),a||(e[c]=kl(g));else{var x=yl(r[o],i[o],v);a?this._additiveValue=x:e[c]=x}a&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;0===t?e[n]=e[n]+r:3===t?(ll(e[n],Dl),xl(Dl,Dl,r,1),e[n]=kl(Dl)):1===t?xl(e[n],e[n],r,1):2===t&&bl(e[n],e[n],r,1)},e}(),Al=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?Zi("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,oa(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new Il(o);var l=void 0,u=this._getAdditiveTrack(o);if(u){var c=u.keyframes,d=c[c.length-1];l=d&&d.value,3===u.valType&&l&&(l=kl(l))}else l=this._target[o];if(null==l)continue;e>0&&s.addKeyframe(0,Cl(l),r),this._trackKeys.push(o)}s.addKeyframe(e,Cl(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),l=o.keyframes,u=l.length;if(o.prepare(r,s),o.needsAnimate())if(!this._allowDiscrete&&o.discrete){var c=l[u-1];c&&(t._target[o.propName]=c.rawValue),o.setFinished()}else n.push(o)}if(n.length||this._force){var d=new Us({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return ra(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):1===this._started&&a.step(this._target,0),a.setFinished())}var o=!0;for(i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(a&&!a.isFinished()){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=Cl(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||oa(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function Pl(){return(new Date).getTime()}var Ol,Rl,Ll=function(e){function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return Ti(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=Pl()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,xs(function t(){e._running&&(xs(t),!e._paused&&e.update())})},t.prototype.start=function(){this._running||(this._time=Pl(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Pl(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Pl()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return null==this._head},t.prototype.animate=function(e,t){t=t||{},this.start();var n=new Al(e,t.loop);return this.addAnimator(n),n},t}(eo),zl=Ii.domSupported,Nl=(Rl={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Ol=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:ra(Ol,function(e){var t=e.replace("mouse","pointer");return Rl.hasOwnProperty(t)?t:e})}),Bl=["mousemove","mouseup"],Fl=["pointermove","pointerup"],El=!1;function Vl(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Hl(e){e&&(e.zrByTouch=!0)}function Yl(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Wl=function(e,t){this.stopPropagation=Ba,this.stopImmediatePropagation=Ba,this.preventDefault=Ba,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},$l={mousedown:function(e){e=yo(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=yo(this.dom,e);var t=this.__mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=yo(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){Yl(this,(e=yo(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){El=!0,e=yo(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){El||(e=yo(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){Hl(e=yo(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),$l.mousemove.call(this,e),$l.mousedown.call(this,e)},touchmove:function(e){Hl(e=yo(this.dom,e)),this.handler.processGesture(e,"change"),$l.mousemove.call(this,e)},touchend:function(e){Hl(e=yo(this.dom,e)),this.handler.processGesture(e,"end"),$l.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&$l.click.call(this,e)},pointerdown:function(e){$l.mousedown.call(this,e)},pointermove:function(e){Vl(e)||$l.mousemove.call(this,e)},pointerup:function(e){$l.mouseup.call(this,e)},pointerout:function(e){Vl(e)||$l.mouseout.call(this,e)}};na(["click","dblclick","contextmenu"],function(e){$l[e]=function(t){t=yo(this.dom,t),this.trigger(e,t)}});var Gl={pointermove:function(e){Vl(e)||Gl.mousemove.call(this,e)},pointerup:function(e){Gl.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function Ul(e,t){var n=t.domHandlers;Ii.pointerEventsSupported?na(Nl.pointer,function(r){Zl(t,r,function(t){n[r].call(e,t)})}):(Ii.touchEventsSupported&&na(Nl.touch,function(r){Zl(t,r,function(i){n[r].call(e,i),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}(t)})}),na(Nl.mouse,function(r){Zl(t,r,function(i){i=mo(i),t.touching||n[r].call(e,i)})}))}function jl(e,t){function n(n){Zl(t,n,function(r){r=mo(r),Yl(e,r.target)||(r=function(e,t){return yo(e.dom,new Wl(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))},{capture:!0})}Ii.pointerEventsSupported?na(Fl,n):Ii.touchEventsSupported||na(Bl,n)}function Zl(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,function(e,t,n,r){e.addEventListener(t,n,r)}(e.domTarget,t,n,r)}function ql(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&_o(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var Xl=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t},Kl=function(e){function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new Xl(t,$l),zl&&(r._globalHandlerScope=new Xl(document,Gl)),Ul(r,r._localHandlerScope),r}return Ti(t,e),t.prototype.dispose=function(){ql(this._localHandlerScope),zl&&ql(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,zl&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?jl(this,t):ql(t)}},t}(eo),Ql=1;Ii.hasGlobalWindow&&(Ql=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Jl=Ql,eu="#333",tu="#ccc",nu=ko,ru=5e-5;function iu(e){return e>ru||e<-5e-5}var au,ou=[],su=[],lu=[1,0,0,1,0,0],uu=Math.abs,cu=function(){function e(){}var t;return e.prototype.getLocalTransform=function(e){return du(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return iu(this.rotation)||iu(this.x)||iu(this.y)||iu(this.scaleX-1)||iu(this.scaleY-1)||iu(this.skewX)||iu(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n=n||[1,0,0,1,0,0],t?this.getLocalTransform(n):nu(n),e&&(t?To(n,e,n):Mo(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||[1,0,0,1,0,0],Ao(this.invTransform,n)):n&&(nu(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(ou);var n=ou[0]<0?-1:1,r=ou[1]<0?-1:1,i=((ou[0]-n)*t+n)/ou[0]||0,a=((ou[1]-r)*t+r)/ou[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||[1,0,0,1,0,0],To(su,e.invTransform,t),t=su);var n=this.originX,r=this.originY;(n||r)&&(lu[4]=n,lu[5]=r,To(su,t,lu),su[4]-=n,su[5]-=r,t=su),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&qa(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&qa(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&uu(e[0]-1)>1e-10&&uu(e[3]-1)>1e-10?Math.sqrt(uu(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){pu(this,e)},e.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,l=e.rotation||0,u=e.x,c=e.y,d=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,f=r+s;t[4]=-p*i-d*f*a,t[5]=-f*a-h*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=h*i,t[2]=d*a,l&&Io(t,t,l),t[4]+=n+u,t[5]+=r+c,t},e.initDefaultProps=((t=e.prototype).scaleX=t.scaleY=t.globalScaleRatio=1,void(t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0)),e}(),du=cu.getLocalTransform,hu=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function pu(e,t){return function(e,t,n){e=e||{};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}(e,t,hu)}function fu(e){au||(au=new qs(100)),e=e||"12px sans-serif";var t=au.get(e);return t||(t={font:e,strWidthCache:new qs(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Ri.measureText("国",e).width,asciiCharWidth:Ri.measureText("a",e).width},au.put(e,t)),t}var vu=0,gu=5;function mu(e,t){return e.asciiWidthMapTried||(e.asciiWidthMap=function(e){if(!(vu>=gu)){e=e||"12px sans-serif";for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Ri.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?vu=gu:i>2&&vu++,t}}(e.font),e.asciiWidthMapTried=!0),0<=t&&t<=127?null!=e.asciiWidthMap?e.asciiWidthMap[t]:e.asciiCharWidth:e.stWideCharWidth}function yu(e,t){var n=e.strWidthCache,r=n.get(t);return null==r&&(r=Ri.measureText(t,e.font).width,n.put(t,r)),r}function _u(e,t,n,r){var i=yu(fu(t),e),a=Su(t),o=bu(0,i,n),s=wu(0,a,r);return new Go(o,s,i,a)}function xu(e,t,n,r){var i=((e||"")+"").split("\n");if(1===i.length)return _u(i[0],t,n,r);for(var a=new Go(0,0,0,0),o=0;o<i.length;o++){var s=_u(i[o],t,n,r);0===o?a.copy(s):a.union(s)}return a}function bu(e,t,n,r){return"right"===n?r?e+=t:e-=t:"center"===n&&(r?e+=t/2:e-=t/2),e}function wu(e,t,n,r){return"middle"===n?r?e+=t/2:e-=t/2:"bottom"===n&&(r?e+=t:e-=t),e}function Su(e){return fu(e).stWideCharWidth}function Cu(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function ku(e,t,n){var r=t.position||"inside",i=null!=t.distance?t.distance:5,a=n.height,o=n.width,s=a/2,l=n.x,u=n.y,c="left",d="top";if(r instanceof Array)l+=Cu(r[0],n.width),u+=Cu(r[1],n.height),c=null,d=null;else switch(r){case"left":l-=i,u+=s,c="right",d="middle";break;case"right":l+=i+o,u+=s,d="middle";break;case"top":l+=o/2,u-=i,c="center",d="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=i,u+=s,d="middle";break;case"insideRight":l+=o-i,u+=s,c="right",d="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",d="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,d="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",d="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=d,e}var Mu="__zr_normal__",Tu=hu.concat(["ignore"]),Du=ia(hu,function(e,t){return e[t]=!0,e},{ignore:!1}),Iu={},Au=new Go(0,0,0,0),Pu=[],Ou=function(){function e(e){this.id=ji(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var l=!1;i.copyTransform(t);var u=null!=n.position,c=n.autoOverflowArea,d=void 0;if((c||u)&&(d=Au,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),u){this.calculateTextPosition?this.calculateTextPosition(Iu,n,d):ku(Iu,n,d),i.x=Iu.x,i.y=Iu.y,a=Iu.align,o=Iu.verticalAlign;var h=n.origin;if(h&&null!=n.rotation){var p=void 0,f=void 0;"center"===h?(p=.5*d.width,f=.5*d.height):(p=Cu(h[0],d.width),f=Cu(h[1],d.height)),l=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+f+(r?0:d.y)}}null!=n.rotation&&(i.rotation=n.rotation);var v=n.offset;v&&(i.x+=v[0],i.y+=v[1],l||(i.originX=-v[0],i.originY=-v[1]));var g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(c){var m=g.overflowRect=g.overflowRect||new Go(0,0,0,0);i.getLocalTransform(Pu),Ao(Pu,Pu),Go.copy(m,d),m.applyTransform(Pu)}else g.overflowRect=null;var y=void 0,_=void 0,x=void 0;(null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside)&&this.canBeInsideText()?(y=n.insideFill,_=n.insideStroke,null!=y&&"auto"!==y||(y=this.getInsideTextFill()),null!=_&&"auto"!==_||(_=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,_=n.outsideStroke,null!=y&&"auto"!==y||(y=this.getOutsideFill()),null!=_&&"auto"!==_||(_=this.getOutsideStroke(y),x=!0)),(y=y||"#000")===g.fill&&_===g.stroke&&x===g.autoStroke&&a===g.align&&o===g.verticalAlign||(s=!0,g.fill=y,g.stroke=_,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?tu:eu},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&ll(t);n||(n=[255,255,255,1]);for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,pl(n,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},Ki(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(fa(e))for(var n=oa(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&"__zr_normal__"!==i)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Tu)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];null==e[i]||i in t||(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Mu,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Mu;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(Ji(a,e)>=0)||!t&&1!==a.length){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||i){i||this.saveCurrentToNormalState(s);var l=this._textContent,u=Bu(this,l,s,r);u&&!this.__inHover&&(this.__inHover=u),this._applyStateObj(e,s,this._normalState,t,Eu(this,n,o),o);var c=this._textGuide;return l&&l.useState(e,t,n,!!u),c&&c.useState(e,t,n,!!u),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}Zi("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o)for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}if(o)return;for(s=0;s<a;s++){var l=e[s],u=void 0;this.stateProxy&&(u=this.stateProxy(l,e)),u||(u=this.states[l]),u&&r.push(u)}var c=r[a-1],d=this._textContent,h=Bu(this,d,c,n);h&&!this.__inHover&&(this.__inHover=h);var p=this._mergeStates(r),f=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(","),p,this._normalState,!1,Eu(this,t,f),f);var v=this._textGuide;d&&d.useStates(e,t,!!h),v&&v.useStates(e,t,!!h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}else this.clearStates()},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=Ji(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=Ji(r,e),a=Ji(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r<e.length;r++){var i=e[r];Ki(n,i),i.textConfig&&Ki(t=t||{},i.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,r,i,a){if(1!==this.__inHover){var o=!(t&&r);t&&t.textConfig?(this.textConfig=Ki({},r?this.textConfig:n.textConfig),Ki(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<Tu.length;u++){var c=Tu[u],d=i&&Du[c];t&&null!=t[c]?d?(l=!0,s[c]=t[c]):this[c]=t[c]:o&&null!=n[c]&&(d?(l=!0,s[c]=n[c]):this[c]=n[c])}if(!i)for(u=0;u<this.animators.length;u++){var h=this.animators[u],p=h.targetName;h.getLoop()||h.__changeFinalValue(p?(t||n)[p]:t||n)}l&&this._transitionState(e,s,a)}},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new cu,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),Ki(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=e?this[e]:this,i=new Al(r,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=Ji(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];e&&e!==o.scope?i.push(o):o.stop(t)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){Ru(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){Ru(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=Ru(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;function n(e,n,r,i){function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}Object.defineProperty(t,e,{get:function(){this[n]||a(this,this[n]=[]);return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}})}t.type="element",t.name="",t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=0,t.__dirty=1,Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),e}();function Ru(e,t,n,r,i){var a=[];Nu(e,"",e,t,n=n||{},r,a,i);var o=a.length,s=!1,l=n.done,u=n.aborted,c=function(){s=!0,--o<=0&&(s?l&&l():u&&u())},d=function(){--o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var h=0;h<a.length;h++){var p=a[h];c&&p.done(c),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function Lu(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function zu(e,t,n){if(ta(t[n]))if(ta(e[n])||(e[n]=[]),ga(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),Lu(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(ta(i[0]))for(var s=i[0].length,l=0;l<o;l++)a[l]?Lu(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else Lu(a,i,o);a.length=i.length}else e[n]=t[n]}function Nu(e,t,n,r,i,a,o,s){for(var l=oa(r),u=i.duration,c=i.delay,d=i.additive,h=i.setToFinal,p=!fa(a),f=e.animators,v=[],g=0;g<l.length;g++){var m=l[g],y=r[m];if(null!=y&&null!=n[m]&&(p||a[m]))if(!fa(y)||ta(y)||ya(y))v.push(m);else{if(t){s||(n[m]=y,e.updateDuringAnimation(t));continue}Nu(e,m,n[m],y,i,a&&a[m],o,s)}else s||(n[m]=y,e.updateDuringAnimation(t),v.push(m))}var _=v.length;if(!d&&_)for(var x=0;x<f.length;x++){if((w=f[x]).targetName===t&&w.stopTracks(v)){var b=Ji(f,w);f.splice(b,1)}}if(i.force||(v=aa(v,function(e){return t=r[e],i=n[e],!(t===i||ta(t)&&ta(i)&&function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}(t,i));var t,i}),_=v.length),_>0||i.force&&!o.length){var w,S=void 0,C=void 0,k=void 0;if(s){C={},h&&(S={});for(x=0;x<_;x++){C[m=v[x]]=n[m],h?S[m]=r[m]:n[m]=r[m]}}else if(h){k={};for(x=0;x<_;x++){k[m=v[x]]=Cl(n[m]),zu(n,r,m)}}(w=new Al(n,!1,!1,d?aa(f,function(e){return e.targetName===t}):null)).targetName=t,i.scope&&(w.scope=i.scope),h&&S&&w.whenWithKeys(0,S,v),k&&w.whenWithKeys(0,k,v),w.whenWithKeys(null==u?500:u,s?C:r,v).delay(c||0),e.addAnimator(w,t),o.push(w)}}function Bu(e,t,n,r){return!(n&&n.hoverLayer||r)||Fu(e)||t&&Fu(t)?0:1}function Fu(e){return"text"===e.type||"tspan"===e.type}function Eu(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}ea(Ou,eo),ea(Ou,cu);var Vu=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return Ti(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=Ji(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=Ji(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new Go(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(r);l?(Go.applyTransform(t,s,l),(i=i||t.clone()).union(t)):(i=i||s.clone()).union(s)}}return i||t},t}(Ou);Vu.prototype.type="group";var Hu={},Yu={};var Wu=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new _s,a=n.renderer||"canvas";Hu[a]||(a=oa(Hu)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var o=new Hu[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var l,u=Ii.node||Ii.worker||s?null:new Kl(o.getViewportRoot(),o.root),c=n.useCoarsePointer;(null==c||"auto"===c?Ii.touchEventsSupported:!!c)&&(l=ba(n.pointerSize,44)),this.handler=new os(i,o,u,o.root,l),this.animation=new Ll({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(!e)return!1;if("string"==typeof e)return fl(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=fl(t[i].color,1);return(n/=r)<.4}return!1}(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(e){var t,n=Pl(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=Pl();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Vu&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){var e;this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,e=this.id,delete Yu[e])},e}();function $u(e,t){var n=new Wu(ji(),e,t);return Yu[n.id]=n,n}var Gu=1e-4;var Uu=Math.min,ju=Math.max,Zu=Math.abs,qu=Math.round,Xu=Math.floor,Ku=Math.ceil,Qu=Math.pow,Ju=Math.log,ec=Math.LN10,tc=Math.PI,nc=Math.random;function rc(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],l=a-i,u=s-o;if(0===l)return 0===u?o:(o+s)/2;if(r)if(l>0){if(e<=i)return o;if(e>=a)return s}else{if(e>=i)return o;if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/l*u+o}var ic=function(e,t,n){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return ac(e,t,n)};function ac(e,t,n){return da(e)?function(e){return!!(t=e,t.replace(/^\s+|\s+$/g,"")).match(/%$/);var t}(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):null==e?NaN:+e}function oc(e,t,n){return isNaN(t)?n?""+e:+e:(t=Uu(ju(0,t),20),e=(+e).toFixed(t),n?e:+e)}function sc(e){return e.sort(function(e,t){return e-t}),e}function lc(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(qu(e*t)/t===e)return n;return function(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(".");return ju(0,(a<0?0:i-1-a)-r)}(e)}function uc(e,t,n){var r=Zu(e[1]-e[0]);if(!isFinite(r)||0===r)return NaN;var i=Ju(2*Zu(n||1)*Zu(r))/ec,a=Ju(Zu(t))/ec,o=ju(0,Ku(-i+a));return isFinite(o)||(o=NaN),o}function cc(e,t){var n=ju(lc(e),lc(t)),r=e+t;return n>20?r:oc(r,n)}var dc=Qu(2,53)-1;function hc(e){var t=2*tc;return(e%t+t)%t}function pc(e){return e>-1e-4&&e<Gu}var fc=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function vc(e){if(e instanceof Date)return e;if(da(e)){var t=fc.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(qu(e))}function gc(e){return Qu(10,mc(e))}function mc(e){if(0===e)return 0;var t=Xu(Ju(e)/ec);return e/Qu(10,t)>=10&&t++,t}function yc(e,t){var n=mc(e),r=Qu(10,n),i=e/r;return oc(e=(2===t?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,-n)}function _c(e){var t=parseFloat(e);return t==e&&(0!==t||!da(e)||e.indexOf("x")<=0)?t:NaN}function xc(){return qu(9*nc())}function bc(e,t){return 0===t?e:bc(t,e%t)}function wc(e,t){return null==e?t:null==t?e:e*t/bc(e,t)}function Sc(e){return null!=e&&isFinite(e)}var Cc={},kc="undefined"!=typeof console&&console.warn&&console.log;function Mc(e,t){!function(e,t,n){if(kc&&n){if(Cc[t])return;Cc[t]=!0}}(0,e,t)}function Tc(e){throw new Error(e)}function Dc(e,t,n){return(t-e)*n+e}var Ic="series\0";function Ac(e){return e instanceof Array?e:null==e?[]:[e]}function Pc(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var Oc=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Rc(e){return!fa(e)||ua(e)||e instanceof Date?e:e.value}function Lc(e){return fa(e)&&!(e instanceof Array)}function zc(e,t,n){var r="normalMerge"===n,i="replaceMerge"===n,a="replaceAll"===n;e=e||[],t=(t||[]).slice();var o=Ra();na(t,function(e,n){fa(e)||(t[n]=null)});var s,l,u=function(e,t,n){var r=[];if("replaceAll"===n)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&null!=a.id&&t.set(a.id,i),r.push({existing:"replaceMerge"===n||Vc(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}(e,o,n);return(r||i)&&function(e,t,n,r){na(r,function(i,a){if(i&&null!=i.id){var o=Bc(i.id),s=n.get(o);if(null!=s){var l=e[s];ka(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=t[s],r[a]=null}}})}(u,e,o,t),r&&function(e,t){na(t,function(n,r){if(n&&null!=n.name)for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(null==a.id||null==n.id)&&!Vc(n)&&!Vc(a)&&Nc("name",a,n))return e[i].newOption=n,void(t[r]=null)}})}(u,t),r||i?function(e,t,n){na(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||Vc(r.existing)||r.existing&&null!=t.id&&!Nc("id",t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}(u,t,i):a&&function(e,t){na(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}(u,t),s=u,l=Ra(),na(s,function(e){var t=e.existing;t&&l.set(t.id,e)}),na(s,function(e){var t=e.newOption;ka(!t||null==t.id||!l.get(t.id)||l.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&l.set(t.id,e),!e.keyInfo&&(e.keyInfo={})}),na(s,function(e,t){var n=e.existing,r=e.newOption,i=e.keyInfo;if(fa(r)){if(i.name=null!=r.name?Bc(r.name):n?n.name:Ic+t,n)i.id=Bc(n.id);else if(null!=r.id)i.id=Bc(r.id);else{var a=0;do{i.id="\0"+i.name+"\0"+a++}while(l.get(i.id))}l.set(i.id,e)}}),u}function Nc(e,t,n){var r=Fc(t[e],null),i=Fc(n[e],null);return null!=r&&null!=i&&r===i}function Bc(e){return Fc(e,"")}function Fc(e,t){return null==e?t:da(e)?e:pa(e)||ha(e)?e+"":t}function Ec(e){var t=e.name;return!(!t||!t.indexOf(Ic))}function Vc(e){return e&&null!=e.id&&0===Bc(e.id).indexOf("\0_ec_\0")}function Hc(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?ua(t.dataIndex)?ra(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?ua(t.name)?ra(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function Yc(){var e="__ec_inner_"+Wc++;return function(t){return t[e]||(t[e]={})}}var Wc=xc();function $c(e,t,n){var r=Gc(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=Zc(e,r,t,{useDefault:s===r,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});o[r+"Models"]=i.models,o[r+"Model"]=i.models[0]}),o}function Gc(e,t){var n;if(da(e)){var r={};r[e+"Index"]=0,n=r}else n=e;var i=Ra(),a={},o=!1;return na(n,function(e,n){if("dataIndex"!==n&&"dataIndexInside"!==n){var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(s&&l&&!(t&&t.includeMainTypes&&Ji(t.includeMainTypes,s)<0))o=o||!!s,(i.get(s)||i.set(s,{}))[l]=e}else a[n]=e}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Uc={useDefault:!0,enableAll:!1,enableNone:!1},jc={useDefault:!1,enableAll:!0,enableNone:!0};function Zc(e,t,n,r){r=r||Uc;var i=n.index,a=n.id,o=n.name,s={models:null,specified:null!=i||null!=a||null!=o};if(!s.specified){var l=void 0;return s.models=r.useDefault&&(l=e.getComponent(t))?[l]:[],s}if("none"===i||!1===i){if(r.enableNone)return s.models=[],s;i=-1}return"all"===i&&(i=r.enableAll?a=o=null:-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function qc(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}!function(){function e(){}e.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r=r||1,this._idx=t,this._end=null!=n?n:r>0?e.length:0,this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0)}}();function Xc(){return[1/0,-1/0]}function Kc(e,t){ed(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function Qc(e,t){ed(t)&&t<e[0]&&(e[0]=t)}function Jc(e,t){ed(t)&&t>e[1]&&(e[1]=t)}function ed(e){return null!=e&&isFinite(e)}function td(e,t){return ed(e)&&ed(t)&&e<=t}function nd(e){td(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function rd(){var e="__ec_once_"+id++;return function(t,n){Na(t,e)||(t[e]=1,n())}}var id=xc();function ad(e,t,n){var r=Ra(),i=0;na(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),s||n||(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function od(e){return e.value+""}function sd(e){return e+""}function ld(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get("large")&&r>=e.get("largeThreshold"),modDataCount:"mod"===e.get("progressiveChunkMode")?e.getData().count():null}}function ud(e){return{overallReset:e}}var cd="___EC__COMPONENT__CONTAINER___",dd="___EC__EXTENDED_CLASS___";function hd(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function pd(e,t){e.$constructor=e,e.extend=function(e){var t,n,r=this;return ca(n=r)&&/^class\s/.test(Function.prototype.toString.call(n))?t=function(e){function t(){return e.apply(this,arguments)||this}return Ti(t,e),t}(r):(t=function(){(e.$constructor||r).apply(this,arguments)},function(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}(t,this)),Ki(t.prototype,e),t[dd]=!0,t.extend=this.extend,t.superCall=gd,t.superApply=md,t.superClass=r,t}}function fd(e,t){e.extend=t.extend}var vd=Math.round(10*Math.random());function gd(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function md(e,t,n){return this.superClass.prototype[t].apply(e,n)}function yd(e){var t={};e.registerClass=function(e){var n,r=e.type||e.prototype.type;if(r){ka(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=r),'componentType "'+n+'" illegal'),e.prototype.type=r;var i=hd(r);if(i.sub){if(i.sub!==cd){var a=function(e){var n=t[e.main];n&&n[cd]||((n=t[e.main]={})[cd]=!0);return n}(i);a[i.sub]=e}}else t[i.main]=e}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[cd]&&(i=n?i[n]:null),r&&!i)throw new Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return i},e.getClassesByMainType=function(e){var n=hd(e),r=[],i=t[n.main];return i&&i[cd]?na(i,function(e,t){t!==cd&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[hd(e).main]},e.getAllClassMainTypes=function(){var e=[];return na(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[hd(e).main];return n&&n[cd]}}function _d(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&Ji(r,s)>=0||i&&Ji(i,s)<0)){var l=n.getShallow(s,t);null!=l&&(a[e[o][0]]=l)}}return a}}var xd=_d([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),bd=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return xd(this,e,t)},e}(),wd=new qs(50);function Sd(e){if("string"==typeof e){var t=wd.get(e);return t&&t.image}return e}function Cd(e,t,n,r,i){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var a=wd.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?!Md(t=a.image)&&a.pending.push(o):((t=Ri.loadImage(e,kd,kd)).__zrImageSrc=e,wd.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}return t}function kd(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function Md(e){return e&&e.width&&e.height}var Td=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Dd(e,t,n,r,i,a){if(!n)return e.text="",void(e.isTruncated=!1);var o=(t+"").split("\n");a=Id(n,r,i,a);for(var s=!1,l={},u=0,c=o.length;u<c;u++)Ad(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;e.text=o.join("\n"),e.isTruncated=s}function Id(e,t,n,r){var i=Ki({},r=r||{});n=ba(n,"..."),i.maxIterations=ba(r.maxIterations,2);var a=i.minChar=ba(r.minChar,0),o=i.fontMeasureInfo=fu(t),s=o.asciiCharWidth;i.placeholder=ba(r.placeholder,"");for(var l=e=Math.max(0,e-1),u=0;u<a&&l>=s;u++)l-=s;var c=yu(o,n);return c>l&&(n="",c=0),l=e-c,i.ellipsis=n,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=e,i}function Ad(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r)return e.textLine="",void(e.isTruncated=!1);var o=yu(a,t);if(o<=r)return e.textLine=t,void(e.isTruncated=!1);for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var l=0===s?Pd(t,i,a):o>0?Math.floor(t.length*i/o):0;o=yu(a,t=t.substr(0,l))}""===t&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Pd(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=mu(n,e.charCodeAt(i));return i}var Od=function(){},Rd=function(e){this.tokens=[],e&&(this.tokens=e)},Ld=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1};function zd(e,t,n,r,i){var a,o,s=""===t,l=i&&n.rich[i]||{},u=e.lines,c=l.font||n.font,d=!1;if(r){var h=l.padding,p=h?h[1]+h[3]:0;if(null!=l.width&&"auto"!==l.width){var f=Cu(l.width,r.width)+p;u.length>0&&f+r.accumWidth>r.width&&(a=t.split("\n"),d=!0),r.accumWidth=f}else{var v=Fd(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=v.accumWidth+p,o=v.linesWidths,a=v.lines}}a||(a=t.split("\n"));for(var g=fu(c),m=0;m<a.length;m++){var y=a[m],_=new Od;if(_.styleName=i,_.text=y,_.isLineHolder=!y&&!s,"number"==typeof l.width?_.width=l.width:_.width=o?o[m]:yu(g,y),m||d)u.push(new Rd([_]));else{var x=(u[u.length-1]||(u[0]=new Rd)).tokens,b=x.length;1===b&&x[0].isLineHolder?x[0]=_:(y||!b||s)&&x.push(_)}}}var Nd=ia(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function Bd(e){return!function(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}(e)||!!Nd[e]}function Fd(e,t,n,r,i){for(var a=[],o=[],s="",l="",u=0,c=0,d=fu(t),h=0;h<e.length;h++){var p=e.charAt(h);if("\n"!==p){var f=mu(d,p.charCodeAt(0)),v=!r&&!Bd(p);(a.length?c+f>n:i+c+f>n)?c?(s||l)&&(v?(s||(s=l,l="",c=u=0),a.push(s),o.push(c-u),l+=p,s="",c=u+=f):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=p,c=f)):v?(a.push(l),o.push(u),l=p,u=f):(a.push(p),o.push(f)):(c+=f,v?(l+=p,u+=f):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0}return l&&(s+=l),s&&(a.push(s),o.push(c)),1===a.length&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function Ed(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=2*t.width,s=2*t.height;Go.set(Vd,bu(n,o,i),wu(r,s,a),o,s),Go.intersect(t,Vd,null,Hd);var l=Hd.outIntersectRect;e.outerWidth=l.width,e.outerHeight=l.height,e.baseX=bu(l.x,l.width,i,!0),e.baseY=wu(l.y,l.height,a,!0)}}var Vd=new Go(0,0,0,0),Hd={outIntersectRect:{},clamp:!0};function Yd(e){return null!=e?e+="":e=""}function Wd(e,t,n,r){var i=new Go(bu(e.x||0,t,e.textAlign),wu(e.y||0,n,e.textBaseline),t,n),a=null!=r?r:$d(e)?e.lineWidth:0;return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function $d(e){var t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0}var Gd="__zr_style_"+Math.round(10*Math.random()),Ud={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},jd={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ud[Gd]=!0;var Zd=["z","z2","invisible"],qd=["invisible"],Xd=function(e){function t(t){return e.call(this,t)||this}var n;return Ti(t,e),t.prototype._init=function(t){for(var n=oa(t),r=0;r<n.length;r++){var i=n[r];"style"===i?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(e){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(e,t,n){Kd.copy(e.getBoundingRect()),e.transform&&Kd.applyTransform(e.transform);return Qd.width=t,Qd.height=n,!Kd.intersect(Qd)}(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length)for(var a=0;a<this.__clipPaths.length;++a)if(this.__clipPaths[a].isZeroArea())return!1;if(r&&this.parent)for(var o=this.parent;o;){if(o.ignore)return!1;o=o.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,a=r.shadowOffsetX||0,o=r.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new Go(0,0,0,0)),t?Go.applyTransform(e,n,t):e.copy(n),(i||a||o)&&(e.width+=2*i+Math.abs(a),e.height+=2*i+Math.abs(o),e.x=Math.min(e.x,e.x+a-i),e.y=Math.min(e.y,e.y+o-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new Go(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:Ki(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(2&this.__dirty)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return La(Ud,e)},t.prototype.useStyle=function(e){e[Gd]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[Gd]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,Zd)},t.prototype._applyStateObj=function(t,n,r,i,a,o){e.prototype._applyStateObj.call(this,t,n,r,i,a,o);var s,l=!(n&&i),u=1===this.__inHover;if(n&&n.style?a?i?s=n.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(s,n.style)):l&&(s=r.style),s)if(a){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var d=oa(c),h=0;h<d.length;h++){(f=d[h])in s&&(s[f]=s[f],this.style[f]=c[f])}var p=oa(s);for(h=0;h<p.length;h++){var f=p[h];this.style[f]=this.style[f]}this._transitionState(t,{style:s},o,this.getAnimationStyleProps())}else u?this._useHoverStyle(s):this.useStyle(s);if(!u){var v=this.__inHover?qd:Zd;for(h=0;h<v.length;h++){f=v[h];n&&null!=n[f]?this[f]=n[f]:l&&null!=r[f]&&(this[f]=r[f])}}},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var a=t[i];a.style&&(n=n||{},this._mergeStyle(n,a.style))}return n&&(r.style=n),r},t.prototype._mergeStyle=function(e,t){return Ki(e,t),e},t.prototype.getAnimationStyleProps=function(){return jd},t.initDefaultProps=((n=t.prototype).type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=0,n._rect=null,n.dirtyRectTolerance=0,void(n.__dirty=3)),t}(Ou),Kd=new Go(0,0,0,0),Qd=new Go(0,0,0,0);var Jd=Math.min,eh=Math.max,th=Math.sin,nh=Math.cos,rh=2*Math.PI,ih=Ea(),ah=Ea(),oh=Ea();function sh(e,t,n,r,i,a){i[0]=Jd(e,n),i[1]=Jd(t,r),a[0]=eh(e,n),a[1]=eh(t,r)}var lh=[],uh=[];function ch(e,t,n,r,i,a,o,s,l,u){var c=Ns,d=Rs,h=c(e,n,i,o,lh);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var p=0;p<h;p++){var f=d(e,n,i,o,lh[p]);l[0]=Jd(f,l[0]),u[0]=eh(f,u[0])}h=c(t,r,a,s,uh);for(p=0;p<h;p++){var v=d(t,r,a,s,uh[p]);l[1]=Jd(v,l[1]),u[1]=eh(v,u[1])}l[0]=Jd(e,l[0]),u[0]=eh(e,u[0]),l[0]=Jd(o,l[0]),u[0]=eh(o,u[0]),l[1]=Jd(t,l[1]),u[1]=eh(t,u[1]),l[1]=Jd(s,l[1]),u[1]=eh(s,u[1])}function dh(e,t,n,r,i,a,o,s){var l=Hs,u=Es,c=eh(Jd(l(e,n,i),1),0),d=eh(Jd(l(t,r,a),1),0),h=u(e,n,i,c),p=u(t,r,a,d);o[0]=Jd(e,i,h),o[1]=Jd(t,a,p),s[0]=eh(e,i,h),s[1]=eh(t,a,p)}function hh(e,t,n,r,i,a,o,s,l){var u=Xa,c=Ka,d=Math.abs(i-a);if(d%rh<1e-4&&d>1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(ih[0]=nh(i)*n+e,ih[1]=th(i)*r+t,ah[0]=nh(a)*n+e,ah[1]=th(a)*r+t,u(s,ih,ah),c(l,ih,ah),(i%=rh)<0&&(i+=rh),(a%=rh)<0&&(a+=rh),i>a&&!o?a+=rh:i<a&&o&&(i+=rh),o){var h=a;a=i,i=h}for(var p=0;p<a;p+=Math.PI/2)p>i&&(oh[0]=nh(p)*n+e,oh[1]=th(p)*r+t,u(s,oh,s),c(l,oh,l))}var ph={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},fh=[],vh=[],gh=[],mh=[],yh=[],_h=[],xh=Math.min,bh=Math.max,wh=Math.cos,Sh=Math.sin,Ch=Math.abs,kh=Math.PI,Mh=2*kh,Th="undefined"!=typeof Float32Array,Dh=[];function Ih(e){return Math.round(e/kh*1e8)/1e8%2*kh}var Ah=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}var t;return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=Ch(n/Jl/e)||0,this._uy=Ch(n/Jl/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(ph.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Ch(e-this._xi),r=Ch(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(ph.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(ph.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(ph.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),Dh[0]=r,Dh[1]=i,function(e,t){var n=Ih(e[0]);n<0&&(n+=Mh);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Mh?i=n+Mh:t&&n-i>=Mh?i=n-Mh:!t&&n>i?i=n+(Mh-Ih(n-i)):t&&n<i&&(i=n-(Mh-Ih(i-n))),e[0]=n,e[1]=i}(Dh,a),r=Dh[0];var o=(i=Dh[1])-r;return this.addData(ph.A,e,t,n,n,r,o,0,a?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=wh(i)*n+e,this._yi=Sh(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(ph.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(ph.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;this.data&&this.data.length===t||!Th||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},e.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();var a=this.data;if(Th&&(a instanceof Float32Array||!a)&&(this.data=new Float32Array(r+n),r>0&&a))for(var o=0;o<r;o++)this.data[o]=a[o];for(i=0;i<t;i++){var s=e[i].data;for(o=0;o<s.length;o++)this.data[r++]=s[o]}this._len=r}},e.prototype.addData=function(e,t,n,r,i,a,o,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Th&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){gh[0]=gh[1]=yh[0]=yh[1]=Number.MAX_VALUE,mh[0]=mh[1]=_h[0]=_h[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;a<this._len;){var o=e[a++],s=1===a;switch(s&&(r=t=e[a],i=n=e[a+1]),o){case ph.M:t=r=e[a++],n=i=e[a++],yh[0]=r,yh[1]=i,_h[0]=r,_h[1]=i;break;case ph.L:sh(t,n,e[a],e[a+1],yh,_h),t=e[a++],n=e[a++];break;case ph.C:ch(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],yh,_h),t=e[a++],n=e[a++];break;case ph.Q:dh(t,n,e[a++],e[a++],e[a],e[a+1],yh,_h),t=e[a++],n=e[a++];break;case ph.A:var l=e[a++],u=e[a++],c=e[a++],d=e[a++],h=e[a++],p=e[a++]+h;a+=1;var f=!e[a++];s&&(r=wh(h)*c+l,i=Sh(h)*d+u),hh(l,u,c,d,h,p,f,yh,_h),t=wh(p)*c+l,n=Sh(p)*d+u;break;case ph.R:sh(r=t=e[a++],i=n=e[a++],r+e[a++],i+e[a++],yh,_h);break;case ph.Z:t=r,n=i}Xa(gh,gh,yh),Ka(mh,mh,_h)}return 0===a&&(gh[0]=gh[1]=mh[0]=mh[1]=0),new Go(gh[0],gh[1],mh[0]-gh[0],mh[1]-gh[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,a=0,o=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,c=0,d=0;d<t;){var h=e[d++],p=1===d;p&&(o=i=e[d],s=a=e[d+1]);var f=-1;switch(h){case ph.M:i=o=e[d++],a=s=e[d++];break;case ph.L:var v=e[d++],g=(_=e[d++])-a;(Ch(I=v-i)>n||Ch(g)>r||d===t-1)&&(f=Math.sqrt(I*I+g*g),i=v,a=_);break;case ph.C:var m=e[d++],y=e[d++],_=(v=e[d++],e[d++]),x=e[d++],b=e[d++];f=Fs(i,a,m,y,v,_,x,b,10),i=x,a=b;break;case ph.Q:f=Ws(i,a,m=e[d++],y=e[d++],v=e[d++],_=e[d++],10),i=v,a=_;break;case ph.A:var w=e[d++],S=e[d++],C=e[d++],k=e[d++],M=e[d++],T=e[d++],D=T+M;d+=1,p&&(o=wh(M)*C+w,s=Sh(M)*k+S),f=bh(C,k)*xh(Mh,Math.abs(T)),i=wh(D)*C+w,a=Sh(D)*k+S;break;case ph.R:o=i=e[d++],s=a=e[d++],f=2*e[d++]+2*e[d++];break;case ph.Z:var I=o-i;g=s-a;f=Math.sqrt(I*I+g*g),i=o,a=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(e,t){var n,r,i,a,o,s,l,u,c,d,h=this.data,p=this._ux,f=this._uy,v=this._len,g=t<1,m=0,y=0,_=0;if(!g||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))e:for(var x=0;x<v;){var b=h[x++],w=1===x;switch(w&&(n=i=h[x],r=a=h[x+1]),b!==ph.L&&_>0&&(e.lineTo(c,d),_=0),b){case ph.M:n=i=h[x++],r=a=h[x++],e.moveTo(i,a);break;case ph.L:o=h[x++],s=h[x++];var S=Ch(o-i),C=Ch(s-a);if(S>p||C>f){if(g){if(m+(Z=l[y++])>u){var k=(u-m)/Z;e.lineTo(i*(1-k)+o*k,a*(1-k)+s*k);break e}m+=Z}e.lineTo(o,s),i=o,a=s,_=0}else{var M=S*S+C*C;M>_&&(c=o,d=s,_=M)}break;case ph.C:var T=h[x++],D=h[x++],I=h[x++],A=h[x++],P=h[x++],O=h[x++];if(g){if(m+(Z=l[y++])>u){Bs(i,T,I,P,k=(u-m)/Z,fh),Bs(a,D,A,O,k,vh),e.bezierCurveTo(fh[1],vh[1],fh[2],vh[2],fh[3],vh[3]);break e}m+=Z}e.bezierCurveTo(T,D,I,A,P,O),i=P,a=O;break;case ph.Q:T=h[x++],D=h[x++],I=h[x++],A=h[x++];if(g){if(m+(Z=l[y++])>u){Ys(i,T,I,k=(u-m)/Z,fh),Ys(a,D,A,k,vh),e.quadraticCurveTo(fh[1],vh[1],fh[2],vh[2]);break e}m+=Z}e.quadraticCurveTo(T,D,I,A),i=I,a=A;break;case ph.A:var R=h[x++],L=h[x++],z=h[x++],N=h[x++],B=h[x++],F=h[x++],E=h[x++],V=!h[x++],H=z>N?z:N,Y=Ch(z-N)>.001,W=B+F,$=!1;if(g)m+(Z=l[y++])>u&&(W=B+F*(u-m)/Z,$=!0),m+=Z;if(Y&&e.ellipse?e.ellipse(R,L,z,N,E,B,W,V):e.arc(R,L,H,B,W,V),$)break e;w&&(n=wh(B)*z+R,r=Sh(B)*N+L),i=wh(W)*z+R,a=Sh(W)*N+L;break;case ph.R:n=i=h[x],r=a=h[x+1],o=h[x++],s=h[x++];var G=h[x++],U=h[x++];if(g){if(m+(Z=l[y++])>u){var j=u-m;e.moveTo(o,s),e.lineTo(o+xh(j,G),s),(j-=G)>0&&e.lineTo(o+G,s+xh(j,U)),(j-=U)>0&&e.lineTo(o+bh(G-j,0),s+U),(j-=G)>0&&e.lineTo(o,s+bh(U-j,0));break e}m+=Z}e.rect(o,s,G,U);break;case ph.Z:if(g){var Z;if(m+(Z=l[y++])>u){k=(u-m)/Z;e.lineTo(i*(1-k)+n*k,a*(1-k)+r*k);break e}m+=Z}e.closePath(),i=n,a=r}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=ph,e.initDefaultProps=((t=e.prototype)._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,void(t._version=0)),e}();function Ph(e,t,n,r,i,a,o){if(0===i)return!1;var s=i,l=0;if(o>t+s&&o>r+s||o<t-s&&o<r-s||a>e+s&&a>n+s||a<e-s&&a<n-s)return!1;if(e===n)return Math.abs(a-e)<=s/2;var u=(l=(t-r)/(e-n))*a-o+(e*r-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}function Oh(e,t,n,r,i,a,o,s,l,u,c){if(0===l)return!1;var d=l;return!(c>t+d&&c>r+d&&c>a+d&&c>s+d||c<t-d&&c<r-d&&c<a-d&&c<s-d||u>e+d&&u>n+d&&u>i+d&&u>o+d||u<e-d&&u<n-d&&u<i-d&&u<o-d)&&function(e,t,n,r,i,a,o,s,l,u,c){var d,h,p,f,v,g=.005,m=1/0;Ds[0]=l,Ds[1]=u;for(var y=0;y<1;y+=.05)Is[0]=Rs(e,n,i,o,y),Is[1]=Rs(t,r,a,s,y),(f=Za(Ds,Is))<m&&(d=y,m=f);m=1/0;for(var _=0;_<32&&!(g<ks);_++)h=d-g,p=d+g,Is[0]=Rs(e,n,i,o,h),Is[1]=Rs(t,r,a,s,h),f=Za(Is,Ds),h>=0&&f<m?(d=h,m=f):(As[0]=Rs(e,n,i,o,p),As[1]=Rs(t,r,a,s,p),v=Za(As,Ds),p<=1&&v<m?(d=p,m=v):g*=.5);return c&&(c[0]=Rs(e,n,i,o,d),c[1]=Rs(t,r,a,s,d)),Ss(m)}(e,t,n,r,i,a,o,s,u,c,null)<=d/2}function Rh(e,t,n,r,i,a,o,s,l){if(0===o)return!1;var u=o;return!(l>t+u&&l>r+u&&l>a+u||l<t-u&&l<r-u&&l<a-u||s>e+u&&s>n+u&&s>i+u||s<e-u&&s<n-u&&s<i-u)&&function(e,t,n,r,i,a,o,s,l){var u,c=.005,d=1/0;Ds[0]=o,Ds[1]=s;for(var h=0;h<1;h+=.05)Is[0]=Es(e,n,i,h),Is[1]=Es(t,r,a,h),(g=Za(Ds,Is))<d&&(u=h,d=g);d=1/0;for(var p=0;p<32&&!(c<ks);p++){var f=u-c,v=u+c;Is[0]=Es(e,n,i,f),Is[1]=Es(t,r,a,f);var g=Za(Is,Ds);if(f>=0&&g<d)u=f,d=g;else{As[0]=Es(e,n,i,v),As[1]=Es(t,r,a,v);var m=Za(As,Ds);v<=1&&m<d?(u=v,d=m):c*=.5}}return l&&(l[0]=Es(e,n,i,u),l[1]=Es(t,r,a,u)),Ss(d)}(e,t,n,r,i,a,s,l,null)<=u/2}var Lh=2*Math.PI;function zh(e){return(e%=Lh)<0&&(e+=Lh),e}var Nh=2*Math.PI;function Bh(e,t,n,r,i,a,o,s,l){if(0===o)return!1;var u=o;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(r-i)%Nh<1e-4)return!0;if(a){var d=r;r=zh(i),i=zh(d)}else r=zh(r),i=zh(i);r>i&&(i+=Nh);var h=Math.atan2(l,s);return h<0&&(h+=Nh),h>=r&&h<=i||h+Nh>=r&&h+Nh<=i}function Fh(e,t,n,r,i,a){if(a>t&&a>r||a<t&&a<r)return 0;if(r===t)return 0;var o=(a-t)/(r-t),s=r<t?1:-1;1!==o&&0!==o||(s=r<t?.5:-.5);var l=o*(n-e)+e;return l===i?1/0:l>i?s:0}var Eh=Ah.CMD,Vh=2*Math.PI;var Hh=[-1,-1,-1],Yh=[-1,-1];function Wh(){var e=Yh[0];Yh[0]=Yh[1],Yh[1]=e}function $h(e,t,n,r,i,a,o,s,l,u){if(u>t&&u>r&&u>a&&u>s||u<t&&u<r&&u<a&&u<s)return 0;var c=zs(t,r,a,s,u,Hh);if(0===c)return 0;for(var d=0,h=-1,p=void 0,f=void 0,v=0;v<c;v++){var g=Hh[v],m=0===g||1===g?.5:1;Rs(e,n,i,o,g)<l||(h<0&&(h=Ns(t,r,a,s,Yh),Yh[1]<Yh[0]&&h>1&&Wh(),p=Rs(t,r,a,s,Yh[0]),h>1&&(f=Rs(t,r,a,s,Yh[1]))),2===h?g<Yh[0]?d+=p<t?m:-m:g<Yh[1]?d+=f<p?m:-m:d+=s<f?m:-m:g<Yh[0]?d+=p<t?m:-m:d+=s<p?m:-m)}return d}function Gh(e,t,n,r,i,a,o,s){if(s>t&&s>r&&s>a||s<t&&s<r&&s<a)return 0;var l=function(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,l=0;if(Ps(a))Os(o)&&(c=-s/o)>=0&&c<=1&&(i[l++]=c);else{var u=o*o-4*a*s;if(Ps(u))(c=-o/(2*a))>=0&&c<=1&&(i[l++]=c);else if(u>0){var c,d=Ss(u),h=(-o-d)/(2*a);(c=(-o+d)/(2*a))>=0&&c<=1&&(i[l++]=c),h>=0&&h<=1&&(i[l++]=h)}}return l}(t,r,a,s,Hh);if(0===l)return 0;var u=Hs(t,r,a);if(u>=0&&u<=1){for(var c=0,d=Es(t,r,a,u),h=0;h<l;h++){var p=0===Hh[h]||1===Hh[h]?.5:1;Es(e,n,i,Hh[h])<o||(Hh[h]<u?c+=d<t?p:-p:c+=a<d?p:-p)}return c}p=0===Hh[0]||1===Hh[0]?.5:1;return Es(e,n,i,Hh[0])<o?0:a<t?p:-p}function Uh(e,t,n,r,i,a,o,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Hh[0]=-l,Hh[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=Vh-1e-4){r=0,i=Vh;var c=a?1:-1;return o>=Hh[0]+e&&o<=Hh[1]+e?c:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=Vh,i+=Vh);for(var h=0,p=0;p<2;p++){var f=Hh[p];if(f+e>o){var v=Math.atan2(s,f);c=a?1:-1;v<0&&(v=Vh+v),(v>=r&&v<=i||v+Vh>=r&&v+Vh<=i)&&(v>Math.PI/2&&v<1.5*Math.PI&&(c=-c),h+=c)}}return h}function jh(e,t,n,r,i){for(var a,o,s,l,u=e.data,c=e.len(),d=0,h=0,p=0,f=0,v=0,g=0;g<c;){var m=u[g++],y=1===g;switch(m===Eh.M&&g>1&&(n||(d+=Fh(h,p,f,v,r,i))),y&&(f=h=u[g],v=p=u[g+1]),m){case Eh.M:h=f=u[g++],p=v=u[g++];break;case Eh.L:if(n){if(Ph(h,p,u[g],u[g+1],t,r,i))return!0}else d+=Fh(h,p,u[g],u[g+1],r,i)||0;h=u[g++],p=u[g++];break;case Eh.C:if(n){if(Oh(h,p,u[g++],u[g++],u[g++],u[g++],u[g],u[g+1],t,r,i))return!0}else d+=$h(h,p,u[g++],u[g++],u[g++],u[g++],u[g],u[g+1],r,i)||0;h=u[g++],p=u[g++];break;case Eh.Q:if(n){if(Rh(h,p,u[g++],u[g++],u[g],u[g+1],t,r,i))return!0}else d+=Gh(h,p,u[g++],u[g++],u[g],u[g+1],r,i)||0;h=u[g++],p=u[g++];break;case Eh.A:var _=u[g++],x=u[g++],b=u[g++],w=u[g++],S=u[g++],C=u[g++];g+=1;var k=!!(1-u[g++]);a=Math.cos(S)*b+_,o=Math.sin(S)*w+x,y?(f=a,v=o):d+=Fh(h,p,a,o,r,i);var M=(r-_)*w/b+_;if(n){if(Bh(_,x,w,S,S+C,k,t,M,i))return!0}else d+=Uh(_,x,w,S,S+C,k,M,i);h=Math.cos(S+C)*b+_,p=Math.sin(S+C)*w+x;break;case Eh.R:if(f=h=u[g++],v=p=u[g++],a=f+u[g++],o=v+u[g++],n){if(Ph(f,v,a,v,t,r,i)||Ph(a,v,a,o,t,r,i)||Ph(a,o,f,o,t,r,i)||Ph(f,o,f,v,t,r,i))return!0}else d+=Fh(a,v,a,o,r,i),d+=Fh(f,o,f,v,r,i);break;case Eh.Z:if(n){if(Ph(h,p,f,v,t,r,i))return!0}else d+=Fh(h,p,f,v,r,i);h=f,p=v}}return n||(s=p,l=v,Math.abs(s-l)<1e-4)||(d+=Fh(h,p,f,v,r,i)||0),0!==d}var Zh=Qi({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ud),qh={style:Qi({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},jd.style)},Xh=hu.concat(["invisible","culling","z","z2","zlevel","parent"]),Kh=function(e){function t(t){return e.call(this,t)||this}var n;return Ti(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s<Xh.length;++s)i[Xh[s]]=this[Xh[s]];i.__dirty|=1}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=oa(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var a=n[i],o=t[a];"style"===a?this.style?Ki(this.style,o):this.useStyle(o):"shape"===a?Ki(this.shape,o):e.prototype.attrKV.call(this,a,o)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(da(e)){var t=fl(e,0);return t>.5?eu:t>.2?"#eee":tu}if(e)return tu}return eu},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(da(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())==fl(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Ah(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||4&this.__dirty)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),function(e,t,n,r){return jh(e,t,!0,n,r)}(a,o/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return jh(e,0,!1,t,n)}(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:Ki(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return La(Zh,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=Ki({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),1!==this.__inHover){var s,l=!(n&&i);if(n&&n.shape?a?i?s=n.shape:(s=Ki({},r.shape),Ki(s,n.shape)):(s=Ki({},i?this.shape:r.shape),Ki(s,n.shape)):l&&(s=r.shape),s)if(a){this.shape=Ki({},this.shape);for(var u={},c=oa(s),d=0;d<c.length;d++){var h=c[d];"object"==typeof s[h]?this.shape[h]=s[h]:u[h]=s[h]}this._transitionState(t,{shape:u},o)}else this.shape=s,this.dirtyShape()}},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var a=t[i];a.shape&&(n=n||{},this._mergeStyle(n,a.shape))}return n&&(r.shape=n),r},t.prototype.getAnimationStyleProps=function(){return qh},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return Ti(n,t),n.prototype.getDefaultStyle=function(){return qi(e.style)},n.prototype.getDefaultShape=function(){return qi(e.shape)},n}(t);for(var r in e)"function"==typeof e[r]&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=((n=t.prototype).type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,void(n.__dirty=7)),t}(Xd),Qh=Qi({strokeFirst:!0,font:"12px sans-serif",x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Zh),Jh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ti(t,e),t.prototype.hasStroke=function(){return $d(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return La(Qh,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e,t,n;return this._rect||(this._rect=(e=this.style,t=Yd(e.text),n=e.font,Wd(e,yu(fu(n),t),Su(n),null))),this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(Xd);Jh.prototype.type="tspan";var ep=Qi({x:0,y:0},Ud),tp={style:Qi({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},jd.style)};var np=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ti(t,e),t.prototype.createStyle=function(e){return La(ep,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r,i=(r=t.image)&&"string"!=typeof r&&r.width&&r.height?t.image:this.__image;if(!i)return 0;var a="width"===e?"height":"width",o=t[a];return null==o?i[e]:i[e]/i[a]*o},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return tp},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new Go(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Xd);np.prototype.type="image";var rp=Math.round;function ip(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(rp(2*r)===rp(2*i)&&(e.x1=e.x2=op(r,s,!0)),rp(2*a)===rp(2*o)&&(e.y1=e.y2=op(a,s,!0)),e):e}}function ap(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=op(r,s,!0),e.y=op(i,s,!0),e.width=Math.max(op(r+a,s,!1)-e.x,0===a?0:1),e.height=Math.max(op(i+o,s,!1)-e.y,0===o?0:1),e):e}}function op(e,t,n){if(!t)return e;var r=rp(2*e);return(r+rp(t))%2==0?r/2:(r+(n?1:-1))/2}var sp=function(){this.x=0,this.y=0,this.width=0,this.height=0},lp={},up=function(e){function t(t){return e.call(this,t)||this}return Ti(t,e),t.prototype.getDefaultShape=function(){return new sp},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=ap(lp,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?function(e,t){var n,r,i,a,o,s=t.x,l=t.y,u=t.width,c=t.height,d=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof d?n=r=i=a=d:d instanceof Array?1===d.length?n=r=i=a=d[0]:2===d.length?(n=i=d[0],r=a=d[1]):3===d.length?(n=d[0],r=a=d[1],i=d[2]):(n=d[0],r=d[1],i=d[2],a=d[3]):n=r=i=a=0,n+r>u&&(n*=u/(o=n+r),r*=u/o),i+a>u&&(i*=u/(o=i+a),a*=u/o),r+i>c&&(r*=c/(o=r+i),i*=c/o),n+a>c&&(n*=c/(o=n+a),a*=c/o),e.moveTo(s+n,l),e.lineTo(s+u-r,l),0!==r&&e.arc(s+u-r,l+r,r,-Math.PI/2,0),e.lineTo(s+u,l+c-i),0!==i&&e.arc(s+u-i,l+c-i,i,0,Math.PI/2),e.lineTo(s+a,l+c),0!==a&&e.arc(s+a,l+c-a,a,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI),e.closePath()}(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Kh);up.prototype.type="rect";var cp={fill:"#000"},dp={},hp={style:Qi({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},jd.style)},pp=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=cp,n.attr(t),n}return Ti(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){var e;this._childCursor=0,_p(e=this.style),na(e.rich,_p),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new Go(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var a=t[i],o=a.getBoundingRect(),s=a.getLocalTransform(n);s?(e.copy(o),e.applyTransform(s),(r=r||e.clone()).union(e)):(r=r||o.clone()).union(o)}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||cp},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return Ki(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=oa(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},Ki(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return hp},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||"12px sans-serif",n=e.padding,r=this._defaultStyle,i=e.x||0,a=e.y||0,o=e.align||r.align||"left",s=e.verticalAlign||r.verticalAlign||"top";Ed(dp,r.overflowRect,i,a,o,s),i=dp.baseX,a=dp.baseY;var l=function(e,t,n,r){var i=Yd(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=t.font,c="truncate"===a,d=Su(u),h=ba(t.lineHeight,d),p="truncate"===t.lineOverflow,f=!1,v=t.width;null==v&&null!=n&&(v=n-s);var g,m=t.height;null==m&&null!=r&&(m=r-l);var y=(g=null==v||"break"!==a&&"breakAll"!==a?i?i.split("\n"):[]:i?Fd(i,t.font,v,"breakAll"===a,0).lines:[]).length*h;if(null==m&&(m=y),y>m&&p){var _=Math.floor(m/h);f=f||g.length>_,y=(g=g.slice(0,_)).length*h}if(i&&c&&null!=v)for(var x=Id(v,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),b={},w=0;w<g.length;w++)Ad(b,g[w],x),g[w]=b.textLine,f=f||b.isTruncated;var S=m,C=0,k=fu(u);for(w=0;w<g.length;w++)C=Math.max(yu(k,g[w]),C);null==v&&(v=C);var M=v;return{lines:g,height:m,outerWidth:M+=s,outerHeight:S+=l,lineHeight:h,calculatedLineHeight:d,contentWidth:C,contentHeight:y,width:v,isTruncated:f}}(Sp(e),e,dp.outerWidth,dp.outerHeight),u=Cp(e),c=!!e.backgroundColor,d=l.outerHeight,h=l.outerWidth,p=l.lines,f=l.lineHeight;this.isTruncated=!!l.isTruncated;var v=i,g=wu(a,l.contentHeight,s);if(u||n){var m=bu(i,h,o),y=wu(a,d,s);u&&this._renderBackground(e,e,m,y,h,d)}g+=f/2,n&&(v=wp(i,o,n),"top"===s?g+=n[0]:"bottom"===s&&(g-=n[2]));for(var _=0,x=!1,b=!1,w=(bp("fill"in e?e.fill:(b=!0,r.fill))),S=(xp("stroke"in e?e.stroke:c||r.autoStroke&&!b?null:(_=2,x=!0,r.stroke))),C=e.textShadowBlur>0,k=0;k<p.length;k++){var M=this._getOrCreateChild(Jh),T=M.createStyle();M.useStyle(T),T.text=p[k],T.x=v,T.y=g,o&&(T.textAlign=o),T.textBaseline="middle",T.opacity=e.opacity,T.strokeFirst=!0,C&&(T.shadowBlur=e.textShadowBlur||0,T.shadowColor=e.textShadowColor||"transparent",T.shadowOffsetX=e.textShadowOffsetX||0,T.shadowOffsetY=e.textShadowOffsetY||0),T.stroke=S,T.fill=w,S&&(T.lineWidth=e.lineWidth||_,T.lineDash=e.lineDash,T.lineDashOffset=e.lineDashOffset||0),T.font=t,yp(T,e),g+=f,M.setBoundingRect(Wd(T,l.contentWidth,l.calculatedLineHeight,x?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,t=this._defaultStyle,n=e.align||t.align,r=e.verticalAlign||t.verticalAlign,i=e.x||0,a=e.y||0;Ed(dp,t.overflowRect,i,a,n,r),i=dp.baseX,a=dp.baseY;var o=function(e,t,n,r,i){var a=new Ld,o=Yd(e);if(!o)return a;var s=t.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,c=t.width;null==c&&null!=n&&(c=n-l);var d=t.height;null==d&&null!=r&&(d=r-u);for(var h,p=t.overflow,f="break"!==p&&"breakAll"!==p||null==c?null:{width:c,accumWidth:0,breakAll:"breakAll"===p},v=Td.lastIndex=0;null!=(h=Td.exec(o));){var g=h.index;g>v&&zd(a,o.substring(v,g),t,f),zd(a,h[2],t,f,h[1]),v=Td.lastIndex}v<o.length&&zd(a,o.substring(v,o.length),t,f);var m=[],y=0,_=0,x="truncate"===p,b="truncate"===t.lineOverflow,w={};function S(e,t,n){e.width=t,e.lineHeight=n,y+=n,_=Math.max(_,t)}e:for(var C=0;C<a.lines.length;C++){for(var k=a.lines[C],M=0,T=0,D=0;D<k.tokens.length;D++){var I=(V=k.tokens[D]).styleName&&t.rich[V.styleName]||{},A=V.textPadding=I.padding,P=A?A[1]+A[3]:0,O=V.font=I.font||t.font;V.contentHeight=Su(O);var R=ba(I.height,V.contentHeight);if(V.innerHeight=R,A&&(R+=A[0]+A[2]),V.height=R,V.lineHeight=wa(I.lineHeight,t.lineHeight,R),V.align=I&&I.align||i,V.verticalAlign=I&&I.verticalAlign||"middle",b&&null!=d&&y+V.lineHeight>d){var L=a.lines.length;D>0?(k.tokens=k.tokens.slice(0,D),S(k,T,M),a.lines=a.lines.slice(0,C+1)):a.lines=a.lines.slice(0,C),a.isTruncated=a.isTruncated||a.lines.length<L;break e}var z=I.width,N=null==z||"auto"===z;if("string"==typeof z&&"%"===z.charAt(z.length-1))V.percentWidth=z,m.push(V),V.contentWidth=yu(fu(O),V.text);else{if(N){var B=I.backgroundColor,F=B&&B.image;F&&Md(F=Sd(F))&&(V.width=Math.max(V.width,F.width*R/F.height))}var E=x&&null!=c?c-T:null;null!=E&&E<V.width?!N||E<P?(V.text="",V.width=V.contentWidth=0):(Dd(w,V.text,E-P,O,t.ellipsis,{minChar:t.truncateMinChar}),V.text=w.text,a.isTruncated=a.isTruncated||w.isTruncated,V.width=V.contentWidth=yu(fu(O),V.text)):V.contentWidth=yu(fu(O),V.text)}V.width+=P,T+=V.width,I&&(M=Math.max(M,V.lineHeight))}S(k,T,M)}for(a.outerWidth=a.width=ba(c,_),a.outerHeight=a.height=ba(d,y),a.contentHeight=y,a.contentWidth=_,a.outerWidth+=l,a.outerHeight+=u,C=0;C<m.length;C++){var V,H=(V=m[C]).percentWidth;V.width=parseInt(H,10)/100*a.width}return a}(Sp(e),e,dp.outerWidth,dp.outerHeight,n),s=o.width,l=o.outerWidth,u=o.outerHeight,c=e.padding;this.isTruncated=!!o.isTruncated;var d=bu(i,l,n),h=wu(a,u,r),p=d,f=h;c&&(p+=c[3],f+=c[0]);var v=p+s;Cp(e)&&this._renderBackground(e,e,d,h,l,u);for(var g=!!e.backgroundColor,m=0;m<o.lines.length;m++){for(var y=o.lines[m],_=y.tokens,x=_.length,b=y.lineHeight,w=y.width,S=0,C=p,k=v,M=x-1,T=void 0;S<x&&(!(T=_[S]).align||"left"===T.align);)this._placeToken(T,e,b,f,C,"left",g),w-=T.width,C+=T.width,S++;for(;M>=0&&"right"===(T=_[M]).align;)this._placeToken(T,e,b,f,k,"right",g),w-=T.width,k-=T.width,M--;for(C+=(s-(C-p)-(v-k)-w)/2;S<=M;)T=_[S],this._placeToken(T,e,b,f,C+T.width/2,"center",g),C+=T.width,S++;f+=b}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,u=r+n/2;"top"===l?u=r+e.height/2:"bottom"===l&&(u=r+n-e.height/2),!e.isLineHolder&&Cp(s)&&this._renderBackground(s,t,"right"===a?i-e.width:"center"===a?i-e.width/2:i,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,d=e.textPadding;d&&(i=wp(i,a,d),u-=e.height/2-d[0]-e.innerHeight/2);var h=this._getOrCreateChild(Jh),p=h.createStyle();h.useStyle(p);var f=this._defaultStyle,v=!1,g=0,m=!1,y=bp("fill"in s?s.fill:"fill"in t?t.fill:(v=!0,f.fill)),_=xp("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||o||f.autoStroke&&!v?null:(g=2,m=!0,f.stroke)),x=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=u,x&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline="middle",p.font=e.font||"12px sans-serif",p.opacity=wa(s.opacity,t.opacity,1),yp(p,s),_&&(p.lineWidth=wa(s.lineWidth,t.lineWidth,g),p.lineDash=ba(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=_),y&&(p.fill=y),h.setBoundingRect(Wd(p,e.contentWidth,e.contentHeight,m?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,h=u&&u.image,p=u&&!h,f=e.borderRadius,v=this;if(p||e.lineHeight||c&&d){(o=this._getOrCreateChild(up)).useStyle(o.createStyle()),o.style.fill=null;var g=o.shape;g.x=n,g.y=r,g.width=i,g.height=a,g.r=f,o.dirtyShape()}if(p)(l=o.style).fill=u||null,l.fillOpacity=ba(e.fillOpacity,1);else if(h){(s=this._getOrCreateChild(np)).onload=function(){v.dirtyStyle()};var m=s.style;m.image=u.image,m.x=n,m.y=r,m.width=i,m.height=a}c&&d&&((l=o.style).lineWidth=c,l.stroke=d,l.strokeOpacity=ba(e.strokeOpacity,1),l.lineDash=e.borderDash,l.lineDashOffset=e.borderDashOffset||0,o.strokeContainThreshold=0,o.hasFill()&&o.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(o||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=wa(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return function(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}(e)&&(t=[e.fontStyle,e.fontWeight,mp(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&Ma(t)||e.textFont||e.font},t}(Xd),fp={left:!0,right:1,center:1},vp={top:1,bottom:1,middle:1},gp=["fontStyle","fontWeight","fontSize","fontFamily"];function mp(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function yp(e,t){for(var n=0;n<gp.length;n++){var r=gp[n],i=t[r];null!=i&&(e[r]=i)}}function _p(e){if(e){e.font=pp.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||fp[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||vp[n]?n:"top",e.padding&&(e.padding=Ca(e.padding))}}function xp(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function bp(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function wp(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function Sp(e){var t=e.text;return null!=t&&(t+=""),t}function Cp(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var kp=Yc(),Mp=Ra(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Tp="original",Dp="arrayRows",Ip="objectRows",Ap="keyedColumns",Pp="typedArray",Op="column",Rp=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],Lp=function(e){na(Rp,function(t){this[t]=sa(e[t],e)},this)};var zp=1,Np={},Bp=Yc(),Fp=Yc(),Ep=["emphasis","blur","select"],Vp=["normal","emphasis","blur","select"],Hp="highlight",Yp="downplay",Wp="select",$p="unselect",Gp="toggleSelect",Up="selectchanged";function jp(e){return null!=e&&"none"!==e}function Zp(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function qp(e){Zp(e,"emphasis",2)}function Xp(e){2===e.hoverState&&Zp(e,"normal",0)}function Kp(e){Zp(e,"blur",1)}function Qp(e){1===e.hoverState&&Zp(e,"normal",0)}function Jp(e){e.selected=!0}function ef(e){e.selected=!1}function tf(e,t,n){t(e,n)}function nf(e,t,n){tf(e,t,n),e.isGroup&&e.traverse(function(e){tf(e,t,n)})}function rf(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function af(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,r){var i=n&&Ji(n,"select")>=0,a=!1;if(e instanceof Kh){var o=Bp(e),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(jp(s)||jp(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(a=!0,r=Ki({},r),(u=Ki({},u)).fill=s):!jp(u.fill)&&jp(s)?(a=!0,r=Ki({},r),(u=Ki({},u)).fill=gl(s)):!jp(u.stroke)&&jp(l)&&(a||(r=Ki({},r),u=Ki({},u)),u.stroke=gl(l)),r.style=u}}if(r&&null==r.z2){a||(r=Ki({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:10)}return r}(this,0,t,n);if("blur"===e)return function(e,t,n){var r=Ji(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:function(e,t,n,r){for(var i=e.style,a={},o=0;o<t.length;o++){var s=t[o],l=i[s];a[s]=null==l?r&&r[s]:l}for(o=0;o<e.animators.length;o++){var u=e.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveTo(a,t)}return a}(e,["opacity"],t,{opacity:1}),o=(n=n||{}).style||{};return null==o.opacity&&(n=Ki({},n),o=Ki({opacity:r?i:.1*a.opacity},o),n.style=o),n}(this,e,n);if("select"===e)return function(e,t,n){if(n&&null==n.z2){n=Ki({},n);var r=e.z2SelectLift;n.z2=e.z2+(null!=r?r:9)}return n}(this,0,n)}return n}function of(e){e.stateProxy=af;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=af),n&&(n.stateProxy=af)}function sf(e,t){!ff(e,t)&&!e.__highByOuter&&nf(e,qp)}function lf(e,t){!ff(e,t)&&!e.__highByOuter&&nf(e,Xp)}function uf(e,t){e.__highByOuter|=1<<(t||0),nf(e,qp)}function cf(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&nf(e,Xp)}function df(e){nf(e,Qp)}function hf(e){nf(e,Jp)}function pf(e){nf(e,ef)}function ff(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function vf(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=Fp(i),o=function(e,t){return"series"===t.mainType?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}(e,i),s="series"===t;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Qp(e)}),s&&n.push(i)),a.isBlured=!1}),na(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function gf(e,t,n,r){var i=r.getModel();function a(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&df(r)}}if(n=n||"coordinateSystem",null!=e&&t&&"none"!==t){var o=i.getSeriesByIndex(e),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(e){var i=o===e,u=e.coordinateSystem;if(u&&u.master&&(u=u.master),!("series"===n&&!i||"coordinateSystem"===n&&!(u&&s?u===s:i)||"series"===t&&i)){if(r.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&i&&"self"===t||Kp(e)}),ta(t))a(e.getData(),t);else if(fa(t))for(var c=oa(t),d=0;d<c.length;d++)a(e.getData(c[d]),t[c[d]]);l.push(e),Fp(e).isBlured=!0}}),i.eachComponent(function(e,t){if("series"!==e){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,i)}})}}function mf(e,t,n){if(null!=e&&null!=t){var r=n.getModel().getComponent(e,t);if(r){Fp(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse(function(e){Kp(e)})}}}function yf(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return i;var a=r.getModel().getComponent(e,t);if(!a)return i;var o=r.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s,l=o.findHighDownDispatchers(n),u=0;u<l.length;u++)if("self"===kp(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function _f(e){na(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?hf(t):pf(t)})})}function xf(e){var t=[];return e.eachSeries(function(e){na(e.getAllData(),function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var a={dataIndex:i,seriesIndex:e.seriesIndex};null!=r&&(a.dataType=r),t.push(a)}})}),t}function bf(e,t,n){Mf(e,!0),nf(e,of),function(e,t,n){var r=kp(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}(e,t,n)}function wf(e,t,n,r){r?function(e){Mf(e,!1)}(e):bf(e,t,n)}var Sf=["emphasis","blur","select"],Cf={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function kf(e,t,n,r){n=n||"itemStyle";for(var i=0;i<Sf.length;i++){var a=Sf[i],o=t.getModel([a,n]);e.ensureState(a).style=r?r(o):o[Cf[n]]()}}function Mf(e,t){var n=!1===t,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),n&&!r.__highDownDispatcher||(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function Tf(e){return!(!e||!e.__highDownDispatcher)}function Df(e){var t=e.type;return"select"===t||"unselect"===t||"toggleSelect"===t}function If(e){var t=e.type;return"highlight"===t||"downplay"===t}var Af=Ah.CMD,Pf=[[],[],[]],Of=Math.sqrt,Rf=Math.atan2;var Lf=Math.sqrt,zf=Math.sin,Nf=Math.cos,Bf=Math.PI;function Ff(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Ef(e,t){return(e[0]*t[0]+e[1]*t[1])/(Ff(e)*Ff(t))}function Vf(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Ef(e,t))}function Hf(e,t,n,r,i,a,o,s,l,u,c){var d=l*(Bf/180),h=Nf(d)*(e-n)/2+zf(d)*(t-r)/2,p=-1*zf(d)*(e-n)/2+Nf(d)*(t-r)/2,f=h*h/(o*o)+p*p/(s*s);f>1&&(o*=Lf(f),s*=Lf(f));var v=(i===a?-1:1)*Lf((o*o*(s*s)-o*o*(p*p)-s*s*(h*h))/(o*o*(p*p)+s*s*(h*h)))||0,g=v*o*p/s,m=v*-s*h/o,y=(e+n)/2+Nf(d)*g-zf(d)*m,_=(t+r)/2+zf(d)*g+Nf(d)*m,x=Vf([1,0],[(h-g)/o,(p-m)/s]),b=[(h-g)/o,(p-m)/s],w=[(-1*h-g)/o,(-1*p-m)/s],S=Vf(b,w);if(Ef(b,w)<=-1&&(S=Bf),Ef(b,w)>=1&&(S=0),S<0){var C=Math.round(S/Bf*1e6)/1e6;S=2*Bf+C%2*Bf}c.addData(u,y,_,o,s,x,S,d,a)}var Yf=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Wf=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var $f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ti(t,e),t.prototype.applyTransform=function(e){},t}(Kh);function Gf(e){return null!=e.setData}function Uf(e,t){var n=function(e){var t=new Ah;if(!e)return t;var n,r=0,i=0,a=r,o=i,s=Ah.CMD,l=e.match(Yf);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),h=void 0,p=c.match(Wf)||[],f=p.length,v=0;v<f;v++)p[v]=parseFloat(p[v]);for(var g=0;g<f;){var m=void 0,y=void 0,_=void 0,x=void 0,b=void 0,w=void 0,S=void 0,C=r,k=i,M=void 0,T=void 0;switch(d){case"l":r+=p[g++],i+=p[g++],h=s.L,t.addData(h,r,i);break;case"L":r=p[g++],i=p[g++],h=s.L,t.addData(h,r,i);break;case"m":r+=p[g++],i+=p[g++],h=s.M,t.addData(h,r,i),a=r,o=i,d="l";break;case"M":r=p[g++],i=p[g++],h=s.M,t.addData(h,r,i),a=r,o=i,d="L";break;case"h":r+=p[g++],h=s.L,t.addData(h,r,i);break;case"H":r=p[g++],h=s.L,t.addData(h,r,i);break;case"v":i+=p[g++],h=s.L,t.addData(h,r,i);break;case"V":i=p[g++],h=s.L,t.addData(h,r,i);break;case"C":h=s.C,t.addData(h,p[g++],p[g++],p[g++],p[g++],p[g++],p[g++]),r=p[g-2],i=p[g-1];break;case"c":h=s.C,t.addData(h,p[g++]+r,p[g++]+i,p[g++]+r,p[g++]+i,p[g++]+r,p[g++]+i),r+=p[g-2],i+=p[g-1];break;case"S":m=r,y=i,M=t.len(),T=t.data,n===s.C&&(m+=r-T[M-4],y+=i-T[M-3]),h=s.C,C=p[g++],k=p[g++],r=p[g++],i=p[g++],t.addData(h,m,y,C,k,r,i);break;case"s":m=r,y=i,M=t.len(),T=t.data,n===s.C&&(m+=r-T[M-4],y+=i-T[M-3]),h=s.C,C=r+p[g++],k=i+p[g++],r+=p[g++],i+=p[g++],t.addData(h,m,y,C,k,r,i);break;case"Q":C=p[g++],k=p[g++],r=p[g++],i=p[g++],h=s.Q,t.addData(h,C,k,r,i);break;case"q":C=p[g++]+r,k=p[g++]+i,r+=p[g++],i+=p[g++],h=s.Q,t.addData(h,C,k,r,i);break;case"T":m=r,y=i,M=t.len(),T=t.data,n===s.Q&&(m+=r-T[M-4],y+=i-T[M-3]),r=p[g++],i=p[g++],h=s.Q,t.addData(h,m,y,r,i);break;case"t":m=r,y=i,M=t.len(),T=t.data,n===s.Q&&(m+=r-T[M-4],y+=i-T[M-3]),r+=p[g++],i+=p[g++],h=s.Q,t.addData(h,m,y,r,i);break;case"A":_=p[g++],x=p[g++],b=p[g++],w=p[g++],S=p[g++],Hf(C=r,k=i,r=p[g++],i=p[g++],w,S,_,x,b,h=s.A,t);break;case"a":_=p[g++],x=p[g++],b=p[g++],w=p[g++],S=p[g++],Hf(C=r,k=i,r+=p[g++],i+=p[g++],w,S,_,x,b,h=s.A,t)}}"z"!==d&&"Z"!==d||(h=s.Z,t.addData(h),r=a,i=o),n=h}return t.toStatic(),t}(e),r=Ki({},t);return r.buildPath=function(e){var t,r=Gf(e);r&&e.canSave()?(e.appendPath(n),(t=e.getContext())&&e.rebuildPath(t,1)):(t=r?e.getContext():e)&&n.rebuildPath(t,1)},r.applyTransform=function(e){!function(e,t){if(t){var n,r,i,a,o,s,l=e.data,u=e.len(),c=Af.M,d=Af.C,h=Af.L,p=Af.R,f=Af.A,v=Af.Q;for(i=0,a=0;i<u;){switch(n=l[i++],a=i,r=0,n){case c:case h:r=1;break;case d:r=3;break;case v:r=2;break;case f:var g=t[4],m=t[5],y=Of(t[0]*t[0]+t[1]*t[1]),_=Of(t[2]*t[2]+t[3]*t[3]),x=Rf(-t[1]/_,t[0]/y);l[i]*=y,l[i++]+=g,l[i]*=_,l[i++]+=m,l[i++]*=y,l[i++]*=_,l[i++]+=x,l[i++]+=x,a=i+=2;break;case p:s[0]=l[i++],s[1]=l[i++],qa(s,s,t),l[a++]=s[0],l[a++]=s[1],s[0]+=l[i++],s[1]+=l[i++],qa(s,s,t),l[a++]=s[0],l[a++]=s[1]}for(o=0;o<r;o++){var b=Pf[o];b[0]=l[i++],b[1]=l[i++],qa(b,b,t),l[a++]=b[0],l[a++]=b[1]}}e.increaseVersion()}}(n,e),this.dirtyShape()},r}var jf=function(){this.cx=0,this.cy=0,this.r=0},Zf=function(e){function t(t){return e.call(this,t)||this}return Ti(t,e),t.prototype.getDefaultShape=function(){return new jf},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(Kh);Zf.prototype.type="circle";var qf=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},Xf=function(e){function t(t){return e.call(this,t)||this}return Ti(t,e),t.prototype.getDefaultShape=function(){return new qf},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,i=t.cy,a=t.rx,o=t.ry,s=a*n,l=o*n;e.moveTo(r-a,i),e.bezierCurveTo(r-a,i-l,r-s,i-o,r,i-o),e.bezierCurveTo(r+s,i-o,r+a,i-l,r+a,i),e.bezierCurveTo(r+a,i+l,r+s,i+o,r,i+o),e.bezierCurveTo(r-s,i+o,r-a,i+l,r-a,i),e.closePath()},t}(Kh);Xf.prototype.type="ellipse";var Kf=Math.PI,Qf=2*Kf,Jf=Math.sin,ev=Math.cos,tv=Math.acos,nv=Math.atan2,rv=Math.abs,iv=Math.sqrt,av=Math.max,ov=Math.min,sv=1e-4;function lv(e,t,n,r,i,a,o){var s=e-n,l=t-r,u=(o?a:-a)/iv(s*s+l*l),c=u*l,d=-u*s,h=e+c,p=t+d,f=n+c,v=r+d,g=(h+f)/2,m=(p+v)/2,y=f-h,_=v-p,x=y*y+_*_,b=i-a,w=h*v-f*p,S=(_<0?-1:1)*iv(av(0,b*b*x-w*w)),C=(w*_-y*S)/x,k=(-w*y-_*S)/x,M=(w*_+y*S)/x,T=(-w*y+_*S)/x,D=C-g,I=k-m,A=M-g,P=T-m;return D*D+I*I>A*A+P*P&&(C=M,k=T),{cx:C,cy:k,x0:-c,y0:-d,x1:C*(i/b-1),y1:k*(i/b-1)}}function uv(e,t){var n,r=av(t.r,0),i=av(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,l=t.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=t.cx,c=t.cy,d=!!t.clockwise,h=rv(l-s),p=h>Qf&&h%Qf;if(p>sv&&(h=p),r>sv)if(h>Qf-sv)e.moveTo(u+r*ev(s),c+r*Jf(s)),e.arc(u,c,r,s,l,!d),i>sv&&(e.moveTo(u+i*ev(l),c+i*Jf(l)),e.arc(u,c,i,l,s,d));else{var f=void 0,v=void 0,g=void 0,m=void 0,y=void 0,_=void 0,x=void 0,b=void 0,w=void 0,S=void 0,C=void 0,k=void 0,M=void 0,T=void 0,D=void 0,I=void 0,A=r*ev(s),P=r*Jf(s),O=i*ev(l),R=i*Jf(l),L=h>sv;if(L){var z=t.cornerRadius;z&&(n=function(e){var t;if(ua(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(z),f=n[0],v=n[1],g=n[2],m=n[3]);var N=rv(r-i)/2;if(y=ov(N,g),_=ov(N,m),x=ov(N,f),b=ov(N,v),C=w=av(y,_),k=S=av(x,b),(w>sv||S>sv)&&(M=r*ev(l),T=r*Jf(l),D=i*ev(s),I=i*Jf(s),h<Kf)){var B=function(e,t,n,r,i,a,o,s){var l=n-e,u=r-t,c=o-i,d=s-a,h=d*l-c*u;if(!(h*h<sv))return[e+(h=(c*(t-a)-d*(e-i))/h)*l,t+h*u]}(A,P,D,I,M,T,O,R);if(B){var F=A-B[0],E=P-B[1],V=M-B[0],H=T-B[1],Y=1/Jf(tv((F*V+E*H)/(iv(F*F+E*E)*iv(V*V+H*H)))/2),W=iv(B[0]*B[0]+B[1]*B[1]);C=ov(w,(r-W)/(Y+1)),k=ov(S,(i-W)/(Y-1))}}}if(L)if(C>sv){var $=ov(g,C),G=ov(m,C),U=lv(D,I,A,P,r,$,d),j=lv(M,T,O,R,r,G,d);e.moveTo(u+U.cx+U.x0,c+U.cy+U.y0),C<w&&$===G?e.arc(u+U.cx,c+U.cy,C,nv(U.y0,U.x0),nv(j.y0,j.x0),!d):($>0&&e.arc(u+U.cx,c+U.cy,$,nv(U.y0,U.x0),nv(U.y1,U.x1),!d),e.arc(u,c,r,nv(U.cy+U.y1,U.cx+U.x1),nv(j.cy+j.y1,j.cx+j.x1),!d),G>0&&e.arc(u+j.cx,c+j.cy,G,nv(j.y1,j.x1),nv(j.y0,j.x0),!d))}else e.moveTo(u+A,c+P),e.arc(u,c,r,s,l,!d);else e.moveTo(u+A,c+P);if(i>sv&&L)if(k>sv){$=ov(f,k),U=lv(O,R,M,T,i,-(G=ov(v,k)),d),j=lv(A,P,D,I,i,-$,d);e.lineTo(u+U.cx+U.x0,c+U.cy+U.y0),k<S&&$===G?e.arc(u+U.cx,c+U.cy,k,nv(U.y0,U.x0),nv(j.y0,j.x0),!d):(G>0&&e.arc(u+U.cx,c+U.cy,G,nv(U.y0,U.x0),nv(U.y1,U.x1),!d),e.arc(u,c,i,nv(U.cy+U.y1,U.cx+U.x1),nv(j.cy+j.y1,j.cx+j.x1),d),$>0&&e.arc(u+j.cx,c+j.cy,$,nv(j.y1,j.x1),nv(j.y0,j.x0),!d))}else e.lineTo(u+O,c+R),e.arc(u,c,i,l,s,d);else e.lineTo(u+O,c+R)}else e.moveTo(u,c);e.closePath()}}}var cv=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},dv=function(e){function t(t){return e.call(this,t)||this}return Ti(t,e),t.prototype.getDefaultShape=function(){return new cv},t.prototype.buildPath=function(e,t){uv(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Kh);dv.prototype.type="sector";var hv=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},pv=function(e){function t(t){return e.call(this,t)||this}return Ti(t,e),t.prototype.getDefaultShape=function(){return new hv},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Kh);function fv(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=function(e,t,n,r){var i,a,o,s,l=[],u=[],c=[],d=[];if(r){o=[1/0,1/0],s=[-1/0,-1/0];for(var h=0,p=e.length;h<p;h++)Xa(o,o,e[h]),Ka(s,s,e[h]);Xa(o,o,r[0]),Ka(s,s,r[1])}for(h=0,p=e.length;h<p;h++){var f=e[h];if(n)i=e[h?h-1:p-1],a=e[(h+1)%p];else{if(0===h||h===p-1){l.push(Va(e[h]));continue}i=e[h-1],a=e[h+1]}Wa(u,a,i),$a(u,u,t);var v=Ua(f,i),g=Ua(f,a),m=v+g;0!==m&&(v/=m,g/=m),$a(c,u,-v),$a(d,u,g);var y=Ya([],f,c),_=Ya([],f,d);r&&(Ka(y,y,o),Xa(y,y,s),Ka(_,_,o),Xa(_,_,s)),l.push(y),l.push(_)}return n&&l.push(l.shift()),l}(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var l=a[2*s],u=a[2*s+1],c=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);s=1;for(var d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}pv.prototype.type="ring";var vv=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},gv=function(e){function t(t){return e.call(this,t)||this}return Ti(t,e),t.prototype.getDefaultShape=function(){return new vv},t.prototype.buildPath=function(e,t){fv(e,t,!0)},t}(Kh);gv.prototype.type="polygon";var mv=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},yv=function(e){function t(t){return e.call(this,t)||this}return Ti(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new mv},t.prototype.buildPath=function(e,t){fv(e,t,!1)},t}(Kh);yv.prototype.type="polyline";var _v={},xv=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},bv=function(e){function t(t){return e.call(this,t)||this}return Ti(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new xv},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=ip(_v,t,this.style);n=o.x1,r=o.y1,i=o.x2,a=o.y2}else n=t.x1,r=t.y1,i=t.x2,a=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,a=r*(1-s)+a*s),e.lineTo(i,a))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(Kh);bv.prototype.type="line";var wv=[],Sv=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function Cv(e,t,n){var r=e.cpx2,i=e.cpy2;return null!=r||null!=i?[(n?Ls:Rs)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Ls:Rs)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Vs:Es)(e.x1,e.cpx1,e.x2,t),(n?Vs:Es)(e.y1,e.cpy1,e.y2,t)]}var kv=function(e){function t(t){return e.call(this,t)||this}return Ti(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Sv},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2,o=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,r),null==l||null==u?(c<1&&(Ys(n,o,i,c,wv),o=wv[1],i=wv[2],Ys(r,s,a,c,wv),s=wv[1],a=wv[2]),e.quadraticCurveTo(o,s,i,a)):(c<1&&(Bs(n,o,l,i,c,wv),o=wv[1],l=wv[2],i=wv[3],Bs(r,s,u,a,c,wv),s=wv[1],u=wv[2],a=wv[3]),e.bezierCurveTo(o,s,l,u,i,a)))},t.prototype.pointAt=function(e){return Cv(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=Cv(this.shape,e,!0);return Ga(t,t)},t}(Kh);kv.prototype.type="bezier-curve";var Mv=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Tv=function(e){function t(t){return e.call(this,t)||this}return Ti(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Mv},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),a=t.startAngle,o=t.endAngle,s=t.clockwise,l=Math.cos(a),u=Math.sin(a);e.moveTo(l*i+n,u*i+r),e.arc(n,r,i,a,o,!s)},t}(Kh);Tv.prototype.type="arc";var Dv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return Ti(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Kh.prototype.getBoundingRect.call(this)},t}(Kh),Iv=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),Av=function(e){function t(t,n,r,i,a,o){var s=e.call(this,a)||this;return s.x=null==t?0:t,s.y=null==n?0:n,s.x2=null==r?1:r,s.y2=null==i?0:i,s.type="linear",s.global=o||!1,s}return Ti(t,e),t}(Iv),Pv=function(e){function t(t,n,r,i,a){var o=e.call(this,i)||this;return o.x=null==t?.5:t,o.y=null==n?.5:n,o.r=null==r?.5:r,o.type="radial",o.global=a||!1,o}return Ti(t,e),t}(Iv),Ov=Math.min,Rv=Math.max,Lv=Math.abs,zv=[0,0],Nv=[0,0],Bv=Jo(),Fv=Bv.minTv,Ev=Bv.maxTv,Vv=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Po;for(n=0;n<2;n++)this._axes[n]=new Po;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,a=e.y,o=i+e.width,s=a+e.height;if(n[0].set(i,a),n[1].set(o,a),n[2].set(o,s),n[3].set(i,s),t)for(var l=0;l<4;l++)n[l].transform(t);Po.sub(r[0],n[1],n[0]),Po.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(l=0;l<2;l++)this._origin[l]=r[l].dot(n[0])},e.prototype.intersect=function(e,t,n){var r=!0,i=!t;return t&&Po.set(t,0,0),Bv.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||i||Bv.negativeSize||Po.copy(t,r?Bv.useDir?Bv.dirMinTv:Fv:Ev),r},e.prototype._intersectCheckOneSide=function(e,t,n,r){for(var i=!0,a=0;a<2;a++){var o=e._axes[a];if(e._getProjMinMaxOnAxis(a,e._corners,zv),e._getProjMinMaxOnAxis(a,t._corners,Nv),Bv.negativeSize||zv[1]<Nv[0]||zv[0]>Nv[1]){if(i=!1,Bv.negativeSize||n)return i;var s=Lv(Nv[0]-zv[1]),l=Lv(zv[0]-Nv[1]);Ov(s,l)>Ev.len()&&(s<l?Po.scale(Ev,o,-s*r):Po.scale(Ev,o,l*r))}else if(!n){s=Lv(Nv[0]-zv[1]),l=Lv(zv[0]-Nv[1]);(Bv.useDir||Ov(s,l)<Fv.len())&&((s<l||!Bv.bidirectional)&&(Po.scale(Fv,o,s*r),Bv.useDir&&Bv.calcDirMTV()),(s>=l||!Bv.bidirectional)&&(Po.scale(Fv,o,-l*r),Bv.useDir&&Bv.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,l=1;l<t.length;l++){var u=t[l].dot(r)+i[e];o=Ov(u,o),s=Rv(u,s)}n[0]=o+Bv.touchThreshold,n[1]=s-Bv.touchThreshold,Bv.negativeSize=n[1]<n[0]},e}(),Hv=[],Yv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=1,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return Ti(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype._useHoverStyle=function(){this.__hoverStyle=null},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Go(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(Hv)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(e,t))return!0;return!1},t}(Xd),Wv=Yc();function $v(e,t,n,r,i,a,o){var s,l=!1;ca(i)?(o=a,a=i,i=null):fa(i)&&(a=i.cb,o=i.during,l=i.isFrom,s=i.removeOpt,i=i.dataIndex);var u="leave"===e;u||t.stopAnimation("leave");var c=function(e,t,n,r,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s="update"===e;if(t&&t.isAnimationEnabled()){var l=void 0,u=void 0,c=void 0;return r?(l=ba(r.duration,200),u=ba(r.easing,"cubicOut"),c=0):(l=t.getShallow(s?"animationDurationUpdate":"animationDuration"),u=t.getShallow(s?"animationEasingUpdate":"animationEasing"),c=t.getShallow(s?"animationDelayUpdate":"animationDelay")),a&&(null!=a.duration&&(l=a.duration),null!=a.easing&&(u=a.easing),null!=a.delay&&(c=a.delay)),ca(c)&&(c=c(n,i)),ca(l)&&(l=l(n)),{duration:l||0,delay:c,easing:u}}return null}(e,r,i,u?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(c&&c.duration>0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:a,force:!!a||!!o,setToFinal:!u,scope:e,during:o};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!l&&t.attr(n),o&&o(1),a&&a()}function Gv(e,t,n,r,i,a){$v("update",e,t,n,r,i,a)}function Uv(e,t,n,r,i,a){$v("enter",e,t,n,r,i,a)}function jv(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++)if("leave"===e.animators[t].scope)return!0;return!1}function Zv(e,t,n,r,i,a){jv(e)||$v("leave",e,t,n,r,i,a)}function qv(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),Zv(e,{style:{opacity:0}},t,n,r)}function Xv(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||qv(e,t,n,r)}):qv(e,t,n,r)}function Kv(e){Wv(e).oldStyle=e.style}var Qv=n({Arc:()=>Tv,BezierCurve:()=>kv,BoundingRect:()=>Go,Circle:()=>Zf,CompoundPath:()=>Dv,Ellipse:()=>Xf,Group:()=>Vu,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>np,IncrementalDisplayable:()=>Yv,Line:()=>bv,LinearGradient:()=>Av,OrientedBoundingRect:()=>Vv,Path:()=>Kh,Point:()=>Po,Polygon:()=>gv,Polyline:()=>yv,RadialGradient:()=>Pv,Rect:()=>up,Ring:()=>pv,Sector:()=>dv,Text:()=>pp,WH:()=>tg,XY:()=>eg,applyTransform:()=>gg,calcZ2Range:()=>Bg,clipPointsByRect:()=>xg,clipRectByRect:()=>bg,createIcon:()=>wg,decomposeTransform:()=>Hg,ensureCopyRect:()=>Lg,ensureCopyTransform:()=>zg,expandOrShrinkRect:()=>Mg,extendPath:()=>ig,extendShape:()=>ng,getCurrentCanvasPainter:()=>Wg,getShapeClass:()=>og,getTransform:()=>vg,groupTransition:()=>_g,initProps:()=>Uv,isBoundingRectAxisAligned:()=>Og,isElementRemoved:()=>jv,lineLineIntersect:()=>Cg,linePolygonIntersect:()=>Sg,makeImage:()=>lg,makePath:()=>sg,mergePath:()=>cg,payloadDisableAnimation:()=>Vg,registerShape:()=>ag,removeElement:()=>Zv,removeElementWithFadeOut:()=>Xv,resizePath:()=>dg,retrieveZInfo:()=>Ng,setTooltipConfig:()=>Ig,subPixelOptimize:()=>fg,subPixelOptimizeLine:()=>hg,subPixelOptimizeRect:()=>pg,transformDirection:()=>mg,traverseElements:()=>Pg,traverseUpdateZ:()=>Fg,updateProps:()=>Gv}),Jv={},eg=["x","y"],tg=["width","height"];function ng(e){return Kh.extend(e)}var rg=function(e,t){var n=Uf(e,t);return function(e){function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return Ti(t,e),t}($f)};function ig(e,t){return rg(e,t)}function ag(e,t){Jv[e]=t}function og(e){if(Jv.hasOwnProperty(e))return Jv[e]}function sg(e,t,n,r){var i=function(e,t){return new $f(Uf(e,t))}(e,t);return n&&("center"===r&&(n=ug(n,i.getBoundingRect())),dg(i,n)),i}function lg(e,t,n){var r=new np({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var i={width:e.width,height:e.height};r.setStyle(ug(t,i))}}});return r}function ug(e,t){var n,r=t.width/t.height,i=e.height*r;return n=i<=e.width?e.height:(i=e.width)/r,{x:e.x+e.width/2-i/2,y:e.y+e.height/2-n/2,width:i,height:n}}var cg=function(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var a=e[i];n.push(a.getUpdatedPathProxy(!0))}var o=new Kh(t);return o.createPathProxy(),o.buildPath=function(e){if(Gf(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o};function dg(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function hg(e,t){return ip(e,e,{lineWidth:t}),e}function pg(e,t){return ap(e,e,t),e}var fg=op;function vg(e,t){for(var n=ko([]);e&&e!==t;)To(n,e.getLocalTransform(),n),e=e.parent;return n}function gg(e,t,n){return t&&!ta(t)&&(t=cu.getLocalTransform(t)),n&&(t=Ao([],t)),qa([],e,t)}function mg(e,t,n){var r=0===t[4]||0===t[5]||0===t[0]?1:Zu(2*t[4]/t[0]),i=0===t[4]||0===t[5]||0===t[2]?1:Zu(2*t[4]/t[2]),a=["left"===e?-r:"right"===e?r:0,"top"===e?-i:"bottom"===e?i:0];return a=gg(a,t,n),Zu(a[0])>Zu(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function yg(e){return!e.isGroup}function _g(e,t,n){if(e&&t){var r,i=(r={},e.traverse(function(e){yg(e)&&e.anid&&(r[e.anid]=e)}),r);t.traverse(function(e){if(yg(e)&&e.anid){var t=i[e.anid];if(t){var r=a(e);e.attr(a(t)),Gv(e,r,n,kp(e).dataIndex)}}})}function a(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=qi(e.shape)),t}}function xg(e,t){return ra(e,function(e){var n=e[0];n=ju(n,t.x),n=Uu(n,t.x+t.width);var r=e[1];return r=ju(r,t.y),[n,r=Uu(r,t.y+t.height)]})}function bg(e,t){var n=ju(e.x,t.x),r=Uu(e.x+e.width,t.x+t.width),i=ju(e.y,t.y),a=Uu(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function wg(e,t,n){var r=Ki({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),Qi(i,n),new np(r)):sg(e.replace("path://",""),r,n,"center")}function Sg(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Cg(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function Cg(e,t,n,r,i,a,o,s){var l,u=n-e,c=r-t,d=o-i,h=s-a,p=kg(d,h,u,c);if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=e-i,v=t-a,g=kg(f,v,u,c)/p;if(g<0||g>1)return!1;var m=kg(f,v,d,h)/p;return!(m<0||m>1)}function kg(e,t,n,r){return e*r-n*t}function Mg(e,t,n,r,i){return null==t||(pa(t)?Tg[0]=Tg[1]=Tg[2]=Tg[3]=t:(Tg[0]=t[0],Tg[1]=t[1],Tg[2]=t[2],Tg[3]=t[3]),r&&(Tg[0]=ju(0,Tg[0]),Tg[1]=ju(0,Tg[1]),Tg[2]=ju(0,Tg[2]),Tg[3]=ju(0,Tg[3])),n&&(Tg[0]=-Tg[0],Tg[1]=-Tg[1],Tg[2]=-Tg[2],Tg[3]=-Tg[3]),Dg(e,Tg,"x","width",3,1,i&&i[0]||0),Dg(e,Tg,"y","height",0,2,i&&i[1]||0)),e}var Tg=[0,0,0,0];function Dg(e,t,n,r,i,a,o){var s=t[a]+t[i],l=e[r];e[r]+=s,o=ju(0,Uu(o,l)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?l+t[a]:Zu(s)>1e-8?(l-o)*t[i]/s:0):e[n]-=t[i]}function Ig(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=da(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:["name"]};s[a+"Index"]=o;var l=e.formatterParamsExtra;l&&na(oa(l),function(e){Na(s,e)||(s[e]=l[e],s.$vars.push(e))});var u=kp(e.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:r,option:Qi({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Ag(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Pg(e,t){if(e)if(ua(e))for(var n=0;n<e.length;n++)Ag(e[n],t);else Ag(e,t)}function Og(e){return!e||Zu(e[1])<Rg&&Zu(e[2])<Rg||Zu(e[0])<Rg&&Zu(e[3])<Rg}var Rg=1e-5;function Lg(e,t){return e?Go.copy(e,t):t.clone()}function zg(e,t){return t?Mo(e||[1,0,0,1,0,0],t):void 0}function Ng(e){return{z:e.get("z")||0,zlevel:e.get("zlevel")||0}}function Bg(e){var t=-1/0,n=1/0;function r(e){if(e&&!e.isGroup){var t=e.currentStates;if(t.length)for(var n=0;n<t.length;n++)i(e.states[t[n]]);i(e)}}function i(e){if(e){var r=e.z2;r>t&&(t=r),r<n&&(n=r)}}return Ag(e,function(e){r(e),r(e.getTextContent()),r(e.getTextGuideLine())}),n>t&&(n=t=0),{min:n,max:t}}function Fg(e,t,n){Eg(e,t,n,-1/0)}function Eg(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s<o.length;s++)r=ju(Eg(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=ju(e.z2||0,r);if(i&&(i.z=t,i.zlevel=n,isFinite(r)&&(i.z2=r+2)),a){var l=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(l&&l.showAbove?1:-1))}return r}function Vg(e){return e.animation={duration:0},e}function Hg(e,t){return t?Mo(Yg.transform,t):ko(Yg.transform),Yg.decomposeTransform(),pu(e,Yg),e}var Yg=new cu;function Wg(e){var t=e.getZr().painter;return"canvas"===t.getType()?t:null}Yg.transform=[1,0,0,1,0,0],ag("circle",Zf),ag("ellipse",Xf),ag("sector",dv),ag("ring",pv),ag("polygon",gv),ag("polyline",yv),ag("rect",up),ag("line",bv),ag("bezierCurve",kv),ag("arc",Tv);var $g={};function Gg(e,t,n){var r,i=e.labelFetcher,a=e.labelDataIndex,o=e.labelDimIndex,s=t.normal;i&&(r=i.getFormattedLabel(a,"normal",null,o,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==r&&(r=ca(e.defaultText)?e.defaultText(a,e,n):e.defaultText);for(var l={normal:r},u=0;u<Ep.length;u++){var c=Ep[u],d=t[c];l[c]=ba(i?i.getFormattedLabel(a,c,null,o,d&&d.get("formatter")):null,r)}return l}function Ug(e,t,n,r){n=n||$g;for(var i=e instanceof pp,a=!1,o=0;o<Vp.length;o++){if((h=t[Vp[o]])&&h.getShallow("show")){a=!0;break}}var s=i?e:e.getTextContent();if(a){i||(s||(s=new pp,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var l=Gg(n,t),u=t.normal,c=!!u.getShallow("show"),d=Zg(u,r&&r.normal,n,!1,!i);d.text=l.normal,i||e.setTextConfig(qg(u,n,!1));for(o=0;o<Ep.length;o++){var h,p=Ep[o];if(h=t[p]){var f=s.ensureState(p),v=!!ba(h.getShallow("show"),c);if(v!==c&&(f.ignore=!v),f.style=Zg(h,r&&r[p],n,!0,!i),f.style.text=l[p],!i)e.ensureState(p).textConfig=qg(h,n,!0)}}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(d.x=s.style.x),null!=s.style.y&&(d.y=s.style.y),s.ignore=!c,s.useStyle(d),s.dirty(),n.enableTextSetter&&(em(s).setLabelText=function(e){var r=Gg(n,t,e);!function(e,t){for(var n=0;n<Ep.length;n++){var r=Ep[n],i=t[r],a=e.ensureState(r);a.style=a.style||{},a.style.text=i}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}(s,r)})}else s&&(s.ignore=!0);e.dirty()}function jg(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<Ep.length;r++){var i=Ep[r];n[i]=e.getModel([i,t])}return n}function Zg(e,t,n,r,i){var a={};return function(e,t,n,r,i){n=n||$g;var a,o=t.ecModel,s=o&&o.option.textStyle,l=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||$g).rich;if(n){t=t||{};for(var r=oa(n),i=0;i<r.length;i++){t[r[i]]=1}}e=e.parentModel}return t}(t);if(l){a={};var u="richInheritPlainLabel",c=ba(t.get(u),o?o.get(u):void 0);for(var d in l)if(l.hasOwnProperty(d)){var h=t.getModel(["rich",d]);Jg(a[d]={},h,s,t,c,n,r,i,!1,!0)}}a&&(e.rich=a);var p=t.get("overflow");p&&(e.overflow=p);var f=t.get("lineOverflow");f&&(e.lineOverflow=f);var v=e,g=t.get("minMargin");if(null!=g)g=pa(g)?g/2:0,v.margin=[g,g,g,g],v.__marginType=rm.minMargin;else{var m=t.get("textMargin");null!=m&&(v.margin=Ca(m),v.__marginType=rm.textMargin)}Jg(e,t,s,null,null,n,r,i,!0,!1)}(a,e,n,r,i),t&&Ki(a,t),a}function qg(e,t,n){t=t||{};var r,i={},a=e.getShallow("rotate"),o=ba(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(r=e.getShallow("position")||(n?null:"inside"))&&(r=t.defaultOutsidePosition||"top"),null!=r&&(i.position=r),null!=s&&(i.offset=s),null!=a&&(a*=Math.PI/180,i.rotation=a),null!=o&&(i.distance=o),i.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",null!=t.autoOverflowArea&&(i.autoOverflowArea=t.autoOverflowArea),null!=t.layoutRect&&(i.layoutRect=t.layoutRect),i}var Xg=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Kg=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Qg=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Jg(e,t,n,r,i,a,o,s,l,u){n=!o&&n||$g;var c=a&&a.inheritColor,d=t.getShallow("color"),h=t.getShallow("textBorderColor"),p=ba(t.getShallow("opacity"),n.opacity);"inherit"!==d&&"auto"!==d||(d=c||null),"inherit"!==h&&"auto"!==h||(h=c||null),s||(d=d||n.color,h=h||n.textBorderColor),null!=d&&(e.fill=d),null!=h&&(e.stroke=h);var f=ba(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=f&&(e.lineWidth=f);var v=ba(t.getShallow("textBorderType"),n.textBorderType);null!=v&&(e.lineDash=v);var g=ba(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=g&&(e.lineDashOffset=g),o||null!=p||u||(p=a&&a.defaultOpacity),null!=p&&(e.opacity=p),o||s||null==e.fill&&a.inheritColor&&(e.fill=a.inheritColor);for(var m=0;m<Xg.length;m++){var y=Xg[m];null!=(x=!1!==i&&r?wa(t.getShallow(y),r.getShallow(y),n[y]):ba(t.getShallow(y),n[y]))&&(e[y]=x)}for(m=0;m<Kg.length;m++){y=Kg[m];null!=(x=t.getShallow(y))&&(e[y]=x)}if(null==e.verticalAlign){var _=t.getShallow("baseline");null!=_&&(e.verticalAlign=_)}if(!l||!a.disableBox){for(m=0;m<Qg.length;m++){var x;y=Qg[m];null!=(x=t.getShallow(y))&&(e[y]=x)}var b=t.getShallow("borderType");null!=b&&(e.borderDash=b),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!c||(e.backgroundColor=c),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!c||(e.borderColor=c)}}var em=Yc();var tm,nm,rm={minMargin:1,textMargin:2},im=["textStyle","color"],am=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],om=new pp,sm=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(im):null)},e.prototype.getFont=function(){return e={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},t=this.ecModel,n=t&&t.getModel("textStyle"),Ma([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "));var e,t,n},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<am.length;n++)t[am[n]]=this.getShallow(am[n]);return om.useStyle(t),om.update(),om.getBoundingRect()},e}(),lm=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],um=_d(lm),cm=function(){function e(){}return e.prototype.getLineStyle=function(e){return um(this,e)},e}(),dm=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],hm=_d(dm),pm=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return hm(this,e,t)},e}(),fm=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i]},e.prototype.mergeOption=function(e,t){Xi(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=null==n?n:n[e];if(null==r&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=null!=t,i=r?this.parsePath(t):null;return new e(r?this._doGet(i):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new(0,this.constructor)(qi(this.option))},e.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!Ii.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&(!e[r]||null!=(n=n&&"object"==typeof n?n[e[r]]:null));r++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();pd(fm),tm=fm,nm=["__\0is_clz",vd++].join("_"),tm.prototype[nm]=!0,tm.isInstance=function(e){return!(!e||!e[nm])},ea(fm,cm),ea(fm,pm),ea(fm,bd),ea(fm,sm);var vm=Math.round(10*Math.random());function gm(e){return[e||"",vm++].join("_")}function mm(e,t){return Xi(Xi({},e,!0),t,!0)}var ym="ZH",_m="EN",xm=_m,bm={},wm={},Sm=Ii.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||xm).toUpperCase().indexOf(ym)>-1?ym:xm;function Cm(e,t){e=e.toUpperCase(),wm[e]=new fm(t),bm[e]=t}Cm(_m,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),Cm(ym,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});function km(){return null}function Mm(e,t){var n=null,r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function Tm(e){var t=e.brk;return t?t.breaks:[]}function Dm(e){var t=e.brk;return!!t&&t.hasBreaks()}var Im=1e3,Am=6e4,Pm=36e5,Om=864e5,Rm=31536e6,Lm={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},zm={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},Nm="{yyyy}-{MM}-{dd}",Bm={year:"{yyyy}",month:"{yyyy}-{MM}",day:Nm,hour:Nm+" "+zm.hour,minute:Nm+" "+zm.minute,second:Nm+" "+zm.second,millisecond:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Fm=["year","month","day","hour","minute","second","millisecond"],Em=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Vm(e){return da(e)||ca(e)?e:function(e){e=e||{};var t={},n=!0;return na(Fm,function(t){n&&(n=null==e[t])}),na(Fm,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var l=Fm[s],u=fa(a)&&!ua(a)?a[l]:a,c=void 0;ua(u)?o=(c=u.slice())[0]||"":da(u)?c=[o=u]:(null==o?o=zm[r]:Lm[l].test(o)||(o=t[l][l][0]+" "+o),c=[o],n&&(c[1]="{primary|"+o+"}")),t[r][l]=c}}),t}(e)}function Hm(e,t){return"0000".substr(0,t-(e+="").length)+e}function Ym(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function Wm(e){return e===Ym(e)}function $m(e,t,n,r){var i=vc(e),a=i[jm(n)](),o=i[Zm(n)]()+1,s=Math.floor((o-1)/3)+1,l=i[qm(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[Xm(n)](),d=(c-1)%12+1,h=i[Km(n)](),p=i[Qm(n)](),f=i[Jm(n)](),v=c>=12?"pm":"am",g=v.toUpperCase(),m=(r instanceof fm?r:function(e){return wm[e]}(r||Sm)||wm[xm]).getModel("time"),y=m.get("month"),_=m.get("monthAbbr"),x=m.get("dayOfWeek"),b=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,v+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Hm(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[o-1]).replace(/{MMM}/g,_[o-1]).replace(/{MM}/g,Hm(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Hm(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Hm(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Hm(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,Hm(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Hm(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,Hm(f,3)).replace(/{S}/g,f+"")}function Gm(e,t){var n=vc(e),r=n[Zm(t)]()+1,i=n[qm(t)](),a=n[Xm(t)](),o=n[Km(t)](),s=n[Qm(t)](),l=0===n[Jm(t)](),u=l&&0===s,c=u&&0===o,d=c&&0===a,h=d&&1===i;return h&&1===r?"year":h?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function Um(e,t,n){switch(t){case"year":e[ty(n)](0);case"month":e[ny(n)](1);case"day":e[ry(n)](0);case"hour":e[iy(n)](0);case"minute":e[ay(n)](0);case"second":e[oy(n)](0)}return e}function jm(e){return e?"getUTCFullYear":"getFullYear"}function Zm(e){return e?"getUTCMonth":"getMonth"}function qm(e){return e?"getUTCDate":"getDate"}function Xm(e){return e?"getUTCHours":"getHours"}function Km(e){return e?"getUTCMinutes":"getMinutes"}function Qm(e){return e?"getUTCSeconds":"getSeconds"}function Jm(e){return e?"getUTCMilliseconds":"getMilliseconds"}function ey(e){return e?"setUTCFullYear":"setFullYear"}function ty(e){return e?"setUTCMonth":"setMonth"}function ny(e){return e?"setUTCDate":"setDate"}function ry(e){return e?"setUTCHours":"setHours"}function iy(e){return e?"setUTCMinutes":"setMinutes"}function ay(e){return e?"setUTCSeconds":"setSeconds"}function oy(e){return e?"setUTCMilliseconds":"setMilliseconds"}function sy(e){if(isNaN(_c(e)))return da(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function ly(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var uy=Ca;function cy(e,t,n){function r(e){return e&&Ma(e)?e:"-"}function i(e){return Sc(e)}var a="time"===t,o=e instanceof Date;if(a||o){var s=a?vc(e):e;if(!isNaN(+s))return $m(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(o)return"-"}if("ordinal"===t)return ha(e)?r(e):pa(e)&&i(e)?e+"":"-";var l=_c(e);return i(l)?sy(l):ha(e)?r(e):"boolean"==typeof e?e+"":"-"}var dy=["a","b","c","d","e","f","g"],hy=function(e,t){return"{"+e+(null==t?"":t)+"}"};function py(e,t,n){ua(t)||(t=[t]);var r=t.length;if(!r)return"";for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=dy[a];e=e.replace(hy(o),hy(o,0))}for(var s=0;s<r;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];e=e.replace(hy(dy[l],s),n?co(u):u)}return e}function fy(e,t){return t=t||"transparent",da(e)?e:fa(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var vy={},gy={},my=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){function n(n,r){var i=[];return na(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}this._nonSeriesBoxMasterList=n(vy,!0),this._normalMasterList=n(gy,!1)},e.prototype.update=function(e,t){na(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){"matrix"!==e&&"calendar"!==e?gy[e]=t:vy[e]=t},e.get=function(e){return gy[e]||vy[e]},e}();var yy=Ra();function _y(e){var t=e.getShallow("coord",!0),n=1;if(null==t){var r=yy.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function xy(e,t){var n=e.getShallow("coordinateSystem"),r=e.getShallow("coordinateSystemUsage",!0),i=0;if(n){var a="series"===e.mainType;null==r&&(r=a?"data":"box"),"data"===r?(i=1,a||(i=0)):"box"===r&&(i=2,a||function(e){return!!vy[e]}(n)||(i=0))}return{coordSysType:n,kind:i}}var by=na,wy=["left","right","top","bottom","width","height"],Sy=[["width","left","right"],["height","top","bottom"]];function Cy(e,t,n,r,i){var a=0,o=0;null==r&&(r=1/0),null==i&&(i=1/0);var s=0;t.eachChild(function(l,u){var c,d,h=l.getBoundingRect(),p=t.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===e){var v=h.width+(f?-f.x+h.x:0);(c=a+v)>r||l.newline?(a=0,c=v,o+=s+n,s=h.height):s=Math.max(s,h.height)}else{var g=h.height+(f?-f.y+h.y:0);(d=o+g)>i||l.newline?(a+=s+n,o=0,d=g,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),"horizontal"===e?a=c+n:o=d+n)})}var ky=Cy;la(Cy,"vertical"),la(Cy,"horizontal");function My(e,t,n){n=uy(n||0);var r=t.width,i=t.height,a=ic(e.left,r),o=ic(e.top,i),s=ic(e.right,r),l=ic(e.bottom,i),u=ic(e.width,r),c=ic(e.height,i),d=n[2]+n[0],h=n[1]+n[3],p=e.aspect;switch(isNaN(u)&&(u=r-s-h-a),isNaN(c)&&(c=i-l-d-o),null!=p&&(isNaN(u)&&isNaN(c)&&(p>r/i?u=.8*r:c=.8*i),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(a)&&(a=r-s-u-h),isNaN(o)&&(o=i-l-c-d),e.left||e.right){case"center":a=r/2-u/2-n[3];break;case"right":a=r-u-h}switch(e.top||e.bottom){case"middle":case"center":o=i/2-c/2-n[0];break;case"bottom":o=i-c-d}a=a||0,o=o||0,isNaN(u)&&(u=r-h-a-(s||0)),isNaN(c)&&(c=i-d-o-(l||0));var f=new Go((t.x||0)+a+n[3],(t.y||0)+o+n[0],u,c);return f.margin=n,f}var Ty=1,Dy=2;function Iy(e,t,n){var r,i,a,o,s=e.boxCoordinateSystem;if(s){var l=_y(e),u=l.coord,c=l.from;if(s.dataToLayout){a=Ty,o=c;var d=s.dataToLayout(u);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&s.dataToPoint&&(a=Dy,o=c,i=s.dataToPoint(u))}return null==a&&(a=Ty),a===Ty&&(r||(r={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:o}}function Ay(e){var t=e.layoutMode||e.constructor.layoutMode;return fa(t)?t:t?{type:t}:null}function Py(e,t,n){var r=n&&n.ignoreSize;!ua(r)&&(r=[r,r]);var i=o(Sy[0],0),a=o(Sy[1],1);function o(n,i){var a={},o=0,l={},u=0;if(by(n,function(t){l[t]=e[t]}),by(n,function(e){Na(t,e)&&(a[e]=l[e]=t[e]),s(a,e)&&o++,s(l,e)&&u++}),r[i])return s(t,n[1])?l[n[2]]=null:s(t,n[2])&&(l[n[1]]=null),l;if(2!==u&&o){if(o>=2)return a;for(var c=0;c<n.length;c++){var d=n[c];if(!Na(a,d)&&Na(e,d)){a[d]=e[d];break}}return a}return l}function s(e,t){return null!=e[t]&&"auto"!==e[t]}function l(e,t,n){by(e,function(e){t[e]=n[e]})}l(Sy[0],e,i),l(Sy[1],e,a)}function Oy(e){return function(e,t){return t&&e&&by(wy,function(n){Na(t,n)&&(e[n]=t[n])}),e}({},e)}var Ry=Yc(),Ly=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=gm("ec_cpt_model"),i}var n;return Ti(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Ay(this),r=n?Oy(e):{};Xi(e,t.getTheme().get(this.mainType)),Xi(e,this.getDefaultOption()),n&&Py(e,r,n)},t.prototype.mergeOption=function(e,t){Xi(this.option,e,!0);var n=Ay(this);n&&Py(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(e){return!(!e||!e[dd])}(e))return e.defaultOption;var t=Ry(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var a={},o=n.length-1;o>=0;o--)a=Xi(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return Zc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return t=!1,{left:(e=this).getShallow("left",t),top:e.getShallow("top",t),right:e.getShallow("right",t),bottom:e.getShallow("bottom",t),width:e.getShallow("width",t),height:e.getShallow("height",t)};var e,t},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=((n=t.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),t}(fm);fd(Ly,fm),yd(Ly),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=hd(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=hd(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}(Ly),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,r,i,a){if(e.length){var o=function(e){var r={},i=[];return na(e,function(a){var o=n(r,a),s=function(e,t){var n=[];return na(e,function(e){Ji(t,e)>=0&&n.push(e)}),n}(o.originalDeps=t(a),e);o.entryCount=s.length,0===o.entryCount&&i.push(a),na(s,function(e){Ji(o.predecessor,e)<0&&o.predecessor.push(e);var t=n(r,e);Ji(t.successor,e)<0&&t.successor.push(a)})}),{graph:r,noEntryList:i}}(r),s=o.graph,l=o.noEntryList,u={};for(na(e,function(e){u[e]=!0});l.length;){var c=l.pop(),d=s[c],h=!!u[c];h&&(i.call(a,c,d.originalDeps.slice()),delete u[c]),na(d.successor,h?f:p)}na(u,function(){throw new Error("")})}function p(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,p(e)}}}(Ly,function(e){var t=[];na(Ly.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=ra(t,function(e){return hd(e).main}),"dataset"!==e&&Ji(t,"dataset")<=0&&t.unshift("dataset");return t});var zy={color:{},darkColor:{},size:{}},Ny=zy.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};for(var By in Ki(Ny,{primary:Ny.neutral80,secondary:Ny.neutral70,tertiary:Ny.neutral60,quaternary:Ny.neutral50,disabled:Ny.neutral20,border:Ny.neutral30,borderTint:Ny.neutral20,borderShade:Ny.neutral40,background:Ny.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Ny.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Ny.neutral70,axisLineTint:Ny.neutral40,axisTick:Ny.neutral70,axisTickMinor:Ny.neutral60,axisLabel:Ny.neutral70,axisSplitLine:Ny.neutral15,axisMinorSplitLine:Ny.neutral05}),Ny)if(Ny.hasOwnProperty(By)){var Fy=Ny[By];"theme"===By?zy.darkColor.theme=Ny.theme.slice():"highlight"===By?zy.darkColor.highlight="rgba(255,231,130,0.4)":0===By.indexOf("accent")?zy.darkColor[By]=hl(Fy,null,function(e){return.5*e},function(e){return Math.min(1,1.3-e)}):zy.darkColor[By]=hl(Fy,null,function(e){return.9*e},function(e){return 1-Math.pow(e,1.5)})}zy.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Ey="";"undefined"!=typeof navigator&&(Ey=navigator.platform||"");var Vy="rgba(0, 0, 0, 0.2)",Hy=zy.color.theme[0],Yy=hl(Hy,null,null,.9),Wy={darkMode:"auto",colorBy:"series",color:zy.color.theme,gradientColor:[Yy,Hy],aria:{decal:{decals:[{color:Vy,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Vy,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Vy,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Vy,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Vy,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Vy,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Ey.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},$y=1,Gy=2,Uy=3,jy=Yc();function Zy(e,t,n){var r={},i=qy(t);if(!i||!e)return r;var a,o,s=[],l=[],u=t.ecModel,c=jy(u).datasetMap,d=i.uid+"_"+n.seriesLayoutBy;na(e=e.slice(),function(t,n){var i=fa(t)?t:e[n]={name:t};"ordinal"===i.type&&null==a&&(a=n,o=f(i)),r[i.name]=[]});var h=c.get(d)||c.set(d,{categoryWayDim:o,valueWayDim:0});function p(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function f(e){var t=e.dimsDef;return t?t.length:1}return na(e,function(e,t){var n=e.name,i=f(e);if(null==a){var o=h.valueWayDim;p(r[n],o,i),p(l,o,i),h.valueWayDim+=i}else if(a===t)p(r[n],0,i),p(s,0,i);else{o=h.categoryWayDim;p(r[n],o,i),p(l,o,i),h.categoryWayDim+=i}}),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function qy(e){if(!e.get("data",!0))return Zc(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},Uc).models[0]}function Xy(e,t){return function(e,t,n,r,i,a){var o,s,l,u=5;if(ga(e))return Uy;if(r){var c=r[a];fa(c)?(s=c.name,l=c.type):da(c)&&(s=c)}if(null!=l)return"ordinal"===l?$y:Uy;if("arrayRows"===t){var d=e;if("row"===n){for(var h=d[a],p=0;p<(h||[]).length&&p<u;p++)if(null!=(o=_(h[i+p])))return o}else for(p=0;p<d.length&&p<u;p++){var f=d[i+p];if(f&&null!=(o=_(f[a])))return o}}else if("objectRows"===t){var v=e;if(!s)return Uy;for(p=0;p<v.length&&p<u;p++){if((m=v[p])&&null!=(o=_(m[s])))return o}}else if("keyedColumns"===t){if(!s)return Uy;if(!(h=e[s])||ga(h))return Uy;for(p=0;p<h.length&&p<u;p++)if(null!=(o=_(h[p])))return o}else if("original"===t){var g=e;for(p=0;p<g.length&&p<u;p++){var m,y=Rc(m=g[p]);if(!ua(y))return Uy;if(null!=(o=_(y[a])))return o}}function _(e){var t=da(e);return null!=e&&isFinite(Number(e))&&""!==e?t?Gy:Uy:t&&"-"!==e?$y:void 0}return Uy}(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}var Ky=Ra();var Qy,Jy,e_,t_=Yc(),n_=(Yc(),function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=Ac(this.get("color",!0)),i=this.get("colorLayer",!0);return function(e,t,n,r,i,a,o){a=a||e;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=null!=o&&r?function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}(r,o):n;if(c=c||n,!c||!c.length)return;var d=c[l];i&&(u[i]=d);return s.paletteIdx=(l+1)%c.length,d}(this,t_,r,i,e,t,n)},e.prototype.clearColorPalette=function(){!function(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}(this,t_)},e}());var r_="\0_ec_inner",i_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ti(t,e),t.prototype.init=function(e,t,n,r,i,a){r=r||{},this.option=null,this._theme=new fm(r),this._locale=new fm(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=s_(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,s_(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var i=r.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(i,t)):e_(this,i),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||"recreate"===e||"media"===e){var o=r.getMediaOption(this);o.length&&na(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=Ra(),s=t&&t.replaceMergeMainTypeMap;jy(this).datasetMap=Ra(),na(e,function(e,t){null!=e&&(Ly.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=null==n[t]?qi(e):Xi(n[t],e,!0))}),s&&s.each(function(e,t){Ly.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),Ly.topologicalTravel(a,Ly.getAllClassMainTypes(),function(t){var a=function(e,t,n){var r=Ky.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}(this,t,Ac(e[t])),o=r.get(t),l=o?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=zc(o,a,l);(function(e,t,n){na(e,function(e){var r=e.newOption;fa(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}(t,r,e.existing,n))})})(u,t,Ly),n[t]=null,r.set(t,null),i.set(t,0);var c,d=[],h=[],p=0;na(u,function(e,n){var r=e.existing,i=e.newOption;if(i){var a="series"===t,o=Ly.getClass(t,e.keyInfo.subType,!a);if(!o)return;if("tooltip"===t){if(c)return;c=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=Ki({componentIndex:n},e.keyInfo);Ki(r=new o(i,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(d.push(r.option),h.push(r),p++):(d.push(void 0),h.push(void 0))},this),n[t]=d,r.set(t,h),i.set(t,p),"series"===t&&Qy(this)},this),this._seriesIndices||Qy(this)},t.prototype.getOption=function(){var e=qi(this.option);return na(e,function(t,n){if(Ly.hasClass(n)){for(var r=Ac(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!Vc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[r_],e},t.prototype.setTheme=function(e){this._theme=new fm(e),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n,r=e.index,i=e.id,a=e.name,o=this._componentsMap.get(t);return o&&o.length?(null!=r?(n=[],na(Ac(r),function(e){o[e]&&n.push(o[e])})):n=null!=i?a_("id",i,o):null!=a?a_("name",a,o):aa(o,function(e){return!!e}),o_(n,e)):[]},t.prototype.findComponents=function(e){var t,n,r,i,a,o=e.query,s=e.mainType,l=(n=s+"Index",r=s+"Id",i=s+"Name",!(t=o)||null==t[n]&&null==t[r]&&null==t[i]?null:{mainType:s,index:t[n],id:t[r],name:t[i]});return a=o_(l?this.queryComponents(l):aa(this._componentsMap.get(s),function(e){return!!e}),e),e.filter?aa(a,e.filter):a},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(ca(e)){var i=t,a=e;r.each(function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&a.call(i,t,r,r.componentIndex)}})}else for(var o=da(e)?r.get(e):fa(e)?this.findComponents(e):null,s=0;o&&s<o.length;s++){var l=o[s];l&&t.call(n,l,l.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=Fc(e,null);return aa(this._componentsMap.get("series"),function(e){return!!e&&null!=t&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return aa(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return aa(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){Jy(this),na(this._seriesIndices,function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){na(this._componentsMap.get("series"),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){Jy(this),na(this._seriesIndices,function(r){var i=this._componentsMap.get("series")[r];i.subType===e&&t.call(n,i,r)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return na(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return Jy(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){Jy(this);var n=[];na(this._seriesIndices,function(r){var i=this._componentsMap.get("series")[r];e.call(t,i,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=Ra(n)},t.prototype.restoreData=function(e){Qy(this);var t=this._componentsMap,n=[];t.each(function(e,t){Ly.hasClass(t)&&n.push(t)}),Ly.topologicalTravel(n,Ly.getAllClassMainTypes(),function(n){na(t.get(n),function(t){!t||"series"===n&&function(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return null!=n&&e.componentIndex!==n||null!=r&&e.id!==r||null!=i&&e.name!==i}}(t,e)||t.restoreData()})})},t.internalField=(Qy=function(e){var t=e._seriesIndices=[];na(e._componentsMap.get("series"),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=Ra(t)},Jy=function(e){},void(e_=function(e,t){e.option={},e.option[r_]=1,e._componentsMap=Ra({series:[]}),e._componentsCount=Ra();var n=t.aria;fa(n)&&null==n.enabled&&(n.enabled=!0),function(e,t){var n=e.color&&!e.colorLayer;na(t,function(t,r){"colorLayer"===r&&n||"color"===r&&e.color||Ly.hasClass(r)||("object"==typeof t?e[r]=e[r]?Xi(e[r],t,!1):qi(t):null==e[r]&&(e[r]=t))})}(t,e._theme.option),Xi(t,Wy,!1),e._mergeOption(t,null)})),t}(fm);function a_(e,t,n){if(ua(t)){var r=Ra();return na(t,function(e){null!=e&&null!=Fc(e,null)&&r.set(e,!0)}),aa(n,function(t){return t&&r.get(t[e])})}var i=Fc(t,null);return aa(n,function(t){return t&&null!=i&&t[e]===i})}function o_(e,t){return t.hasOwnProperty("subType")?aa(e,function(e){return e&&e.subType===t.subType}):e}function s_(e){var t=Ra();return e&&na(Ac(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}ea(i_,n_);var l_=/^(min|max)?(.+)$/,u_=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(na(Ac(e.series),function(e){e&&e.data&&ga(e.data)&&Da(e.data)}),na(Ac(e.dataset),function(e){e&&e.source&&ga(e.source)&&Da(e.source)})),e=qi(e);var r=this._optionBackup,i=function(e,t,n){var r,i,a=[],o=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,d=!!(l||s||o&&o.timeline);o?(i=o).timeline||(i.timeline=s):((d||c)&&(e.options=e.media=null),i=e);c&&ua(u)&&na(u,function(e){e&&e.option&&(e.query?a.push(e):r||(r=e))});function h(e){na(t,function(t){t(e,n)})}return h(i),na(l,function(e){return h(e)}),na(a,function(e){return h(e.option)}),{baseOption:i,timelineOptions:l||[],mediaDefault:r,mediaList:a}}(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],qi(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=qi(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),i=this._api.getHeight(),a=this._mediaList,o=this._mediaDefault,s=[],l=[];if(!a.length&&!o)return l;for(var u=0,c=a.length;u<c;u++)c_(a[u].query,r,i)&&s.push(u);return!s.length&&o&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=ra(s,function(e){return qi(-1===e?o.option:a[e].option)})),this._currentMediaIndices=s,l},e}();function c_(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return na(e,function(e,t){var n=t.match(l_);if(n&&n[1]&&n[2]){var a=n[1];(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}var d_=na,h_=fa,p_=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function f_(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=p_.length;n<r;n++){var i=p_[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?Xi(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?Xi(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function v_(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,Qi(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function g_(e){v_(e,"itemStyle"),v_(e,"lineStyle"),v_(e,"areaStyle"),v_(e,"label"),v_(e,"labelLine"),v_(e,"upperLabel"),v_(e,"edgeLabel")}function m_(e,t){var n=h_(e)&&e[t],r=h_(n)&&n.textStyle;if(r)for(var i=0,a=Oc.length;i<a;i++){var o=Oc[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function y_(e){e&&(g_(e),m_(e,"label"),e.emphasis&&m_(e.emphasis,"label"))}function __(e){return ua(e)?e:e?[e]:[]}function x_(e){return(ua(e)?e[0]:e)||{}}function b_(e,t){d_(__(e.series),function(e){h_(e)&&function(e){if(h_(e)){f_(e),g_(e),m_(e,"label"),m_(e,"upperLabel"),m_(e,"edgeLabel"),e.emphasis&&(m_(e.emphasis,"label"),m_(e.emphasis,"upperLabel"),m_(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(f_(t),y_(t));var n=e.markLine;n&&(f_(n),y_(n));var r=e.markArea;r&&y_(r);var i=e.data;if("graph"===e.type){i=i||e.nodes;var a=e.links||e.edges;if(a&&!ga(a))for(var o=0;o<a.length;o++)y_(a[o]);na(e.categories,function(e){g_(e)})}if(i&&!ga(i))for(o=0;o<i.length;o++)y_(i[o]);if((t=e.markPoint)&&t.data){var s=t.data;for(o=0;o<s.length;o++)y_(s[o])}if((n=e.markLine)&&n.data){var l=n.data;for(o=0;o<l.length;o++)ua(l[o])?(y_(l[o][0]),y_(l[o][1])):y_(l[o])}"gauge"===e.type?(m_(e,"axisLabel"),m_(e,"title"),m_(e,"detail")):"treemap"===e.type?(v_(e.breadcrumb,"itemStyle"),na(e.levels,function(e){g_(e)})):"tree"===e.type&&g_(e.leaves)}}(e)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),d_(n,function(t){d_(__(e[t]),function(e){e&&(m_(e,"axisLabel"),m_(e.axisPointer,"label"))})}),d_(__(e.parallel),function(e){var t=e&&e.parallelAxisDefault;m_(t,"axisLabel"),m_(t&&t.axisPointer,"label")}),d_(__(e.calendar),function(e){v_(e,"itemStyle"),m_(e,"dayLabel"),m_(e,"monthLabel"),m_(e,"yearLabel")}),d_(__(e.radar),function(e){m_(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),d_(__(e.geo),function(e){h_(e)&&(y_(e),d_(__(e.regions),function(e){y_(e)}))}),d_(__(e.timeline),function(e){y_(e),v_(e,"label"),v_(e,"itemStyle"),v_(e,"controlStyle",!0);var t=e.data;ua(t)&&na(t,function(e){fa(e)&&(v_(e,"label"),v_(e,"itemStyle"))})}),d_(__(e.toolbox),function(e){v_(e,"iconStyle"),d_(e.feature,function(e){v_(e,"iconStyle")})}),m_(x_(e.axisPointer),"label"),m_(x_(e.tooltip).axisPointer,"label")}function w_(e){e&&na(S_,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var S_=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],C_=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],k_=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function M_(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<k_.length;n++){var r=k_[n][1],i=k_[n][0];null!=t[r]&&(t[i]=t[r])}}function T_(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function D_(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function I_(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&I_(e[n].children,t)}function A_(e,t){b_(e,t),e.series=Ac(e.series),na(e.series,function(e){if(fa(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t){if(null!=e.clockWise&&(e.clockwise=e.clockWise),T_(e.label),(i=e.data)&&!ga(i))for(var n=0;n<i.length;n++)T_(i[n]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if("gauge"===t){var r=function(e,t){for(var n=t.split(","),r=e,i=0;i<n.length&&null!=(r=r&&r[n[i]]);i++);return r}(e,"pointer.color");null!=r&&function(e,t,n,r){for(var i,a=t.split(","),o=e,s=0;s<a.length-1;s++)null==o[i=a[s]]&&(o[i]={}),o=o[i];(r||null==o[a[s]])&&(o[a[s]]=n)}(e,"itemStyle.color",r)}else if("bar"===t){var i;if(M_(e),M_(e.backgroundStyle),M_(e.emphasis),(i=e.data)&&!ga(i))for(n=0;n<i.length;n++)"object"==typeof i[n]&&(M_(i[n]),M_(i[n]&&i[n].emphasis))}else if("sunburst"===t){var a=e.highlightPolicy;a&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=a)),D_(e),I_(e.data,D_)}else"graph"===t||"sankey"===t?function(e){e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&(e.emphasis.focus="adjacency"))}(e):"map"===t&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&Qi(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),w_(e)}}),e.dataRange&&(e.visualMap=e.dataRange),na(C_,function(t){var n=e[t];n&&(ua(n)||(n=[n]),na(n,function(e){w_(e)}))})}var P_=ud(function(e){var t=Ra();e.eachSeries(function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),a={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:e};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;r.push(a)}}),t.each(function(e){0!==e.length&&("seriesDesc"===(e[0].seriesModel.get("stackOrder")||"seriesAsc")&&e.reverse(),na(e,function(t,n){t.data.setCalculationInfo("stackedOnSeries",n>0?e[n-1].seriesModel:null)}),function(e){na(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(a,u,c){var d,h,p=o.get(t.stackedDimension,c);if(isNaN(p))return i;s?h=o.getRawIndex(c):d=o.get(t.stackedByDimension,c);for(var f=NaN,v=n-1;v>=0;v--){var g=e[v];if(s||(h=g.data.rawIndexOf(g.stackedByDimension,d)),h>=0){var m=g.data.getByRawIndex(g.stackResultDimension,h);if("all"===l||"positive"===l&&m>0||"negative"===l&&m<0||"samesign"===l&&p>=0&&m>0||"samesign"===l&&p<=0&&m<0){p=cc(p,m),f=m;break}}}return r[0]=p,r[1]=f,r})})}(e))})});var O_,R_,L_,z_,N_,B_,F_=function(e){this.data=e.data||("keyedColumns"===e.sourceFormat?{}:[]),this.sourceFormat=e.sourceFormat||"unknown",this.seriesLayoutBy=e.seriesLayoutBy||"column",this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];null==r.type&&Xy(this,n)===$y&&(r.type="ordinal")}};function E_(e){return e instanceof F_}function V_(e,t,n){n=n||Y_(e);var r=t.seriesLayoutBy,i=function(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:W_(i),startIndex:o,dimensionsDetectedCount:a};if("arrayRows"===t){var s=e;"auto"===r||null==r?$_(function(e){null!=e&&"-"!==e&&(da(e)?o??=1:o=0)},n,s,10):o=pa(r)?r:r?1:0,i||1!==o||(i=[],$_(function(e,t){i[t]=null!=e?e+"":""},n,s,1/0)),a=i?i.length:"row"===n?s.length:s[0]?s[0].length:null}else if("objectRows"===t)i||(i=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t)return oa(t)}(e));else if("keyedColumns"===t)i||(i=[],na(e,function(e,t){i.push(t)}));else if("original"===t){var l=Rc(e[0]);a=ua(l)&&l.length||1}return{startIndex:o,dimensionsDefine:W_(i),dimensionsDetectedCount:a}}(e,n,r,t.sourceHeader,t.dimensions);return new F_({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:qi(t)})}function H_(e){return new F_({data:e,sourceFormat:ga(e)?Pp:Tp})}function Y_(e){var t="unknown";if(ga(e))t=Pp;else if(ua(e)){0===e.length&&(t=Dp);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(null!=i){if(ua(i)||ga(i)){t=Dp;break}if(fa(i)){t=Ip;break}}}}else if(fa(e))for(var a in e)if(Na(e,a)&&ta(e[a])){t=Ap;break}return t}function W_(e){if(e){var t=Ra();return ra(e,function(e,n){var r={name:(e=fa(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==r.name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var i=t.get(r.name);return i?r.name+="-"+i.count++:t.set(r.name,{count:1}),r})}}function $_(e,t,n,r){if("row"===t)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else{var a=n[0]||[];for(i=0;i<a.length&&i<r;i++)e(a[i],i)}}function G_(e){var t=e.sourceFormat;return"objectRows"===t||"keyedColumns"===t}var U_=function(){function e(e,t){var n=E_(e)?e:H_(e);this._source=n;var r=this._data=n.data,i=n.sourceFormat;n.seriesLayoutBy,"typedArray"===i&&(this._offset=0,this._dimSize=t,this._data=r),B_(this,r,n)}var t;return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=((t=e.prototype).pure=!1,void(t.persistent=!0)),e.internalField=function(){var e;B_=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,l=a.startIndex,u=a.dimensionsDefine;if(Ki(e,N_[rx(o,s)]),"typedArray"===o)e.getItem=t,e.count=r,e.fillStorage=n;else{var c=X_(o,s);e.getItem=sa(c,null,i,l,u);var d=J_(o,s);e.count=sa(d,null,i,l,u)}};var t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,i=r*e,a=0;a<r;a++)t[a]=n[i+a];return t},n=function(e,t,n,r){for(var i=this._data,a=this._dimSize,o=0;o<a;o++){for(var s=r[o],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],c=t-e,d=n[o],h=0;h<c;h++){var p=i[h*a+o];d[e+h]=p,p<l&&(l=p),p>u&&(u=p)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[Dp+"_"+Op]={pure:!0,appendData:i},e[Dp+"_row"]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Ip]={pure:!0,appendData:i},e[Ap]={pure:!0,appendData:function(e){var t=this._data;na(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[Tp]={appendData:i},e[Pp]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},N_=e}(),e}(),j_=function(e){ua(e)||Mc("series.data or dataset.source must be an array.")};(O_={})[Dp+"_"+Op]=j_,O_[Dp+"_row"]=j_,O_[Ip]=j_,O_[Ap]=function(e,t){for(var n=0;n<t.length;n++)null==t[n].name&&Mc("dimension name must not be null/undefined.")},O_[Tp]=j_;var Z_=function(e,t,n,r){return e[r]},q_=((R_={})[Dp+"_"+Op]=function(e,t,n,r){return e[r+t]},R_[Dp+"_row"]=function(e,t,n,r,i){r+=t;for(var a=i||[],o=e,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[r]:null}return a},R_[Ip]=Z_,R_[Ap]=function(e,t,n,r,i){for(var a=i||[],o=0;o<n.length;o++){var s=n[o].name,l=null!=s?e[s]:null;a[o]=l?l[r]:null}return a},R_[Tp]=Z_,R_);function X_(e,t){return q_[rx(e,t)]}var K_=function(e,t,n){return e.length},Q_=((L_={})[Dp+"_"+Op]=function(e,t,n){return Math.max(0,e.length-t)},L_[Dp+"_row"]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},L_[Ip]=K_,L_[Ap]=function(e,t,n){var r=n[0].name,i=null!=r?e[r]:null;return i?i.length:0},L_[Tp]=K_,L_);function J_(e,t){return Q_[rx(e,t)]}var ex=function(e,t,n){return e[t]},tx=((z_={})[Dp]=ex,z_[Ip]=function(e,t,n){return e[n]},z_[Ap]=ex,z_[Tp]=function(e,t,n){var r=Rc(e);return r instanceof Array?r[t]:r},z_[Pp]=ex,z_);function nx(e){return tx[e]}function rx(e,t){return"arrayRows"===e?e+"_"+t:e}function ix(e,t,n){if(e){var r=e.getRawDataItem(t);if(null!=r){var i=e.getStore(),a=i.getSource().sourceFormat;if(null!=n){var o=e.getDimensionIndex(n),s=i.getDimensionProperty(o);return nx(a)(r,o,s)}var l=r;return"original"===a&&(l=Rc(r)),l}}}var ax=/\{@(.+?)\}/g,ox=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,"style"),l=s&&s[n.getItemVisual(e,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,d="series"===c,h=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:l,borderColor:u,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t=t||"normal";var o=this.getData(n),s=this.getDataParams(e,n);return a&&(s.value=a.interpolatedValue),null!=r&&ua(s.value)&&(s.value=s.value[r]),i||(i=o.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"])),ca(i)?(s.status=t,s.dimensionIndex=r,i(s)):da(i)?py(i,s).replace(ax,function(t,n){var r=n.length,i=n;"["===i.charAt(0)&&"]"===i.charAt(r-1)&&(i=+i.slice(1,r-1));var s=ix(o,e,i);if(a&&ua(a.interpolatedValue)){var l=o.getDimensionIndex(i);l>=0&&(s=a.interpolatedValue[l])}return null!=s?s+"":""}):void 0},e.prototype.getRawValue=function(e,t){return ix(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function sx(e){var t,n;return fa(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function lx(e){return new ux(e)}var ux=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,r=e&&e.skip;if(this._dirty&&n){var i=this.context;i.data=i.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var a,o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}o===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,a=this._doReset(r)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,p=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(a||h<p)){var f=this._progress;if(ua(f))for(var v=0;v<f.length;v++)this._doProgress(f[v],h,p,l,u);else this._doProgress(f,h,p,l,u)}this._dueIndex=p;var g=null!=this._settedOutputEnd?this._settedOutputEnd:p;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){cx.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:cx.next},this.context)},e.prototype._doReset=function(e){var t,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),ua(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),cx=function(){var e,t,n,r,i,a={reset:function(l,u,c,d){t=l,e=u,n=c,r=d,i=Math.ceil(r/n),a.next=n>1&&r>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var a=t%i*n+Math.ceil(t/i),o=t>=e?null:a<r?a:t;return t++,o}}();function dx(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||pa(e)||null==e||"-"===e||(e=+vc(e)),null==e||""===e?NaN:Number(e))}Ra({number:function(e){return parseFloat(e)},time:function(e){return+vc(e)},trim:function(e){return da(e)?Ma(e):e}});var hx={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}},px=(function(){function e(e,t){pa(t)||Tc(""),this._opFn=hx[e],this._rvalFloat=_c(t)}e.prototype.evaluate=function(e){return pa(e)?this._opFn(e,this._rvalFloat):this._opFn(_c(e),this._rvalFloat)}}(),function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=pa(e)?e:_c(e),r=pa(t)?t:_c(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=da(e),s=da(t);o&&(n=s?e:0),s&&(r=o?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}());!function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=_c(t)}e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(t=_c(e)===this._rvalFloat)}return this._isEQ?t:!t}}();function fx(e){var t="",n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(null!=e.g&&(t+="G"+e.g,n=e.g),null!=e.ge&&(t+="GE"+e.ge,r=e.ge),null!=e.l&&(t+="L"+e.l,i=e.l),null!=e.le&&(t+="LE"+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function vx(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var gx=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return dx(e,t)},e}();function mx(e){return Cx(e.sourceFormat)||Tc(""),e.data}function yx(e){var t=e.sourceFormat,n=e.data;if(Cx(t)||Tc(""),"arrayRows"===t){for(var r=[],i=0,a=n.length;i<a;i++)r.push(n[i].slice());return r}if("objectRows"===t){for(r=[],i=0,a=n.length;i<a;i++)r.push(Ki({},n[i]));return r}}function _x(e,t,n){if(null!=n)return pa(n)||!isNaN(n)&&!Na(t,n)?e[n]:Na(t,n)?t[n]:void 0}function xx(e){return qi(e)}var bx=Ra();function Sx(e,t,n,r){t.length||Tc(""),fa(e)||Tc("");var i=e.type,a=bx.get(i);a||Tc("");var o=ra(t,function(e){return function(e,t){var n=new gx,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;"column"!==e.seriesLayoutBy&&Tc("");var o=[],s={},l=e.dimensionsDefine;if(l)na(l,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};o.push(r),null!=n&&(Na(s,n)&&Tc(""),s[n]=r)});else for(var u=0;u<e.dimensionsDetectedCount;u++)o.push({index:u});var c=X_(i,Op);t.__isBuiltIn&&(n.getRawDataItem=function(e){return c(r,a,o,e)},n.getRawData=sa(mx,null,e)),n.cloneRawData=sa(yx,null,e);var d=J_(i,Op);n.count=sa(d,null,r,a,o);var h=nx(i);n.retrieveValue=function(e,t){return p(c(r,a,o,e),t)};var p=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=o[t];return n?h(e,t,n.name):void 0}};return n.getDimensionInfo=sa(_x,null,o,s),n.cloneAllDimensionInfo=sa(xx,null,o),n}(e,a)});return ra(Ac(a.transform({upstream:o[0],upstreamList:o,config:qi(e.config)})),function(e,n){var r;fa(e)||Tc(""),e.data||Tc(""),Cx(Y_(e.data))||Tc("");var i=t[0];if(i&&0===n&&!e.dimensions){var a=i.startIndex;a&&(e.data=i.data.slice(0,a).concat(e.data)),r={seriesLayoutBy:Op,sourceHeader:a,dimensions:i.metaRawOption.dimensions}}else r={seriesLayoutBy:Op,sourceHeader:0,dimensions:e.dimensions};return V_(e.data,r,null)})}function Cx(e){return"arrayRows"===e||"objectRows"===e}var kx,Mx="undefined"==typeof Uint32Array?Array:Uint32Array,Tx="undefined"==typeof Uint16Array?Array:Uint16Array,Dx="undefined"==typeof Int32Array?Array:Int32Array,Ix="undefined"==typeof Float64Array?Array:Float64Array,Ax={float:Ix,int:Dx,ordinal:Array,number:Array,time:Ix};function Px(e){return e>65535?Mx:Tx}function Ox(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Rx(e,t,n,r,i){var a=Ax[n||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var l=new a(r),u=0;u<s;u++)l[u]=o[u];e[t]=l}}else e[t]=new a(r)}var Lx=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Ra()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=kx[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],G_(r),this._dimensions=ra(t,function(e){return{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(null!=i){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new Ax[t||"float"](this._rawCount),this._rawExtent[i]=[1/0,-1/0],i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,a=r.ordinalOffset||0,o=n.length;0===a&&(i[e]=[1/0,-1/0]);for(var s=i[e],l=a;l<o;l++){var u=n[l]=t.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}r.ordinalMeta=t,r.ordinalOffset=o,r.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,a=this._rawExtent,o=this.count(),s=o+Math.max(e.length,t||0),l=0;l<i;l++){Rx(n,l,(p=r[l]).type,s,!0)}for(var u=[],c=o;c<s;c++)for(var d=c-o,h=0;h<i;h++){var p=r[h],f=kx.arrayRows.call(this,e[d]||u,p.property,d,h);n[h][c]=f;var v=a[h];f<v[0]&&(v[0]=f),f>v[1]&&(v[1]=f)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,l=ra(a,function(e){return e.property}),u=0;u<o;u++){var c=a[u];s[u]||(s[u]=Xc()),Rx(i,u,c.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],h=e;h<t;h++){d=r.getItem(h,d);for(var p=0;p<o;p++){var f=i[p],v=this._dimValueGetter(d,l[p],h,p);f[h]=v;var g=s[p];v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(null==t){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;i=0;for(var a=r.length;i<a;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=0;if(this._chunks[e])for(var n=0,r=this.count();n<r;n++){var i=this.get(e,n);isNaN(i)||(t+=i)}return t},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)}),sc(t);var n=this.count();return 0===n?0:n%2==1?t[(n-1)/2]:(t[n/2]+t[n/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var a=(r+i)/2|0;if(t[a]<e)r=a+1;else{if(!(t[a]>e))return a;i=a-1}}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{e=new(n=Px(this._rawCount))(this.count());for(i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(Px(n._rawCount))(r),a=[],o=e.length,s=0,l=e[0],u=n._chunks,c=0;c<r;c++){var d=void 0,h=n.getRawIndex(c);if(0===o)d=t(c);else if(1===o){d=t(u[l][h],c)}else{for(var p=0;p<o;p++)a[p]=u[e[p]][h];a[p]=c,d=t.apply(null,a)}d&&(i[s++]=h)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=oa(e),i=r.length;if(!i)return this;var a=t.count(),o=new(Px(t._rawCount))(a),s=0,l=r[0],u=e[l][0],c=e[l][1],d=t._chunks,h=!1;if(!t._indices){var p=0;if(1===i){for(var f=d[r[0]],v=0;v<n;v++){((_=f[v])>=u&&_<=c||isNaN(_))&&(o[s++]=p),p++}h=!0}else if(2===i){f=d[r[0]];var g=d[r[1]],m=e[r[1]][0],y=e[r[1]][1];for(v=0;v<n;v++){var _=f[v],x=g[v];(_>=u&&_<=c||isNaN(_))&&(x>=m&&x<=y||isNaN(x))&&(o[s++]=p),p++}h=!0}}if(!h)if(1===i)for(v=0;v<a;v++){var b=t.getRawIndex(v);((_=d[r[0]][b])>=u&&_<=c||isNaN(_))&&(o[s++]=b)}else for(v=0;v<a;v++){for(var w=!0,S=(b=t.getRawIndex(v),0);S<i;S++){var C=r[S];((_=d[C][b])<e[C][0]||_>e[C][1])&&(w=!1)}w&&(o[s++]=t.getRawIndex(v))}return s<a&&(t._indices=o),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],a=t.length,o=e.count(),s=[],l=e._rawExtent,u=0;u<t.length;u++)l[t[u]]=Xc();for(var c=0;c<o;c++){for(var d=e.getRawIndex(c),h=0;h<a;h++)s[h]=r[t[h]][d];s[a]=c;var p=n&&n.apply(null,s);if(null!=p){"object"!=typeof p&&(i[0]=p,p=i);for(u=0;u<p.length;u++){var f=t[u],v=p[u],g=l[f],m=r[f];m&&(m[d]=v),v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,i,a=this.clone([e],!0),o=a._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(Px(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var h=1;h<s-1;h+=u){for(var p=Math.min(h+u,s-1),f=Math.min(h+2*u,s),v=(f+p)/2,g=0,m=p;m<f;m++){var y=o[k=this.getRawIndex(m)];isNaN(y)||(g+=y)}g/=f-p;var _=h,x=Math.min(h+u,s),b=h-1,w=o[c];n=-1,i=_;var S=-1,C=0;for(m=_;m<x;m++){var k;y=o[k=this.getRawIndex(m)];isNaN(y)?(C++,S<0&&(S=k)):(r=Math.abs((b-v)*(y-w)-(b-m)*(g-w)))>n&&(n=r,i=k)}C>0&&C<x-_&&(d[l++]=Math.min(S,i),i=Math.max(S,i)),d[l++]=i,c=i}return d[l++]=this.getRawIndex(s-1),a._count=l,a._indices=d,a.getRawIndex=this._getRawIdx,a},e.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),r=n._chunks,i=Math.floor(1/t),a=r[e],o=this.count(),s=new(Px(this._rawCount))(2*Math.ceil(o/i)),l=0,u=0;u<o;u+=i){var c=u,d=a[this.getRawIndex(c)],h=u,p=a[this.getRawIndex(h)],f=i;u+i>o&&(f=o-u);for(var v=0;v<f;v++){var g=a[this.getRawIndex(u+v)];g<d&&(d=g,c=u+v),g>p&&(p=g,h=u+v)}var m=this.getRawIndex(c),y=this.getRawIndex(h);c<h?(s[l++]=m,s[l++]=y):(s[l++]=y,s[l++]=m)}return n._count=l,n._indices=s,n._updateGetRawIdx(),n},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),a=i._chunks,o=[],s=Math.floor(1/t),l=a[e],u=this.count(),c=i._rawExtent[e]=[1/0,-1/0],d=new(Px(this._rawCount))(Math.ceil(u/s)),h=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,o.length=s);for(var f=0;f<s;f++){var v=this.getRawIndex(p+f);o[f]=l[v]}var g=n(o),m=this.getRawIndex(Math.min(p+r(o,g)||0,u-1));l[m]=g,g<c[0]&&(c[0]=g),g>c[1]&&(c[1]=g),d[h++]=m}return i._count=h,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();i<a;i++){var o=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][o],i);break;case 2:t(r[e[0]][o],r[e[1]][o],i);break;default:for(var s=0,l=[];s<n;s++)l[s]=r[e[s]][o];l[s]=i,t.apply(null,l)}}},e.prototype.getDataExtent=function(e,t){var n=this._chunks[e],r=[1/0,-1/0];if(!n)return r;var i=this.count();if(!this._indices&&!t)return this._rawExtent[e].slice();var a=this._extent,o=a[e]||(a[e]={}),s=fx(t),l=s.key,u=o[l];if(u)return u.slice();for(var c=r[0],d=r[1],h=0;h<i;h++){var p=n[this.getRawIndex(h)];t&&!vx(s,p)||(p<c&&(c=p),p>d&&(d=p))}return o[l]=[c,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r=new e,i=this._chunks,a=t&&ia(t,function(e,t){return e[t]=!0,e},{});if(a)for(var o=0;o<i.length;o++)r._chunks[o]=a[o]?Ox(i[o]):i[o];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=qi(this._extent),e._rawExtent=qi(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return dx(e[r],this._dimensions[r])}kx={arrayRows:e,objectRows:function(e,t,n,r){return dx(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(null==e.value?e:e.value);return dx(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),zx=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),i=!!r.length;if(Nx(n)){var a=n,o=void 0,s=void 0,l=void 0;if(i){var u=r[0];u.prepareSource(),o=(l=u.getSource()).data,s=l.sourceFormat,t=[u._getVersionSign()]}else s=ga(o=a.get("data",!0))?Pp:Tp,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},h=ba(c.seriesLayoutBy,d.seriesLayoutBy)||null,p=ba(c.sourceHeader,d.sourceHeader),f=ba(c.dimensions,d.dimensions);e=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||f?[V_(o,{seriesLayoutBy:h,sourceHeader:p,dimensions:f},s)]:[]}else{var v=n;if(i){var g=this._applyTransform(r);e=g.sourceList,t=g.upstreamSignList}else{e=[V_(v.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),i=n.get("fromTransformResult",!0);if(null!=i){1!==e.length&&Bx("")}var a,o=[],s=[];return na(e,function(e){e.prepareSource();var t=e.getSource(i||0);null==i||t||Bx(""),o.push(t),s.push(e._getVersionSign())}),r?t=function(e,t){var n=Ac(e),r=n.length;r||Tc("");for(var i=0,a=r;i<a;i++)t=Sx(n[i],t),i!==a-1&&(t.length=Math.max(t.length,1));return t}(r,o,n.componentIndex):null!=i&&(t=[(a=o[0],new F_({data:a.data,sourceFormat:a.sourceFormat,seriesLayoutBy:a.seriesLayoutBy,dimensionsDefine:qi(a.dimensionsDefine),startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount}))]),{sourceList:t,upstreamSignList:s}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=this._storeList,i=r[0];i||(i=r[0]={});var a=i[n];if(!a){var o=this._getUpstreamSourceManagers()[0];Nx(this._sourceHost)&&o?a=o._innerGetDataStore(e,t,n):(a=new Lx).initData(new U_(t,e.length),e),i[n]=a}return a},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Nx(e)){var t=qy(e);return t?[t.getSourceManager()]:[]}return ra(function(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?Zc(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},Uc).models:[]}(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;if(Nx(r))e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=r;e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function Nx(e){return"series"===e.mainType}function Bx(e){throw new Error(e)}function Fx(e){var t=e.lineHeight;return null==t?"line-height:1":"line-height:"+co(t+"")+"px"}function Ex(e,t){var n=e.color||zy.color.tertiary,r=e.fontSize||12,i=e.fontWeight||"400",a=e.color||zy.color.secondary,o=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+co(r+"")+"px;color:"+co(n)+";font-weight:"+co(i+""),valueStyle:"font-size:"+co(o+"")+"px;color:"+co(a)+";font-weight:"+co(s+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var Vx=[0,10,20,30],Hx=["","\n","\n\n","\n\n\n"];function Yx(e,t){return t.type=e,t}function Wx(e){return"section"===e.type}function $x(e){return Wx(e)?Ux:jx}function Gx(e){if(Wx(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return na(e.blocks,function(e){var n=Gx(e);n>=t&&(t=n+ +(r&&(!n||Wx(e)&&!e.noHeader)))}),t}return 0}function Ux(e,t,n,r){var i,a=t.noHeader,o=(i=Gx(t),{html:Vx[i],richText:Hx[i]}),s=[],l=t.blocks||[];ka(!l||ua(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Na(c,u)){var d=new px(c[u],null);l.sort(function(e,t){return d.evaluate(e.sortParam,t.sortParam)})}else"seriesDesc"===u&&l.reverse()}na(l,function(n,i){var a=t.valueFormatter,l=$x(n)(a?Ki(Ki({},e),{valueFormatter:a}):e,n,i>0?o.html:0,r);null!=l&&s.push(l)});var h="richText"===e.renderMode?s.join(o.richText):qx(r,s.join(""),a?n:o.html);if(a)return h;var p=cy(t.header,"ordinal",e.useUTC),f=Ex(r,e.renderMode).nameStyle,v=Fx(r);return"richText"===e.renderMode?Xx(e,p,f)+o.richText+h:qx(r,'<div style="'+f+";"+v+';">'+co(p)+"</div>"+h,n)}function jx(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return ra(e=ua(e)?e:[e],function(e,t){return cy(e,ua(p)?p[t]:p,u)})};if(!a||!o){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||zy.color.secondary,i),h=a?"":cy(l,"ordinal",u),p=t.valueType,f=o?[]:c(t.value,t.rawDataIndex),v=!s||!a,g=!s&&a,m=Ex(r,i),y=m.nameStyle,_=m.valueStyle;return"richText"===i?(s?"":d)+(a?"":Xx(e,h,y))+(o?"":function(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(ua(t)?t.join(" "):t,a)}(e,f,v,g,_)):qx(r,(s?"":d)+(a?"":function(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+co(e)+"</span>"}(h,!s,y))+(o?"":function(e,t,n,r){var i=t?"float:right;margin-left:"+(n?"10px":"20px"):"";return e=ua(e)?e:[e],'<span style="'+i+";"+r+'">'+ra(e,function(e){return co(e)}).join("&nbsp;&nbsp;")+"</span>"}(f,v,g,_)),n)}}function Zx(e,t,n,r,i,a){if(e)return $x(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function qx(e,t,n){return'<div style="'+("margin: "+n+"px 0 0")+";"+Fx(e)+';">'+t+'<div style="clear:both"></div></div>'}function Xx(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Kx(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var Qx=function(){function e(){this.richTextStyles={},this._nextStyleNameId=xc()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,i=function(e,t){var n=da(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var a=n.renderMode||"html";return r?"html"===a?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+co(r)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+co(r)+";"+(t||"")+'"></span>':{renderMode:a,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:t,type:e,renderMode:n,markerId:r});return da(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};ua(t)?na(t,function(e){return Ki(n,e)}):Ki(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function Jx(e){var t,n,r,i,a=e.series,o=e.dataIndex,s=e.multipleSeries,l=a.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,d=a.getRawValue(o),h=ua(d),p=function(e,t){return fy(e.getData().getItemVisual(t,"style")[e.visualDrawType])}(a,o);if(c>1||h&&!c){var f=function(e,t,n,r,i){var a=t.getData(),o=ia(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName},!1),s=[],l=[],u=[];function c(e,t){var n=a.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(o?u.push(Yx("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?na(r,function(e){c(ix(a,n,e),e)}):na(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,a,o,u,p);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,i=f.inlineValues[0]}else if(c){var v=l.getDimensionInfo(u[0]);i=t=ix(l,o,u[0]),n=v.type}else i=t=h?d[0]:d;var g=Ec(a),m=g&&a.name||"",y=l.getName(o),_=s?m:y;return Yx("section",{header:m,noHeader:s||!g,sortParam:i,blocks:[Yx("nameValue",{markerType:"item",markerColor:p,name:_,noName:!Ma(_),value:t,valueType:n,rawDataIndex:l.getRawIndex(o)})].concat(r||[])})}var eb=Yc();function tb(e,t){return e.getName(t)||e.getId(t)}var nb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}var n;return Ti(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=lx({count:ib,reset:ab}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(eb(this).sourceManager=new zx(this)).prepareSource();var r=this.getInitialData(e,n);sb(r,this),this.dataTask.context.data=r,eb(this).dataBeforeProcessed=r,rb(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Ay(this),r=n?Oy(e):{},i=this.subType;Ly.hasClass(i)&&(i+="Series"),Xi(e,t.getTheme().get(this.subType)),Xi(e,this.getDefaultOption()),Pc(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Py(e,r,n)},t.prototype.mergeOption=function(e,t){e=Xi(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Ay(this);n&&Py(this.option,e,n);var r=eb(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);sb(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,eb(this).dataBeforeProcessed=i,rb(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!ga(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Pc(e[n],"label",t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=ub(this);if(t){var n=t.context.data;return null!=e&&n.getLinkedData?n.getLinkedData(e):n}return eb(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=ub(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}eb(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Ra(e)},t.prototype.getSourceManager=function(){return eb(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return eb(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get("colorBy")||"series"},t.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.indicesOfNearest=function(e,t,n,r){var i=this.getData(),a=this.coordinateSystem,o=a&&a.getAxis(e);if(!a||!o)return[];var s=o.dataToCoord(n);null==r&&(r=1/0);for(var l=[],u=1/0,c=-1,d=0,h=i.getDimensionIndex(t),p=i.getStore(),f=0,v=p.count();f<v;f++){var g=p.get(h,f),m=s-o.dataToCoord(g),y=Math.abs(m);y<=r&&((y<u||y===u&&m>=0&&c<0)&&(u=y,c=m,d=0),m===c&&(l[d++]=f))}return l.length=d,l},t.prototype.formatTooltip=function(e,t,n){return Jx({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Ii.node&&(!e||!e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=n_.prototype.getColorFromPalette.call(this,e,t,n);return i||(i=r.getColorFromPalette(e,t,n)),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var a=0;a<e.length;a++){var o=tb(i,e[a]);n[o]=!1,this._selectedDataIndicesMap[o]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=oa(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[tb(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o)if("series"===a)i.selectedMap="all";else if("multiple"===a){fa(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l<o;l++){var u=t[l];s[d=tb(e,u)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(u)}}else if("single"===a||!0===a){var c=t[o-1],d=tb(e,c);i.selectedMap=((n={})[d]=!0,n),this._selectedDataIndicesMap=((r={})[d]=e.getRawIndex(c),r)}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Ly.registerClass(e)},t.protoInitialize=((n=t.prototype).type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),t}(Ly);function rb(e){var t=e.name;Ec(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return na(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(" ")}(e)||t)}function ib(e){return e.model.getRawData().count()}function ab(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),ob}function ob(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function sb(e,t){na(function(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];var i=e.length;for(r=0;r<t.length;r++)n[r+i]=t[r];return n}(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,la(lb,t))})}function lb(e,t){var n=ub(e);return n&&n.setOutputEnd((t||this).count()),t}function ub(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}ea(nb,ox),ea(nb,n_),fd(nb,Ly);var cb=function(){function e(){this.group=new Vu,this.uid=gm("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();function db(){var e=Yc();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(i===o&&a===s)&&"reset"}}pd(cb),yd(cb);var hb=Yc(),pb=db(),fb=function(){function e(){this.group=new Vu,this.uid=gm("viewChart"),this.renderTask=lx({plan:mb,reset:yb}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&gb(i,r,"emphasis")},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&gb(i,r,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){Pg(this.group,e)},e.markUpdateMethod=function(e,t){hb(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function vb(e,t,n){e&&Tf(e)&&("emphasis"===t?uf:cf)(e,n)}function gb(e,t,n){var r=Hc(e,t),i=t&&null!=t.highlightKey?function(e){var t=Np[e];return null==t&&zp<=32&&(t=Np[e]=zp++),t}(t.highlightKey):null;null!=r?na(Ac(r),function(t){vb(e.getItemGraphicEl(t),n,i)}):e.eachItemGraphicEl(function(e){vb(e,n,i)})}function mb(e){return pb(e.model)}function yb(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&hb(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](t,n,r,i),_b[l]}pd(fb),yd(fb);var _b={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},xb="\0__throttleOriginMethod",bb="\0__throttleRate",wb="\0__throttleType";function Sb(e,t,n){var r,i,a,o,s,l=0,u=0,c=null;function d(){u=(new Date).getTime(),c=null,e.apply(a,o||[])}t=t||0;var h=function(){for(var e=[],h=0;h<arguments.length;h++)e[h]=arguments[h];r=(new Date).getTime(),a=this,o=e;var p=s||t,f=s||n;s=null,i=r-(f?l:u)-p,clearTimeout(c),f?c=setTimeout(d,p):i>=0?d():c=setTimeout(d,-i),l=r};return h.clear=function(){c&&(clearTimeout(c),c=null)},h.debounceNextCall=function(e){s=e},h}function Cb(e,t,n,r){var i=e[t];if(i){var a=i[xb]||i,o=i[wb];if(i[bb]!==n||o!==r){if(null==n||!r)return e[t]=a;(i=e[t]=Sb(a,n,"debounce"===r))[xb]=a,i[wb]=r,i[bb]=n}return i}}function kb(e,t){var n=e[t];n&&n[xb]&&(n.clear&&n.clear(),e[t]=n[xb])}var Mb=Yc(),Tb={itemStyle:_d(dm,!0),lineStyle:_d(lm,!0)},Db={lineStyle:"stroke",itemStyle:"fill"};function Ib(e,t){var n=e.visualStyleMapper||Tb[t];return n||Tb.itemStyle}function Ab(e,t){var n=e.visualDrawType||Db[t];return n||"fill"}var Pb={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),a=Ib(e,r)(i),o=i.getShallow("decal");o&&(n.setVisual("decal",o),o.dirty=!0);var s=Ab(e,r),l=a[s],u=ca(l)?l:null,c="auto"===a.fill||"auto"===a.stroke;if(!a[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual("colorFromPalette",!0)),a.fill="auto"===a.fill||ca(a.fill)?d:a.fill,a.stroke="auto"===a.stroke||ca(a.stroke)?d:a.stroke}if(n.setVisual("style",a),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=Ki({},a);i[s]=u(r),t.setItemVisual(n,"style",i)}}}},Ob=new fm,Rb={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=Ib(e,r),a=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){Ob.option=n[r];var o=i(Ob);Ki(e.ensureUniqueItemVisual(t,"style"),o),Ob.option.decal&&(e.setItemVisual(t,"decal",Ob.option.decal),Ob.option.decal.dirty=!0),a in o&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},Lb={performRawSeries:!0,overallReset:function(e){var t=Ra();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+"-"+e.getColorBy();Mb(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=Mb(e).scope,a=Ab(e,e.visualStyleAccessPath||"itemStyle");r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,"colorFromPalette")){var l=r.ensureUniqueItemVisual(s,"style"),u=t.getName(o)||o+"",c=t.count();l[a]=e.getColorFromPalette(u,i,c)}})}})}},zb=Math.PI;var Nb=function(){function e(e,t,n,r){this._stageTaskMap=Ra(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:null!=a?Math.ceil(a/i):null,modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):ld(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Ra();t.eachSeries(function(t){var i="canvas"===e.painter.type&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;na(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});ka(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var i=!1,a=this;function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}na(e,function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=a._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,h=c.agentStubMap;h.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&c.dirty(),a.updatePayload(c,n);var p=a.getPerformArgs(c,r.block);h.each(function(e){e.perform(p)}),c.perform(p)&&(i=!0)}else u&&u.each(function(s,l){o(r,s)&&s.dirty();var u=a.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(u)&&(i=!0)})}}),this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=Ra(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=o.set(s,a&&a.get(s)||lx({plan:Hb,reset:Yb,count:Gb}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||lx({reset:Bb});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Ra(),l=e.seriesType,u=e.getTargetSeries,c=e.dirtyOnOverallProgress,d=!1;function h(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,lx({reset:Fb,onDirty:Vb})));n.context={model:e,dirtyOnOverallProgress:c},n.agent=a,n.__block=c,i._pipe(e,n)}ka(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,h):u?u(n,r).each(h):na(n.getSeries(),h),d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return ca(e)&&(e={overallReset:e,seriesType:Ub(e)}),e.uid=gm("stageHandler"),t&&(e.visualType=t),e},e}();function Bb(e){e.overallReset(e.ecModel,e.api,e.payload)}function Fb(e){return e.dirtyOnOverallProgress&&Eb}function Eb(){this.agent.dirty(),this.getDownstream().dirty()}function Vb(){this.agent&&this.agent.dirty()}function Hb(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Yb(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Ac(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?ra(t,function(e,t){return $b(t)}):Wb}var Wb=$b(0);function $b(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(r,a);else i&&i.progress&&i.progress(t,r)}}function Gb(e){return e.data.count()}function Ub(e){jb=null;try{e(Zb,qb)}catch(sv){}return jb}var jb,Zb={},qb={};function Xb(e,t){for(var n in t.prototype)e[n]=Ba}Xb(Zb,i_),Xb(qb,Lp),Zb.eachSeriesByType=Zb.eachRawSeriesByType=function(e){jb=e},Zb.eachComponent=function(e){"series"===e.mainType&&e.subType&&(jb=e.subType)};var Kb,Qb=zy.darkColor,Jb=Qb.background,ew=function(){return{axisLine:{lineStyle:{color:Qb.axisLine}},splitLine:{lineStyle:{color:Qb.axisSplitLine}},splitArea:{areaStyle:{color:[Qb.backgroundTint,Qb.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:Qb.axisMinorSplitLine}},axisLabel:{color:Qb.axisLabel},axisName:{}}},tw={label:{color:Qb.secondary},itemStyle:{borderColor:Qb.borderTint},dividerLineStyle:{color:Qb.border}},nw={darkMode:!0,color:Qb.theme,backgroundColor:Jb,axisPointer:{lineStyle:{color:Qb.border},crossStyle:{color:Qb.borderShade},label:{color:Qb.tertiary}},legend:{textStyle:{color:Qb.secondary},pageTextStyle:{color:Qb.tertiary}},textStyle:{color:Qb.secondary},title:{textStyle:{color:Qb.primary},subtextStyle:{color:Qb.quaternary}},toolbox:{iconStyle:{borderColor:Qb.accent50},feature:{dataView:{backgroundColor:Jb,textColor:Qb.primary,textareaColor:Qb.background,textareaBorderColor:Qb.border,buttonColor:Qb.accent50,buttonTextColor:Qb.neutral00}}},tooltip:{backgroundColor:Qb.neutral20,defaultBorderColor:Qb.border,textStyle:{color:Qb.tertiary}},dataZoom:{borderColor:Qb.accent10,textStyle:{color:Qb.tertiary},brushStyle:{color:Qb.backgroundTint},handleStyle:{color:Qb.neutral00,borderColor:Qb.accent20},moveHandleStyle:{color:Qb.accent40},emphasis:{handleStyle:{borderColor:Qb.accent50}},dataBackground:{lineStyle:{color:Qb.accent30},areaStyle:{color:Qb.accent20}},selectedDataBackground:{lineStyle:{color:Qb.accent50},areaStyle:{color:Qb.accent30}}},visualMap:{textStyle:{color:Qb.secondary},handleStyle:{borderColor:Qb.neutral30}},timeline:{lineStyle:{color:Qb.accent10},label:{color:Qb.tertiary},controlStyle:{color:Qb.accent30,borderColor:Qb.accent30}},calendar:{itemStyle:{color:Qb.neutral00,borderColor:Qb.neutral20},dayLabel:{color:Qb.tertiary},monthLabel:{color:Qb.secondary},yearLabel:{color:Qb.secondary}},matrix:{x:tw,y:tw,backgroundColor:{borderColor:Qb.axisLine},body:{itemStyle:{borderColor:Qb.borderTint}}},timeAxis:ew(),logAxis:ew(),valueAxis:ew(),categoryAxis:ew(),line:{symbol:"circle"},graph:{color:Qb.theme},gauge:{title:{color:Qb.secondary},axisLine:{lineStyle:{color:[[1,Qb.neutral05]]}},axisLabel:{color:Qb.axisLabel},detail:{color:Qb.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:Qb.background}},radar:(Kb=ew(),Kb.axisName={color:Qb.axisLabel},Kb.axisLine.lineStyle.color=Qb.neutral20,Kb),treemap:{breadcrumb:{itemStyle:{color:Qb.neutral20,textStyle:{color:Qb.secondary}},emphasis:{itemStyle:{color:Qb.neutral30}}}},sunburst:{itemStyle:{borderColor:Qb.background}},map:{itemStyle:{borderColor:Qb.border,areaColor:Qb.neutral10},label:{color:Qb.tertiary},emphasis:{label:{color:Qb.primary},itemStyle:{areaColor:Qb.highlight}},select:{label:{color:Qb.primary},itemStyle:{areaColor:Qb.highlight}}},geo:{itemStyle:{borderColor:Qb.border,areaColor:Qb.neutral10},emphasis:{label:{color:Qb.primary},itemStyle:{areaColor:Qb.highlight}},select:{label:{color:Qb.primary},itemStyle:{color:Qb.highlight}}}};nw.categoryAxis.splitLine.show=!1;var rw=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(da(e)){var i=hd(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};na(e,function(e,i){for(var s=!1,l=0;l<a.length;l++){var u=a[l],c=i.lastIndexOf(u);if(c>0&&c===i.length-u.length){var d=i.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,a,"mainType")&&u(s,a,"subType")&&u(s,a,"index","componentIndex")&&u(s,a,"name")&&u(s,a,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),iw=["symbol","symbolSize","symbolRotate","symbolOffset"],aw=iw.concat(["symbolKeepAspect"]),ow={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},i={},a=!1,o=0;o<iw.length;o++){var s=iw[o],l=e.get(s);ca(l)?(a=!0,i[s]=l):r[s]=l}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(Ki({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),!t.isSeriesFiltered(e)){var u=oa(i);return{dataEach:a?function(t,n){for(var r=e.getRawValue(n),a=e.getDataParams(n),o=0;o<u.length;o++){var s=u[o];t.setItemVisual(n,s,i[s](r,a))}}:null}}}}},sw={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),r=0;r<aw.length;r++){var i=aw[r],a=n.getShallow(i,!0);null!=a&&e.setItemVisual(t,i,a)}}:null}}};function lw(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:"series",subType:"pie"},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s<o.length;s++)if(o[s].seriesIndex===t){var l=e.getData(),u=Hc(l,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:ua(u)?l.getName(u[0]):l.getName(u),selected:da(r)?r:Ki({},r)})}})}function uw(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var cw=new eo,dw={};var hw={};var pw=Yc();function fw(e){return pw(e).prepare}function vw(e){return pw(e).fullUpdate}var gw=Math.round(9*Math.random()),mw="function"==typeof Object.defineProperty,yw=function(){function e(){this._id="__ec_inner_"+gw++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return mw?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}(),_w=Kh.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),xw=Kh.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),bw=Kh.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),l=r-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,d=Math.sin(u),h=Math.cos(u),p=.6*o,f=.7*o;e.moveTo(n-c,l+s),e.arc(n,l,o,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-d*p,l+s+h*p,n,r-f,n,r),e.bezierCurveTo(n,r-f,n-c+d*p,l+s+h*p,n-c,l+s),e.closePath()}}),ww=Kh.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),Sw={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},Cw={};na({line:bv,rect:up,roundRect:up,square:up,circle:Zf,diamond:xw,pin:bw,arrow:ww,triangle:_w},function(e,t){Cw[t]=new e});var kw=Kh.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=ku(e,t,n),i=this.shape;return i&&"pin"===i.symbolType&&"inside"===t.position&&(r.y=n.y+.4*n.height),r},buildPath:function(e,t,n){var r=t.symbolType;if("none"!==r){var i=Cw[r];i||(i=Cw[r="rect"]),Sw[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Mw(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||zy.color.neutral00,n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function Tw(e,t,n,r,i,a,o){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?lg(e.slice(8),new Go(t,n,r,i),o?"center":"cover"):0===e.indexOf("path://")?sg(e.slice(7),{},new Go(t,n,r,i),o?"center":"cover"):new kw({shape:{symbolType:e,x:t,y:n,width:r,height:i}})).__isEmptyBrush=l,s.setColor=Mw,a&&s.setColor(a),s}function Dw(e,t){if(null!=e)return ua(e)||(e=[e,e]),[ic(e[0],t[0])||0,ic(ba(e[1],e[0]),t[1])||0]}function Iw(e){return isFinite(e)}function Aw(e,t,n){for(var r="radial"===t.type?function(e,t,n){var r=n.width,i=n.height,a=Math.min(r,i),o=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(o=o*r+n.x,s=s*i+n.y,l*=a),o=Iw(o)?o:.5,s=Iw(s)?s:.5,l=l>=0&&Iw(l)?l:.5,e.createRadialGradient(o,s,0,o,s,l)}(e,t,n):function(e,t,n){var r=null==t.x?0:t.x,i=null==t.x2?1:t.x2,a=null==t.y?0:t.y,o=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),r=Iw(r)?r:0,i=Iw(i)?i:1,a=Iw(a)?a:0,o=Iw(o)?o:0,e.createLinearGradient(r,a,i,o)}(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function Pw(e){return parseInt(e,10)}function Ow(e,t,n){var r=["width","height"][t],i=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=n[r]&&"auto"!==n[r])return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||Pw(s[r])||Pw(e.style[r]))-(Pw(s[a])||0)-(Pw(s[o])||0)||0}function Rw(e){var t,n,r=e.style,i=r.lineDash&&r.lineWidth>0&&(t=r.lineDash,n=r.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:pa(t)?[t]:ua(t)?t:null:null),a=r.lineDashOffset;if(i){var o=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;o&&1!==o&&(i=ra(i,function(e){return e/o}),a/=o)}return[i,a]}var Lw=new Ah(!0);function zw(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function Nw(e){return"string"==typeof e&&"none"!==e}function Bw(e){var t=e.fill;return null!=t&&"none"!==t}function Fw(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function Ew(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function Vw(e,t,n){var r=Cd(t.image,t.__image,n);if(Md(r)){var i=e.createPattern(r,t.repeat||"repeat");if("function"==typeof DOMMatrix&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Fa),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}var Hw=["shadowBlur","shadowOffsetX","shadowOffsetY"],Yw=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Ww(e,t,n,r,i){var a=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){Uw(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Ud.opacity:o}(r||t.blend!==n.blend)&&(a||(Uw(e,i),a=!0),e.globalCompositeOperation=t.blend||Ud.blend);for(var s=0;s<Hw.length;s++){var l=Hw[s];(r||t[l]!==n[l])&&(a||(Uw(e,i),a=!0),e[l]=e.dpr*(t[l]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||(Uw(e,i),a=!0),e.shadowColor=t.shadowColor||Ud.shadowColor),a}function $w(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=Ww(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||(Uw(e,i),s=!0),Nw(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||(Uw(e,i),s=!0),Nw(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||(Uw(e,i),s=!0),e.globalAlpha=null==a.opacity?1:a.opacity),t.hasStroke()){var l=a.lineWidth/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==l&&(s||(Uw(e,i),s=!0),e.lineWidth=l)}for(var u=0;u<Yw.length;u++){var c=Yw[u],d=c[0];(r||a[d]!==o[d])&&(s||(Uw(e,i),s=!0),e[d]=a[d]||c[1])}return s}function Gw(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function Uw(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function jw(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};Zw(e,t,n),qw(e,n)}function Zw(e,t,n){var r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return t.__dirty&=-2,void(t.__isRendered=!1);var i=t.__clipPaths,a=n.prevElClipPaths,o=t.style,s=!1,l=!1;if(a&&!function(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(i,a)||(a&&(Uw(e,n),e.restore(),l=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(Uw(e,n),e.save(),function(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r=r||a.isZeroArea(),Gw(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}(i,e,n),s=!0,n.prevElClipPaths=i)),n.allClipped)return t.__dirty&=-2,void(t.__isRendered=!1);t.beforeBrush&&t.beforeBrush(n.beforeBrushParam),t.innerBeforeBrush();var u=n.prevEl;u||(l=s=!0);var c,d,h=t instanceof Kh&&t.autoBatch&&function(e){var t=Bw(e),n=zw(e);return!(e.lineDash||!(+t^+n)||t&&"string"!=typeof e.fill||n&&"string"!=typeof e.stroke||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}(o);s||(c=r,d=u.transform,c&&d?c[0]!==d[0]||c[1]!==d[1]||c[2]!==d[2]||c[3]!==d[3]||c[4]!==d[4]||c[5]!==d[5]:c||d)?(Uw(e,n),Gw(e,t)):h||Uw(e,n),t instanceof Kh?(1!==n.lastDrawType&&(l=!0,n.lastDrawType=1),$w(e,t,u,l,n),h&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,r,i){var a,o=zw(n),s=Bw(n),l=n.strokePercent,u=l<1,c=!t.path;t.silent&&!u||!c||t.createPathProxy();var d=t.path||Lw,h=t.__dirty;if(!r){var p=n.fill,f=n.stroke,v=s&&!!p.colorStops,g=o&&!!f.colorStops,m=s&&!!p.image,y=o&&!!f.image,_=void 0,x=void 0,b=void 0,w=void 0,S=void 0;(v||g)&&(S=t.getBoundingRect()),v&&(_=h?Aw(e,p,S):t.__canvasFillGradient,t.__canvasFillGradient=_),g&&(x=h?Aw(e,f,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),m&&(b=h||!t.__canvasFillPattern?Vw(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=b),y&&(w=h||!t.__canvasStrokePattern?Vw(e,f,t):t.__canvasStrokePattern,t.__canvasStrokePattern=w),v?e.fillStyle=_:m&&(b?e.fillStyle=b:s=!1),g?e.strokeStyle=x:y&&(w?e.strokeStyle=w:o=!1)}var C,k,M=t.getGlobalScale();d.setScale(M[0],M[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(C=(a=Rw(t))[0],k=a[1]);var T=!0;(c||4&h)&&(d.setDPR(e.dpr),u?d.setContext(null):(d.setContext(e),T=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),T&&d.rebuildPath(e,u?l:1),C&&(e.setLineDash(C),e.lineDashOffset=k),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&Ew(e,n),s&&Fw(e,n)):(s&&Fw(e,n),o&&Ew(e,n)),C&&e.setLineDash([])}(e,t,o,h,n)):t instanceof Jh?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),$w(e,t,u,l,n),function(e,t,n){var r,i=n.text;if(null!=i&&(i+=""),i){e.font=n.font||"12px sans-serif",e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(a=(r=Rw(t))[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(zw(n)&&e.strokeText(i,n.x,n.y),Bw(n)&&e.fillText(i,n.x,n.y)):(Bw(n)&&e.fillText(i,n.x,n.y),zw(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}(e,t,o)):t instanceof np?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(e,t,n,r,i){Ww(e,t.style,n&&n.style,r,i)}(e,t,u,l,n),function(e,t,n){var r=t.__image=Cd(n.image,t.__image,t,t.onload);if(r&&Md(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),l=r.width/r.height;if(null==o&&null!=s?o=s*l:null==s&&null!=o?s=o/l:null==o&&null==s&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;e.drawImage(r,u,c,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var d=o-(u=n.sx),h=s-(c=n.sy);e.drawImage(r,u,c,d,h,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}(e,t,o)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var a,o,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover,beforeBrushParam:{}};for(a=t.getCursor(),o=r.length;a<o;a++){(c=r[a]).beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),Zw(e,c,s),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}qw(e,s);for(var l=0,u=i.length;l<u;l++){var c;(c=i[l]).beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),Zw(e,c,s),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}qw(e,s),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(h&&Uw(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function qw(e,t){Uw(e,t),t.prevElClipPaths&&e.restore()}var Xw=new yw,Kw=new qs(100),Qw=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Jw(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i="svg"===r.painter.type;e.dirty&&Xw.delete(e);var a=Xw.get(e);if(a)return a;var o=Qi(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===o.backgroundColor&&(o.backgroundColor=null);var s={repeat:"repeat"};return function(e){for(var t,a=[n],s=!0,l=0;l<Qw.length;++l){var u=o[Qw[l]];if(null!=u&&!ua(u)&&!da(u)&&!pa(u)&&"boolean"!=typeof u){s=!1;break}a.push(u)}if(s){t=a.join(",")+(i?"-svg":"");var c=Kw.get(t);c&&(i?e.svgElement=c:e.image=c)}var d,h=tS(o.dashArrayX),p=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(pa(e)){var t=Math.ceil(e);return[t,t]}var n=ra(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}(o.dashArrayY),f=eS(o.symbol),v=(x=h,ra(x,function(e){return nS(e)})),g=nS(p),m=!i&&Ri.createCanvas(),y=i&&{tag:"g",attrs:{},key:"dcl",children:[]},_=function(){for(var e=1,t=0,n=v.length;t<n;++t)e=wc(e,v[t]);var r=1;for(t=0,n=f.length;t<n;++t)r=wc(r,f[t].length);e*=r;var i=g*v.length*f.length;return{width:Math.max(1,Math.min(e,o.maxTileWidth)),height:Math.max(1,Math.min(i,o.maxTileHeight))}}();var x;m&&(m.width=_.width*n,m.height=_.height*n,d=m.getContext("2d"));(function(){d&&(d.clearRect(0,0,m.width,m.height),o.backgroundColor&&(d.fillStyle=o.backgroundColor,d.fillRect(0,0,m.width,m.height)));for(var e=0,t=0;t<p.length;++t)e+=p[t];if(e<=0)return;var a=-g,s=0,l=0,u=0;for(;a<_.height;){if(s%2==0){for(var c=l/2%f.length,v=0,x=0,b=0;v<2*_.width;){var w=0;for(t=0;t<h[u].length;++t)w+=h[u][t];if(w<=0)break;if(x%2==0){var S=.5*(1-o.symbolSize),C=v+h[u][x]*S,k=a+p[s]*S,M=h[u][x]*o.symbolSize,T=p[s]*o.symbolSize,D=b/2%f[c].length;I(C,k,M,T,f[c][D])}v+=h[u][x],++b,++x===h[u].length&&(x=0)}++u===h.length&&(u=0)}a+=p[s],++l,++s===p.length&&(s=0)}function I(e,t,a,s,l){var u=i?1:n,c=Tw(l,e*u,t*u,a*u,s*u,o.color,o.symbolKeepAspect);if(i){var h=r.painter.renderOneToVNode(c);h&&y.children.push(h)}else jw(d,c)}})(),s&&Kw.put(t,m||y);e.image=m,e.svgElement=y,e.svgWidth=_.width,e.svgHeight=_.height}(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/n,Xw.set(e,s),e.dirty=!1,s}function eS(e){if(!e||0===e.length)return[["rect"]];if(da(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!da(e[n])){t=!1;break}if(t)return eS([e]);var r=[];for(n=0;n<e.length;++n)da(e[n])?r.push([e[n]]):r.push(e[n]);return r}function tS(e){if(!e||0===e.length)return[[0,0]];if(pa(e))return[[i=Math.ceil(e),i]];for(var t=!0,n=0;n<e.length;++n)if(!pa(e[n])){t=!1;break}if(t)return tS([e]);var r=[];for(n=0;n<e.length;++n)if(pa(e[n])){var i=Math.ceil(e[n]);r.push([i,i])}else{(i=ra(e[n],function(e){return Math.ceil(e)})).length%2==1?r.push(i.concat(i)):r.push(i)}return r}function nS(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var rS=ud(function(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=Jw(n,t))});var i=r.getVisual("decal");if(i)r.getVisual("style").decal=Jw(i,t)}})});var iS=2e3,aS=4500,oS={PROCESSOR:{SERIES_FILTER:800,AXIS_STATISTICS:920,FILTER:1e3,STATISTIC:5e3,STATISTICS:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:iS,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:aS,ARIA:6e3,DECAL:7e3}},sS="__flagInMainProcess",lS="__mainProcessVersion",uS="__pendingUpdate",cS="__needsUpdateStatus",dS=/^[a-zA-Z0-9_]+$/,hS="__connectUpdateStatus";function pS(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return vS(this,e,t);this.id}}function fS(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return vS(this,e,t)}}function vS(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),eo.prototype[t].apply(e,n)}var gS,mS,yS,_S,xS,bS,wS,SS,CS,kS,MS,TS,DS,IS,AS,PS,OS,RS,LS,zS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ti(t,e),t}(eo),NS=zS.prototype;NS.on=fS("on"),NS.off=fS("off");var BS=function(e){function t(t,n,r){var i=e.call(this,new rw)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},i.__v_skip=!0,i._dom=t;i[lS]=1,r.ssr&&function(e){var t=kp(e),n=t.dataIndex;if(null!=n){var r=Ra();return r.set("series_index",t.seriesIndex),r.set("data_index",n),t.ssrType&&r.set("ssr_type",t.ssrType),r}};var a=i._zr=$u(t,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:ba(r.useDirtyRect,!1),useCoarsePointer:ba(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=Sb(sa(a.flush,a),17),i._updateTheme(n),i._locale=function(e){if(da(e)){var t=bm[e.toUpperCase()]||{};return e===ym||e===_m?qi(t):Xi(qi(t),qi(bm[xm]),!1)}return Xi(qi(e),qi(bm[xm]),!1)}(r.locale||Sm),i._coordSysMgr=new my;var o=i._api=AS(i);function s(e,t){return e.__prio-t.__prio}return vs(GS,s),vs(WS,s),i._scheduler=new Nb(i,o,WS,GS),i._messageCenter=new zS,i._initEvents(),i.resize=sa(i.resize,i),a.animation.on("frame",i._onframe,i),kS(a,i),MS(a,i),Da(i),i}return Ti(t,e),t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(RS(this),this[uS]){var r=this[uS].silent;this[sS]=!0,LS(this);try{gS(this),_S.update.call(this,null,this[uS].updateParams)}catch(sv){throw this[sS]=!1,this[uS]=null,sv}this._zr.flush(),this[sS]=!1,this[uS]=null,SS.call(this,r),CS.call(this,r)}else if(e.unfinished){var i=1;do{e.unfinished=!1;var a=Ri.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),bS(this,t),e.performVisualTasks(t),IS(this,this._model,n,"remain",{}),i-=Ri.getTime()-a}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[sS])if(this._disposed)this.id;else{var r,i,a;if(fa(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[sS]=!0,LS(this),!this._model||t){var o=new u_(this._api),s=this._theme,l=this._model=new i_;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},$S);var u={seriesTransition:a,optionChanged:!0};if(n)this[uS]={silent:r,updateParams:u},this[sS]=!1,this.getZr().wakeUp();else{try{gS(this),_S.update.call(this,null,u)}catch(sv){throw this[uS]=null,this[sS]=!1,sv}this._ssr||this._zr.flush(),this[uS]=null,this[sS]=!1,SS.call(this,r),CS.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[sS])if(this._disposed)this.id;else{var n=this._model;if(n){var r=t&&t.silent,i=null;this[uS]&&(null==r&&(r=this[uS].silent),i=this[uS].updateParams,this[uS]=null),this[sS]=!0,LS(this);try{this._updateTheme(e),n.setTheme(this._theme),gS(this),_S.update.call(this,{type:"setTheme"},i)}catch(sv){throw this[sS]=!1,sv}this[sS]=!1,SS.call(this,r),CS.call(this,r)}}},t.prototype._updateTheme=function(e){da(e)&&(e=US[e]),e&&((e=qi(e))&&A_(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ii.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return na(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,r=[],i=this;na(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return na(r,function(e){e.group.ignore=!1}),a}this.id},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,i=Math.max,a=1/0;if(qS[n]){var o=a,s=a,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();na(ZS,function(a,d){if(a.group===n){var h=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(qi(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),l=i(p.right,l),u=i(p.bottom,u),c.push({dom:h,left:p.left,top:p.top})}});var h=(l*=d)-(o*=d),p=(u*=d)-(s*=d),f=Ri.createCanvas(),v=$u(f,{renderer:t?"svg":"canvas"});if(v.resize({width:h,height:p}),t){var g="";return na(c,function(e){var t=e.left-o,n=e.top-s;g+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"}),v.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&v.painter.setBackgroundColor(e.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return e.connectedBackgroundColor&&v.add(new up({shape:{x:0,y:0,width:h,height:p},style:{fill:e.connectedBackgroundColor}})),na(c,function(e){var t=new np({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});v.add(t)}),v.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}this.id},t.prototype.convertToPixel=function(e,t,n){return xS(this,"convertToPixel",e,t,n)},t.prototype.convertToLayout=function(e,t,n){return xS(this,"convertToLayout",e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return xS(this,"convertFromPixel",e,t,n)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return na($c(this._model,e),function(e,r){r.indexOf("Models")>=0&&na(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(t);else if("seriesModels"===r){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(n=n||a.containPoint(t,e))}},this)},this),!!n;this.id},t.prototype.getVisual=function(e,t){var n=$c(this._model,e,{defaultMainType:"series"}),r=n.seriesModel.getData(),i=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=i?function(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n)}}(r,i,t):function(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;na(ES,function(t){var n=function(n){var r,i=e.getModel(),a=n.target;if("globalout"===t?r={}:a&&uw(a,function(e){var t=kp(e);if(t&&null!=t.dataIndex){var n=t.dataModel||i.getSeriesByIndex(t.seriesIndex);return r=n&&n.getDataParams(t.dataIndex,t.dataType,a)||{},!0}if(t.eventData)return r=Ki({},t.eventData),!0},!0),r){var o=r.componentType,s=r.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",s=r.seriesIndex);var l=o&&null!=s&&i.getComponent(o,s),u=l&&e["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];r.event=n,r.type=t,e._$eventProcessor.eventInfo={targetEl:a,packedEvent:r,model:l,view:u},e.trigger(t,r)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;na(YS,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),function(e,t,n){e.on("selectchanged",function(e){var r=n.getModel();e.isFromClick?(lw("map","selectchanged",t,r,e),lw("pie","selectchanged",t,r,e)):"select"===e.fromAction?(lw("map","selected",t,r,e),lw("pie","selected",t,r,e)):"unselect"===e.fromAction&&(lw("map","unselected",t,r,e),lw("pie","unselected",t,r,e))})}(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&qc(this.getDom(),KS,"");var e=this,t=e._api,n=e._model;na(e._componentsViews,function(e){e.dispose(n,t)}),na(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete ZS[e.id]}},t.prototype.resize=function(e){if(!this[sS])if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this[uS]&&(null==r&&(r=this[uS].silent),n=!0,this[uS]=null),this[sS]=!0,LS(this);try{n&&gS(this),_S.update.call(this,{type:"resize",animation:Ki({duration:0},e&&e.animation)})}catch(sv){throw this[sS]=!1,sv}this[sS]=!1,SS.call(this,r),CS.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(fa(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),jS[e]){var n=jS[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=Ki({},e);return t.type=HS[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(fa(t)||(t={silent:!!t}),VS[e.type]&&this._model)if(this[sS])this._pendingActions.push(e);else{var n=t.silent;wS.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&Ii.browser.weChat&&this._throttledZrFlush(),SS.call(this,n),CS.call(this,n)}},t.prototype.updateLabelLayout=function(){cw.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function t(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];"emphasis"!==i&&"blur"!==i&&"select"!==i&&t.push(i)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=Ng(e);t.eachRendered(function(e){return Fg(e,n.z,n.zlevel),!0})}}function r(e,t){t.eachRendered(function(e){if(!jv(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}})}function i(e,n){var r=e.getModel("stateAnimation"),i=e.isAnimationEnabled(),a=r.get("duration"),o=a>0?{duration:a,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered(function(e){if(e.states&&e.states.emphasis){if(jv(e))return;if(e instanceof Kh&&function(e){var t=Bp(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(i){e.stateTransition=o;var r=e.getTextContent(),a=e.getTextGuideLine();r&&(r.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&t(e)}})}gS=function(e){var t;t=e._model,pw(t).prepare={};var n=e._scheduler;n.restorePipelines(e._zr,e._model),n.prepareStageTasks(),mS(e,!0),mS(e,!1),n.plan()},mS=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,l=0;l<i.length;l++)i[l].__alive=!1;function u(e){var l=e.__requireNewView;e.__requireNewView=!1;var u="_ec_"+e.id+"_"+e.type,c=!l&&a[u];if(!c){var d=hd(e.type);(c=new(t?cb.getClass(d.main,d.sub):fb.getClass(d.sub))).init(n,s),a[u]=c,i.push(c),o.add(c.group)}e.__viewId=c.__id=u,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(c,e,n,s)}t?n.eachComponent(function(e,t){"series"!==e&&u(t)}):n.eachSeries(u);for(l=0;l<i.length;){var c=i[l];c.__alive?l++:(!t&&c.renderTask.dispose(),o.remove(c.group),c.dispose(n,s),i.splice(l,1),a[c.__id]===c&&delete a[c.__id],c.__id=c.group.__ecComponentInfo=null)}},yS=function(e,t,n,r,i){var a=e._model;if(a.setUpdatePayload(n),r){var o,s=function(e,t,n){var r={};r[t+"Id"]=e[t+"Id"],r[t+"Index"]=e[t+"Index"],r[t+"Name"]=e[t+"Name"];var i={mainType:t,query:r};return n&&(i.subType=n),i}(n,r,i),l=n.excludeSeriesId;null!=l&&(o=Ra(),na(Ac(l),function(e){var t=Fc(e,null);null!=t&&o.set(t,!0)})),a&&a.eachComponent(s,function(t){if(!o||null==o.get(t.id))if(If(n))if(t instanceof nb)"highlight"!==n.type||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=Hc(i,t);a=(ua(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=kp(o);gf(r,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&gf(r,c,d,n)}}}(t,n,e._api);else{var r=yf(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;"highlight"===n.type&&i&&!n.notBlur&&mf(t.mainType,t.componentIndex,e._api),a&&na(a,function(e){"highlight"===n.type?uf(e):cf(e)})}else Df(n)&&t instanceof nb&&(!function(e,t){if(Df(t)){var n=t.dataType,r=Hc(e.getData(n),t);ua(r)||(r=[r]),e["toggleSelect"===t.type?"toggleSelect":"select"===t.type?"select":"unselect"](r,n)}}(t,n,e._api),_f(t),OS(e))},e),a&&a.eachComponent(s,function(t){o&&null!=o.get(t.id)||u(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else na([].concat(e._componentsViews).concat(e._chartsViews),u);function u(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}},_S={prepareAndUpdate:function(e){gS(this),_S.update.call(this,e,e&&{optionChanged:null!=e.newOption})},update:function(t,n){var r=this._model,i=this._api,a=this._zr,o=this._coordSysMgr,s=this._scheduler;if(r){!function(e){pw(e).fullUpdate={}}(r),r.setUpdatePayload(t),s.restoreData(r,t),s.performSeriesTasks(r),o.create(r,i),cw.trigger("coordsys:aftercreate",r,i),s.performDataProcessorTasks(r,t),bS(this,r),o.update(r,i),e(r),s.performVisualTasks(r,t);var l=r.get("backgroundColor")||"transparent";a.setBackgroundColor(l);var u=r.get("darkMode");null!=u&&"auto"!==u&&a.setDarkMode(u),TS(this,r,i,t,n),cw.trigger("afterupdate",r,i)}},updateTransform:function(e){var t=this,n=t._model,r=t._api;if(n){n.setUpdatePayload(e);var i=[];n.eachComponent(function(a,o){if("series"!==a){var s=t.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,n,r,e);l&&l.update&&i.push(s)}else i.push(s)}});var a=Ra();n.eachSeries(function(i){var o=t._chartsMap[i.__viewId],s=i.pipelineContext;if(o.updateTransform&&!s.progressiveRender){var l=o.updateTransform(i,n,r,e);l&&l.update&&a.set(i.uid,1)}else a.set(i.uid,1)}),t._scheduler.performVisualTasks(n,e,{setDirty:!0,dirtyMap:a}),IS(t,n,r,e,{},a),cw.trigger("afterupdate",n,r)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),fb.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),TS(this,n,this._api,t,{}),cw.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,r=this._model;r&&(r.setUpdatePayload(t),r.eachSeries(function(e){e.getData().clearAllVisual()}),fb.markUpdateMethod(t,"updateVisual"),e(r),this._scheduler.performVisualTasks(r,t,{visualType:"visual",setDirty:!0}),r.eachComponent(function(e,i){if("series"!==e){var a=n.getViewOfComponentModel(i);a&&a.__alive&&a.updateVisual(i,r,n._api,t)}}),r.eachSeries(function(e){n._chartsMap[e.__viewId].updateVisual(e,r,n._api,t)}),cw.trigger("afterupdate",r,this._api))},updateLayout:function(e){_S.update.call(this,e)}},xS=function(e,t,n,r,i){if(e._disposed)e.id;else for(var a,o=e._model,s=e._coordSysMgr.getCoordinateSystems(),l=$c(o,n),u=0;u<s.length;u++){var c=s[u];if(c[t]&&null!=(a=c[t](o,l,r,i)))return a}},bS=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},wS=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=VS[i],s=(o.update||"update").split(":"),l=s.pop(),u=null!=s[0]&&hd(s[0]);this[sS]=!0,LS(this);var c=[e],d=!1;e.batch&&(d=!0,c=ra(e.batch,function(t){return(t=Qi(Ki({},t),e)).batch=null,t}));var h,p=[],f=[],v=o.nonRefinedEventType,g=Df(e),m=If(e);if(m&&vf(this._api),na(c,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?f.push(i):h=i,(h=h||Ki({},t)).type=v,p.push(h),m){var a=Gc(e),s=a.queryOptionMap,c=a.mainTypeSpecified?s.keys()[0]:"series";yS(n,l,t,c),OS(n)}else g?(yS(n,l,t,"series"),OS(n)):u&&yS(n,l,t,u.main,u.sub)}),"none"!==l&&!m&&!g&&!u)try{this[uS]?(gS(this),_S.update.call(this,e),this[uS]=null):_S[l].call(this,e)}catch(sv){throw this[sS]=!1,sv}if(h=d?{type:v,escapeConnect:a,batch:p}:p[0],this[sS]=!1,!t){var y=void 0;if(o.refineEvent){var _=o.refineEvent(f,e,r,this._api).eventContent;ka(fa(_)),(y=Qi({type:o.refinedEventType},_)).fromAction=e.type,y.fromActionPayload=e,y.escapeConnect=!0}var x=this._messageCenter;x.trigger(h.type,h),y&&x.trigger(y.type,y)}},SS=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();wS.call(this,n,e)}},CS=function(e){!e&&this.trigger("updated")},kS=function(e,t){e.on("rendered",function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[uS]||t._scheduler.unfinished||t._pendingActions.length?e.refresh():t.trigger("finished")})},MS=function(e,t){e.on("mouseover",function(e){var n=uw(e.target,Tf);n&&(!function(e,t,n){var r=kp(e),i=yf(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&mf(r.componentMainType,r.componentIndex,n),na(a,function(e){return sf(e,t)})):(gf(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&mf(r.componentMainType,r.componentIndex,n),sf(e,t))}(n,e,t._api),OS(t))}).on("mouseout",function(e){var n=uw(e.target,Tf);n&&(!function(e,t,n){vf(n);var r=kp(e),i=yf(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?na(i,function(e){return lf(e,t)}):lf(e,t)}(n,e,t._api),OS(t))}).on("click",function(e){var n=uw(e.target,function(e){return null!=kp(e).dataIndex},!0);if(n){var r=n.selected?"unselect":"select",i=kp(n);t._api.dispatchAction({type:r,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}})},TS=function(e,t,n,r,i){!function(e){var t=[],n=[],r=!1;if(e.eachComponent(function(e,i){var a=i.get("zlevel")||0,o=i.get("z")||0,s=i.getZLevelKey();r=r||!!s,("series"===e?n:t).push({zlevel:a,z:o,idx:i.componentIndex,type:e,key:s})}),r){var i,a,o=t.concat(n);vs(o,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),na(o,function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,o=t.key;null!=i&&(r=Math.max(i,r)),o?(r===i&&o!==a&&r++,a=o):a&&(r===i&&r++,a=""),i=r,n.setZLevel(r)})}}(t),DS(e,t,n,r,i),na(e._chartsViews,function(e){e.__alive=!1}),IS(e,t,n,r,i),na(e._chartsViews,function(e){e.__alive||e.remove(t,n)})},DS=function(e,t,a,o,s,l){na(l||e._componentsViews,function(e){var s=e.__model;r(s,e),e.render(s,t,a,o),n(s,e),i(s,e)})},IS=function(e,t,a,o,s,l){var u=e._scheduler;s=Ki(s||{},{updatedSeries:t.getSeries()}),cw.trigger("series:beforeupdate",t,a,s);var c=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var i=n.renderTask;u.updatePayload(i,o),r(t,n),l&&l.get(t.uid)&&i.dirty(),i.perform(u.getPerformArgs(i))&&(c=!0),n.group.silent=!!t.get("silent"),function(e,t){var n=e.get("blendMode")||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}(t,n),_f(t)}),u.unfinished=c||u.unfinished,cw.trigger("series:layoutlabels",t,a,s),cw.trigger("series:transition",t,a,s),t.eachSeries(function(t){var r=e._chartsMap[t.__viewId];n(t,r),i(t,r)}),function(e,t){var n=e._zr;if("canvas"!==n.painter.type)return;var r=n.storage,i=0;r.traverse(function(e){e.isGroup||i++});var a=i>ba(t.get("hoverLayerThreshold"),Wy.hoverLayerThreshold)&&!Ii.node&&!Ii.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&2!==t.hoverLayer&&(t.hoverLayer=a?1:0)})}}),e._usingTHL=a)}(e,t),cw.trigger("series:afterupdate",t,a,s)},OS=function(e){e[cS]=!0,e.getZr().wakeUp()},LS=function(e){e[lS]=(e[lS]+1)%1e6},RS=function(e){e[cS]&&(e.getZr().storage.traverse(function(e){jv(e)||t(e)}),e[cS]=!1)},AS=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Ti(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){uf(t,n),OS(e)},n.prototype.leaveEmphasis=function(t,n){cf(t,n),OS(e)},n.prototype.enterBlur=function(t){!function(e){nf(e,Kp)}(t),OS(e)},n.prototype.leaveBlur=function(t){df(t),OS(e)},n.prototype.enterSelect=function(t){hf(t),OS(e)},n.prototype.leaveSelect=function(t){pf(t),OS(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[lS]},n.prototype.usingTHL=function(){return e._usingTHL},n}(Lp))(e)},PS=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][hS]=t}}na(HS,function(n,r){e._messageCenter.on(r,function(n){if(qS[e.group]&&0!==e[hS]){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];na(ZS,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,0),na(i,function(e){1!==e[hS]&&e.dispatchAction(r)}),t(i,2)}})})}}(),t}(eo),FS=BS.prototype;FS.on=pS("on"),FS.off=pS("off"),FS.one=function(e,t,n){var r=this;this.on.call(this,e,function n(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];t&&t.apply&&t.apply(this,i),r.off(e,n)},n)};var ES=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"],VS={},HS={},YS={},WS=[],$S=[],GS=[],US={},jS={},ZS={},qS={},XS=+new Date-0,KS="_echarts_instance_";function QS(e,t,n){var r=!(n&&n.ssr);if(r){var i=function(e){return ZS[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,KS)]}(e);if(i)return i}var a=new BS(e,t,n);return a.id="ec_"+XS++,ZS[a.id]=a,r&&qc(e,KS,a.id),PS(a),cw.trigger("afterinit",a),a}function JS(e,t){US[e]=t}function eC(e){Ji($S,e)<0&&$S.push(e)}function tC(e,t){oC(WS,e,t,2e3)}function nC(e,t){cw.on(e,t)}function rC(e,t,n){var r,i,a,o,s;function l(e){return e.toLowerCase()}ca(t)&&(n=t,t=""),fa(e)?(r=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,n||(n=e.action),a=e.refineEvent):(r=e,i=t),i=l(i||r);var u=a?l(r):i;VS[r]||(ka(dS.test(r)&&dS.test(i)),a&&ka(i!==r),VS[r]={actionType:r,refinedEventType:i,nonRefinedEventType:u,update:o,action:n,refineEvent:a},YS[i]=1,a&&s&&(YS[u]=1),HS[u]=r)}function iC(e,t){oC(GS,e,t,3e3,"visual",!0)}var aC=[];function oC(e,t,n,r,i,a){if((ca(t)||fa(t))&&(n=t,t=r),!(Ji(aC,n)>=0)){aC.push(n);var o=Nb.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function sC(e,t){jS[e]=t}var lC=function(e){var t=(e=qi(e)).type;t||Tc("");var n=t.split(":");2!==n.length&&Tc("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,bx.set(t,e)};function uC(e,t,n,r){return{eventContent:{selected:xf(n),isFromClick:t.isFromClick||!1}}}function cC(e){return null==e?0:e.length||1}function dC(e){return e}iC(iS,Pb),iC(aS,Rb),iC(aS,Lb),iC(iS,ow),iC(aS,sw),iC(7e3,rS),eC(A_),tC(900,P_),sC("default",function(e,t){Qi(t=t||{},{text:"loading",textColor:zy.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:zy.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Vu,r=new up({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i,a=new pp({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),o=new up({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(o),t.showSpinner&&((i=new Tv({shape:{startAngle:-zb/2,endAngle:-zb/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*zb/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*zb/2}).delay(300).start("circularInOut"),n.add(i)),n.resize=function(){var n=a.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&i.setShape({cx:l,cy:u}),o.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}),rC({type:Hp,event:Hp,update:Hp},Ba),rC({type:Yp,event:Yp,update:Yp},Ba),rC({type:Wp,event:Up,update:Wp,action:Ba,refineEvent:uC,publishNonRefinedEvent:!0}),rC({type:$p,event:Up,update:$p,action:Ba,refineEvent:uC,publishNonRefinedEvent:!0}),rC({type:Gp,event:Up,update:Gp,action:Ba,refineEvent:uC,publishNonRefinedEvent:!0}),JS("default",{}),JS("dark",nw);var hC=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||dC,this._newKeyGetter=r||dC,this.context=i,this._diffModeMultiple="multiple"===a}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var a=0;a<e.length;a++){var o=r[a],s=n[o],l=cC(s);if(l>1){var u=s.shift();1===s.length&&(n[o]=s[0]),this._update&&this._update(u,a)}else 1===l?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,r,a,"_newKeyGetter");for(var o=0;o<i.length;o++){var s=i[o],l=n[s],u=r[s],c=cC(l),d=cC(u);if(c>1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),r[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var h=0;h<c;h++)this._remove&&this._remove(l[h]);else this._remove&&this._remove(l)}this._performRestAdd(a,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],a=cC(i);if(a>1)for(var o=0;o<a;o++)this._add&&this._add(i[o]);else 1===a&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,a=0;a<e.length;a++){var o="_ec_"+this[r](e[a],a);if(i||(n[a]=o),t){var s=t[o],l=cC(s);0===l?(t[o]=a,i&&n.push(o)):1===l?t[o]=[s,a]:s.push(a)}}},e}(),pC=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function fC(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var vC=function(e){this.otherDims={},null!=e&&Ki(this,e)},gC=Yc(),mC={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},yC=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=bC(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return ba(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=G_(this.source),n=!wC(e),r="",i=[],a=0,o=0;a<e;a++){var s=void 0,l=void 0,u=void 0,c=this.dimensions[o];if(c&&c.storeDimIndex===a)s=t?c.name:null,l=c.type,u=c.ordinalMeta,o++;else{var d=this.getSourceDimension(a);d&&(s=t?d.name:null,l=d.type)}i.push({property:s,type:l,ordinalMeta:u}),!t||null==s||c&&c.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=mC[l]||"f",u&&(r+=u.uid),r+="$"}var h=this.source;return{dimensions:i,hash:[h.seriesLayoutBy,h.startIndex,r].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var a=this.getSourceDimension(t);a&&(r=a.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function _C(e){return e instanceof yC}function xC(e){for(var t=Ra(),n=0;n<(e||[]).length;n++){var r=e[n],i=fa(r)?r.name:r;null!=i&&null==t.get(i)&&t.set(i,n)}return t}function bC(e){var t=gC(e);return t.dimNameMap||(t.dimNameMap=xC(e.dimensionsDefine))}function wC(e){return e>30}var SC,CC,kC,MC,TC,DC,IC,AC=fa,PC=ra,OC="undefined"==typeof Int32Array?Array:Int32Array,RC=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],LC=["_approximateExtent"],zC=function(){function e(e,t){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var r=!1;_C(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var i={},a=[],o={},s=!1,l={},u=0;u<n.length;u++){var c=n[u],d=da(c)?new vC({name:c}):c instanceof vC?c:new vC(c),h=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=h,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};a.push(h),i[h]=d,null!=l[h]&&(s=!0),d.createInvertedIndices&&(o[h]=[]),r&&(d.storeDimIndex=u),0===p.itemName&&(this._nameDimIdx=d.storeDimIndex),0===p.itemId&&(this._idDimIdx=d.storeDimIndex)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var f=this._dimIdxToName=Ra();na(a,function(e){f.set(i[e].storeDimIndex,e)})}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var r=this._schema.getSourceDimension(t);return r?r.name:void 0},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(pa(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r,i=this;if(e instanceof Lx&&(r=e),!r){var a=this.dimensions,o=E_(e)||ta(e)?new U_(e,a.length):e;r=new Lx;var s=PC(a,function(e){return{type:i._dimInfos[e].type,property:e}});r.initData(o,s,n)}this._store=r,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(e,t){var n={},r=n.encode={},i=Ra(),a=[],o=[],s={};na(e.dimensions,function(t){var n,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;fC(r,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(n=l.type)&&"time"!==n&&(a[0]=t),fC(s,u)[c]=e.getDimensionIndex(l.name)),l.defaultTooltip&&o.push(t)}Mp.each(function(e,t){var n=fC(r,t),i=l.otherDims[t];null!=i&&!1!==i&&(n[i]=l.name)})});var l=[],u={};i.each(function(e,t){var n=r[t];u[t]=n[0],l=l.concat(n)}),n.dataDimsOnCoord=l,n.dataDimIndicesOnCoord=ra(l,function(t){return e.getDimensionInfo(t).storeDimIndex}),n.encodeFirstDimNotExtra=u;var c=r.label;c&&c.length&&(a=c.slice());var d=r.tooltip;return d&&d.length?o=d.slice():o.length||(o=a.slice()),r.defaultedLabel=a,r.defaultedTooltip=o,n.userOutput=new pC(s,t),n}(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),r=n.start,i=n.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=r;o<i;o++){var s=o-r;this._nameList[o]=t[s],a&&IC(this,o)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&"typedArray"!==e.getSource().sourceFormat&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if("original"===n.getSource().sourceFormat&&!n.pure)for(var a=[],o=e;o<t;o++){var s=n.getItem(o,a);if(!this.hasItemOption&&Lc(s)&&(this.hasItemOption=!0),s){var l=s.name;null==r[o]&&null!=l&&(r[o]=Fc(l,null));var u=s.id;null==i[o]&&null!=u&&(i[o]=Fc(u,null))}}if(this._shouldMakeIdFromName())for(o=e;o<t;o++)IC(this,o);SC(this)}},e.prototype.getApproximateExtent=function(e,t){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e),t)},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){AC(e)?Ki(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=kC(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return CC(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e),null)},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return ua(e)?r.getValues(PC(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],r=n&&n[t];return null==r||isNaN(r)?-1:r},e.prototype.each=function(e,t,n){ca(e)&&(n=t,t=e,e=[]);var r=n||this,i=PC(MC(e),this._getStoreDimIndex,this);this._store.each(i,r?sa(t,r):t)},e.prototype.filterSelf=function(e,t,n){ca(e)&&(n=t,t=e,e=[]);var r=n||this,i=PC(MC(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?sa(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=oa(e),i=[];return na(r,function(r){var a=t._getStoreDimIndex(r);n[a]=e[r],i.push(a)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){ca(e)&&(n=t,t=e,e=[]),n=n||this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,a=PC(MC(e),this._getStoreDimIndex,this),o=DC(this);return o._store=this._store.map(a,i?sa(t,i):t),o},e.prototype.modify=function(e,t,n,r){var i=n||r||this,a=PC(MC(e),this._getStoreDimIndex,this);this._store.modify(a,i?sa(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=DC(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=DC(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=DC(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new fm(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new hC(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return CC(e,t)},function(e){return CC(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},AC(e)?Ki(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],r=n&&n[t];return null==r?this.getVisual(t):r},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var i=r[t];return null==i&&(ua(i=this.getVisual(t))?i=i.slice():AC(i)&&(i=Ki({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,AC(t)?Ki(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){AC(e)?Ki(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?Ki(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){!function(e,t,n,r){if(r){var i=kp(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType="chart","group"===r.type&&r.traverse(function(r){var i=kp(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType="chart"})}}(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){na(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:PC(this.dimensions,this._getDimInfo,this),this.hostModel)),TC(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];ca(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Sa(arguments)))})},e.internalField=(SC=function(e){var t=e._invertedIndicesMap;na(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new OC(a.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},kC=function(e,t,n){return Fc(e._getCategory(t,n),null)},CC=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=kC(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},MC=function(e){return ua(e)||(e=null!=e?[e]:[]),e},DC=function(t){var n=new e(t._schema?t._schema:PC(t.dimensions,t._getDimInfo,t),t.hostModel);return TC(n,t),n},TC=function(e,t){na(RC.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,na(LC,function(n){e[n]=qi(t[n])}),e._calculationInfo=Ki({},t._calculationInfo)},void(IC=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,a=e._idDimIdx,o=n[t],s=r[t];if(null==o&&null!=i&&(n[t]=o=kC(e,i,t)),null==s&&null!=a&&(r[t]=s=kC(e,a,t)),null==s&&null!=o){var l=e._nameRepeatCount,u=l[o]=(l[o]||0)+1;s=o,u>1&&(s+="__ec__"+u),r[t]=s}})),e}();function NC(e,t){E_(e)||(e=H_(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Ra(),a=[],o=function(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return na(t,function(e){var t;fa(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&wC(o),l=r===e.dimensionsDefine,u=l?bC(e):xC(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,o));for(var d=Ra(c),h=new Dx(o),p=0;p<h.length;p++)h[p]=-1;function f(e){var t=h[e];if(t<0){var n=r[e],i=fa(n)?n:{name:n},o=new vC,s=i.name;return null!=s&&null!=u.get(s)&&(o.name=o.displayName=s),null!=i.type&&(o.type=i.type),null!=i.displayName&&(o.displayName=i.displayName),h[e]=a.length,o.storeDimIndex=e,a.push(o),o}return a[t]}if(!s)for(p=0;p<o;p++)f(p);d.each(function(e,t){var n=Ac(e).slice();if(1===n.length&&!da(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);na(n,function(e,n){var i=da(e)?u.get(e):e;null!=i&&i<o&&(r[n]=i,g(f(i),t,n))})}});var v=0;function g(e,t,n){null!=Mp.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0))}na(n,function(e){var t,n,r,i;if(da(e))t=e,i={};else{t=(i=e).name;var a=i.ordinalMeta;i.ordinalMeta=null,(i=Ki({},i)).ordinalMeta=a,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(!1!==s){if(!(s=Ac(s)).length)for(var u=0;u<(n&&n.length||1);u++){for(;v<o&&null!=f(v).coordDim;)v++;v<o&&s.push(v++)}na(s,function(e,a){var o=f(e);if(l&&null!=i.type&&(o.type=i.type),g(Qi(o,i),t,a),null==o.name&&n){var s=n[a];!fa(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}r&&Qi(o.otherDims,r)})}});var m=t.generateCoord,y=t.generateCoordCount,_=null!=y;y=m?y||1:0;var x=m||"value";function b(e){null==e.name&&(e.name=e.coordDim)}if(s)na(a,function(e){b(e)}),a.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var w=0;w<o;w++){var S=f(w);null==S.coordDim&&(S.coordDim=BC(x,i,_),S.coordDimIndex=0,(!m||y<=0)&&(S.isExtraCoord=!0),y--),b(S),null!=S.type||Xy(e,w)!==$y&&(!S.isExtraCoord||null==S.otherDims.itemName&&null==S.otherDims.seriesName)||(S.type="ordinal")}return ad(a,function(e){return e.name},function(e,t){t>0&&(e.name=e.name+(t-1))}),new yC({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function BC(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var FC=function(e){this.coordSysDims=[],this.axisMap=Ra(),this.categoryAxisMap=Ra(),this.coordSysName=e};var EC={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",Uc).models[0],a=e.getReferringComponents("yAxis",Uc).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",a),VC(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),VC(a)&&(r.set("y",a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents("singleAxis",Uc).models[0];t.coordSysDims=["single"],n.set("single",i),VC(i)&&(r.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents("polar",Uc).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",o),VC(a)&&(r.set("radius",a),t.firstCategoryDimIndex=0),VC(o)&&(r.set("angle",o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();na(a.parallelAxisIndex,function(e,a){var s=i.getComponent("parallelAxis",e),l=o[a];n.set(l,s),VC(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=a))})},matrix:function(e,t,n,r){var i=e.getReferringComponents("matrix",Uc).models[0];t.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");n.set("x",a),n.set("y",o),r.set("x",a),r.set("y",o)}};function VC(e){return"category"===e.get("type")}function HC(e,t,n){var r,i,a,o=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!_C(e.schema)}(t)?(i=t.schema,r=i.dimensions,a=t.store):r=t;var l,u,c,d,h=!(!e||!e.get("stack")),p=!0;function f(e){return"ordinal"!==e.type&&"time"!==e.type}if(na(r,function(e,t){da(e)&&(r[t]=e={name:e}),f(e)||(p=!1)}),na(r,function(e,t){h&&!e.isExtraCoord&&(o||l||!e.ordinalMeta||(l=e),u||!f(e)||p&&("x"===e.coordDim||"angle"===e.coordDim)||s&&s!==e.coordDim||(u=e))}),!u||o||l||(o=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var v=u.coordDim,g=u.type,m=0;na(r,function(e){e.coordDim===v&&m++});var y={name:c,coordDim:v,coordDimIndex:m,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},_={name:d,coordDim:d,coordDimIndex:m+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(a&&(y.storeDimIndex=a.ensureCalculationDimension(d,g),_.storeDimIndex=a.ensureCalculationDimension(c,g)),i.appendCalculationDimension(y),i.appendCalculationDimension(_)):(r.push(y),r.push(_))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:o,stackedOverDimension:d,stackResultDimension:c}}function YC(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function WC(e,t,n){n=n||{};var r,i=t.getSourceManager(),a=!1;e?(a=!0,r=H_(e)):a=(r=i.getSource()).sourceFormat===Tp;var o=function(e){var t=e.get("coordinateSystem"),n=new FC(t),r=EC[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,r=e.get("coordinateSystem"),i=my.get(r);return t&&t.coordSysDims&&(n=ra(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);if(r){var i=r.get("type");n.type=function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}(i)}return n})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}(t,o),l=n.useEncodeDefaulter,u=ca(l)?l:l?la(Zy,s,t):null,c=NC(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a}),d=function(e,t,n){var r,i;return n&&na(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(null==r&&(r=a),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(i=!0)}),i||null==r||(e[r].otherDims.itemName=0),r}(c.dimensions,n.createInvertedIndices,o),h=a?null:i.getSharedDataStore(c),p=HC(t,{schema:c,store:h}),f=new zC(c,t);f.setCalculationInfo(p);var v=null!=d&&function(e){if("original"===e.sourceFormat){return!ua(Rc(function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[])))}}(r)?function(e,t,n,r){return r===d?n:this.defaultDimValueGetter(e,t,n,r)}:null;return f.hasItemOption=!1,f.initData(a?r:h,null,v),f}var $C=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();yd($C);var GC=0,UC=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++GC,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&ra(r,jC);return new e({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!da(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Ra(this.categories))},e}();function jC(e){return fa(e)&&null!=e.value?e.value:e+""}var ZC=oa({needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1});function qC(e,t,n){var r;e=e||{};var i=null;if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(na(ZC,function(t){a[t]&&(e[t]=sa(a[t],a))}),r=a)}return null==r&&function(e,t){var n=e||{},r=[];n._extents=r,r[0]=t?t.slice():[1/0,-1/0],Ki(n,tk)}(e,n),{brk:r,mapper:e}}function XC(e,t){na(ZC,function(n){e[n]=t[n]})}function KC(e,t){e.freeze=Ba}function QC(e){return e.getExtentUnsafe(0,2)}function JC(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function ek(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}var tk={needTransform:function(){return!1},normalize:function(e){var t=this._extents[1]||this._extents[0];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale:function(e){var t=this._extents[1]||this._extents[0];return e*(t[1]-t[0])+t[0]},transformIn:function(e){return e},transformOut:function(e){return e},contain:function(e){var t=JC(this,null);return e>=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){nk(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),nk(r,e,t,n)},freeze:function(){}};function nk(e,t,n,r){td(n,r)&&(e[t][0]=n,e[t][1]=r)}function rk(e){return ik(e)||ok(e)}function ik(e){return"interval"===e.type}function ak(e){return"time"===e.type}function ok(e){return"log"===e.type}function sk(e){return"ordinal"===e.type}function lk(e){var t=mc(e),n=Qu(10,t),r=qu(e/n);return r?2===r?r=3:3===r?r=5:r*=2:r=1,oc(r*n,-t)}function uk(e){return lc(e)+2}function ck(e,t){return Ju(e)/Ju(t)}function dk(e,t,n){var r=n&&n.lookup;if(r)for(var i=0;i<r.from.length;i++)if(e===r.from[i])return r.to[i];return Qu(t,e)}function hk(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(0!==r[0]){var a=Zu(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i?(r[0]=-1,r[1]=1):r[1]=1}return ed(r[0])&&ed(r[1])||(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function pk(e,t){return qu(ju(e=e||t,1))}function fk(e,t,n){var r=QC(e),i=r[0],a=e.count(),o=Math.max((t||0)+1,1);0!==i&&o>1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&l(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)l(s,!1,s===r[0]||s===r[1]);function l(e,t,r){n({value:e,offInterval:t},r)}s-o!==r[1]&&l(r[1],!0,!0)}var vk=function(e){function t(n){var r=e.call(this)||this;r.type="ordinal",r.parse=t.parse,XC(r,t.decoratedMethods);var i=n.ordinalMeta;i||(i=new UC({})),ua(i)&&(i=new UC({categories:ra(i,function(e){return fa(e)?e.value:e})})),r._ordinalMeta=i;var a=qC(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,KC(r,a.mapper),r}return Ti(t,e),t.parse=function(e){return null==e?e=NaN:da(e)?null==(e=this._ordinalMeta.getOrdinal(e))&&(e=NaN):e=qu(e),e},t.prototype.getTicks=function(){var e=[];return fk(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=Uu(a,t.length);i<o;++i){r[n[i]=t[i]]=i}for(var s=0;i<a;++i){for(;null!=r[s];)s++;n[i]=s,r[s]=i}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){var e=QC(this._mapper);return e[1]-e[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type="ordinal",t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize:function(e){return this._mapper.normalize(this._getTickNumber(e))},scale:function(e){return this.getRawOrdinalNumber(qu(this._mapper.scale(e)))},transformIn:function(e,t){return this._mapper.transformIn(this._getTickNumber(e),t)},transformOut:function(e,t){return this.getRawOrdinalNumber(this._mapper.transformOut(e,t))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(e,t){return this._mapper.getExtentUnsafe(e,t)},setExtent:function(e,t){return this._mapper.setExtent(e,t)},setExtent2:function(e,t,n){return this._mapper.setExtent2(e,t,n)}},t}($C);function gk(e,t,n,r){for(var i=e.getTicks({expandToNicedExtent:!0}),a=[],o=e.getExtent(),s=1;s<i.length;s++){var l=i[s],u=i[s-1];if(!u.break&&!l.break){for(var c=0,d=[],h=(l.value-u.value)/t,p=uk(h);c<t-1;){var f=oc(u.value+(c+1)*h,p);f>o[0]&&f<o[1]&&d.push(f),c++}var v=km();v&&v.pruneTicksByBreak("auto",d,n,function(e){return e},r,o),a.push(d)}}return a}$C.registerClass(vk);var mk=function(e){function t(n){var r=e.call(this)||this;r.type="interval",r.parse=t.parse;var i=Mm(r,n=n||{});return r.brk=qC(r,i,null).brk,r._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},r}return Ti(t,e),t.parse=function(e){return null==e||""===e?NaN:Number(e)},t.prototype.getConfig=function(){return qi(this._cfg)},t.prototype.setConfig=function(e){var t=QC(this);this._cfg=e=qi(e),null==e.niceExtent&&(e.niceExtent=t.slice()),null==e.intervalPrecision&&(e.intervalPrecision=uk(e.interval))},t.prototype.getTicks=function(e){e=e||{};var t=this._cfg,n=t.interval,r=QC(this),i=t.niceExtent,a=t.intervalPrecision,o=null,s=this.brk,l=o&&s,u=[];if(!n)return u;if("only_break"===e.breakTicks&&l)return o.addBreaksToTicks(u,s.breaks,r),u;r[0]<i[0]&&u.push({value:e.expandToNicedExtent?oc(i[0]-n,a):r[0]});for(var c=function(e,t){return qu((t-e)/n)},d=t.intervalCount,h=i[0],p=0;;p++){if(null==d){if(h>i[1]||!isFinite(h)||!isFinite(i[1]))break}else{if(p>d)break;h=Uu(h,i[1]),p===d&&(h=i[1])}if(u.push({value:h}),h=oc(h+n,a),s){var f=s.calcNiceTickMultiple(h,c);f>=0&&(h=oc(h+f*n,a))}if(u.length>0&&h===u[u.length-1].value)break;if(u.length>3e3)return[]}var v=u.length?u[u.length-1].value:i[1];return r[1]>v&&u.push({value:e.expandToNicedExtent?oc(v+n,a):r[1]}),l&&o.pruneTicksByBreak(e.pruneByBreak,u,s.breaks,function(e){return e.value},t.interval,r),l&&"none"!==e.breakTicks&&o.addBreaksToTicks(u,s.breaks,r),u},t.prototype.getMinorTicks=function(e){return gk(this,e,Tm(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=lc(e.value)||0:"auto"===n&&(n=this._cfg.intervalPrecision),sy(oc(e.value,n,!0))},t.type="interval",t}($C);$C.registerClass(mk);var yk=function(e){function t(n){var r=e.call(this)||this;r.type="time",r.parse=t.parse,r._locale=n.locale,r._useUTC=n.useUTC,r._interval=0;var i=Mm(r,n);return r.brk=qC(r,i,null).brk,r}return Ti(t,e),t.prototype.getLabel=function(e){return $m(e.value,Bm[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(Ym(this._minLevelUnit))]||Bm.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return function(e,t,n,r,i){var a=null;if(da(n))a=n;else if(ca(n)){var o={time:e.time,level:e.time?e.time.level:0},s=null;s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var l=e.time;if(l){var u=n[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=Gm(e.value,i);a=n[c][c][0]}}return $m(new Date(e.value),a,i,r)}(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e=e||{};var t=this._interval,n=QC(this),r=this.brk,i=null,a=[];if(!t)return a;var o=this._useUTC;a=function(e,t,n,r,i,a){var o=3e3,s=Em,l=0;function u(e,t,n,i,s,u,c){for(var d=function(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}(s,e),h=t,p=new Date(h);h<n&&h<=r[1]&&(c.push({value:h}),!(l++>o));)if(p[s](p[i]()+e),h=p.getTime(),a){var f=a.calcNiceTickMultiple(h,d);f>0&&(p[s](p[i]()+f*e),h=p.getTime())}c.push({value:h,notAdd:h>r[1]})}function c(e,i,a){var o=[],s=!i.length;if(!xk(Ym(e),r[0],r[1],n)){s&&(i=[{value:Mk(r[0],e,n)},{value:r[1]}]);for(var l=0;l<i.length-1;l++){var c=i[l].value,d=i[l+1].value;if(c!==d){var h=void 0,p=void 0,f=void 0,v=!1;switch(e){case"year":h=Math.max(1,Math.round(t/Om/365)),p=jm(n),f=ey(n);break;case"half-year":case"quarter":case"month":h=wk(t),p=Zm(n),f=ty(n);break;case"week":case"half-week":case"day":h=bk(t,31),p=qm(n),f=ny(n),v=!0;break;case"half-day":case"quarter-day":case"hour":h=Sk(t),p=Xm(n),f=ry(n);break;case"minute":h=Ck(t,!0),p=Km(n),f=iy(n);break;case"second":h=Ck(t,!1),p=Qm(n),f=ay(n);break;case"millisecond":h=kk(t),p=Jm(n),f=oy(n)}d>=r[0]&&c<=r[1]&&u(h,c,d,p,f,v,o),"year"===e&&a.length>1&&0===l&&a.unshift({value:a[0].value-h})}}for(l=0;l<o.length;l++)a.push(o[l])}}for(var d=[],h=[],p=0,f=0,v=0;v<s.length;++v){var g=Ym(s[v]);if(Wm(s[v])&&(c(s[v],d[d.length-1]||[],h),g!==(s[v+1]?Ym(s[v+1]):null))){if(h.length){f=p,h.sort(function(e,t){return e.value-t.value});for(var m=[],y=0;y<h.length;++y){var _=h[y].value;0!==y&&h[y-1].value===_||(m.push(h[y]),_>=r[0]&&_<=r[1]&&p++)}var x=i/t;if(p>1.5*x&&f>x/1.5)break;if(d.push(m),p>x||e===s[v])break}h=[]}}var b=aa(ra(d,function(e){return aa(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),w=b.length-1,S=[];for(v=0;v<b.length;++v)for(var C=b[v],k=0;k<C.length;++k){var M=Gm(C[k].value,n);S.push({value:C[k].value,time:{level:w-v,upperTimeUnit:M,lowerTimeUnit:M}})}ad(S,od,null),S.sort(function(e,t){return e.value-t.value});var T=S[0],D=S[S.length-1],I=Gm(r[0],n),A=Gm(r[1],n);(!T||T.value>r[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:I,lowerTimeUnit:I},notNice:!0});(!D||D.value<r[1])&&S.push({value:r[1],time:{level:0,upperTimeUnit:A,lowerTimeUnit:A},notNice:!0});return S}(this._minLevelUnit,this._approxInterval,o,n,ek(this),r);var s=Fm.length-1,l=0;return na(a,function(e){e.time&&(s=Math.min(s,Ji(Fm,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a},t.prototype.getMinorTicks=function(e){return gk(this,e,Tm(this),this._interval)},t.prototype.setTimeInterval=function(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit},t.parse=function(e){return pa(e)?Math.round(e):+vc(e)},t.type="time",t}($C),_k=[["second",Im],["minute",Am],["hour",Pm],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",Rm/2],["year",Rm]];function xk(e,t,n,r){return Um(new Date(t),e,r).getTime()===Um(new Date(n),e,r).getTime()}function bk(e,t){return(e/=Om)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function wk(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function Sk(e){return(e/=Pm)>12?12:e>6?6:e>3.5?4:e>2?2:1}function Ck(e,t){return(e/=t?Am:Im)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function kk(e){return ju(yc(e,!0),1)}function Mk(e,t,n){var r=Math.max(0,Ji(Fm,t)-1);return Um(new Date(e),Fm[r],n).getTime()}$C.registerClass(yk);var Tk=function(e){function t(n){var r=e.call(this)||this;r.type="log",r.parse=mk.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[0]=i[1]=a[0]=a[1]=NaN,XC(r,t.mapperMethods);var s=null,l=n.breakOption,u={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(l,r,{noNegative:!0},2,u),r.powStub=new mk({breakParsed:u.original}),r.intervalStub=new mk({breakParsed:u.transformed}),KC(r,r.intervalStub),r}return Ti(t,e),t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=null,i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return ra(i.getTicks(e||{}),function(e){var i,o=dk(e.value,t,a);if(r){var s=r.getTicksBreakOutwardTransform(this,e,Tm(n),this._lookup);s&&(i=s.vBreak,o=s.tickVal)}return{value:o,break:i}},this)},t.prototype.getMinorTicks=function(e){return gk(this,e,Tm(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type="log",t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(ck(e,this.base))},scale:function(e){return dk(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=ck(e,this.base),t&&2===t.depth?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return Dk.depth=n,Ik.lookup=this._lookup,dk(2===n?e:this.intervalStub.transformOut(e,Dk),this.base,Ik)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!td(t,n)||t<=0||n<=0)){var r=Ak,i=Ak;if(0===e){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[0]=t,r[1]=n);var o=this.base;this.intervalStub.setExtent2(e,i[0]=ck(t,o),i[1]=ck(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return td(t[0],t[1])&&Sc(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return null===t?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}($C);$C.registerClass(Tk);var Dk={},Ik={},Ak=[],Pk={value:1,category:1,time:1,log:1},Ok=Yc();function Rk(e){var t=e.getLabelModel().get("formatter");if("time"===e.type){var n=Vm(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(da(t))return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")};if(ca(t)){if("category"===e.type)return function(n,r){return t(Lk(e,n),n.value-e.scale.getExtent()[0],null)};var r=null;return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Lk(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Lk(e,t){var n=e.scale;return sk(n)?n.getLabel(t):t.value}function zk(e){var t=e.get("interval");return null==t?"auto":t}function Nk(e,t){var n={};return na(e.mapDimensionsAll(t),function(t){n[function(e,t){return YC(e,t)?e.getCalculationInfo("stackResultDimension"):t}(e,t)]=!0}),oa(n)}function Bk(e){return"middle"===e||"center"===e}function Fk(e){return e.getShallow("show")}function Ek(e,t,n){e.get("breaks",!0)}function Vk(e,t,n,r,i,a){var o,s,l=ok(e),u=l?e.intervalStub:e;if(u.setExtent(r[0],r[1]),l){var c=e.powStub,d={depth:2},h=e.transformOut(r[0],d),p=e.transformOut(r[1],d),f=(s=r,[(o=n)[0]!==s[0],o[1]!==s[1]]);t[0]&&!f[0]&&(h=i[0]),t[1]&&!f[1]&&(p=i[1]),c.setExtent(h,p)}u.setConfig(a)}function Hk(e,t){return sk(e)?e.getRawOrdinalNumber(t.value):t.value}function Yk(e,t){return sk(e)&&!!t.get("boundaryGap")}var Wk=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),$k=rd(),Gk=Yc(),Uk=Yc();function jk(e,t){var n=e.model,r=Gk(vw(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function Zk(e,t){return Xk(jk(e,t))}function qk(e,t){var n=Gk(vw(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function Xk(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function Kk(e,t,n){var r=jk(e,t);r&&Qk(e.model.ecModel,r.sers,n)}function Qk(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function Jk(e,t){var n=e.model,r=Gk(vw(n.ecModel)).keys;r&&na(r.get(n.uid),function(e){t(e)})}function eM(e){var t=Uk(fw(e)),n=t.keyed||(t.keyed=Ra());qk(e,function(t,r,i){var a=n.get(r)||n.set(r,Ra()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&tM.liPosMinGap(e,t,o)})}var tM={};function nM(e,t,n){if(e){var r=t.ecModel,i=Gk(vw(r)),a=e.model.uid,o=i.axSer||(i.axSer=Ra());(o.get(a)||o.set(a,[])).push(t);var s=t.subType,l=t.getBaseAxis()===e,u=iM.get(rM(s,l,n))||iM.get(rM(s,l,null));if(u){var c=i.keyed||(i.keyed=Ra()),d=i.keys||(i.keys=Ra()),h=u.key,p=c.get(h)||c.set(h,Ra()),f=p.get(a);f||((f=p.set(a,{axis:e,sers:[],serByIdx:[]})).metrics=u.getMetrics(e),(d.get(a)||d.set(a,[])).push(h)),f.sers.push(t),f.serByIdx[t.seriesIndex]=t}}}function rM(e,t,n){return e+"|&"+ba(t,!0)+"|&"+(n||"")}var iM=Ra(),aM=Yc(),oM=function(){function e(e,t,n,r,i){var a,o=sk(e),s=o?t.getCategories().length:null;if(o){var l=t.getCategories(!0);a=l&&!l.length}var u=n.slice();(ik(e)||ok(e)||ak(e))&&(Qc(u,lM(e,t.get("dataMin",!0))),Jc(u,lM(e,t.get("dataMax",!0)))),function(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}(u)||(u[0]=u[1]=NaN);var c=[],d=[!1,!1],h=t.get("min",!0);"dataMin"===h?(c[0]=u[0],d[0]=!0):(c[0]=lM(e,ca(h)?h({min:u[0],max:u[1]}):h),d[0]=null!=c[0]);var p=t.get("max",!0);"dataMax"===p?(c[1]=u[1],d[1]=!0):(c[1]=lM(e,ca(p)?p({min:u[0],max:u[1]}):p),d[1]=null!=c[1]);var f=function(e,t){var n;if(sk(e))n=[0,0];else{var r=t.get("boundaryGap");"boolean"==typeof r&&(r=null),n=ua(r)?r:[r,r]}return[uM(n[0]),uM(n[1])]}(e,t),v=o?null:u[1]-u[0]||Math.abs(u[0]);null==c[0]&&(c[0]=o?a?u[0]:s?0:NaN:u[0]-f[0]*v),null==c[1]&&(c[1]=o?a?u[1]:s?s-1:NaN:u[1]+f[1]*v),!ed(c[0])&&(c[0]=NaN),!ed(c[1])&&(c[1]=NaN);var g=a||_a(c[0])||_a(c[1])||o&&!s,m=ik(e),y=m&&t.needIncludeZero&&t.needIncludeZero();y&&(c[0]>0&&c[1]>0&&!d[0]&&(c[0]=0),c[0]<0&&c[1]<0&&!d[1]&&(c[1]=0));var _=!1;c[0]>c[1]&&(c.reverse(),_=!0);var x=lM(e,t.get("startValue",!0)),b=null!=x;!Sc(x)&&r&&(x=e.getDefaultStartValue?e.getDefaultStartValue():0),Sc(x)&&(b||!m||y)&&(x<c[0]&&!d[0]?(c[0]=x,d[0]=!0):x>c[1]&&!d[1]&&(c[1]=x,d[1]=!0)),sM(this._i={scale:e,dataMM:u,noZoomEffMM:c,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:x,isBlank:g,incl0:y,tggAxInv:_,ctnShp:i},c)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return null!=t[0]&&(o[0]=t[0],i[0]=r[0]=!0),null!=t[1]&&(o[1]=t[1],i[1]=r[1]=!0),sM(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function sM(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),nd(t))}function lM(e,t){return null==t?null:_a(t)?NaN:e.parse(t)}function uM(e){return Cu("boolean"==typeof e?0:e,1)||0}function cM(e){var t=aM(e.scale);return t.extent||(t.extent=[1/0,-1/0]),t}function dM(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||function(e,t,n,r,i){var a=cM(t),o=a.extent,s=!1;!function(e,t){var n=e.model.ecModel,r=Gk(vw(n)).axSer;r&&Qk(n,r.get(e.model.uid),t)}(t,function(r){if(r.boxCoordinateSystem){var i=_y(r).coord,l=a.dimIdxInCoord;if(l>=0){if(ua(i)){var u=i[l];null==u||ua(u)||Kc(o,e.parse(u))}}else;}else if(r.coordinateSystem){var c=r.getData();if(c){var d=e.getFilter?e.getFilter():null;na(Nk(c,n),function(e){var t,n;t=o,td((n=c.getApproximateExtent(e,d))[0],n[1])&&(n[0]<t[0]&&(t[0]=n[0]),n[1]>t[1]&&(t[1]=n[1]))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var l=function(e,t,n){var r=Yk(e,n),i=n.get("containShape",!0);null!=i||r||(i=!0);if(!i)return!1;var a=!1;return Jk(t,function(e){a=!!pM.get(e)||a}),a}(e,t,r);hM(e,new oM(e,r,o,s,l),i),a.extent=null}(n,e,i,r,t)}function hM(e,t,n){e.rawExtentInfo=t,t.from=n}var pM=Ra();function fM(e,t,n,r,i){e.rawExtentInfo||function(e,t){var n=e.scale;hM(n,new oM(n,e.model,t,!1,!1),3)}({scale:e,model:t},i||[1/0,-1/0]);var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get("legacyMinMaxDontInverseAxis")&&(r.inverse=!r.inverse),a}function vM(e,t,n,r){var i;if(n.ctnShp&&(Jk(e,function(t){var n=pM.get(t);if(n){var a=n(e,r);a&&(Qc(i=i||[0,0],a[0]),Jc(i,a[1]),function(e){Ok(e).noOnMyZero=!0}(e))}}),i)){var a=t.getExtent();if(sk(t))e.onBand||t.setExtent2(1,Uu(a[0],a[0]+i[0]),ju(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=Uu(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=ju(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(1,o[0],o[1])}}}function gM(e,t){var n=ok(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=hk(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var l=n?function(e,t){var n=pk(t.splitNumber,10),r=e.getExtent(),i=ek(e),a=ju(gc(i),1);n/i*a<=.5&&(a*=10);var o=uk(a),s=[oc(Ku(r[0]/a)*a,o),oc(Xu(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}(r,t):function(e,t){var n=pk(t.splitNumber,5),r=ek(e),i=t.minInterval,a=t.maxInterval,o=yc(r/n,!0);null!=i&&o<i&&(o=i);null!=a&&o>a&&(o=a);var s=uk(o),l=e.getExtent(),u=[oc(Ku(l[0]/o)*o,s),oc(Xu(l[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:u}}(r,t),u=l.intervalPrecision,c=l.interval,d=t.userInterval;null!=d&&(l.interval=d,l.intervalPrecision=uk(d)),i[0]||(s[0]=oc(Xu(s[0]/c)*c,u)),i[1]||(s[1]=oc(Ku(s[1]/c)*c,u)),null!=d&&(l.niceExtent=s.slice()),Vk(e,i,o,s,a,l)}function mM(e){var t=e.scale,n=e.model;!function(e,t,n,r,i){var a=fM(e,t,r,n,i),o=ik(e)||ak(e);(function(e,t){yM[e.type](e,t)})(e,{splitNumber:t.get("splitNumber"),fixMinMax:a.fixMM,userInterval:t.get("interval"),minInterval:o?t.get("minInterval"):null,maxInterval:o?t.get("maxInterval"):null,rawExtentResult:a}),n&&r&&vM(n,e,a,r)}(t,n,n.axis,n.ecModel,null)}var yM={interval:gM,log:gM,time:function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=Om,n[1]+=Om),n[1]===-1/0&&n[0]===1/0){var r=new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-Om}e.setExtent(n[0],n[1]);var i=pk(t.splitNumber,10),a=ek(e)/i,o=t.minInterval,s=t.maxInterval;null!=o&&a<o&&(a=o),null!=s&&a>s&&(a=s);var l=_k.length,u=Math.min(function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n}(_k,a,0,l),l-1),c=_k[u][1],d=_k[Math.max(u-1,0)][0];e.setTimeInterval({approxInterval:a,interval:c,minLevelUnit:d})},ordinal:Ba},_M=[],xM={registerPreprocessor:eC,registerProcessor:tC,registerPostInit:function(e){nC("afterinit",e)},registerPostUpdate:function(e){nC("afterupdate",e)},registerUpdateLifecycle:nC,registerAction:rC,registerCoordinateSystem:function(e,t){my.register(e,t)},registerLayout:function(e,t){oC(GS,e,t,1e3,"layout",!0)},registerVisual:iC,registerTransform:lC,registerLoading:sC,registerMap:function(e,t,n){var r=dw["registerMap"];r&&r(e,t,n)},registerImpl:function(e,t){dw[e]=t},PRIORITY:oS,ComponentModel:Ly,ComponentView:cb,SeriesModel:nb,ChartView:fb,registerComponentModel:function(e){Ly.registerClass(e)},registerComponentView:function(e){cb.registerClass(e)},registerSeriesModel:function(e){nb.registerClass(e)},registerChartView:function(e){fb.registerClass(e)},registerCustomSeries:function(e,t){!function(e,t){hw[e]=t}(e,t)},registerSubTypeDefaulter:function(e,t){Ly.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){var n;n=t,Hu[e]=n}};function bM(e){ua(e)?na(e,function(e){bM(e)}):Ji(_M,e)>=0||(_M.push(e),ca(e)&&(e={install:e}),e.install(xM))}var wM=Yc(),SM=Yc(),CM=1,kM=2;function MM(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function TM(e,t){var n=e.getLabelModel().get("customValues");if(n){var r=e.scale;return{labels:ra(IM(n,r),function(t,n){return{formattedLabel:Rk(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return"category"===e.type?function(e,t){var n=e.getLabelModel(),r=AM(e,n,t);return!n.get("show")||e.scale.isBlank()?{labels:[]}:r}(e,t):function(e){var t=e.scale.getTicks(),n=Rk(e);return{labels:ra(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}(e)}function DM(e,t,n){var r=e.scale,i=e.getTickModel().get("customValues");return i?{ticks:IM(i,r)}:"category"===e.type?function(e,t){var n,r,i=PM(e),a=zk(t),o=LM(i,a);if(o)return o;t.get("show")&&!e.scale.isBlank()||(n=[]);if(ca(a))n=FM(e,a,!0);else if("auto"===a){var s=AM(e,e.getLabelModel(),MM(kM));r=s.labelCategoryInterval,n=ra(s.labels,function(e){return e.tick})}else n=FM(e,r=a,!0);return zM(i,a,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:r.getTicks(n)}}function IM(e,t){var n=t.getExtent(),r=[];return na(e,function(e){(e=t.parse(e))>=n[0]&&e<=n[1]&&r.push(e)}),ad(r,sd,null),sc(r),ra(r,function(e){return{value:e}})}function AM(e,t,n){var r,i,a=OM(e),o=zk(t),s=n.kind===CM;if(!s){var l=LM(a,o);if(l)return l}ca(o)?r=FM(e,o,!1):(i="auto"===o?function(e,t){if(t.kind===CM){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return SM(e).autoInterval=n,!0}),n}var r=SM(e).autoInterval;return null!=r?r:SM(e).autoInterval=e.calculateCategoryInterval(t)}(e,n):o,r=FM(e,i,!1));var u={labels:r,labelCategoryInterval:i};return s?n.out.noPxChangeTryDetermine.push(function(){return zM(a,o,u),!0}):zM(a,o,u),u}var PM=RM("axisTick"),OM=RM("axisLabel");function RM(e){return function(t){return SM(t)[e]||(SM(t)[e]={list:[]})}}function LM(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function zM(e,t,n){return e.list.push({key:t,value:n}),n}function NM(e,t,n){return null==BM(e,t,n)}function BM(e,t,n){var r=wM(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(null!=a&&null!=o&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function FM(e,t,n){var r=Rk(e),i=e.scale,a=[],o=ca(t);return fk(i,o?0:t,function(e,s){var l=i.getLabel(e);if(o){var u=!!t(e.value,l);if(e.offInterval=!u,!u&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:l,tick:e})}),a}function EM(e,t){t=t||{};var n,r={w:NaN,w2:NaN},i=e.scale,a=t.fromStat,o=t.min,s=(n=JC(i,3))[1]-n[0];Sc(s)||(s=NaN);var l=e.getExtent(),u=Zu(l[1]-l[0]);return sk(i)?function(e,t,n,r){var i=t.onBand,a=n+(i?1:0);0===a&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}(r,e,s,u):a&&function(e,t,n,r,i){var a=!1,o=-1/0;na(i.key?[Zk(t,i.key)]:function(e,t){var n=[];return qk(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(Xk(e))}),n}(t,i.sers||[]),function(e){var t=e.liPosMinGap;null!=t&&(t>0?(t>o&&(o=t),a=!1):-2===t&&(a=!0))}),Sc(n)&&n>0&&Sc(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=.8*r,e.w2=e.w*n/r)}(r,e,s,u,a),null!=o&&(r.w=Sc(r.w)?ju(o,r.w):o),r}var VM=[0,1],HM=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return rc(e=n.normalize(n.parse(e)),VM,YM(this),t)},e.prototype.coordToData=function(e,t){var n=rc(e,YM(this),VM,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=ra(DM(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Hk(this.scale,e)),tick:e}},this),r=function(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=EM(e).w;if(!i)return!1;na(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];o.tick.offInterval&&t.pop();return t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}(this,n,t.get("alignWithLabel"));return ra(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:r}})},e.prototype.getMinorTicksCoords=function(){if(sk(this.scale))return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),ra(this.scale.getMinorTicks(e),function(e){return ra(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return TM(this,e=e||MM(kM)).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){return EM(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return function(e,t){var n=t.kind,r=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),i=Rk(e),a=(r.axisRotate-r.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1;l>40&&(u=Math.max(1,Math.floor(l/40)));for(var c=s[0],d=e.dataToCoord(c+1)-e.dataToCoord(c),h=Math.abs(d*Math.cos(a)),p=Math.abs(d*Math.sin(a)),f=0,v=0;c<=s[1];c+=u){var g,m,y=xu(i({value:c}),r.font,"center","top");g=1.3*y.width,m=1.3*y.height,f=Math.max(f,g,7),v=Math.max(v,m,7)}var _=f/h,x=v/p;isNaN(_)&&(_=1/0),isNaN(x)&&(x=1/0);var b=Math.max(0,Math.floor(Math.min(_,x)));if(n===CM)return t.out.noPxChangeTryDetermine.push(sa(NM,null,e,b,l)),b;var w=BM(e,b,l);return null!=w?w:b}(this,e=e||MM(kM))},e}();function YM(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}var WM=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"];function $M(e,t,n){n=n||3,t?e.dirty|=n:e.dirty&=~n}function GM(e,t){return t=t||3,null==e.dirty||!!(e.dirty&t)}function UM(e){if(e)return GM(e)&&function(e,t,n){var r=t.getComputedTransform();e.transform=zg(e.transform,r);var i=e.localRect=Lg(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,l=n&&n.minMarginForce,u=n&&n.marginDefault,c=a.__marginType;null==c&&u&&(o=u,c=rm.textMargin);for(var d=0;d<4;d++)jM[d]=c===rm.minMargin&&l&&null!=l[d]?l[d]:s&&null!=s[d]?s[d]:o?o[d]:0;c===rm.textMargin&&Mg(i,jM,!1,!1);var h=e.rect=Lg(e.rect,i);r&&h.applyTransform(r);c===rm.minMargin&&Mg(h,jM,!1,!1);e.axisAligned=Og(r),(e.label=e.label||{}).ignore=t.ignore,$M(e,!1),$M(e,!0,2)}(e,e.label,e),e}var jM=[0,0,0,0];function ZM(e,t){for(var n=0;n<WM.length;n++){var r=WM[n];null==e[r]&&(e[r]=t[r])}return UM(e)}function qM(e){var t=e.obb;return t&&!GM(e,2)||(e.obb=t=t||new Vv,t.fromBoundingRect(e.localRect,e.transform),$M(e,!1,2)),t}function XM(e,t,n,r){return!(!e||!t)&&(!(e.label&&e.label.ignore||t.label&&t.label.ignore)&&(!!e.rect.intersect(t.rect,n,r)&&(!(!e.axisAligned||!t.axisAligned)||qM(e).intersect(qM(t),n,r))))}function KM(e,t,n){var r=Ri.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",r.setAttribute("data-zr-dom-id",e)),r.width=i*n,r.height=a*n,r}function QM(e){return!e.__cursors.get(0)}function JM(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var eT=function(e){function t(t,n,r){var i,a=e.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.zlevel=0,a.zlevel2=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__prevIdx={startIdx:0,endIdx:0},r=r||Jl,"string"==typeof t?i=KM(t,n,r):fa(t)&&(t=(i=t).id),a.id=t,a.dom=i;var o=i.style;return o&&(za(i),i.onselectstart=function(){return!1},o.padding="0",o.margin="0",o.borderWidth="0"),a.painter=n,a.dpr=r,a}return Ti(t,e),t.prototype.afterBrush=function(){this.__prevIdx=JM(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=KM("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new Go(0,0,0,0);function l(e){if(e.isFinite()&&!e.isZero())if(0===i.length){(t=new Go(0,0,0,0)).copy(e),i.push(t)}else{for(var t,n=!1,r=1/0,l=0,u=0;u<i.length;++u){var c=i[u];if(c.intersect(e)){var d=new Go(0,0,0,0);d.copy(c),d.union(e),i[u]=d,n=!0;break}if(o){s.copy(e),s.union(c);var h=e.width*e.height,p=c.width*c.height,f=s.width*s.height-h-p;f<r&&(r=f,l=u)}}if(o&&(i[l].union(e),n=!0),!n)(t=new Go(0,0,0,0)).copy(e),i.push(t);o||(o=i.length>=a)}}for(var u=JM(this),c=u.startIdx;c<u.endIdx;++c){if(v=e[c]){var d=v.shouldBePainted(n,r,!0,!0);(g=v.__isRendered&&(1&v.__dirty||!d)?v.getPrevPaintRect():null)&&l(g);var h=d&&(1&v.__dirty||!v.__isRendered)?v.getPaintRect():null;h&&l(h)}}var p,f=this.__prevIdx;for(c=f.startIdx;c<f.endIdx;++c){var v,g;d=(v=t[c])&&v.shouldBePainted(n,r,!0,!0);if(v&&(!d||!v.__zr)&&v.__isRendered)(g=v.getPrevPaintRect())&&l(g)}do{p=!1;for(c=0;c<i.length;)if(i[c].isZero())i.splice(c,1);else{for(var m=c+1;m<i.length;)i[c].intersect(i[m])?(p=!0,i[c].union(i[m]),i.splice(m,1)):m++;c++}}while(p);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+"px",i.height=t+"px"),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,u=this.dpr,c=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,a/u,o/u));var d=this.domBack;function h(e,n,r,a){if(i.clearRect(e,n,r,a),t&&"transparent"!==t){var o=void 0;ya(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||Aw(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):null!=t.image&&(t.scaleX=t.scaleX||u,t.scaleY=t.scaleY||u,o=Vw(i,t,{dirty:function(){c.setUnpainted(),c.painter.refresh()}})),i.save(),i.fillStyle=o||t,i.fillRect(e,n,r,a),i.restore()}s&&(i.save(),i.globalAlpha=l,i.drawImage(d,e,n,r,a),i.restore())}!n||s?h(0,0,a,o):n.length&&na(n,function(e){h(e.x*u,e.y*u,e.width*u,e.height*u)})},t}(eo),tT=1e5,nT=314159,rT=void 0;function iT(e,t,n,r){var i=new eT(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,aT(i),i}function aT(e){e.__cursorStack=[],e.__cursors=Ra()}function oT(e,t){var n,r=e.__cursors,i=+t;return r.get(i)||(e.__cursorStack.push(i),r.set(i,((n={key:i}).startIdx=n.drawIdx=n.endIdx=n.endIdxNew=0,n.used=!1,n.first=n.last=NaN,n.notClearIdx=-1,n)))}function sT(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function lT(e,t){var n=e.layers;return n[t]||(n[t]=new Array(3))}function uT(e,t,n){for(var r=e.layerStack,i=0;i<r.length;i++){var a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];n&&(n&cT&&!s.__builtin__||n&dT&&s.__builtin__||n&hT&&s===e.hoverlayer)||t(s,a,o,i)}}var cT=1,dT=2,hT=4,pT=cT|hT,fT=function(){function e(e,t,n,r){this.type="canvas",this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas",this._i={layerStack:[],layers:[]};var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();if(this._opts=n=Ki({},n||{}),this.dpr=n.devicePixelRatio||Jl,this._singleCanvas=i,this.root=e,e.style&&(za(e),e.innerHTML=""),this.storage=t,this._prevDisplayList=[],i){var a=e,o=a.width,s=a.height;null!=n.width&&(o=n.width),null!=n.height&&(s=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=s*this.dpr,this._width=o,this._height=s;var l=iT(a,this,nT,0);l.initContext(),this._insertLayer(l,nT,0,!0),this._domRoot=e}else{this._width=Ow(e,0,n),this._height=Ow(e,1,n);var u=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(u)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t,n=ba((t=e&&!fa(e)?{paintAll:!!e}:e||{}).refresh,!0),r=ba(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=2),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();var a=this._prevDisplayList;this._paintList(i,a,this._redrawId);var o=this._backgroundColor;return uT(this._i,function(e,t,n,r){e.refresh&&e.refresh(0===r?o:null)},dT),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=rT,n!==rT&&(t||2!==n||(t=this._i.hoverlayer=this._ensureLayer(tT)),t)){t.clear();for(var r,i={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},a=0,o=e.length;a<o;a++){var s=e[a];if(s.__inHover){r||(r=t.ctx).save();var l=s.__hoverStyle,u=void 0;l&&(u=s.style,s.style=l),Zw(r,s,i),l&&(s.style=u)}}r&&(qw(r,i),r.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(tT)},e.prototype.paintOne=function(e,t){jw(e,t)},e.prototype._paintList=function(e,t,n){if(this._redrawId===n){var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)uT(this._i,function(e){e.afterBrush&&e.afterBrush()},pT),this._paintHoverList(e);else{var i=this;xs(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(nT).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),uT(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},cT)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return uT(this._i,function(i){var a=!1;if(sT(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),a||i.__dirty){var o=n._opts.useDirtyRect&&!QM(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],l=!0;if(i.__dirty){l=!1,i.__dirty=!1;var u=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,u,o)}sT(i,function(t){var a=n._paintPerCursor(i,t,e,o,l);r=r&&a})}},pT),Ii.wxa&&uT(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r)if(r.length)for(var o=this.dpr,s=0;s<r.length;++s){var l=r[s];a.save(),a.beginPath(),a.rect(l.x*o,l.y*o,l.width*o,l.height*o),a.clip(),this._paintPerCursorInRect(e,t,n,l,i),a.restore()}else t.drawIdx=t.endIdx;else a.save(),this._paintPerCursorInRect(e,t,n,null,i),a.restore();return t.drawIdx>=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=QM(e),l=s&&Ri.getTime(),u=t.drawIdx,c=t.notClearIdx,d=c>=0?Math.min(c,u):u;d<t.endIdx;d++){var h=n[d];if(!(d<u)||h.notClear){if(h.__inHover&&(this._hoverLayerDirty=2),null!=r){var p=h.getPaintRect();p&&p.intersect(r)&&(Zw(o,h,a),h.setPrevPaintRect(p))}else Zw(o,h,a);if(s&&Ri.getTime()-l>15){d++;break}}}qw(o,a),t.drawIdx=Math.max(d,u)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t=t||0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=nT,t=0);var i=lT(this._i,e)[t];return i||(i=iT("zr_"+e+"."+t,this,e,t),this._layerConfig[e]&&Xi(i,this._layerConfig[e],!0),(n||r&&e!==nT)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,l=null;if((!a[t]||!a[t][n])&&function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(e)){for(var u=o.length,c=0;c<u&&(o[c].zl<t||o[c].zl===t&&o[c].zl2<n);)c++;if(c>0&&(l=lT(i,o[c-1].zl)[o[c-1].zl2]),o.splice(c,0,{zl:t,zl2:n}),lT(i,t)[n]=e,!r&&!e.virtual)if(l){var d=l.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom);e.painter||(e.painter=this)}},e.prototype.eachLayer=function(e,t){return uT(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return uT(this._i,function(n,r){e.call(t,n,r)},cT)},e.prototype.eachOtherLayer=function(e,t){return uT(this._i,function(n,r){e.call(t,n,r)},dT)},e.prototype.getLayers=function(){var e={};return uT(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n,r=this;if(r._singleCanvas)for(var i=1;i<e.length;i++){if((c=e[i]).zlevel!==e[i-1].zlevel||c.incremental){r._needsManuallyCompositing=!0;break}}uT(r._i,function(e){e.__dirty=!1,sT(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},pT);for(var a=null,o=null,s=!1,l=0,u=e.length;l<u;l++){var c,d=(c=e[l]).zlevel,h=c.incremental,p=void 0;if(n!==d&&(n=d,s=!1),h?(s=!0,p=1):p=s?2:0,a&&d===a.zlevel&&p===a.zlevel2||(o=null,(a=r._ensureLayer(d,p)).__builtin__)){if(!(o&&h===o.key||(o=oT(a,h)).used))if(o.used=!0,t||o.first!==c.id)a.__dirty=!0,o.first=c.id,o.startIdx=o.drawIdx=l,o.endIdx=l+1;else{var f=l-o.startIdx;o.startIdx=l,o.drawIdx+=f,o.endIdx+=f}o.endIdxNew=l+1,1&c.__dirty&&!c.__inHover&&((!h||!c.notClear&&l<o.drawIdx)&&(a.__dirty=!0),h&&c.notClear&&o.notClearIdx<0&&(o.notClearIdx=l))}else Zi("ZLevel "+d+" has been used by unknown layer "+a.id)}uT(r._i,function(t){for(var n=t.__cursorStack,i=t.__cursors,a=n.length-1;a>=0;a--){var o=i.get(n[a]);if(o.used){var s=o.endIdxNew;(QM(t)?s<o.drawIdx:s!==o.endIdx||!s||e[s-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=s?e[s-1].id:NaN}else t.__dirty=!0,i.removeKey(n[a]),n.splice(a,1)}t.__dirty&&(sT(t,function(e){e.drawIdx=e.startIdx}),r._hoverLayerDirty===rT&&(r._hoverLayerDirty=1))},pT)},e.prototype.clear=function(){return uT(this._i,function(e){e.clear(),aT(e)},cT),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,uT(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?Xi(n[e],t,!0):n[e]=t,uT(this._i,function(e,t){Xi(e,n[t],!0)})}},e.prototype.delLayer=function(e){for(var t=this._i.layerStack,n=this._i.layers,r=t.length-1;r>=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts,i=this.root;null!=e&&(r.width=e),null!=t&&(r.height=t),e=Ow(i,0,r),t=Ow(i,1,r),n.style.display="",this._width===e&&t===this._height||(n.style.width=e+"px",n.style.height=t+"px",uT(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this._ensureLayer(nT).resize(e,t)}return this},e.prototype.clearLayer=function(e){na(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._i.layers[314159][0].dom;var t=new eT("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;uT(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,l=o.length;s<l;s++){var u=o[s];Zw(n,u,a)}qw(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();var vT=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Ti(t,e),t.prototype.getInitialData=function(e){return WC(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Vu,n=Tw("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual("symbol"),i=this.getData().getVisual("symbolRotate"),a="none"===r?"circle":r,o=.8*e.itemHeight,s=Tw(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=("inherit"===e.iconRotate?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill=zy.color.neutral00,s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1,triggerEvent:!1},t}(nb);function gT(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=ix(e,t,n[0]);return null!=i?i+"":null}if(r){for(var a=[],o=0;o<n.length;o++)a.push(ix(e,t,n[o]));return a.join(" ")}}function mT(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!ua(t))return t+"";for(var r=[],i=0;i<n.length;i++){var a=e.getDimensionIndex(n[i]);a>=0&&r.push(t[a])}return r.join(" ")}var yT=function(e){function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return Ti(t,e),t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=Tw(e,-1,-1,2,2,null,a);o.attr({z2:ba(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=_T,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){uf(this.childAt(0))},t.prototype.downplay=function(){cf(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,"symbol")||"circle",o=e.hostModel,s=t.getSymbolSize(e,n),l=t.getSymbolZ2(e,n),u=a!==this._symbolType,c=i&&i.disableAnimation;if(u){var d=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(a,e,n,s,l,d)}else{(p=this.childAt(0)).silent=!1;var h={scaleX:s[0]/2,scaleY:s[1]/2};c?p.attr(h):Gv(p,h,o,n),Kv(p)}if(this._updateCommon(e,n,s,r,i),u){var p=this.childAt(0);if(!c){h={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,Uv(p,h,o,n)}}c&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,i){var a,o,s,l,u,c,d,h,p,f=this.childAt(0),v=e.hostModel;if(r&&(a=r.emphasisItemStyle,o=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,d=r.labelStatesModels,h=r.hoverScale,p=r.cursorStyle,c=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),m=g.getModel("emphasis");a=m.getModel("itemStyle").getItemStyle(),s=g.getModel(["select","itemStyle"]).getItemStyle(),o=g.getModel(["blur","itemStyle"]).getItemStyle(),l=m.get("focus"),u=m.get("blurScope"),c=m.get("disabled"),d=jg(g),h=m.getShallow("scale"),p=g.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var _=Dw(e.getItemVisual(t,"symbolOffset"),n);_&&(f.x=_[0],f.y=_[1]),p&&f.attr("cursor",p);var x=e.getItemVisual(t,"style"),b=x.fill;if(f instanceof np){var w=f.style;f.useStyle(Ki({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},x))}else f.__isEmptyBrush?f.useStyle(Ki({},x)):f.useStyle(x),f.style.decal=null,f.setColor(b,i&&i.symbolInnerColor),f.style.strokeNoScale=!0;var S=e.getItemVisual(t,"liftZ"),C=this._z2;null!=S?null==C&&(this._z2=f.z2,f.z2+=S):null!=C&&(f.z2=C,this._z2=null);var k=i&&i.useNameLabel;Ug(f,d,{labelFetcher:v,labelDataIndex:t,defaultText:function(t){return k?e.getName(t):gT(e,t)},inheritColor:b,defaultOpacity:x.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var M=f.ensureState("emphasis");M.style=a,f.ensureState("select").style=s,f.ensureState("blur").style=o;var T=null==h||!0===h?Math.max(1.1,3/this._sizeY):isFinite(h)&&h>0?+h:1;M.scaleX=this._sizeX*T,M.scaleY=this._sizeY*T,this.setSymbolScale(1),wf(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=kp(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Zv(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Zv(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return ua(n=e.getItemVisual(t,"symbolSize"))||(n=[+n,+n]),[n[0]||0,n[1]||0];var n},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,"z2")},t}(Vu);function _T(e,t){this.parent.drift(e,t)}function xT(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function bT(e){return null==e||fa(e)||(e={isIgnore:e}),e||{}}function wT(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:jg(t),cursorStyle:t.get("cursor")}}function ST(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var CT=function(){function e(e){this.group=new Vu,this._SymbolCtor=e||yT}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=bT(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=wT(e),l={disableAnimation:o},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=u(r);xT(e,i,r,t)&&ST(a,e,r,s,l,i,n)}).update(function(c,d){var h=i.getItemGraphicEl(d),p=u(c);if(xT(e,p,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",v=h&&h.getSymbolType&&h.getSymbolType();if(!h||v&&v!==f)n.remove(h),(h=new a(e,c,s,l)).setPosition(p);else{h.updateData(e,c,s,l);var g={x:p[0],y:p[1]};o?h.attr(g):Gv(h,g,r)}n.add(h),e.setItemGraphicEl(c,h)}else n.remove(h)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=0,i=t.getStore().count();r<i;r++){var a=t.getItemGraphicEl(r),o=n._getSymbolPoint(r);xT(t,o,r,e)?((a=a||ST(n._SymbolCtor,t,r,n._seriesScope,{disableAnimation:!0},o,n.group)).stopAnimation(),a.setPosition(o),a.markRedraw()):a&&(n.group.remove(a),t.setItemGraphicEl(r,null))}},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=wT(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n,r){function i(e){e.isGroup||(e.incremental=n,e.ensureState("emphasis").hoverLayer=2)}this._progressiveEls=[],r=bT(r);for(var a=e.start;a<e.end;a++){var o=t.getItemLayout(a);if(xT(t,o,a,r)){var s=new this._SymbolCtor(t,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(e){Pg(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},e}();function kT(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=function(e,t){var n=0,r=e.scale.getExtent();"start"===t?n=r[0]:"end"===t?n=r[1]:pa(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]);return n}(i,n),o=r.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),c="x"===s||"radius"===s?1:0,d=ra(e.dimensions,function(e){return t.mapDimension(e)}),h=!1,p=t.getCalculationInfo("stackResultDimension");return YC(t,d[0])&&(h=!0,d[0]=p),YC(t,d[1])&&(h=!0,d[1]=p),{dataDimsForPoint:d,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function MT(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function TT(e,t){return!isFinite(e)||!isFinite(t)}var DT="undefined"!=typeof Float32Array?Float32Array:void 0,IT="undefined"!=typeof Float64Array?Float64Array:void 0;function AT(e){return PT({ctor:DT},e).arr}function PT(e,t){var n=e.arr,r=e.ctor;if(t>dc&&(t=dc),!n||e.typed&&n.length<t){var i=void 0;if(r)try{i=new r(t),e.typed=!0,n&&i.set(n)}catch(sv){}if(!i&&(i=[],e.typed=!1,n))for(var a=0,o=n.length;a<o;a++)i[a]=n[a];e.arr=i}return e}var OT=Math.min,RT=Math.max;function LT(e,t,n,r,i,a,o,s,l){for(var u,c,d,h,p,f,v=n,g=0;g<r;g++){var m=t[2*v],y=t[2*v+1];if(v>=i||v<0)break;if(TT(m,y)){if(l){v+=a;continue}break}if(v===n)e[a>0?"moveTo":"lineTo"](m,y),d=m,h=y;else{var _=m-u,x=y-c;if(_*_+x*x<.5){v+=a;continue}if(o>0){for(var b=v+a,w=t[2*b],S=t[2*b+1];w===m&&S===y&&g<r;)g++,v+=a,w=t[2*(b+=a)],S=t[2*b+1],_=(m=t[2*v])-u,x=(y=t[2*v+1])-c;var C=g+1;if(l)for(;TT(w,S)&&C<r;)C++,w=t[2*(b+=a)],S=t[2*b+1];var k=.5,M=0,T=0,D=void 0,I=void 0;if(C>=r||TT(w,S))p=m,f=y;else{M=w-u,T=S-c;var A=m-u,P=w-m,O=y-c,R=S-y,L=void 0,z=void 0;if("x"===s){var N=M>0?1:-1;p=m-N*(L=Math.abs(A))*o,f=y,D=m+N*(z=Math.abs(P))*o,I=y}else if("y"===s){var B=T>0?1:-1;p=m,f=y-B*(L=Math.abs(O))*o,D=m,I=y+B*(z=Math.abs(R))*o}else L=Math.sqrt(A*A+O*O),p=m-M*o*(1-(k=(z=Math.sqrt(P*P+R*R))/(z+L))),f=y-T*o*(1-k),I=y+T*o*k,D=OT(D=m+M*o*k,RT(w,m)),I=OT(I,RT(S,y)),D=RT(D,OT(w,m)),f=y-(T=(I=RT(I,OT(S,y)))-y)*L/z,p=OT(p=m-(M=D-m)*L/z,RT(u,m)),f=OT(f,RT(c,y)),D=m+(M=m-(p=RT(p,OT(u,m))))*z/L,I=y+(T=y-(f=RT(f,OT(c,y))))*z/L}e.bezierCurveTo(d,h,p,f,m,y),d=D,h=I}else e.lineTo(m,y)}u=m,c=y,v+=a}return g}var zT=function(){this.smooth=0,this.smoothConstraint=!0},NT=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return Ti(t,e),t.prototype.getDefaultStyle=function(){return{stroke:zy.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new zT},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&TT(n[2*i-2],n[2*i-1]);i--);for(;r<i&&TT(n[2*r],n[2*r+1]);r++);}for(;r<i;)r+=LT(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,r,i=this.path.data,a=Ah.CMD,o="x"===t,s=[],l=0;l<i.length;){var u=void 0,c=void 0,d=void 0,h=void 0,p=void 0,f=void 0,v=void 0;switch(i[l++]){case a.M:n=i[l++],r=i[l++];break;case a.L:if(u=i[l++],c=i[l++],(v=o?(e-n)/(u-n):(e-r)/(c-r))<=1&&v>=0){var g=o?(c-r)*v+r:(u-n)*v+n;return o?[e,g]:[g,e]}n=u,r=c;break;case a.C:u=i[l++],c=i[l++],d=i[l++],h=i[l++],p=i[l++],f=i[l++];var m=o?zs(n,u,d,p,e,s):zs(r,c,h,f,e,s);if(m>0)for(var y=0;y<m;y++){var _=s[y];if(_<=1&&_>=0){g=o?Rs(r,c,h,f,_):Rs(n,u,d,p,_);return o?[e,g]:[g,e]}}n=p,r=f}}},t}(Kh),BT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ti(t,e),t}(zT),FT=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return Ti(t,e),t.prototype.getDefaultShape=function(){return new BT},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&TT(n[2*a-2],n[2*a-1]);a--);for(;i<a&&TT(n[2*i],n[2*i+1]);i++);}for(;i<a;){var s=LT(e,n,i,a,a,1,t.smooth,o,t.connectNulls);LT(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(Kh);function ET(e,t,n,r,i){var a=e.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=n.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var d=new up({shape:{x:o,y:s,width:l,height:u}});if(t){var h=e.getBaseAxis(),p=h.isHorizontal(),f=h.inverse;p?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var v=ca(i)?function(e){i(e,d)}:null;Uv(d,{shape:{width:l,height:u,x:o,y:s}},n,null,r,v)}return d}function VT(e,t,n){var r=e.getArea(),i=oc(r.r0,1),a=oc(r.r,1),o=new dv({shape:{cx:oc(e.cx,1),cy:oc(e.cy,1),r0:i,r:a,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&("angle"===e.getBaseAxis().dim?o.shape.endAngle=r.startAngle:o.shape.r=i,Uv(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function HT(e,t){return e.type===t}function YT(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function WT(e){for(var t=[1/0,-1/0],n=[1/0,-1/0],r=0;r<e.length;){var i=e[r++],a=e[r++];TT(i,a)||(Kc(t,i),Kc(n,a))}return[t,n]}function $T(e,t){var n=WT(e),r=n[0],i=n[1],a=WT(t),o=a[0],s=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(i[0]-s[0]),Math.abs(r[1]-o[1]),Math.abs(i[1]-s[1]))}function GT(e){return pa(e)?e:e?.5:0}function UT(e,t,n,r,i){var a=n.getBaseAxis(),o="x"===a.dim||"radius"===a.dim?0:1,s=[],l=0,u=[],c=[],d=[],h=[];if(i){for(l=0;l<e.length;l+=2){var p=t||e;TT(p[l],p[l+1])||h.push(e[l],e[l+1])}e=h}for(l=0;l<e.length-2;l+=2)switch(d[0]=e[l+2],d[1]=e[l+3],c[0]=e[l],c[1]=e[l+1],s.push(c[0],c[1]),r){case"end":u[o]=d[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var f=(c[o]+d[o])/2,v=[];u[o]=v[o]=f,u[1-o]=c[1-o],v[1-o]=d[1-o],s.push(u[0],u[1]),s.push(v[0],v[1]);break;default:u[o]=c[o],u[1-o]=d[1-o],s.push(u[0],u[1])}return s.push(e[l++],e[l++]),s}function jT(e,t,n){var r=e.getVisual("visualMeta");if(r&&r.length&&e.count()&&"cartesian2d"===t.type){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if("x"===(i=s&&s.coordDim)||"y"===i){a=r[o];break}}if(a){var l=t.getAxis(i),u=ra(a.stops,function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}}),c=u.length,d=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var h=function(e,t){var n,r,i=[],a=e.length;function o(e,t,n){var r=e.coord;return{coord:n,color:dl((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<a;s++){var l=e[s],u=l.coord;if(u<0)n=l;else{if(u>t){r?i.push(o(r,l,t)):n&&i.push(o(n,l,0),o(n,l,t));break}n&&(i.push(o(n,l,0)),n=null),i.push(l),r=l}}return i}(u,"x"===i?n.getWidth():n.getHeight()),p=h.length;if(!p&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=h[0].coord-10,v=h[p-1].coord+10,g=v-f;if(g<.001)return"transparent";na(h,function(e){e.offset=(e.coord-f)/g}),h.push({offset:p?h[p-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:d[0]||"transparent"});var m=new Av(0,0,0,0,h,!0);return m[i]=f,m[i+"2"]=v,m}}}function ZT(e,t,n){var r=e.get("showAllSymbol"),i="auto"===r;if(!r||i){var a=n.getAxesByScale("ordinal")[0];if(a&&(!i||!function(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(1.5*yT.getSymbolSize(t,o)[e.isHorizontal()?1:0]>r)return!1;return!0}(a,t))){var o=t.mapDimension(a.dim),s={};return na(a.getViewLabels(),function(e){e.tick.offInterval||(s[Hk(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function qT(e,t){return[e[2*t],e[2*t+1]]}function XT(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<Ep.length;t++)if(e.get([Ep[t],"endLabel","show"]))return!0;return!1}function KT(e,t,n,r){if(HT(t,"cartesian2d")){var i=r.getModel("endLabel"),a=i.get("valueAnimation"),o=r.getData(),s={lastFrameIndex:0},l=XT(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=ET(t,n,r,function(){var t=e._endLabel;t&&n&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})},l);if(!r.get("clip",!0)){var d=c.shape,h=Math.max(d.width,d.height);u?(d.y-=h,d.height+=2*h):(d.x-=h,d.width+=2*h)}return l&&l(1,c),c}return VT(t,n,r)}var QT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ti(t,e),t.prototype.init=function(){var e=new Vu,t=new CT;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=sa(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel("lineStyle"),s=e.getModel("areaStyle"),l=a.getLayout("points")||[],u="polar"===r.type,c=this._coordSys,d=this._symbolDraw,h=this._polyline,p=this._polygon,f=this._lineGroup,v=!t.ssr&&e.get("animation"),g=!s.isEmpty(),m=s.get("origin"),y=kT(r,a,m),_=g&&function(e,t,n){if(null==n.valueDim)return[];for(var r=t.count(),i=AT(2*r),a=0;a<r;a++){var o=MT(n,e,t,a);i[2*a]=o[0],i[2*a+1]=o[1]}return i}(r,a,y),x=e.get("showSymbol"),b=e.get("connectNulls"),w=x&&!u&&ZT(e,a,r),S=this._data;S&&S.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),S.setItemGraphicEl(t,null))}),x||d.remove(),i.add(f);var C,k=!u&&e.get("step");r&&r.getArea&&e.get("clip",!0)&&(null!=(C=r.getArea()).width?(C.x-=.1,C.y-=.1,C.width+=.2,C.height+=.2):C.r0&&(C.r0-=.5,C.r+=.5)),this._clipShapeForSymbol=C;var M=jT(a,r,n)||a.getVisual("style")[a.getVisual("drawType")];if(h&&c.type===r.type&&k===this._step){g&&!p?p=this._newPolygon(l,_):p&&!g&&(f.remove(p),p=this._polygon=null),u||this._initOrUpdateEndLabel(e,r,fy(M));var T=f.getClipPath();if(T)Uv(T,{shape:KT(this,r,!1,e).shape},e);else f.setClipPath(KT(this,r,!0,e));x&&d.updateData(a,{isIgnore:w,clipShape:C,disableAnimation:!0,getSymbolPoint:function(e){return[l[2*e],l[2*e+1]]}}),YT(this._stackedOnPoints,_)&&YT(this._points,l)||(v?this._doUpdateAnimation(a,_,r,n,k,m,b):(k&&(_&&(_=UT(_,l,r,k,b)),l=UT(l,null,r,k,b)),h.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:_})))}else x&&d.updateData(a,{isIgnore:w,clipShape:C,disableAnimation:!0,getSymbolPoint:function(e){return[l[2*e],l[2*e+1]]}}),v&&this._initSymbolLabelAnimation(a,r,C),k&&(_&&(_=UT(_,l,r,k,b)),l=UT(l,null,r,k,b)),h=this._newPolyline(l),g?p=this._newPolygon(l,_):p&&(f.remove(p),p=this._polygon=null),u||this._initOrUpdateEndLabel(e,r,fy(M)),f.setClipPath(KT(this,r,!0,e));var D=e.getModel("emphasis"),I=D.get("focus"),A=D.get("blurScope"),P=D.get("disabled");(h.useStyle(Qi(o.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"})),kf(h,e,"lineStyle"),h.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(h.getState("emphasis").style.lineWidth=+h.style.lineWidth+1);kp(h).seriesIndex=e.seriesIndex,wf(h,I,A,P);var O=GT(e.get("smooth")),R=e.get("smoothMonotone");if(h.setShape({smooth:O,smoothMonotone:R,connectNulls:b}),p){var L=a.getCalculationInfo("stackedOnSeries"),z=0;p.useStyle(Qi(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),L&&(z=GT(L.get("smooth"))),p.setShape({smooth:O,stackedOnSmooth:z,smoothMonotone:R,connectNulls:b}),kf(p,e,"areaStyle"),kp(p).seriesIndex=e.seriesIndex,wf(p,I,A,P)}var N=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=N)}),this._polyline.onHoverStateChange=N,this._data=a,this._coordSys=r,this._stackedOnPoints=_,this._points=l,this._step=k,this._valueOrigin=m;var B=e.get("triggerEvent"),F=e.get("triggerLineEvent"),E=!0===F||!0===B||"line"===B,V=!0===F||!0===B||"area"===B;this.packEventData(e,h,E),p&&this.packEventData(e,p,V)},t.prototype.packEventData=function(e,t,n){kp(t).eventData=n?{componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line",selfType:t===this._polygon?"area":"line"}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=Hc(i,r);if(this._changePolyState("emphasis"),!(a instanceof Array)&&null!=a&&a>=0){var o=i.getLayout("points"),s=i.getItemGraphicEl(a);if(!s){var l=o[2*a],u=o[2*a+1];if(TT(l,u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(s=new yT(i,a)).x=l,s.y=u,s.setZ(c,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else fb.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=Hc(i,r);if(this._changePolyState("normal"),null!=a&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else fb.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;rf(this._polyline,e),t&&rf(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new NT({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new FT({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;"cartesian2d"===t.type?(r=a.isHorizontal(),i=!1):"polar"===t.type&&(r="angle"===a.dim,i=!0);var s=e.hostModel,l=s.get("animationDuration");ca(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=ca(u)?u(null):u;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],h=void 0,p=void 0,f=void 0;if(n)if(i){var v=n,g=t.pointToCoord(d);r?(h=v.startAngle,p=v.endAngle,f=-g[1]/180*Math.PI):(h=v.r0,p=v.r,f=g[0])}else{var m=n;r?(h=m.x,p=m.x+m.width,f=e.x):(h=m.y+m.height,p=m.y,f=e.y)}var y=p===h?0:(f-h)/(p-h);o&&(y=1-y);var _=ca(u)?u(a):l*y+c,x=s.getSymbolPath(),b=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:_}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:_}),x.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(XT(e)){var i=e.getData(),a=this._polyline,o=i.getLayout("points");if(!o)return a.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new pp({z2:200})).ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var l=function(e){for(var t=e.length/2;t>0&&TT(e[2*t-2],e[2*t-1]);t--);return t-1}(o);l>=0&&(Ug(a,jg(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?mT(i,n):gT(i,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?"right":"left":"center",o=r?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||a,verticalAlign:e.get("verticalAlign")||o}}}(r,t)),a.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),h=a.get("precision"),p=a.get("distance")||0,f=o.getBaseAxis(),v=f.isHorizontal(),g=f.inverse,m=t.shape,y=g?v?m.x:m.y+m.height:v?m.x+m.width:m.y,_=(v?p:0)*(g?-1:1),x=(v?0:-p)*(g?-1:1),b=v?"x":"y",w=function(e,t,n){for(var r,i,a=e.length/2,o="x"===n?0:1,s=0,l=-1,u=0;u<a;u++)if(!TT(i=e[2*u+o],e[2*u+1-o]))if(0!==u){if(r<=t&&i>=t||r>=t&&i<=t){l=u;break}s=u,r=i}else r=i;return{range:[s,l],t:(t-r)/(i-r)}}(u,y,b),S=w.range,C=S[1]-S[0],k=void 0;if(C>=1){if(C>1&&!d){var M=qT(u,S[0]);s.attr({x:M[0]+_,y:M[1]+x}),i&&(k=c.getRawValue(S[0]))}else{(M=l.getPointOn(y,b))&&s.attr({x:M[0]+_,y:M[1]+x});var T=c.getRawValue(S[0]),D=c.getRawValue(S[1]);i&&(k=function(e,t,n,r,i){var a=null==t||"auto"===t;if(null==r)return r;if(pa(r))return oc(f=Dc(n||0,r,i),a?Math.max(lc(n||0),lc(r)):t);if(da(r))return i<1?n:r;for(var o=[],s=n,l=r,u=Math.max(s?s.length:0,l.length),c=0;c<u;++c){var d=e.getDimensionInfo(c);if(d&&"ordinal"===d.type)o[c]=(i<1&&s?s:l)[c];else{var h=s&&s[c]?s[c]:0,p=l[c],f=Dc(h,p,i);o[c]=oc(f,a?Math.max(lc(h),lc(p)):t)}}return o}(n,h,T,D,w.t))}r.lastFrameIndex=S[0]}else{var I=1===e||r.lastFrameIndex>0?S[0]:0;M=qT(u,I);i&&(k=c.getRawValue(I)),s.attr({x:M[0]+_,y:M[1]+x})}if(i){var A=em(s);"function"==typeof A.setLabelText&&A.setLabelText(k)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,r,i,a,o){for(var s=function(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:"+",idx:e})}).update(function(e,t){n.push({cmd:"=",idx:t,idx1:e})}).remove(function(e){n.push({cmd:"-",idx:e})}).execute(),n}(e,t),l=[],u=[],c=[],d=[],h=[],p=[],f=[],v=kT(i,t,o),g=e.getLayout("points")||[],m=t.getLayout("points")||[],y=0;y<s.length;y++){var _=s[y],x=!0,b=void 0,w=void 0;switch(_.cmd){case"=":b=2*_.idx,w=2*_.idx1;var S=g[b],C=g[b+1],k=m[w],M=m[w+1];(isNaN(S)||isNaN(C))&&(S=k,C=M),l.push(S,C),u.push(k,M),c.push(n[b],n[b+1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(_.idx1));break;case"+":var T=_.idx,D=v.dataDimsForPoint,I=i.dataToPoint([t.get(D[0],T),t.get(D[1],T)]);w=2*T,l.push(I[0],I[1]),u.push(m[w],m[w+1]);var A=MT(v,i,t,T);c.push(A[0],A[1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(T));break;case"-":x=!1}x&&(h.push(_),p.push(p.length))}p.sort(function(e,t){return f[e]-f[t]});var P=l.length,O=AT(P),R=AT(P),L=AT(P),z=AT(P),N=[];for(y=0;y<p.length;y++){var B=p[y],F=2*y,E=2*B;O[F]=l[E],O[F+1]=l[E+1],R[F]=u[E],R[F+1]=u[E+1],L[F]=c[E],L[F+1]=c[E+1],z[F]=d[E],z[F+1]=d[E+1],N[y]=h[B]}return{current:O,next:R,stackedOnCurrent:L,stackedOnNext:z,status:N}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin),d=c.current,h=c.stackedOnCurrent,p=c.next,f=c.stackedOnNext;if(i&&(h=UT(c.stackedOnCurrent,c.current,n,i,o),d=UT(c.current,null,n,i,o),f=UT(c.stackedOnNext,c.next,n,i,o),p=UT(c.next,null,n,i,o)),$T(d,p)>3e3||l&&$T(h,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var v={shape:{points:p}};c.current!==d&&(v.shape.__points=c.next),s.stopAnimation(),Gv(s,v,u),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),Gv(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var g=[],m=c.status,y=0;y<m.length;y++)if("="===m[y].cmd){var _=e.getItemGraphicEl(m[y].idx1);_&&g.push({el:_,ptIdx:y})}s.animators&&s.animators.length&&s.animators[0].during(function(){l&&l.dirtyShape();for(var e=s.shape.__points,t=0;t<g.length;t++){var n=g[t].el,r=2*g[t].ptIdx;n.x=e[r],n.y=e[r+1],n.markRedraw()}})},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(fb);var JT={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},eD=function(e){return Math.round(e.length/2)};function tD(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get("sampling"),a=e.coordinateSystem,o=r.count();if(o>10&&"cartesian2d"===a.type&&i){var s=a.getBaseAxis(),l=a.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),h=Math.round(o/d);if(isFinite(h)&&h>1){"lttb"===i?e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/h)):"minmax"===i&&e.setData(r.minmaxDownSample(r.mapDimension(l.dim),1/h));var p=void 0;da(i)?p=JT[i]:ca(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(l.dim),1/h,p,eD))}}}}}var nD=function(e){function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||"value",o.position=a||"bottom",o}return Ti(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(HM);var rD="expandAxisBreak",iD=Math.PI,aD=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],oD=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],sD=Yc(),lD=Yc(),uD=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();var cD=[1,0,0,1,0,0],dD=new Go(0,0,0,0),hD=function(e,t,n,r,i,a){if(Bk(e.nameLocation)){var o=a.stOccupiedRect;o&&pD(function(e,t,n){return e.transform=zg(e.transform,n),e.localRect=Lg(e.localRect,t),e.rect=Lg(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Og(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}({},o,a.transGroup.transform),r,i)}else fD(a.labelInfoList,a.dirVec,r,i)};function pD(e,t,n){var r=new Po;XM(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&function(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}(t,r)}function fD(e,t,n,r){for(var i=Po.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||pD(s,n,r)}}var vD=function(){function e(e,t,n,r){this.group=new Vu,this._axisModel=e,this._api=t,this._local={},this._shared=r||new uD(hD),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},r=ba(e.axisName,t.get("name")),i=t.get("nameMoveOverlap");null!=i&&"auto"!==i||(i=ba(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:ba(e.nameDirection,1),tickDirection:ba(e.tickDirection,1),labelDirection:ba(e.labelDirection,1),labelOffset:ba(e.labelOffset,0),silent:ba(e.silent,!0),axisName:r,nameLocation:wa(t.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:MD(r)&&i,optionHideOverlap:t.get(["axisLabel","hideOverlap"]),showMinorTicks:t.get(["minorTick","show"])};this._cfg=a;var o=new Vu({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new Po(Math.cos(-a.rotation),Math.sin(-a.rotation))},e.prototype.build=function(e,t){var n=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),na(gD,function(r){e[r]&&mD[r](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},e.innerTextLayout=function(e,t,n){var r,i,a=hc(t-e);return pc(a)?(i=n>0?"top":"bottom",r="center"):pc(a-iD)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=a>0&&a<iD?n>0?"right":"left":n>0?"left":"right"),{rotation:a,textAlign:r,textVerticalAlign:i}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),gD=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],mD={axisLine:function(e,t,n,r,i,a,o){var s=r.get(["axisLine","show"]);if("auto"===s&&(s=!0,null!=e.raw.axisLineAutoShow&&(s=!!e.raw.axisLineAutoShow)),s){var l=r.axis.getExtent(),u=a.transform,c=[l[0],0],d=[l[1],0],h=c[0]>d[0];u&&(qa(c,c,u),qa(d,d,u));var p=Ki({lineCap:"round"},r.getModel(["axisLine","lineStyle"]).getLineStyle()),f={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get(["axisLine","breakLine"])&&Dm(r.axis.scale))null.buildAxisBreakLine(r,i,a,f);else{var v=new bv(Ki({shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]}},f));hg(v.shape,v.style.lineWidth),v.anid="line",i.add(v)}var g=r.get(["axisLine","symbol"]);if(null!=g){var m=r.get(["axisLine","symbolSize"]);da(g)&&(g=[g,g]),(da(m)||pa(m))&&(m=[m,m]);var y=Dw(r.get(["axisLine","symbolOffset"])||0,m),_=m[0],x=m[1];na([{rotate:e.rotation+Math.PI/2,offset:y[0],r:0},{rotate:e.rotation-Math.PI/2,offset:y[1],r:Math.sqrt((c[0]-d[0])*(c[0]-d[0])+(c[1]-d[1])*(c[1]-d[1]))}],function(t,n){if("none"!==g[n]&&null!=g[n]){var r=Tw(g[n],-_/2,-x/2,_,x,p.stroke,!0),a=t.r+t.offset,o=h?d:c;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){bD(t,i,s)&&yD(e,t,n,r,i,a,o,CM)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){bD(t,i,s)&&yD(e,t,n,r,i,a,o,kM);var l=function(e,t,n,r){var i=r.axis,a=r.getModel("axisTick"),o=a.get("show");"auto"===o&&(o=!0,null!=e.raw.axisTickAutoShow&&(o=!!e.raw.axisTickAutoShow));if(!o||i.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=e.tickDirection*a.get("length"),u=xD(i.getTicksCoords(),n.transform,l,Qi(s.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)t.add(u[c]);return u}(e,i,a,r);!function(e,t,n){if(e.showMinorTicks)return;na(t,function(e){if(e&&e.label.ignore)for(var t=0;t<n.length;t++){var r=n[t],i=lD(r),a=sD(e.label);if(null!=i.tickValue&&!i.onBand&&i.tickValue===a.labelInfo.tick.value)return void _D(r)}})}(e,t.labelLayoutList,l),function(e,t,n,r,i){var a=r.axis,o=r.getModel("minorTick");if(!e.showMinorTicks||a.scale.isBlank())return;var s=a.getMinorTicksCoords();if(!s.length)return;for(var l=o.getModel("lineStyle"),u=i*o.get("length"),c=Qi(l.getLineStyle(),Qi(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),d=0;d<s.length;d++)for(var h=xD(s[d],n.transform,u,c,"minorticks_"+d),p=0;p<h.length;p++)t.add(h[p])}(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var l=n.ensureRecord(r);t.nameEl&&(i.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=e.axisName;if(MD(u)){var c=e.nameLocation,d=e.nameDirection,h=r.getModel("nameTextStyle"),p=r.get("nameGap")||0,f=r.axis.getExtent(),v=r.axis.inverse?-1:1,g=new Po(0,0),m=new Po(0,0);"start"===c?(g.x=f[0]-v*p,m.x=-v):"end"===c?(g.x=f[1]+v*p,m.x=v):(g.x=(f[0]+f[1])/2,g.y=e.labelOffset+d*p,m.y=d);var y=[1,0,0,1,0,0];m.transform(Io(y,y,e.rotation));var _,x,b=r.get("nameRotate");null!=b&&(b=b*iD/180),Bk(c)?_=vD.innerTextLayout(e.rotation,null!=b?b:e.rotation,d):(_=function(e,t,n,r){var i,a,o=hc(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;pc(o-iD/2)?(a=l?"bottom":"top",i="center"):pc(o-1.5*iD)?(a=l?"top":"bottom",i="center"):(a="middle",i=o<1.5*iD&&o>iD/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:i,textVerticalAlign:a}}(e.rotation,c,b||0,f),null!=(x=e.raw.axisNameAvailableWidth)&&(x=Math.abs(x/Math.sin(_.rotation)),!isFinite(x)&&(x=null)));var w=h.getFont(),S=r.get("nameTruncate",!0)||{},C=S.ellipsis,k=xa(e.raw.nameTruncateMaxWidth,S.maxWidth,x),M=s.nameMarginLevel||0,T=new pp({x:g.x,y:g.y,rotation:_.rotation,silent:vD.isLabelSilent(r),style:Zg(h,{text:u,font:w,overflow:"truncate",width:k,ellipsis:C,fill:h.getTextColor()||r.get(["axisLine","lineStyle","color"]),align:h.get("align")||_.textAlign,verticalAlign:h.get("verticalAlign")||_.textVerticalAlign}),z2:1});if(Ig({el:T,componentModel:r,itemName:u}),T.__fullText=u,T.anid="name",r.get("triggerEvent")){var D=vD.makeAxisEventDataBase(r);D.targetType="axisName",D.name=u,kp(T).eventData=D}a.add(T),T.updateTransform(),t.nameEl=T;var I=l.nameLayout=UM({label:T,priority:T.z2,defaultAttr:{ignore:T.ignore},marginDefault:Bk(c)?aD[M]:oD[M]});if(l.nameLocation=c,i.add(T),T.decomposeTransform(),e.shouldNameMoveOverlap&&I){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,I,m,A)}}}};function yD(e,t,n,r,i,a,o,s){wD(t)||function(e,t,n,r,i,a){var o=i.axis,s=xa(e.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new Vu;n.add(l);var u=MM(r);if(!s||o.scale.isBlank())return void SD(t,[],l,u);var c=i.getModel("axisLabel"),d=o.getViewLabels(u),h=(xa(e.raw.labelRotate,c.get("rotate"))||0)*iD/180,p=vD.innerTextLayout(e.rotation,h,e.labelDirection),f=i.getCategories&&i.getCategories(!0),v=[],g=i.get("triggerEvent"),m=1/0,y=-1/0;na(d,function(e,t){var n,r=e.tick,s=e.formattedLabel,u=e.rawLabel,h=c,_=Hk(o.scale,r);if(f&&f[_]){var x=f[_];fa(x)&&x.textStyle&&(h=new fm(x.textStyle,c,i.ecModel))}var b=h.getTextColor()||i.get(["axisLine","lineStyle","color"]),w=h.getShallow("align",!0)||p.textAlign,S=ba(h.getShallow("alignMinLabel",!0),w),C=ba(h.getShallow("alignMaxLabel",!0),w),k=h.getShallow("verticalAlign",!0)||h.getShallow("baseline",!0)||p.textVerticalAlign,M=ba(h.getShallow("verticalAlignMinLabel",!0),k),T=ba(h.getShallow("verticalAlignMaxLabel",!0),k),D=10+((null===(n=r.time)||void 0===n?void 0:n.level)||0);m=Math.min(m,D),y=Math.max(y,D);var I=new pp({x:0,y:0,rotation:0,silent:vD.isLabelSilent(i),z2:D,style:Zg(h,{text:s,align:0===t?S:t===d.length-1?C:w,verticalAlign:0===t?M:t===d.length-1?T:k,fill:ca(b)?b("category"===o.type?u:"value"===o.type?_+"":_,t):b})});I.anid="label_"+_;var A=sD(I);if(A.labelInfo=e,A.layoutRotation=p.rotation,Ig({el:I,componentModel:i,itemName:s,formatterParamsExtra:{isTruncated:function(){return I.isTruncated},value:u,tickIndex:t}}),g){var P=vD.makeAxisEventDataBase(i);P.targetType="axisLabel",P.value=u,P.tickIndex=t;var O=e.tick.break;if(O){var R=O.parsedBreak;P.break={start:R.vmin,end:R.vmax}}"category"===o.type&&(P.dataIndex=_),kp(I).eventData=P,O&&function(e,t,n,r){n.on("click",function(n){var i={type:rD,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+"AxisIndex"]=e.componentIndex,t.dispatchAction(i)})}(i,a,I,O)}v.push(I),l.add(I)}),SD(t,ra(v,function(e){return{label:e,priority:sD(e).labelInfo.tick.break?e.z2+(y-m+1):e.z2,defaultAttr:{ignore:e.ignore}}}),l,u)}(e,t,i,s,r,o);var l=t.labelLayoutList;!function(e,t,n,r){var i=t.get(["axisLabel","margin"]);na(n,function(n,a){var o=UM(n);if(o){var s=o.label,l=sD(s);o.suggestIgnore=s.ignore,s.ignore=!1,pu(CD,kD);var u=t.axis;CD.x=u.dataToCoord(Hk(u.scale,l.labelInfo.tick)),CD.y=e.labelOffset+e.labelDirection*i,CD.rotation=l.layoutRotation,r.add(CD),CD.updateTransform(),r.remove(CD),CD.decomposeTransform(),pu(s,CD),s.markRedraw(),$M(o,!0),UM(o)}})}(e,r,l,a),function(e,t,n){var r=null;if(!r)return;var i=r.retrieveAxisBreakPairs(n,function(e){return e&&sD(e.label).labelInfo.tick.break},!0),a=e.get(["breakLabelLayout","moveOverlap"],!0);!0!==a&&"auto"!==a||na(i,function(r){null.adjustBreakLabelPair(e.axis.inverse,t,[UM(n[r[0]]),UM(n[r[1]])])})}(r,e.rotation,l);var u=e.optionHideOverlap;!function(e,t,n){var r=e.axis,i=e.get(["axisLabel","customValues"]);if(function(e){return"category"===e.type&&0===zk(e.getLabelModel())}(r))return;function a(e,a,o){var s=UM(t[a]),l=UM(t[o]),u=r.scale;if(s&&l){if(null==e){if(!n&&i)return;var c=sD(s.label).labelInfo.tick;if(ak(u)&&c.notNice||sk(u)&&c.offInterval)return void _D(s.label)}if(!1===e||s.suggestIgnore)_D(s.label);else if(l.suggestIgnore)_D(l.label);else{var d=.1;if(!n){var h=[0,0,0,0];s=ZM({marginForce:h},s),l=ZM({marginForce:h},l)}XM(s,l,null,{touchThreshold:d})&&_D(e?l.label:s.label)}}}var o=e.get(["axisLabel","showMinLabel"]),s=e.get(["axisLabel","showMaxLabel"]),l=t.length;a(o,0,1),a(s,l-1,l-2)}(r,l,u),u&&function(e){var t=[];function n(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}e.sort(function(e,t){return(t.suggestIgnore?1:0)-(e.suggestIgnore?1:0)||t.priority-e.priority});for(var r=0;r<e.length;r++){var i=UM(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,l=0;l<t.length;l++)if(XM(i,t[l],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}(aa(l,function(e){return e&&!e.label.ignore})),function(e,t,n,r){var i,a=n.axis,o=t.ensureRecord(n),s=[],l=MD(e.axisName)&&Bk(e.nameLocation);na(r,function(e){var t=UM(e);if(t&&!t.label.ignore){s.push(t);var n=o.transGroup;l&&(n.transform?Ao(cD,n.transform):ko(cD),t.transform&&To(cD,cD,t.transform),Go.copy(dD,t.localRect),dD.applyTransform(cD),i?i.union(dD):Go.copy(i=new Go(0,0,0,0),dD))}});var u=Math.abs(o.dirVec.x)>.1?"x":"y",c=o.transGroup[u];if(s.sort(function(e,t){return Math.abs(e.label[u]-c)-Math.abs(t.label[u]-c)}),l&&i){var d=a.getExtent(),h=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-h;i.union(new Go(h,0,p,1))}o.stOccupiedRect=i,o.labelInfoList=s}(e,n,r,l)}function _D(e){e&&(e.ignore=!0)}function xD(e,t,n,r,i){for(var a=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=n,t&&(qa(o,o,t),qa(s,s,t));var c=new bv({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});hg(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,a.push(c);var d=lD(c);d.onBand=!!e[l].onBand,d.tickValue=e[l].tickValue}return a}function bD(e,t,n){if(wD(e)){var r=e.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var i=!0,a=0;a<r.length;a++)i=i&&r[a]();if(i)return!1}r.length&&(t.remove(e.labelGroup),SD(e,null,null,null))}return!0}function wD(e){return!!e.labelLayoutList}function SD(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}var CD=new up,kD=new up;function MD(e){return!!e}function TD(e,t,n){n=n||{};var r=t.axis,i={},a=r.getAxesOnZeroOf()[0],o=r.position,s=a?"onZero":o,l=r.dim,u=[e.x,e.x+e.width,e.y,e.y+e.height],c={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get("offset")||0,h="x"===l?[u[2]-d,u[3]+d]:[u[0]-d,u[1]+d];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));h[c.onZero]=Math.max(Math.min(p,h[1]),h[0])}i.position=["y"===l?h[c[s]]:u[0],"x"===l?h[c[s]]:u[3]],i.rotation=Math.PI/2*("x"===l?0:1),i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[o],i.labelOffset=a?h[c[o]]-h[c.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),xa(n.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var f=t.get(["axisLabel","rotate"]);return i.labelRotate="top"===s?-f:f,i.z2=1,i}function DD(){var e;e=ID,tM["liPosMinGap"]=e}function ID(e,t,n){var r,i=Ra(),a=n.serUids,o=n.liPosMinGap,s=t.axis,l=s.scale,u=l.needTransform(),c=l.getFilter?l.getFilter():null,d=fx(c);function h(n){Qk(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(h(function(e,t,n){i.set(t.uid,1),a&&a.hasKey(t.uid)||(r=!0),p+=n.count()}),a&&a.keys().length===i.keys().length||(r=!0),r||null==o){PT(AD,p);var f=0;h(function(e,t,n){for(var r=0,i=n.count();r<i;++r){var a=n.get(e,r);!isFinite(a)||c&&!vx(d,a)||(u&&(a=l.transformIn(a,null)),AD.arr[f++]=a)}});var v=AD.typed?AD.arr.subarray(0,f):(AD.arr.length=f,AD.arr);AD.typed?v.sort():sc(v);for(var g=1/0,m=1;m<f;++m){var y=v[m]-v[m-1];y>0&&y<g&&(g=y)}n.liPosMinGap=t.liPosMinGap=Sc(g)?g:f>0?-2:-1,n.serUids=i}else t.liPosMinGap=o}var AD=PT({ctor:IT},50);function PD(e,t){return e+"|&"+t}function OD(e){return DD(),{liPosMinGap:!sk(e.scale)}}function RD(e,t,n,r){!function(e,t){var n=rM(t.seriesType,t.baseAxis,t.coordSysType);iM.set(n,t),$k(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:eM})})}(e,{key:t,seriesType:n,coordSysType:r,getMetrics:OD})}var LD={left:0,right:0,top:0,bottom:0},zD=["25%","25%"],ND="cartesian2d",BD=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ti(t,e),t.prototype.mergeDefaultAndTheme=function(t,n){var r=Oy(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&Py(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Py(this.option.outerBounds,t.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:LD,outerBoundsContain:"all",outerBoundsClampWidth:zD[0],outerBoundsClampHeight:zD[1],backgroundColor:zy.color.transparent,borderWidth:1,borderColor:zy.color.neutral30},t}(Ly),FD=rd();function ED(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function VD(e,t){var n=function(e,t){var n=PD(t,ND),r=[],i=EM(e,{fromStat:{key:n},min:1});return Kk(e,n,function(e){r.push({barWidth:ic(e.get("barWidth"),i.w),barMaxWidth:ic(e.get("barMaxWidth"),i.w),barMinWidth:ic(e.get("barMinWidth")||(YD(e)?.5:1),i.w),barGap:e.get("barGap"),barCategoryGap:e.get("barCategoryGap"),defaultBarGap:e.get("defaultBarGap"),stackId:ED(e)})}),{bandWidthResult:i,seriesInfo:r}}(e,t);return n.columnMap=function(e){var t,n,r=e.bandWidthResult.w,i=r,a=0,o=[],s={};na(e.seriesInfo,function(e,r){r||(n=e.defaultBarGap||0);var l=e.stackId;Na(s,l)||a++;var u=s[l];u||(u=s[l]={width:0,maxWidth:0},o.push(l));var c=e.barWidth;c&&!u.width&&(u.width=c,c=Uu(i,c),i-=c);var d=e.barMaxWidth;d&&(u.maxWidth=d);var h=e.barMinWidth;h&&(u.minWidth=h);var p=e.barGap;null!=p&&(n=p);var f=e.barCategoryGap;null!=f&&(t=f)}),null==t&&(t=ju(35-4*o.length,15)+"%");var l=ic(t,r),u=ic(n,1),c=(i-l)/(a+(a-1)*u);c=ju(c,0),na(o,function(e){var t=s[e],n=t.maxWidth,r=t.minWidth;if(t.width){o=t.width;n&&(o=Uu(o,n)),r&&(o=ju(o,r)),t.width=o,i-=o+u*o,a--}else{var o=c;n&&n<o&&(o=Uu(n,i)),r&&r>o&&(o=r),o!==c&&(t.width=o,i-=o+u*o,a--)}}),c=ju(c=(i-l)/(a+(a-1)*u),0);var d,h=0;na(o,function(e){var t=s[e];t.width||(t.width=c),d=t,h+=t.width*(1+u)}),d&&(h-=d.width*u);var p={},f=-h/2;return na(o,function(e){var t=s[e];p[e]=p[e]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+u)}),p}(n),n}function HD(e){return{seriesType:e,overallReset:function(t){var n=PD(e,ND);!function(e,t,n){var r=Gk(vw(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){n(e.axis)})}(t,n,function(t){var r=VD(t,e);Kk(t,n,function(e){var t=r.columnMap[ED(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function YD(e){return e.pipelineContext&&e.pipelineContext.large}function WD(e){return t=PD(e,ND),function(e,n){var r=EM(e,{fromStat:{key:t}});if(Sc(r.w2))return[-r.w2/2,r.w2/2]};var t}function $D(e){FD(e,function(){function t(t){var n=PD(t,ND);RD(e,n,t,ND),function(e,t){pM.set(e,t)}(n,WD(t))}t("bar"),t("pictorialBar")})}var GD=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ti(t,e),t.prototype.getInitialData=function(e,t){return WC(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)na(r.getAxes(),function(e,n){if("category"===e.type&&null!=t){var r=e.getTicksCoords(),o=e.getTickModel().get("alignWithLabel"),s=i[n],l="x1"===t[n]||"y1"===t[n];if(l&&!o&&(s+=1),r.length<2)return;if(2===r.length)return void(a[n]=e.toGlobalCoord(e.getExtent()[l?1:0]));for(var u=void 0,c=void 0,d=1,h=0;h<r.length;h++){var p=r[h].coord,f=h===r.length-1?r[h-1].tickValue+d:r[h].tickValue;if(f===s){c=p;break}if(f<s)u=p;else if(null!=u&&f>s){c=(p+u)/2;break}1===h&&(d=f-r[0].tickValue)}null==c&&(u?u&&(c=r[r.length-1].coord):c=r[0].coord),a[n]=e.toGlobalCoord(c)}});else{var o=this.getData(),s=o.getLayout("offset"),l=o.getLayout("size"),u=r.getBaseAxis().isHorizontal()?0:1;a[u]+=s+l/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(nb);nb.registerClass(GD);var UD=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ti(t,e),t.prototype.getInitialData=function(){return WC(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.__preparePipelineContext=function(e,t){var n=ld(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=mm(GD.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:zy.color.primary,borderWidth:2}},realtimeSort:!1}),t}(GD),jD=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},ZD=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return Ti(t,e),t.prototype.getDefaultShape=function(){return new jD},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=.5*(a-i),s=i+o,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,h=c?u-l<d:l-u<d;h||(l=u-(c?d:-d));var p=Math.cos(l),f=Math.sin(l),v=Math.cos(u),g=Math.sin(u);h?(e.moveTo(p*i+n,f*i+r),e.arc(p*s+n,f*s+r,o,-Math.PI+l,l,!c)):e.moveTo(p*a+n,f*a+r),e.arc(n,r,a,l,u,!c),e.arc(v*s+n,g*s+r,o,u-2*Math.PI,u-Math.PI,!c),0!==i&&e.arc(n,r,i,u,l,c)},t}(Kh);function qD(e,t,n){return t*Math.sin(e)*(n?-1:1)}function XD(e,t,n){return t*Math.cos(e)*(n?1:-1)}var KD=Math.max,QD=Math.min,JD=function(e){function t(){var t=e.call(this)||this;return t.type="bar",t._isFirstFrame=!0,t}return Ti(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");"cartesian2d"!==i&&"polar"!==i||(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){Pg(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i,a=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?i=u.isHorizontal():"polar"===l.type&&(i="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);d&&this._enableRealtimeSort(d,o,n);var h=e.get("clip",!0)||d,p=l.getArea();a.removeClipPath();var f=e.get("roundCap",!0),v=e.get("showBackground",!0),g=e.getModel("backgroundStyle"),m=g.get("borderRadius")||0,y=[],_=this._backgroundEls,x=r&&r.isInitSort,b=r&&"changeAxisOrder"===r.type;function w(e){var t=sI[l.type](o,e);if(!t)return null;var n=function(e,t,n){return new("polar"===e.type?dv:up)({shape:fI(t,n,e),silent:!0,z2:0})}(l,i,t);return n.useStyle(g.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",m):n.setShape("cornerRadius",m),y[e]=n,n}o.diff(s).add(function(t){var n=o.getItemModel(t),r=sI[l.type](o,t,n);if(r&&(v&&w(t),o.hasValue(t)&&oI[l.type](r))){var s=!1;h&&(s=eI[l.type](p,r));var g=tI[l.type](e,o,t,r,i,c,u.model,!1,f);d&&(g.forceLabelAnimation=!0),uI(g,o,t,n,r,e,i,"polar"===l.type),x?g.attr({shape:r}):d?nI(d,c,g,r,t,i,!1,!1):Uv(g,{shape:r},e,t),o.setItemGraphicEl(t,g),a.add(g),g.ignore=s}}).update(function(t,n){var r=o.getItemModel(t),S=sI[l.type](o,t,r);if(S){if(v){var C=void 0;0===_.length?C=w(n):((C=_[n]).useStyle(g.getItemStyle()),"cartesian2d"===l.type?C.setShape("r",m):C.setShape("cornerRadius",m),y[t]=C);var k=sI[l.type](o,t);Gv(C,{shape:fI(i,k,l)},c,t)}var M=s.getItemGraphicEl(n);if(o.hasValue(t)&&oI[l.type](S)){var T=!1;if(h&&(T=eI[l.type](p,S))&&a.remove(M),M&&("sector"===M.type&&f||"sausage"===M.type&&!f)&&(M&&Xv(M,e,n),M=null),M?Kv(M):M=tI[l.type](e,o,t,S,i,c,u.model,!0,f),d&&(M.forceLabelAnimation=!0),b){var D=M.getTextContent();if(D){var I=em(D);null!=I.prevValue&&(I.prevValue=I.value)}}else uI(M,o,t,r,S,e,i,"polar"===l.type);x?M.attr({shape:S}):d?nI(d,c,M,S,t,i,!0,b):Gv(M,{shape:S},e,t,null),o.setItemGraphicEl(t,M),M.ignore=T,a.add(M)}else a.remove(M)}}).remove(function(t){var n=s.getItemGraphicEl(t);n&&Xv(n,e,t)}).execute();var S=this._backgroundGroup||(this._backgroundGroup=new Vu);S.removeAll();for(var C=0;C<y.length;++C)S.add(y[C]);a.add(S),this._backgroundEls=y,this._data=o},t.prototype._renderLarge=function(e,t,n){this._clear(),hI(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),hI(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&function(e,t,n,r,i){return e?"polar"===e.type?VT(e,t,n):"cartesian2d"===e.type?ET(e,t,n,r,i):null:null}(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i=null==i?NaN:i,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:ra(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var l=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),u=l<0?Number.MIN_VALUE:t(e.indexOfRawIndex(l));if(u>a)return!0;a=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Xv(t,e,kp(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(fb),eI={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=KD(t.x,e.x),s=QD(t.x+t.width,i),l=KD(t.y,e.y),u=QD(t.y+t.height,a),c=s<o,d=u<l;return t.x=c&&o>i?s:o,t.y=d&&l>a?u:l,t.width=c?0:s-o,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=QD(t.r,e.r),a=KD(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){r=t.r;t.r=t.r0,t.r0=r}return o}},tI={cartesian2d:function(e,t,n,r,i,a,o,s,l){var u=new up({shape:Ki({},r),z2:1});(u.__dataIndex=n,u.name="item",a)&&(u.shape[i?"height":"width"]=0);return u},polar:function(e,t,n,r,i,a,o,s,l){var u=!i&&l?ZD:dv,c=new u({shape:r,z2:1});c.name="item";var d,h,p=lI(i);if(c.calculateTextPosition=(d=p,h=({isRoundCap:u===ZD}||{}).isRoundCap,function(e,t,n){var r=t.position;if(!r||r instanceof Array)return ku(e,t,n);var i=d(r),a=null!=t.distance?t.distance:5,o=this.shape,s=o.cx,l=o.cy,u=o.r,c=o.r0,p=(u+c)/2,f=o.startAngle,v=o.endAngle,g=(f+v)/2,m=h?Math.abs(u-c)/2:0,y=Math.cos,_=Math.sin,x=s+u*y(f),b=l+u*_(f),w="left",S="top";switch(i){case"startArc":x=s+(c-a)*y(g),b=l+(c-a)*_(g),w="center",S="top";break;case"insideStartArc":x=s+(c+a)*y(g),b=l+(c+a)*_(g),w="center",S="bottom";break;case"startAngle":x=s+p*y(f)+qD(f,a+m,!1),b=l+p*_(f)+XD(f,a+m,!1),w="right",S="middle";break;case"insideStartAngle":x=s+p*y(f)+qD(f,-a+m,!1),b=l+p*_(f)+XD(f,-a+m,!1),w="left",S="middle";break;case"middle":x=s+p*y(g),b=l+p*_(g),w="center",S="middle";break;case"endArc":x=s+(u+a)*y(g),b=l+(u+a)*_(g),w="center",S="bottom";break;case"insideEndArc":x=s+(u-a)*y(g),b=l+(u-a)*_(g),w="center",S="top";break;case"endAngle":x=s+p*y(v)+qD(v,a+m,!0),b=l+p*_(v)+XD(v,a+m,!0),w="left",S="middle";break;case"insideEndAngle":x=s+p*y(v)+qD(v,-a+m,!0),b=l+p*_(v)+XD(v,-a+m,!0),w="right",S="middle";break;default:return ku(e,t,n)}return(e=e||{}).x=x,e.y=b,e.align=w,e.verticalAlign=S,e}),a){var f=i?"r":"endAngle",v={};c.shape[f]=i?r.r0:r.startAngle,v[f]=r[f],(s?Gv:Uv)(c,{shape:v},a)}return c}};function nI(e,t,n,r,i,a,o,s){var l,u;a?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(o?Gv:Uv)(n,{shape:l},t,i,null),(o?Gv:Uv)(n,{shape:u},t?e.baseAxis.model:null,i)}function rI(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var iI=["x","y","width","height"],aI=["cx","cy","r","startAngle","endAngle"],oI={cartesian2d:function(e){return!rI(e,iI)},polar:function(e){return!rI(e,aI)}},sI={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?function(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var r=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}(n,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function lI(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function uI(e,t,n,r,i,a,o,s){var l=t.getItemVisual(n,"style");if(s){if(!a.get("roundCap")){var u=e.shape;Ki(u,function(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;ua(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:ra(r,function(e){return Cu(e,i)})}}(r.getModel("itemStyle"),u,!0)),e.setShape(u)}}else{var c=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(l);var d=r.getShallow("cursor");d&&e.attr("cursor",d);var h=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?function(e,t){return 0===e.height?t.getOtherAxis(t.getBaseAxis()).inverse?"bottom":"top":e.height>0?"bottom":"top"}(i,a.coordinateSystem):function(e,t){return 0===e.width?t.getOtherAxis(t.getBaseAxis()).inverse?"left":"right":e.width>=0?"right":"left"}(i,a.coordinateSystem),p=jg(r);Ug(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:gT(a.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var f=e.getTextContent();if(s&&f){var v=r.get(["label","position"]);e.textConfig.inside="middle"===v||null,function(e,t,n,r){if(pa(r))e.setTextConfig({rotation:r});else if(ua(t))e.setTextConfig({rotation:0});else{var i,a=e.shape,o=a.clockwise?a.startAngle:a.endAngle,s=a.clockwise?a.endAngle:a.startAngle,l=(o+s)/2,u=n(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=l;break;case"startAngle":case"insideStartAngle":i=o;break;case"endAngle":case"insideEndAngle":i=s;break;default:return void e.setTextConfig({rotation:0})}var c=1.5*Math.PI-i;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}(e,"outside"===v?h:v,lI(o),r.get(["label","rotate"]))}!function(e,t,n,r){if(e){var i=em(e);i.prevValue=i.value,i.value=n;var a=t.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=r,i.statesModels=t)}}(f,p,a.getRawValue(n),function(e){return mT(t,e)});var g=r.getModel(["emphasis"]);wf(e,g.get("focus"),g.get("blurScope"),g.get("disabled")),kf(e,r),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(i)&&(e.style.fill="none",e.style.stroke="none",na(e.states,function(e){e.style&&(e.style.fill=e.style.stroke="none")}))}var cI=function(){},dI=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return Ti(t,e),t.prototype.getDefaultShape=function(){return new cI},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,l=0;l<n.length;l+=3)o[r]=s,o[i]=n[l+2],a[r]=n[l+r],a[i]=n[l+i],e.rect(a[0],a[1],o[0],o[1])},t}(Kh);function hI(e,t,n,r){var i=e.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints"),c=r?function(e,t){return ba(t,!0)?e.seriesIndex+2:0}(e):0;if(u){var d=new dI({shape:{points:u},incremental:c,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(l.getItemStyle()),t.add(d),n&&n.push(d)}var h=new dI({shape:{points:i.getLayout("largePoints")},incremental:c,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,t.add(h),h.useStyle(i.getVisual("style")),h.style.stroke=null,kp(h).seriesIndex=e.seriesIndex,e.get("silent")||(h.on("mousedown",pI),h.on("mousemove",pI)),n&&n.push(h)}var pI=Sb(function(e){var t=function(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,d=a.length/3;c<d;c++){var h=3*c;if(l[r]=u,l[i]=a[h+2],s[r]=a[h+r],s[i]=a[h+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return o[c]}return-1}(this,e.offsetX,e.offsetY);kp(this).dataIndex=t>=0?t:null},30,!1);function fI(e,t,n){if(HT(n,"cartesian2d")){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var a=t;return{cx:(i=n.getArea()).cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:2*Math.PI}}var vI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ti(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Uc).models[0]},t.type="cartesian2dAxis",t}(Ly);ea(vI,Wk);var gI={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:"auto",onZeroAxisIndex:null,lineStyle:{color:zy.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:zy.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:zy.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[zy.color.backgroundTint,zy.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:zy.color.neutral00,borderColor:zy.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},mI=Xi({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},gI),yI=Xi({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:zy.color.axisMinorSplitLine,width:1}}},gI),_I={category:mI,value:yI,time:Xi({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},yI),log:Qi({logBase:10},yI)};function xI(e,t,n,r){na(Pk,function(i,a){var o=Xi(Xi({},_I[a],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+a,n}return Ti(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=Ay(this),r=n?Oy(e):{};Xi(e,t.getTheme().get(a+"Axis")),Xi(e,this.getDefaultOption()),e.type=bI(e),n&&Py(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=UC.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=null;return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+"Axis."+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",bI)}function bI(e){return e.type||(e.data?"category":"value")}var wI=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return ra(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),aa(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),SI=["x","y"];function CI(e){return("interval"===e.type||"time"===e.type)&&!Dm(e)}var kI=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=ND,t.dimensions=SI,t}return Ti(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(CI(e)&&CI(t)){var n=JC(e,null),r=JC(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var l=(a[0]-i[0])/o,u=(a[1]-i[1])/s,c=i[0]-n[0]*l,d=i[1]-r[0]*u,h=this._transform=[l,0,0,u,c,d];this._invTransform=Ao([],h)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Go(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],i=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=i&&isFinite(i))return qa(n,e,this._transform);var a=this.getAxis("x"),o=this.getAxis("y");return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n=n||[],this._invTransform)return qa(n,e,this._invTransform);var r=this.getAxis("x"),i=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(e){e=e||0;var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e,a=Math.max(t[0],t[1])-r+e,o=Math.max(n[0],n[1])-i+e;return new Go(r,i,a,o)},t}(wI);var MI=[[3,1],[0,2]],TI=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=SI,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function r(e){for(var t=oa(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):mM(i)}na(n,function(e){var t,n;t=e,n=e.__alignTo,Dm(t.scale)||Dm(n.scale)||n.scale.getTicks().length<2?mM(e):function(e,t){var n,r,i,a=e.scale,o=e.model,s=fM(a,o,o.ecModel,e,null),l=ok(a),u=ok(t)?t.intervalStub:t,c=l?a.intervalStub:a,d=a.base,h=u.getTicks(),p=u.getTicks({expandToNicedExtent:!0}),f=h.length-1;if(1===f)n=r=0,i=1;else if(2===f){var v=Zu(h[0].value-h[1].value),g=Zu(h[1].value-h[2].value);n=r=0,v===g?i=2:(i=1,v<g?n=v/g:r=g/v)}else{var m=u.getConfig().interval;n=(1-(h[0].value-p[0].value)/m)%1,r=(1-(p[f].value-h[f].value)/m)%1,i=f-(n?1:0)-(r?1:0)}var y,_,x,b,w,S,C=s.zoomFixMM,k=C[0]||C[1],M=[s.fixMM[0]||k,s.fixMM[1]||k],T=a.getExtent(),D=c.getExtent(),I=hk(D,M);function A(e){for(var t=0;t<50&&!e();t++)x=l?x*ju(d,2):lk(x),b=uk(x)}function P(){y=oc(S-x*n,b)}function O(){_=oc(w+x*r,b)}function R(){S=n?oc(y+x*n,b):y}function L(){w=r?oc(_-x*r,b):_}if(M[0]&&M[1]){y=I[0],_=I[1],x=(_-y)/(i+n+r);var z=e.getExtent(),N=Zu(z[1]-z[0]);b=uc([_,y],N,.5/i),R(),L(),Sc(b)&&(x=oc(x,b))}else{var B=I[1]-I[0];x=l?ju(gc(B),1):yc(B/i,2),b=uk(x),M[0]?(y=I[0],A(function(){if(R(),w=oc(S+x*i,b),O(),_>=I[1])return!0})):M[1]?(_=I[1],A(function(){if(L(),S=oc(w-x*i,b),P(),y<=I[0])return!0})):A(function(){S=oc(Ku(I[0]/x)*x,b),w=oc(Xu(I[1]/x)*x,b);var e=qu((w-S)/x);if(e<=i){var t=i-e,n=void 0,r=s.incl0||l;if(r&&0===I[0])n=[0,t];else if(r&&0===I[1])n=[t,0];else{var a=Xu(t/2);n=t%2==0?[a,a]:y+_<I[0]+I[1]?[a,a+1]:[a+1,a]}if(S=oc(S-x*n[0],b),w=oc(w+x*n[1],b),P(),O(),y<=I[0]&&_>=I[1])return!0}})}Vk(a,M,D,[y,_],T,{interval:x,intervalCount:i,intervalPrecision:b,niceExtent:[S,w]})}(e,e.__alignTo.scale)})}na(this._axesList,function(e){dM(e,1);var t=e.scale;sk(t)&&t.setSortInfo(e.model.get("categorySortInfo"))}),r(n.x),r(n.y);var i={};na(n.x,function(e){DI(n,"y",e,i)}),na(n.y,function(e){DI(n,"x",e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=Iy(e,t),i=this._rect=My(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get("containLabel");if(PI(a,i),!n){var l=function(e,t,n,r,i){var a=new uD(zI);return na(n,function(n){return na(n,function(n){if(Fk(n.model)){var o=!r;n.axisBuilder=function(e,t,n,r,i,a){for(var o=TD(e,n),s=!1,l=!1,u=0;u<t.length;u++)rk(t[u].getOtherAxis(n.axis).scale)&&(s=l=!0,"category"===n.axis.type&&n.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new vD(n,r,o,i)}(e,t,n.model,i,a,o)}})}),a}(i,o,a,s,t),u=void 0;if(s)u=RI(i.clone(),"axisLabel",null,i,a,l,r);else{var c=function(e,t,n){var r,i=e.get("outerBoundsMode",!0);"same"===i?r=t.clone():null!=i&&"auto"!==i||(r=My(e.get("outerBounds",!0)||LD,n.refContainer));var a,o=e.get("outerBoundsContain",!0);a=null==o||"auto"===o||Ji(["all","axisLabel"],o)<0?"all":o;var s=[ac(ba(e.get("outerBoundsClampWidth",!0),zD[0]),t.width),ac(ba(e.get("outerBoundsClampHeight",!0),zD[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:a,outerBoundsClamp:s}}(e,i,r),d=c.outerBoundsRect,h=c.parsedOuterBoundsContain,p=c.outerBoundsClamp;d&&(u=RI(d,h,p,i,a,l,r))}LI(i,a,kM,null,u,r),na(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}fa(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis("x").index===e||i[r].getAxis("y").index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,r=e.seriesModel,i=e.xAxisModel||r&&r.getReferringComponents("xAxis",Uc).models[0],a=e.yAxisModel||r&&r.getReferringComponents("yAxis",Uc).models[0],o=e.gridModel,s=this._coordsList;return r?Ji(s,t=r.coordinateSystem)<0&&(t=null):i&&a?t=this.getCartesian(i.componentIndex,a.componentIndex):i?n=this.getAxis("x",i.componentIndex):a?n=this.getAxis("y",a.componentIndex):o&&o.coordinateSystem===this&&(t=this._coordsList[0]),{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,a={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y)return this._axesMap={},void(this._axesList=[]);function l(t){return function(n,r){if(function(e,t){return e.getCoordSysModel()===t}(n,e)){var l=n.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=a.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=a.left?"right":"left"),a[l]=!0;var u,c=(null!=(u=n.get("type"))&&(Na(Pk,u)||$C.getClass(u))||(u="value"),u),d=new nD(t,function(e,t){var n;switch(t){case"category":return new vk({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new yk({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC"),breakOption:n});case"log":return new Tk({logBase:e.get("logBase"),breakOption:n});case"value":return new mk({breakOption:n});default:return new($C.getClass(t)||mk)({})}}(n,c),[0,0],c,l);d.onBand=Yk(d.scale,n),d.inverse=n.get("inverse"),n.axis=d,d.model=n,d.grid=i,d.index=r,i._axesList.push(d),o[t][r]=d,s[t]++}}}this._axesMap=o,na(o.x,function(t,n){na(o.y,function(i,a){var o="x"+n+"y"+a,s=new kI(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),AI(o.x),AI(o.y)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return na(this.getCartesians(),function(r){var i=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);Ji(t,i)<0&&t.push(i),Ji(n,a)<0&&n.push(a)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent("grid",function(i,a){var o=new e(i,t,n);o.name="grid_"+a,o.resize(i,n,!0),i.coordinateSystem=o,r.push(o),na(o._axesList,function(t){var n,r;n=t,r=e.dimIdxMap,cM(n).dimIdxInCoord=r.get(n.dim)})}),t.eachSeries(function(e){var t,n;!function(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=xy(t),o=a.kind,s=a.coordSysType;if(i&&1!==o&&(o=1,s=n),0===o||s!==n)return 0;var l=r(n,t);l&&(1===o?t.coordinateSystem=l:t.boxCoordinateSystem=l)}({targetModel:e,coordSysType:ND,coordSysProvider:function(){var r=function(e){var t={xAxisModel:null,yAxisModel:null};return na(t,function(n,r){var i=r.replace(/Model$/,"");t[r]=e.getReferringComponents(i,Uc).models[0]}),t}(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}}),t&&n&&(nM(t,e,ND),nM(n,e,ND))},this),r},e.dimensions=SI,e.dimIdxMap=xC(SI),e}();function DI(e,t,n,r){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,a=e[t],o=n.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)II(s,a[l])&&(i=a[l]);else for(var u in a)if(Na(a,u)&&II(s,a[u])&&!r[c(a[u])]){i=a[u];break}i&&(r[c(i)]=!0)}function c(e){return e.dim+"_"+e.index}}function II(e,t){if(!t)return!1;var n=function(e,t,n){var r=n?JC(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return td(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}(t.scale,0,!1),r=t&&"category"!==t.type&&"time"!==t.type&&3!==n;return r&&"auto"===e&&function(e){return Ok(e).noOnMyZero}(t)&&(r=!1),r}function AI(e){for(var t,n=oa(e),r=[],i=n.length-1;i>=0;i--){var a=e[+n[i]];rk(a.scale)&&null==Ek(a.model,a.type)&&(a.model.get("alignTicks")&&null==a.model.get("interval")?r.push(a):t=a)}t||(t=r.pop()),t&&na(r,function(e){e.__alignTo=t})}function PI(e,t){na(e.x,function(e){return OI(e,t.x,t.width)}),na(e.y,function(e){return OI(e,t.y,t.height)})}function OI(e,t,n){var r=[0,n],i=e.inverse?1:0;e.setExtent(r[i],r[1-i]),function(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t)}function RI(e,t,n,r,i,a,o){LI(r,i,CM,t,!1,o);var s=[0,0,0,0];u(0),u(1),c(r,0,NaN),c(r,1,NaN);var l=null==function(e,t,n){if(e&&t)for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}(s,function(e){return e>0});return Mg(r,s,!0,!0,n),PI(i,r),l;function u(e){na(i[eg[e]],function(t){if(Fk(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i<r.length;i++){var o=r[i],s=t.scale.normalize(Hk(t.scale,sD(o.label).labelInfo.tick));s=1===e?1-s:s,c(o.rect,e,s),c(o.rect,1-e,NaN)}var l=n.nameLayout;if(l){s=Bk(n.nameLocation)?.5:NaN;c(l.rect,e,s),c(l.rect,1-e,NaN)}}})}function c(t,n,r){var i=e[eg[n]]-t[eg[n]],a=t[tg[n]]+t[eg[n]]-(e[tg[n]]+e[eg[n]]);i=d(i,1-r),a=d(a,r);var o=MI[n][0],l=MI[n][1];s[o]=ju(s[o],i),s[l]=ju(s[l],a)}function d(e,t){return e>0&&!_a(t)&&t>1e-4&&(e/=t),e}}function LI(e,t,n,r,i,a){var o=n===kM;na(t,function(t){return na(t,function(t){Fk(t.model)&&(!function(e,t,n){var r=TD(t,n);e.updateCfg(r)}(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};function l(t){s[eg[1-t]]=e[tg[t]]<=.5*a.refContainer[tg[t]]?0:1-t==1?2:1}l(0),l(1),na(t,function(e,t){return na(e,function(e){Fk(e.model)&&(("all"===r||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}var zI=function(e,t,n,r,i,a){var o="x"===n.axis.dim?"y":"x";hD(e,0,0,r,i,a),Bk(e.nameLocation)||na(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&fD(e.labelInfoList,e.dirVec,r,i)})};function NI(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var r=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];na(n.getCoordinateSystems(),function(n){if(n.axisPointerEnabled){var s=VI(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",r);if(na(n.getAxes(),la(p,!1,null)),n.getTooltipAxes&&r&&u.get("show")){var c="axis"===u.get("trigger"),d="cross"===u.get(["axisPointer","type"]),h=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||d)&&na(h.baseAxes,la(p,!d||"cross",c)),d&&na(h.otherAxes,la(p,"cross",!1))}}function p(r,s,c){var d=c.model.getModel("axisPointer",i),h=d.get("show");if(h&&("auto"!==h||r||EI(d))){null==s&&(s=d.get("triggerTooltip")),d=r?function(e,t,n,r,i,a){var o=t.getModel("axisPointer"),s={};na(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(e){s[e]=qi(o.get(e))}),s.snap="category"!==e.type&&!!a,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(l.show??=!1,"cross"===i){var u=o.get(["label","show"]);if(l.show=null==u||u,!a){var c=s.lineStyle=o.get("crossStyle");c&&Qi(l,c.textStyle)}}return e.model.getModel("axisPointer",new fm(s,n,r))}(c,u,i,t,r,s):d;var p=d.get("snap"),f=d.get("triggerEmphasis"),v=VI(c.model),g=s||p||"category"===c.type,m=e.axesInfo[v]={key:v,axis:c,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:f,involveSeries:g,snap:p,useHandle:EI(d),seriesModels:[],linkGroup:null};l[v]=m,e.seriesInvolved=e.seriesInvolved||g;var y=function(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(BI(a[r+"AxisId"],n.id)||BI(a[r+"AxisIndex"],n.componentIndex)||BI(a[r+"AxisName"],n.name))return i}}(a,c);if(null!=y){var _=o[y]||(o[y]={axesInfo:{}});_.axesInfo[v]=m,_.mapper=a[y].mapper,m.linkGroup=_}}}})}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);n&&n.model&&"none"!==r&&!1!==r&&"item"!==r&&!1!==i&&!1!==t.get(["axisPointer","show"],!0)&&na(e.coordSysAxesInfo[VI(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}(n,e),n}function BI(e,t){return"all"===e||ua(e)&&Ji(e,t)>=0||e===t}function FI(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[VI(e)]}function EI(e){return!!e.get(["handle","show"])}function VI(e){return e.type+"||"+e.id}var HI={},YI=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ti(t,e),t.prototype.render=function(t,n,r,i){this.axisPointerClass&&function(e){var t=FI(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get("status"),o=n.get("value");null!=o&&(o=r.parse(o));var s=EI(n);null==a&&(i.status=s?"show":"hide");var l=r.getExtent();(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var a=function(e){var t=FI(e);return t&&t.axisPointerModel}(e);a?(this._axisPointer||(this._axisPointer=new i)).render(e,a,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){HI[e]=t},t.getAxisPointerClass=function(e){return e&&HI[e]},t.type="axis",t}(cb),WI=Yc();var $I=["splitArea","splitLine","minorSplitLine","breakArea"],GI=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return Ti(t,e),t.prototype.render=function(t,n,r,i){this.group.removeAll();var a=this._axisGroup;this._axisGroup=new Vu,this.group.add(this._axisGroup),Fk(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),na($I,function(e){t.get([e,"show"])&&UI[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&"changeAxisOrder"===i.type&&i.isInitSort||_g(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){WI(this).splitAreaColors=null},t.type="cartesianAxis",t}(YI),UI={splitLine:function(e,t,n,r,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=!1!==o.get("showMinLine"),c=!1!==o.get("showMaxLine");l=ua(l)?l:[l];for(var d=r.coordinateSystem.getRect(),h=a.isHorizontal(),p=0,f=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),v=[],g=[],m=s.getLineStyle(),y=0;y<f.length;y++){var _=a.toGlobalCoord(f[y].coord);if((0!==y||u)&&(y!==f.length-1||c)){var x=f[y].tickValue;h?(v[0]=_,v[1]=d.y,g[0]=_,g[1]=d.y+d.height):(v[0]=d.x,v[1]=_,g[0]=d.x+d.width,g[1]=_);var b=p++%l.length,w=new bv({anid:null!=x?"line_"+x:null,autoBatch:!0,shape:{x1:v[0],y1:v[1],x2:g[0],y2:g[1]},style:Qi({stroke:l[b]},m),silent:!0});hg(w.shape,m.lineWidth),t.add(w)}}}},minorSplitLine:function(e,t,n,r,i){var a=n.axis,o=n.getModel("minorSplitLine").getModel("lineStyle"),s=r.coordinateSystem.getRect(),l=a.isHorizontal(),u=a.getMinorTicksCoords();if(u.length)for(var c=[],d=[],h=o.getLineStyle(),p=0;p<u.length;p++)for(var f=0;f<u[p].length;f++){var v=a.toGlobalCoord(u[p][f].coord);l?(c[0]=v,c[1]=s.y,d[0]=v,d[1]=s.y+s.height):(c[0]=s.x,c[1]=v,d[0]=s.x+s.width,d[1]=v);var g=new bv({anid:"minor_line_"+u[p][f].tickValue,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:h,silent:!0});hg(g.shape,h.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){!function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=r.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,d=WI(e).splitAreaColors,h=Ra(),p=0;if(d)for(var f=0;f<u.length;f++){var v=d.get(u[f].tickValue);if(null!=v){p=(v+(c-1)*f)%c;break}}var g=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();for(s=ua(s)?s:[s],f=1;f<u.length;f++){var y=i.toGlobalCoord(u[f].coord),_=void 0,x=void 0,b=void 0,w=void 0;i.isHorizontal()?(_=g,x=l.y,b=y-_,w=l.height,g=_+b):(_=l.x,x=g,b=l.width,g=x+(w=y-x));var S=u[f-1].tickValue;null!=S&&h.set(S,p),t.add(new up({anid:null!=S?"area_"+S:null,shape:{x:_,y:x,width:b,height:w},style:Qi({fill:s[p]},m),autoBatch:!0,silent:!0})),p=(p+1)%c}WI(e).splitAreaColors=h}}}(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=null,o=n.axis.scale;a&&"ordinal"!==o.type&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},jI=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ti(t,e),t.type="xAxis",t}(GI),ZI=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=jI.type,t}return Ti(t,e),t.type="yAxis",t}(GI),qI=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return Ti(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new up({shape:e.coordinateSystem.getRect(),style:Qi({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(cb),XI={offset:0};function KI(e){e.registerComponentView(qI),e.registerComponentModel(BD),e.registerCoordinateSystem("cartesian2d",TI),xI(e,"x",vI,XI),xI(e,"y",vI,XI),e.registerComponentView(jI),e.registerComponentView(ZI),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var QI=Yc();function JI(e,t){return!!QI(e)[t]}rC({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Ba);var eA={axisPointer:1,tooltip:1,brush:1};var tA=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=sa(n._mousedownHandler,n),i=sa(n._mousemoveHandler,n),a=sa(n._mouseupHandler,n),o=sa(n._mousewheelHandler,n),s=sa(n._pinchHandler,n);return n.enable=function(e,n){var l=n.zInfo,u=Ng(l.component),c=u.z,d=u.zlevel,h={component:l.component,z:c,zlevel:d,z2:ba(l.z2,-1/0)},p=Ki({},n.triggerInfo);this._opt=Qi(Ki({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:h,triggerInfo:p,cursorGrab:"grab",cursorGrabbing:"grabbing"}),null==e&&(e=!0),this._enabled&&this._controlType===e||(this.disable(),this._enabled=!0,!0!==e&&"move"!==e&&"pan"!==e||(aA(t,"mousedown",r,h),aA(t,"mousemove",i,h),aA(t,"mouseup",a,h)),!0!==e&&"scale"!==e&&"zoom"!==e||(aA(t,"mousewheel",o,h),aA(t,"pinch",s,h)))},n.disable=function(){this._enabled&&(this._enabled=!1,oA(t,"mousedown",r),oA(t,"mousemove",i),oA(t,"mouseup",a),oA(t,"mousewheel",o),oA(t,"pinch",s))},n}return Ti(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var r=this._opt,i=r.zInfoParsed;if(function(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||eA.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=Ng(r),o=Ng(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}(e,r.api,i.component))return!1;var a=r.triggerInfo,o=!1;return"global"===a.roamTrigger&&(o=!0),o||(o=a.isInSelf(e,t,n)),o&&a.isInClip&&!a.isInClip(e,t,n)&&(o=!1),o},t.prototype._decideCursorStyle=function(e,t,n,r){var i=e.target;return!i&&this._checkPointer(e,t,n)?this._opt.cursorGrab:r?i&&i.cursor||"default":void 0},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!bo(e)&&!nA(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this._checkPointer(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if("pinch"!==e.gestureEvent&&!JI(t,"globalPan")&&!nA(e)){var n=e.offsetX,r=e.offsetY;if(this._dragging&&uA("moveOnMouseMove",e,this._opt)){t.setCursorStyle(this._opt.cursorGrabbing);var i=this._x,a=this._y,o=n-i,s=r-a;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&xo(e.event),e.__ecRoamConsumed=!0,lA(this,"pan","moveOnMouseMove",e,{dx:o,dy:s,oldX:i,oldY:a,newX:n,newY:r,isAvailableBehavior:null})}else{var l=this._decideCursorStyle(e,n,r,!1);l&&t.setCursorStyle(l)}}},t.prototype._mouseupHandler=function(e){if(!nA(e)){var t=this._zr;if(!bo(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!nA(e)){var t=uA("zoomOnMouseWheel",e,this._opt),n=uA("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,i=Math.abs(r),a=e.offsetX,o=e.offsetY;if(0!==r&&(t||n)){if(t){var s=i>3?1.4:i>1?1.2:1.1,l=r>0?s:1/s;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:l,originX:a,originY:o,isAvailableBehavior:null})}if(n){var u=Math.abs(r),c=(r>0?1:-1)*(u>3?.4:u>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:c,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!JI(this._zr,"globalPan")&&!nA(e)){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(xo(r.event),r.__ecRoamConsumed=!0,lA(e,t,n,r,i))},t}(eo);function nA(e){return e.__ecRoamConsumed}var rA=Yc();function iA(e){var t=rA(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function aA(e,t,n,r){for(var i=iA(e).roam,a=i[t]=i[t]||[],o=0;o<a.length;o++){var s=a[o].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}a.splice(o,0,{listener:n,zInfoParsed:r}),function(e,t){var n=iA(e);n.uniform[t]||e.on(t,n.uniform[t]=function(e){var r=n.roam[t];if(r)for(var i=0;i<r.length;i++)r[i].listener(e)})}(e,t)}function oA(e,t,n){for(var r=iA(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n)return r.splice(i,1),void(r.length||sA(e,t))}function sA(e,t){var n=iA(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function lA(e,t,n,r,i){i.isAvailableBehavior=sa(uA,null,n,r),e.trigger(t,i)}function uA(e,t,n){var r=n[e];return!e||r&&(!da(r)||t.event[r+"Key"])}function cA(e,t,n,r,i,a){e=e||0;var o=cc(n[1],-n[0]);if(null!=i&&(i=hA(i,[0,o])),null!=a&&(a=Math.max(a,null!=i?i:0)),"all"===r){var s=Math.abs(cc(t[1],-t[0]));s=hA(s,[0,o]),i=a=hA(s,[i,a]),r=0}t[0]=hA(t[0],n),t[1]=hA(t[1],n);var l=dA(t,r);t[r]+=e;var u=i||0,c=n.slice();l.sign<0?c[0]=cc(c[0],u):c[1]=cc(c[1],-u),t[r]=hA(t[r],c);var d=dA(t,r);return null!=i&&(d.sign!==l.sign||d.span<i)&&(t[1-r]=cc(t[r],l.sign*i)),d=dA(t,r),null!=a&&d.span>a&&(t[1-r]=cc(t[r],d.sign*a)),t}function dA(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function hA(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var pA=Yc(),fA=qi,vA=sa,gA=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get("value"),a=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||"hide"===a)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,i,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(o){var d=la(mA,t,c);this.updatePointerEl(o,l,d),this.updateLabelEl(o,l,d,t)}else o=this._group=new Vu,this.createPointerEl(o,l,e,t),this.createLabelEl(o,l,e,t),n.getZr().add(o);bA(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),r=e.axis,i="category"===r.type,a=t.get("snap");if(!a&&!i)return!1;if("auto"===n||null==n){var o=this.animationThreshold;if(i&&EM(r).w>o)return!0;if(a){var s=FI(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=pA(e).pointerEl=new Qv[i.type](fA(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=pA(e).labelEl=new pp(fA(t.label));e.add(i),_A(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=pA(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=pA(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),_A(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),i=this._handle,a=n.getModel("handle"),o=n.get("status");if(!a.get("show")||!o||"hide"===o)return i&&r.remove(i),void(this._handle=null);this._handle||(t=!0,i=this._handle=wg(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){xo(e.event)},onmousedown:vA(this._onHandleDragMove,this,0,0),drift:vA(this._onHandleDragMove,this),ondragend:vA(this._onHandleDragEnd,this)}),r.add(i)),bA(i,n,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");ua(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,Cb(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){mA(this._axisPointerModel,!t&&this._moveAnimation,this._handle,xA(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(xA(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(xA(r)),pA(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),kb(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}();function mA(e,t,n,r){yA(pA(n).lastProp,r)||(pA(n).lastProp=r,t?Gv(n,r,e):(n.stopAnimation(),n.attr(r)))}function yA(e,t){if(fa(e)&&fa(t)){var n=!0;return na(t,function(t,r){n=n&&yA(e[r],t)}),!!n}return e===t}function _A(e,t){e[t.get(["label","show"])?"show":"hide"]()}function xA(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function bA(e,t,n){var r=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=i&&(e.zlevel=i),e.silent=n)})}function wA(e,t,n,r,i){var a=SA(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),o=n.getModel("label"),s=uy(o.get("padding")||0),l=o.getFont(),u=xu(a,l),c=i.position,d=u.width+s[1]+s[3],h=u.height+s[0]+s[2],p=i.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var f=i.verticalAlign;"bottom"===f&&(c[1]-=h),"middle"===f&&(c[1]-=h/2),function(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,d,h,r);var v=o.get("backgroundColor");v&&"auto"!==v||(v=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:Zg(o,{text:a,font:l,fill:o.getTextColor(),padding:s,backgroundColor:v}),z2:10}}function SA(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Lk(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};na(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),da(o)?a=o.replace("{value}",a):ca(o)&&(a=o(s))}return a}function CA(e,t,n){var r=[1,0,0,1,0,0];return Io(r,r,n.rotation),Do(r,r,n.position),gg([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}var kA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ti(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get("type"),l=a.getGlobalExtent(),u=MA(o,a).getOtherAxis(a).getGlobalExtent(),c=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&"none"!==s){var d=function(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle()).fill=null:"shadow"===n&&((t=r.getAreaStyle()).stroke=null),t}(r),h=TA[s](a,c,l,u,r.get("seriesDataIndices"),r.ecModel);h.style=d,e.graphicKey=h.type,e.pointer=h}!function(e,t,n,r,i,a){var o=vD.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),wA(t,r,i,a,{position:CA(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}(t,e,TD(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=TD(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=CA(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=MA(a,i).getOtherAxis(i).getGlobalExtent(),l="x"===i.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Uu(o[1],u[l]),u[l]=ju(o[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];return d[l]=u[l],{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(gA);function MA(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var TA={line:function(e,t,n,r){return{type:"Line",subPixelOptimize:!0,shape:(i=[t,r[0]],a=[t,r[1]],o=DA(e),{x1:i[o=o||0],y1:i[1-o],x2:a[o],y2:a[1-o]})};var i,a,o},shadow:function(e,t,n,r,i,a){var o,s,l,u=function(e,t,n){return EM(e,{fromStat:{sers:ra(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}(e,i,a),c=r[1]-r[0],d=function(e,t,n){return[ju(Uu(t[0],t[1]),e-n/2),Uu(e+n/2,ju(t[0],t[1]))]}(t,n,u),h=d[0],p=d[1];return{type:"Rect",shape:(o=[h,r[0]],s=[p-h,c],l=DA(e),{x:o[l=l||0],y:o[1-l],width:s[l],height:s[1-l]})}}};function DA(e){return"x"===e.dim?0:1}var IA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ti(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:zy.color.border,width:1,type:"dashed"},shadowStyle:{color:zy.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:zy.color.neutral00,padding:[5,7,5,7],backgroundColor:zy.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:zy.color.accent40,throttle:40}},t}(Ly),AA=Yc(),PA=na;function OA(e,t,n){if(!Ii.node){var r=t.getZr();AA(r).records||(AA(r).records={}),function(e,t){if(AA(e).initialized)return;function n(n,r){e.on(n,function(n){var i=function(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}(t);PA(AA(e).records,function(e){e&&r(e,n,i.dispatchAction)}),function(e,t){var n,r=e.showTip.length,i=e.hideTip.length;r?n=e.showTip[r-1]:i&&(n=e.hideTip[i-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(i.pendings,t)})}AA(e).initialized=!0,n("click",la(LA,"click")),n("mousemove",la(LA,"mousemove")),n("mousewheel",la(LA,"mousewheel")),n("globalout",RA)}(r,t),(AA(r).records[e]||(AA(r).records[e]={})).handler=n}}function RA(e,t,n){e.handler("leave",null,n)}function LA(e,t,n,r){t.handler(e,n,r)}function zA(e,t){if(!Ii.node){var n=t.getZr();(AA(n).records||{})[e]&&(AA(n).records[e]=null)}}var NA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ti(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),i=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click|mousewheel";OA("axisPointer",n,function(e,t,n){"none"!==i&&("leave"===e||i.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){zA("axisPointer",t)},t.prototype.dispose=function(e,t){zA("axisPointer",t)},t.type="axisPointer",t}(cb);function BA(e,t){var n,r=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),o=Hc(a,e);if(null==o||o<0||ua(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,d=u.dim,h="x"===c||"radius"===c?1:0,p=a.mapDimension(d),f=[];f[h]=a.get(p,o),f[1-h]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(a.getValues(ra(l.dimensions,function(e){return a.mapDimension(e)}),o))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),r=[v.x+v.width/2,v.y+v.height/2]}return{point:r,el:s}}var FA=Yc();function EA(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||sa(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){$A(i)&&(i=BA({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=$A(i),u=a.axesInfo,c=s.axesInfo,d="leave"===r||$A(i),h={},p={},f={list:[],map:{}},v={showPointer:la(HA,p),showTooltip:la(YA,f)};na(s.coordSysMap,function(e,t){var n=l||e.containPoint(i);na(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(u,e);if(!d&&n&&(!u||a)){var o=a&&a.value;null!=o||l||(o=r.pointToData(i)),null!=o&&VA(e,o,v,!1,h)}})});var g={};return na(c,function(e,t){var n=e.linkGroup;n&&!p[t]&&na(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,WA(t),WA(e)))),g[e.key]=a}})}),na(g,function(e,t){VA(c[t],e,v,!0,h)}),function(e,t,n){var r=n.axesInfo=[];na(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status="show"),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status="hide"),"show"===i.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}(p,c,h),function(e,t,n,r){if($A(t)||!e.list.length)return void r({type:"hideTip"});var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}(f,i,e,o),function(e,t,n){var r=n.getZr(),i="axisPointerLastHighlights",a=FA(r)[i]||{},o=FA(r)[i]={};na(e,function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&na(n.seriesDataIndices,function(e){o[e.seriesIndex+"|"+e.dataIndex]=e})});var s=[],l=[];function u(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}na(a,function(e,t){!o[t]&&l.push(u(e))}),na(o,function(e,t){!a[t]&&s.push(u(e))}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),h}}function VA(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t))if(e.involveSeries){var o=function(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return na(t.seriesModels,function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var h=t.getAxisTooltipData(d,e,n);c=h.dataIndices,u=h.nestestValue}else{if(!(c=t.indicesOfNearest(r,d[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(d[0],c[0])}if(Sc(u)){var p=e-u,f=Math.abs(p);f<=o&&((f<o||p>=0&&s<0)&&(o=f,s=p,i=u,a.length=0),na(c,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==i.seriesIndex&&Ki(i,s[0]),!r&&e.snap&&a.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,o,l)}else n.showPointer(e,t)}function HA(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function YA(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var l=t.coordSys.model,u=VI(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function WA(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function $A(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function GA(e){YI.registerAxisPointerClass("CartesianAxisPointer",kA),e.registerComponentModel(IA),e.registerComponentView(NA),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!ua(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=NI(e,t)}}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},EA)}var UA=["x","y","radius","angle","single"],jA=Yc(),ZA=["cartesian2d","polar","singleAxis"];function qA(e){return e+"Axis"}function XA(e,t){var n,r=Ra(),i=[],a=Ra();e.eachComponent({mainType:"dataZoom",query:t},function(e){a.get(e.uid)||s(e)});do{n=!1,e.eachComponent("dataZoom",o)}while(n);function o(e){!a.get(e.uid)&&function(e){var t=!1;return e.eachTargetAxis(function(e,n){var i=r.get(e);i&&i[n]&&(t=!0)}),t}(e)&&(s(e),n=!0)}function s(e){a.set(e.uid,!0),i.push(e),e.eachTargetAxis(function(e,t){(r.get(e)||r.set(e,[]))[t]=!0})}return i}function KA(e){var t=e.ecModel,n={infoList:[],infoMap:Ra()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(qA(e),r);if(i){var a=i.getCoordSysModel();if(a){var o=a.uid,s=n.infoMap.get(o);s||(s={model:a,axisModels:[]},n.infoList.push(s),n.infoMap.set(o,s)),s.axisModels.push(i)}}}),n}function QA(e){var t=jA(fw(e));return t.axisProxyMap||(t.axisProxyMap=Ra())}function JA(e){if(e)return QA(e.ecModel).get(e.uid)}function eP(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?JA(n.model):null}var tP=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),nP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return Ti(t,e),t.prototype.init=function(e,t,n){var r=rP(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=rP(e);Xi(this.option,e,!0),Xi(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;na([["start","startValue"],["end","endValue"]],function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=Ra();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return na(UA,function(n){var r=this.getReferringComponents(qA(n),jc);if(r.specified){t=!0;var i=new tP;na(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i="vertical"===t?"y":"x";a(n.findComponents({mainType:i+"Axis"}),i)}r&&a(n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}}),"single");function a(t,n){var i=t[0];if(i){var a=new tP;if(a.add(i.componentIndex),e.set(n,a),r=!1,"x"===n||"y"===n){var o=i.getReferringComponents("grid",Uc).models[0];o&&na(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents("grid",Uc).models[0]&&a.add(e.componentIndex)})}}}r&&na(UA,function(t){if(r){var i=n.findComponents({mainType:qA(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var a=new tP;a.add(i[0].componentIndex),e.set(t,a),r=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");na([["start","startValue"],["end","endValue"]],function(r,i){var a=null!=e[r[0]],o=null!=e[r[1]];a&&!o?t[i]="percent":!a&&o?t[i]="value":n?t[i]=n[i]:a&&(t[i]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){null==e&&(e=this.ecModel.getComponent(qA(t),n))},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){na(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){return JA(this.getAxisModel(e,t))},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(qA(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;na([["start","startValue"],["end","endValue"]],function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;na(["start","startValue","end","endValue"],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getWindow().value;var n=this.findRepresentativeAxisProxy();return n?n.getWindow().value:void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return JA(e);for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],a=this._targetAxisInfoMap.get(i),o=0;o<a.indexList.length;o++){var s=this.getAxisProxy(i,a.indexList[o]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(Ly);function rP(e){var t={};return na(["start","end","startValue","endValue","throttle"],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var iP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ti(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(cb),aP=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getWindow=function(){return qi(this._window)},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(function(e){var t=e.get("coordinateSystem");return Ji(ZA,t)>=0}(t)){var n=qA(this._dimName),r=t.getReferringComponents(n,Uc).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return qi(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._extent,r=this.getAxisModel().axis,i=r.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u=[!1,!1];na(["start","end"],function(r,c){var d=e[r],h=e[r+"Value"];"percent"===a[c]?(d??=o[c],h=rc(d,o,n),u[c]=!0):(t=!0,null==h?h=n[c]:(h=i.parse(h),i.sanitize&&(h=i.sanitize(h,n))),d=rc(h,n,o)),l[c]=null==h||isNaN(h)?n[c]:h,s[c]=null==d||isNaN(d)?o[c]:d}),sc(l),sc(s);var c=this._minMaxSpan;function d(e,t,n,r,i){var a=i?"Span":"ValueSpan";cA(0,e,n,"all",c["min"+a],c["max"+a]);for(var o=0;o<2;o++)t[o]=rc(e[o],n,r,!0),i&&(t[o]=t[o],u[o]=!0);nd(t)}t?d(l,s,n,o,!1):d(s,l,o,n,!0);var h=sk(i)||ak(i),p=r.getExtent(),f=Zu(p[1]-p[0]),v=h?0:uc(l,f,.5);na([[0,Ku],[1,Xu]],function(e){var t=e[0],r=e[1];u[t]&&isFinite(v)&&(l[t]=oc(l[t],v),l[t]=Uu(n[1],ju(n[0],l[t])),s[t]===o[t]&&(l[t]=n[t],h&&(l[t]=r(l[t]))))}),nd(l);var g=[rc(l[0],n,o,!0),rc(l[1],n,o,!0)];return nd(g),{value:l,percent:s,percentInverted:g,valuePrecision:v}},e.prototype.reset=function(e,t){if(this.hostedBy(e)){var n=this.getAxisModel().axis;dM(n,2);var r=n.scale.rawExtentInfo;this._extent=r.makeNoZoom(),this._updateMinMaxSpan();var i=e.settledOption;t&&(i=Qi({start:t[0],end:t[1]},i));var a=this._window=this.calculateDataWindow(i),o=a.percent,s=a.value;0!==o[0]&&r.setZoomMM(0,s[0]),100!==o[1]&&r.setZoomMM(1,s[1])}},e.prototype.filterData=function(e,t){if(this.hostedBy(e)){var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get("filterMode"),a=this._window.value;"none"!==i&&na(r,function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===i){var o=t.getStore(),s=ra(r,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,i,l=0;l<r.length;l++){var u=o.get(s[l],e),c=!isNaN(u),d=u<a[0],h=u>a[1];if(c&&!d&&!h)return!0;c&&(i=!0),d&&(t=!0),h&&(n=!0)}return i&&t&&n})}else na(r,function(n){if("empty"===i)e.setData(t=t.map(n,function(e){return function(e){return e>=a[0]&&e<=a[1]}(e)?e:NaN}));else{var r={};r[n]=a,t.selectRange(r)}});na(r,function(e){t.setApproximateExtent(a,e)})}})}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._extent;na(["min","max"],function(r){var i=t.get(r+"Span"),a=t.get(r+"ValueSpan");null!=a&&(a=this.getAxisModel().axis.scale.parse(a)),null!=a?i=rc(n[0]+a,n,[0,100],!0):null!=i&&(a=rc(i,[0,100],n,!0)-n[0]),e[r+"Span"]=i,e[r+"ValueSpan"]=a},this)},e}(),oP={dirtyOnOverallProgress:!0,getTargetSeries:function(e){var t,n=[];t=function(t,r,i,a){if(!JA(i)){var o=new aP(t,r,a,e);n.push(o),function(e,t){QA(e.ecModel).set(e.uid,t)}(i,o)}},e.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(qA(r),i),n)})});var r=Ra();return na(n,function(e){na(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent("dataZoom",function(e){var n=[];e.eachTargetAxis(function(t,r){var i=e.getAxisProxy(t,r),a=eP(e,i);a?n.push([i,a]):i.reset(e,null)}),na(n,function(t){t[0].reset(e,t[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent("dataZoom",function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getWindow(),r=n.percent,i=n.value;e.setCalculatedRange({start:r[0],end:r[1],startValue:i[0],endValue:i[1]})}})}};var sP=rd();function lP(e){sP(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,oP),function(e){e.registerAction("dataZoom",function(e,t){na(XA(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"})})}var uP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ti(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click|mousewheel",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:zy.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:zy.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:zy.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:zy.color.tertiary,fontSize:14}},t}(Ly);function cP(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function dP(e){if(Ii.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}var hP=dP(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function pP(e,t){if(!e)return t;t=ly(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var fP=pP(dP(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),vP=pP(hP,"transform"),gP="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Ii.transform3dSupported?"will-change:transform;":"");function mP(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Ii.transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var a=Ii.transform3dSupported,o="translate"+(a?"3d":"")+"("+r+","+i+(a?",0":"")+")";return n?"top:0;left:0;"+vP+":"+o+";":[["top",0],["left",0],[hP,o]]}function yP(e,t,n,r){var i=[],a=e.get("transitionDuration"),o=e.get("backgroundColor"),s=e.get("shadowBlur"),l=e.get("shadowColor"),u=e.get("shadowOffsetX"),c=e.get("shadowOffsetY"),d=e.getModel("textStyle"),h=Kx(e,"html"),p=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+p),t&&a>0&&i.push(function(e,t,n){var r="cubic-bezier(0.23,1,0.32,1)",i="",a="";return n&&(a="opacity"+(i=" "+e/2+"s "+r)+",visibility"+i),t||(i=" "+e+"s "+r,a+=(a.length?",":"")+(Ii.transformSupported?""+vP+i:",left"+i+",top"+i)),fP+":"+a}(a,n,r)),o&&i.push("background-color:"+o),na(["width","color","radius"],function(t){var n="border-"+t,r=ly(n),a=e.get(r);null!=a&&i.push(n+":"+a+("color"===t?"":"px"))}),i.push(function(e){var t=[],n=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont());var i=ba(e.get("lineHeight"),Math.round(3*n/2));n&&t.push("line-height:"+i+"px");var a=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),na(["decoration","align"],function(n){var r=e.get(n);r&&t.push("text-"+n+":"+r)}),t.join(";")}(d)),null!=h&&i.push("padding:"+uy(h).join("px ")+"px"),i.join(";")+";"}function _P(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&function(e,t,n,r,i){oo(ao,t,r,i,!0)&&oo(e,n,ao[0],ao[1])}(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var xP=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ii.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(da(i)?document.querySelector(i):ma(i)?i:ca(i)&&i(e.getDom()));_P(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!o._enterable){var t=r.handler;yo(r.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=(a="position",(o=(i=t).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(i))?a?o[a]:o:null),r=t.style;"absolute"!==r.position&&"absolute"!==n&&(r.position="relative")}var i,a,o,s=e.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=gP+yP(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+mP(i[0],i[1],!0)+"border-color:"+fy(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(null!=e){var o="";if(da(i)&&"item"===n.get("trigger")&&!cP(n)&&(o=function(e,t,n){if(!da(n)||"inside"===n)return"";var r=e.get("backgroundColor"),i=e.get("borderWidth");t=fy(t);var a,o,s="left"===(a=n)?"right":"right"===a?"left":"top"===a?"bottom":"top",l=Math.max(1.5*Math.round(i),6),u="",c=vP+":";Ji(["left","right"],s)>-1?(u+="top:50%",c+="translateY(-50%) rotate("+(o="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(o="top"===s?225:45)+"deg)");var d=o*Math.PI/180,h=l+i,p=h*Math.abs(Math.cos(d))+h*Math.abs(Math.sin(d)),f=t+" solid "+i+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",(u+=";"+s+":-"+Math.round(100*((p-Math.SQRT2*i)/2+Math.SQRT2*i-(p-h)/2))/100+"px")+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+r+";"].join("")+'"></div>'}(n,r,i)),da(e))a.innerHTML=e+o;else if(e){a.innerHTML="",ua(e)||(e=[e]);for(var s=0;s<e.length;s++)ma(e[s])&&e[s].parentNode!==a&&a.appendChild(e[s]);if(o&&a.childNodes.length){var l=document.createElement("div");l.innerHTML=o,a.appendChild(l)}}}else a.innerHTML=""},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(_P(n,this._zr,this._container,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style;na(mP(n[0],n[1]),function(e){r[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility="hidden",t.opacity="0"):t.display="none",Ii.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(sa(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;!function(e,t){function n(e){var t=e[io];t&&(t.clearMarkers&&t.clearMarkers(),delete e[io])}e&&n(e),t&&n(t)}(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},e}(),bP=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),CP(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var a=this;fa(e)&&Tc(""),this.el&&this._zr.remove(this.el);var o=n.getModel("textStyle");this.el=new pp({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:Kx(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),na(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(e){a.el.style[e]=n.get(e)}),na(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(e){a.el.style[e]=o.get(e)||0}),this._zr.add(this.el);var s=this;this.el.on("mouseover",function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on("mouseout",function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=SP(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;CP(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=wP(i.borderWidth||0),o=SP(i);n.x=e+a+o.left,n.y=t+a+o.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(sa(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function wP(e){return Math.max(0,e)}function SP(e){var t=wP(e.shadowBlur||0),n=wP(e.shadowOffsetX||0),r=wP(e.shadowOffsetY||0);return{left:wP(t-n),right:wP(t+n),top:wP(t-r),bottom:wP(t+r)}}function CP(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var kP=new up({shape:{x:-1,y:-1,width:2,height:2}}),MP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ti(t,e),t.prototype.init=function(e,t){if(!Ii.node&&t.getDom()){var n,r=e.getComponent("tooltip"),i=this._renderMode="auto"===(n=r.get("renderMode"))?Ii.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===i?new bP(t):new xP(t,{appendTo:r.get("appendToBody",!0)?"body":r.get("appendTo",!0)})}},t.prototype.render=function(e,t,n){if(!Ii.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?Cb(this,"_updatePosition",50,"fixRate"):kb(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");OA("itemTooltip",this._api,sa(function(t,n,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,r):"leave"===t&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if("axis"!==e.get("trigger")&&(this._lastDataByCoordSys=null,this._cbParamsList=null),null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Ii.node&&n.getDom()){var i=DP(r,n);this._ticket="";var a=r.dataByCoordSys,o=function(e,t,n){var r=Gc(e).queryOptionMap,i=r.keys()[0];if(!i||"series"===i)return;var a=Zc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(!a)return;var o,s=n.getViewOfComponentModel(a);if(s.group.traverse(function(t){var n=kp(t).tooltipConfig;if(n&&n.name===e.name)return o=t,!0}),o)return{componentMainType:i,componentIndex:a.componentIndex,el:o}}(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:"bottom"},i)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=kP;l.x=r.x,l.y=r.y,l.update(),kp(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var u=BA(r,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:r.position,positionDefault:"bottom"},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(DP(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=a&&null!=o){var s=t.getSeriesByIndex(i);if(s&&"axis"===TP([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if("legend"===kp(n).ssrType)return;var i,a;this._lastDataByCoordSys=null,this._cbParamsList=null,uw(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(null!=kp(e).dataIndex?i=e:null!=kp(e).tooltipConfig&&(a=e))},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=sa(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=TP([t.tooltipOption],r),o=this._renderMode,s=[],l=Yx("section",{blocks:[],noHeader:!0}),u=[],c=new Qx;na(e,function(e){na(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&null!=i){var h=SA(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=Yx("section",{header:h,noHeader:!Ma(h),sortBlocks:!0,blocks:[]});l.blocks.push(p),na(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),l=i.dataIndexInside,f=a.getDataParams(l);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=Lk(t.axis,{value:d}),f.axisValueLabel=h,f.marker=c.makeTooltipMarker("item",fy(f.color),o);var v=sx(a.formatTooltip(l,!0,null)),g=v.frag;if(g){var m=TP([a],r).get("valueFormatter");p.blocks.push(m?Ki({valueFormatter:m},g):g)}v.text&&u.push(v.text),s.push(f)}})}})}),l.blocks.reverse(),u.reverse();var d=t.position,h=a.get("order"),p=Zx(l,c,o,h,n.get("useUTC"),a.get("textStyle"));p&&u.unshift(p);var f="richText"===o?"\n\n":"<br/>",v=u.join(f);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,v,s,Math.random()+"",i[0],i[1],d,null,c)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=kp(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,l=i.dataIndex,u=i.dataType,c=s.getData(u),d=this._renderMode,h=e.positionDefault,p=TP([c.getItemModel(l),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),f=p.get("trigger");if(null==f||"item"===f){var v=s.getDataParams(l,u),g=new Qx;v.marker=g.makeTooltipMarker("item",fy(v.color),d);var m=sx(s.formatTooltip(l,!1,u)),y=p.get("order"),_=p.get("valueFormatter"),x=m.frag,b=x?Zx(_?Ki({valueFormatter:_},x):x,g,d,y,r.get("useUTC"),p.get("textStyle")):m.text,w="item_"+s.name+"_"+l;this._showOrMove(p,function(){this._showTooltipContent(p,b,v,w,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r="html"===this._renderMode,i=kp(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(da(a)){a={content:a,formatter:a},o=!0}o&&r&&a.content&&((a=qi(a)).content=co(a.content));var s=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&s.push(l),s.push({formatter:a.content});var u=e.positionDefault,c=TP(s,this._tooltipModel,u?{position:u}:null),d=c.get("content"),h=Math.random()+"",p=new Qx;this._showOrMove(c,function(){var n=qi(c.get("formatterParams")||{});this._showTooltipContent(c,d,n,h,e.offsetX,e.offsetY,e.position,t,p)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");o=o||e.get("position");var d=t,h=this._getNearestPoint([i,a],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)).color;if(c)if(da(c)){var p=e.ecModel.get("useUTC"),f=ua(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=$m(f.axisValue,d,p)),d=py(d,n,!0)}else if(ca(c)){var v=sa(function(t,r){t===this._ticket&&(u.setContent(r,l,e,h,o),this._updatePosition(e,o,i,a,u,n,s))},this);this._ticket=r,d=c(n,r,v)}else d=c;u.setContent(d,l,e,h,o),u.show(e,h),this._updatePosition(e,o,i,a,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){return"axis"===n||ua(t)?{color:r||i}:ua(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=i.getSize(),c=e.get("align"),d=e.get("verticalAlign"),h=o&&o.getBoundingRect().clone();if(o&&h.applyTransform(o.transform),ca(t)&&(t=t([n,r],a,i.el,h,{viewSize:[s,l],contentSize:u.slice()})),ua(t))n=ic(t[0],s),r=ic(t[1],l);else if(fa(t)){var p=t;p.width=u[0],p.height=u[1];var f=My(p,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(da(t)&&o){var v=function(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+o;break;case"left":s=t.x-i-o,l=t.y+c/2-a/2;break;case"right":s=t.x+u+o,l=t.y+c/2-a/2}return[s,l]}(t,h,u,e.get("borderWidth"));n=v[0],r=v[1]}else{v=function(e,t,n,r,i,a,o){var s=n.getSize(),l=s[0],u=s[1];null!=a&&(e+l+a+2>r?e-=l+a:e+=a);null!=o&&(t+u+o>i?t-=u+o:t+=o);return[e,t]}(n,r,i,s,l,c?null:20,d?null:20);n=v[0],r=v[1]}if(c&&(n-=IP(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=IP(d)?u[1]/2:"bottom"===d?u[1]:0),cP(e)){v=function(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,r,i,s,l);n=v[0],r=v[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&na(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];(i=i&&o.length===s.length)&&na(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],l=a.seriesDataIndices||[];(i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===l.length)&&na(o,function(e,t){var n=l[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&na(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!Ii.node&&t.getDom()&&(kb(this,"_updatePosition"),this._tooltipContent.dispose(),zA("itemTooltip",t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type="tooltip",t}(cb);function TP(e,t,n){var r,i=t.ecModel;n?(r=new fm(n,i,i),r=new fm(t.option,r,i)):r=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof fm&&(o=o.get("tooltip",!0)),da(o)&&(o={formatter:o}),o&&(r=new fm(o,r,i)))}return r}function DP(e,t){return e.dispatchAction||sa(t.dispatchAction,t)}function IP(e){return"center"===e||"middle"===e}var AP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return Ti(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),ua(t)&&na(t,function(e,r){da(e)&&(e={type:e}),t[r]=Xi(e,function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i,a=r.name;if(n.push(a),r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(o)),o.length?t=t.concat(o):i=!0}else i=!0;i&&Ec(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get("data")||t,i=Ra(),a=ra(r,function(e){return(da(e)||pa(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new fm(e,this,this.ecModel))},this);this._data=aa(a,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;"single"===this.get("selectedMode")&&na(this._data,function(e){t[e.get("name")]=!1});t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;na(e,function(e){t[e.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;na(e,function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&Ji(this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:zy.size.m,align:"auto",backgroundColor:zy.color.transparent,borderColor:zy.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:zy.color.disabled,inactiveBorderColor:zy.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:zy.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:zy.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:zy.color.tertiary,borderWidth:1,borderColor:zy.color.border},emphasis:{selectorLabel:{show:!0,color:zy.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Ly),PP=la,OP=na,RP=Vu,LP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return Ti(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new RP),this.group.add(this._selectorGroup=new RP),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var i=e.get("align"),a=e.get("orient");i&&"auto"!==i||(i="right"===e.get("left")&&"vertical"===a?"right":"left");var o=e.get("selector",!0),s=e.get("selectorPosition",!0);!o||s&&"auto"!==s||(s="horizontal"===a?"end":"start"),this.renderInner(i,e,t,n,o,a,s);var l=Iy(e,n).refContainer,u=e.getBoxLayoutParams(),c=e.get("padding"),d=My(u,l,c),h=this.layoutInner(e,i,d,r,o,s),p=My(Qi({width:h.width,height:h.height},u),l,c);this.group.x=p.x-h.x,this.group.y=p.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=function(e,t){var n=uy(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),new up({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}(h,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),l=Ra(),u=t.get("selectedMode"),c=t.get("triggerEvent"),d=[];n.eachRawSeries(function(e){!e.get("legendHoverLink")&&d.push(e.id)}),OP(t.getData(),function(i,a){var o=this,h=i.get("name");if(!this.newlineDisabled&&(""===h||"\n"===h)){var p=new RP;return p.newline=!0,void s.add(p)}var f=n.getSeriesByName(h)[0];if(!l.get(h))if(f){var v=f.getData(),g=v.getVisual("legendLineStyle")||{},m=v.getVisual("legendIcon"),y=v.getVisual("style"),_=this._createItem(f,h,a,i,t,e,g,y,m,u,r);_.on("click",PP(zP,h,null,r,d)).on("mouseover",PP(NP,f.name,null,r,d)).on("mouseout",PP(BP,f.name,null,r,d)),n.ssr&&_.eachChild(function(e){var t=kp(e);t.seriesIndex=f.seriesIndex,t.dataIndex=a,t.ssrType="legend"}),c&&_.eachChild(function(e){o.packEventData(e,t,f,a,h)}),l.set(h,!0)}else n.eachRawSeries(function(o){var s=this;if(!l.get(h)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(h))return;var f=p.indexOfName(h),v=p.getItemVisual(f,"style"),g=p.getItemVisual(f,"legendIcon"),m=ll(v.fill);m&&0===m[3]&&(m[3]=.2,v=Ki(Ki({},v),{fill:pl(m,"rgba")}));var y=this._createItem(o,h,a,i,t,e,{},v,g,u,r);y.on("click",PP(zP,null,h,r,d)).on("mouseover",PP(NP,null,h,r,d)).on("mouseout",PP(BP,null,h,r,d)),n.ssr&&y.eachChild(function(e){var t=kp(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType="legend"}),c&&y.eachChild(function(e){s.packEventData(e,t,o,a,h)}),l.set(h,!0)}},this)},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:"legend",componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};kp(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();OP(e,function(e){var r=e.type,i=new pp({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect",legendId:t.id})}});a.add(i),Ug(i,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),bf(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,l,u,c){var d=e.visualDrawType,h=i.get("itemWidth"),p=i.get("itemHeight"),f=i.isSelected(t),v=r.get("symbolRotate"),g=r.get("symbolKeepAspect"),m=r.get("icon"),y=function(e,t,n,r,i,a,o){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),OP(e,function(n,r){"inherit"===e[r]&&(e[r]=t[r])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?Jw(d,o):r.decal,"inherit"===u.fill&&(u.fill=r[i]);"inherit"===u.stroke&&(u.stroke=r[c]);"inherit"===u.opacity&&(u.opacity=("fill"===i?r:n).opacity);s(u,r);var h=t.getModel("lineStyle"),p=h.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===p.stroke&&(p.stroke=r.fill),!a){var f=t.get("inactiveBorderWidth"),v=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&v?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=m||l||"roundRect",r,o,s,d,f,c),_=new RP,x=r.getModel("textStyle");if(!ca(e.getLegendIcon)||m&&"inherit"!==m){var b="inherit"===m&&e.getData().getVisual("symbol")?"inherit"===v?e.getData().getVisual("symbolRotate"):v:0;_.add(function(e){var t=e.icon||"roundRect",n=Tw(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill=zy.color.neutral00,n.style.lineWidth=2);return n}({itemWidth:h,itemHeight:p,icon:l,iconRotate:b,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:g}))}else _.add(e.getLegendIcon({itemWidth:h,itemHeight:p,icon:l,iconRotate:v,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:g}));var w="left"===a?h+5:-5,S=a,C=i.get("formatter"),k=t;da(C)&&C?k=C.replace("{name}",null!=t?t:""):ca(C)&&(k=C(t));var M=f?x.getTextColor():r.get("inactiveColor");_.add(new pp({style:Zg(x,{text:k,x:w,y:p/2,fill:M,align:S,verticalAlign:"middle"},{inheritColor:M})}));var T=new up({shape:_.getBoundingRect(),style:{fill:"transparent"}}),D=r.getModel("tooltip");return D.get("show")&&Ig({el:T,componentModel:i,itemName:t,itemTooltipOption:D.option}),_.add(T),_.eachChild(function(e){e.silent=!0}),T.silent=!u,this.getContentGroup().add(_),bf(_),_.__legendDataIndex=n,_},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();ky(e.get("orient"),o,e.get("itemGap"),n.width,n.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),o.markRedraw(),i){ky("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],h=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",v=0===p?"height":"width",g=0===p?"y":"x";"end"===a?d[p]+=l[f]+h:u[p]+=c[f]+h,d[1-p]+=l[v]/2-c[v]/2,s.x=d[0],s.y=d[1],o.x=u[0],o.y=u[1];var m={x:0,y:0};return m[f]=l[f]+h+c[f],m[v]=Math.max(l[v],c[v]),m[g]=Math.min(0,c[g]+d[1-p]),m}return o.x=u[0],o.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(cb);function zP(e,t,n,r){BP(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),NP(e,t,n,r)}function NP(e,t,n,r){n.usingTHL()||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function BP(e,t,n,r){n.usingTHL()||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}function FP(e,t,n){var r="allSelect"===e||"inverseSelect"===e,i={},a=[];n.eachComponent({mainType:"legend",query:t},function(n){r?n[e]():n[e](t.name),EP(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent("legend",function(e){na(i,function(t,n){e[t?"select":"unSelect"](n)}),EP(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function EP(e,t){var n=t||{};return na(e.getData(),function(t){var r=t.get("name");if("\n"!==r&&""!==r){var i=e.isSelected(r);Na(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}var VP=ud(function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})});function HP(e){e.registerComponentModel(AP),e.registerComponentView(LP),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,VP),e.registerSubTypeDefaulter("legend",function(){return"plain"}),function(e){e.registerAction("legendToggleSelect","legendselectchanged",la(FP,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",la(FP,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",la(FP,"inverseSelect")),e.registerAction("legendSelect","legendselected",la(FP,"select")),e.registerAction("legendUnSelect","legendunselected",la(FP,"unSelect"))}(e)}var YP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ti(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=Oy(t);e.prototype.init.call(this,t,n,r),WP(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),WP(this,this.option,t)},t.type="legend.scroll",t.defaultOption=mm(AP.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:zy.color.accent50,pageIconInactiveColor:zy.color.accent10,pageIconSize:15,pageTextStyle:{color:zy.color.tertiary},animationDurationUpdate:800}),t}(AP);function WP(e,t,n){var r=[1,1];r[e.getOrient().index]=0,Py(t,n,{type:"box",ignoreSize:!!r})}var $P=Vu,GP=["width","height"],UP=["x","y"],jP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return Ti(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new $P),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new $P)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var l=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var u=this._controllerGroup,c=n.get("pageIconSize",!0),d=ua(c)?c:[c,c];p("pagePrev",0);var h=n.getModel("pageTextStyle");function p(e,t){var r=e+"DataIndex",a=wg(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:sa(l._pageGo,l,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,u.add(a)}u.add(new pp({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,l=GP[s],u=UP[s],c=GP[1-s],d=UP[1-s];i&&ky("horizontal",o,e.get("selectorItemGap",!0));var h=e.get("selectorButtonGap",!0),p=o.getBoundingRect(),f=[-p.x,-p.y],v=qi(n);i&&(v[l]=n[l]-p[l]-h);var g=this._layoutContentAndController(e,r,v,s,l,c,d,u);if(i){if("end"===a)f[s]+=g[l]+h;else{var m=p[l]+h;f[s]-=m,g[u]-=m}g[l]+=p[l]+h,f[1-s]+=g[d]+g[c]/2-p[c]/2,g[c]=Math.max(g[c],p[c]),g[d]=Math.min(g[d],p[d]+f[1-s]),o.x=f[0],o.y=f[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;ky(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),ky("horizontal",c,e.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),h=c.getBoundingRect(),p=this._showController=d[i]>n[i],f=[-d.x,-d.y];t||(f[r]=l[s]);var v=[0,0],g=[-h.x,-h.y],m=ba(e.get("pageButtonGap",!0),e.get("itemGap",!0));p&&("end"===e.get("pageButtonPosition",!0)?g[r]+=n[i]-h[i]:v[r]+=h[i]+m),g[1-r]+=d[a]/2-h[a]/2,l.setPosition(f),u.setPosition(v),c.setPosition(g);var y={x:0,y:0};if(y[i]=p?n[i]:d[i],y[a]=Math.max(d[a],h[a]),y[o]=Math.min(0,h[o]+g[1-r]),u.__rectSize=n[i],p){var _={x:0,y:0};_[i]=Math.max(n[i]-h[i]-m,0),_[a]=y[a],u.setClipPath(new up({shape:_})),u.__rectSize=_[i]}else c.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(e);return null!=x.pageIndex&&Gv(l,{x:x.contentPosition[0],y:x.contentPosition[1]},p?e:null),this._updatePageInfoView(e,x),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;na(["pagePrev","pageNext"],function(r){var i=null!=t[r+"DataIndex"],a=n.childOfName(r);a&&(a.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),a.cursor=i?"pointer":"default")});var r=n.childOfName("pageText"),i=e.get("pageFormatter"),a=t.pageIndex,o=null!=a?a+1:0,s=t.pageCount;r&&i&&r.setStyle("text",da(i)?i.replace("{current}",null==o?"":o+"").replace("{total}",null==s?"":s+""):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=GP[i],o=UP[i],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return h;var p=y(u);h.contentPosition[i]=-p.s;for(var f=s+1,v=p,g=p,m=null;f<=c;++f)(!(m=y(l[f]))&&g.e>v.s+r||m&&!_(m,v.s))&&(v=g.i>v.i?g:m)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=v.i),++h.pageCount),g=m;for(f=s-1,v=p,g=p,m=null;f>=-1;--f)(m=y(l[f]))&&_(g,m.s)||!(v.i<g.i)||(g=v,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=v.i),++h.pageCount,++h.pageIndex),v=m;return h;function y(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function _(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild(function(r,i){var a=r.__legendDataIndex;null==n&&null!=a&&(n=i),a===e&&(t=i)}),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(LP);function ZP(e){bM(HP),e.registerComponentModel(YP),e.registerComponentView(jP),function(e){e.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(e){e.setScrollDataIndex(n)})})}(e)}var qP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ti(t,e),t.type="dataZoom.inside",t.defaultOption=mm(nP.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(nP),XP=Yc();function KP(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function QP(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function JP(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function eO(e){e.registerUpdateLifecycle("coordsys:aftercreate",function(e,t){var n=XP(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=Ra());r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(e){na(KA(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,function(e,t){var n={model:t,containsPoint:la(JP,t),dispatchAction:la(QP,e),dataZoomInfoMap:null,controller:null},r=n.controller=new tA(e.getZr());return na(["pan","zoom","scrollMove"],function(e){r.on(e,function(t){var r=[];n.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var a=(i.getRange||{})[e],o=a&&a(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get("disabled",!0)&&o&&r.push({dataZoomId:i.model.id,start:o[0],end:o[1]})}}),r.length&&n.dispatchAction(r)})}),n}(t,n.model));(a.dataZoomInfoMap||(a.dataZoomInfoMap=Ra())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n,i=e.controller,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];null!=o&&(n=a.get(o))}if(n){var s=function(e,t,n){var r,i,a,o="type_",s={type_true:2,type_move:1,type_false:0,type_undefined:-1},l=!0;return e.each(function(e){var t=e.model,n=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");s[o+n]>s[o+r]&&(r=n),l=l&&t.get("preventDefaultMouseMove",!0),i=ba(t.get("cursorGrab",!0),i),a=ba(t.get("cursorGrabbing",!0),a)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!l,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:i,cursorGrabbing:a}}}(a,e,t);i.enable(s.controlType,s.opt),Cb(e,"dispatchAction",n.model.get("throttle",!0),"fixRate")}else KP(r,e)})})}var tO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return Ti(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(e,t,n){XP(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}(r,t,{pan:sa(nO.pan,this),zoom:sa(nO.zoom,this),scrollMove:sa(nO.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=XP(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var a=r[i],o=n.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||KP(n,o))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(iP),nO={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=iO[t](null,[r.originX,r.originY],o,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/r.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return cA(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1]?a:void 0}},pan:rO(function(e,t,n,r,i,a){var o=iO[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:rO(function(e,t,n,r,i,a){return iO[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function rO(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s)return cA(e(o,s,t,n,r,i),o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1]?o:void 0}}var iO={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],"x"===a.dim?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===a.orient?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function aO(e){lP(e),e.registerComponentModel(qP),e.registerComponentView(tO),eO(e)}var oO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ti(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=mm(nP.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:zy.color.accent10,borderRadius:0,backgroundColor:zy.color.transparent,dataBackground:{lineStyle:{color:zy.color.accent30,width:.5},areaStyle:{color:zy.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:zy.color.accent40,width:.5},areaStyle:{color:zy.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:zy.color.neutral00,borderColor:zy.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:zy.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:zy.color.tertiary},brushSelect:!0,brushStyle:{color:zy.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:zy.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(nP),sO=up,lO="horizontal",uO="vertical",cO=["line","bar","candlestick","scatter"],dO={easing:"cubicOut",duration:100,delay:0},hO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return Ti(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=sa(this._onBrush,this),this._onBrushEnd=sa(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),Cb(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){kb(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new Vu;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,r=Iy(e,t).refContainer,i=this._findCoordRect(),a=e.get("defaultLocationEdgeGap",!0)||0,o=this._orient===lO?{right:r.width-i.x-i.width,top:r.height-30-a-n,width:i.width,height:30}:{right:a,top:i.y,width:30,height:i.height},s=Oy(e.option);na(["right","top","width","height"],function(e){"ph"===s[e]&&(s[e]=o[e])});var l=My(s,r);this._location={x:l.x,y:l.y},this._size=[l.width,l.height],this._orient===uO&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n!==lO||i?n===lO&&i?{scaleY:o?1:-1,scaleX:-1}:n!==uO||i?{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?1:-1,scaleX:1});var s=e.getBoundingRect([a]),l=isNaN(s.x)?0:s.x,u=isNaN(s.y)?0:s.y;e.x=t.x-l,e.y=t.y-u,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new sO({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new sO({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:sa(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",a.on("mousemove",this._onBrush),a.on("mouseup",this._onBrushEnd)):(a.off("mousemove",this._onBrush),a.off("mouseup",this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(null!=o){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=i.getDataExtent(e.thisDim),c=i.getDataExtent(o),d=.3*(c[1]-c[0]);c=[c[0]-d,c[1]+d];var h,p=[0,t[1]],f=[0,t[0]],v=[[t[0],0],[0,0]],g=[],m=f[1]/Math.max(1,i.count()-1),y=t[0]/(u[1]-u[0]),_="time"===e.thisAxis.type,x=-m,b=Math.round(i.count()/t[0]);i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b)_||(x+=m);else{x=_?(+e-u[0])*y:x+m;var r=null==t||isNaN(t)||""===t,i=r?0:rc(t,c,p,!0);r&&!h&&n?(v.push([v[v.length-1][0],0]),g.push([g[g.length-1][0],0])):!r&&h&&(v.push([x,0]),g.push([x,0])),r||(v.push([x,i]),g.push([x,i])),h=r}}),s=this._shadowPolygonPts=v,l=this._shadowPolylinePts=g}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];for(var w=this.dataZoomModel,S=0;S<3;S++){var C=k(1===S);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}}}function k(e){var t=w.getModel(e?"selectedDataBackground":"dataBackground"),n=new Vu,r=new gv({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new yv({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){na(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!(n||!0!==t&&Ji(cO,e.get("type"))<0)){var o,s=r.getComponent(qA(i),a).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[i],u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(o=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:e.getData().mapDimension(i),otherDim:l,otherAxisInverse:o}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,l=o.get("borderRadius")||0,u=o.get("brushSelect"),c=t.filler=new sO({silent:u,style:{fill:o.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new sO({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:l},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:1,fill:zy.color.transparent}})),na([0,1],function(t){var a=o.get("handleIcon");!Cw[a]&&a.indexOf("path://")<0&&a.indexOf("image://")<0&&(a="path://"+a);var s,l=Tw(a,-1,0,2,2,null,!0);l.attr({cursor:(s=this._orient,"vertical"===s?"ns-resize":"ew-resize"),draggable:!0,drift:sa(this._onDragMove,this,t),ondragend:sa(this._onDragEnd,this),onmouseover:sa(this._onOverDataInfoTriggerArea,this,!0),onmouseout:sa(this._onOverDataInfoTriggerArea,this,!1),z2:5});var u=l.getBoundingRect(),c=o.get("handleSize");this._handleHeight=ic(c,this._size[1]),this._handleWidth=u.width/u.height*this._handleHeight,l.setStyle(o.getModel("handleStyle").getItemStyle()),l.style.strokeNoScale=!0,l.rectHover=!0,l.ensureState("emphasis").style=o.getModel(["emphasis","handleStyle"]).getItemStyle(),bf(l);var d=o.get("handleColor");null!=d&&(l.style.fill=d),i.add(n[t]=l);var h=o.getModel("textStyle"),p=(o.get("handleLabel")||{}).show||!1;e.add(r[t]=new pp({silent:!0,invisible:!p,style:Zg(h,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:h.getTextColor(),font:h.getFont()}),z2:10}))},this);var d=c;if(u){var h=ic(o.get("moveHandleSize"),a[1]),p=t.moveHandle=new up({style:o.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:h}}),f=.8*h,v=t.moveHandleIcon=Tw(o.get("moveHandleIcon"),-f/2,-f/2,f,f,zy.color.neutral00,!0);v.silent=!0,v.y=a[1]+h/2-.5,p.ensureState("emphasis").style=o.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var g=Math.min(a[1]/2,Math.max(h,10));(d=t.moveZone=new up({invisible:!0,shape:{y:a[1]-g,height:h+g}})).on("mouseover",function(){s.enterEmphasis(p)}).on("mouseout",function(){s.leaveEmphasis(p)}),i.add(p),i.add(v),i.add(d)}d.attr({draggable:!0,cursor:"grab",drift:sa(this._onActualMoveZoneDrift,this),ondragstart:sa(this._onActualMoveZoneDragStart,this),ondragend:sa(this._onActualMoveZoneDragEnd,this),onmouseover:sa(this._onOverDataInfoTriggerArea,this,!0),onmouseout:sa(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[rc(e[0],[0,100],t,!0),rc(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];cA(t,r,i,n.get("zoomLock")?"all":e,null!=a.minSpan?rc(a.minSpan,o,i,!0):null,null!=a.maxSpan?rc(a.maxSpan,o,i,!0):null);var s=this._range,l=this._range=sc([rc(r[0],i,o,!0),rc(r[1],i,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=sc(n.slice()),i=this._size;na([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],l=0;l<o.length;l++){var u=o[l],c=u.getClipPath();c||(c=new up,u.setClipPath(c)),c.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,a=["",""];if(t.get("showDetail")){var o=t.findRepresentativeAxisProxy(),s=o.getAxisModel().axis.scale;if(o){var l,u=this._range;if(e){var c={start:u[0],end:u[1]},d=eP(t,o);if(d){var h=d.calculateDataWindow(c).percentInverted;c={start:h[0],end:h[1]}}l=o.calculateDataWindow(c)}else l=o.getWindow();a=[pO(t,0,l,s),pO(t,1,l,s)]}}var p=sc(this._handleEnds.slice());function f(e){var t=vg(n.handles[e].parent,this.group),o=mg(0===e?"right":"left",t),s=this._handleWidth/2+5,l=gg([p[e]+(0===e?-s:s),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:i===lO?"middle":o,align:i===lO?o:"center",text:a[e]})}f.call(this,0),f.call(this,1)},t.prototype._onOverDataInfoTriggerArea=function(e){this._isOverDataInfoTriggerArea=e,this._showDataInfo(e)},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get("handleLabel")||{}).show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]).get("show")||!1,r=e||this._dragging?n:t,i=this._displayables,a=i.handleLabels;a[0].attr("invisible",!r),a[1].attr("invisible",!r),i.moveHandle&&this.api[r?"enterEmphasis":"leaveEmphasis"](i.moveHandle,1)},t.prototype._onActualMoveZoneDrift=function(e,t,n){this.api.getZr().setCursorStyle("grabbing"),this._onDragMove("all",e,t,n)},t.prototype._onActualMoveZoneDragStart=function(e){e.target.attr("cursor","grabbing"),this._showDataInfo(!0)},t.prototype._onActualMoveZoneDragEnd=function(e){e.target.attr("cursor","grab"),this._onDragEnd()},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,xo(r.event);var i=gg([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),a=this._updateInterval(e,i[0]),o=this.dataZoomModel.get("realtime");this._updateView(!o),a&&o&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval("all",n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new Po(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();cA(0,a,r,0,null!=o.minSpan?rc(o.minSpan,i,r,!0):null,null!=o.maxSpan?rc(o.maxSpan,i,r,!0):null),this._range=sc([rc(a[0],r,i,!0),rc(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(xo(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new sO({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),l=o.transformCoordToLocal(a.x,a.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),i.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?dO:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=KA(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:.2*r,y:.2*i,width:.6*r,height:.6*i}}return e},t.type="dataZoom.slider",t}(iP);function pO(e,t,n,r){var i=e.get("labelFormatter"),a=e.get("labelPrecision");null!=a&&"auto"!==a||(a=n.valuePrecision);var o=n.value[t],s=null==o||isNaN(o)?"":sk(r)||ak(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?oc(o,a,!0):o+"";return ca(i)?i(o,s):da(i)?i.replace("{value}",s):s}function fO(e){e.registerComponentModel(oO),e.registerComponentView(hO),lP(e)}function vO(e){return"function"==typeof e||Array.isArray(e)&&e.length>0}function gO(e){return"function"==typeof e?e:Array.isArray(e)&&0!==e.length?(...t)=>{let n;for(const r of e.slice())n=r(...t)||n;return n}:void 0}bM([function(e){e.registerPainter("canvas",fT)},function(e){e.registerChartView(JD),e.registerSeriesModel(UD),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,HD("bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,function(e){return{seriesType:e,plan:db(),reset:function(e){if(function(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get("showBackground",!0),l=t.mapDimension(i.dim),u=t.getCalculationInfo("stackResultDimension"),c=YC(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),h=i.toGlobalCoord(i.dataToCoord(function(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}(i))),p=YD(e),f=e.get("barMinHeight")||0,v=u&&t.getDimensionIndex(u),g=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(e,t){for(var r,i=e.count,l=p&&AT(3*i),u=p&&s&&AT(3*i),y=p&&AT(i),_=n.master.getRect(),x=d?_.width:_.height,b=t.getStore(),w=0;null!=(r=e.next());){var S=b.get(c?v:a,r),C=b.get(o,r),k=h,M=void 0;c&&(M=+S-b.get(a,r));var T=void 0,D=void 0,I=void 0,A=void 0;if(d){var P=n.dataToPoint([S,C]);c&&(k=n.dataToPoint([M,C])[0]),T=k,D=P[1]+m,I=P[0]-k,A=g,Zu(I)<f&&(I=(I<0?-1:1)*f)}else P=n.dataToPoint([C,S]),c&&(k=n.dataToPoint([C,M])[1]),T=P[0]+m,D=k,I=g,A=P[1]-k,Zu(A)<f&&(A=(A<=0?-1:1)*f);p?(l[w]=T,l[w+1]=D,l[w+2]=d?I:A,u&&(u[w]=d?_.x:T,u[w+1]=d?D:_.y,u[w+2]=x),y[r]=r):t.setItemLayout(r,{x:T,y:D,width:I,height:A}),w+=3}p&&t.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:u,valueAxisHorizontal:d})}}}}}}("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,tD("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),$D(e)},function(e){e.registerChartView(QT),e.registerSeriesModel(vT),e.registerLayout(function(e,t){return{seriesType:e,plan:db(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=ra(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,l=n.getCalculationInfo("stackResultDimension");YC(n,o[0])&&(o[0]=l),YC(n,o[1])&&(o[1]=l);var u=n.getStore(),c=n.getDimensionIndex(o[0]),d=n.getDimensionIndex(o[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=a&&AT(n*s),o=[],l=[],h=e.start,p=0;h<e.end;h++){var f=void 0;if(1===s){var v=u.get(c,h);f=r.dataToPoint(v,null,l)}else o[0]=u.get(c,h),o[1]=u.get(d,h),f=r.dataToPoint(o,null,l);a?(i[p++]=f[0],i[p++]=f[1]):t.setItemLayout(h,f.slice())}a&&(t.setLayout("points",i),t.setLayout("pointsRange",{start:e.start,end:e.end}))}}}}}}("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,tD("line"))},function(e){bM(KI),bM(GA)},function(e){bM(GA),e.registerComponentModel(uP),e.registerComponentView(MP),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ba),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ba)},function(e){bM(HP),bM(ZP)},function(e){bM(aO),bM(fO)}]);var mO=/^on[^a-z]/,yO=e=>mO.test(e);function _O(e){if(!yO(e))return null;let t=e.charAt(2).toLowerCase()+e.slice(3);const n=t.endsWith("Once");return n&&(t=t.slice(0,-4)),{event:t,once:n}}function xO(e){const t=Number(e);return Number.isInteger(t)&&t>=0&&t<Math.pow(2,32)-1&&String(t)===e}function bO(e){if(null==e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function wO(e,t){return 0===e||0===t}function SO(e,t){if(Object.is(e,t))return null===e||"object"!=typeof e;if(!bO(e)||!bO(t))return!1;const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Object.hasOwn(t,n)&&Object.is(e[n],t[n]))}function CO(e){j(`[vue-echarts] ${e}`)}var kO=["getWidth","getHeight","getDom","getZr","getId","getOption","isSSR","getDevicePixelRatio","resize","makeActionFromEvent","dispatchAction","updateLabelLayout","convertToPixel","convertToLayout","convertFromPixel","containPixel","getVisual","renderToCanvas","renderToSVGString","getSvgDataURL","getDataURL","getConnectedDataURL","appendData","clear"];var MO={autoresize:[Boolean,Object]},TO=Symbol();var DO={loading:Boolean,loadingType:String,loadingOptions:Object},IO={tooltip:["tooltip","formatter"],dataView:["toolbox","feature","dataView","optionToContent"]},AO=/-__proto__(?:-|$)/;function PO(e){return("tooltip"===e||e.startsWith("tooltip-")||"dataView"===e||e.startsWith("dataView-"))&&!e.endsWith("-")&&!e.includes("--")&&!AO.test(e)}function OO(e){const t=e.startsWith("tooltip")?"tooltip":"dataView",n=e.slice(t.length),r=n?n.slice(1).split("-"):[],i=IO[t];if(xO(r[0]??"")){const e=r.shift();r.push(i[0],e,...i.slice(1))}else r.push(...i);return r}function RO(e,t,n){const r=Array.isArray(e);if(r!==xO(t))return;const i=r?e[Number(t)]:e[t];let a;if(Array.isArray(i))a=[...i];else if(bO(i))a={...i};else{if(void 0!==i||r||xO(n))return;a={}}return LO(e,t,a),a}function LO(e,t,n){Array.isArray(e)?e[Number(t)]=n:e[t]=n}function zO(e,t,n,r=!1){let i=e;for(let o=0;o<t.length-1;o++){const e=RO(i,t[o],t[o+1]);if(!e)return!1;i=e}if(Array.isArray(i))return!1;const a=t[t.length-1];return r&&void 0!==i[a]||LO(i,a,n),!0}var NO="x-vue-echarts",BO=Symbol.for("vue-echarts.lifecycle");function FO(e){return"string"==typeof e||"number"==typeof e?String(e):void 0}function EO(e,t,n){if(!bO(e))return!0;const r=Object.create(null);for(const i of Object.keys(e)){const a=e[i];if(void 0!==a)if("graphic"===n&&"$action"===i&&(t.hasAction=!0),"graphic"!==n||"elements"!==i&&"children"!==i||!Array.isArray(a)){if("option"===n){const e=Ly.hasClass(i);if(Array.isArray(a)||e&&bO(a)){r[i]=VO(Array.isArray(a)?a:[a],t,"graphic"===i?"graphic":void 0,e);continue}}r[i]="media"===n&&"option"===i?EO(a,t,"option"):EO(a,t)}else r[i]=VO(a,t,"graphic",!0)}return r}function VO(e,t,n,r){const i=[];for(const a of e){const e=r?a:void 0;i.push({id:FO(e?.id),name:FO(e?.name),shape:EO(a,t,n)})}return i}function HO(e,t){return t?t.length<e.length:e.length>0}function YO(e){return void 0!==e.id?`id:${e.id}`:void 0!==e.name?`name:${e.name}`:void 0}function WO(e,t){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++){const n=YO(e[r]),i=YO(t[r]);if(n!==i&&(void 0!==n||void 0!==i))return!0}return!1}function $O(e,t){const n=new Map;for(let r=0;r<e.length;r++){const t=e[r];void 0!==t.id&&n.set(t.id,r)}return t.every((e,t)=>{const r=void 0===e.id?void 0:n.get(e.id);return void 0===r||r===t})}function GO(e,t){if(!0===e||!0===t)return!1;const n=Array.isArray(e),r=Array.isArray(t);if(n||r)return!n||!r||HO(e,t)||WO(e,t)||void 0!==UO(e,t);for(const i in e){const n=t[i];if(void 0===n||GO(e[i],n))return!0}return!1}function UO(e,t){let n;for(let r=0;r<e.length;r++){const i=e[r];let a;if(a=void 0!==i.id?t.find(e=>e.id===i.id)?.shape:t[r]?.shape,a&&GO(i.shape,a)){if(void 0!==i.id)return i;n??=i}}return n}function jO(e,t){const n=function(e){const t=e,n={hasAction:!1},r=Object.create(null),i=Object.create(null),a=[];for(const o of Object.keys(t)){const e=t[o],s=Ly.hasClass(o);if(Array.isArray(e)||s&&bO(e)){const t="options"===o?"option":"media"===o?"media":"graphic"===o?"graphic":void 0;r[o]=VO(Array.isArray(e)?e:[e],n,t,s);continue}bO(e)?i[o]=EO(e,n,"baseOption"===o?"option":void 0):void 0===e||s||a.push(o)}return{collections:r,objectShapes:i,leaves:a,hasAction:n.hasAction}}(t);if(!e)return{signature:n,plan:{notMerge:!1}};const r=function(e,t){let n;if(t.objectShapes.aria&&!e.objectShapes.aria)return null;for(const r in t.collections)if(!(e.collections[r]||e.objectShapes[r]||e.leaves.includes(r)||Ly.hasClass(r)))return null;for(const r in e.objectShapes){const n=e.objectShapes[r],i=t.objectShapes[r];if(n&&i){if(GO(n,i))return null}else if(!t.leaves.includes(r))return null}for(const r of e.leaves)if(!t.leaves.includes(r)&&void 0===t.collections[r]&&void 0===t.objectShapes[r])return null;for(const r in e.collections){const i=e.collections[r];if("graphic"===r&&t.hasAction)continue;const a=t.collections[r];if(!a&&!Ly.hasClass(r))return null;const o=HO(i,a),s=a&&!o&&WO(i,a),l=a?UO(i,a):void 0;if(void 0!==l?.id)return null;if(l||o||s){if(!Ly.hasClass(r))return null;if(a&&!$O(i,a))return null;(n??=[]).push(r)}}return n}(e,n);return null===r?{signature:n,plan:{notMerge:!n.hasAction}}:(r?.sort(),{signature:n,plan:r?{notMerge:!1,replaceMerge:r}:{notMerge:!1}})}var ZO="x-vue-echarts{display:block;width:100%;height:100%;min-width:0;}\nx-vue-echarts>.echarts-host{display:block;width:100%;height:100%;min-width:0;}\nx-vue-echarts>.echarts-host>:first-child,x-vue-echarts>.echarts-host>:first-child>canvas{border-radius:inherit;}\n";if("undefined"!=typeof window&&"undefined"!=typeof document)if(Array.isArray(document.adoptedStyleSheets)&&"replaceSync"in CSSStyleSheet.prototype){const e=new CSSStyleSheet;e.replaceSync(ZO),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}else{const e=document.createElement("style");e.textContent=ZO,document.head.appendChild(e)}var qO=function(){const e=globalThis.customElements;if(!e)return!1;const t=e.get(NO);if(t)return Boolean(t[BO]);class n extends HTMLElement{__dispose=null;disconnectedCallback(){this.__dispose&&queueMicrotask(()=>{if(!this.isConnected&&this.__dispose){const e=this.__dispose;this.__dispose=null,e()}})}}return Object.defineProperty(n,BO,{value:!0}),e.define(NO,n),!0}(),XO=Symbol(),KO=Symbol(),QO=Symbol(),JO=Symbol(),eR=R({name:"Echarts",inheritAttrs:!1,props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...MO,...DO},emits:{},slots:Object,setup(e,{attrs:t,expose:n,slots:r}){const i=oe(),a=oe(),o=oe(),s=oe(0),l=oe(0),u=V(KO,null),c=V(QO,null),d=V(JO,null),h=J(e,"autoresize"),p=J(e,"manualUpdate"),f=J(e,"loading"),v=J(e,"loadingType"),g=J(e,"loadingOptions"),m=K(()=>e.theme??le(u)??void 0),y=K(()=>e.initOptions??le(c)??void 0),_=K(()=>e.updateOptions??le(d)),x=function(e){return K(()=>{const t={};for(const n in e){if(n.startsWith("onNative:")){const r=n.slice(9);r&&(t[`on:${r}`]=e[n]);continue}yO(n)||(t[n]=e[n])}return t})}(t),b=oe(!1),{render:w,hasNewSlots:S,patchOption:C,setReady:k}=function(e,t){const n=ie();let r;const i=Q({}),a=Q({}),o=oe(!1),s=oe(!1),l=(t=!1)=>{const n=[];for(const r in e)"graphic"!==r&&(PO(r)?n.push(r):t&&CO(`Invalid slot name: ${r}`));return n};l(!0);let u=[],c=u,d=u;function h(e){if(e.length===u.length&&u.every(t=>e.includes(t)))return!1;for(const t of u)e.includes(t)||(delete a[t],delete i[t]);return u=e,!0}return $(()=>{h(c)&&t()}),G(()=>{u=c,o.value=!0}),{render:()=>{if(c=l(),0===c.length||!s.value||!o.value)return;const t=n.vnode.el.ownerDocument;return r??=t.createElement("div"),E(q,{to:r},c.map(t=>{const n=e[t],r=t in a?n?.(a[t]):void 0;return E("div",{key:t,ref:e=>{e?i[t]=e:delete i[t]},style:{display:"contents"}},r)}))},hasNewSlots:()=>l().some(e=>!u.includes(e)),patchOption:function(t){const n=l();let r;h(n);for(const e of d)n.includes(e)||(r??={...t},zO(r,OO(e),null,!0));if(0===n.length)return d=[],r??t;r??={...t};const o=[];for(const s of n){const t=t=>{if(e[s])return s in a&&Object.is(a[s],t)&&delete a[s],a[s]=t,i[s]};zO(r,OO(s),t)&&o.push(s)}return d=o,r},setReady:function(e){if(s.value=e,!e){d=[];for(const e of Object.keys(a))delete a[e]}}}}(r,j),{patchOption:M,render:T}={};let D,I,A=!1,P=!1,R=!1,L=p.value,z=!1,N=!1;const F=M?"post":"pre";function H(){return e.option??(M&&(r.graphic||N)?{}:void 0)}function Y(e){return void 0!==e&&o.value===e&&!b.value}function W(e){return!(!R||A)&&(A=!0,e.setTheme(m.value||{}),Y(e))}function U(e,t,n,i){const a="manual"===n;z=!1;const o=C(t),s=M?M(o):o,l="graphic"===n,u=a||l;let c,d;if(u)c=l?_.value??void 0:i;else if(_.value)c=_.value,d=null;else{const e=jO(D??void 0,o);c=e.signature.hasAction||null!==D&&"theme"!==n?e.plan:{...e.plan,notMerge:!0},d=e.signature}const h=Boolean(M&&r.graphic);if((l||N||h)&&!c?.notMerge){const e=c?.replaceMerge,t="string"==typeof e?[e]:e;t?.includes("graphic")||(c={...c,replaceMerge:t?[...t,"graphic"]:["graphic"]})}N=h,R=!0,u||(D=d),a||(I=t),e.setOption(s,c),Y(e)&&"theme"!==n&&W(e)&&!a&&U(e,t,"theme")}function j(e){const t=o.value;if(!Y(t)||p.value||z)return;const n=H()??I;n&&U(t,n,e)}r.graphic&&!M&&CO("Detected `#graphic` slot but no extension is registered. Import from `vue-echarts/graphic` to enable it.");const X=function(e,t){const n=new Map,r=new Map,i=new Set;let a;function o(){for(const e of n.values())e.emitter.off(e.event,e.handler);n.clear()}const s=O(()=>{i.clear();const s=e.value;for(const[e,n]of r)t[e]!==n&&r.delete(e);if(!s)return o(),void(a=void 0);a&&a!==s&&o(),a=s;for(const e in t){const a=_O(e);if(!a||a.event.startsWith("native:")||"zr:"===a.event)continue;const o=a.event.startsWith("zr:"),l=(o?a.event.slice(3):a.event).toLowerCase(),u=t[e],c=n.get(e);if(a.once&&r.get(e)===u)continue;if(c&&c.source===u&&vO(u)){i.add(e);continue}const d=gO(u);if(c&&(c.emitter.off(c.event,c.handler),n.delete(e)),!d)continue;const h=o?s.getZr():s;let p=d;a.once&&(p=(...t)=>{n.delete(e),r.set(e,u),h.off(l,p),d(...t)}),h.on(l,p),n.set(e,{emitter:h,event:l,source:u,handler:p}),i.add(e)}for(const[e,t]of n)i.has(e)||(t.emitter.off(t.event,t.handler),n.delete(e))}),l=()=>{s(),o()};return re(l),l}(o,t);function ee(){const e=o.value;o.value=void 0,k(!1),D=void 0,I=void 0,z=!1,N=!1,e?.dispose()}function te(){P=!1,L=p.value,R=!1;const t=a.value,n=QS(t,m.value,y.value);if(o.value=n,Y(n)){if(A=!0,h.value)return z=!0,void B(()=>{Y(n)&&(!h.value||wO(t.offsetWidth,t.offsetHeight)||(n.resize(),Y(n)))&&(z?(z=!1,r()):k(!0))});r()}function r(){const t=p.value?e.option:H();t&&(p.value?U(n,t,"manual",_.value??void 0):U(n,t)),k(Y(n))}}const ne=Z(m,(e,t)=>{SO(e,t)||(s.value++,A=!1)},{deep:!0,flush:"sync"}),ae=Z(y,(e,t)=>{SO(e,t)||(P=!0,l.value++)},{deep:!0,flush:"sync"}),se=Z(()=>p.value?XO:e.option,(e,t)=>{if(e===XO||t===XO)return;const n=e??H();if(!n)return;const r=o.value;P||!Y(r)||z||S()||U(r,n)},{deep:!0,flush:F}),ue=Z([p,l],()=>{o.value&&(ee(),te())}),ce=Z(s,()=>{const e=o.value;if(!P&&p.value===L&&Y(e)&&!A){if(!W(e))return;const t=I;!t||p.value||z||S()||U(e,t,"theme")}},{flush:F}),de=O(()=>{const t=o.value;Y(t)&&(t.group=e.group??"")}),he=function(e,t,n,r){const i=V(TO,void 0);return Z(()=>t.value?{instance:e.value,visible:!0,type:n.value||void 0,options:{...le(i),...r.value}}:{instance:e.value,visible:!1},e=>{const{instance:t}=e;if(!t)return;if(!e.visible)return void t.hideLoading();const{type:n,options:r}=e;n?t.showLoading(n,r):t.showLoading(r)},{deep:!0,immediate:!0,flush:"sync"})}(o,f,v,g),fe=function(e,t,n){const r=()=>"object"==typeof t.value?t.value:void 0;return Z([n,e,()=>Boolean(t.value),()=>r()?.throttle??100],([e,t,n,i],a,o)=>{if(!t||!e||!n)return;let s=t.getWidth(),l=t.getHeight();const u=()=>{wO(s,l)||s===t.getWidth()&&l===t.getHeight()||(t.resize(),r()?.onResize?.())},c=i?Sb(u,i):void 0,d=new ResizeObserver(([e])=>{s=e.contentRect.width,l=e.contentRect.height,(c??u)()});d.observe(e),o(()=>{d.disconnect(),c?.clear()})},{flush:"sync"})}(o,h,a);const ve=function(e,t,n){const r=()=>{if(n())throw new Error("ECharts has been disposed.");const t=e.value;if(!t)throw new Error("ECharts is not initialized yet.");return t},i={};for(const a of kO)i[a]=(...e)=>{const t=r();return Reflect.apply(t[a],t,e)};return i.dispose=t,i.isDisposed=n,i}(o,function(){b.value||(b.value=!0,ne(),ae(),se(),ue(),ce(),de(),he(),fe(),X(),ee())},()=>b.value),ge=ve.clear;return ve.clear=()=>{const e=o.value;if(!Y(e))return ge();z=!1,D=void 0,I=void 0,e.clear()},G(()=>{b.value||te()}),pe(()=>{if(b.value)return;b.value=!0;const e=i.value;qO&&e?.isConnected&&null===e.__dispose?e.__dispose=ee:ee()}),n(Object.assign({setOption:(t,n,r)=>{if(!e.manualUpdate)return void CO("`setOption` is only available when `manual-update` is `true`.");const i=o.value;Y(i)&&U(i,t,"manual","boolean"==typeof n?{notMerge:n,lazyUpdate:r}:n??(void 0===r?void 0:{lazyUpdate:r}))},get root(){return i.value??void 0},get chart(){const e=o.value;return Y(e)?e:void 0}},ve)),()=>{const e=[E("div",{ref:a,class:"echarts-host"})];if(!b.value){const t=w();if(t&&e.push(t),T){const t=T();t&&e.push(t)}}const t=x.value;return E(NO,{...t,ref:i,class:["echarts",t.class]},e)}}}),tR={class:"analytics-page"},nR={class:"analytics-header"},rR={class:"toolbar"},iR={class:"range-buttons"},aR=["onClick"],oR={class:"custom-range-wrapper"},sR={key:0,class:"loading-overlay"},lR={class:"summary-cards"},uR={class:"summary-card"},cR={class:"summary-value"},dR={class:"summary-card"},hR={class:"summary-value"},pR={class:"summary-card"},fR={class:"summary-value"},vR={class:"summary-card"},gR={class:"summary-value"},mR={class:"chart-section-header"},yR={class:"chart-title"},_R={class:"chart-controls"},xR={class:"chart-type-toggle"},bR=["title"],wR={key:1,class:"empty-state"},SR={class:"chart-section cumulative-section"},CR={class:"chart-section-header"},kR={class:"chart-title"},MR={key:1,class:"empty-state"},TR={__name:"Analytics",setup(e){const t=["#3b82f6","#10b981","#a855f7","#f59e0b","#ef4444","#06b6d4","#ec4899","#8b5cf6","#14b8a6","#94a3b8"],n=be(),r=ue("7d"),i=ue("tokens"),a=ue(null),o=ue(!1),s=ue("bar"),l=ue(!1),u=ue({labels:[],series:[],totals:{}}),c=ue({tokens:0,cost:0,requests:0}),d=ue(null),h=ue(null),p=ue(null),f=ue({toolTypes:[],channels:[],models:[]}),v=K(()=>h.value&&p.value?"toolType":h.value?"model":p.value?"channel":"model"),g=K(()=>f.value.toolTypes.map(e=>({label:e,value:e}))),m=K(()=>f.value.channels.map(e=>({label:e,value:e}))),y=K(()=>f.value.models.map(e=>({label:e,value:e})));async function x(){const{startDate:e,endDate:t}=A();try{const n=await Le({startDate:e,endDate:t});f.value=n;const r=new Set(n?.toolTypes||[]),i=new Set(n?.channels||[]),a=new Set(n?.models||[]);d.value&&!r.has(d.value)&&(d.value=null),h.value&&!i.has(h.value)&&(h.value=null),p.value&&!a.has(p.value)&&(p.value=null)}catch(n){}}function b(){h.value=null,p.value=null,R()}const w=[{value:"1d",label:"1d"},{value:"3d",label:"3d"},{value:"7d",label:"7d"},{value:"30d",label:"30d"},{value:"90d",label:"90d"},{value:"custom",label:"自定义"}],S=[{label:"Token 用量",value:"tokens"},{label:"费用",value:"cost"},{label:"请求数",value:"requests"}],k=[{label:"导出 CSV",key:"csv"},{label:"导出 JSON",key:"json"}],M=K(()=>({model:"模型",channel:"渠道",toolType:"工具"}[v.value]||v.value)),T=K(()=>{const e=S.find(e=>e.value===i.value);return e?e.label:i.value});function D(e){const t=e instanceof Date?e.getTime():Number(e);return new Date((Number.isFinite(t)?t:Date.now())+288e5).toISOString().split("T")[0]}function I(e,t){const n=new Date(`${e}T00:00:00Z`);return n.setUTCDate(n.getUTCDate()+t),n.toISOString().split("T")[0]}function A(){const e=D(Date.now());return"custom"===r.value&&a.value?function({startDate:e,endDate:t}){const n=D(Date.now()),r=t>n?n:t;return{startDate:e>r?r:e,endDate:r}}({startDate:D(a.value[0]),endDate:D(a.value[1])}):{startDate:I(e,-(({"1d":1,"3d":3,"7d":7,"30d":30,"90d":90}[r.value]||7)-1)),endDate:e}}function P(e){return D(e)>D(Date.now())}function O(e,t){const n=(new Date(t)-new Date(e))/864e5;return n<=1?{granularity:"hour",step:4}:n<=3?{granularity:"hour",step:12}:{granularity:"day",step:1}}async function R(){const{startDate:e,endDate:t}=A(),{granularity:r,step:a}=O(e,t);o.value=!0;try{const n={};d.value&&(n.filterToolType=d.value),h.value&&(n.filterChannel=h.value),p.value&&(n.filterModel=p.value);const o={startDate:e,endDate:t,granularity:r,step:a,groupBy:v.value,...n},s="tokens"!==i.value,l="cost"!==i.value,f="requests"!==i.value,[g,m,y,_]=await Promise.all([Oe({...o,metric:i.value}),s?Oe({...o,metric:"tokens"}):Promise.resolve(null),l?Oe({...o,metric:"cost"}):Promise.resolve(null),f?Oe({...o,metric:"requests"}):Promise.resolve(null)]),x=e=>{const t=Array.isArray(e?.labels)?e.labels:[],n=t.length,r=(Array.isArray(e?.series)?e.series:[]).map(e=>{const t=Array.isArray(e?.data)?e.data.slice(0,n):[];t.length<n&&t.push(...new Array(n-t.length).fill(0));const r=t.map(e=>Number.isFinite(Number(e))?Number(e):0);return{...e,data:r}});return{...e,labels:t,series:r}},b=x(g),w=x(s?m:b),S=x(l?y:b),C=x(f?_:b);u.value=b;const k=e=>(e.series||[]).reduce((e,t)=>e+(t.data||[]).reduce((e,t)=>e+(Number.isFinite(Number(t))?Number(t):0),0),0);c.value={tokens:k("tokens"===i.value?b:w),cost:k("cost"===i.value?b:S),requests:k("requests"===i.value?b:C)}}catch(s){n.error("加载统计数据失败,请稍后重试"),u.value={labels:[],series:[],totals:{}}}finally{o.value=!1}}async function N(e){if(a.value=e,e){const t=D(e[0]),r=D(e[1]);if(Math.round((new Date(r)-new Date(t))/864e5)+1>365)return n.error("自定义时间范围不能超过 365 天"),void(a.value=null);await x(),R()}}G(async()=>{await x(),R()});const B=K(()=>{const e=u.value.labels||[],t=new Set(e.map(e=>e.split(" ")[0])).size||1,{tokens:n,cost:r,requests:a}=c.value;return{tokens:n,cost:r,requests:a,avgPerDay:"tokens"===i.value?n/t:"cost"===i.value?r/t:a/t}});function E(e){return e>=1e9?(e/1e9).toFixed(2)+"B":e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e.toLocaleString()}function V(e){return"$"+(e||0).toFixed(4)}function Y(e){return"cost"===i.value?V(e):"requests"===i.value?Math.round(e).toLocaleString():E(e)}function $(e){return"cost"===i.value?"$"+e.toFixed(2):"requests"===i.value?e>=1e3?(e/1e3).toFixed(1)+"K":e:E(e)}function j(e){if(!e)return"";const t=e.match(/^\d{4}-(\d{2})-(\d{2}) (\d{2}:\d{2})-\d{2}:\d{2}$/);if(t)return`${t[1]}/${t[2]} ${t[3]}`;const n=e.match(/^\d{4}-(\d{2})-(\d{2}) (\d{2}:\d{2})$/);if(n)return`${n[1]}/${n[2]} ${n[3]}`;const r=e.match(/^\d{4}-(\d{2})-(\d{2})$/);return r?`${r[1]}/${r[2]}`:e}const Z=K(()=>({tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:e=>{const t=e[0]?.axisValue||"",n=e.filter(e=>0!==e.value&&null!=e.value).map(e=>{const t=Y(e.value);return`<span style="display:inline-block;width:10px;height:10px;border-radius:2px;background:${e.color};margin-right:6px"></span>${e.seriesName}: <b>${t}</b>`});return 0===n.length?"":`<div style="font-size:12px"><b>${t}</b><br>${n.join("<br>")}</div>`}},legend:{type:"plain",orient:"horizontal",bottom:8,left:"center",itemWidth:14,itemHeight:14,itemGap:32,textStyle:{fontSize:12,lineHeight:22}},grid:{left:"3%",right:"4%",bottom:140,top:"5%",containLabel:!0},xAxis:{type:"category",data:u.value.labels,axisLabel:{fontSize:11,formatter:j,rotate:u.value.labels.length>20?45:0}},yAxis:{type:"value",axisLabel:{fontSize:11,formatter:$}},dataZoom:u.value.labels.length>30?[{type:"inside"}]:[],series:u.value.series.map((e,n)=>({name:e.name,type:s.value,stack:"bar"===s.value?"total":void 0,data:e.data,itemStyle:{color:t[n%t.length]},..."line"===s.value?{areaStyle:{opacity:.15,color:t[n%t.length]},smooth:!0,lineStyle:{width:2},symbol:"none"}:{}}))})),q=K(()=>{const e=u.value.series||[],t=u.value.labels||[],n=[];let r=0;return t.forEach((t,i)=>{const a=e.reduce((e,t)=>e+(t.data[i]||0),0);r+=a,n.push(r)}),{tooltip:{trigger:"axis",formatter:e=>{const t=e[0];return`<b>${t.axisValue}</b><br>Cumulative: <b>${Y(t.value)}</b>`}},grid:{left:"3%",right:"4%",bottom:"10%",top:"5%",containLabel:!0},xAxis:{type:"category",data:t,axisLabel:{fontSize:11,formatter:j,rotate:t.length>20?45:0}},yAxis:{type:"value",axisLabel:{fontSize:11,formatter:$}},series:[{name:`Cumulative ${T.value}`,type:"line",data:n,smooth:!0,symbol:"none",lineStyle:{width:2,color:"#3b82f6"},areaStyle:{color:"#3b82f6",opacity:.1},itemStyle:{color:"#3b82f6"}}]}});function Q(){l.value=!l.value}function J(e){const{startDate:t,endDate:n}=A(),{granularity:r,step:a}=O(t,n),o=Ee({startDate:t,endDate:n,granularity:r,step:a,groupBy:v.value,metric:i.value,format:e});window.open(o,"_blank")}return(e,t)=>(U(),de("div",tR,[he("div",nR,[t[8]||(t[8]=he("h2",{class:"page-title"},"用量分析",-1)),he("div",rR,[he("div",iR,[(U(),de(te,null,F(w,e=>he("button",{key:e.value,class:ne(["range-btn",{active:r.value===e.value}]),onClick:t=>async function(e){r.value=e,"custom"!==e&&(await x(),R())}(e.value)},X(e.label),11,aR)),64)),he("div",oR,["custom"===r.value?(U(),W(se(ki),{key:0,value:a.value,"onUpdate:value":t[0]||(t[0]=e=>a.value=e),type:"daterange",size:"small",clearable:"","is-date-disabled":P,"on-update:value":N,style:{width:"220px"}},null,8,["value"])):L("",!0)])]),H(se(Te),{value:d.value,"onUpdate:value":[t[1]||(t[1]=e=>d.value=e),b],options:g.value,size:"small",clearable:"",placeholder:"全部工具",style:{width:"120px"}},null,8,["value","options"]),H(se(Te),{value:h.value,"onUpdate:value":[t[2]||(t[2]=e=>h.value=e),R],options:m.value,size:"small",clearable:"",placeholder:"全部渠道",style:{width:"120px"}},null,8,["value","options"]),H(se(Te),{value:p.value,"onUpdate:value":[t[3]||(t[3]=e=>p.value=e),R],options:y.value,size:"small",clearable:"",placeholder:"全部模型",style:{width:"160px"}},null,8,["value","options"]),H(se(Te),{value:i.value,"onUpdate:value":[t[4]||(t[4]=e=>i.value=e),R],options:S,size:"small",style:{width:"120px"}},null,8,["value"]),H(se(Ie),{options:k,onSelect:J},{default:ee(()=>[H(se(C),{size:"small",disabled:o.value},{icon:ee(()=>[H(se(_),null,{default:ee(()=>[H(se(fe))]),_:1})]),default:ee(()=>[t[7]||(t[7]=z(" 导出 ",-1))]),_:1},8,["disabled"])]),_:1})])]),o.value?(U(),de("div",sR,[H(se(Pe),{size:"medium"})])):L("",!0),he("div",lR,[he("div",uR,[t[9]||(t[9]=he("div",{class:"summary-label"},"总 Token",-1)),he("div",cR,X(E(B.value.tokens)),1)]),he("div",dR,[t[10]||(t[10]=he("div",{class:"summary-label"},"总费用",-1)),he("div",hR,X(V(B.value.cost)),1)]),he("div",pR,[t[11]||(t[11]=he("div",{class:"summary-label"},"总请求数",-1)),he("div",fR,X(B.value.requests.toLocaleString()),1)]),he("div",vR,[t[12]||(t[12]=he("div",{class:"summary-label"},"日均用量",-1)),he("div",gR,X(Y(B.value.avgPerDay)),1)])]),he("div",{class:ne(["chart-section",{fullscreen:l.value}])},[he("div",mR,[he("span",yR,"按"+X(M.value)+"用量分布",1),he("div",_R,[he("div",xR,[he("button",{class:ne(["toggle-btn",{active:"bar"===s.value}]),onClick:t[5]||(t[5]=e=>s.value="bar")},"柱状图",2),he("button",{class:ne(["toggle-btn",{active:"line"===s.value}]),onClick:t[6]||(t[6]=e=>s.value="line")},"折线图",2)]),he("button",{class:"icon-btn",onClick:Q,title:l.value?"退出全屏":"全屏"},[H(se(_),{size:16},{default:ee(()=>[l.value?(U(),W(se(ge),{key:1})):(U(),W(se(ve),{key:0}))]),_:1})],8,bR)])]),u.value.series.length>0?(U(),W(se(eR),{key:0,class:"main-chart",option:Z.value,autoresize:""},null,8,["option"])):o.value?L("",!0):(U(),de("div",wR,"暂无数据"))],2),he("div",SR,[he("div",CR,[he("span",kR,X(T.value)+"累计趋势",1)]),u.value.series.length>0?(U(),W(se(eR),{key:0,class:"cumulative-chart",option:q.value,autoresize:""},null,8,["option"])):o.value?L("",!0):(U(),de("div",MR,"暂无数据"))])]))}},DR=k(TR,[["__scopeId","data-v-34f16206"]]);export{DR as default};