create-ssnode-cli 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/package.json +1 -1
  2. package/templates/backend/config/config.develop.yaml +6 -4
  3. package/templates/backend/data/template.dev.sqlite-shm +0 -0
  4. package/templates/backend/data/template.dev.sqlite-wal +0 -0
  5. package/templates/backend/dist/app.module.js +85 -1
  6. package/templates/backend/dist/app.module.js.map +1 -1
  7. package/templates/backend/dist/common/all-exceptions.filter.js +47 -1
  8. package/templates/backend/dist/common/all-exceptions.filter.js.map +1 -1
  9. package/templates/backend/dist/common/app-crypto.js +119 -1
  10. package/templates/backend/dist/common/app-crypto.js.map +1 -1
  11. package/templates/backend/dist/common/app-sign.guard.js +72 -1
  12. package/templates/backend/dist/common/app-sign.guard.js.map +1 -1
  13. package/templates/backend/dist/common/app-sign.module.js +20 -1
  14. package/templates/backend/dist/common/app-sign.module.js.map +1 -1
  15. package/templates/backend/dist/common/response.js +23 -1
  16. package/templates/backend/dist/common/response.js.map +1 -1
  17. package/templates/backend/dist/common/throttle.guard.js +42 -1
  18. package/templates/backend/dist/common/throttle.guard.js.map +1 -1
  19. package/templates/backend/dist/common/transform.interceptor.js +28 -1
  20. package/templates/backend/dist/common/transform.interceptor.js.map +1 -1
  21. package/templates/backend/dist/config/config.interface.js +2 -1
  22. package/templates/backend/dist/config/config.interface.js.map +1 -1
  23. package/templates/backend/dist/config/configuration.js +91 -1
  24. package/templates/backend/dist/config/configuration.js.map +1 -1
  25. package/templates/backend/dist/database/migrations/0001-init.migration.js +69 -1
  26. package/templates/backend/dist/database/migrations/0001-init.migration.js.map +1 -1
  27. package/templates/backend/dist/database/sqlite.config.js +32 -1
  28. package/templates/backend/dist/database/sqlite.config.js.map +1 -1
  29. package/templates/backend/dist/entities/audit-log.entity.js +49 -1
  30. package/templates/backend/dist/entities/audit-log.entity.js.map +1 -1
  31. package/templates/backend/dist/entities/image.entity.js +50 -1
  32. package/templates/backend/dist/entities/image.entity.js.map +1 -1
  33. package/templates/backend/dist/entities/page-data.entity.js +60 -1
  34. package/templates/backend/dist/entities/page-data.entity.js.map +1 -1
  35. package/templates/backend/dist/entities/screen-config.entity.js +74 -1
  36. package/templates/backend/dist/entities/screen-config.entity.js.map +1 -1
  37. package/templates/backend/dist/entities/user.entity.js +59 -1
  38. package/templates/backend/dist/entities/user.entity.js.map +1 -1
  39. package/templates/backend/dist/main.js +56 -1
  40. package/templates/backend/dist/main.js.map +1 -1
  41. package/templates/backend/dist/modules/audit/audit.controller.js +51 -1
  42. package/templates/backend/dist/modules/audit/audit.controller.js.map +1 -1
  43. package/templates/backend/dist/modules/audit/audit.module.js +25 -1
  44. package/templates/backend/dist/modules/audit/audit.module.js.map +1 -1
  45. package/templates/backend/dist/modules/audit/audit.service.js +57 -1
  46. package/templates/backend/dist/modules/audit/audit.service.js.map +1 -1
  47. package/templates/backend/dist/modules/auth/auth.controller.js +74 -1
  48. package/templates/backend/dist/modules/auth/auth.controller.js.map +1 -1
  49. package/templates/backend/dist/modules/auth/auth.module.js +45 -1
  50. package/templates/backend/dist/modules/auth/auth.module.js.map +1 -1
  51. package/templates/backend/dist/modules/auth/auth.service.js +151 -1
  52. package/templates/backend/dist/modules/auth/auth.service.js.map +1 -1
  53. package/templates/backend/dist/modules/auth/captcha.service.js +56 -1
  54. package/templates/backend/dist/modules/auth/captcha.service.js.map +1 -1
  55. package/templates/backend/dist/modules/auth/jwt-auth.guard.js +17 -1
  56. package/templates/backend/dist/modules/auth/jwt-auth.guard.js.map +1 -1
  57. package/templates/backend/dist/modules/auth/jwt.strategy.js +37 -1
  58. package/templates/backend/dist/modules/auth/jwt.strategy.js.map +1 -1
  59. package/templates/backend/dist/modules/image/image.controller.js +75 -1
  60. package/templates/backend/dist/modules/image/image.controller.js.map +1 -1
  61. package/templates/backend/dist/modules/image/image.module.js +26 -1
  62. package/templates/backend/dist/modules/image/image.module.js.map +1 -1
  63. package/templates/backend/dist/modules/image/image.service.js +94 -1
  64. package/templates/backend/dist/modules/image/image.service.js.map +1 -1
  65. package/templates/backend/dist/modules/ops/backend-version.probe.js +58 -1
  66. package/templates/backend/dist/modules/ops/backend-version.probe.js.map +1 -1
  67. package/templates/backend/dist/modules/ops/ops-probe.interface.js +4 -1
  68. package/templates/backend/dist/modules/ops/ops-probe.interface.js.map +1 -1
  69. package/templates/backend/dist/modules/ops/ops.controller.js +52 -1
  70. package/templates/backend/dist/modules/ops/ops.controller.js.map +1 -1
  71. package/templates/backend/dist/modules/ops/ops.module.js +39 -1
  72. package/templates/backend/dist/modules/ops/ops.module.js.map +1 -1
  73. package/templates/backend/dist/modules/ops/ops.service.js +72 -1
  74. package/templates/backend/dist/modules/ops/ops.service.js.map +1 -1
  75. package/templates/backend/dist/modules/ops/sqlite-backup-list.probe.js +105 -1
  76. package/templates/backend/dist/modules/ops/sqlite-backup-list.probe.js.map +1 -1
  77. package/templates/backend/dist/modules/ops/sqlite-backup-log.probe.js +67 -1
  78. package/templates/backend/dist/modules/ops/sqlite-backup-log.probe.js.map +1 -1
  79. package/templates/backend/dist/modules/ops/sqlite-backup.probe.js +115 -1
  80. package/templates/backend/dist/modules/ops/sqlite-backup.probe.js.map +1 -1
  81. package/templates/backend/dist/modules/ops/version.controller.js +52 -1
  82. package/templates/backend/dist/modules/ops/version.controller.js.map +1 -1
  83. package/templates/backend/dist/modules/page-data/page-data.controller.js +109 -1
  84. package/templates/backend/dist/modules/page-data/page-data.controller.js.map +1 -1
  85. package/templates/backend/dist/modules/page-data/page-data.module.js +25 -1
  86. package/templates/backend/dist/modules/page-data/page-data.module.js.map +1 -1
  87. package/templates/backend/dist/modules/page-data/page-data.service.js +69 -1
  88. package/templates/backend/dist/modules/page-data/page-data.service.js.map +1 -1
  89. package/templates/backend/dist/modules/screen-config/screen-config.controller.js +61 -1
  90. package/templates/backend/dist/modules/screen-config/screen-config.controller.js.map +1 -1
  91. package/templates/backend/dist/modules/screen-config/screen-config.module.js +25 -1
  92. package/templates/backend/dist/modules/screen-config/screen-config.module.js.map +1 -1
  93. package/templates/backend/dist/modules/screen-config/screen-config.service.js +41 -1
  94. package/templates/backend/dist/modules/screen-config/screen-config.service.js.map +1 -1
  95. package/templates/backend/dist/modules/upload/upload.controller.js +65 -1
  96. package/templates/backend/dist/modules/upload/upload.controller.js.map +1 -1
  97. package/templates/backend/dist/modules/upload/upload.module.js +22 -1
  98. package/templates/backend/dist/modules/upload/upload.module.js.map +1 -1
  99. package/templates/backend/dist/modules/upload/upload.service.js +75 -1
  100. package/templates/backend/dist/modules/upload/upload.service.js.map +1 -1
  101. package/templates/backend/dist/modules/user/user.controller.js +149 -1
  102. package/templates/backend/dist/modules/user/user.controller.js.map +1 -1
  103. package/templates/backend/dist/modules/user/user.module.js +26 -1
  104. package/templates/backend/dist/modules/user/user.module.js.map +1 -1
  105. package/templates/backend/dist/modules/user/user.service.js +249 -1
  106. package/templates/backend/dist/modules/user/user.service.js.map +1 -1
  107. package/templates/backend/dist/modules/websocket/websocket.gateway.js +33 -1
  108. package/templates/backend/dist/modules/websocket/websocket.gateway.js.map +1 -1
  109. package/templates/backend/dist/modules/websocket/websocket.module.js +19 -1
  110. package/templates/backend/dist/modules/websocket/websocket.module.js.map +1 -1
  111. package/templates/backend/dist/tsconfig.build.tsbuildinfo +1 -1
  112. package/templates/backend/package.json +1 -1
  113. package/templates/backend/src/modules/auth/captcha.service.ts +6 -5
  114. package/templates/web/dist/assets/{AuthLayout-bcf98efb.js → AuthLayout-f1e8d110.js} +1 -1
  115. package/templates/web/dist/assets/{AuthLayout-legacy-6e7a8ae1.js → AuthLayout-legacy-f871651c.js} +1 -1
  116. package/templates/web/dist/assets/{Background-eb77ef54.js → Background-955d549f.js} +1 -1
  117. package/templates/web/dist/assets/{Background-legacy-50457007.js → Background-legacy-fbad6e76.js} +1 -1
  118. package/templates/web/dist/assets/{Screen-318c3fc2.js → Screen-b14b0813.js} +1 -1
  119. package/templates/web/dist/assets/{Screen-legacy-af123b0f.js → Screen-legacy-154c8ee6.js} +1 -1
  120. package/templates/web/dist/assets/{api-beff4a3e.js → api-4d80e36e.js} +1 -1
  121. package/templates/web/dist/assets/{api-legacy-9fe41d4b.js → api-legacy-054fd569.js} +1 -1
  122. package/templates/web/dist/assets/{component-89b5253e.js → component-9d9f33fa.js} +1 -1
  123. package/templates/web/dist/assets/{component-legacy-8c5a28ef.js → component-legacy-4445386a.js} +1 -1
  124. package/templates/web/dist/assets/{index-a79e448b.js → index-107a0e80.js} +1 -1
  125. package/templates/web/dist/assets/{index-b60badf7.js → index-5afb70be.js} +1 -1
  126. package/templates/web/dist/assets/{index-cba19800.js → index-7b807c2d.js} +1 -1
  127. package/templates/web/dist/assets/{index-86214b19.js → index-ab64cd34.js} +1 -1
  128. package/templates/web/dist/assets/{index-7277cbfb.js → index-d8bfffb3.js} +1 -1
  129. package/templates/web/dist/assets/{index-d70eb540.js → index-db169639.js} +1 -1
  130. package/templates/web/dist/assets/{index-bd4ed808.js → index-e08dc495.js} +1 -1
  131. package/templates/web/dist/assets/index-e31f4b7c.js +1 -0
  132. package/templates/web/dist/assets/{index-legacy-783129a7.js → index-legacy-5cf7be80.js} +1 -1
  133. package/templates/web/dist/assets/index-legacy-6f112001.js +1 -0
  134. package/templates/web/dist/assets/{index-legacy-b3bd40c1.js → index-legacy-91e012ac.js} +1 -1
  135. package/templates/web/dist/assets/{index-legacy-0da8de82.js → index-legacy-aa61cf72.js} +1 -1
  136. package/templates/web/dist/assets/{index-legacy-06483318.js → index-legacy-afba9135.js} +1 -1
  137. package/templates/web/dist/assets/{index-legacy-d510e318.js → index-legacy-da51c769.js} +1 -1
  138. package/templates/web/dist/assets/{index-legacy-993ef005.js → index-legacy-eec0ca6e.js} +1 -1
  139. package/templates/web/dist/assets/{index-legacy-feb54578.js → index-legacy-f732db29.js} +1 -1
  140. package/templates/web/dist/index.html +2 -2
  141. package/templates/web/node_modules/.vite/deps/@ant-design_icons.js +4 -4
  142. package/templates/web/node_modules/.vite/deps/_metadata.json +57 -57
  143. package/templates/web/node_modules/.vite/deps/antd.js +6 -6
  144. package/templates/web/node_modules/.vite/deps/antd_locale_zh_CN.js +1 -1
  145. package/templates/web/node_modules/.vite/deps/axios.js +2793 -1104
  146. package/templates/web/node_modules/.vite/deps/axios.js.map +4 -4
  147. package/templates/web/node_modules/.vite/deps/{chunk-FADIZLW4.js → chunk-3EE4ABTD.js} +3 -3
  148. package/templates/web/node_modules/.vite/deps/{chunk-5JEEJ3ET.js → chunk-3KXTUEQ5.js} +2 -2
  149. package/templates/web/node_modules/.vite/deps/{chunk-DSEUD2VO.js → chunk-622VOE6C.js} +28 -237
  150. package/templates/web/node_modules/.vite/deps/chunk-622VOE6C.js.map +7 -0
  151. package/templates/web/node_modules/.vite/deps/{chunk-PCLWPLHU.js → chunk-AX2S74EI.js} +4 -4
  152. package/templates/web/node_modules/.vite/deps/{chunk-UX3FVGZU.js → chunk-DXNXWKU4.js} +1670 -1309
  153. package/templates/web/node_modules/.vite/deps/chunk-DXNXWKU4.js.map +7 -0
  154. package/templates/web/node_modules/.vite/deps/{chunk-OTDKR2HU.js → chunk-GT2UP6M4.js} +2 -2
  155. package/templates/web/node_modules/.vite/deps/{chunk-5WWUZCGV.js → chunk-HM4MQYWN.js} +10 -2
  156. package/templates/web/node_modules/.vite/deps/{chunk-Z4XTF2JV.js → chunk-NDUAOA7M.js} +2 -2
  157. package/templates/web/node_modules/.vite/deps/{chunk-PIIG5WB7.js → chunk-OKY2XKJX.js} +14406 -12416
  158. package/templates/web/node_modules/.vite/deps/chunk-OKY2XKJX.js.map +7 -0
  159. package/templates/web/node_modules/.vite/deps/{chunk-UIM57Q7Y.js → chunk-SC6QO7UO.js} +6086 -4354
  160. package/templates/web/node_modules/.vite/deps/chunk-SC6QO7UO.js.map +7 -0
  161. package/templates/web/node_modules/.vite/deps/classnames.js +2 -2
  162. package/templates/web/node_modules/.vite/deps/dayjs.js +2 -2
  163. package/templates/web/node_modules/.vite/deps/dayjs_locale_zh-cn.js +2 -2
  164. package/templates/web/node_modules/.vite/deps/echarts_charts.js +7172 -6102
  165. package/templates/web/node_modules/.vite/deps/echarts_charts.js.map +4 -4
  166. package/templates/web/node_modules/.vite/deps/echarts_components.js +3363 -1326
  167. package/templates/web/node_modules/.vite/deps/echarts_components.js.map +4 -4
  168. package/templates/web/node_modules/.vite/deps/echarts_core.js +57 -42
  169. package/templates/web/node_modules/.vite/deps/echarts_core.js.map +3 -3
  170. package/templates/web/node_modules/.vite/deps/echarts_renderers.js +432 -334
  171. package/templates/web/node_modules/.vite/deps/echarts_renderers.js.map +4 -4
  172. package/templates/web/node_modules/.vite/deps/exceljs.js +25762 -0
  173. package/templates/web/node_modules/.vite/deps/exceljs.js.map +7 -0
  174. package/templates/web/node_modules/.vite/deps/lodash.js +28 -10
  175. package/templates/web/node_modules/.vite/deps/lodash.js.map +3 -3
  176. package/templates/web/node_modules/.vite/deps/path-browserify.js +1 -1
  177. package/templates/web/node_modules/.vite/deps/prop-types.js +1 -1
  178. package/templates/web/node_modules/.vite/deps/qs.js +405 -138
  179. package/templates/web/node_modules/.vite/deps/qs.js.map +4 -4
  180. package/templates/web/node_modules/.vite/deps/react-dom.js +3 -3
  181. package/templates/web/node_modules/.vite/deps/react-dom_client.js +3 -3
  182. package/templates/web/node_modules/.vite/deps/react-router-dom.js +3445 -1283
  183. package/templates/web/node_modules/.vite/deps/react-router-dom.js.map +4 -4
  184. package/templates/web/node_modules/.vite/deps/react.js +2 -2
  185. package/templates/web/node_modules/.vite/deps/react_jsx-dev-runtime.js +2 -2
  186. package/templates/web/node_modules/.vite/deps/recoil.js +3 -3
  187. package/templates/web/src/pages/Login/index.tsx +8 -1
  188. package/templates/web/src/services/api.ts +6 -1
  189. package/templates/web/vite.config.js +5 -5
  190. package/templates/web/dist/assets/index-e6071630.js +0 -1
  191. package/templates/web/dist/assets/index-legacy-028ed5d5.js +0 -1
  192. package/templates/web/node_modules/.vite/deps/chunk-DSEUD2VO.js.map +0 -7
  193. package/templates/web/node_modules/.vite/deps/chunk-PIIG5WB7.js.map +0 -7
  194. package/templates/web/node_modules/.vite/deps/chunk-UIM57Q7Y.js.map +0 -7
  195. package/templates/web/node_modules/.vite/deps/chunk-UX3FVGZU.js.map +0 -7
  196. package/templates/web/node_modules/.vite/deps/xlsx.js +0 -33827
  197. package/templates/web/node_modules/.vite/deps/xlsx.js.map +0 -7
  198. /package/templates/web/node_modules/.vite/deps/{chunk-FADIZLW4.js.map → chunk-3EE4ABTD.js.map} +0 -0
  199. /package/templates/web/node_modules/.vite/deps/{chunk-5JEEJ3ET.js.map → chunk-3KXTUEQ5.js.map} +0 -0
  200. /package/templates/web/node_modules/.vite/deps/{chunk-PCLWPLHU.js.map → chunk-AX2S74EI.js.map} +0 -0
  201. /package/templates/web/node_modules/.vite/deps/{chunk-OTDKR2HU.js.map → chunk-GT2UP6M4.js.map} +0 -0
  202. /package/templates/web/node_modules/.vite/deps/{chunk-5WWUZCGV.js.map → chunk-HM4MQYWN.js.map} +0 -0
  203. /package/templates/web/node_modules/.vite/deps/{chunk-Z4XTF2JV.js.map → chunk-NDUAOA7M.js.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/cartesian/GridModel.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/cartesian/AxisModel.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/axisDefault.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/axis/axisBreakHelper.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/axisModelCreator.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/cartesian/Cartesian.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/cartesian/Cartesian2D.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/cartesian/Axis2D.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/axis/axisAction.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/axis/AxisBuilder.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/axisAlignTicks.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/cartesian/Grid.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/axisPointer/modelHelper.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/axis/AxisView.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/axis/axisSplitHelper.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/axis/CartesianAxisView.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/grid/installSimple.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/radar/RadarModel.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/radar/RadarView.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/radar/IndicatorAxis.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/radar/Radar.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/radar/install.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/View.js", "../../../../../node_modules/.pnpm/zrender@6.1.0/node_modules/zrender/lib/tool/parseXML.js", "../../../../../node_modules/.pnpm/zrender@6.1.0/node_modules/zrender/lib/tool/parseSVG.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/geo/GeoSVGResource.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/geo/fix/nanhai.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/geo/fix/textCoord.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/geo/fix/diaoyuIsland.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/geo/GeoJSONResource.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/geo/geoSourceManager.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/geo/Geo.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/chart/map/MapSeries.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/geo/geoCreator.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/geo/GeoModel.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/helper/interactionMutex.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/helper/cursorHelper.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/helper/RoamController.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/helper/roamHelper.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/helper/MapDraw.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/geo/GeoView.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/geo/install.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/parallel/parallelPreprocessor.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/parallel/ParallelView.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/parallel/ParallelModel.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/parallel/ParallelAxis.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/helper/sliderMove.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/parallel/Parallel.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/parallel/parallelCreator.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/parallel/AxisModel.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/helper/BrushController.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/helper/brushHelper.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/axis/ParallelAxisView.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/axis/parallelAxisAction.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/parallel/install.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/util/vendor.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/axisStatisticsMetricsImpl.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/chart/helper/axisSnippets.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/layout/barCommon.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/single/AxisModel.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/chart/helper/labelHelper.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/chart/helper/Symbol.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/chart/helper/SymbolDraw.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/coord/CoordinateSystem.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/util/styleCompat.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/visual/VisualMapping.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/chart/helper/LinePath.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/chart/helper/Line.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/chart/helper/LineDraw.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/component/helper/thumbnailBridge.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/animation/customGraphicTransition.js", "../../../../../node_modules/.pnpm/echarts@6.1.0/node_modules/echarts/lib/animation/customGraphicKeyframeAnimation.js"],
4
+ "sourcesContent": ["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nimport { getLayoutParams, mergeLayoutParam } from '../../util/layout.js';\nimport tokens from '../../visual/tokens.js';\n// For backward compatibility, do not use a margin. Although the labels might touch the edge of\n// the canvas, the chart canvas probably does not have an border or a different background color within a page.\nexport var OUTER_BOUNDS_DEFAULT = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n};\nexport var OUTER_BOUNDS_CLAMP_DEFAULT = ['25%', '25%'];\nexport var COORD_SYS_TYPE_CARTESIAN_2D = 'cartesian2d';\nvar GridModel = /** @class */function (_super) {\n __extends(GridModel, _super);\n function GridModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GridModel.prototype.mergeDefaultAndTheme = function (option, ecModel) {\n var outerBoundsCp = getLayoutParams(option.outerBounds);\n _super.prototype.mergeDefaultAndTheme.apply(this, arguments);\n if (outerBoundsCp && option.outerBounds) {\n mergeLayoutParam(option.outerBounds, outerBoundsCp);\n }\n };\n GridModel.prototype.mergeOption = function (newOption, ecModel) {\n _super.prototype.mergeOption.apply(this, arguments);\n if (this.option.outerBounds && newOption.outerBounds) {\n mergeLayoutParam(this.option.outerBounds, newOption.outerBounds);\n }\n };\n GridModel.type = 'grid';\n GridModel.dependencies = ['xAxis', 'yAxis'];\n GridModel.layoutMode = 'box';\n GridModel.defaultOption = {\n show: false,\n // zlevel: 0,\n z: 0,\n left: '15%',\n top: 65,\n right: '10%',\n bottom: 80,\n // If grid size contain label\n containLabel: false,\n outerBoundsMode: 'auto',\n outerBounds: OUTER_BOUNDS_DEFAULT,\n outerBoundsContain: 'all',\n outerBoundsClampWidth: OUTER_BOUNDS_CLAMP_DEFAULT[0],\n outerBoundsClampHeight: OUTER_BOUNDS_CLAMP_DEFAULT[1],\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n backgroundColor: tokens.color.transparent,\n borderWidth: 1,\n borderColor: tokens.color.neutral30\n };\n return GridModel;\n}(ComponentModel);\nexport default GridModel;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nvar CartesianAxisModel = /** @class */function (_super) {\n __extends(CartesianAxisModel, _super);\n function CartesianAxisModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CartesianAxisModel.prototype.getCoordSysModel = function () {\n return this.getReferringComponents('grid', SINGLE_REFERRING).models[0];\n };\n CartesianAxisModel.type = 'cartesian2dAxis';\n return CartesianAxisModel;\n}(ComponentModel);\nexport { CartesianAxisModel };\nzrUtil.mixin(CartesianAxisModel, AxisModelCommonMixin);\nexport default CartesianAxisModel;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport tokens from '../visual/tokens.js';\nvar defaultOption = {\n show: true,\n // zlevel: 0,\n z: 0,\n // Inverse the axis.\n inverse: false,\n // Axis name displayed.\n name: '',\n // 'start' | 'middle' | 'end'\n nameLocation: 'end',\n // By degree. By default auto rotate by nameLocation.\n nameRotate: null,\n nameTruncate: {\n maxWidth: null,\n ellipsis: '...',\n placeholder: '.'\n },\n // Use global text style by default.\n nameTextStyle: {\n // textMargin: never, // The default value will be specified based on `nameLocation`.\n },\n // The gap between axisName and axisLine.\n nameGap: 15,\n // Default `false` to support tooltip.\n silent: false,\n // Default `false` to avoid legacy user event listener fail.\n triggerEvent: false,\n tooltip: {\n show: false\n },\n axisPointer: {},\n axisLine: {\n show: true,\n onZero: 'auto',\n onZeroAxisIndex: null,\n lineStyle: {\n color: tokens.color.axisLine,\n width: 1,\n type: 'solid'\n },\n // The arrow at both ends the the axis.\n symbol: ['none', 'none'],\n symbolSize: [10, 15],\n breakLine: true\n },\n axisTick: {\n show: true,\n // Whether axisTick is inside the grid or outside the grid.\n inside: false,\n // The length of axisTick.\n length: 5,\n lineStyle: {\n width: 1\n }\n },\n axisLabel: {\n show: true,\n // Whether axisLabel is inside the grid or outside the grid.\n inside: false,\n rotate: 0,\n // true | false | null/undefined (auto)\n showMinLabel: null,\n // true | false | null/undefined (auto)\n showMaxLabel: null,\n margin: 8,\n // formatter: null,\n fontSize: 12,\n color: tokens.color.axisLabel,\n // In scenarios like axis labels, when labels text's progression direction matches the label\n // layout direction (e.g., when all letters are in a single line), extra start/end margin is\n // needed to prevent the text from appearing visually joined. In the other case, when lables\n // are stacked (e.g., having rotation or horizontal labels on yAxis), the layout needs to be\n // compact, so NO extra top/bottom margin should be applied.\n textMargin: [0, 3]\n },\n splitLine: {\n show: true,\n showMinLine: true,\n showMaxLine: true,\n lineStyle: {\n color: tokens.color.axisSplitLine,\n width: 1,\n type: 'solid'\n }\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: [tokens.color.backgroundTint, tokens.color.backgroundTransparent]\n }\n },\n breakArea: {\n show: true,\n itemStyle: {\n color: tokens.color.neutral00,\n // Break border color should be darker than the splitLine\n // because it has opacity and should be more prominent\n borderColor: tokens.color.border,\n borderWidth: 1,\n borderType: [3, 3],\n opacity: 0.6\n },\n zigzagAmplitude: 4,\n zigzagMinSpan: 4,\n zigzagMaxSpan: 20,\n zigzagZ: 100,\n expandOnClick: true\n },\n breakLabelLayout: {\n moveOverlap: 'auto'\n }\n};\nvar categoryAxis = zrUtil.merge({\n // The gap at both ends of the axis. For categoryAxis, boolean.\n boundaryGap: true,\n // Set false to faster category collection.\n deduplication: null,\n jitter: 0,\n jitterOverlap: true,\n jitterMargin: 2,\n // splitArea: {\n // show: false\n // },\n splitLine: {\n show: false\n },\n axisTick: {\n // If tick is align with label when boundaryGap is true\n alignWithLabel: false,\n interval: 'auto',\n show: 'auto'\n },\n axisLabel: {\n interval: 'auto'\n }\n}, defaultOption);\nvar valueAxis = zrUtil.merge({\n boundaryGap: [0, 0],\n axisLine: {\n // Not shown when other axis is categoryAxis in cartesian\n show: 'auto'\n },\n axisTick: {\n // Not shown when other axis is categoryAxis in cartesian\n show: 'auto'\n },\n // TODO\n // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]\n splitNumber: 5,\n minorTick: {\n // Minor tick, not available for cateogry axis.\n show: false,\n // Split number of minor ticks. The value should be in range of (0, 100)\n splitNumber: 5,\n // Length of minor tick\n length: 3,\n // Line style\n lineStyle: {\n // Default to be same with axisTick\n }\n },\n minorSplitLine: {\n show: false,\n lineStyle: {\n color: tokens.color.axisMinorSplitLine,\n width: 1\n }\n }\n}, defaultOption);\nvar timeAxis = zrUtil.merge({\n splitNumber: 6,\n axisLabel: {\n // The default value of TimeScale is determined in `AxisBuilder`\n // showMinLabel: false,\n // showMaxLabel: false,\n rich: {\n primary: {\n fontWeight: 'bold'\n }\n }\n },\n splitLine: {\n show: false\n }\n}, valueAxis);\nvar logAxis = zrUtil.defaults({\n logBase: 10\n}, valueAxis);\nexport default {\n category: categoryAxis,\n value: valueAxis,\n time: timeAxis,\n log: logAxis\n};", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _impl = null;\nexport function registerAxisBreakHelperImpl(impl) {\n if (!_impl) {\n _impl = impl;\n }\n}\nexport function getAxisBreakHelper() {\n return _impl;\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport axisDefault from './axisDefault.js';\nimport { getLayoutParams, mergeLayoutParam, fetchLayoutMode } from '../util/layout.js';\nimport OrdinalMeta from '../data/OrdinalMeta.js';\nimport { AXIS_TYPES } from './axisCommonTypes.js';\nimport { each, merge } from 'zrender/lib/core/util.js';\nimport { getAxisBreakHelper } from '../component/axis/axisBreakHelper.js';\n/**\n * Generate sub axis model class\n * @param axisName 'x' 'y' 'radius' 'angle' 'parallel' ...\n */\nexport default function axisModelCreator(registers, axisName, BaseAxisModelClass, extraDefaultOption) {\n each(AXIS_TYPES, function (v, axisType) {\n var defaultOption = merge(merge({}, axisDefault[axisType], true), extraDefaultOption, true);\n var AxisModel = /** @class */function (_super) {\n __extends(AxisModel, _super);\n function AxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = axisName + 'Axis.' + axisType;\n return _this;\n }\n AxisModel.prototype.mergeDefaultAndTheme = function (option, ecModel) {\n var layoutMode = fetchLayoutMode(this);\n var inputPositionParams = layoutMode ? getLayoutParams(option) : {};\n var themeModel = ecModel.getTheme();\n merge(option, themeModel.get(axisType + 'Axis'));\n merge(option, this.getDefaultOption());\n option.type = getAxisType(option);\n if (layoutMode) {\n mergeLayoutParam(option, inputPositionParams, layoutMode);\n }\n };\n AxisModel.prototype.optionUpdated = function () {\n var thisOption = this.option;\n if (thisOption.type === 'category') {\n this.__ordinalMeta = OrdinalMeta.createByAxisModel(this);\n }\n };\n /**\n * Should not be called before all of 'getInitailData' finished.\n * Because categories are collected during initializing data.\n */\n AxisModel.prototype.getCategories = function (rawData) {\n var option = this.option;\n // FIXME\n // warning if called before all of 'getInitailData' finished.\n if (option.type === 'category') {\n if (rawData) {\n // NOTICE: return the raw data even if not existing; never use a fallback like `[]`;\n // Its existence matters in some legacy cases.\n return option.data;\n }\n return this.__ordinalMeta.categories;\n }\n };\n AxisModel.prototype.getOrdinalMeta = function () {\n return this.__ordinalMeta;\n };\n AxisModel.prototype.updateAxisBreaks = function (payload) {\n var axisBreakHelper = getAxisBreakHelper();\n return axisBreakHelper ? axisBreakHelper.updateModelAxisBreak(this, payload) : {\n breaks: []\n };\n };\n AxisModel.type = axisName + 'Axis.' + axisType;\n AxisModel.defaultOption = defaultOption;\n return AxisModel;\n }(BaseAxisModelClass);\n registers.registerComponentModel(AxisModel);\n });\n registers.registerSubTypeDefaulter(axisName + 'Axis', getAxisType);\n}\nfunction getAxisType(option) {\n // Default axis with data is category axis\n return option.type || (option.data ? 'category' : 'value');\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar Cartesian = /** @class */function () {\n function Cartesian(name) {\n this.type = 'cartesian';\n this._dimList = [];\n this._axes = {};\n this.name = name || '';\n }\n Cartesian.prototype.getAxis = function (dim) {\n return this._axes[dim];\n };\n Cartesian.prototype.getAxes = function () {\n return zrUtil.map(this._dimList, function (dim) {\n return this._axes[dim];\n }, this);\n };\n Cartesian.prototype.getAxesByScale = function (scaleType) {\n scaleType = scaleType.toLowerCase();\n return zrUtil.filter(this.getAxes(), function (axis) {\n return axis.scale.type === scaleType;\n });\n };\n Cartesian.prototype.addAxis = function (axis) {\n var dim = axis.dim;\n this._axes[dim] = axis;\n this._dimList.push(dim);\n };\n return Cartesian;\n}();\n;\nexport default Cartesian;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport Cartesian from './Cartesian.js';\nimport { COORD_SYS_TYPE_CARTESIAN_2D } from './GridModel.js';\nimport { invert } from 'zrender/lib/core/matrix.js';\nimport { applyTransform } from 'zrender/lib/core/vector.js';\nimport { getScaleExtentForMappingUnsafe } from '../../scale/scaleMapper.js';\nimport { hasBreaks } from '../../scale/break.js';\nexport var cartesian2DDimensions = ['x', 'y'];\nfunction canCalculateAffineTransform(scale) {\n // Only supported on linear space.\n return (scale.type === 'interval' || scale.type === 'time') && !hasBreaks(scale);\n}\nvar Cartesian2D = /** @class */function (_super) {\n __extends(Cartesian2D, _super);\n function Cartesian2D() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = COORD_SYS_TYPE_CARTESIAN_2D;\n _this.dimensions = cartesian2DDimensions;\n return _this;\n }\n /**\n * Calculate an affine transform matrix if two axes are time or value.\n * It's mainly for accelartion on the large time series data.\n */\n Cartesian2D.prototype.calcAffineTransform = function () {\n this._transform = this._invTransform = null;\n var xAxisScale = this.getAxis('x').scale;\n var yAxisScale = this.getAxis('y').scale;\n if (!canCalculateAffineTransform(xAxisScale) || !canCalculateAffineTransform(yAxisScale)) {\n return;\n }\n var xScaleExtent = getScaleExtentForMappingUnsafe(xAxisScale, null);\n var yScaleExtent = getScaleExtentForMappingUnsafe(yAxisScale, null);\n var start = this.dataToPoint([xScaleExtent[0], yScaleExtent[0]]);\n var end = this.dataToPoint([xScaleExtent[1], yScaleExtent[1]]);\n var xScaleSpan = xScaleExtent[1] - xScaleExtent[0];\n var yScaleSpan = yScaleExtent[1] - yScaleExtent[0];\n if (!xScaleSpan || !yScaleSpan) {\n return;\n }\n // Accelerate data to point calculation on the special large time series data.\n var scaleX = (end[0] - start[0]) / xScaleSpan;\n var scaleY = (end[1] - start[1]) / yScaleSpan;\n var translateX = start[0] - xScaleExtent[0] * scaleX;\n var translateY = start[1] - yScaleExtent[0] * scaleY;\n var m = this._transform = [scaleX, 0, 0, scaleY, translateX, translateY];\n this._invTransform = invert([], m);\n };\n /**\n * Base axis will be used on stacking and series such as 'bar', 'pictorialBar', etc.\n */\n Cartesian2D.prototype.getBaseAxis = function () {\n // FIXME:\n // (1) We should allow series (e.g., bar) to specify a base axis when\n // both axes are type \"value\", rather than force to xAxis or angleAxis.\n // NOTE: At present BoxplotSeries has its own overide `getBaseAxis`.\n // `CoordinateSystem['getBaseAxis']` probably should not exist, since it\n // may introduce inconsistency with `Series['getBaseAxis']`.\n // (2) \"base axis\" info is required in \"createSeriesData\" stage for \"stack\",\n // (see `dataStackHelper.ts` for details). Currently it is hard coded there.\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAxis('x');\n };\n Cartesian2D.prototype.containPoint = function (point) {\n var axisX = this.getAxis('x');\n var axisY = this.getAxis('y');\n return axisX.contain(axisX.toLocalCoord(point[0])) && axisY.contain(axisY.toLocalCoord(point[1]));\n };\n Cartesian2D.prototype.containData = function (data) {\n return this.getAxis('x').containData(data[0]) && this.getAxis('y').containData(data[1]);\n };\n Cartesian2D.prototype.containZone = function (data1, data2) {\n var zoneDiag1 = this.dataToPoint(data1);\n var zoneDiag2 = this.dataToPoint(data2);\n var area = this.getArea();\n var zone = new BoundingRect(zoneDiag1[0], zoneDiag1[1], zoneDiag2[0] - zoneDiag1[0], zoneDiag2[1] - zoneDiag1[1]);\n return area.intersect(zone);\n };\n Cartesian2D.prototype.dataToPoint = function (data, clamp, out) {\n out = out || [];\n var xVal = data[0];\n var yVal = data[1];\n // [CAVEAT]: Do not add time consuming operation within and before fast path.\n // Fast path.\n if (this._transform\n // It's supported that if data is like `[Inifity, 123]`, where only Y pixel calculated.\n && xVal != null && isFinite(xVal) && yVal != null && isFinite(yVal)) {\n return applyTransform(out, data, this._transform);\n }\n var xAxis = this.getAxis('x');\n var yAxis = this.getAxis('y');\n out[0] = xAxis.toGlobalCoord(xAxis.dataToCoord(xVal, clamp));\n out[1] = yAxis.toGlobalCoord(yAxis.dataToCoord(yVal, clamp));\n return out;\n };\n Cartesian2D.prototype.clampData = function (data, out) {\n var xScale = this.getAxis('x').scale;\n var yScale = this.getAxis('y').scale;\n var xAxisExtent = xScale.getExtent();\n var yAxisExtent = yScale.getExtent();\n var x = xScale.parse(data[0]);\n var y = yScale.parse(data[1]);\n out = out || [];\n out[0] = Math.min(Math.max(Math.min(xAxisExtent[0], xAxisExtent[1]), x), Math.max(xAxisExtent[0], xAxisExtent[1]));\n out[1] = Math.min(Math.max(Math.min(yAxisExtent[0], yAxisExtent[1]), y), Math.max(yAxisExtent[0], yAxisExtent[1]));\n return out;\n };\n Cartesian2D.prototype.pointToData = function (point, clamp, out) {\n out = out || [];\n if (this._invTransform) {\n return applyTransform(out, point, this._invTransform);\n }\n var xAxis = this.getAxis('x');\n var yAxis = this.getAxis('y');\n out[0] = xAxis.coordToData(xAxis.toLocalCoord(point[0]), clamp);\n out[1] = yAxis.coordToData(yAxis.toLocalCoord(point[1]), clamp);\n return out;\n };\n Cartesian2D.prototype.getOtherAxis = function (axis) {\n return this.getAxis(axis.dim === 'x' ? 'y' : 'x');\n };\n /**\n * Get rect area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n */\n Cartesian2D.prototype.getArea = function (tolerance) {\n tolerance = tolerance || 0;\n var xExtent = this.getAxis('x').getGlobalExtent();\n var yExtent = this.getAxis('y').getGlobalExtent();\n var x = Math.min(xExtent[0], xExtent[1]) - tolerance;\n var y = Math.min(yExtent[0], yExtent[1]) - tolerance;\n var width = Math.max(xExtent[0], xExtent[1]) - x + tolerance;\n var height = Math.max(yExtent[0], yExtent[1]) - y + tolerance;\n return new BoundingRect(x, y, width, height);\n };\n return Cartesian2D;\n}(Cartesian);\n;\nexport default Cartesian2D;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar Axis2D = /** @class */function (_super) {\n __extends(Axis2D, _super);\n function Axis2D(dim, scale, coordExtent, axisType, position) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n /**\n * Index of axis, can be used as key\n * Injected outside.\n */\n _this.index = 0;\n _this.type = axisType || 'value';\n _this.position = position || 'bottom';\n return _this;\n }\n Axis2D.prototype.isHorizontal = function () {\n var position = this.position;\n return position === 'top' || position === 'bottom';\n };\n /**\n * Each item cooresponds to this.getExtent(), which\n * means globalExtent[0] may greater than globalExtent[1],\n * unless `asc` is input.\n *\n * @param {boolean} [asc]\n * @return {Array.<number>}\n */\n Axis2D.prototype.getGlobalExtent = function (asc) {\n var ret = this.getExtent();\n ret[0] = this.toGlobalCoord(ret[0]);\n ret[1] = this.toGlobalCoord(ret[1]);\n asc && ret[0] > ret[1] && ret.reverse();\n return ret;\n };\n Axis2D.prototype.pointToData = function (point, clamp) {\n return this.coordToData(this.toLocalCoord(point[this.dim === 'x' ? 0 : 1]), clamp);\n };\n /**\n * Set ordinalSortInfo\n * @param info new OrdinalSortInfo\n */\n Axis2D.prototype.setCategorySortInfo = function (info) {\n if (this.type !== 'category') {\n return false;\n }\n this.model.option.categorySortInfo = info;\n this.scale.setSortInfo(info);\n };\n return Axis2D;\n}(Axis);\nexport default Axis2D;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parseFinder } from '../../util/model.js';\nimport { defaults, each } from 'zrender/lib/core/util.js';\nexport var AXIS_BREAK_EXPAND_ACTION_TYPE = 'expandAxisBreak';\nexport var AXIS_BREAK_COLLAPSE_ACTION_TYPE = 'collapseAxisBreak';\nexport var AXIS_BREAK_TOGGLE_ACTION_TYPE = 'toggleAxisBreak';\nvar AXIS_BREAK_CHANGED_EVENT_TYPE = 'axisbreakchanged';\nvar expandAxisBreakActionInfo = {\n type: AXIS_BREAK_EXPAND_ACTION_TYPE,\n event: AXIS_BREAK_CHANGED_EVENT_TYPE,\n update: 'update',\n refineEvent: refineAxisBreakChangeEvent\n};\nvar collapseAxisBreakActionInfo = {\n type: AXIS_BREAK_COLLAPSE_ACTION_TYPE,\n event: AXIS_BREAK_CHANGED_EVENT_TYPE,\n update: 'update',\n refineEvent: refineAxisBreakChangeEvent\n};\nvar toggleAxisBreakActionInfo = {\n type: AXIS_BREAK_TOGGLE_ACTION_TYPE,\n event: AXIS_BREAK_CHANGED_EVENT_TYPE,\n update: 'update',\n refineEvent: refineAxisBreakChangeEvent\n};\nfunction refineAxisBreakChangeEvent(actionResultBatch, payload, ecModel, api) {\n var breaks = [];\n each(actionResultBatch, function (actionResult) {\n breaks = breaks.concat(actionResult.eventBreaks);\n });\n return {\n eventContent: {\n breaks: breaks\n }\n };\n}\nexport function registerAction(registers) {\n registers.registerAction(expandAxisBreakActionInfo, actionHandler);\n registers.registerAction(collapseAxisBreakActionInfo, actionHandler);\n registers.registerAction(toggleAxisBreakActionInfo, actionHandler);\n function actionHandler(payload, ecModel) {\n var eventBreaks = [];\n var finderResult = parseFinder(ecModel, payload);\n function dealUpdate(modelProp, indexProp) {\n each(finderResult[modelProp], function (axisModel) {\n var result = axisModel.updateAxisBreaks(payload);\n each(result.breaks, function (item) {\n var _a;\n eventBreaks.push(defaults((_a = {}, _a[indexProp] = axisModel.componentIndex, _a), item));\n });\n });\n }\n dealUpdate('xAxisModels', 'xAxisIndex');\n dealUpdate('yAxisModels', 'yAxisIndex');\n dealUpdate('singleAxisModels', 'singleAxisIndex');\n return {\n eventBreaks: eventBreaks\n };\n }\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { retrieve, defaults, extend, each, isObject, isString, isNumber, isFunction, retrieve2, assert, map, retrieve3, filter } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport Model from '../../model/Model.js';\nimport { isRadianAroundZero, remRadian } from '../../util/number.js';\nimport { createSymbol, normalizeSymbolOffset } from '../../util/symbol.js';\nimport * as matrixUtil from 'zrender/lib/core/matrix.js';\nimport { applyTransform as v2ApplyTransform } from 'zrender/lib/core/vector.js';\nimport { getTickValueOutermost, isNameLocationCenter, shouldShowAllLabels } from '../../coord/axisHelper.js';\nimport { hideOverlap, labelIntersect, computeLabelGeometry2, ensureLabelLayoutWithGeometry, labelLayoutApplyTranslation, setLabelLayoutDirty, newLabelLayoutWithGeometry } from '../../label/labelLayoutHelper.js';\nimport { makeInner } from '../../util/model.js';\nimport { getAxisBreakHelper } from './axisBreakHelper.js';\nimport { AXIS_BREAK_EXPAND_ACTION_TYPE } from './axisAction.js';\nimport { getScaleBreakHelper, hasBreaks } from '../../scale/break.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport Point from 'zrender/lib/core/Point.js';\nimport { copyTransform } from 'zrender/lib/core/Transformable.js';\nimport { AxisTickLabelComputingKind, createAxisLabelsComputingContext } from '../../coord/axisTickLabelBuilder.js';\nimport { isOrdinalScale, isTimeScale } from '../../scale/helper.js';\nvar PI = Math.PI;\nvar DEFAULT_CENTER_NAME_MARGIN_LEVELS = [[1, 2, 1, 2], [5, 3, 5, 3], [8, 3, 8, 3]];\nvar DEFAULT_ENDS_NAME_MARGIN_LEVELS = [[0, 1, 0, 1], [0, 3, 0, 3], [0, 3, 0, 3]];\nexport var getLabelInner = makeInner();\nvar getTickInner = makeInner();\n/**\n * A context shared by difference axisBuilder instances.\n * For cross-axes overlap resolving.\n *\n * Lifecycle constraint: should not over a pass of ec main process.\n * If model is changed, the context must be disposed.\n *\n * @see AxisBuilderLocalContext\n */\nvar AxisBuilderSharedContext = /** @class */function () {\n function AxisBuilderSharedContext(resolveAxisNameOverlap) {\n /**\n * [CAUTION] Do not modify this data structure outside this class.\n */\n this.recordMap = {};\n this.resolveAxisNameOverlap = resolveAxisNameOverlap;\n }\n AxisBuilderSharedContext.prototype.ensureRecord = function (axisModel) {\n var dim = axisModel.axis.dim;\n var idx = axisModel.componentIndex;\n var recordMap = this.recordMap;\n var records = recordMap[dim] || (recordMap[dim] = []);\n return records[idx] || (records[idx] = {\n ready: {}\n });\n };\n return AxisBuilderSharedContext;\n}();\nexport { AxisBuilderSharedContext };\n;\n/**\n * [CAUTION]\n * 1. The call of this function must be after axisLabel overlap handlings\n * (such as `hideOverlap`, `fixMinMaxLabelShow`) and after transform calculating.\n * 2. Can be called multiple times and should be idempotent.\n */\nfunction resetOverlapRecordToShared(cfg, shared, axisModel, labelLayoutList) {\n var axis = axisModel.axis;\n var record = shared.ensureRecord(axisModel);\n var labelInfoList = [];\n var stOccupiedRect;\n var useStOccupiedRect = hasAxisName(cfg.axisName) && isNameLocationCenter(cfg.nameLocation);\n each(labelLayoutList, function (layout) {\n var layoutInfo = ensureLabelLayoutWithGeometry(layout);\n if (!layoutInfo || layoutInfo.label.ignore) {\n return;\n }\n labelInfoList.push(layoutInfo);\n var transGroup = record.transGroup;\n if (useStOccupiedRect) {\n // Transform to \"standard axis\" for creating stOccupiedRect (the label rects union).\n transGroup.transform ? matrixUtil.invert(_stTransTmp, transGroup.transform) : matrixUtil.identity(_stTransTmp);\n if (layoutInfo.transform) {\n matrixUtil.mul(_stTransTmp, _stTransTmp, layoutInfo.transform);\n }\n BoundingRect.copy(_stLabelRectTmp, layoutInfo.localRect);\n _stLabelRectTmp.applyTransform(_stTransTmp);\n stOccupiedRect ? stOccupiedRect.union(_stLabelRectTmp) : BoundingRect.copy(stOccupiedRect = new BoundingRect(0, 0, 0, 0), _stLabelRectTmp);\n }\n });\n var sortByDim = Math.abs(record.dirVec.x) > 0.1 ? 'x' : 'y';\n var sortByValue = record.transGroup[sortByDim];\n labelInfoList.sort(function (info1, info2) {\n return Math.abs(info1.label[sortByDim] - sortByValue) - Math.abs(info2.label[sortByDim] - sortByValue);\n });\n if (useStOccupiedRect && stOccupiedRect) {\n var extent = axis.getExtent();\n var axisLineX = Math.min(extent[0], extent[1]);\n var axisLineWidth = Math.max(extent[0], extent[1]) - axisLineX;\n // If `nameLocation` is 'middle', enlarge axis labels boundingRect to axisLine to avoid bad\n // case like that axis name is placed in the gap between axis labels and axis line.\n // If only one label exists, the entire band should be occupied for\n // visual consistency, so extent it to [0, canvas width].\n stOccupiedRect.union(new BoundingRect(axisLineX, 0, axisLineWidth, 1));\n }\n record.stOccupiedRect = stOccupiedRect;\n record.labelInfoList = labelInfoList;\n}\nvar _stTransTmp = matrixUtil.create();\nvar _stLabelRectTmp = new BoundingRect(0, 0, 0, 0);\n/**\n * The default resolver does not involve other axes within the same coordinate system.\n */\nexport var resolveAxisNameOverlapDefault = function (cfg, ctx, axisModel, nameLayoutInfo, nameMoveDirVec, thisRecord) {\n if (isNameLocationCenter(cfg.nameLocation)) {\n var stOccupiedRect = thisRecord.stOccupiedRect;\n if (stOccupiedRect) {\n moveIfOverlap(computeLabelGeometry2({}, stOccupiedRect, thisRecord.transGroup.transform), nameLayoutInfo, nameMoveDirVec);\n }\n } else {\n moveIfOverlapByLinearLabels(thisRecord.labelInfoList, thisRecord.dirVec, nameLayoutInfo, nameMoveDirVec);\n }\n};\n// [NOTICE] not consider ignore.\nfunction moveIfOverlap(basedLayoutInfo, movableLayoutInfo, moveDirVec) {\n var mtv = new Point();\n if (labelIntersect(basedLayoutInfo, movableLayoutInfo, mtv, {\n direction: Math.atan2(moveDirVec.y, moveDirVec.x),\n bidirectional: false,\n touchThreshold: 0.05\n })) {\n labelLayoutApplyTranslation(movableLayoutInfo, mtv);\n }\n}\nexport function moveIfOverlapByLinearLabels(baseLayoutInfoList, baseDirVec, movableLayoutInfo, moveDirVec) {\n // Detect and move from far to close.\n var sameDir = Point.dot(moveDirVec, baseDirVec) >= 0;\n for (var idx = 0, len = baseLayoutInfoList.length; idx < len; idx++) {\n var labelInfo = baseLayoutInfoList[sameDir ? idx : len - 1 - idx];\n if (!labelInfo.label.ignore) {\n moveIfOverlap(labelInfo, movableLayoutInfo, moveDirVec);\n }\n }\n}\n/**\n * @caution\n * - Ensure it is called after the data processing stage finished.\n * - It might be called before `CahrtView#render`, sush as called at `CoordinateSystem#update`,\n * thus ensure the result the same whenever it is called.\n *\n * A builder for a straight-line axis.\n *\n * A final axis is translated and rotated from a \"standard axis\".\n * So opt.position and opt.rotation is required.\n *\n * A \"standard axis\" is the axis [0,0]-->[abs(axisExtent[1]-axisExtent[0]),0]\n * for example: [0,0]-->[50,0]\n */\nvar AxisBuilder = /** @class */function () {\n /**\n * [CAUTION]: axisModel.axis.extent/scale must be ready to use.\n */\n function AxisBuilder(axisModel, api, opt, shared) {\n this.group = new graphic.Group();\n this._axisModel = axisModel;\n this._api = api;\n this._local = {};\n this._shared = shared || new AxisBuilderSharedContext(resolveAxisNameOverlapDefault);\n this._resetCfgDetermined(opt);\n }\n /**\n * Regarding axis label related configurations, only the change of label.x/y is supported; other\n * changes are not necessary and not performant. To be specific, only `axis.position`\n * (and consequently `labelOffset`) and `axis.extent` can be changed, and assume everything in\n * `axisModel` are not changed.\n * Axis line related configurations can be changed since this method can only be called\n * before they are created.\n */\n AxisBuilder.prototype.updateCfg = function (opt) {\n if (process.env.NODE_ENV !== 'production') {\n var ready = this._shared.ensureRecord(this._axisModel).ready;\n // After that, changing cfg is not supported; avoid unnecessary complexity.\n assert(!ready.axisLine && !ready.axisTickLabelDetermine);\n // Have to be called again if cfg changed.\n ready.axisName = ready.axisTickLabelEstimate = false;\n }\n var raw = this._cfg.raw;\n raw.position = opt.position;\n raw.labelOffset = opt.labelOffset;\n this._resetCfgDetermined(raw);\n };\n /**\n * [CAUTION] For debug usage. Never change it outside!\n */\n AxisBuilder.prototype.__getRawCfg = function () {\n return this._cfg.raw;\n };\n AxisBuilder.prototype._resetCfgDetermined = function (raw) {\n var axisModel = this._axisModel;\n // FIXME:\n // Currently there is no uniformed way to set default values if an option\n // is specified null/undefined by user (intentionally or unintentionally),\n // e.g. null/undefined is not a illegal value for `nameLocation`.\n // Try to use `getDefaultOption` to address it. But radar has no `getDefaultOption`.\n var axisModelDefaultOption = axisModel.getDefaultOption ? axisModel.getDefaultOption() : {};\n // Default value\n var axisName = retrieve2(raw.axisName, axisModel.get('name'));\n var nameMoveOverlapOption = axisModel.get('nameMoveOverlap');\n if (nameMoveOverlapOption == null || nameMoveOverlapOption === 'auto') {\n nameMoveOverlapOption = retrieve2(raw.defaultNameMoveOverlap, true);\n }\n var cfg = {\n raw: raw,\n position: raw.position,\n rotation: raw.rotation,\n nameDirection: retrieve2(raw.nameDirection, 1),\n tickDirection: retrieve2(raw.tickDirection, 1),\n labelDirection: retrieve2(raw.labelDirection, 1),\n labelOffset: retrieve2(raw.labelOffset, 0),\n silent: retrieve2(raw.silent, true),\n axisName: axisName,\n nameLocation: retrieve3(axisModel.get('nameLocation'), axisModelDefaultOption.nameLocation, 'end'),\n shouldNameMoveOverlap: hasAxisName(axisName) && nameMoveOverlapOption,\n optionHideOverlap: axisModel.get(['axisLabel', 'hideOverlap']),\n showMinorTicks: axisModel.get(['minorTick', 'show'])\n };\n if (process.env.NODE_ENV !== 'production') {\n assert(cfg.position != null);\n assert(cfg.rotation != null);\n }\n this._cfg = cfg;\n // FIXME Not use a separate text group?\n var transformGroup = new graphic.Group({\n x: cfg.position[0],\n y: cfg.position[1],\n rotation: cfg.rotation\n });\n transformGroup.updateTransform();\n this._transformGroup = transformGroup;\n var record = this._shared.ensureRecord(axisModel);\n record.transGroup = this._transformGroup;\n record.dirVec = new Point(Math.cos(-cfg.rotation), Math.sin(-cfg.rotation));\n };\n AxisBuilder.prototype.build = function (axisPartNameMap, extraParams) {\n var _this = this;\n if (!axisPartNameMap) {\n axisPartNameMap = {\n axisLine: true,\n axisTickLabelEstimate: false,\n axisTickLabelDetermine: true,\n axisName: true\n };\n }\n each(AXIS_BUILDER_AXIS_PART_NAMES, function (partName) {\n if (axisPartNameMap[partName]) {\n builders[partName](_this._cfg, _this._local, _this._shared, _this._axisModel, _this.group, _this._transformGroup, _this._api, extraParams || {});\n }\n });\n return this;\n };\n /**\n * Currently only get text align/verticalAlign by rotation.\n * NO `position` is involved, otherwise it have to be performed for each `updateAxisLabelChangableProps`.\n */\n AxisBuilder.innerTextLayout = function (axisRotation, textRotation, direction) {\n var rotationDiff = remRadian(textRotation - axisRotation);\n var textAlign;\n var textVerticalAlign;\n if (isRadianAroundZero(rotationDiff)) {\n // Label is parallel with axis line.\n textVerticalAlign = direction > 0 ? 'top' : 'bottom';\n textAlign = 'center';\n } else if (isRadianAroundZero(rotationDiff - PI)) {\n // Label is inverse parallel with axis line.\n textVerticalAlign = direction > 0 ? 'bottom' : 'top';\n textAlign = 'center';\n } else {\n textVerticalAlign = 'middle';\n if (rotationDiff > 0 && rotationDiff < PI) {\n textAlign = direction > 0 ? 'right' : 'left';\n } else {\n textAlign = direction > 0 ? 'left' : 'right';\n }\n }\n return {\n rotation: rotationDiff,\n textAlign: textAlign,\n textVerticalAlign: textVerticalAlign\n };\n };\n AxisBuilder.makeAxisEventDataBase = function (axisModel) {\n var eventData = {\n componentType: axisModel.mainType,\n componentIndex: axisModel.componentIndex\n };\n eventData[axisModel.mainType + 'Index'] = axisModel.componentIndex;\n return eventData;\n };\n AxisBuilder.isLabelSilent = function (axisModel) {\n var tooltipOpt = axisModel.get('tooltip');\n return axisModel.get('silent')\n // Consider mouse cursor, add these restrictions.\n || !(axisModel.get('triggerEvent') || tooltipOpt && tooltipOpt.show);\n };\n return AxisBuilder;\n}();\n;\n// Sorted by dependency order.\nvar AXIS_BUILDER_AXIS_PART_NAMES = ['axisLine', 'axisTickLabelEstimate', 'axisTickLabelDetermine', 'axisName'];\nvar builders = {\n axisLine: function (cfg, local, shared, axisModel, group, transformGroup, api) {\n if (process.env.NODE_ENV !== 'production') {\n var ready = shared.ensureRecord(axisModel).ready;\n assert(!ready.axisLine);\n ready.axisLine = true;\n }\n var shown = axisModel.get(['axisLine', 'show']);\n if (shown === 'auto') {\n shown = true;\n if (cfg.raw.axisLineAutoShow != null) {\n shown = !!cfg.raw.axisLineAutoShow;\n }\n }\n if (!shown) {\n return;\n }\n var extent = axisModel.axis.getExtent();\n var matrix = transformGroup.transform;\n var pt1 = [extent[0], 0];\n var pt2 = [extent[1], 0];\n var inverse = pt1[0] > pt2[0];\n if (matrix) {\n v2ApplyTransform(pt1, pt1, matrix);\n v2ApplyTransform(pt2, pt2, matrix);\n }\n var lineStyle = extend({\n lineCap: 'round'\n }, axisModel.getModel(['axisLine', 'lineStyle']).getLineStyle());\n var pathBaseProp = {\n strokeContainThreshold: cfg.raw.strokeContainThreshold || 5,\n silent: true,\n z2: 1,\n style: lineStyle\n };\n if (axisModel.get(['axisLine', 'breakLine']) && hasBreaks(axisModel.axis.scale)) {\n getAxisBreakHelper().buildAxisBreakLine(axisModel, group, transformGroup, pathBaseProp);\n } else {\n var line = new graphic.Line(extend({\n shape: {\n x1: pt1[0],\n y1: pt1[1],\n x2: pt2[0],\n y2: pt2[1]\n }\n }, pathBaseProp));\n graphic.subPixelOptimizeLine(line.shape, line.style.lineWidth);\n line.anid = 'line';\n group.add(line);\n }\n var arrows = axisModel.get(['axisLine', 'symbol']);\n if (arrows != null) {\n var arrowSize = axisModel.get(['axisLine', 'symbolSize']);\n if (isString(arrows)) {\n // Use the same arrow for start and end point\n arrows = [arrows, arrows];\n }\n if (isString(arrowSize) || isNumber(arrowSize)) {\n // Use the same size for width and height\n arrowSize = [arrowSize, arrowSize];\n }\n var arrowOffset = normalizeSymbolOffset(axisModel.get(['axisLine', 'symbolOffset']) || 0, arrowSize);\n var symbolWidth_1 = arrowSize[0];\n var symbolHeight_1 = arrowSize[1];\n each([{\n rotate: cfg.rotation + Math.PI / 2,\n offset: arrowOffset[0],\n r: 0\n }, {\n rotate: cfg.rotation - Math.PI / 2,\n offset: arrowOffset[1],\n r: Math.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))\n }], function (point, index) {\n if (arrows[index] !== 'none' && arrows[index] != null) {\n var symbol = createSymbol(arrows[index], -symbolWidth_1 / 2, -symbolHeight_1 / 2, symbolWidth_1, symbolHeight_1, lineStyle.stroke, true);\n // Calculate arrow position with offset\n var r = point.r + point.offset;\n var pt = inverse ? pt2 : pt1;\n symbol.attr({\n rotation: point.rotate,\n x: pt[0] + r * Math.cos(cfg.rotation),\n y: pt[1] - r * Math.sin(cfg.rotation),\n silent: true,\n z2: 11\n });\n group.add(symbol);\n }\n });\n }\n },\n /**\n * [CAUTION] This method can be called multiple times, following the change due to `resetCfg` called\n * in size measurement. Thus this method should be idempotent, and should be performant.\n */\n axisTickLabelEstimate: function (cfg, local, shared, axisModel, group, transformGroup, api, extraParams) {\n if (process.env.NODE_ENV !== 'production') {\n var ready = shared.ensureRecord(axisModel).ready;\n assert(!ready.axisTickLabelDetermine);\n ready.axisTickLabelEstimate = true;\n }\n var needCallLayout = dealLastTickLabelResultReusable(local, group, extraParams);\n if (needCallLayout) {\n layOutAxisTickLabel(cfg, local, shared, axisModel, group, transformGroup, api, AxisTickLabelComputingKind.estimate);\n }\n },\n /**\n * Finish axis tick label build.\n * Can be only called once.\n */\n axisTickLabelDetermine: function (cfg, local, shared, axisModel, group, transformGroup, api, extraParams) {\n if (process.env.NODE_ENV !== 'production') {\n var ready = shared.ensureRecord(axisModel).ready;\n ready.axisTickLabelDetermine = true;\n }\n var needCallLayout = dealLastTickLabelResultReusable(local, group, extraParams);\n if (needCallLayout) {\n layOutAxisTickLabel(cfg, local, shared, axisModel, group, transformGroup, api, AxisTickLabelComputingKind.determine);\n }\n var ticksEls = buildAxisMajorTicks(cfg, group, transformGroup, axisModel);\n syncLabelIgnoreToMajorTicks(cfg, local.labelLayoutList, ticksEls);\n buildAxisMinorTicks(cfg, group, transformGroup, axisModel, cfg.tickDirection);\n },\n /**\n * [CAUTION] This method can be called multiple times, following the change due to `resetCfg` called\n * in size measurement. Thus this method should be idempotent, and should be performant.\n */\n axisName: function (cfg, local, shared, axisModel, group, transformGroup, api, extraParams) {\n var sharedRecord = shared.ensureRecord(axisModel);\n if (process.env.NODE_ENV !== 'production') {\n var ready = sharedRecord.ready;\n assert(ready.axisTickLabelEstimate || ready.axisTickLabelDetermine);\n ready.axisName = true;\n }\n // Remove the existing name result created in estimation phase.\n if (local.nameEl) {\n group.remove(local.nameEl);\n local.nameEl = sharedRecord.nameLayout = sharedRecord.nameLocation = null;\n }\n var name = cfg.axisName;\n if (!hasAxisName(name)) {\n return;\n }\n var nameLocation = cfg.nameLocation;\n var nameDirection = cfg.nameDirection;\n var textStyleModel = axisModel.getModel('nameTextStyle');\n var gap = axisModel.get('nameGap') || 0;\n var extent = axisModel.axis.getExtent();\n var gapStartEndSignal = axisModel.axis.inverse ? -1 : 1;\n var pos = new Point(0, 0);\n var nameMoveDirVec = new Point(0, 0);\n if (nameLocation === 'start') {\n pos.x = extent[0] - gapStartEndSignal * gap;\n nameMoveDirVec.x = -gapStartEndSignal;\n } else if (nameLocation === 'end') {\n pos.x = extent[1] + gapStartEndSignal * gap;\n nameMoveDirVec.x = gapStartEndSignal;\n } else {\n // 'middle' or 'center'\n pos.x = (extent[0] + extent[1]) / 2;\n pos.y = cfg.labelOffset + nameDirection * gap;\n nameMoveDirVec.y = nameDirection;\n }\n var mt = matrixUtil.create();\n nameMoveDirVec.transform(matrixUtil.rotate(mt, mt, cfg.rotation));\n var nameRotation = axisModel.get('nameRotate');\n if (nameRotation != null) {\n nameRotation = nameRotation * PI / 180; // To radian.\n }\n var labelLayout;\n var axisNameAvailableWidth;\n if (isNameLocationCenter(nameLocation)) {\n labelLayout = AxisBuilder.innerTextLayout(cfg.rotation, nameRotation != null ? nameRotation : cfg.rotation,\n // Adapt to axis.\n nameDirection);\n } else {\n labelLayout = endTextLayout(cfg.rotation, nameLocation, nameRotation || 0, extent);\n axisNameAvailableWidth = cfg.raw.axisNameAvailableWidth;\n if (axisNameAvailableWidth != null) {\n axisNameAvailableWidth = Math.abs(axisNameAvailableWidth / Math.sin(labelLayout.rotation));\n !isFinite(axisNameAvailableWidth) && (axisNameAvailableWidth = null);\n }\n }\n var textFont = textStyleModel.getFont();\n var truncateOpt = axisModel.get('nameTruncate', true) || {};\n var ellipsis = truncateOpt.ellipsis;\n var maxWidth = retrieve(cfg.raw.nameTruncateMaxWidth, truncateOpt.maxWidth, axisNameAvailableWidth);\n var nameMarginLevel = extraParams.nameMarginLevel || 0;\n var textEl = new graphic.Text({\n x: pos.x,\n y: pos.y,\n rotation: labelLayout.rotation,\n silent: AxisBuilder.isLabelSilent(axisModel),\n style: createTextStyle(textStyleModel, {\n text: name,\n font: textFont,\n overflow: 'truncate',\n width: maxWidth,\n ellipsis: ellipsis,\n fill: textStyleModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']),\n align: textStyleModel.get('align') || labelLayout.textAlign,\n verticalAlign: textStyleModel.get('verticalAlign') || labelLayout.textVerticalAlign\n }),\n z2: 1\n });\n graphic.setTooltipConfig({\n el: textEl,\n componentModel: axisModel,\n itemName: name\n });\n textEl.__fullText = name;\n // Id for animation\n textEl.anid = 'name';\n if (axisModel.get('triggerEvent')) {\n var eventData = AxisBuilder.makeAxisEventDataBase(axisModel);\n eventData.targetType = 'axisName';\n eventData.name = name;\n getECData(textEl).eventData = eventData;\n }\n transformGroup.add(textEl);\n textEl.updateTransform();\n local.nameEl = textEl;\n var nameLayout = sharedRecord.nameLayout = ensureLabelLayoutWithGeometry({\n label: textEl,\n priority: textEl.z2,\n defaultAttr: {\n ignore: textEl.ignore\n },\n marginDefault: isNameLocationCenter(nameLocation)\n // Make axis name visually far from axis labels.\n // (but not too aggressive, consider multiple small charts)\n ? DEFAULT_CENTER_NAME_MARGIN_LEVELS[nameMarginLevel]\n // top/button margin is set to `0` to inserted the xAxis name into the indention\n // above the axis labels to save space. (see example below.)\n : DEFAULT_ENDS_NAME_MARGIN_LEVELS[nameMarginLevel]\n });\n sharedRecord.nameLocation = nameLocation;\n group.add(textEl);\n textEl.decomposeTransform();\n if (cfg.shouldNameMoveOverlap && nameLayout) {\n var record = shared.ensureRecord(axisModel);\n if (process.env.NODE_ENV !== 'production') {\n assert(record.labelInfoList);\n }\n shared.resolveAxisNameOverlap(cfg, shared, axisModel, nameLayout, nameMoveDirVec, record);\n }\n }\n};\nfunction layOutAxisTickLabel(cfg, local, shared, axisModel, group, transformGroup, api, kind) {\n if (!axisLabelBuildResultExists(local)) {\n buildAxisLabel(cfg, local, group, kind, axisModel, api);\n }\n var labelLayoutList = local.labelLayoutList;\n updateAxisLabelChangableProps(cfg, axisModel, labelLayoutList, transformGroup);\n adjustBreakLabels(axisModel, cfg.rotation, labelLayoutList);\n var optionHideOverlap = cfg.optionHideOverlap;\n fixMinMaxLabelShow(axisModel, labelLayoutList, optionHideOverlap);\n if (optionHideOverlap) {\n // This bit fixes the label overlap issue for the time chart.\n // See https://github.com/apache/echarts/issues/14266 for more.\n hideOverlap(\n // Filter the already ignored labels by the previous overlap resolving methods.\n filter(labelLayoutList, function (layout) {\n return layout && !layout.label.ignore;\n }));\n }\n // Always call it even this axis has no name, since it serves in overlapping detection\n // and grid outerBounds on other axis.\n resetOverlapRecordToShared(cfg, shared, axisModel, labelLayoutList);\n}\n;\nfunction endTextLayout(rotation, textPosition, textRotate, extent) {\n var rotationDiff = remRadian(textRotate - rotation);\n var textAlign;\n var textVerticalAlign;\n var inverse = extent[0] > extent[1];\n var onLeft = textPosition === 'start' && !inverse || textPosition !== 'start' && inverse;\n if (isRadianAroundZero(rotationDiff - PI / 2)) {\n textVerticalAlign = onLeft ? 'bottom' : 'top';\n textAlign = 'center';\n } else if (isRadianAroundZero(rotationDiff - PI * 1.5)) {\n textVerticalAlign = onLeft ? 'top' : 'bottom';\n textAlign = 'center';\n } else {\n textVerticalAlign = 'middle';\n if (rotationDiff < PI * 1.5 && rotationDiff > PI / 2) {\n textAlign = onLeft ? 'left' : 'right';\n } else {\n textAlign = onLeft ? 'right' : 'left';\n }\n }\n return {\n rotation: rotationDiff,\n textAlign: textAlign,\n textVerticalAlign: textVerticalAlign\n };\n}\n/**\n * Assume `labelLayoutList` has no `label.ignore: true`.\n * Assume `labelLayoutList` have been sorted by value ascending order.\n */\nfunction fixMinMaxLabelShow(axisModel, labelLayoutList, optionHideOverlap) {\n var axis = axisModel.axis;\n var customValuesOption = axisModel.get(['axisLabel', 'customValues']);\n if (shouldShowAllLabels(axis)) {\n return;\n }\n // FIXME\n // Have not consider onBand yet, where tick els is more than label els.\n // Assert no ignore in labels.\n function deal(showMinMaxLabelOption, outmostLabelIdx, innerLabelIdx) {\n var outmostLabelLayout = ensureLabelLayoutWithGeometry(labelLayoutList[outmostLabelIdx]);\n var innerLabelLayout = ensureLabelLayoutWithGeometry(labelLayoutList[innerLabelIdx]);\n var scale = axis.scale;\n if (!outmostLabelLayout || !innerLabelLayout) {\n return;\n }\n if (showMinMaxLabelOption == null) {\n if (!optionHideOverlap && customValuesOption) {\n // In this case, users are unlikely to expect labels to be hidden.\n return;\n }\n var tick = getLabelInner(outmostLabelLayout.label).labelInfo.tick;\n if (\n // TimeScale does not expand extent to \"nice\", so eliminate labels that are not nice.\n isTimeScale(scale) && tick.notNice\n // Category axis does not expect tick that out of axisLabel.internal to be displayed\n // unless required.\n || isOrdinalScale(scale) && tick.offInterval) {\n ignoreEl(outmostLabelLayout.label);\n return;\n }\n }\n if (showMinMaxLabelOption === false || outmostLabelLayout.suggestIgnore) {\n ignoreEl(outmostLabelLayout.label);\n return;\n }\n if (innerLabelLayout.suggestIgnore) {\n ignoreEl(innerLabelLayout.label);\n return;\n }\n // PENDING: Originally we thought `optionHideOverlap === false` means do not hide anything,\n // since currently the bounding rect of text might not accurate enough and might slightly bigger,\n // which causes false positive. But `optionHideOverlap: null/undfined` is falsy and likely\n // be treated as false.\n // In most fonts the glyph does not reach the boundary of the bounding rect.\n // This is needed to avoid too aggressive to hide two elements that meet at the edge\n // due to compact layout by the same bounding rect or OBB.\n var touchThreshold = 0.1;\n // This treatment is for backward compatibility. And `!optionHideOverlap` implies that\n // the user accepts the visual touch between adjacent labels, thus \"hide min/max label\"\n // should be conservative, since the space might be sufficient in this case.\n if (!optionHideOverlap) {\n var marginForce = [0, 0, 0, 0];\n // Make a copy to apply `ignoreMargin`.\n outmostLabelLayout = newLabelLayoutWithGeometry({\n marginForce: marginForce\n }, outmostLabelLayout);\n innerLabelLayout = newLabelLayoutWithGeometry({\n marginForce: marginForce\n }, innerLabelLayout);\n }\n if (labelIntersect(outmostLabelLayout, innerLabelLayout, null, {\n touchThreshold: touchThreshold\n })) {\n if (showMinMaxLabelOption) {\n ignoreEl(innerLabelLayout.label);\n } else {\n ignoreEl(outmostLabelLayout.label);\n }\n }\n }\n // If min or max are user set, we need to check\n // If the tick on min(max) are overlap on their neighbour tick\n // If they are overlapped, we need to hide the min(max) tick label\n var showMinLabelOption = axisModel.get(['axisLabel', 'showMinLabel']);\n var showMaxLabelOption = axisModel.get(['axisLabel', 'showMaxLabel']);\n var labelsLen = labelLayoutList.length;\n deal(showMinLabelOption, 0, 1);\n deal(showMaxLabelOption, labelsLen - 1, labelsLen - 2);\n}\n// Under default settings, it is visually odd to display a tick without its label,\n// since ticks extend from axis line towards labels and serve as visual guide.\n// PENDING: Is there opposite cases?\nfunction syncLabelIgnoreToMajorTicks(cfg, labelLayoutList, tickEls) {\n if (cfg.showMinorTicks) {\n // It probably unreasonable to hide major ticks when show minor ticks.\n return;\n }\n each(labelLayoutList, function (labelLayout) {\n if (labelLayout && labelLayout.label.ignore) {\n for (var idx = 0; idx < tickEls.length; idx++) {\n var tickEl = tickEls[idx];\n // Assume small array, linear search is fine for performance.\n // PENDING: measure?\n var tickInner = getTickInner(tickEl);\n var labelInner = getLabelInner(labelLayout.label);\n if (tickInner.tickValue != null && !tickInner.onBand && tickInner.tickValue === labelInner.labelInfo.tick.value) {\n ignoreEl(tickEl);\n return;\n }\n }\n }\n });\n}\nfunction ignoreEl(el) {\n el && (el.ignore = true);\n}\nfunction createTicks(ticksCoords, tickTransform, tickEndCoord, tickLineStyle, anidPrefix) {\n var tickEls = [];\n var pt1 = [];\n var pt2 = [];\n for (var i = 0; i < ticksCoords.length; i++) {\n var tickCoord = ticksCoords[i].coord;\n pt1[0] = tickCoord;\n pt1[1] = 0;\n pt2[0] = tickCoord;\n pt2[1] = tickEndCoord;\n if (tickTransform) {\n v2ApplyTransform(pt1, pt1, tickTransform);\n v2ApplyTransform(pt2, pt2, tickTransform);\n }\n // Tick line, Not use group transform to have better line draw\n var tickEl = new graphic.Line({\n shape: {\n x1: pt1[0],\n y1: pt1[1],\n x2: pt2[0],\n y2: pt2[1]\n },\n style: tickLineStyle,\n z2: 2,\n autoBatch: true,\n silent: true\n });\n graphic.subPixelOptimizeLine(tickEl.shape, tickEl.style.lineWidth);\n tickEl.anid = anidPrefix + '_' + ticksCoords[i].tickValue;\n tickEls.push(tickEl);\n var inner = getTickInner(tickEl);\n inner.onBand = !!ticksCoords[i].onBand;\n inner.tickValue = ticksCoords[i].tickValue;\n }\n return tickEls;\n}\nfunction buildAxisMajorTicks(cfg, group, transformGroup, axisModel) {\n var axis = axisModel.axis;\n var tickModel = axisModel.getModel('axisTick');\n var shown = tickModel.get('show');\n if (shown === 'auto') {\n shown = true;\n if (cfg.raw.axisTickAutoShow != null) {\n shown = !!cfg.raw.axisTickAutoShow;\n }\n }\n if (!shown || axis.scale.isBlank()) {\n return [];\n }\n var lineStyleModel = tickModel.getModel('lineStyle');\n var tickEndCoord = cfg.tickDirection * tickModel.get('length');\n var ticksCoords = axis.getTicksCoords();\n var ticksEls = createTicks(ticksCoords, transformGroup.transform, tickEndCoord, defaults(lineStyleModel.getLineStyle(), {\n stroke: axisModel.get(['axisLine', 'lineStyle', 'color'])\n }), 'ticks');\n for (var i = 0; i < ticksEls.length; i++) {\n group.add(ticksEls[i]);\n }\n return ticksEls;\n}\nfunction buildAxisMinorTicks(cfg, group, transformGroup, axisModel, tickDirection) {\n var axis = axisModel.axis;\n var minorTickModel = axisModel.getModel('minorTick');\n if (!cfg.showMinorTicks || axis.scale.isBlank()) {\n return;\n }\n var minorTicksCoords = axis.getMinorTicksCoords();\n if (!minorTicksCoords.length) {\n return;\n }\n var lineStyleModel = minorTickModel.getModel('lineStyle');\n var tickEndCoord = tickDirection * minorTickModel.get('length');\n var minorTickLineStyle = defaults(lineStyleModel.getLineStyle(), defaults(axisModel.getModel('axisTick').getLineStyle(), {\n stroke: axisModel.get(['axisLine', 'lineStyle', 'color'])\n }));\n for (var i = 0; i < minorTicksCoords.length; i++) {\n var minorTicksEls = createTicks(minorTicksCoords[i], transformGroup.transform, tickEndCoord, minorTickLineStyle, 'minorticks_' + i);\n for (var k = 0; k < minorTicksEls.length; k++) {\n group.add(minorTicksEls[k]);\n }\n }\n}\n// Return whether need to call `layOutAxisTickLabel` again.\nfunction dealLastTickLabelResultReusable(local, group, extraParams) {\n if (axisLabelBuildResultExists(local)) {\n var axisLabelsCreationContext = local.axisLabelsCreationContext;\n if (process.env.NODE_ENV !== 'production') {\n assert(local.labelGroup && axisLabelsCreationContext);\n }\n var noPxChangeTryDetermine = axisLabelsCreationContext.out.noPxChangeTryDetermine;\n if (extraParams.noPxChange) {\n var canDetermine = true;\n for (var idx = 0; idx < noPxChangeTryDetermine.length; idx++) {\n canDetermine = canDetermine && noPxChangeTryDetermine[idx]();\n }\n if (canDetermine) {\n return false;\n }\n }\n if (noPxChangeTryDetermine.length) {\n // Remove the result of `buildAxisLabel`\n group.remove(local.labelGroup);\n axisLabelBuildResultSet(local, null, null, null);\n }\n }\n return true;\n}\nfunction buildAxisLabel(cfg, local, group, kind, axisModel, api) {\n var axis = axisModel.axis;\n var show = retrieve(cfg.raw.axisLabelShow, axisModel.get(['axisLabel', 'show']));\n var labelGroup = new graphic.Group();\n group.add(labelGroup);\n var axisLabelCreationCtx = createAxisLabelsComputingContext(kind);\n if (!show || axis.scale.isBlank()) {\n axisLabelBuildResultSet(local, [], labelGroup, axisLabelCreationCtx);\n return;\n }\n var labelModel = axisModel.getModel('axisLabel');\n var labels = axis.getViewLabels(axisLabelCreationCtx);\n // Special label rotate.\n var labelRotation = (retrieve(cfg.raw.labelRotate, labelModel.get('rotate')) || 0) * PI / 180;\n var labelLayout = AxisBuilder.innerTextLayout(cfg.rotation, labelRotation, cfg.labelDirection);\n var rawCategoryData = axisModel.getCategories && axisModel.getCategories(true);\n var labelEls = [];\n var triggerEvent = axisModel.get('triggerEvent');\n var z2Min = Infinity;\n var z2Max = -Infinity;\n each(labels, function (labelItem, index) {\n var _a;\n var labelItemTick = labelItem.tick;\n var formattedLabel = labelItem.formattedLabel;\n var rawLabel = labelItem.rawLabel;\n var itemLabelModel = labelModel;\n var tickValue = getTickValueOutermost(axis.scale, labelItemTick);\n if (rawCategoryData && rawCategoryData[tickValue]) {\n var rawCategoryItem = rawCategoryData[tickValue];\n if (isObject(rawCategoryItem) && rawCategoryItem.textStyle) {\n itemLabelModel = new Model(rawCategoryItem.textStyle, labelModel, axisModel.ecModel);\n }\n }\n var textColor = itemLabelModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']);\n var align = itemLabelModel.getShallow('align', true) || labelLayout.textAlign;\n var alignMin = retrieve2(itemLabelModel.getShallow('alignMinLabel', true), align);\n var alignMax = retrieve2(itemLabelModel.getShallow('alignMaxLabel', true), align);\n var verticalAlign = itemLabelModel.getShallow('verticalAlign', true) || itemLabelModel.getShallow('baseline', true) || labelLayout.textVerticalAlign;\n var verticalAlignMin = retrieve2(itemLabelModel.getShallow('verticalAlignMinLabel', true), verticalAlign);\n var verticalAlignMax = retrieve2(itemLabelModel.getShallow('verticalAlignMaxLabel', true), verticalAlign);\n var z2 = 10 + (((_a = labelItemTick.time) === null || _a === void 0 ? void 0 : _a.level) || 0);\n z2Min = Math.min(z2Min, z2);\n z2Max = Math.max(z2Max, z2);\n var textEl = new graphic.Text({\n // --- transform props start ---\n // All of the transform props MUST not be set here, but should be set in\n // `updateAxisLabelChangableProps`, because they may change in estimation,\n // and need to calculate based on global coord sys by `decomposeTransform`.\n x: 0,\n y: 0,\n rotation: 0,\n // --- transform props end ---\n silent: AxisBuilder.isLabelSilent(axisModel),\n z2: z2,\n style: createTextStyle(itemLabelModel, {\n text: formattedLabel,\n align: index === 0 ? alignMin : index === labels.length - 1 ? alignMax : align,\n verticalAlign: index === 0 ? verticalAlignMin : index === labels.length - 1 ? verticalAlignMax : verticalAlign,\n fill: isFunction(textColor) ? textColor(\n // (1) In category axis with data zoom, tick is not the original\n // index of axis.data. So tick should not be exposed to user\n // in category axis.\n // (2) Compatible with previous version, which always use formatted label as\n // input. But in interval scale the formatted label is like '223,445', which\n // maked user replace ','. So we modify it to return original val but remain\n // it as 'string' to avoid error in replacing.\n axis.type === 'category' ? rawLabel : axis.type === 'value' ? tickValue + '' : tickValue, index) : textColor\n })\n });\n textEl.anid = 'label_' + tickValue;\n var inner = getLabelInner(textEl);\n inner.labelInfo = labelItem;\n inner.layoutRotation = labelLayout.rotation;\n graphic.setTooltipConfig({\n el: textEl,\n componentModel: axisModel,\n itemName: formattedLabel,\n formatterParamsExtra: {\n isTruncated: function () {\n return textEl.isTruncated;\n },\n value: rawLabel,\n tickIndex: index\n }\n });\n // Pack data for mouse event\n if (triggerEvent) {\n var eventData = AxisBuilder.makeAxisEventDataBase(axisModel);\n eventData.targetType = 'axisLabel';\n eventData.value = rawLabel;\n eventData.tickIndex = index;\n var labelItemTickBreak = labelItem.tick[\"break\"];\n if (labelItemTickBreak) {\n var labelItemTickBreakParsedBreak = labelItemTickBreak.parsedBreak;\n eventData[\"break\"] = {\n // type: labelItem.break.type,\n start: labelItemTickBreakParsedBreak.vmin,\n end: labelItemTickBreakParsedBreak.vmax\n };\n }\n if (axis.type === 'category') {\n eventData.dataIndex = tickValue;\n }\n getECData(textEl).eventData = eventData;\n if (labelItemTickBreak) {\n addBreakEventHandler(axisModel, api, textEl, labelItemTickBreak);\n }\n }\n labelEls.push(textEl);\n labelGroup.add(textEl);\n });\n var labelLayoutList = map(labelEls, function (label) {\n return {\n label: label,\n priority: getLabelInner(label).labelInfo.tick[\"break\"] ? label.z2 + (z2Max - z2Min + 1) // Make break labels be highest priority.\n : label.z2,\n defaultAttr: {\n ignore: label.ignore\n }\n };\n });\n axisLabelBuildResultSet(local, labelLayoutList, labelGroup, axisLabelCreationCtx);\n}\n// Indicate that `layOutAxisTickLabel` has been called.\nfunction axisLabelBuildResultExists(local) {\n return !!local.labelLayoutList;\n}\nfunction axisLabelBuildResultSet(local, labelLayoutList, labelGroup, axisLabelsCreationContext) {\n // Ensure the same lifetime.\n local.labelLayoutList = labelLayoutList;\n local.labelGroup = labelGroup;\n local.axisLabelsCreationContext = axisLabelsCreationContext;\n}\nfunction updateAxisLabelChangableProps(cfg, axisModel, labelLayoutList, transformGroup) {\n var labelMargin = axisModel.get(['axisLabel', 'margin']);\n each(labelLayoutList, function (layout, idx) {\n var geometry = ensureLabelLayoutWithGeometry(layout);\n if (!geometry) {\n return;\n }\n var labelEl = geometry.label;\n var inner = getLabelInner(labelEl);\n // See the comment in `suggestIgnore`.\n geometry.suggestIgnore = labelEl.ignore;\n // Currently no `ignore:true` is set in `buildAxisLabel`\n // But `ignore:true` may be set subsequently for overlap handling, thus reset it here.\n labelEl.ignore = false;\n copyTransform(_tmpLayoutEl, _tmpLayoutElReset);\n var axis = axisModel.axis;\n _tmpLayoutEl.x = axis.dataToCoord(getTickValueOutermost(axis.scale, inner.labelInfo.tick));\n _tmpLayoutEl.y = cfg.labelOffset + cfg.labelDirection * labelMargin;\n _tmpLayoutEl.rotation = inner.layoutRotation;\n transformGroup.add(_tmpLayoutEl);\n _tmpLayoutEl.updateTransform();\n transformGroup.remove(_tmpLayoutEl);\n _tmpLayoutEl.decomposeTransform();\n copyTransform(labelEl, _tmpLayoutEl);\n labelEl.markRedraw();\n setLabelLayoutDirty(geometry, true);\n ensureLabelLayoutWithGeometry(geometry);\n });\n}\nvar _tmpLayoutEl = new graphic.Rect();\nvar _tmpLayoutElReset = new graphic.Rect();\nfunction hasAxisName(axisName) {\n return !!axisName;\n}\nfunction addBreakEventHandler(axisModel, api, textEl, visualBreak) {\n textEl.on('click', function (params) {\n var payload = {\n type: AXIS_BREAK_EXPAND_ACTION_TYPE,\n breaks: [{\n start: visualBreak.parsedBreak.breakOption.start,\n end: visualBreak.parsedBreak.breakOption.end\n }]\n };\n payload[axisModel.axis.dim + \"AxisIndex\"] = axisModel.componentIndex;\n api.dispatchAction(payload);\n });\n}\nfunction adjustBreakLabels(axisModel, axisRotation, labelLayoutList) {\n var scaleBreakHelper = getScaleBreakHelper();\n if (!scaleBreakHelper) {\n return;\n }\n var breakLabelIndexPairs = scaleBreakHelper.retrieveAxisBreakPairs(labelLayoutList, function (layoutInfo) {\n return layoutInfo && getLabelInner(layoutInfo.label).labelInfo.tick[\"break\"];\n }, true);\n var moveOverlap = axisModel.get(['breakLabelLayout', 'moveOverlap'], true);\n if (moveOverlap === true || moveOverlap === 'auto') {\n each(breakLabelIndexPairs, function (idxPair) {\n getAxisBreakHelper().adjustBreakLabelPair(axisModel.axis.inverse, axisRotation, [ensureLabelLayoutWithGeometry(labelLayoutList[idxPair[0]]), ensureLabelLayoutWithGeometry(labelLayoutList[idxPair[1]])]);\n });\n }\n}\nexport default AxisBuilder;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nimport AxisBuilder from '../../component/axis/AxisBuilder.js';\nimport { isIntervalOrLogScale } from '../../scale/helper.js';\n/**\n * [__CAUTION__]\n * MUST guarantee: if only the input `rect` and `axis.extent` changed,\n * only `layout.position` changes.\n * This character is replied on `grid.contain` calculation in `AxisBuilder`.\n * @see updateCartesianAxisViewCommonPartBuilder\n *\n * Can only be called after coordinate system creation stage.\n * (Can be called before coordinate system update stage).\n */\nexport function layout(rect, axisModel, opt) {\n opt = opt || {};\n var axis = axisModel.axis;\n var layout = {};\n var otherAxisOnZeroOf = axis.getAxesOnZeroOf()[0];\n var rawAxisPosition = axis.position;\n var axisPosition = otherAxisOnZeroOf ? 'onZero' : rawAxisPosition;\n var axisDim = axis.dim;\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n var idx = {\n left: 0,\n right: 1,\n top: 0,\n bottom: 1,\n onZero: 2\n };\n var axisOffset = axisModel.get('offset') || 0;\n var posBound = axisDim === 'x' ? [rectBound[2] - axisOffset, rectBound[3] + axisOffset] : [rectBound[0] - axisOffset, rectBound[1] + axisOffset];\n if (otherAxisOnZeroOf) {\n var onZeroCoord = otherAxisOnZeroOf.toGlobalCoord(otherAxisOnZeroOf.dataToCoord(0));\n posBound[idx.onZero] = Math.max(Math.min(onZeroCoord, posBound[1]), posBound[0]);\n }\n // Axis position\n layout.position = [axisDim === 'y' ? posBound[idx[axisPosition]] : rectBound[0], axisDim === 'x' ? posBound[idx[axisPosition]] : rectBound[3]];\n // Axis rotation\n layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1);\n // Tick and label direction, x y is axisDim\n var dirMap = {\n top: -1,\n bottom: 1,\n left: -1,\n right: 1\n };\n layout.labelDirection = layout.tickDirection = layout.nameDirection = dirMap[rawAxisPosition];\n layout.labelOffset = otherAxisOnZeroOf ? posBound[idx[rawAxisPosition]] - posBound[idx.onZero] : 0;\n if (axisModel.get(['axisTick', 'inside'])) {\n layout.tickDirection = -layout.tickDirection;\n }\n if (zrUtil.retrieve(opt.labelInside, axisModel.get(['axisLabel', 'inside']))) {\n layout.labelDirection = -layout.labelDirection;\n }\n // Special label rotation\n var labelRotate = axisModel.get(['axisLabel', 'rotate']);\n layout.labelRotate = axisPosition === 'top' ? -labelRotate : labelRotate;\n // Over splitLine and splitArea\n layout.z2 = 1;\n return layout;\n}\nexport function isCartesian2DDeclaredSeries(seriesModel) {\n return seriesModel.get('coordinateSystem') === 'cartesian2d';\n}\n/**\n * Note: If pie (or other similar series) use cartesian2d, here\n * option `seriesModel.get('coordinateSystem') === 'cartesian2d'`\n * and `seriesModel.coordinateSystem !== cartesian2dCoordSysInstance`\n * and `seriesModel.boxCoordinateSystem === cartesian2dCoordSysInstance`,\n * the logic below is probably wrong, therefore skip it temporarily.\n */\nexport function isCartesian2DInjectedAsDataCoordSys(seriesModel) {\n return seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'cartesian2d';\n}\nexport function findAxisModels(seriesModel) {\n var axisModelMap = {\n xAxisModel: null,\n yAxisModel: null\n };\n zrUtil.each(axisModelMap, function (v, key) {\n var axisType = key.replace(/Model$/, '');\n var axisModel = seriesModel.getReferringComponents(axisType, SINGLE_REFERRING).models[0];\n if (process.env.NODE_ENV !== 'production') {\n if (!axisModel) {\n throw new Error(axisType + ' \"' + zrUtil.retrieve3(seriesModel.get(axisType + 'Index'), seriesModel.get(axisType + 'Id'), 0) + '\" not found');\n }\n }\n axisModelMap[key] = axisModel;\n });\n return axisModelMap;\n}\nexport function createCartesianAxisViewCommonPartBuilder(gridRect, cartesians, axisModel, api, ctx, defaultNameMoveOverlap) {\n var layoutResult = layout(gridRect, axisModel);\n var axisLineAutoShow = false;\n var axisTickAutoShow = false;\n // Not show axisTick or axisLine if other axis is category / time\n for (var i = 0; i < cartesians.length; i++) {\n if (isIntervalOrLogScale(cartesians[i].getOtherAxis(axisModel.axis).scale)) {\n // Still show axis tick or axisLine if other axis is value / log\n axisLineAutoShow = axisTickAutoShow = true;\n if (axisModel.axis.type === 'category' && axisModel.axis.onBand) {\n axisTickAutoShow = false;\n }\n }\n }\n layoutResult.axisLineAutoShow = axisLineAutoShow;\n layoutResult.axisTickAutoShow = axisTickAutoShow;\n layoutResult.defaultNameMoveOverlap = defaultNameMoveOverlap;\n return new AxisBuilder(axisModel, api, layoutResult, ctx);\n}\nexport function updateCartesianAxisViewCommonPartBuilder(axisBuilder, gridRect, axisModel) {\n var newRaw = layout(gridRect, axisModel);\n if (process.env.NODE_ENV !== 'production') {\n var oldRaw_1 = axisBuilder.__getRawCfg();\n zrUtil.each(zrUtil.keys(newRaw), function (prop) {\n if (prop !== 'position' && prop !== 'labelOffset') {\n zrUtil.assert(newRaw[prop] === oldRaw_1[prop]);\n }\n });\n }\n axisBuilder.updateCfg(newRaw);\n}\nexport function getCartesianAxisHashKey(axis) {\n return axis.dim + '_' + axis.index;\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { getAcceptableTickPrecision, isNullableNumberFinite, mathAbs, mathCeil, mathFloor, mathMax, mathRound, nice, NICE_MODE_MIN, quantity, round } from '../util/number.js';\nimport IntervalScale from '../scale/Interval.js';\nimport LogScale from '../scale/Log.js';\nimport { updateIntervalOrLogScaleForNiceOrAligned } from './axisHelper.js';\nimport { warn } from '../util/log.js';\nimport { increaseInterval, isLogScale, getIntervalPrecision, intervalScaleEnsureValidExtent } from '../scale/helper.js';\nimport { assert } from 'zrender/lib/core/util.js';\nimport { adoptScaleRawExtentInfoAndPrepare } from './scaleRawExtentInfo.js';\nimport { hasBreaks } from '../scale/break.js';\n/**\n * NOTE: See the summary of the process of extent determination in the comment of `scaleMapper.setExtent`.\n *\n * @see SCALE_EXTENT_CONSTRUCTION for the full processing flow.\n */\nexport function scaleCalcAlign(targetAxis, alignToScale) {\n var targetScale = targetAxis.scale;\n var targetAxisModel = targetAxis.model;\n if (process.env.NODE_ENV !== 'production') {\n assert(targetScale && targetAxisModel && (targetScale instanceof IntervalScale || targetScale instanceof LogScale) && (alignToScale instanceof IntervalScale || alignToScale instanceof LogScale));\n }\n var targetExtentInfo = adoptScaleRawExtentInfoAndPrepare(targetScale, targetAxisModel, targetAxisModel.ecModel, targetAxis, null);\n // FIXME:\n // (1) Axis inverse is not considered yet.\n // (2) `SCALE_EXTENT_KIND_MAPPING` is not considered yet.\n var isTargetLogScale = isLogScale(targetScale);\n var alignToScaleLinear = isLogScale(alignToScale) ? alignToScale.intervalStub : alignToScale;\n var targetIntervalStub = isTargetLogScale ? targetScale.intervalStub : targetScale;\n var targetLogScaleBase = targetScale.base;\n var alignToTicks = alignToScaleLinear.getTicks();\n var alignToExpNiceTicks = alignToScaleLinear.getTicks({\n expandToNicedExtent: true\n });\n var alignToSegCount = alignToTicks.length - 1;\n if (process.env.NODE_ENV !== 'production') {\n // This is guards for future changes of `Interval#getTicks`.\n assert(!hasBreaks(alignToScale) && !hasBreaks(targetScale));\n assert(alignToSegCount > 0); // Ticks length >= 2 even on a blank scale.\n assert(alignToExpNiceTicks.length === alignToTicks.length);\n assert(alignToTicks[0].value <= alignToTicks[alignToSegCount].value);\n assert(alignToExpNiceTicks[0].value <= alignToTicks[0].value && alignToTicks[alignToSegCount].value <= alignToExpNiceTicks[alignToSegCount].value);\n if (alignToSegCount >= 2) {\n assert(alignToExpNiceTicks[1].value === alignToTicks[1].value);\n assert(alignToExpNiceTicks[alignToSegCount - 1].value === alignToTicks[alignToSegCount - 1].value);\n }\n }\n // The Current strategy: Find a proper interval and an extent for the target scale to derive ticks\n // matching exactly to ticks of `alignTo` scale.\n // Adjust min, max based on the extent of alignTo. When min or max is set in alignTo scale\n var t0; // diff ratio on min not-nice segment. 0 <= t0 < 1\n var t1; // diff ratio on max not-nice segment. 0 <= t1 < 1\n var alignToNiceSegCount; // >= 1\n // Consider ticks of `alignTo`, only these cases below may occur:\n if (alignToSegCount === 1) {\n // `alignToTicks` is like:\n // |--|\n // In this case, we make the corresponding 2 target ticks \"nice\".\n t0 = t1 = 0;\n alignToNiceSegCount = 1;\n } else if (alignToSegCount === 2) {\n // `alignToTicks` is like:\n // |-|-----| or\n // |-----|-| or\n // |-----|-----|\n // Notices that nice ticks do not necessarily exist in this case.\n // In this case, we choose the larger segment as the \"nice segment\" and\n // the corresponding target ticks are made \"nice\".\n var interval0 = mathAbs(alignToTicks[0].value - alignToTicks[1].value);\n var interval1 = mathAbs(alignToTicks[1].value - alignToTicks[2].value);\n t0 = t1 = 0;\n if (interval0 === interval1) {\n alignToNiceSegCount = 2;\n } else {\n alignToNiceSegCount = 1;\n if (interval0 < interval1) {\n t0 = interval0 / interval1;\n } else {\n t1 = interval1 / interval0;\n }\n }\n } else {\n // alignToSegCount >= 3\n // `alignToTicks` is like:\n // |-|-----|-----|-| or\n // |-----|-----|-| or\n // |-|-----|-----| or ...\n // At least one nice segment is present, and not-nice segments are only present on\n // the start and/or the end.\n // In this case, ticks corresponding to nice segments are made \"nice\".\n var alignToInterval = alignToScaleLinear.getConfig().interval;\n t0 = (1 - (alignToTicks[0].value - alignToExpNiceTicks[0].value) / alignToInterval) % 1;\n t1 = (1 - (alignToExpNiceTicks[alignToSegCount].value - alignToTicks[alignToSegCount].value) / alignToInterval) % 1;\n alignToNiceSegCount = alignToSegCount - (t0 ? 1 : 0) - (t1 ? 1 : 0);\n }\n if (process.env.NODE_ENV !== 'production') {\n assert(alignToNiceSegCount >= 1);\n }\n // NOTE:\n // Consider a case:\n // dataZoom controls all Y axes;\n // dataZoom end is 90% (maxFixed: true, dataZoomFixMinMax[0]: true);\n // but dataZoom start is 0% (minFixed: false, dataZoomFixMinMax[1]: false);\n // In this case,\n // - `Interval#calcNiceTicks` only uses `targetExtentInfo.max` as the upper bound, but expand the\n // lower bound to a \"nice\" tick and can get an acceptable result.\n // - `scaleCalcAlign` has to use both `targetExtentInfo.min/max` as the bounds without any expansion,\n // otherwise the lower bound may become negative unexpectedly, especially for all positive series data.\n var dataZoomFixMinMax = targetExtentInfo.zoomFixMM;\n var hasDataZoomFixMinMax = dataZoomFixMinMax[0] || dataZoomFixMinMax[1];\n var targetMinMaxFixed = [targetExtentInfo.fixMM[0] || hasDataZoomFixMinMax, targetExtentInfo.fixMM[1] || hasDataZoomFixMinMax];\n // MEMO: When only `xxxAxis.min` or `xxxAxis.max` is fixed,\n // - Even a \"nice\" interval can be calculated, ticks accumulated based on `min`/`max` can be \"nice\" only if\n // `min` or `max` is a \"nice\" number.\n // - Generating a \"nice\" interval may cause the extent have both positive and negative ticks, which may be\n // not preferable for all positive (very common) or all negative series data. But it can be simply resolved\n // by specifying `xxxAxis.min: 0`/`xxxAxis.max: 0`, so we do not specially handle this case here.\n // Therefore, we prioritize generating \"nice\" interval over preventing from crossing zero.\n // e.g., if series data are all positive and the max data is `11739`,\n // If setting `yAxis.max: 'dataMax'`, ticks may be like:\n // `11739, 8739, 5739, 2739, -1739` (not \"nice\" enough)\n // If setting `yAxis.max: 'dataMax', yAxis.min: 0`, ticks may be like:\n // `11739, 8805, 5870, 2935, 0` (not \"nice\" enough but may be acceptable)\n // If setting `yAxis.max: 12000, yAxis.min: 0`, ticks may be like:\n // `12000, 9000, 6000, 3000, 0` (\"nice\")\n var targetOldOutermostExtent = targetScale.getExtent();\n var targetOldIntervalExtent = targetIntervalStub.getExtent();\n var targetExtent = intervalScaleEnsureValidExtent(targetOldIntervalExtent, targetMinMaxFixed);\n var min;\n var max;\n var interval;\n var intervalPrecision;\n var maxNice;\n var minNice;\n function loopIncreaseInterval(cb) {\n // Typically this loop runs less than 5 times. But we still\n // use a fail-safe for future changes.\n var LOOP_MAX = 50;\n var loopGuard = 0;\n for (; loopGuard < LOOP_MAX; loopGuard++) {\n if (cb()) {\n break;\n }\n interval = isTargetLogScale\n // TODO: `mathMax(base, 2)` is a guardcode to avoid infinite loop,\n // but probably it should be guranteed by `LogScale` itself.\n ? interval * mathMax(targetLogScaleBase, 2) : increaseInterval(interval);\n intervalPrecision = getIntervalPrecision(interval);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (loopGuard >= LOOP_MAX) {\n warn('incorrect impl in `scaleCalcAlign`.');\n }\n }\n }\n function updateMinFromMinNice() {\n min = round(minNice - interval * t0, intervalPrecision);\n }\n function updateMaxFromMaxNice() {\n max = round(maxNice + interval * t1, intervalPrecision);\n }\n function updateMinNiceFromMinT0Interval() {\n minNice = t0 ? round(min + interval * t0, intervalPrecision) : min;\n }\n function updateMaxNiceFromMaxT1Interval() {\n maxNice = t1 ? round(max - interval * t1, intervalPrecision) : max;\n }\n // NOTE: The new calculated `min`/`max` must NOT shrink the original extent; otherwise some series\n // data may be outside of the extent. They can expand the original extent slightly to align with\n // ticks of `alignTo`. In this case, more blank space is added but visually fine.\n if (targetMinMaxFixed[0] && targetMinMaxFixed[1]) {\n // Both `min` and `max` are specified (via dataZoom or ec option; consider both Cartesian, radar and\n // other possible axes). In this case, \"nice\" ticks can hardly be calculated, but reasonable ticks should\n // still be calculated whenever possible, especially `intervalPrecision` should be tuned for better\n // appearance and lower cumulative error.\n min = targetExtent[0];\n max = targetExtent[1];\n interval = (max - min) / (alignToNiceSegCount + t0 + t1);\n // Typically axis pixel extent is ready here. See `create` in `Grid.ts`.\n var axisPxExtent = targetAxis.getExtent();\n // NOTICE: this pxSpan may be not accurate yet due to \"outerBounds\" logic, but acceptable so far.\n var pxSpan = mathAbs(axisPxExtent[1] - axisPxExtent[0]);\n // We imperically choose `pxDiffAcceptable` as `0.5 / alignToNiceSegCount` for reduce cumulative\n // error, otherwise a discernible misalign (> 1px) may occur.\n // PENDING: We do not find a acceptable precision for LogScale here.\n // Theoretically it can be addressed but introduce more complexity. Is it necessary?\n intervalPrecision = getAcceptableTickPrecision([max, min], pxSpan, 0.5 / alignToNiceSegCount);\n updateMinNiceFromMinT0Interval();\n updateMaxNiceFromMaxT1Interval();\n if (isNullableNumberFinite(intervalPrecision)) {\n interval = round(interval, intervalPrecision);\n }\n } else {\n // Make a minimal enough `interval`, increase it later.\n // It is a similar logic as `IntervalScale#calcNiceTicks` and `LogScale#calcNiceTicks`.\n // Axis break is not supported, which is guranteed by the caller of this function.\n var targetSpan = targetExtent[1] - targetExtent[0];\n interval = isTargetLogScale ? mathMax(quantity(targetSpan), 1) : nice(targetSpan / alignToNiceSegCount, NICE_MODE_MIN);\n intervalPrecision = getIntervalPrecision(interval);\n if (targetMinMaxFixed[0]) {\n min = targetExtent[0];\n loopIncreaseInterval(function () {\n updateMinNiceFromMinT0Interval();\n maxNice = round(minNice + interval * alignToNiceSegCount, intervalPrecision);\n updateMaxFromMaxNice();\n if (max >= targetExtent[1]) {\n return true;\n }\n });\n } else if (targetMinMaxFixed[1]) {\n max = targetExtent[1];\n loopIncreaseInterval(function () {\n updateMaxNiceFromMaxT1Interval();\n minNice = round(maxNice - interval * alignToNiceSegCount, intervalPrecision);\n updateMinFromMinNice();\n if (min <= targetExtent[0]) {\n return true;\n }\n });\n } else {\n loopIncreaseInterval(function () {\n minNice = round(mathCeil(targetExtent[0] / interval) * interval, intervalPrecision);\n maxNice = round(mathFloor(targetExtent[1] / interval) * interval, intervalPrecision);\n // NOTE:\n // - `maxNice - minNice >= -interval` here.\n // - While `interval` increases, `currIntervalCount` decreases, minimum `-1`.\n var currIntervalCount = mathRound((maxNice - minNice) / interval);\n if (currIntervalCount <= alignToNiceSegCount) {\n var moreCount = alignToNiceSegCount - currIntervalCount;\n // Consider cases that negative tick do not make sense (or vice versa), users can simply\n // specify `xxxAxis.min/max: 0` to avoid negative. But we still automatically handle it\n // for some common cases whenever possible:\n // - When ec option is `xxxAxis.scale: false` (the default), it is usually unexpected if\n // negative (or positive) ticks are introduced.\n // - In LogScale, series data are usually either all > 1 or all < 1, rather than both,\n // that is, logarithm result is typically either all positive or all negative.\n var moreCountPair = void 0;\n var mayEnhanceZero = targetExtentInfo.incl0 || isTargetLogScale;\n // `bounds < 0` or `bounds > 0` may require more complex handling, so we only auto handle\n // `bounds === 0`.\n if (mayEnhanceZero && targetExtent[0] === 0) {\n // 0 has been included in extent and all positive.\n moreCountPair = [0, moreCount];\n } else if (mayEnhanceZero && targetExtent[1] === 0) {\n // 0 has been included in extent and all negative.\n moreCountPair = [moreCount, 0];\n } else {\n // Try to center ticks in axis space whenever possible, which is especially preferable\n // in `LogScale`.\n var lessHalfCount = mathFloor(moreCount / 2);\n moreCountPair = moreCount % 2 === 0 ? [lessHalfCount, lessHalfCount] : min + max < targetExtent[0] + targetExtent[1] ? [lessHalfCount, lessHalfCount + 1] : [lessHalfCount + 1, lessHalfCount];\n }\n minNice = round(minNice - interval * moreCountPair[0], intervalPrecision);\n maxNice = round(maxNice + interval * moreCountPair[1], intervalPrecision);\n updateMinFromMinNice();\n updateMaxFromMaxNice();\n if (min <= targetExtent[0] && max >= targetExtent[1]) {\n return true;\n }\n }\n });\n }\n }\n updateIntervalOrLogScaleForNiceOrAligned(targetScale, targetMinMaxFixed, targetOldIntervalExtent, [min, max], targetOldOutermostExtent, {\n // NOTE: Even in LogScale, `interval` should not be in log space.\n interval: interval,\n // Force ticks count, otherwise cumulative error may cause more unexpected ticks to be generated.\n // Though the overlapping tick labels may be auto-ignored, but probably unexpected, e.g., the min\n // tick label is ignored but the secondary min tick label is shown, which is unexpected when\n // `axis.min` is user-specified or dataZoom-specified.\n intervalCount: alignToNiceSegCount,\n intervalPrecision: intervalPrecision,\n niceExtent: [minNice, maxNice]\n });\n if (process.env.NODE_ENV !== 'production') {\n targetScale.freeze();\n }\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Grid is a region which contains at most 4 cartesian systems\n *\n * TODO Default cartesian\n */\nimport { isObject, each, indexOf, retrieve3, keys, assert, eqNaN, find, retrieve2, hasOwn } from 'zrender/lib/core/util.js';\nimport { createBoxLayoutReference, getLayoutRect } from '../../util/layout.js';\nimport { createScaleByModel, getScaleValuePositionKind, isNameLocationCenter, shouldAxisShow, retrieveAxisBreaksOption, determineAxisType, isOnAxisZeroDiscouraged, SCALE_VALUE_POSITION_KIND_OUTSIDE, getTickValueOutermost, isAxisOnBand } from '../../coord/axisHelper.js';\nimport Cartesian2D, { cartesian2DDimensions } from './Cartesian2D.js';\nimport Axis2D from './Axis2D.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\n// Depends on GridModel, AxisModel, which performs preprocess.\nimport { COORD_SYS_TYPE_CARTESIAN_2D, OUTER_BOUNDS_CLAMP_DEFAULT, OUTER_BOUNDS_DEFAULT } from './GridModel.js';\nimport { findAxisModels, createCartesianAxisViewCommonPartBuilder, updateCartesianAxisViewCommonPartBuilder } from './cartesianAxisHelper.js';\nimport { isIntervalOrLogScale, isOrdinalScale } from '../../scale/helper.js';\nimport { scaleCalcAlign } from '../axisAlignTicks.js';\nimport { expandOrShrinkRect, WH, XY } from '../../util/graphic.js';\nimport { AxisBuilderSharedContext, resolveAxisNameOverlapDefault, moveIfOverlapByLinearLabels, getLabelInner } from '../../component/axis/AxisBuilder.js';\nimport { error, log } from '../../util/log.js';\nimport { AxisTickLabelComputingKind } from '../axisTickLabelBuilder.js';\nimport { injectCoordSysByOption } from '../../core/CoordinateSystem.js';\nimport { mathMax, parsePositionSizeOption } from '../../util/number.js';\nimport { scaleCalcNice } from '../axisNiceTicks.js';\nimport { createDimNameMap } from '../../data/helper/SeriesDataSchema.js';\nimport { AXIS_EXTENT_INFO_BUILD_FROM_COORD_SYS_UPDATE, scaleRawExtentInfoEnableBoxCoordSysUsage, scaleRawExtentInfoCreate } from '../scaleRawExtentInfo.js';\nimport { hasBreaks } from '../../scale/break.js';\nimport { associateSeriesWithAxis } from '../axisStatistics.js';\n// margin is [top, right, bottom, left]\nvar XY_TO_MARGIN_IDX = [[3, 1], [0, 2] // xyIdx 1 => 'y'\n];\nvar Grid = /** @class */function () {\n function Grid(gridModel, ecModel, api) {\n // FIXME:TS where used (different from registered type 'cartesian2d')?\n this.type = 'grid';\n this._coordsMap = {};\n this._coordsList = [];\n this._axesMap = {};\n this._axesList = [];\n this.axisPointerEnabled = true;\n this.dimensions = cartesian2DDimensions;\n this._initCartesian(gridModel, ecModel, api);\n this.model = gridModel;\n }\n Grid.prototype.getRect = function () {\n return this._rect;\n };\n Grid.prototype.update = function (ecModel, api) {\n var axesMap = this._axesMap;\n each(this._axesList, function (axis) {\n scaleRawExtentInfoCreate(axis, AXIS_EXTENT_INFO_BUILD_FROM_COORD_SYS_UPDATE);\n var scale = axis.scale;\n if (isOrdinalScale(scale)) {\n scale.setSortInfo(axis.model.get('categorySortInfo'));\n }\n });\n function updateAxisTicks(axes) {\n // Axis is added in order of axisIndex.\n var axesIndices = keys(axes);\n var axisNeedsAlign = [];\n for (var i = axesIndices.length - 1; i >= 0; i--) {\n // Reverse order\n var axis = axes[+axesIndices[i]];\n if (axis.__alignTo) {\n axisNeedsAlign.push(axis);\n } else {\n scaleCalcNice(axis);\n }\n }\n ;\n each(axisNeedsAlign, function (axis) {\n if (incapableOfAlignNeedFallback(axis, axis.__alignTo)) {\n scaleCalcNice(axis);\n } else {\n scaleCalcAlign(axis, axis.__alignTo.scale);\n }\n });\n }\n updateAxisTicks(axesMap.x);\n updateAxisTicks(axesMap.y);\n // Key: axisDim_axisIndex, value: boolean, whether onZero target.\n var onZeroRecords = {};\n each(axesMap.x, function (xAxis) {\n fixAxisOnZero(axesMap, 'y', xAxis, onZeroRecords);\n });\n each(axesMap.y, function (yAxis) {\n fixAxisOnZero(axesMap, 'x', yAxis, onZeroRecords);\n });\n // Resize again if containLabel is enabled\n // FIXME It may cause getting wrong grid size in data processing stage\n this.resize(this.model, api);\n };\n /**\n * Resize the grid.\n *\n * [NOTE]\n * If both \"grid.containLabel/grid.contain\" and pixel-required-data-processing (such as, \"dataSampling\")\n * exist, circular dependency occurs in logic.\n * The final compromised sequence is:\n * 1. Calculate \"axis.extent\" (pixel extent) and AffineTransform based on only \"grid layout options\".\n * Not accurate if \"grid.containLabel/grid.contain\" is required, but it is a compromise to avoid\n * circular dependency.\n * 2. Perform \"series data processing\" (where \"dataSampling\" requires \"axis.extent\").\n * 3. Calculate \"scale.extent\" (data extent) based on \"processed series data\".\n * 4. Modify \"axis.extent\" for \"grid.containLabel/grid.contain\":\n * 4.1. Calculate \"axis labels\" based on \"scale.extent\".\n * 4.2. Modify \"axis.extent\" by the bounding rects of \"axis labels and names\".\n */\n Grid.prototype.resize = function (gridModel, api, beforeDataProcessing) {\n var layoutRef = createBoxLayoutReference(gridModel, api);\n var gridRect = this._rect = getLayoutRect(gridModel.getBoxLayoutParams(), layoutRef.refContainer);\n // PENDING: whether to support that if the input `coord` is out of the base coord sys,\n // do not render anything. At present, the behavior is undefined.\n var axesMap = this._axesMap;\n var coordsList = this._coordsList;\n var optionContainLabel = gridModel.get('containLabel'); // No `.get(, true)` for backward compat.\n // NOTE: The axis pixel extent is also required by some estimation, e.g., in coord sys update stage,\n // bars on 'time'/'value' axis need it to calculate the supplementary scale extent to avoid edge bars\n // overflowing the axis (see `barGrid.ts`). Therefore, axis pixel extent need to be set early, even\n // may not be accurate.\n updateAllAxisExtentTransByGridRect(axesMap, gridRect);\n if (!beforeDataProcessing) {\n var axisBuilderSharedCtx = createAxisBiulders(gridRect, coordsList, axesMap, optionContainLabel, api);\n var noPxChange = void 0;\n if (optionContainLabel) {\n if (legacyLayOutGridByContainLabel) {\n // console.time('legacyLayOutGridByContainLabel');\n legacyLayOutGridByContainLabel(this._axesList, gridRect);\n updateAllAxisExtentTransByGridRect(axesMap, gridRect);\n // console.timeEnd('legacyLayOutGridByContainLabel');\n } else {\n if (process.env.NODE_ENV !== 'production') {\n log('Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;' + 'use `grid.outerBounds` instead.', true);\n }\n noPxChange = layOutGridByOuterBounds(gridRect.clone(), 'axisLabel', null, gridRect, axesMap, axisBuilderSharedCtx, layoutRef);\n }\n } else {\n var _a = prepareOuterBounds(gridModel, gridRect, layoutRef),\n outerBoundsRect = _a.outerBoundsRect,\n parsedOuterBoundsContain = _a.parsedOuterBoundsContain,\n outerBoundsClamp = _a.outerBoundsClamp;\n if (outerBoundsRect) {\n // console.time('layOutGridByOuterBounds');\n noPxChange = layOutGridByOuterBounds(outerBoundsRect, parsedOuterBoundsContain, outerBoundsClamp, gridRect, axesMap, axisBuilderSharedCtx, layoutRef);\n // console.timeEnd('layOutGridByOuterBounds');\n }\n }\n // console.time('buildAxesView_determine');\n createOrUpdateAxesView(gridRect, axesMap, AxisTickLabelComputingKind.determine, null, noPxChange, layoutRef);\n // console.timeEnd('buildAxesView_determine');\n each(this._coordsList, function (coord) {\n // Calculate affine matrix to accelerate the data to point transform.\n // If all the axes scales are time or value.\n coord.calcAffineTransform();\n });\n } // End of beforeDataProcessing\n };\n Grid.prototype.getAxis = function (dim, axisIndex) {\n var axesMapOnDim = this._axesMap[dim];\n if (axesMapOnDim != null) {\n return axesMapOnDim[axisIndex || 0];\n }\n };\n Grid.prototype.getAxes = function () {\n return this._axesList.slice();\n };\n Grid.prototype.getCartesian = function (xAxisIndex, yAxisIndex) {\n if (xAxisIndex != null && yAxisIndex != null) {\n var key = 'x' + xAxisIndex + 'y' + yAxisIndex;\n return this._coordsMap[key];\n }\n if (isObject(xAxisIndex)) {\n yAxisIndex = xAxisIndex.yAxisIndex;\n xAxisIndex = xAxisIndex.xAxisIndex;\n }\n for (var i = 0, coordList = this._coordsList; i < coordList.length; i++) {\n if (coordList[i].getAxis('x').index === xAxisIndex || coordList[i].getAxis('y').index === yAxisIndex) {\n return coordList[i];\n }\n }\n };\n Grid.prototype.getCartesians = function () {\n return this._coordsList.slice();\n };\n /**\n * @implements\n */\n Grid.prototype.convertToPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(finder);\n return target.cartesian ? target.cartesian.dataToPoint(value) : target.axis ? target.axis.toGlobalCoord(target.axis.dataToCoord(value)) : null;\n };\n /**\n * @implements\n */\n Grid.prototype.convertFromPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(finder);\n return target.cartesian ? target.cartesian.pointToData(value) : target.axis ? target.axis.coordToData(target.axis.toLocalCoord(value)) : null;\n };\n Grid.prototype._findConvertTarget = function (finder) {\n var seriesModel = finder.seriesModel;\n var xAxisModel = finder.xAxisModel || seriesModel && seriesModel.getReferringComponents('xAxis', SINGLE_REFERRING).models[0];\n var yAxisModel = finder.yAxisModel || seriesModel && seriesModel.getReferringComponents('yAxis', SINGLE_REFERRING).models[0];\n var gridModel = finder.gridModel;\n var coordsList = this._coordsList;\n var cartesian;\n var axis;\n if (seriesModel) {\n cartesian = seriesModel.coordinateSystem;\n indexOf(coordsList, cartesian) < 0 && (cartesian = null);\n } else if (xAxisModel && yAxisModel) {\n cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n } else if (xAxisModel) {\n axis = this.getAxis('x', xAxisModel.componentIndex);\n } else if (yAxisModel) {\n axis = this.getAxis('y', yAxisModel.componentIndex);\n }\n // Lowest priority.\n else if (gridModel) {\n var grid = gridModel.coordinateSystem;\n if (grid === this) {\n cartesian = this._coordsList[0];\n }\n }\n return {\n cartesian: cartesian,\n axis: axis\n };\n };\n /**\n * @implements\n */\n Grid.prototype.containPoint = function (point) {\n var coord = this._coordsList[0];\n if (coord) {\n return coord.containPoint(point);\n }\n };\n /**\n * Initialize cartesian coordinate systems\n */\n Grid.prototype._initCartesian = function (gridModel, ecModel, api) {\n var _this = this;\n var grid = this;\n var axisPositionUsed = {\n left: false,\n right: false,\n top: false,\n bottom: false\n };\n var axesMap = {\n x: {},\n y: {}\n };\n var axesCount = {\n x: 0,\n y: 0\n };\n // Create axis\n ecModel.eachComponent('xAxis', createAxisCreator('x'), this);\n ecModel.eachComponent('yAxis', createAxisCreator('y'), this);\n if (!axesCount.x || !axesCount.y) {\n // Roll back when there no either x or y axis\n this._axesMap = {};\n this._axesList = [];\n return;\n }\n this._axesMap = axesMap;\n // Create cartesian2d\n each(axesMap.x, function (xAxis, xAxisIndex) {\n each(axesMap.y, function (yAxis, yAxisIndex) {\n var key = 'x' + xAxisIndex + 'y' + yAxisIndex;\n var cartesian = new Cartesian2D(key);\n cartesian.master = _this;\n cartesian.model = gridModel;\n _this._coordsMap[key] = cartesian;\n _this._coordsList.push(cartesian);\n cartesian.addAxis(xAxis);\n cartesian.addAxis(yAxis);\n });\n });\n prepareAlignToInCoordSysCreate(axesMap.x);\n prepareAlignToInCoordSysCreate(axesMap.y);\n function createAxisCreator(dimName) {\n return function (axisModel, idx) {\n if (!isAxisUsedInTheGrid(axisModel, gridModel)) {\n return;\n }\n var axisPosition = axisModel.get('position');\n if (dimName === 'x') {\n // Fix position\n if (axisPosition !== 'top' && axisPosition !== 'bottom') {\n // Default bottom of X\n axisPosition = axisPositionUsed.bottom ? 'top' : 'bottom';\n }\n } else {\n // Fix position\n if (axisPosition !== 'left' && axisPosition !== 'right') {\n // Default left of Y\n axisPosition = axisPositionUsed.left ? 'right' : 'left';\n }\n }\n axisPositionUsed[axisPosition] = true;\n var axisType = determineAxisType(axisModel);\n var axis = new Axis2D(dimName, createScaleByModel(axisModel, axisType, true), [0, 0], axisType, axisPosition);\n axis.onBand = isAxisOnBand(axis.scale, axisModel);\n axis.inverse = axisModel.get('inverse');\n // Inject axis into axisModel\n axisModel.axis = axis;\n // Inject axisModel into axis\n axis.model = axisModel;\n // Inject grid info axis\n axis.grid = grid;\n // Index of axis, can be used as key\n axis.index = idx;\n grid._axesList.push(axis);\n axesMap[dimName][idx] = axis;\n axesCount[dimName]++;\n };\n }\n };\n /**\n * @param dim 'x' or 'y' or 'auto' or null/undefined\n */\n Grid.prototype.getTooltipAxes = function (dim) {\n var baseAxes = [];\n var otherAxes = [];\n each(this.getCartesians(), function (cartesian) {\n var baseAxis = dim != null && dim !== 'auto' ? cartesian.getAxis(dim) : cartesian.getBaseAxis();\n var otherAxis = cartesian.getOtherAxis(baseAxis);\n indexOf(baseAxes, baseAxis) < 0 && baseAxes.push(baseAxis);\n indexOf(otherAxes, otherAxis) < 0 && otherAxes.push(otherAxis);\n });\n return {\n baseAxes: baseAxes,\n otherAxes: otherAxes\n };\n };\n Grid.create = function (ecModel, api) {\n var grids = [];\n ecModel.eachComponent('grid', function (gridModel, idx) {\n var grid = new Grid(gridModel, ecModel, api);\n grid.name = 'grid_' + idx;\n // dataSampling requires axis extent, so resize\n // should be performed in create stage.\n grid.resize(gridModel, api, true);\n gridModel.coordinateSystem = grid;\n grids.push(grid);\n each(grid._axesList, function (axis) {\n scaleRawExtentInfoEnableBoxCoordSysUsage(axis, Grid.dimIdxMap);\n });\n });\n // Inject the coordinateSystems into seriesModel\n ecModel.eachSeries(function (seriesModel) {\n var xAxis;\n var yAxis;\n injectCoordSysByOption({\n targetModel: seriesModel,\n coordSysType: COORD_SYS_TYPE_CARTESIAN_2D,\n coordSysProvider: coordSysProvider\n });\n function coordSysProvider() {\n var axesModelMap = findAxisModels(seriesModel);\n var xAxisModel = axesModelMap.xAxisModel;\n var yAxisModel = axesModelMap.yAxisModel;\n xAxis = xAxisModel.axis;\n yAxis = yAxisModel.axis;\n var gridModel = xAxisModel.getCoordSysModel();\n if (process.env.NODE_ENV !== 'production') {\n if (!gridModel) {\n throw new Error('Grid \"' + retrieve3(xAxisModel.get('gridIndex'), xAxisModel.get('gridId'), 0) + '\" not found');\n }\n if (xAxisModel.getCoordSysModel() !== yAxisModel.getCoordSysModel()) {\n throw new Error('xAxis and yAxis must use the same grid');\n }\n }\n var grid = gridModel.coordinateSystem;\n return grid.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n }\n if (xAxis && yAxis) {\n associateSeriesWithAxis(xAxis, seriesModel, COORD_SYS_TYPE_CARTESIAN_2D);\n associateSeriesWithAxis(yAxis, seriesModel, COORD_SYS_TYPE_CARTESIAN_2D);\n }\n }, this);\n return grids;\n };\n // For deciding which dimensions to use when creating list data\n Grid.dimensions = cartesian2DDimensions;\n Grid.dimIdxMap = createDimNameMap(cartesian2DDimensions);\n return Grid;\n}();\n/**\n * Check if the axis is used in the specified grid.\n */\nfunction isAxisUsedInTheGrid(axisModel, gridModel) {\n return axisModel.getCoordSysModel() === gridModel;\n}\nfunction fixAxisOnZero(axesMap, otherAxisDim, axis,\n// Key: see `getOnZeroRecordKey`\nonZeroRecords) {\n axis.getAxesOnZeroOf = function () {\n // TODO: onZero of multiple axes.\n return otherAxisOnZeroOf ? [otherAxisOnZeroOf] : [];\n };\n // onZero can not be enabled in these two situations:\n // 1. When any other axis is a category axis.\n // 2. When no axis is cross 0 point.\n var otherAxes = axesMap[otherAxisDim];\n var otherAxisOnZeroOf;\n var axisModel = axis.model;\n var onZero = axisModel.get(['axisLine', 'onZero']);\n var onZeroAxisIndex = axisModel.get(['axisLine', 'onZeroAxisIndex']);\n // For historical reason, ec option `axisLine.onZero: undefined` leads to \"not on zero\"\n // while leaving `axisLine.onZero` unspecified causes \"on zero\". This inconsistency goes\n // against common sense, but is preserved for backward compatibility.\n if (!onZero) {\n return;\n }\n // If target axis is specified.\n if (onZeroAxisIndex != null) {\n if (canOnZeroToAxis(onZero, otherAxes[onZeroAxisIndex])) {\n otherAxisOnZeroOf = otherAxes[onZeroAxisIndex];\n }\n } else {\n // Find the first available other axis.\n for (var idx in otherAxes) {\n if (hasOwn(otherAxes, idx) && canOnZeroToAxis(onZero, otherAxes[idx])\n // Consider that two Y axes on one value axis,\n // if both onZero, the two Y axes overlap.\n && !onZeroRecords[getOnZeroRecordKey(otherAxes[idx])]) {\n otherAxisOnZeroOf = otherAxes[idx];\n break;\n }\n }\n }\n if (otherAxisOnZeroOf) {\n onZeroRecords[getOnZeroRecordKey(otherAxisOnZeroOf)] = true;\n }\n function getOnZeroRecordKey(axis) {\n return axis.dim + '_' + axis.index;\n }\n}\n/**\n * CAVEAT: Must not be called before `CoordinateSystem#update` due to `__dontOnMyZero`.\n */\nfunction canOnZeroToAxis(onZeroOption, axis) {\n if (!axis) {\n return false;\n }\n var scale = axis.scale;\n var kindEffective = getScaleValuePositionKind(scale, 0, false);\n var can = axis\n // PENDING: Historical behavior: `onZero` on 'category' and 'time' axis are always disabled\n // even if ec option gives `onZero: true`.\n && axis.type !== 'category' && axis.type !== 'time'\n // NOTE: Although the portion out of \"effective\" portion may also cross zero\n // (see `SCALE_EXTENT_KIND_MAPPING`), that is commonly meaningless, so we use\n // `SCALE_EXTENT_KIND_EFFECTIVE`\n && kindEffective !== SCALE_VALUE_POSITION_KIND_OUTSIDE;\n if (can && onZeroOption === 'auto'\n // Historically, \"value\" axis and \"log\" axis has been using `onZero: true` as the default.\n // It suitable for mathematic cases, even when dataZoom exists (e.g., `clip.html`), or cases\n // need to distinguish positive and negative data. However, it probably causes odd effect if\n // a \"value axis\" is laid on zero of a \"base axis\" in bar/candlestick, where the axis line\n // would likely cross shapes when `SCALE_EXTENT_KIND_MAPPING` is applied.\n // Therefore, we preserve backward compatibility of the default `onZero: true`, but exclude\n // cases that `containShape` is applied.\n && isOnAxisZeroDiscouraged(axis)\n // || (\n // // Avoid axis line cross series shape (typically, bar series on \"value\"/\"time\" axis) unexpectedly.\n // kindEffective === SCALE_VALUE_POSITION_KIND_EDGE\n // && getScaleValuePositionKind(scale, 0, true) === SCALE_VALUE_POSITION_KIND_INSIDE\n // )\n ) {\n can = false;\n }\n // falsy value of `onZeroOption` has been handled in the previous logic.\n return can;\n}\n/**\n * [CAVEAT] This method is called before data processing stage.\n * Do not rely on any info that is determined afterward.\n */\nfunction prepareAlignToInCoordSysCreate(axes) {\n // Axis is added in order of axisIndex.\n var axesIndices = keys(axes);\n var alignTo;\n var axisNeedsAlign = [];\n for (var i = axesIndices.length - 1; i >= 0; i--) {\n // Reverse order\n var axis = axes[+axesIndices[i]];\n if (isIntervalOrLogScale(axis.scale)\n // NOTE: `scale.hasBreaks()` is not available at this moment. Check it later.\n && retrieveAxisBreaksOption(axis.model, axis.type, true) == null\n // NOTE: `scale.getTicks()` is not available at this moment. Check it later.\n ) {\n // Request `alignTicks`.\n if (axis.model.get('alignTicks') && axis.model.get('interval') == null) {\n axisNeedsAlign.push(axis);\n } else {\n // `alignTo` the last one that does not request `alignTicks`\n // (This rule is retained for backward compat).\n alignTo = axis;\n }\n }\n }\n ;\n // If all axes has set alignTicks, pick the first one as alignTo.\n // PENDING. Should we find the axis that both set interval, min, max and align to this one?\n // PENDING. Should we allow specifying alignTo via ec option?\n if (!alignTo) {\n alignTo = axisNeedsAlign.pop();\n }\n if (alignTo) {\n each(axisNeedsAlign, function (axis) {\n axis.__alignTo = alignTo;\n });\n }\n}\n/**\n * This is just a defence code. They are unlikely to be actually `true`,\n * since these cases have been addressed in `prepareAlignToInCoordSysCreate`.\n *\n * Can not be called BEFORE \"nice\" performed.\n */\nfunction incapableOfAlignNeedFallback(targetAxis, alignTo) {\n return hasBreaks(targetAxis.scale) || hasBreaks(alignTo.scale)\n // Normally ticks length are more than 2 even when axis is blank.\n // But still guard for corner cases and possible changes.\n || alignTo.scale.getTicks().length < 2;\n}\nfunction updateAxisTransform(axis, coordBase) {\n var axisExtent = axis.getExtent();\n var axisExtentSum = axisExtent[0] + axisExtent[1];\n // Fast transform\n axis.toGlobalCoord = axis.dim === 'x' ? function (coord) {\n return coord + coordBase;\n } : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n axis.toLocalCoord = axis.dim === 'x' ? function (coord) {\n return coord - coordBase;\n } : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n}\nfunction updateAllAxisExtentTransByGridRect(axesMap, gridRect) {\n each(axesMap.x, function (axis) {\n return updateAxisExtentTransByGridRect(axis, gridRect.x, gridRect.width);\n });\n each(axesMap.y, function (axis) {\n return updateAxisExtentTransByGridRect(axis, gridRect.y, gridRect.height);\n });\n}\nfunction updateAxisExtentTransByGridRect(axis, gridXY, gridWH) {\n var extent = [0, gridWH];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(extent[idx], extent[1 - idx]);\n updateAxisTransform(axis, gridXY);\n}\nvar legacyLayOutGridByContainLabel;\nexport function registerLegacyGridContainLabelImpl(impl) {\n legacyLayOutGridByContainLabel = impl;\n}\n// Return noPxChange.\nfunction layOutGridByOuterBounds(outerBoundsRect, outerBoundsContain, outerBoundsClamp, gridRect, axesMap, axisBuilderSharedCtx, layoutRef) {\n if (process.env.NODE_ENV !== 'production') {\n assert(outerBoundsContain === 'all' || outerBoundsContain === 'axisLabel');\n }\n // Assume `updateAllAxisExtentTransByGridRect` has been performed once before this call.\n // [NOTE]:\n // - The bounding rect of the axis elements might be sensitve to variations in `axis.extent` due to strategies\n // like hideOverlap/moveOverlap. @see the comment in `LabelLayoutBase['suggestIgnore']`.\n // - The final `gridRect` might be slightly smaller than the ideally expected result if labels are giant and\n // get hidden due to overlapping. More iterations could improve precision, but not performant. We consider\n // the current result acceptable, since no alignment among charts can be guaranteed when using this feature.\n createOrUpdateAxesView(gridRect, axesMap, AxisTickLabelComputingKind.estimate, outerBoundsContain, false, layoutRef);\n var margin = [0, 0, 0, 0];\n fillLabelNameOverflowOnOneDimension(0);\n fillLabelNameOverflowOnOneDimension(1);\n // If axis is blank, no label can be used to detect overflow.\n // gridRect itself should not overflow.\n fillMarginOnOneDimension(gridRect, 0, NaN);\n fillMarginOnOneDimension(gridRect, 1, NaN);\n var noPxChange = find(margin, function (item) {\n return item > 0;\n }) == null;\n expandOrShrinkRect(gridRect, margin, true, true, outerBoundsClamp);\n updateAllAxisExtentTransByGridRect(axesMap, gridRect);\n return noPxChange;\n function fillLabelNameOverflowOnOneDimension(xyIdx) {\n each(axesMap[XY[xyIdx]], function (axis) {\n if (!shouldAxisShow(axis.model)) {\n return;\n }\n // FIXME: zr Group.union may wrongly union (0, 0, 0, 0) and not performant.\n // unionRect.union(axis.axisBuilder.group.getBoundingRect());\n // If ussing Group.getBoundingRect to calculate shrink space, it is not strictly accurate when\n // the outermost label is ignored and the secondary label is very long and contribute to the\n // union extension:\n // -|---|---|---|\n // 1,000,000,000\n // Therefore we calculate them one by one.\n // Also considered axis may be blank or no labels.\n var sharedRecord = axisBuilderSharedCtx.ensureRecord(axis.model);\n var labelInfoList = sharedRecord.labelInfoList;\n if (labelInfoList) {\n for (var idx = 0; idx < labelInfoList.length; idx++) {\n var labelInfo = labelInfoList[idx];\n var proportion = axis.scale.normalize(getTickValueOutermost(axis.scale, getLabelInner(labelInfo.label).labelInfo.tick));\n proportion = xyIdx === 1 ? 1 - proportion : proportion;\n // xAxis use proportion on x, yAxis use proprotion on y, otherwise not.\n fillMarginOnOneDimension(labelInfo.rect, xyIdx, proportion);\n fillMarginOnOneDimension(labelInfo.rect, 1 - xyIdx, NaN);\n }\n }\n var nameLayout = sharedRecord.nameLayout;\n if (nameLayout) {\n var proportion = isNameLocationCenter(sharedRecord.nameLocation) ? 0.5 : NaN;\n fillMarginOnOneDimension(nameLayout.rect, xyIdx, proportion);\n fillMarginOnOneDimension(nameLayout.rect, 1 - xyIdx, NaN);\n }\n });\n }\n function fillMarginOnOneDimension(itemRect, xyIdx, proportion // NaN mean no use proportion\n ) {\n var overflow1 = outerBoundsRect[XY[xyIdx]] - itemRect[XY[xyIdx]];\n var overflow2 = itemRect[WH[xyIdx]] + itemRect[XY[xyIdx]] - (outerBoundsRect[WH[xyIdx]] + outerBoundsRect[XY[xyIdx]]);\n overflow1 = applyProportion(overflow1, 1 - proportion);\n overflow2 = applyProportion(overflow2, proportion);\n var minIdx = XY_TO_MARGIN_IDX[xyIdx][0];\n var maxIdx = XY_TO_MARGIN_IDX[xyIdx][1];\n margin[minIdx] = mathMax(margin[minIdx], overflow1);\n margin[maxIdx] = mathMax(margin[maxIdx], overflow2);\n }\n function applyProportion(overflow, proportion) {\n // proportion is not likely to near zero. If so, give up shrink\n if (overflow > 0 && !eqNaN(proportion) && proportion > 1e-4) {\n overflow /= proportion;\n }\n return overflow;\n }\n}\nfunction createAxisBiulders(gridRect, cartesians, axesMap, optionContainLabel, api) {\n var axisBuilderSharedCtx = new AxisBuilderSharedContext(resolveAxisNameOverlapForGrid);\n each(axesMap, function (axisList) {\n return each(axisList, function (axis) {\n if (shouldAxisShow(axis.model)) {\n // See `AxisBaseOptionCommon['nameMoveOverlap']`.\n var defaultNameMoveOverlap = !optionContainLabel;\n axis.axisBuilder = createCartesianAxisViewCommonPartBuilder(gridRect, cartesians, axis.model, api, axisBuilderSharedCtx, defaultNameMoveOverlap);\n }\n });\n });\n return axisBuilderSharedCtx;\n}\n/**\n * Promote the axis-elements-building from \"view render\" stage to \"coordinate system resize\" stage.\n * This is aimed to resovle overlap across multiple axes, since currently it's hard to reconcile\n * multiple axes in \"view render\" stage.\n *\n * [CAUTION] But this promotion assumes that the subsequent \"visual mapping\" stage does not affect\n * this axis-elements-building; otherwise we have to refactor it again.\n */\nfunction createOrUpdateAxesView(gridRect, axesMap, kind, outerBoundsContain, noPxChange, layoutRef) {\n var isDetermine = kind === AxisTickLabelComputingKind.determine;\n each(axesMap, function (axisList) {\n return each(axisList, function (axis) {\n if (shouldAxisShow(axis.model)) {\n updateCartesianAxisViewCommonPartBuilder(axis.axisBuilder, gridRect, axis.model);\n axis.axisBuilder.build(isDetermine ? {\n axisTickLabelDetermine: true\n } : {\n axisTickLabelEstimate: true\n }, {\n noPxChange: noPxChange\n });\n }\n });\n });\n var nameMarginLevelMap = {\n x: 0,\n y: 0\n };\n calcNameMarginLevel(0);\n calcNameMarginLevel(1);\n function calcNameMarginLevel(xyIdx) {\n nameMarginLevelMap[XY[1 - xyIdx]] = gridRect[WH[xyIdx]] <= layoutRef.refContainer[WH[xyIdx]] * 0.5 ? 0 : 1 - xyIdx === 1 ? 2 : 1;\n }\n each(axesMap, function (axisList, xy) {\n return each(axisList, function (axis) {\n if (shouldAxisShow(axis.model)) {\n if (outerBoundsContain === 'all' || isDetermine) {\n // To resolve overlap, `axisName` layout depends on `axisTickLabel` layout result\n // (all of the axes of the same `grid`; consider multiple x or y axes).\n axis.axisBuilder.build({\n axisName: true\n }, {\n nameMarginLevel: nameMarginLevelMap[xy]\n });\n }\n if (isDetermine) {\n axis.axisBuilder.build({\n axisLine: true\n });\n }\n }\n });\n });\n}\nfunction prepareOuterBounds(gridModel, rawGridRect, layoutRef) {\n var outerBoundsRect;\n var optionOuterBoundsMode = gridModel.get('outerBoundsMode', true);\n if (optionOuterBoundsMode === 'same') {\n outerBoundsRect = rawGridRect.clone();\n } else if (optionOuterBoundsMode == null || optionOuterBoundsMode === 'auto') {\n outerBoundsRect = getLayoutRect(gridModel.get('outerBounds', true) || OUTER_BOUNDS_DEFAULT, layoutRef.refContainer);\n } else if (optionOuterBoundsMode !== 'none') {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Invalid grid[\" + gridModel.componentIndex + \"].outerBoundsMode.\");\n }\n }\n var optionOuterBoundsContain = gridModel.get('outerBoundsContain', true);\n var parsedOuterBoundsContain;\n if (optionOuterBoundsContain == null || optionOuterBoundsContain === 'auto') {\n parsedOuterBoundsContain = 'all';\n } else if (indexOf(['all', 'axisLabel'], optionOuterBoundsContain) < 0) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Invalid grid[\" + gridModel.componentIndex + \"].outerBoundsContain.\");\n }\n parsedOuterBoundsContain = 'all';\n } else {\n parsedOuterBoundsContain = optionOuterBoundsContain;\n }\n var outerBoundsClamp = [parsePositionSizeOption(retrieve2(gridModel.get('outerBoundsClampWidth', true), OUTER_BOUNDS_CLAMP_DEFAULT[0]), rawGridRect.width), parsePositionSizeOption(retrieve2(gridModel.get('outerBoundsClampHeight', true), OUTER_BOUNDS_CLAMP_DEFAULT[1]), rawGridRect.height)];\n return {\n outerBoundsRect: outerBoundsRect,\n parsedOuterBoundsContain: parsedOuterBoundsContain,\n outerBoundsClamp: outerBoundsClamp\n };\n}\nvar resolveAxisNameOverlapForGrid = function (cfg, ctx, axisModel, nameLayoutInfo, nameMoveDirVec, thisRecord) {\n var perpendicularDim = axisModel.axis.dim === 'x' ? 'y' : 'x';\n resolveAxisNameOverlapDefault(cfg, ctx, axisModel, nameLayoutInfo, nameMoveDirVec, thisRecord);\n // If nameLocation 'center', and there are multiple axes parallel to this axis, do not adjust by\n // other axes, because the axis name should be close to its axis line as much as possible even\n // if overlapping; otherwise it might cause misleading.\n // If nameLocation 'center', do not adjust by perpendicular axes, since they are not likely to overlap.\n // If nameLocation 'start'/'end', move name within the same direction to escape overlap with the\n // perpendicular axes.\n if (!isNameLocationCenter(cfg.nameLocation)) {\n each(ctx.recordMap[perpendicularDim], function (perpenRecord) {\n // perpendicular axis may be no name.\n if (perpenRecord && perpenRecord.labelInfoList && perpenRecord.dirVec) {\n moveIfOverlapByLinearLabels(perpenRecord.labelInfoList, perpenRecord.dirVec, nameLayoutInfo, nameMoveDirVec);\n }\n });\n }\n};\nexport default Grid;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport Model from '../../model/Model.js';\nimport { each, curry, clone, defaults, isArray, indexOf } from 'zrender/lib/core/util.js';\n// Build axisPointerModel, mergin tooltip.axisPointer model for each axis.\n// allAxesInfo should be updated when setOption performed.\nexport function collect(ecModel, api) {\n var result = {\n /**\n * key: makeKey(axis.model)\n * value: {\n * axis,\n * coordSys,\n * axisPointerModel,\n * triggerTooltip,\n * triggerEmphasis,\n * involveSeries,\n * snap,\n * seriesModels,\n * seriesDataCount\n * }\n */\n axesInfo: {},\n seriesInvolved: false,\n /**\n * key: makeKey(coordSys.model)\n * value: Object: key makeKey(axis.model), value: axisInfo\n */\n coordSysAxesInfo: {},\n coordSysMap: {}\n };\n collectAxesInfo(result, ecModel, api);\n // Check seriesInvolved for performance, in case too many series in some chart.\n result.seriesInvolved && collectSeriesInfo(result, ecModel);\n return result;\n}\nfunction collectAxesInfo(result, ecModel, api) {\n var globalTooltipModel = ecModel.getComponent('tooltip');\n var globalAxisPointerModel = ecModel.getComponent('axisPointer');\n // links can only be set on global.\n var linksOption = globalAxisPointerModel.get('link', true) || [];\n var linkGroups = [];\n // Collect axes info.\n each(api.getCoordinateSystems(), function (coordSys) {\n // Some coordinate system do not support axes, like geo.\n if (!coordSys.axisPointerEnabled) {\n return;\n }\n var coordSysKey = makeKey(coordSys.model);\n var axesInfoInCoordSys = result.coordSysAxesInfo[coordSysKey] = {};\n result.coordSysMap[coordSysKey] = coordSys;\n // Set tooltip (like 'cross') is a convenient way to show axisPointer\n // for user. So we enable setting tooltip on coordSys model.\n var coordSysModel = coordSys.model;\n var baseTooltipModel = coordSysModel.getModel('tooltip', globalTooltipModel);\n each(coordSys.getAxes(), curry(saveTooltipAxisInfo, false, null));\n // If axis tooltip used, choose tooltip axis for each coordSys.\n // Notice this case: coordSys is `grid` but not `cartesian2D` here.\n if (coordSys.getTooltipAxes && globalTooltipModel\n // If tooltip.showContent is set as false, tooltip will not\n // show but axisPointer will show as normal.\n && baseTooltipModel.get('show')) {\n // Compatible with previous logic. But series.tooltip.trigger: 'axis'\n // or series.data[n].tooltip.trigger: 'axis' are not support any more.\n var triggerAxis = baseTooltipModel.get('trigger') === 'axis';\n var cross = baseTooltipModel.get(['axisPointer', 'type']) === 'cross';\n var tooltipAxes = coordSys.getTooltipAxes(baseTooltipModel.get(['axisPointer', 'axis']));\n if (triggerAxis || cross) {\n each(tooltipAxes.baseAxes, curry(saveTooltipAxisInfo, cross ? 'cross' : true, triggerAxis));\n }\n if (cross) {\n each(tooltipAxes.otherAxes, curry(saveTooltipAxisInfo, 'cross', false));\n }\n }\n // fromTooltip: true | false | 'cross'\n // triggerTooltip: true | false | null\n function saveTooltipAxisInfo(fromTooltip, triggerTooltip, axis) {\n var axisPointerModel = axis.model.getModel('axisPointer', globalAxisPointerModel);\n var axisPointerShow = axisPointerModel.get('show');\n if (!axisPointerShow || axisPointerShow === 'auto' && !fromTooltip && !isHandleTrigger(axisPointerModel)) {\n return;\n }\n if (triggerTooltip == null) {\n triggerTooltip = axisPointerModel.get('triggerTooltip');\n }\n axisPointerModel = fromTooltip ? makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) : axisPointerModel;\n var snap = axisPointerModel.get('snap');\n var triggerEmphasis = axisPointerModel.get('triggerEmphasis');\n var axisKey = makeKey(axis.model);\n var involveSeries = triggerTooltip || snap || axis.type === 'category';\n // If result.axesInfo[key] exist, override it (tooltip has higher priority).\n var axisInfo = result.axesInfo[axisKey] = {\n key: axisKey,\n axis: axis,\n coordSys: coordSys,\n axisPointerModel: axisPointerModel,\n triggerTooltip: triggerTooltip,\n triggerEmphasis: triggerEmphasis,\n involveSeries: involveSeries,\n snap: snap,\n useHandle: isHandleTrigger(axisPointerModel),\n seriesModels: [],\n linkGroup: null\n };\n axesInfoInCoordSys[axisKey] = axisInfo;\n result.seriesInvolved = result.seriesInvolved || involveSeries;\n var groupIndex = getLinkGroupIndex(linksOption, axis);\n if (groupIndex != null) {\n var linkGroup = linkGroups[groupIndex] || (linkGroups[groupIndex] = {\n axesInfo: {}\n });\n linkGroup.axesInfo[axisKey] = axisInfo;\n linkGroup.mapper = linksOption[groupIndex].mapper;\n axisInfo.linkGroup = linkGroup;\n }\n }\n });\n}\nfunction makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) {\n var tooltipAxisPointerModel = baseTooltipModel.getModel('axisPointer');\n var fields = ['type', 'snap', 'lineStyle', 'shadowStyle', 'label', 'animation', 'animationDurationUpdate', 'animationEasingUpdate', 'z'];\n var volatileOption = {};\n each(fields, function (field) {\n volatileOption[field] = clone(tooltipAxisPointerModel.get(field));\n });\n // category axis do not auto snap, otherwise some tick that do not\n // has value can not be hovered. value/time/log axis default snap if\n // triggered from tooltip and trigger tooltip.\n volatileOption.snap = axis.type !== 'category' && !!triggerTooltip;\n // Compatible with previous behavior, tooltip axis does not show label by default.\n // Only these properties can be overridden from tooltip to axisPointer.\n if (tooltipAxisPointerModel.get('type') === 'cross') {\n volatileOption.type = 'line';\n }\n var labelOption = volatileOption.label || (volatileOption.label = {});\n // Follow the convention, do not show label when triggered by tooltip by default.\n labelOption.show == null && (labelOption.show = false);\n if (fromTooltip === 'cross') {\n // When 'cross', both axes show labels.\n var tooltipAxisPointerLabelShow = tooltipAxisPointerModel.get(['label', 'show']);\n labelOption.show = tooltipAxisPointerLabelShow != null ? tooltipAxisPointerLabelShow : true;\n // If triggerTooltip, this is a base axis, which should better not use cross style\n // (cross style is dashed by default)\n if (!triggerTooltip) {\n var crossStyle = volatileOption.lineStyle = tooltipAxisPointerModel.get('crossStyle');\n crossStyle && defaults(labelOption, crossStyle.textStyle);\n }\n }\n return axis.model.getModel('axisPointer', new Model(volatileOption, globalAxisPointerModel, ecModel));\n}\nfunction collectSeriesInfo(result, ecModel) {\n // Prepare data for axis trigger\n ecModel.eachSeries(function (seriesModel) {\n // Notice this case: this coordSys is `cartesian2D` but not `grid`.\n var coordSys = seriesModel.coordinateSystem;\n var seriesTooltipTrigger = seriesModel.get(['tooltip', 'trigger'], true);\n var seriesTooltipShow = seriesModel.get(['tooltip', 'show'], true);\n if (!coordSys || !coordSys.model // PENDING: radar do not have a model.\n || seriesTooltipTrigger === 'none' || seriesTooltipTrigger === false || seriesTooltipTrigger === 'item' || seriesTooltipShow === false || seriesModel.get(['axisPointer', 'show'], true) === false) {\n return;\n }\n each(result.coordSysAxesInfo[makeKey(coordSys.model)], function (axisInfo) {\n var axis = axisInfo.axis;\n if (coordSys.getAxis(axis.dim) === axis) {\n axisInfo.seriesModels.push(seriesModel);\n axisInfo.seriesDataCount == null && (axisInfo.seriesDataCount = 0);\n axisInfo.seriesDataCount += seriesModel.getData().count();\n }\n });\n });\n}\n/**\n * For example:\n * {\n * axisPointer: {\n * links: [{\n * xAxisIndex: [2, 4],\n * yAxisIndex: 'all'\n * }, {\n * xAxisId: ['a5', 'a7'],\n * xAxisName: 'xxx'\n * }]\n * }\n * }\n */\nfunction getLinkGroupIndex(linksOption, axis) {\n var axisModel = axis.model;\n var dim = axis.dim;\n for (var i = 0; i < linksOption.length; i++) {\n var linkOption = linksOption[i] || {};\n if (checkPropInLink(linkOption[dim + 'AxisId'], axisModel.id) || checkPropInLink(linkOption[dim + 'AxisIndex'], axisModel.componentIndex) || checkPropInLink(linkOption[dim + 'AxisName'], axisModel.name)) {\n return i;\n }\n }\n}\nfunction checkPropInLink(linkPropValue, axisPropValue) {\n return linkPropValue === 'all' || isArray(linkPropValue) && indexOf(linkPropValue, axisPropValue) >= 0 || linkPropValue === axisPropValue;\n}\nexport function fixValue(axisModel) {\n var axisInfo = getAxisInfo(axisModel);\n if (!axisInfo) {\n return;\n }\n var axisPointerModel = axisInfo.axisPointerModel;\n var scale = axisInfo.axis.scale;\n var option = axisPointerModel.option;\n var status = axisPointerModel.get('status');\n var value = axisPointerModel.get('value');\n // Parse init value for category and time axis.\n if (value != null) {\n value = scale.parse(value);\n }\n var useHandle = isHandleTrigger(axisPointerModel);\n // If `handle` used, `axisPointer` will always be displayed, so value\n // and status should be initialized.\n if (status == null) {\n option.status = useHandle ? 'show' : 'hide';\n }\n var extent = scale.getExtent();\n if (\n // Pick a value on axis when initializing.\n value == null\n // If both `handle` and `dataZoom` are used, value may be out of axis extent,\n // where we should re-pick a value to keep `handle` displaying normally.\n || value > extent[1]) {\n // Make handle displayed on the end of the axis when init, which looks better.\n value = extent[1];\n }\n if (value < extent[0]) {\n value = extent[0];\n }\n option.value = value;\n if (useHandle) {\n option.status = axisInfo.axis.scale.isBlank() ? 'hide' : 'show';\n }\n}\nexport function getAxisInfo(axisModel) {\n var coordSysAxesInfo = (axisModel.ecModel.getComponent('axisPointer') || {}).coordSysAxesInfo;\n return coordSysAxesInfo && coordSysAxesInfo.axesInfo[makeKey(axisModel)];\n}\nexport function getAxisPointerModel(axisModel) {\n var axisInfo = getAxisInfo(axisModel);\n return axisInfo && axisInfo.axisPointerModel;\n}\nfunction isHandleTrigger(axisPointerModel) {\n return !!axisPointerModel.get(['handle', 'show']);\n}\n/**\n * @param {module:echarts/model/Model} model\n * @return {string} unique key\n */\nexport function makeKey(model) {\n return model.type + '||' + model.id;\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as axisPointerModelHelper from '../axisPointer/modelHelper.js';\nimport ComponentView from '../../view/Component.js';\nvar axisPointerClazz = {};\n/**\n * Base class of AxisView.\n */\nvar AxisView = /** @class */function (_super) {\n __extends(AxisView, _super);\n function AxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AxisView.type;\n return _this;\n }\n /**\n * @override\n */\n AxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n // FIXME\n // This process should proformed after coordinate systems updated\n // (axis scale updated), and should be performed each time update.\n // So put it here temporarily, although it is not appropriate to\n // put a model-writing procedure in `view`.\n this.axisPointerClass && axisPointerModelHelper.fixValue(axisModel);\n _super.prototype.render.apply(this, arguments);\n this._doUpdateAxisPointerClass(axisModel, api, true);\n };\n /**\n * Action handler.\n */\n AxisView.prototype.updateAxisPointer = function (axisModel, ecModel, api, payload) {\n this._doUpdateAxisPointerClass(axisModel, api, false);\n };\n /**\n * @override\n */\n AxisView.prototype.remove = function (ecModel, api) {\n var axisPointer = this._axisPointer;\n axisPointer && axisPointer.remove(api);\n };\n /**\n * @override\n */\n AxisView.prototype.dispose = function (ecModel, api) {\n this._disposeAxisPointer(api);\n _super.prototype.dispose.apply(this, arguments);\n };\n AxisView.prototype._doUpdateAxisPointerClass = function (axisModel, api, forceRender) {\n var Clazz = AxisView.getAxisPointerClass(this.axisPointerClass);\n if (!Clazz) {\n return;\n }\n var axisPointerModel = axisPointerModelHelper.getAxisPointerModel(axisModel);\n axisPointerModel ? (this._axisPointer || (this._axisPointer = new Clazz())).render(axisModel, axisPointerModel, api, forceRender) : this._disposeAxisPointer(api);\n };\n AxisView.prototype._disposeAxisPointer = function (api) {\n this._axisPointer && this._axisPointer.dispose(api);\n this._axisPointer = null;\n };\n AxisView.registerAxisPointerClass = function (type, clazz) {\n if (process.env.NODE_ENV !== 'production') {\n if (axisPointerClazz[type]) {\n throw new Error('axisPointer ' + type + ' exists');\n }\n }\n axisPointerClazz[type] = clazz;\n };\n ;\n AxisView.getAxisPointerClass = function (type) {\n return type && axisPointerClazz[type];\n };\n ;\n AxisView.type = 'axis';\n return AxisView;\n}(ComponentView);\nexport default AxisView;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nexport function rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel) {\n var axis = axisModel.axis;\n if (axis.scale.isBlank()) {\n return;\n }\n var splitAreaModel = axisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var gridRect = gridModel.coordinateSystem.getRect();\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitAreaModel,\n breakTicks: 'none',\n pruneByBreak: 'preserve_extent_bound'\n });\n if (!ticksCoords.length) {\n return;\n }\n // For Making appropriate splitArea animation, the color and anid\n // should be corresponding to previous one if possible.\n var areaColorsLen = areaColors.length;\n var lastSplitAreaColors = inner(axisView).splitAreaColors;\n var newSplitAreaColors = zrUtil.createHashMap();\n var colorIndex = 0;\n if (lastSplitAreaColors) {\n for (var i = 0; i < ticksCoords.length; i++) {\n var cIndex = lastSplitAreaColors.get(ticksCoords[i].tickValue);\n if (cIndex != null) {\n colorIndex = (cIndex + (areaColorsLen - 1) * i) % areaColorsLen;\n break;\n }\n }\n }\n var prev = axis.toGlobalCoord(ticksCoords[0].coord);\n var areaStyle = areaStyleModel.getAreaStyle();\n areaColors = zrUtil.isArray(areaColors) ? areaColors : [areaColors];\n for (var i = 1; i < ticksCoords.length; i++) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n var x = void 0;\n var y = void 0;\n var width = void 0;\n var height = void 0;\n if (axis.isHorizontal()) {\n x = prev;\n y = gridRect.y;\n width = tickCoord - x;\n height = gridRect.height;\n prev = x + width;\n } else {\n x = gridRect.x;\n y = prev;\n width = gridRect.width;\n height = tickCoord - y;\n prev = y + height;\n }\n var tickValue = ticksCoords[i - 1].tickValue;\n tickValue != null && newSplitAreaColors.set(tickValue, colorIndex);\n axisGroup.add(new graphic.Rect({\n anid: tickValue != null ? 'area_' + tickValue : null,\n shape: {\n x: x,\n y: y,\n width: width,\n height: height\n },\n style: zrUtil.defaults({\n fill: areaColors[colorIndex]\n }, areaStyle),\n autoBatch: true,\n silent: true\n }));\n colorIndex = (colorIndex + 1) % areaColorsLen;\n }\n inner(axisView).splitAreaColors = newSplitAreaColors;\n}\nexport function rectCoordAxisHandleRemove(axisView) {\n inner(axisView).splitAreaColors = null;\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport AxisView from './AxisView.js';\nimport { rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove } from './axisSplitHelper.js';\nimport { getAxisBreakHelper } from './axisBreakHelper.js';\nimport { shouldAxisShow } from '../../coord/axisHelper.js';\nvar selfBuilderAttrs = ['splitArea', 'splitLine', 'minorSplitLine', 'breakArea'];\nvar CartesianAxisView = /** @class */function (_super) {\n __extends(CartesianAxisView, _super);\n function CartesianAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianAxisView.type;\n _this.axisPointerClass = 'CartesianAxisPointer';\n return _this;\n }\n /**\n * @override\n */\n CartesianAxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n this.group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n this.group.add(this._axisGroup);\n if (!shouldAxisShow(axisModel)) {\n return;\n }\n this._axisGroup.add(axisModel.axis.axisBuilder.group);\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (axisModel.get([name, 'show'])) {\n axisElementBuilders[name](this, this._axisGroup, axisModel, axisModel.getCoordSysModel(), api);\n }\n }, this);\n // THIS is a special case for bar racing chart.\n // Update the axis label from the natural initial layout to\n // sorted layout should has no animation.\n var isInitialSortFromBarRacing = payload && payload.type === 'changeAxisOrder' && payload.isInitSort;\n if (!isInitialSortFromBarRacing) {\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n }\n _super.prototype.render.call(this, axisModel, ecModel, api, payload);\n };\n CartesianAxisView.prototype.remove = function () {\n rectCoordAxisHandleRemove(this);\n };\n CartesianAxisView.type = 'cartesianAxis';\n return CartesianAxisView;\n}(AxisView);\nvar axisElementBuilders = {\n splitLine: function (axisView, axisGroup, axisModel, gridModel, api) {\n var axis = axisModel.axis;\n if (axis.scale.isBlank()) {\n return;\n }\n var splitLineModel = axisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n var showMinLine = splitLineModel.get('showMinLine') !== false;\n var showMaxLine = splitLineModel.get('showMaxLine') !== false;\n lineColors = zrUtil.isArray(lineColors) ? lineColors : [lineColors];\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var lineCount = 0;\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitLineModel,\n breakTicks: 'none',\n pruneByBreak: 'preserve_extent_bound'\n });\n var p1 = [];\n var p2 = [];\n var lineStyle = lineStyleModel.getLineStyle();\n for (var i = 0; i < ticksCoords.length; i++) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n if (i === 0 && !showMinLine || i === ticksCoords.length - 1 && !showMaxLine) {\n continue;\n }\n var tickValue = ticksCoords[i].tickValue;\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n var colorIndex = lineCount++ % lineColors.length;\n var line = new graphic.Line({\n anid: tickValue != null ? 'line_' + tickValue : null,\n autoBatch: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n style: zrUtil.defaults({\n stroke: lineColors[colorIndex]\n }, lineStyle),\n silent: true\n });\n graphic.subPixelOptimizeLine(line.shape, lineStyle.lineWidth);\n axisGroup.add(line);\n }\n },\n minorSplitLine: function (axisView, axisGroup, axisModel, gridModel, api) {\n var axis = axisModel.axis;\n var minorSplitLineModel = axisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var minorTicksCoords = axis.getMinorTicksCoords();\n if (!minorTicksCoords.length) {\n return;\n }\n var p1 = [];\n var p2 = [];\n var lineStyle = lineStyleModel.getLineStyle();\n for (var i = 0; i < minorTicksCoords.length; i++) {\n for (var k = 0; k < minorTicksCoords[i].length; k++) {\n var tickCoord = axis.toGlobalCoord(minorTicksCoords[i][k].coord);\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n var line = new graphic.Line({\n anid: 'minor_line_' + minorTicksCoords[i][k].tickValue,\n autoBatch: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n style: lineStyle,\n silent: true\n });\n graphic.subPixelOptimizeLine(line.shape, lineStyle.lineWidth);\n axisGroup.add(line);\n }\n }\n },\n splitArea: function (axisView, axisGroup, axisModel, gridModel, api) {\n rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel);\n },\n breakArea: function (axisView, axisGroup, axisModel, gridModel, api) {\n var axisBreakHelper = getAxisBreakHelper();\n var scale = axisModel.axis.scale;\n if (axisBreakHelper && scale.type !== 'ordinal') {\n axisBreakHelper.rectCoordBuildBreakAxis(axisGroup, axisView, axisModel, gridModel.coordinateSystem.getRect(), api);\n }\n }\n};\nvar CartesianXAxisView = /** @class */function (_super) {\n __extends(CartesianXAxisView, _super);\n function CartesianXAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianXAxisView.type;\n return _this;\n }\n CartesianXAxisView.type = 'xAxis';\n return CartesianXAxisView;\n}(CartesianAxisView);\nexport { CartesianXAxisView };\nvar CartesianYAxisView = /** @class */function (_super) {\n __extends(CartesianYAxisView, _super);\n function CartesianYAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianXAxisView.type;\n return _this;\n }\n CartesianYAxisView.type = 'yAxis';\n return CartesianYAxisView;\n}(CartesianAxisView);\nexport { CartesianYAxisView };\nexport default CartesianAxisView;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nimport GridModel from '../../coord/cartesian/GridModel.js';\nimport { Rect } from '../../util/graphic.js';\nimport { defaults } from 'zrender/lib/core/util.js';\nimport { CartesianAxisModel } from '../../coord/cartesian/AxisModel.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport Grid from '../../coord/cartesian/Grid.js';\nimport { CartesianXAxisView, CartesianYAxisView } from '../axis/CartesianAxisView.js';\n// Grid view\nvar GridView = /** @class */function (_super) {\n __extends(GridView, _super);\n function GridView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'grid';\n return _this;\n }\n GridView.prototype.render = function (gridModel, ecModel) {\n this.group.removeAll();\n if (gridModel.get('show')) {\n this.group.add(new Rect({\n shape: gridModel.coordinateSystem.getRect(),\n style: defaults({\n fill: gridModel.get('backgroundColor')\n }, gridModel.getItemStyle()),\n silent: true,\n z2: -1\n }));\n }\n };\n GridView.type = 'grid';\n return GridView;\n}(ComponentView);\nvar extraOption = {\n // gridIndex: 0,\n // gridId: '',\n offset: 0\n};\nexport function install(registers) {\n registers.registerComponentView(GridView);\n registers.registerComponentModel(GridModel);\n registers.registerCoordinateSystem('cartesian2d', Grid);\n axisModelCreator(registers, 'x', CartesianAxisModel, extraOption);\n axisModelCreator(registers, 'y', CartesianAxisModel, extraOption);\n registers.registerComponentView(CartesianXAxisView);\n registers.registerComponentView(CartesianYAxisView);\n registers.registerPreprocessor(function (option) {\n // Only create grid when need\n if (option.xAxis && option.yAxis && !option.grid) {\n option.grid = {};\n }\n });\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport axisDefault from '../axisDefault.js';\nimport Model from '../../model/Model.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport ComponentModel from '../../model/Component.js';\nimport tokens from '../../visual/tokens.js';\nimport { getUID } from '../../util/component.js';\nvar valueAxisDefault = axisDefault.value;\nexport var COORD_SYS_TYPE_RADAR = 'radar';\nexport var COMPONENT_TYPE_RADAR = COORD_SYS_TYPE_RADAR;\nexport var SERIES_TYPE_RADAR = COORD_SYS_TYPE_RADAR;\nexport var RADAR_DEFAULT_SPLIT_NUMBER = 5;\nfunction defaultsShow(opt, show) {\n return zrUtil.defaults({\n show: show\n }, opt);\n}\nvar RadarModel = /** @class */function (_super) {\n __extends(RadarModel, _super);\n function RadarModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarModel.type;\n return _this;\n }\n RadarModel.prototype.optionUpdated = function () {\n var boundaryGap = this.get('boundaryGap');\n var splitNumber = this.get('splitNumber');\n var clockwise = this.get('clockwise');\n var scale = this.get('scale');\n var axisLine = this.get('axisLine');\n var axisTick = this.get('axisTick');\n // let axisType = this.get('axisType');\n var axisLabel = this.get('axisLabel');\n var nameTextStyle = this.get('axisName');\n var showName = this.get(['axisName', 'show']);\n var nameFormatter = this.get(['axisName', 'formatter']);\n var nameGap = this.get('axisNameGap');\n var triggerEvent = this.get('triggerEvent');\n var indicatorModels = zrUtil.map(this.get('indicator') || [], function (indicatorOpt) {\n // PENDING\n if (indicatorOpt.max != null && indicatorOpt.max > 0 && !indicatorOpt.min) {\n indicatorOpt.min = 0;\n } else if (indicatorOpt.min != null && indicatorOpt.min < 0 && !indicatorOpt.max) {\n indicatorOpt.max = 0;\n }\n var iNameTextStyle = nameTextStyle;\n if (indicatorOpt.color != null) {\n iNameTextStyle = zrUtil.defaults({\n color: indicatorOpt.color\n }, nameTextStyle);\n }\n // Use same configuration\n var innerIndicatorOpt = zrUtil.merge(zrUtil.clone(indicatorOpt), {\n boundaryGap: boundaryGap,\n splitNumber: splitNumber,\n clockwise: clockwise,\n scale: scale,\n axisLine: axisLine,\n axisTick: axisTick,\n // axisType: axisType,\n axisLabel: axisLabel,\n // Compatible with 2 and use text\n name: indicatorOpt.text,\n showName: showName,\n nameLocation: 'end',\n nameGap: nameGap,\n // min: 0,\n nameTextStyle: iNameTextStyle,\n triggerEvent: triggerEvent\n }, false);\n if (zrUtil.isString(nameFormatter)) {\n var indName = innerIndicatorOpt.name;\n innerIndicatorOpt.name = nameFormatter.replace('{value}', indName != null ? indName : '');\n } else if (zrUtil.isFunction(nameFormatter)) {\n innerIndicatorOpt.name = nameFormatter(innerIndicatorOpt.name, innerIndicatorOpt);\n }\n var model = new Model(innerIndicatorOpt, null, this.ecModel);\n zrUtil.mixin(model, AxisModelCommonMixin.prototype);\n // For triggerEvent.\n model.mainType = 'radar';\n model.componentIndex = this.componentIndex;\n // FIXME: construct an AxisBaseModel directly, rather than mixin.\n // @ts-ignore\n model.uid = getUID('ec_radar');\n return model;\n }, this);\n this._indicatorModels = indicatorModels;\n };\n RadarModel.prototype.getIndicatorModels = function () {\n return this._indicatorModels;\n };\n RadarModel.type = COMPONENT_TYPE_RADAR;\n RadarModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n center: ['50%', '50%'],\n radius: '50%',\n startAngle: 90,\n clockwise: false,\n axisName: {\n show: true,\n color: tokens.color.axisLabel\n // formatter: null\n // textStyle: {}\n },\n boundaryGap: [0, 0],\n splitNumber: RADAR_DEFAULT_SPLIT_NUMBER,\n axisNameGap: 15,\n scale: false,\n // Polygon or circle\n shape: 'polygon',\n axisLine: zrUtil.merge({\n lineStyle: {\n color: tokens.color.neutral20\n }\n }, valueAxisDefault.axisLine),\n axisLabel: defaultsShow(valueAxisDefault.axisLabel, false),\n axisTick: defaultsShow(valueAxisDefault.axisTick, false),\n // axisType: 'value',\n splitLine: defaultsShow(valueAxisDefault.splitLine, true),\n splitArea: defaultsShow(valueAxisDefault.splitArea, true),\n // {text, min, max}\n indicator: []\n };\n return RadarModel;\n}(ComponentModel);\nexport default RadarModel;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport AxisBuilder from '../axis/AxisBuilder.js';\nimport * as graphic from '../../util/graphic.js';\nimport ComponentView from '../../view/Component.js';\nvar RadarView = /** @class */function (_super) {\n __extends(RadarView, _super);\n function RadarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarView.type;\n return _this;\n }\n RadarView.prototype.render = function (radarModel, ecModel, api) {\n var group = this.group;\n group.removeAll();\n this._buildAxes(radarModel, api);\n this._buildSplitLineAndArea(radarModel);\n };\n RadarView.prototype._buildAxes = function (radarModel, api) {\n var radar = radarModel.coordinateSystem;\n var indicatorAxes = radar.getIndicatorAxes();\n var axisBuilders = zrUtil.map(indicatorAxes, function (indicatorAxis) {\n var axisName = indicatorAxis.model.get('showName') ? indicatorAxis.name : ''; // hide name\n var axisBuilder = new AxisBuilder(indicatorAxis.model, api, {\n axisName: axisName,\n position: [radar.cx, radar.cy],\n rotation: indicatorAxis.angle,\n labelDirection: -1,\n tickDirection: -1,\n nameDirection: 1\n });\n return axisBuilder;\n });\n zrUtil.each(axisBuilders, function (axisBuilder) {\n axisBuilder.build();\n this.group.add(axisBuilder.group);\n }, this);\n };\n RadarView.prototype._buildSplitLineAndArea = function (radarModel) {\n var radar = radarModel.coordinateSystem;\n var indicatorAxes = radar.getIndicatorAxes();\n if (!indicatorAxes.length) {\n return;\n }\n var shape = radarModel.get('shape');\n var splitLineModel = radarModel.getModel('splitLine');\n var splitAreaModel = radarModel.getModel('splitArea');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var showSplitLine = splitLineModel.get('show');\n var showSplitArea = splitAreaModel.get('show');\n var splitLineColors = lineStyleModel.get('color');\n var splitAreaColors = areaStyleModel.get('color');\n var splitLineColorsArr = zrUtil.isArray(splitLineColors) ? splitLineColors : [splitLineColors];\n var splitAreaColorsArr = zrUtil.isArray(splitAreaColors) ? splitAreaColors : [splitAreaColors];\n var splitLines = [];\n var splitAreas = [];\n function getColorIndex(areaOrLine, areaOrLineColorList, idx) {\n var colorIndex = idx % areaOrLineColorList.length;\n areaOrLine[colorIndex] = areaOrLine[colorIndex] || [];\n return colorIndex;\n }\n if (shape === 'circle') {\n var ticksRadius = indicatorAxes[0].getTicksCoords();\n var cx = radar.cx;\n var cy = radar.cy;\n for (var i = 0; i < ticksRadius.length; i++) {\n if (showSplitLine) {\n var colorIndex = getColorIndex(splitLines, splitLineColorsArr, i);\n splitLines[colorIndex].push(new graphic.Circle({\n shape: {\n cx: cx,\n cy: cy,\n r: ticksRadius[i].coord\n }\n }));\n }\n if (showSplitArea && i < ticksRadius.length - 1) {\n var colorIndex = getColorIndex(splitAreas, splitAreaColorsArr, i);\n splitAreas[colorIndex].push(new graphic.Ring({\n shape: {\n cx: cx,\n cy: cy,\n r0: ticksRadius[i].coord,\n r: ticksRadius[i + 1].coord\n }\n }));\n }\n }\n }\n // Polyyon\n else {\n var realSplitNumber_1;\n var axesTicksPoints = zrUtil.map(indicatorAxes, function (indicatorAxis, idx) {\n var ticksCoords = indicatorAxis.getTicksCoords();\n realSplitNumber_1 = realSplitNumber_1 == null ? ticksCoords.length - 1 : Math.min(ticksCoords.length - 1, realSplitNumber_1);\n return zrUtil.map(ticksCoords, function (tickCoord) {\n return radar.coordToPoint(tickCoord.coord, idx);\n });\n });\n var prevPoints = [];\n for (var i = 0; i <= realSplitNumber_1; i++) {\n var points = [];\n for (var j = 0; j < indicatorAxes.length; j++) {\n points.push(axesTicksPoints[j][i]);\n }\n // Close\n if (points[0]) {\n points.push(points[0].slice());\n } else {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Can\\'t draw value axis ' + i);\n }\n }\n if (showSplitLine) {\n var colorIndex = getColorIndex(splitLines, splitLineColorsArr, i);\n splitLines[colorIndex].push(new graphic.Polyline({\n shape: {\n points: points\n }\n }));\n }\n if (showSplitArea && prevPoints) {\n var colorIndex = getColorIndex(splitAreas, splitAreaColorsArr, i - 1);\n splitAreas[colorIndex].push(new graphic.Polygon({\n shape: {\n points: points.concat(prevPoints)\n }\n }));\n }\n prevPoints = points.slice().reverse();\n }\n }\n var lineStyle = lineStyleModel.getLineStyle();\n var areaStyle = areaStyleModel.getAreaStyle();\n // Add splitArea before splitLine\n zrUtil.each(splitAreas, function (splitAreas, idx) {\n this.group.add(graphic.mergePath(splitAreas, {\n style: zrUtil.defaults({\n stroke: 'none',\n fill: splitAreaColorsArr[idx % splitAreaColorsArr.length]\n }, areaStyle),\n silent: true\n }));\n }, this);\n zrUtil.each(splitLines, function (splitLines, idx) {\n this.group.add(graphic.mergePath(splitLines, {\n style: zrUtil.defaults({\n fill: 'none',\n stroke: splitLineColorsArr[idx % splitLineColorsArr.length]\n }, lineStyle),\n silent: true\n }));\n }, this);\n };\n RadarView.type = 'radar';\n return RadarView;\n}(ComponentView);\nexport default RadarView;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar IndicatorAxis = /** @class */function (_super) {\n __extends(IndicatorAxis, _super);\n function IndicatorAxis(dim, scale, radiusExtent) {\n var _this = _super.call(this, dim, scale, radiusExtent) || this;\n _this.type = 'value';\n _this.angle = 0;\n _this.name = '';\n return _this;\n }\n return IndicatorAxis;\n}(Axis);\nexport default IndicatorAxis;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport IndicatorAxis from './IndicatorAxis.js';\nimport IntervalScale from '../../scale/Interval.js';\nimport * as numberUtil from '../../util/number.js';\nimport { COMPONENT_TYPE_RADAR, COORD_SYS_TYPE_RADAR, RADAR_DEFAULT_SPLIT_NUMBER, SERIES_TYPE_RADAR } from './RadarModel.js';\nimport { map, each, isString, isNumber } from 'zrender/lib/core/util.js';\nimport { scaleCalcAlign } from '../axisAlignTicks.js';\nimport { createBoxLayoutReference } from '../../util/layout.js';\nimport { AXIS_EXTENT_INFO_BUILD_FROM_COORD_SYS_UPDATE, scaleRawExtentInfoCreate } from '../scaleRawExtentInfo.js';\nimport { ensureValidSplitNumber } from '../../scale/helper.js';\nimport { associateSeriesWithAxis } from '../axisStatistics.js';\nvar Radar = /** @class */function () {\n function Radar(radarModel, ecModel, api) {\n this.type = COORD_SYS_TYPE_RADAR;\n /**\n *\n * Radar dimensions\n */\n this.dimensions = [];\n this._model = radarModel;\n this._indicatorAxes = map(radarModel.getIndicatorModels(), function (indicatorModel, idx) {\n var dim = 'indicator_' + idx;\n var indicatorAxis = new IndicatorAxis(dim, new IntervalScale()\n // (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale()\n );\n indicatorAxis.name = indicatorModel.get('name');\n // Inject model and axis\n indicatorAxis.model = indicatorModel;\n indicatorModel.axis = indicatorAxis;\n this.dimensions.push(dim);\n return indicatorAxis;\n }, this);\n this.resize(radarModel, api);\n }\n Radar.prototype.getIndicatorAxes = function () {\n return this._indicatorAxes;\n };\n Radar.prototype.dataToPoint = function (value, indicatorIndex) {\n var indicatorAxis = this._indicatorAxes[indicatorIndex];\n return this.coordToPoint(indicatorAxis.dataToCoord(value), indicatorIndex);\n };\n // TODO: API should be coordToPoint([coord, indicatorIndex])\n Radar.prototype.coordToPoint = function (coord, indicatorIndex) {\n var indicatorAxis = this._indicatorAxes[indicatorIndex];\n var angle = indicatorAxis.angle;\n var x = this.cx + coord * Math.cos(angle);\n var y = this.cy - coord * Math.sin(angle);\n return [x, y];\n };\n Radar.prototype.pointToData = function (pt) {\n var dx = pt[0] - this.cx;\n var dy = pt[1] - this.cy;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx);\n // Find the closest angle\n // FIXME index can calculated directly\n var minRadianDiff = Infinity;\n var closestAxis;\n var closestAxisIdx = -1;\n for (var i = 0; i < this._indicatorAxes.length; i++) {\n var indicatorAxis = this._indicatorAxes[i];\n var diff = Math.abs(radian - indicatorAxis.angle);\n if (diff < minRadianDiff) {\n closestAxis = indicatorAxis;\n closestAxisIdx = i;\n minRadianDiff = diff;\n }\n }\n return [closestAxisIdx, +(closestAxis && closestAxis.coordToData(radius))];\n };\n Radar.prototype.resize = function (radarModel, api) {\n var refContainer = createBoxLayoutReference(radarModel, api).refContainer;\n var center = radarModel.get('center');\n var clockwise = radarModel.get('clockwise') || false;\n var viewSize = Math.min(refContainer.width, refContainer.height) / 2;\n this.cx = numberUtil.parsePercent(center[0], refContainer.width) + refContainer.x;\n this.cy = numberUtil.parsePercent(center[1], refContainer.height) + refContainer.y;\n this.startAngle = radarModel.get('startAngle') * Math.PI / 180;\n // radius may be single value like `20`, `'80%'`, or array like `[10, '80%']`\n var radius = radarModel.get('radius');\n if (isString(radius) || isNumber(radius)) {\n radius = [0, radius];\n }\n this.r0 = numberUtil.parsePercent(radius[0], viewSize);\n this.r = numberUtil.parsePercent(radius[1], viewSize);\n var sign = clockwise ? -1 : 1;\n each(this._indicatorAxes, function (indicatorAxis, idx) {\n indicatorAxis.setExtent(this.r0, this.r);\n var angle = this.startAngle + sign * idx * Math.PI * 2 / this._indicatorAxes.length;\n // Normalize to [-PI, PI]\n angle = Math.atan2(Math.sin(angle), Math.cos(angle));\n indicatorAxis.angle = angle;\n }, this);\n };\n Radar.prototype.update = function (ecModel, api) {\n var indicatorAxes = this._indicatorAxes;\n var radarModel = this._model;\n var splitNumber = ensureValidSplitNumber(radarModel.get('splitNumber'), RADAR_DEFAULT_SPLIT_NUMBER);\n var dummyScale = new IntervalScale();\n dummyScale.setExtent(0, splitNumber);\n dummyScale.setConfig({\n interval: 1\n });\n // Force all the axis fixing the maxSplitNumber.\n each(indicatorAxes, function (indicatorAxis) {\n scaleRawExtentInfoCreate(indicatorAxis, AXIS_EXTENT_INFO_BUILD_FROM_COORD_SYS_UPDATE);\n scaleCalcAlign(indicatorAxis, dummyScale);\n });\n };\n Radar.prototype.convertToPixel = function (ecModel, finder, value) {\n console.warn('Not implemented.');\n return null;\n };\n Radar.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n console.warn('Not implemented.');\n return null;\n };\n Radar.prototype.containPoint = function (point) {\n console.warn('Not implemented.');\n return false;\n };\n Radar.create = function (ecModel, api) {\n var radarList = [];\n ecModel.eachComponent(COMPONENT_TYPE_RADAR, function (radarModel) {\n var radar = new Radar(radarModel, ecModel, api);\n radarList.push(radar);\n radarModel.coordinateSystem = radar;\n });\n ecModel.eachSeriesByType(SERIES_TYPE_RADAR, function (radarSeries) {\n if (radarSeries.get('coordinateSystem') === COORD_SYS_TYPE_RADAR) {\n // Inject coordinate system\n // @ts-ignore\n var radar = radarSeries.coordinateSystem = radarList[radarSeries.get('radarIndex') || 0];\n if (radar) {\n each(radar.getIndicatorAxes(), function (indicatorAxis) {\n associateSeriesWithAxis(indicatorAxis, radarSeries, COORD_SYS_TYPE_RADAR);\n });\n }\n }\n });\n return radarList;\n };\n /**\n * Radar dimensions is based on the data\n */\n Radar.dimensions = [];\n return Radar;\n}();\nexport default Radar;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport RadarModel from '../../coord/radar/RadarModel.js';\nimport RadarView from './RadarView.js';\nimport Radar from '../../coord/radar/Radar.js';\nexport function install(registers) {\n registers.registerCoordinateSystem('radar', Radar);\n registers.registerComponentModel(RadarModel);\n registers.registerComponentView(RadarView);\n registers.registerVisual({\n seriesType: 'radar',\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n // itemVisual symbol is for selected data\n data.each(function (idx) {\n data.setItemVisual(idx, 'legendIcon', 'roundRect');\n });\n // visual is for unselected data\n data.setVisual('legendIcon', 'roundRect');\n }\n });\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BoundingRect, { boundingRectApplyTransform, boundingRectCalculateTransform, boundingRectContain, boundingRectCopy, boundingRectCreate } from 'zrender/lib/core/BoundingRect.js';\nimport Transformable, { copyTransform, transformableCreate, transformableGetLocalTransform } from 'zrender/lib/core/Transformable.js';\nimport { isPositionSizeOptionPercent, mathAbs, parsePercent } from '../util/number.js';\nimport { assert, each } from 'zrender/lib/core/util.js';\nimport { getViewOfComponentOrSeries } from '../core/ExtensionAPI.js';\nimport { decomposeTransform, payloadDisableAnimation, updateProps, WH, XY } from '../util/graphic.js';\nimport { invert as matrixInvert, mul as matrixMul, create as matrixCreate, copy as matrixCopy } from 'zrender/lib/core/matrix.js';\nimport { applyTransform as vectorApplyTransform, copy as vectorCopy, set as vectorSet } from 'zrender/lib/core/vector.js';\n/**\n * @tutorial [VIEW_COORD_SYS_ANIMATION]\n *\n * Some VIEW_COORD_SYS may need to support roaming animation, which may be required when the original\n * inputs (such as `center/zoom/left/top/right/bottomwidth/height/etc.`) are changed via `setOption`.\n * Roaming animation requires strict visual alignment between VIEW_COORD_SYS itself (consider \"geo map\")\n * and its content (e.g., scatter series).\n * A logically correct implementation is probably applying animation to VIEW_COORD_SYS's inputs and\n * calculate VIEW_COORD_SYS's transformation and lay out its dependent series per frame via\n * `dispatchAction`-ish pattern. But this approach require more mechanism to be introduced and careful\n * refactoring.\n * Instead, we currently still follow the conventional implementation - create animation separately on\n * each element (typically via `graphic.updateProps`) . See VIEW_COORD_SYS_ANIMATION_PROPS_CONSTRAINT.\n *\n * [VIEW_COORD_SYS_ANIMATION_PROPS_CONSTRAINT]:\n * The animation should only interpolate `x/y/scaleX/scaleY`, thereby ensuring visual alignment, even\n * though `MapDraw` applies animations only on a \"VIEW_COORD_SYS_TRANS_ROAM\" but scatter series applies\n * animation on a \"VIEW_COORD_SYS_TRANS_OVERALL\".\n * But this constraint must always be respected by all relevant components and series.\n *\n * [VIEW_COORD_SYS_ANIMATION_INTERRUPTION]:\n * The animation should be able to be interrupted, such as when users roam it by mouse or touch.\n * When interrupted, `center` and `zoom` must be synchronized back to the VIEW_COORD_SYS and host models\n * (e.g., geo components or map series). Otherwise, a next `setOption` can cause unexpected result due to\n * the outdated `center` and `zoom`.\n * But see FIXME_VIEW_COORD_SYS_SYNC_BACK for some existing bugs.\n *\n * [VIEW_COORD_SYS_UPDATE_FLOW]:\n * To avoid bidirectional flow, we consider the original inputs (center/zoom/dataRect/viewRect/etc.) as\n * the single source of truth, and always calculate transformations based on that.\n * - Roaming interactions ('pan'/'zoom') can trigger an update to the original inputs via\n * `dispatchAction({type: 'xxxRoam', ...})`.\n * - Roaming animation can synchronize back to the original inputs when interrupted.\n * See `syncBackEl`: It is zrender elements that are assigned with VIEW_COORD_SYS_TRANSFORMATION,\n * and may be modified outside, typically by animation.\n */\n/**\n * @tutorial [VIEW_COORD_SYS_TRANSFORMATION]\n *\n * @tutorial [VIEW_COORD_SYS_TRANS_RAW]\n * It is the transformation from `ViewInner['dataRect']` to `ViewInner['viewRect']`.\n * - ViewInner['dataRect']:\n * A rect in a source space (or say, data space).\n * The unit is defined by the source. For example,\n * - for geo source, the unit defined as lat/lng,\n * - for SVG source, the unit is the same as the width/height defined in SVG.\n * - for series.graph/series.tree/series.sankey, the unit defined as px directly.\n * - ViewInner['viewRect']:\n * A rect in the canvas pixel space.\n * For example, it can be ec option left/right/top/bottom/width/height of a component or series.\n * NOTICE:\n * - ViewInner['dataRect'] and ViewInner['viewRect'] affect the behavior when centerOption contains\n * absolute values. See VIEW_COORD_SYS_CENTER_ZOOM_DEFINITION .\n *\n * @tutorial [VIEW_COORD_SYS_TRANS_ROAM]\n * It is built with respect to `RoamOptionMixin['center']` and `RoamOptionMixin['zoom']`.\n * [VIEW_COORD_SYS_CENTER_ZOOM_DEFINITION]:\n * {pxSpace} <-roamTrans- {viewRectSpace} <-rawTrans- {dataRectSpace} <-- ...\n * | |\n * zoomOption centerOption\n * `RoamOptionMixin['center']` is a user specified point on the space of `ViewInner['dataRect']`,\n * which will be located to the center of `ViewInner['viewRect']`.\n * It can also be a percent value (e.g. '50%'), based on ViewInner['dataRect'].width/height` (since v6).\n * Under this definition, users can use '0%' to map the top-left of `ViewInner['dataRect']`\n * to the center of `ViewInner['viewRect']`.\n * NOTICE:\n * - `RoamOptionMixin['center']` is in a linear space regardless of `GeoCommonOptionMixin['projection']`\n * - Absolute values in centerOption may hardly have a rigorous meaningful definition if the layout\n * is auto-calculated, since users are unlikely to known the exact value of the bounding rect.\n * And it is affected by the settings of ViewInner['dataRect'] and ViewInner['viewRect'].\n * Therefore, percent centerOption is preferred.\n * Use cases:\n * geo and map series (`MapDraw`) use this transformation for roamming, since the source\n * has been converted with respect to VIEW_COORD_SYS_TRANS_RAW.\n *\n * @tutorial [VIEW_COORD_SYS_TRANS_OVERALL]\n * This is the result of\n * `matrix_left_multiply(VIEW_COORD_SYS_TRANS_ROAM, VIEW_COORD_SYS_TRANS_RAW)`.\n * Use case:\n * sankey/tree/graph series use this transformation for roamming.\n *\n * @tutorial [VIEW_COORD_SYS_TRANSFORMATION_FORMULA]\n * [Basic]:\n * {pxSpace} <-roamTrans- {viewRectSpace} <-rawTrans- {dataRectSpace} <-- ...\n * pxPoint = roamTrans * rawTrans * dataPoint\n * overallTrans = roamTrans * rawTrans\n * [e.g., geo case]:\n * pxPoint = roamTrans * (rawTrans * (projection * dataPoint))\n * Hence: pxPoint = group_syncBackType_ROAM * (rawTrans * (projection * dataPoint))\n * Hence: pxPoint = group_syncBackType_ROAM * rawTrans_projection_precalculated_point\n * [e.g., graph series case]:\n * pxPoint = (roamTrans * rawTrans) * upper_els\n * Hence: pxPoint = group_syncBackType_OVERALL * upper_els\n * (NOTE: upper_els can have their own transformations)\n *\n * @see viewCoordSysCopyTrans for fetching transformations.\n */\nexport var VIEW_COORD_SYS_TRANS_RAW = 0;\nexport var VIEW_COORD_SYS_TRANS_ROAM = 1;\nexport var VIEW_COORD_SYS_TRANS_OVERALL = 2;\nfunction inner(viewCoordSys) {\n return viewCoordSys;\n}\nexport var VIEW_COORD_SYS_TYPE = 'view';\n/**\n * [VIEW_COORD_SYS]\n *\n * @final [NOTICE] Inheritance of this class is not recommended. Use composition instead.\n */\nvar View = /** @class */function (_super) {\n __extends(View, _super);\n function View(invertY, legacyCenterBase, legacyGeo) {\n var _this = _super.call(this) || this;\n _this.type = VIEW_COORD_SYS_TYPE;\n _this.dimensions = ['x', 'y'];\n var viewInner = inner(_this);\n viewInner.invertY = invertY;\n viewInner.lgCt = legacyCenterBase;\n viewInner.lgGeo = legacyGeo;\n var trans = viewInner.trans = [];\n trans[VIEW_COORD_SYS_TRANS_RAW] = transformableCreate();\n trans[VIEW_COORD_SYS_TRANS_ROAM] = transformableCreate();\n trans[VIEW_COORD_SYS_TRANS_OVERALL] = transformableCreate();\n viewInner.mtRaw = matrixCreate();\n viewInner.mtRawInv = matrixCreate();\n viewInner.mtOverall = matrixCreate();\n viewInner.mtOverallInv = matrixCreate();\n viewInner.zoom = 1;\n return _this;\n }\n /**\n * @implements CoordinateSystem['getBoundingRect']\n * @see VIEW_COORD_SYS_TRANS_RAW\n *\n * This is a rect in data space.\n * For historicall reason, the name is `getBoundingRect` - preserve it for backward compatibility.\n */\n View.prototype.getBoundingRect = function () {\n return viewCoordSysCopyBoundingRect(null, this);\n };\n /**\n * @implements CoordinateSystem['getViewRect']\n * @see VIEW_COORD_SYS_TRANS_RAW\n */\n View.prototype.getViewRect = function () {\n return viewCoordSysCopyViewRect(null, this);\n };\n /**\n * @implements CoordinateSystem['getRoamTransform']\n */\n View.prototype.getRoamTransform = function () {\n return transformableGetLocalTransform(inner(this).trans[VIEW_COORD_SYS_TRANS_ROAM]);\n };\n View.prototype.dataToPoint = function (data, noRoam, out) {\n var transform = noRoam ? inner(this).mtRaw : inner(this).mtOverall;\n out = out || [];\n return transform ? vectorApplyTransform(out, data, transform) : vectorCopy(out, data);\n };\n View.prototype.pointToData = function (point, reserved, out) {\n out = out || [];\n var invTransform = inner(this).mtOverallInv;\n return invTransform ? vectorApplyTransform(out, point, invTransform) : vectorCopy(out, point);\n };\n View.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.dataToPoint(value) : null;\n };\n View.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.pointToData(pixel) : null;\n };\n View.prototype.containPoint = function (point) {\n var viewInner = inner(this);\n boundingRectCopy(tmpPixelRectForContain, viewInner.dataRect);\n boundingRectApplyTransform(tmpPixelRectForContain, tmpPixelRectForContain, viewInner.mtOverall);\n return boundingRectContain(tmpPixelRectForContain, point[0], point[1]);\n };\n View.dimensions = ['x', 'y'];\n return View;\n}(Transformable);\nvar tmpPixelRectForContain = boundingRectCreate();\nexport function viewCoordSysCopyOverallMatrix(out, viewCoordSys) {\n return matrixCopy(out || [], inner(viewCoordSys).mtOverall);\n}\nexport function viewCoordSysGetZoomOption(viewCoordSys) {\n return inner(viewCoordSys).zoom;\n}\nexport function viewCoordSysCopyBoundingRect(out, viewCoordSys) {\n return boundingRectCopy(out || boundingRectCreate(), inner(viewCoordSys).dataRect);\n}\nexport function viewCoordSysCopyViewRect(out, viewCoordSys) {\n return boundingRectCopy(out || boundingRectCreate(), inner(viewCoordSys).viewRect);\n}\nexport function viewCoordSysCopyTrans(out, viewCoordSys, transKind\n// @return The input `out` or create an object.\n) {\n return copyTransform(out || transformableCreate(), inner(viewCoordSys).trans[transKind]);\n}\nfunction viewCoordSysIsInputReady(viewInner) {\n return !!(viewInner.dataRect && viewInner.viewRect);\n // NOTE: Other parameters has default values. Only parameters\n // above are required to be input.\n}\nfunction calcOverallTransFromSyncBackEl(out, viewInner, syncBackEl, syncBackType) {\n if (syncBackType === VIEW_COORD_SYS_TRANS_ROAM) {\n calcOverallTrans(out, viewInner.trans[VIEW_COORD_SYS_TRANS_RAW], syncBackEl);\n } else {\n copyTransform(out, syncBackEl);\n }\n}\nfunction calcRoamTransFromOverallTrans(out, viewInner, overallTrans) {\n // Convert overallTrans to roamTrans. If update animation is applied to overallTrans,\n // we assume that rawTrans is changed instantly, and roamTrans takes that animation.\n // Formula:\n // overallTrans = roamTrans * rawTrans\n // overallTrans * invert(rawTrans) = roamTrans\n transformableGetLocalTransform(overallTrans, tmpMtRTO);\n matrixMul(tmpMtRTO, tmpMtRTO, viewInner.mtRawInv);\n decomposeTransform(out, tmpMtRTO);\n}\nvar tmpMtRTO = matrixCreate();\n/**\n * [NOTICE]\n * The definition of this center has always been irrelevant to some other series center like\n * 'series-pie.center' - this center is a point in the space of `ViewInner['dataRect'].x/y`,\n * rather than canvas viewport, and the unit is not necessarily pixel (e.g., in geo case).\n */\nexport function viewCoordSysSetRoamOptionFromModel(viewCoordSys, hostModel) {\n var viewInner = inner(viewCoordSys);\n viewInner.centerOption = hostModel.getShallow('center');\n var zoomLimit = viewInner.zoomLimit = hostModel.getShallow('scaleLimit');\n var zoomOption = hostModel.getShallow('zoom');\n viewInner.zoom = clampByZoomLimit(zoomOption || 1, zoomLimit) || 1;\n if (viewCoordSysIsInputReady(viewInner)) {\n viewCoordSysUpdateTransform(viewInner);\n }\n}\n/**\n * @see ViewInner['dataRect']\n */\nexport function viewCoordSysSetBoundingRect(viewCoordSys, x, y, width, height) {\n var viewInner = inner(viewCoordSys);\n viewInner.dataRect = new BoundingRect(x, y, width, height);\n if (viewCoordSysIsInputReady(viewInner)) {\n viewCoordSysUpdateTransform(viewInner);\n }\n}\n/**\n * @see ViewInner['viewRect']\n */\nexport function viewCoordSysSetViewRect(viewCoordSys, x, y, width, height) {\n var viewInner = inner(viewCoordSys);\n viewInner.viewRect = new BoundingRect(x, y, width, height);\n if (viewCoordSysIsInputReady(viewInner)) {\n viewCoordSysUpdateTransform(viewInner);\n }\n}\nfunction viewCoordSysUpdateTransform(viewInner) {\n // The order matters.\n viewCoordSysUpdateRawTrans(viewInner);\n viewCoordSysUpdateRoamTrans(viewInner);\n viewCoordSysUpdateOverallTrans(viewInner);\n}\nfunction viewCoordSysUpdateRawTrans(viewInner) {\n var dataRect = viewInner.dataRect;\n var viewRect = viewInner.viewRect;\n var rawTrans = viewInner.trans[VIEW_COORD_SYS_TRANS_RAW];\n var invertY = viewInner.invertY;\n if (invertY) {\n dataRect = boundingRectCopy(tmpRectURT, dataRect);\n dataRect.y = -dataRect.y - dataRect.height;\n }\n boundingRectCalculateTransform(tmpMtURT, dataRect, viewRect);\n decomposeTransform(rawTrans, tmpMtURT);\n if (invertY) {\n rawTrans.scaleY = -rawTrans.scaleY;\n }\n var mtRaw = transformableGetLocalTransform(rawTrans, viewInner.mtRaw);\n matrixInvert(viewInner.mtRawInv, mtRaw);\n}\nvar tmpMtURT = matrixCreate();\nvar tmpRectURT = boundingRectCreate();\n/**\n * NOTICE: It depends on `viewCoordSysUpdateRawTrans`.\n */\nfunction viewCoordSysUpdateRoamTrans(viewInner) {\n var viewRectCenter = viewCoordSysGetViewRectCenter(viewInner);\n var roamViewCenter = parseCenterOption(tmpCenterURT, viewInner, viewInner.centerOption) ? vectorApplyTransform(tmpCenterURT, tmpCenterURT, viewInner.mtRaw) : viewRectCenter;\n var zoom = viewInner.zoom;\n var roamTrans = viewInner.trans[VIEW_COORD_SYS_TRANS_ROAM];\n roamTrans.x = viewRectCenter[0] - zoom * roamViewCenter[0];\n roamTrans.y = viewRectCenter[1] - zoom * roamViewCenter[1];\n roamTrans.scaleX = roamTrans.scaleY = zoom;\n // [VIEW_COORD_SYS_APPLY_ROAM_CENTER_AND_ZOOM]\n // Ordinarily, the definition is:\n // roamTrans.originX = roamViewCenter[0];\n // roamTrans.originY = roamViewCenter[1];\n // roamTrans.x = viewRectCenter[0] - roamViewCenter[0];\n // roamTrans.y = viewRectCenter[1] - roamViewCenter[1];\n // roamTrans.scaleX = roamTrans.scaleY = zoom;\n // But `el.originX`/`originY` should not be set.\n // (see VIEW_COORD_SYS_ANIMATION_PROPS_CONSTRAINT for the reason),\n // so we use the above formula instead.\n}\nvar tmpCenterURT = [];\n/**\n * NOTICE: It depends on `viewCoordSysUpdateRoamTrans` and `viewCoordSysUpdateRawTrans`\n */\nfunction viewCoordSysUpdateOverallTrans(viewInner) {\n var trans = viewInner.trans;\n var roamTrans = trans[VIEW_COORD_SYS_TRANS_ROAM];\n var rawTrans = trans[VIEW_COORD_SYS_TRANS_RAW];\n var overallTrans = trans[VIEW_COORD_SYS_TRANS_OVERALL];\n calcOverallTrans(overallTrans, rawTrans, roamTrans);\n var mtOverall = transformableGetLocalTransform(overallTrans, viewInner.mtOverall);\n var mtOverallInv = matrixInvert(viewInner.mtOverallInv, mtOverall);\n legacyCopyOverallTrans(viewInner, overallTrans, mtOverall, mtOverallInv);\n legacyCopyOverallTrans(viewInner.lgGeo, overallTrans, mtOverall, mtOverallInv);\n}\n/**\n * [VIEW_COORD_SYS_TRANS_OVERALL_BACKWARD_COMPATIBILITY]\n * VIEW_COORD_SYS_TRANS_OVERALL transformable has long been View or Geo instance itself.\n * We keep backward compatibility, since some users may have visited it directly (e.g.\n * for drawing a computed bounding rect).\n */\nfunction legacyCopyOverallTrans(target, overallTrans, mtOverall, mtOverallInv) {\n if (target) {\n copyTransform(target, overallTrans);\n matrixCopy(target.transform || (target.transform = []), mtOverall);\n matrixCopy(target.invTransform || (target.invTransform = []), mtOverallInv);\n }\n}\nfunction calcOverallTrans(out, rawTrans, roamTrans) {\n transformableGetLocalTransform(rawTrans, tmpMtCOT1);\n transformableGetLocalTransform(roamTrans, tmpMtCOT2);\n matrixMul(tmpMtCOT2, tmpMtCOT2, tmpMtCOT1);\n decomposeTransform(out, tmpMtCOT2);\n}\nvar tmpMtCOT1 = matrixCreate();\nvar tmpMtCOT2 = matrixCreate();\nfunction getCoordSys(finder) {\n var seriesModel = finder.seriesModel;\n return seriesModel ? seriesModel.coordinateSystem : null; // e.g., graph.\n}\nfunction viewCoordSysGetViewRectCenter(viewInner) {\n var viewRect = viewInner.viewRect;\n tmpViewRectCenter[0] = viewRect.x + viewRect.width / 2;\n tmpViewRectCenter[1] = viewRect.y + viewRect.height / 2;\n return tmpViewRectCenter;\n}\nvar tmpViewRectCenter = [];\nexport function isViewCoordSys(coordSys) {\n return coordSys && coordSys.type === 'view';\n}\n/**\n * NOTICE:\n * - `syncBackEl` should be in the pixel space without any other transformation\n * in its accesters, otherwise the roaming may incorrect.\n * - `syncBackEl` can be a `Group`, having its own descendants and transformation.\n * But in this case, `dataToPoint` can only reach the space of `syncBackEl` itself.\n */\nexport function applyViewCoordSysTransToElement(syncBackEl, syncBackType, viewCoordSys,\n// If NullUndefined, no animation.\n// Typically, there should be no animation in the first render and in `__updateOnOwnRoam`.\nanimatableModel) {\n var viewInner = inner(viewCoordSys);\n viewInner.syncBackEl = syncBackEl;\n viewInner.syncBackType = syncBackType;\n if (!animatableModel) {\n viewCoordSysCopyTrans(syncBackEl, viewCoordSys, syncBackType);\n syncBackEl.dirty();\n } else {\n updateProps(syncBackEl, viewCoordSysCopyTrans(null, viewCoordSys, syncBackType), animatableModel);\n }\n}\n/**\n * FIXME: [FIXME_VIEW_COORD_SYS_SYNC_BACK]\n * Currently the \"sync back\" is only performed on roam action. But these cases are not\n * covered:\n * 1. Consider both center change and series data adding is requested via `setOption`\n * and animation is not finished, the new added series symbols should lay out based\n * on the \"intermediate state\" rather than the \"final state\" of the VIEW_COORD_SYS,\n * otherwise, visual artifacts can arise.\n * 2. See the case of FIXME_SYMBOL_CLIP_CONSIDERING_COORD_SYS_ALIGNMENT_DURING_ANIMATION .\n */\nfunction viewCoordSysSyncBack(viewCoordSys, hostModel, otherModelsToSync, payload) {\n var viewInner = inner(viewCoordSys);\n var syncBackEl = viewInner.syncBackEl;\n if (syncBackEl) {\n if (process.env.NODE_ENV !== 'production') {\n assert(viewInner.syncBackType != null);\n }\n // @see VIEW_COORD_SYS_ANIMATION_INTERRUPTION\n syncBackEl.stopAnimation();\n // syncBackEl may have been changed regardless of animation,\n // therefore, need to sync back.\n calcOverallTransFromSyncBackEl(tmpTransSB1, viewInner, syncBackEl, viewInner.syncBackType);\n } else {\n copyTransform(tmpTransSB1, viewInner.trans[VIEW_COORD_SYS_TRANS_OVERALL]);\n }\n // Sync back to model.\n calcRoamTransFromOverallTrans(tmpTransSB2, viewInner, tmpTransSB1);\n payload ? applyRoamPayloadToOverallTrans(tmpTransSB1, tmpTransSB2, viewInner, payload) : copyTransform(tmpTransSB1, tmpTransSB2);\n calcRoamTransFromOverallTrans(tmpTransSB1, viewInner, tmpTransSB1);\n syncBackToRoamOptionFromRoamTrans(viewInner, hostModel, otherModelsToSync, tmpTransSB1);\n}\nvar tmpTransSB1 = transformableCreate();\nvar tmpTransSB2 = transformableCreate();\n/**\n * Invert to `center` and `zoom` of VIEW_COORD_SYS and host models based on\n * - `syncBackEl` or VIEW_COORD_SYS_TRANS_OVERALL\n * - Delta in `payload`.\n *\n * Should be only called in action handlers.\n *\n * @see RoamHostView['__updateOnOwnRoam']\n */\nexport function ownRoamModelCoordSysUpdateInAction(payload, hostModel,\n// This is only used for MAP_SERIES_GROUP, where the change need to sync to all series,\n// otherwise when legend filter some series and the other series take the responsibility\n// to draw map, or roam then legend restored, the result will be incorrect.\notherModelsToSync) {\n // NOTE: VIEW_COORD_SYS instances are depended on by this action handler.\n // Under the current design, actions should not be triggered before `setOption`\n // being called, therefore coord sys instances always exist.\n var viewCoordSys = getOwnRoamViewCoordSys(hostModel);\n if (viewCoordSys) {\n // Sync back to model.\n viewCoordSysSyncBack(viewCoordSys, hostModel, otherModelsToSync, payload);\n // Recalculate from model.\n viewCoordSysSetRoamOptionFromModel(viewCoordSys, hostModel);\n }\n}\nexport function getOwnRoamViewCoordSys(hostModel) {\n return hostModel.__ownRoamView ? hostModel.__ownRoamView() : null;\n}\nexport function ownRoamViewUpdateDirectlyInAction(payload, componentOrSeries, ecModel, api) {\n // Tricky: disable animation in `updateProps` of `graphic.ts`.\n ecModel.setUpdatePayload(payloadDisableAnimation(payload));\n var componentOrSeriesView = getViewOfComponentOrSeries(api, componentOrSeries);\n if (componentOrSeriesView && componentOrSeriesView.__updateOnOwnRoam) {\n componentOrSeriesView.__updateOnOwnRoam(payload, componentOrSeries, api);\n }\n}\nfunction applyRoamPayloadToOverallTrans(targetOverallTrans, roamTrans, viewInner, payload) {\n // NOTE: payload.dx/dy should always applied to pixel space, i.e., \"overallTrans\".\n if (payload.dx != null && payload.dy != null) {\n targetOverallTrans.x += payload.dx;\n targetOverallTrans.y += payload.dy;\n }\n var deltaZoom = payload.zoom;\n if (deltaZoom != null) {\n // Although `zoomOption` is defined on roamTrans\n var oldZoom = getZoomFromRoamTrans(roamTrans);\n var newZoom = clampByZoomLimit(oldZoom * deltaZoom, viewInner.zoomLimit);\n var deltaZoom2 = newZoom / oldZoom;\n // Keep the mouse center when scaling.\n targetOverallTrans.x -= (payload.originX - targetOverallTrans.x) * (deltaZoom2 - 1);\n targetOverallTrans.y -= (payload.originY - targetOverallTrans.y) * (deltaZoom2 - 1);\n // Although `zoomOption` is defined on roamTrans,\n // deltaZoom can be applied to overallTrans directly.\n targetOverallTrans.scaleX *= deltaZoom2;\n targetOverallTrans.scaleY *= deltaZoom2;\n }\n}\nfunction getZoomFromRoamTrans(trans) {\n if (process.env.NODE_ENV !== 'production') {\n // scaleX and scaleY should be the same even during animation.\n // See VIEW_COORD_SYS_APPLY_ROAM_CENTER_AND_ZOOM .\n assert(mathAbs(trans.scaleX - trans.scaleY) < 1e-5);\n }\n return trans.scaleX;\n}\nfunction parseCenterOption(\n// `out` is a center in `dataRect` space.\nout, viewInner, centerOption\n// @return Whether a valid center is obtained.\n) {\n if (process.env.NODE_ENV !== 'production') {\n assert(viewCoordSysIsInputReady(viewInner));\n }\n var dataRect = viewInner.dataRect;\n if (!centerOption) {\n return false;\n }\n // #16904 introduced percentage string here, such as '33%'. But it was based on canvas\n // width/height, which is not reasonable - the unit may incorrect, and it is unpredictable if\n // the `ViewInner['dataRect']` is not calculated based on the current canvas rect. Therefore the percentage\n // value is changed to based on `ViewInner['dataRect'].width/height` since v6. Under this definition, users\n // can use '0%' to map the top-left of `ViewInner['dataRect']` to the center of `ViewInner['viewRect']`.\n var lgCt = viewInner.lgCt;\n if (lgCt) {\n vectorSet(out, parsePercent(centerOption[0], lgCt.w), parsePercent(centerOption[1], lgCt.h));\n } else if (dataRect) {\n vectorSet(out, parsePercent(centerOption[0], dataRect.width, dataRect.x), parsePercent(centerOption[1], dataRect.height, dataRect.y));\n }\n return true;\n}\n/**\n * An inverse operation to `parseCenterOption`.\n * Mainly for percentage center option.\n */\nfunction invertBackToCenterOption(viewInner, center) {\n var lastCenterOption = viewInner.centerOption;\n var dataRect = viewInner.dataRect;\n if (process.env.NODE_ENV !== 'production') {\n assert(center && dataRect);\n }\n return !lastCenterOption || viewInner.lgCt ? center.slice() : [invertToPercentPerCenterDim(0, center, lastCenterOption, dataRect), invertToPercentPerCenterDim(1, center, lastCenterOption, dataRect)];\n}\nfunction invertToPercentPerCenterDim(dimIdx, center, lastCenterOption, dataRect) {\n return lastCenterOption && dataRect && dataRect[WH[dimIdx]] && isPositionSizeOptionPercent(lastCenterOption[dimIdx]) ? (center[dimIdx] - dataRect[XY[dimIdx]]) / dataRect[WH[dimIdx]] * 100 + '%' : center[dimIdx];\n}\nexport function useLegacyViewCoordSysCenterBase(ecModel, api) {\n return api && ecModel && ecModel.getShallow('legacyViewCoordSysCenterBase') ? {\n w: api.getWidth(),\n h: api.getHeight()\n } : null;\n}\n/**\n * @see VIEW_COORD_SYS_ANIMATION_INTERRUPTION\n */\nfunction syncBackToRoamOptionFromRoamTrans(viewInner, hostModel, otherModelsToSync, roamTrans) {\n // This is the inverse operation of `viewCoordSysSetRoamOptionFromModel`.\n var viewRectCenter = viewCoordSysGetViewRectCenter(viewInner);\n var zoom = getZoomFromRoamTrans(roamTrans);\n var notZoomNearZero = mathAbs(zoom) > 1e-6;\n tmpCenterITR[0] = notZoomNearZero ? (viewRectCenter[0] - roamTrans.x) / zoom : viewRectCenter[0]; // Unlikely to occur.\n tmpCenterITR[1] = notZoomNearZero ? (viewRectCenter[1] - roamTrans.y) / zoom : viewRectCenter[1]; // Unlikely to occur.\n vectorApplyTransform(tmpCenterITR, tmpCenterITR, viewInner.mtRawInv);\n var centerOption = invertBackToCenterOption(viewInner, tmpCenterITR);\n syncBackRoamOptionToRoamHostModel(hostModel, centerOption, zoom);\n each(otherModelsToSync, function (otherModel) {\n if (otherModel !== hostModel) {\n syncBackRoamOptionToRoamHostModel(otherModel, centerOption.slice(), zoom);\n }\n });\n}\nvar tmpCenterITR = [];\n/**\n * Models should be updated, otherwise consequent `setOption()` can cause outdated `center`\n * and `zoom` to be used.\n */\nfunction syncBackRoamOptionToRoamHostModel(hostModel, center, zoom) {\n var option = hostModel.option;\n option.center = center;\n option.zoom = zoom;\n}\nexport function clampByZoomLimit(zoom, zoomLimit) {\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n zoom = Math.max(Math.min(zoomMax, zoom), zoomMin);\n }\n return zoom;\n}\nexport function calcCompensationScaleToPreserveNodeSize(viewCoordSys, model) {\n var nodeScaleRatio = model.getShallow('nodeScaleRatio', true) || 1;\n var viewInner = inner(viewCoordSys);\n // Scale node when zoom changes\n return ((viewInner.zoom - 1) * nodeScaleRatio + 1) / (viewInner.trans[VIEW_COORD_SYS_TRANS_OVERALL].scaleX || 1);\n}\nexport default View;", "import { isString } from '../core/util.js';\nexport function parseXML(svg) {\n if (isString(svg)) {\n var parser = new DOMParser();\n svg = parser.parseFromString(svg, 'text/xml');\n }\n var svgNode = svg;\n if (svgNode.nodeType === 9) {\n svgNode = svgNode.firstChild;\n }\n while (svgNode.nodeName.toLowerCase() !== 'svg' || svgNode.nodeType !== 1) {\n svgNode = svgNode.nextSibling;\n }\n return svgNode;\n}\n", "import Group from '../graphic/Group.js';\nimport ZRImage from '../graphic/Image.js';\nimport Circle from '../graphic/shape/Circle.js';\nimport Rect from '../graphic/shape/Rect.js';\nimport Ellipse from '../graphic/shape/Ellipse.js';\nimport Line from '../graphic/shape/Line.js';\nimport Polygon from '../graphic/shape/Polygon.js';\nimport Polyline from '../graphic/shape/Polyline.js';\nimport * as matrix from '../core/matrix.js';\nimport { createFromString } from './path.js';\nimport { defaults, trim, each, map, keys, hasOwn } from '../core/util.js';\nimport LinearGradient from '../graphic/LinearGradient.js';\nimport RadialGradient from '../graphic/RadialGradient.js';\nimport TSpan from '../graphic/TSpan.js';\nimport { parseXML } from './parseXML.js';\nimport * as colorTool from './color.js';\n;\nvar nodeParsers;\nvar INHERITABLE_STYLE_ATTRIBUTES_MAP = {\n 'fill': 'fill',\n 'stroke': 'stroke',\n 'stroke-width': 'lineWidth',\n 'opacity': 'opacity',\n 'fill-opacity': 'fillOpacity',\n 'stroke-opacity': 'strokeOpacity',\n 'stroke-dasharray': 'lineDash',\n 'stroke-dashoffset': 'lineDashOffset',\n 'stroke-linecap': 'lineCap',\n 'stroke-linejoin': 'lineJoin',\n 'stroke-miterlimit': 'miterLimit',\n 'font-family': 'fontFamily',\n 'font-size': 'fontSize',\n 'font-style': 'fontStyle',\n 'font-weight': 'fontWeight',\n 'text-anchor': 'textAlign',\n 'visibility': 'visibility',\n 'display': 'display'\n};\nvar INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS = keys(INHERITABLE_STYLE_ATTRIBUTES_MAP);\nvar SELF_STYLE_ATTRIBUTES_MAP = {\n 'alignment-baseline': 'textBaseline',\n 'stop-color': 'stopColor'\n};\nvar SELF_STYLE_ATTRIBUTES_MAP_KEYS = keys(SELF_STYLE_ATTRIBUTES_MAP);\nvar SVGParser = (function () {\n function SVGParser() {\n this._defs = {};\n this._root = null;\n }\n SVGParser.prototype.parse = function (xml, opt) {\n opt = opt || {};\n var svg = parseXML(xml);\n if (process.env.NODE_ENV !== 'production') {\n if (!svg) {\n throw new Error('Illegal svg');\n }\n }\n this._defsUsePending = [];\n var root = new Group();\n this._root = root;\n var named = [];\n var viewBox = svg.getAttribute('viewBox') || '';\n var width = parseFloat((svg.getAttribute('width') || opt.width));\n var height = parseFloat((svg.getAttribute('height') || opt.height));\n isNaN(width) && (width = null);\n isNaN(height) && (height = null);\n parseAttributes(svg, root, null, true, false);\n var child = svg.firstChild;\n while (child) {\n this._parseNode(child, root, named, null, false, false);\n child = child.nextSibling;\n }\n applyDefs(this._defs, this._defsUsePending);\n this._defsUsePending = [];\n var viewBoxRect;\n var viewBoxTransform;\n if (viewBox) {\n var viewBoxArr = splitNumberSequence(viewBox);\n if (viewBoxArr.length >= 4) {\n viewBoxRect = {\n x: parseFloat((viewBoxArr[0] || 0)),\n y: parseFloat((viewBoxArr[1] || 0)),\n width: parseFloat(viewBoxArr[2]),\n height: parseFloat(viewBoxArr[3])\n };\n }\n }\n if (viewBoxRect && width != null && height != null) {\n viewBoxTransform = makeViewBoxTransform(viewBoxRect, { x: 0, y: 0, width: width, height: height });\n if (!opt.ignoreViewBox) {\n var elRoot = root;\n root = new Group();\n root.add(elRoot);\n elRoot.scaleX = elRoot.scaleY = viewBoxTransform.scale;\n elRoot.x = viewBoxTransform.x;\n elRoot.y = viewBoxTransform.y;\n }\n }\n if (!opt.ignoreRootClip && width != null && height != null) {\n root.setClipPath(new Rect({\n shape: { x: 0, y: 0, width: width, height: height }\n }));\n }\n return {\n root: root,\n width: width,\n height: height,\n viewBoxRect: viewBoxRect,\n viewBoxTransform: viewBoxTransform,\n named: named\n };\n };\n SVGParser.prototype._parseNode = function (xmlNode, parentGroup, named, namedFrom, isInDefs, isInText) {\n var nodeName = xmlNode.nodeName.toLowerCase();\n var el;\n var namedFromForSub = namedFrom;\n if (nodeName === 'defs') {\n isInDefs = true;\n }\n if (nodeName === 'text') {\n isInText = true;\n }\n if (nodeName === 'defs' || nodeName === 'switch') {\n el = parentGroup;\n }\n else {\n if (!isInDefs) {\n var parser_1 = nodeParsers[nodeName];\n if (parser_1 && hasOwn(nodeParsers, nodeName)) {\n el = parser_1.call(this, xmlNode, parentGroup);\n var nameAttr = xmlNode.getAttribute('name');\n if (nameAttr) {\n var newNamed = {\n name: nameAttr,\n namedFrom: null,\n svgNodeTagLower: nodeName,\n el: el\n };\n named.push(newNamed);\n if (nodeName === 'g') {\n namedFromForSub = newNamed;\n }\n }\n else if (namedFrom) {\n named.push({\n name: namedFrom.name,\n namedFrom: namedFrom,\n svgNodeTagLower: nodeName,\n el: el\n });\n }\n parentGroup.add(el);\n }\n }\n var parser = paintServerParsers[nodeName];\n if (parser && hasOwn(paintServerParsers, nodeName)) {\n var def = parser.call(this, xmlNode);\n var id = xmlNode.getAttribute('id');\n if (id) {\n this._defs[id] = def;\n }\n }\n }\n if (el && el.isGroup) {\n var child = xmlNode.firstChild;\n while (child) {\n if (child.nodeType === 1) {\n this._parseNode(child, el, named, namedFromForSub, isInDefs, isInText);\n }\n else if (child.nodeType === 3 && isInText) {\n this._parseText(child, el);\n }\n child = child.nextSibling;\n }\n }\n };\n SVGParser.prototype._parseText = function (xmlNode, parentGroup) {\n var text = new TSpan({\n style: {\n text: xmlNode.textContent\n },\n silent: true,\n x: this._textX || 0,\n y: this._textY || 0\n });\n inheritStyle(parentGroup, text);\n parseAttributes(xmlNode, text, this._defsUsePending, false, false);\n applyTextAlignment(text, parentGroup);\n var textStyle = text.style;\n var fontSize = textStyle.fontSize;\n if (fontSize && fontSize < 9) {\n textStyle.fontSize = 9;\n text.scaleX *= fontSize / 9;\n text.scaleY *= fontSize / 9;\n }\n var font = (textStyle.fontSize || textStyle.fontFamily) && [\n textStyle.fontStyle,\n textStyle.fontWeight,\n (textStyle.fontSize || 12) + 'px',\n textStyle.fontFamily || 'sans-serif'\n ].join(' ');\n textStyle.font = font;\n var rect = text.getBoundingRect();\n this._textX += rect.width;\n parentGroup.add(text);\n return text;\n };\n SVGParser.internalField = (function () {\n nodeParsers = {\n 'g': function (xmlNode, parentGroup) {\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defsUsePending, false, false);\n return g;\n },\n 'rect': function (xmlNode, parentGroup) {\n var rect = new Rect();\n inheritStyle(parentGroup, rect);\n parseAttributes(xmlNode, rect, this._defsUsePending, false, false);\n rect.setShape({\n x: parseFloat(xmlNode.getAttribute('x') || '0'),\n y: parseFloat(xmlNode.getAttribute('y') || '0'),\n width: parseFloat(xmlNode.getAttribute('width') || '0'),\n height: parseFloat(xmlNode.getAttribute('height') || '0')\n });\n rect.silent = true;\n return rect;\n },\n 'circle': function (xmlNode, parentGroup) {\n var circle = new Circle();\n inheritStyle(parentGroup, circle);\n parseAttributes(xmlNode, circle, this._defsUsePending, false, false);\n circle.setShape({\n cx: parseFloat(xmlNode.getAttribute('cx') || '0'),\n cy: parseFloat(xmlNode.getAttribute('cy') || '0'),\n r: parseFloat(xmlNode.getAttribute('r') || '0')\n });\n circle.silent = true;\n return circle;\n },\n 'line': function (xmlNode, parentGroup) {\n var line = new Line();\n inheritStyle(parentGroup, line);\n parseAttributes(xmlNode, line, this._defsUsePending, false, false);\n line.setShape({\n x1: parseFloat(xmlNode.getAttribute('x1') || '0'),\n y1: parseFloat(xmlNode.getAttribute('y1') || '0'),\n x2: parseFloat(xmlNode.getAttribute('x2') || '0'),\n y2: parseFloat(xmlNode.getAttribute('y2') || '0')\n });\n line.silent = true;\n return line;\n },\n 'ellipse': function (xmlNode, parentGroup) {\n var ellipse = new Ellipse();\n inheritStyle(parentGroup, ellipse);\n parseAttributes(xmlNode, ellipse, this._defsUsePending, false, false);\n ellipse.setShape({\n cx: parseFloat(xmlNode.getAttribute('cx') || '0'),\n cy: parseFloat(xmlNode.getAttribute('cy') || '0'),\n rx: parseFloat(xmlNode.getAttribute('rx') || '0'),\n ry: parseFloat(xmlNode.getAttribute('ry') || '0')\n });\n ellipse.silent = true;\n return ellipse;\n },\n 'polygon': function (xmlNode, parentGroup) {\n var pointsStr = xmlNode.getAttribute('points');\n var pointsArr;\n if (pointsStr) {\n pointsArr = parsePoints(pointsStr);\n }\n var polygon = new Polygon({\n shape: {\n points: pointsArr || []\n },\n silent: true\n });\n inheritStyle(parentGroup, polygon);\n parseAttributes(xmlNode, polygon, this._defsUsePending, false, false);\n return polygon;\n },\n 'polyline': function (xmlNode, parentGroup) {\n var pointsStr = xmlNode.getAttribute('points');\n var pointsArr;\n if (pointsStr) {\n pointsArr = parsePoints(pointsStr);\n }\n var polyline = new Polyline({\n shape: {\n points: pointsArr || []\n },\n silent: true\n });\n inheritStyle(parentGroup, polyline);\n parseAttributes(xmlNode, polyline, this._defsUsePending, false, false);\n return polyline;\n },\n 'image': function (xmlNode, parentGroup) {\n var img = new ZRImage();\n inheritStyle(parentGroup, img);\n parseAttributes(xmlNode, img, this._defsUsePending, false, false);\n img.setStyle({\n image: xmlNode.getAttribute('xlink:href') || xmlNode.getAttribute('href'),\n x: +xmlNode.getAttribute('x'),\n y: +xmlNode.getAttribute('y'),\n width: +xmlNode.getAttribute('width'),\n height: +xmlNode.getAttribute('height')\n });\n img.silent = true;\n return img;\n },\n 'text': function (xmlNode, parentGroup) {\n var x = xmlNode.getAttribute('x') || '0';\n var y = xmlNode.getAttribute('y') || '0';\n var dx = xmlNode.getAttribute('dx') || '0';\n var dy = xmlNode.getAttribute('dy') || '0';\n this._textX = parseFloat(x) + parseFloat(dx);\n this._textY = parseFloat(y) + parseFloat(dy);\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defsUsePending, false, true);\n return g;\n },\n 'tspan': function (xmlNode, parentGroup) {\n var x = xmlNode.getAttribute('x');\n var y = xmlNode.getAttribute('y');\n if (x != null) {\n this._textX = parseFloat(x);\n }\n if (y != null) {\n this._textY = parseFloat(y);\n }\n var dx = xmlNode.getAttribute('dx') || '0';\n var dy = xmlNode.getAttribute('dy') || '0';\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defsUsePending, false, true);\n this._textX += parseFloat(dx);\n this._textY += parseFloat(dy);\n return g;\n },\n 'path': function (xmlNode, parentGroup) {\n var d = xmlNode.getAttribute('d') || '';\n var path = createFromString(d);\n inheritStyle(parentGroup, path);\n parseAttributes(xmlNode, path, this._defsUsePending, false, false);\n path.silent = true;\n return path;\n }\n };\n })();\n return SVGParser;\n}());\nvar paintServerParsers = {\n 'lineargradient': function (xmlNode) {\n var x1 = parseInt(xmlNode.getAttribute('x1') || '0', 10);\n var y1 = parseInt(xmlNode.getAttribute('y1') || '0', 10);\n var x2 = parseInt(xmlNode.getAttribute('x2') || '10', 10);\n var y2 = parseInt(xmlNode.getAttribute('y2') || '0', 10);\n var gradient = new LinearGradient(x1, y1, x2, y2);\n parsePaintServerUnit(xmlNode, gradient);\n parseGradientColorStops(xmlNode, gradient);\n return gradient;\n },\n 'radialgradient': function (xmlNode) {\n var cx = parseInt(xmlNode.getAttribute('cx') || '0', 10);\n var cy = parseInt(xmlNode.getAttribute('cy') || '0', 10);\n var r = parseInt(xmlNode.getAttribute('r') || '0', 10);\n var gradient = new RadialGradient(cx, cy, r);\n parsePaintServerUnit(xmlNode, gradient);\n parseGradientColorStops(xmlNode, gradient);\n return gradient;\n }\n};\nfunction parsePaintServerUnit(xmlNode, gradient) {\n var gradientUnits = xmlNode.getAttribute('gradientUnits');\n if (gradientUnits === 'userSpaceOnUse') {\n gradient.global = true;\n }\n}\nfunction parseGradientColorStops(xmlNode, gradient) {\n var stop = xmlNode.firstChild;\n while (stop) {\n if (stop.nodeType === 1\n && stop.nodeName.toLocaleLowerCase() === 'stop') {\n var offsetStr = stop.getAttribute('offset');\n var offset = void 0;\n if (offsetStr && offsetStr.indexOf('%') > 0) {\n offset = parseInt(offsetStr, 10) / 100;\n }\n else if (offsetStr) {\n offset = parseFloat(offsetStr);\n }\n else {\n offset = 0;\n }\n var styleVals = {};\n parseInlineStyle(stop, styleVals, styleVals);\n var stopColor = styleVals.stopColor\n || stop.getAttribute('stop-color')\n || '#000000';\n var stopOpacity = styleVals.stopOpacity\n || stop.getAttribute('stop-opacity');\n if (stopOpacity) {\n var rgba = colorTool.parse(stopColor);\n var stopColorOpacity = rgba && rgba[3];\n if (stopColorOpacity) {\n rgba[3] *= colorTool.parseCssFloat(stopOpacity);\n stopColor = colorTool.stringify(rgba, 'rgba');\n }\n }\n gradient.colorStops.push({\n offset: offset,\n color: stopColor\n });\n }\n stop = stop.nextSibling;\n }\n}\nfunction inheritStyle(parent, child) {\n if (parent && parent.__inheritedStyle) {\n if (!child.__inheritedStyle) {\n child.__inheritedStyle = {};\n }\n defaults(child.__inheritedStyle, parent.__inheritedStyle);\n }\n}\nfunction parsePoints(pointsString) {\n var list = splitNumberSequence(pointsString);\n var points = [];\n for (var i = 0; i < list.length; i += 2) {\n var x = parseFloat(list[i]);\n var y = parseFloat(list[i + 1]);\n points.push([x, y]);\n }\n return points;\n}\nfunction parseAttributes(xmlNode, el, defsUsePending, onlyInlineStyle, isTextGroup) {\n var disp = el;\n var inheritedStyle = disp.__inheritedStyle = disp.__inheritedStyle || {};\n var selfStyle = {};\n if (xmlNode.nodeType === 1) {\n parseTransformAttribute(xmlNode, el);\n parseInlineStyle(xmlNode, inheritedStyle, selfStyle);\n if (!onlyInlineStyle) {\n parseAttributeStyle(xmlNode, inheritedStyle, selfStyle);\n }\n }\n disp.style = disp.style || {};\n if (inheritedStyle.fill != null) {\n disp.style.fill = getFillStrokeStyle(disp, 'fill', inheritedStyle.fill, defsUsePending);\n }\n if (inheritedStyle.stroke != null) {\n disp.style.stroke = getFillStrokeStyle(disp, 'stroke', inheritedStyle.stroke, defsUsePending);\n }\n each([\n 'lineWidth', 'opacity', 'fillOpacity', 'strokeOpacity', 'miterLimit', 'fontSize'\n ], function (propName) {\n if (inheritedStyle[propName] != null) {\n disp.style[propName] = parseFloat(inheritedStyle[propName]);\n }\n });\n each([\n 'lineDashOffset', 'lineCap', 'lineJoin', 'fontWeight', 'fontFamily', 'fontStyle', 'textAlign'\n ], function (propName) {\n if (inheritedStyle[propName] != null) {\n disp.style[propName] = inheritedStyle[propName];\n }\n });\n if (isTextGroup) {\n disp.__selfStyle = selfStyle;\n }\n if (inheritedStyle.lineDash) {\n disp.style.lineDash = map(splitNumberSequence(inheritedStyle.lineDash), function (str) {\n return parseFloat(str);\n });\n }\n if (inheritedStyle.visibility === 'hidden' || inheritedStyle.visibility === 'collapse') {\n disp.invisible = true;\n }\n if (inheritedStyle.display === 'none') {\n disp.ignore = true;\n }\n}\nfunction applyTextAlignment(text, parentGroup) {\n var parentSelfStyle = parentGroup.__selfStyle;\n if (parentSelfStyle) {\n var textBaseline = parentSelfStyle.textBaseline;\n var zrTextBaseline = textBaseline;\n if (!textBaseline || textBaseline === 'auto') {\n zrTextBaseline = 'alphabetic';\n }\n else if (textBaseline === 'baseline') {\n zrTextBaseline = 'alphabetic';\n }\n else if (textBaseline === 'before-edge' || textBaseline === 'text-before-edge') {\n zrTextBaseline = 'top';\n }\n else if (textBaseline === 'after-edge' || textBaseline === 'text-after-edge') {\n zrTextBaseline = 'bottom';\n }\n else if (textBaseline === 'central' || textBaseline === 'mathematical') {\n zrTextBaseline = 'middle';\n }\n text.style.textBaseline = zrTextBaseline;\n }\n var parentInheritedStyle = parentGroup.__inheritedStyle;\n if (parentInheritedStyle) {\n var textAlign = parentInheritedStyle.textAlign;\n var zrTextAlign = textAlign;\n if (textAlign) {\n if (textAlign === 'middle') {\n zrTextAlign = 'center';\n }\n text.style.textAlign = zrTextAlign;\n }\n }\n}\nvar urlRegex = /^url\\(\\s*#(.*?)\\)/;\nfunction getFillStrokeStyle(el, method, str, defsUsePending) {\n var urlMatch = str && str.match(urlRegex);\n if (urlMatch) {\n var url = trim(urlMatch[1]);\n defsUsePending.push([el, method, url]);\n return;\n }\n if (str === 'none') {\n str = null;\n }\n return str;\n}\nfunction applyDefs(defs, defsUsePending) {\n for (var i = 0; i < defsUsePending.length; i++) {\n var item = defsUsePending[i];\n item[0].style[item[1]] = defs[item[2]];\n }\n}\nvar numberReg = /-?([0-9]*\\.)?[0-9]+([eE]-?[0-9]+)?/g;\nfunction splitNumberSequence(rawStr) {\n return rawStr.match(numberReg) || [];\n}\nvar transformRegex = /(translate|scale|rotate|skewX|skewY|matrix)\\(([\\-\\s0-9\\.eE,]*)\\)/g;\nvar DEGREE_TO_ANGLE = Math.PI / 180;\nfunction parseTransformAttribute(xmlNode, node) {\n var transform = xmlNode.getAttribute('transform');\n if (transform) {\n transform = transform.replace(/,/g, ' ');\n var transformOps_1 = [];\n var mt = null;\n transform.replace(transformRegex, function (str, type, value) {\n transformOps_1.push(type, value);\n return '';\n });\n for (var i = transformOps_1.length - 1; i > 0; i -= 2) {\n var value = transformOps_1[i];\n var type = transformOps_1[i - 1];\n var valueArr = splitNumberSequence(value);\n mt = mt || matrix.create();\n switch (type) {\n case 'translate':\n matrix.translate(mt, mt, [parseFloat(valueArr[0]), parseFloat(valueArr[1] || '0')]);\n break;\n case 'scale':\n matrix.scale(mt, mt, [parseFloat(valueArr[0]), parseFloat(valueArr[1] || valueArr[0])]);\n break;\n case 'rotate':\n matrix.rotate(mt, mt, -parseFloat(valueArr[0]) * DEGREE_TO_ANGLE, [\n parseFloat(valueArr[1] || '0'),\n parseFloat(valueArr[2] || '0')\n ]);\n break;\n case 'skewX':\n var sx = Math.tan(parseFloat(valueArr[0]) * DEGREE_TO_ANGLE);\n matrix.mul(mt, [1, 0, sx, 1, 0, 0], mt);\n break;\n case 'skewY':\n var sy = Math.tan(parseFloat(valueArr[0]) * DEGREE_TO_ANGLE);\n matrix.mul(mt, [1, sy, 0, 1, 0, 0], mt);\n break;\n case 'matrix':\n mt[0] = parseFloat(valueArr[0]);\n mt[1] = parseFloat(valueArr[1]);\n mt[2] = parseFloat(valueArr[2]);\n mt[3] = parseFloat(valueArr[3]);\n mt[4] = parseFloat(valueArr[4]);\n mt[5] = parseFloat(valueArr[5]);\n break;\n }\n }\n node.setLocalTransform(mt);\n }\n}\nvar styleRegex = /([^\\s:;]+)\\s*:\\s*([^:;]+)/g;\nfunction parseInlineStyle(xmlNode, inheritableStyleResult, selfStyleResult) {\n var style = xmlNode.getAttribute('style');\n if (!style) {\n return;\n }\n styleRegex.lastIndex = 0;\n var styleRegResult;\n while ((styleRegResult = styleRegex.exec(style)) != null) {\n var svgStlAttr = styleRegResult[1];\n var zrInheritableStlAttr = hasOwn(INHERITABLE_STYLE_ATTRIBUTES_MAP, svgStlAttr)\n ? INHERITABLE_STYLE_ATTRIBUTES_MAP[svgStlAttr]\n : null;\n if (zrInheritableStlAttr) {\n inheritableStyleResult[zrInheritableStlAttr] = styleRegResult[2];\n }\n var zrSelfStlAttr = hasOwn(SELF_STYLE_ATTRIBUTES_MAP, svgStlAttr)\n ? SELF_STYLE_ATTRIBUTES_MAP[svgStlAttr]\n : null;\n if (zrSelfStlAttr) {\n selfStyleResult[zrSelfStlAttr] = styleRegResult[2];\n }\n }\n}\nfunction parseAttributeStyle(xmlNode, inheritableStyleResult, selfStyleResult) {\n for (var i = 0; i < INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS.length; i++) {\n var svgAttrName = INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS[i];\n var attrValue = xmlNode.getAttribute(svgAttrName);\n if (attrValue != null) {\n inheritableStyleResult[INHERITABLE_STYLE_ATTRIBUTES_MAP[svgAttrName]] = attrValue;\n }\n }\n for (var i = 0; i < SELF_STYLE_ATTRIBUTES_MAP_KEYS.length; i++) {\n var svgAttrName = SELF_STYLE_ATTRIBUTES_MAP_KEYS[i];\n var attrValue = xmlNode.getAttribute(svgAttrName);\n if (attrValue != null) {\n selfStyleResult[SELF_STYLE_ATTRIBUTES_MAP[svgAttrName]] = attrValue;\n }\n }\n}\nexport function makeViewBoxTransform(viewBoxRect, boundingRect) {\n var scaleX = boundingRect.width / viewBoxRect.width;\n var scaleY = boundingRect.height / viewBoxRect.height;\n var scale = Math.min(scaleX, scaleY);\n return {\n scale: scale,\n x: -(viewBoxRect.x + viewBoxRect.width / 2) * scale + (boundingRect.x + boundingRect.width / 2),\n y: -(viewBoxRect.y + viewBoxRect.height / 2) * scale + (boundingRect.y + boundingRect.height / 2)\n };\n}\nexport function parseSVG(xml, opt) {\n var parser = new SVGParser();\n return parser.parse(xml, opt);\n}\nexport { parseXML };\n", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parseSVG, makeViewBoxTransform } from 'zrender/lib/tool/parseSVG.js';\nimport Group from 'zrender/lib/graphic/Group.js';\nimport Rect from 'zrender/lib/graphic/shape/Rect.js';\nimport { assert, createHashMap, each } from 'zrender/lib/core/util.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { parseXML } from 'zrender/lib/tool/parseXML.js';\nimport { GeoSVGRegion } from './Region.js';\n/**\n * \"region available\" means that: enable users to set attribute `name=\"xxx\"` on those tags\n * to make it be a region.\n * 1. region styles and its label styles can be defined in echarts opton:\n * ```js\n * geo: {\n * regions: [{\n * name: 'xxx',\n * itemStyle: { ... },\n * label: { ... }\n * }, {\n * ...\n * },\n * ...]\n * };\n * ```\n * 2. name can be duplicated in different SVG tag. All of the tags with the same name share\n * a region option. For exampel if there are two <path> representing two lung lobes. They have\n * no common parents but both of them need to display label \"lung\" inside.\n */\nvar REGION_AVAILABLE_SVG_TAG_MAP = createHashMap(['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path',\n// <text> <tspan> are also enabled because some SVG might paint text itself,\n// but still need to trigger events or tooltip.\n'text', 'tspan',\n// <g> is also enabled because this case: if multiple tags share one name\n// and need label displayed, every tags will display the name, which is not\n// expected. So we can put them into a <g name=\"xxx\">. Thereby only one label\n// displayed and located based on the bounding rect of the <g>.\n'g']);\nvar GeoSVGResource = /** @class */function () {\n function GeoSVGResource(mapName, svg) {\n this.type = 'geoSVG';\n // All used graphics. key: hostKey, value: root\n this._usedGraphicMap = createHashMap();\n // All unused graphics.\n this._freedGraphics = [];\n this._mapName = mapName;\n // Only perform parse to XML object here, which might be time\n // consiming for large SVG.\n // Although convert XML to zrender element is also time consiming,\n // if we do it here, the clone of zrender elements has to be\n // required. So we do it once for each geo instance, util real\n // performance issues call for optimizing it.\n this._parsedXML = parseXML(svg);\n }\n GeoSVGResource.prototype.load = function /* nameMap: NameMap */\n () {\n // In the \"load\" stage, graphic need to be built to\n // get boundingRect for geo coordinate system.\n var firstGraphic = this._firstGraphic;\n // Create the return data structure only when first graphic created.\n // Because they will be used in geo coordinate system update stage,\n // and `regions` will be mounted at `geo` coordinate system,\n // in which there is no \"view\" info, so that it should better not to\n // make references to graphic elements.\n if (!firstGraphic) {\n firstGraphic = this._firstGraphic = this._buildGraphic(this._parsedXML);\n this._freedGraphics.push(firstGraphic);\n this._boundingRect = this._firstGraphic.boundingRect.clone();\n // PENDING: `nameMap` will not be supported until some real requirement come.\n // if (nameMap) {\n // named = applyNameMap(named, nameMap);\n // }\n var _a = createRegions(firstGraphic.named),\n regions = _a.regions,\n regionsMap = _a.regionsMap;\n this._regions = regions;\n this._regionsMap = regionsMap;\n }\n return {\n boundingRect: this._boundingRect,\n regions: this._regions,\n regionsMap: this._regionsMap\n };\n };\n GeoSVGResource.prototype._buildGraphic = function (svgXML) {\n var result;\n var rootFromParse;\n try {\n result = svgXML && parseSVG(svgXML, {\n ignoreViewBox: true,\n ignoreRootClip: true\n }) || {};\n rootFromParse = result.root;\n assert(rootFromParse != null);\n } catch (e) {\n throw new Error('Invalid svg format\\n' + e.message);\n }\n // Note: we keep the covenant that the root has no transform. So always add an extra root.\n var root = new Group();\n root.add(rootFromParse);\n root.isGeoSVGGraphicRoot = true;\n // [THE_RULE_OF_VIEWPORT_AND_VIEWBOX]\n //\n // Consider: `<svg width=\"...\" height=\"...\" viewBox=\"...\">`\n // - the `width/height` we call it `svgWidth/svgHeight` for short.\n // - `(0, 0, svgWidth, svgHeight)` defines the viewport of the SVG, or say,\n // \"viewport boundingRect\", or `boundingRect` for short.\n // - `viewBox` defines the transform from the real content ot the viewport.\n // `viewBox` has the same unit as the content of SVG.\n // If `viewBox` exists, a transform is defined, so the unit of `svgWidth/svgHeight` become\n // different from the content of SVG. Otherwise, they are the same.\n //\n // If both `svgWidth/svgHeight/viewBox` are specified in a SVG file, the transform rule will be:\n // 0. `boundingRect` is `(0, 0, svgWidth, svgHeight)`. Set it to Geo['_rect'] (View['_rect']).\n // 1. Make a transform from `viewBox` to `boundingRect`.\n // Note: only support `preserveAspectRatio 'xMidYMid'` here. That is, this transform will preserve\n // the aspect ratio.\n // 2. Make a transform from boundingRect to Geo['_viewRect'] (View['_viewRect'])\n // (`Geo`/`View` will do this job).\n // Note: this transform might not preserve aspect radio, which depending on how users specify\n // viewRect in echarts option (e.g., `geo.left/top/width/height` will not preserve aspect ratio,\n // but `geo.layoutCenter/layoutSize` will preserve aspect ratio).\n //\n // If `svgWidth/svgHeight` not specified, we use `viewBox` as the `boundingRect` to make the SVG\n // layout look good.\n //\n // If neither `svgWidth/svgHeight` nor `viewBox` are not specified, we calculate the boundingRect\n // of the SVG content and use them to make SVG layout look good.\n var svgWidth = result.width;\n var svgHeight = result.height;\n var viewBoxRect = result.viewBoxRect;\n var boundingRect = this._boundingRect;\n if (!boundingRect) {\n var bRectX = void 0;\n var bRectY = void 0;\n var bRectWidth = void 0;\n var bRectHeight = void 0;\n if (svgWidth != null) {\n bRectX = 0;\n bRectWidth = svgWidth;\n } else if (viewBoxRect) {\n bRectX = viewBoxRect.x;\n bRectWidth = viewBoxRect.width;\n }\n if (svgHeight != null) {\n bRectY = 0;\n bRectHeight = svgHeight;\n } else if (viewBoxRect) {\n bRectY = viewBoxRect.y;\n bRectHeight = viewBoxRect.height;\n }\n // If both viewBox and svgWidth/svgHeight not specified,\n // we have to determine how to layout those element to make them look good.\n if (bRectX == null || bRectY == null) {\n var calculatedBoundingRect = rootFromParse.getBoundingRect();\n if (bRectX == null) {\n bRectX = calculatedBoundingRect.x;\n bRectWidth = calculatedBoundingRect.width;\n }\n if (bRectY == null) {\n bRectY = calculatedBoundingRect.y;\n bRectHeight = calculatedBoundingRect.height;\n }\n }\n boundingRect = this._boundingRect = new BoundingRect(bRectX, bRectY, bRectWidth, bRectHeight);\n }\n if (viewBoxRect) {\n var viewBoxTransform = makeViewBoxTransform(viewBoxRect, boundingRect);\n // Only support `preserveAspectRatio 'xMidYMid'`\n rootFromParse.scaleX = rootFromParse.scaleY = viewBoxTransform.scale;\n rootFromParse.x = viewBoxTransform.x;\n rootFromParse.y = viewBoxTransform.y;\n }\n // SVG needs to clip based on `viewBox`. And some SVG files really rely on this feature.\n // They do not strictly confine all of the content inside a display rect, but deliberately\n // use a `viewBox` to define a displayable rect.\n // PENDING:\n // The drawback of the `setClipPath` here is: the region label (genereted by echarts) near the\n // edge might also be clipped, because region labels are put as `textContent` of the SVG path.\n root.setClipPath(new Rect({\n shape: boundingRect.plain()\n }));\n var named = [];\n each(result.named, function (namedItem) {\n if (REGION_AVAILABLE_SVG_TAG_MAP.get(namedItem.svgNodeTagLower) != null) {\n named.push(namedItem);\n setSilent(namedItem.el);\n }\n });\n return {\n root: root,\n boundingRect: boundingRect,\n named: named\n };\n };\n /**\n * Consider:\n * (1) One graphic element can not be shared by different `geoView` running simultaneously.\n * Notice, also need to consider multiple echarts instances share a `mapRecord`.\n * (2) Converting SVG to graphic elements is time consuming.\n * (3) In the current architecture, `load` should be called frequently to get boundingRect,\n * and it is called without view info.\n * So we maintain graphic elements in this module, and enables `view` to use/return these\n * graphics from/to the pool with it's uid.\n */\n GeoSVGResource.prototype.useGraphic = function (hostKey /* , nameMap: NameMap */) {\n var usedRootMap = this._usedGraphicMap;\n var svgGraphic = usedRootMap.get(hostKey);\n if (svgGraphic) {\n return svgGraphic;\n }\n svgGraphic = this._freedGraphics.pop()\n // use the first boundingRect to avoid duplicated boundingRect calculation.\n || this._buildGraphic(this._parsedXML);\n usedRootMap.set(hostKey, svgGraphic);\n // PENDING: `nameMap` will not be supported until some real requirement come.\n // `nameMap` can only be obtained from echarts option.\n // The original `named` must not be modified.\n // if (nameMap) {\n // svgGraphic = extend({}, svgGraphic);\n // svgGraphic.named = applyNameMap(svgGraphic.named, nameMap);\n // }\n return svgGraphic;\n };\n GeoSVGResource.prototype.freeGraphic = function (hostKey) {\n var usedRootMap = this._usedGraphicMap;\n var svgGraphic = usedRootMap.get(hostKey);\n if (svgGraphic) {\n usedRootMap.removeKey(hostKey);\n this._freedGraphics.push(svgGraphic);\n }\n };\n return GeoSVGResource;\n}();\nexport { GeoSVGResource };\nfunction setSilent(el) {\n // Only named element has silent: false, other elements should\n // act as background and has no user interaction.\n el.silent = false;\n // text|tspan will be converted to group.\n if (el.isGroup) {\n el.traverse(function (child) {\n child.silent = false;\n });\n }\n}\nfunction createRegions(named) {\n var regions = [];\n var regionsMap = createHashMap();\n // Create resions only for the first graphic.\n each(named, function (namedItem) {\n // Region has feature to calculate center for tooltip or other features.\n // If there is a <g name=\"xxx\">, the center should be the center of the\n // bounding rect of the g.\n if (namedItem.namedFrom != null) {\n return;\n }\n var region = new GeoSVGRegion(namedItem.name, namedItem.el);\n // PENDING: if `nameMap` supported, this region can not be mounted on\n // `this`, but can only be created each time `load()` called.\n regions.push(region);\n // PENDING: if multiple tag named with the same name, only one will be\n // found by `_regionsMap`. `_regionsMap` is used to find a coordinate\n // by name. We use `region.getCenter()` as the coordinate.\n regionsMap.set(namedItem.name, region);\n });\n return {\n regions: regions,\n regionsMap: regionsMap\n };\n}\n// PENDING: `nameMap` will not be supported until some real requirement come.\n// /**\n// * Use the alias in geoNameMap.\n// * The input `named` must not be modified.\n// */\n// function applyNameMap(\n// named: GeoSVGGraphicRecord['named'],\n// nameMap: NameMap\n// ): GeoSVGGraphicRecord['named'] {\n// const result = [] as GeoSVGGraphicRecord['named'];\n// for (let i = 0; i < named.length; i++) {\n// let regionGraphic = named[i];\n// const name = regionGraphic.name;\n// if (nameMap && nameMap.hasOwnProperty(name)) {\n// regionGraphic = extend({}, regionGraphic);\n// regionGraphic.name = name;\n// }\n// result.push(regionGraphic);\n// }\n// return result;\n// }", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Fix for 南海诸岛\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { GeoJSONRegion } from '../Region.js';\nvar geoCoord = [126, 25];\nvar nanhaiName = '南海诸岛';\nvar points = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, 0.7], [52, 0.7], [56, 7.7], [59, 0.7], [64, 0.7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]];\nfor (var i = 0; i < points.length; i++) {\n for (var k = 0; k < points[i].length; k++) {\n points[i][k][0] /= 10.5;\n points[i][k][1] /= -10.5 / 0.75;\n points[i][k][0] += geoCoord[0];\n points[i][k][1] += geoCoord[1];\n }\n}\nexport default function fixNanhai(mapType, regions) {\n if (mapType === 'china') {\n for (var i = 0; i < regions.length; i++) {\n // Already exists.\n if (regions[i].name === nanhaiName) {\n return;\n }\n }\n regions.push(new GeoJSONRegion(nanhaiName, zrUtil.map(points, function (exterior) {\n return {\n type: 'polygon',\n exterior: exterior\n };\n }), geoCoord));\n }\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar coordsOffsetMap = {\n '南海诸岛': [32, 80],\n // 全国\n '广东': [0, -10],\n '香港': [10, 5],\n '澳门': [-10, 10],\n // '北京': [-10, 0],\n '天津': [5, 5]\n};\nexport default function fixTextCoords(mapType, region) {\n if (mapType === 'china') {\n var coordFix = coordsOffsetMap[region.name];\n if (coordFix) {\n var cp = region.getCenter();\n cp[0] += coordFix[0] / 10.5;\n cp[1] += -coordFix[1] / (10.5 / 0.75);\n region.setCenter(cp);\n }\n }\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Fix for 钓鱼岛\n// let Region = require('../Region');\n// let zrUtil = require('zrender/lib/core/util');\n// let geoCoord = [126, 25];\nvar points = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];\nexport default function fixDiaoyuIsland(mapType, region) {\n if (mapType === 'china' && region.name === '台湾') {\n region.geometries.push({\n type: 'polygon',\n exterior: points[0]\n });\n }\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, isString, createHashMap, hasOwn } from 'zrender/lib/core/util.js';\nimport parseGeoJson from './parseGeoJson.js';\n// Built-in GEO fixer.\nimport fixNanhai from './fix/nanhai.js';\nimport fixTextCoord from './fix/textCoord.js';\nimport fixDiaoyuIsland from './fix/diaoyuIsland.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nvar DEFAULT_NAME_PROPERTY = 'name';\nvar GeoJSONResource = /** @class */function () {\n function GeoJSONResource(mapName, geoJSON, specialAreas) {\n this.type = 'geoJSON';\n this._parsedMap = createHashMap();\n this._mapName = mapName;\n this._specialAreas = specialAreas;\n // PENDING: delay the parse to the first usage to rapid up the FMP?\n this._geoJSON = parseInput(geoJSON);\n }\n /**\n * @param nameMap can be null/undefined\n * @param nameProperty can be null/undefined\n */\n GeoJSONResource.prototype.load = function (nameMap, nameProperty) {\n nameProperty = nameProperty || DEFAULT_NAME_PROPERTY;\n var parsed = this._parsedMap.get(nameProperty);\n if (!parsed) {\n var rawRegions = this._parseToRegions(nameProperty);\n parsed = this._parsedMap.set(nameProperty, {\n regions: rawRegions,\n boundingRect: calculateBoundingRect(rawRegions)\n });\n }\n var regionsMap = createHashMap();\n var finalRegions = [];\n each(parsed.regions, function (region) {\n var regionName = region.name;\n // Try use the alias in geoNameMap\n if (nameMap && hasOwn(nameMap, regionName)) {\n region = region.cloneShallow(regionName = nameMap[regionName]);\n }\n finalRegions.push(region);\n regionsMap.set(regionName, region);\n });\n return {\n regions: finalRegions,\n boundingRect: parsed.boundingRect || new BoundingRect(0, 0, 0, 0),\n regionsMap: regionsMap\n };\n };\n GeoJSONResource.prototype._parseToRegions = function (nameProperty) {\n var mapName = this._mapName;\n var geoJSON = this._geoJSON;\n var rawRegions;\n // https://jsperf.com/try-catch-performance-overhead\n try {\n rawRegions = geoJSON ? parseGeoJson(geoJSON, nameProperty) : [];\n } catch (e) {\n throw new Error('Invalid geoJson format\\n' + e.message);\n }\n fixNanhai(mapName, rawRegions);\n each(rawRegions, function (region) {\n var regionName = region.name;\n fixTextCoord(mapName, region);\n fixDiaoyuIsland(mapName, region);\n // Some area like Alaska in USA map needs to be tansformed\n // to look better\n var specialArea = this._specialAreas && this._specialAreas[regionName];\n if (specialArea) {\n region.transformTo(specialArea.left, specialArea.top, specialArea.width, specialArea.height);\n }\n }, this);\n return rawRegions;\n };\n /**\n * Only for exporting to users.\n * **MUST NOT** used internally.\n */\n GeoJSONResource.prototype.getMapForUser = function () {\n return {\n // For backward compatibility, use geoJson\n // PENDING: it has been returning them without clone.\n // do we need to avoid outsite modification?\n geoJson: this._geoJSON,\n geoJSON: this._geoJSON,\n specialAreas: this._specialAreas\n };\n };\n return GeoJSONResource;\n}();\nexport { GeoJSONResource };\nfunction calculateBoundingRect(regions) {\n var rect;\n for (var i = 0; i < regions.length; i++) {\n var regionRect = regions[i].getBoundingRect();\n rect = rect || regionRect.clone();\n rect.union(regionRect);\n }\n return rect;\n}\nfunction parseInput(source) {\n return !isString(source) ? source : typeof JSON !== 'undefined' && JSON.parse ? JSON.parse(source) : new Function('return (' + source + ');')();\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createHashMap } from 'zrender/lib/core/util.js';\nimport { GeoSVGResource } from './GeoSVGResource.js';\nimport { GeoJSONResource } from './GeoJSONResource.js';\nvar storage = createHashMap();\nexport default {\n /**\n * Compatible with previous `echarts.registerMap`.\n *\n * @usage\n * ```js\n *\n * echarts.registerMap('USA', geoJson, specialAreas);\n *\n * echarts.registerMap('USA', {\n * geoJson: geoJson,\n * specialAreas: {...}\n * });\n * echarts.registerMap('USA', {\n * geoJSON: geoJson,\n * specialAreas: {...}\n * });\n *\n * echarts.registerMap('airport', {\n * svg: svg\n * }\n * ```\n *\n * Note:\n * Do not support that register multiple geoJSON or SVG\n * one map name. Because different geoJSON and SVG have\n * different unit. It's not easy to make sure how those\n * units are mapping/normalize.\n * If intending to use multiple geoJSON or SVG, we can\n * use multiple geo coordinate system.\n */\n registerMap: function (mapName, rawDef, rawSpecialAreas) {\n if (rawDef.svg) {\n var resource = new GeoSVGResource(mapName, rawDef.svg);\n storage.set(mapName, resource);\n } else {\n // Recommend:\n // echarts.registerMap('eu', { geoJSON: xxx, specialAreas: xxx });\n // Backward compatibility:\n // echarts.registerMap('eu', geoJSON, specialAreas);\n // echarts.registerMap('eu', { geoJson: xxx, specialAreas: xxx });\n var geoJSON = rawDef.geoJson || rawDef.geoJSON;\n if (geoJSON && !rawDef.features) {\n rawSpecialAreas = rawDef.specialAreas;\n } else {\n geoJSON = rawDef;\n }\n var resource = new GeoJSONResource(mapName, geoJSON, rawSpecialAreas);\n storage.set(mapName, resource);\n }\n },\n getGeoResource: function (mapName) {\n return storage.get(mapName);\n },\n /**\n * Only for exporting to users.\n * **MUST NOT** used internally.\n */\n getMapForUser: function (mapName) {\n var resource = storage.get(mapName);\n // Do not support return SVG until some real requirement come.\n return resource && resource.type === 'geoJSON' && resource.getMapForUser();\n },\n load: function (mapName, nameMap, nameProperty) {\n var resource = storage.get(mapName);\n if (!resource) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Map ' + mapName + ' not exists. The GeoJSON of the map must be provided.');\n }\n return;\n }\n return resource.load(nameMap, nameProperty);\n }\n};", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport View, { useLegacyViewCoordSysCenterBase, viewCoordSysCopyViewRect, viewCoordSysSetBoundingRect } from '../View.js';\nimport geoSourceManager from './geoSourceManager.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nimport { warn } from '../../util/log.js';\nimport Transformable from 'zrender/lib/core/Transformable.js';\nvar GEO_DEFAULT_PARAMS = {\n 'geoJSON': {\n aspectScale: 0.75,\n invertLongitute: true\n },\n 'geoSVG': {\n aspectScale: 1,\n invertLongitute: false\n }\n};\nexport var geo2DDimensions = ['lng', 'lat'];\nvar Geo = /** @class */function (_super) {\n __extends(Geo, _super); // See VIEW_COORD_SYS_TRANS_OVERALL_BACKWARD_COMPATIBILITY\n function Geo(name, map, opt) {\n var _this = _super.call(this) || this;\n _this.dimensions = geo2DDimensions;\n _this.type = 'geo';\n // Only store specified name coord via `addGeoCoord`.\n _this._nameCoordMap = zrUtil.createHashMap();\n _this.name = name;\n var projection = opt.projection;\n var source = geoSourceManager.load(map, opt.nameMap, opt.nameProperty);\n var resource = geoSourceManager.getGeoResource(map);\n var resourceType = _this.resourceType = resource ? resource.type : null;\n var regions = _this.regions = source.regions;\n var defaultParams = GEO_DEFAULT_PARAMS[resource.type];\n _this._clip = opt.clip;\n // Not invert longitude if projection exits.\n var invertLongitute = projection ? false : defaultParams.invertLongitute;\n _this.view = new View(invertLongitute, useLegacyViewCoordSysCenterBase(opt.ecModel, opt.api), _this);\n _this.map = map;\n _this._regionsMap = source.regionsMap;\n _this.regions = source.regions;\n if (process.env.NODE_ENV !== 'production' && projection) {\n // Do some check\n if (resourceType === 'geoSVG') {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Map \" + map + \" with SVG source can't use projection. Only GeoJSON source supports projection.\");\n }\n projection = null;\n }\n if (!(projection.project && projection.unproject)) {\n if (process.env.NODE_ENV !== 'production') {\n warn('project and unproject must be both provided in the projeciton.');\n }\n projection = null;\n }\n }\n _this.projection = projection;\n var boundingRect;\n if (projection) {\n // Can't reuse the raw bounding rect\n for (var i = 0; i < regions.length; i++) {\n var regionRect = regions[i].getBoundingRect(projection);\n boundingRect = boundingRect || regionRect.clone();\n boundingRect.union(regionRect);\n }\n } else {\n boundingRect = source.boundingRect;\n }\n viewCoordSysSetBoundingRect(_this.view, boundingRect.x, boundingRect.y, boundingRect.width, boundingRect.height);\n // aspectScale and invertLongitute actually is the parameters default raw projection.\n // So we ignore them if projection is given.\n // Ignore default aspect scale if projection exits.\n _this.aspectScale = projection ? 1 : zrUtil.retrieve2(opt.aspectScale, defaultParams.aspectScale);\n return _this;\n }\n Geo.prototype.getRegion = function (name) {\n return this._regionsMap.get(name);\n };\n Geo.prototype.getRegionByCoord = function (coord) {\n var regions = this.regions;\n for (var i = 0; i < regions.length; i++) {\n var region = regions[i];\n if (region.type === 'geoJSON' && region.contain(coord)) {\n return regions[i];\n }\n }\n };\n /**\n * Add geoCoord for indexing by name\n */\n Geo.prototype.addGeoCoord = function (name, geoCoord) {\n this._nameCoordMap.set(name, geoCoord);\n };\n /**\n * Get geoCoord by name\n */\n Geo.prototype.getGeoCoord = function (name) {\n var region = this._regionsMap.get(name);\n // Calculate center only on demand.\n return this._nameCoordMap.get(name) || region && region.getCenter();\n };\n Geo.prototype.dataToPoint = function (data, noRoam, out) {\n if (zrUtil.isString(data)) {\n // Map area name to geoCoord\n data = this.getGeoCoord(data);\n }\n if (data) {\n var projection = this.projection;\n if (projection) {\n // projection may return null point.\n data = projection.project(data);\n }\n return data && this.view.dataToPoint(data, noRoam, out);\n }\n };\n Geo.prototype.pointToData = function (point, reserved, out) {\n var projection = this.projection;\n if (projection) {\n // projection may return null point.\n point = projection.unproject(point);\n }\n // FIXME: if no `point`, should return [NaN, NaN], rather than undefined.\n // null/undefined has special meaning in `convertFromPixel`.\n return point && this.view.pointToData(point, out);\n };\n Geo.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.dataToPoint(value) : null;\n };\n Geo.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.pointToData(pixel) : null;\n };\n Geo.prototype.containPoint = function (point) {\n return this.view.containPoint(point);\n };\n Geo.prototype.getArea = function (tolerance) {\n tolerance = tolerance || 0;\n var rect = viewCoordSysCopyViewRect(null, this.view);\n rect.x -= tolerance;\n rect.y -= tolerance;\n rect.width += 2 * tolerance;\n rect.height += 2 * tolerance;\n return rect;\n };\n Geo.prototype.shouldClip = function () {\n return this._clip;\n };\n /**\n * @implements CoordinateSystem['getBoundingRect']\n */\n Geo.prototype.getBoundingRect = function () {\n return this.view.getBoundingRect();\n };\n /**\n * @implements CoordinateSystem['getViewRect']\n */\n Geo.prototype.getViewRect = function () {\n return this.view.getViewRect();\n };\n /**\n * @implements CoordinateSystem['getRoamTransform']\n */\n Geo.prototype.getRoamTransform = function () {\n return this.view.getRoamTransform();\n };\n return Geo;\n}(Transformable // See VIEW_COORD_SYS_TRANS_OVERALL_BACKWARD_COMPATIBILITY\n);\n;\nfunction getCoordSys(finder) {\n var geoModel = finder.geoModel;\n var seriesModel = finder.seriesModel;\n return geoModel ? geoModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem // For map series.\n || (seriesModel.getReferringComponents('geo', SINGLE_REFERRING).models[0] || {}).coordinateSystem : null;\n}\nexport default Geo;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport prepareSeriesDataSchema from '../../data/helper/createDimensions.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport { extend, isArray } from 'zrender/lib/core/util.js';\n/**\n * [Usage]:\n * (1)\n * createListSimply(seriesModel, ['value']);\n * (2)\n * createListSimply(seriesModel, {\n * coordDimensions: ['value'],\n * dimensionsCount: 5\n * });\n */\nexport default function createSeriesDataSimply(seriesModel, opt, nameList) {\n opt = isArray(opt) && {\n coordDimensions: opt\n } || extend({\n encodeDefine: seriesModel.getEncode()\n }, opt);\n var source = seriesModel.getSource();\n var dimensions = prepareSeriesDataSchema(source, opt).dimensions;\n var list = new SeriesData(dimensions, seriesModel);\n list.initData(source, nameList);\n return list;\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport createSeriesDataSimply from '../helper/createSeriesDataSimply.js';\nimport SeriesModel from '../../model/Series.js';\nimport geoSourceManager from '../../coord/geo/geoSourceManager.js';\nimport { makeSeriesEncodeForNameBased } from '../../data/helper/sourceHelper.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { COORD_SYS_USAGE_KIND_BOX, decideCoordSysUsageKind } from '../../core/CoordinateSystem.js';\nimport tokens from '../../visual/tokens.js';\nexport var SERIES_TYPE_MAP = 'map';\nvar MapSeries = /** @class */function (_super) {\n __extends(MapSeries, _super);\n function MapSeries() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MapSeries.type;\n _this.getTooltipPosition = function (dataIndex) {\n if (dataIndex != null) {\n var name_1 = this.getData().getName(dataIndex);\n var geo = this.coordinateSystem;\n var region = geo.getRegion(name_1);\n return region && geo.dataToPoint(region.getCenter());\n }\n };\n return _this;\n }\n MapSeries.prototype.getInitialData = function (option) {\n var data = createSeriesDataSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n var dataNameIndexMap = zrUtil.createHashMap();\n var toAppendItems = [];\n for (var i = 0, len = data.count(); i < len; i++) {\n var name_2 = data.getName(i);\n dataNameIndexMap.set(name_2, i);\n }\n var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);\n zrUtil.each(geoSource.regions, function (region) {\n var name = region.name;\n var dataNameIdx = dataNameIndexMap.get(name);\n // apply specified echarts style in GeoJSON data\n var specifiedGeoJSONRegionStyle = region.properties && region.properties.echartsStyle;\n var dataItem;\n if (dataNameIdx == null) {\n dataItem = {\n name: name\n };\n toAppendItems.push(dataItem);\n } else {\n dataItem = data.getRawDataItem(dataNameIdx);\n }\n specifiedGeoJSONRegionStyle && zrUtil.merge(dataItem, specifiedGeoJSONRegionStyle);\n });\n // Complete data with missing regions. The consequent processes (like visual\n // map and render) can not be performed without a \"full data\". For example,\n // find `dataIndex` by name.\n data.appendData(toAppendItems);\n return data;\n };\n /**\n * If no host geo model, return null, which means using a\n * inner exclusive geo model.\n */\n MapSeries.prototype.getHostGeoModel = function () {\n if (decideCoordSysUsageKind(this).kind === COORD_SYS_USAGE_KIND_BOX) {\n // Always use an internal geo if specify as `COORD_SYS_USAGE_KIND_BOX`.\n // Notice that currently we do not support laying out a geo based on\n // another geo, but preserve the possibility.\n return;\n }\n return this.getReferringComponents('geo', {\n useDefault: false,\n enableAll: false,\n enableNone: false\n }).models[0];\n };\n MapSeries.prototype.getMapType = function () {\n return (this.getHostGeoModel() || this).option.map;\n };\n // _fillOption(option, mapName) {\n // Shallow clone\n // option = zrUtil.extend({}, option);\n // option.data = geoCreator.getFilledRegions(option.data, mapName, option.nameMap);\n // return option;\n // }\n MapSeries.prototype.getRawValue = function (dataIndex) {\n // Use value stored in data instead because it is calculated from multiple series\n // FIXME Provide all value of multiple series ?\n var data = this.getData();\n return data.get(data.mapDimension('value'), dataIndex);\n };\n /**\n * Get model of region\n */\n MapSeries.prototype.getRegionModel = function (regionName) {\n var data = this.getData();\n return data.getItemModel(data.indexOfName(regionName));\n };\n /**\n * Map tooltip formatter\n */\n MapSeries.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n // FIXME originalData and data is a bit confusing\n var data = this.getData();\n var value = this.getRawValue(dataIndex);\n var name = data.getName(dataIndex);\n var seriesNames = [];\n zrUtil.each(this.seriesGroup.f, function (mapSeries) {\n var otherIndex = mapSeries.originalData.indexOfName(name);\n var valueDim = data.mapDimension('value');\n if (!isNaN(mapSeries.originalData.get(valueDim, otherIndex))) {\n seriesNames.push(mapSeries.name);\n }\n });\n return createTooltipMarkup('section', {\n header: seriesNames.join(', '),\n noHeader: !seriesNames.length,\n blocks: [createTooltipMarkup('nameValue', {\n name: name,\n value: value\n })]\n });\n };\n MapSeries.prototype.getLegendIcon = function (opt) {\n var iconType = opt.icon || 'roundRect';\n var icon = createSymbol(iconType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill);\n icon.setStyle(opt.itemStyle);\n // Map do not use itemStyle.borderWidth as border width\n icon.style.stroke = 'none';\n // No rotation because no series visual symbol for map\n if (iconType.indexOf('empty') > -1) {\n icon.style.stroke = icon.style.fill;\n icon.style.fill = tokens.color.neutral00;\n icon.style.lineWidth = 2;\n }\n return icon;\n };\n MapSeries.prototype.__ownRoamView = function () {\n return mapSeriesNeedsDrawMap(this) ? this.coordinateSystem.view : null;\n };\n MapSeries.type = 'series.' + SERIES_TYPE_MAP;\n MapSeries.dependencies = ['geo'];\n MapSeries.layoutMode = 'box';\n MapSeries.defaultOption = {\n // 一级层叠\n // zlevel: 0,\n // 二级层叠\n z: 2,\n coordinateSystem: 'geo',\n // map should be explicitly specified since ec3.\n map: '',\n // If `geoIndex` is not specified, a exclusive geo will be\n // created. Otherwise use the specified geo component, and\n // `map` and `mapType` are ignored.\n // geoIndex: 0,\n // 'center' | 'left' | 'right' | 'x%' | {number}\n left: 'center',\n // 'center' | 'top' | 'bottom' | 'x%' | {number}\n top: 'center',\n // right\n // bottom\n // width:\n // height\n // Aspect is width / height. Inited to be geoJson bbox aspect\n // This parameter is used for scale this aspect\n // Default value:\n // for geoSVG source: 1,\n // for geoJSON source: 0.75.\n aspectScale: null,\n // Layout with center and size\n // If you want to put map in a fixed size box with right aspect ratio\n // This two properties may be more convenient.\n // layoutCenter: [50%, 50%]\n // layoutSize: 100\n showLegendSymbol: true,\n // Define left-top, right-bottom coords to control view\n // For example, [ [180, 90], [-180, -90] ],\n // higher priority than center and zoom\n boundingCoords: null,\n // Default on center of map\n center: null,\n zoom: 1,\n scaleLimit: null,\n selectedMode: true,\n label: {\n show: false,\n color: tokens.color.tertiary\n },\n // scaleLimit: null,\n itemStyle: {\n borderWidth: 0.5,\n borderColor: tokens.color.border,\n areaColor: tokens.color.background\n },\n emphasis: {\n label: {\n show: true,\n color: tokens.color.primary\n },\n itemStyle: {\n areaColor: tokens.color.highlight\n }\n },\n select: {\n label: {\n show: true,\n color: tokens.color.primary\n },\n itemStyle: {\n color: tokens.color.highlight\n }\n },\n nameProperty: 'name'\n };\n return MapSeries;\n}(SeriesModel);\n/**\n * Has exclusive geo, rahter than depends on a separate geo componet.\n */\nexport function mapSeriesGroupHasOwnGeo(groupKey) {\n return groupKey.indexOf('i') === 0;\n}\nexport function mapSeriesNeedsDrawMap(mapSeries) {\n // Within a MAP_SERIES_GROUP, only `mainSeries` has `needsDrawMap: true`.\n return getMainMapSeries(mapSeries.seriesGroup) === mapSeries && !mapSeries.getHostGeoModel();\n}\nexport function getMainMapSeries(mapSeriesGroup) {\n // The first series after filtering in a MAP_SERIES_GROUP.\n return mapSeriesGroup.f[0];\n}\n/**\n * @tutorial [MAP_SERIES_GROUP]\n * - For map series that reference external geo components (typically via `geoIndex` or `geoId` in ec option),\n * a map series group is all map series that reference to the same geo component.\n * - For other map series,\n * a map series group is all map series that use the same `map` in ec option.\n * NOTICE: series filtering (typically by legend) matters:\n * If this method is executed before series filtering, all series are included,\n * otherwise, series filtered out are excluded.\n * When legend disables the original first series, the original second series takes the responsibility\n * to render map (via its `MapDraw`).\n */\nexport function buildAllMapSeriesGroups(ecModel, beforeSeriesFiltering) {\n var allMapSeriesGroups = {};\n ecModel.eachRawSeriesByType(SERIES_TYPE_MAP, function (seriesModel) {\n var hostGeoModel = seriesModel.getHostGeoModel();\n var key = hostGeoModel ? 'o' + hostGeoModel.id : 'i' + seriesModel.getMapType();\n var group = allMapSeriesGroups[key] = allMapSeriesGroups[key] || {\n f: [],\n r: []\n };\n if (!ecModel.isSeriesFiltered(seriesModel) && !beforeSeriesFiltering) {\n group.f.push(seriesModel);\n }\n group.r.push(seriesModel);\n });\n return allMapSeriesGroups;\n}\nexport default MapSeries;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Geo, { geo2DDimensions } from './Geo.js';\nimport * as layout from '../../util/layout.js';\nimport * as numberUtil from '../../util/number.js';\nimport geoSourceManager from './geoSourceManager.js';\nimport { buildAllMapSeriesGroups, mapSeriesGroupHasOwnGeo, SERIES_TYPE_MAP } from '../../chart/map/MapSeries.js';\nimport * as vector from 'zrender/lib/core/vector.js';\nimport { injectCoordSysByOption } from '../../core/CoordinateSystem.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nimport { viewCoordSysSetBoundingRect, viewCoordSysSetRoamOptionFromModel, viewCoordSysSetViewRect } from '../View.js';\n/**\n * Resize method bound to the geo\n */\nfunction resizeGeo(geoModel, api) {\n var viewCoordSys = this.view;\n var boundingCoords = geoModel.get('boundingCoords');\n if (boundingCoords != null) {\n var leftTop_1 = boundingCoords[0];\n var rightBottom_1 = boundingCoords[1];\n if (!(isFinite(leftTop_1[0]) && isFinite(leftTop_1[1]) && isFinite(rightBottom_1[0]) && isFinite(rightBottom_1[1]))) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Invalid boundingCoords');\n }\n } else {\n // Sample around the lng/lat rect and use projection to calculate actual bounding rect.\n var projection_1 = this.projection;\n if (projection_1) {\n var xMin = leftTop_1[0];\n var yMin = leftTop_1[1];\n var xMax = rightBottom_1[0];\n var yMax = rightBottom_1[1];\n leftTop_1 = [Infinity, Infinity];\n rightBottom_1 = [-Infinity, -Infinity];\n // TODO better way?\n var sampleLine = function (x0, y0, x1, y1) {\n var dx = x1 - x0;\n var dy = y1 - y0;\n for (var i = 0; i <= 100; i++) {\n var p = i / 100;\n var pt = projection_1.project([x0 + dx * p, y0 + dy * p]);\n vector.min(leftTop_1, leftTop_1, pt);\n vector.max(rightBottom_1, rightBottom_1, pt);\n }\n };\n // Top\n sampleLine(xMin, yMin, xMax, yMin);\n // Right\n sampleLine(xMax, yMin, xMax, yMax);\n // Bottom\n sampleLine(xMax, yMax, xMin, yMax);\n // Left\n sampleLine(xMin, yMax, xMax, yMin);\n }\n viewCoordSysSetBoundingRect(viewCoordSys, leftTop_1[0], leftTop_1[1], rightBottom_1[0] - leftTop_1[0], rightBottom_1[1] - leftTop_1[1]);\n }\n }\n var rect = viewCoordSys.getBoundingRect();\n var centerOption = geoModel.get('layoutCenter');\n var sizeOption = geoModel.get('layoutSize');\n // Laying out geo on Cartesian works theoretically but not supported yet.\n // Currently, we only support to lay out on matrix/calendar.\n var refContainer = layout.createBoxLayoutReference(geoModel, api).refContainer;\n var aspect = rect.width / rect.height * this.aspectScale;\n var useCenterAndSize = false;\n var center;\n var size;\n if (centerOption && sizeOption) {\n center = [numberUtil.parsePercent(centerOption[0], refContainer.width) + refContainer.x, numberUtil.parsePercent(centerOption[1], refContainer.height) + refContainer.y];\n size = numberUtil.parsePercent(sizeOption, Math.min(refContainer.width, refContainer.height));\n if (!isNaN(center[0]) && !isNaN(center[1]) && !isNaN(size)) {\n useCenterAndSize = true;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead.');\n }\n }\n }\n var viewRect;\n if (useCenterAndSize) {\n viewRect = {};\n if (aspect > 1) {\n // Width is same with size\n viewRect.width = size;\n viewRect.height = size / aspect;\n } else {\n viewRect.height = size;\n viewRect.width = size * aspect;\n }\n viewRect.y = center[1] - viewRect.height / 2;\n viewRect.x = center[0] - viewRect.width / 2;\n } else {\n // Use left/top/width/height\n var boxLayoutOption = geoModel.getBoxLayoutParams();\n boxLayoutOption.aspect = aspect;\n viewRect = layout.getLayoutRect(boxLayoutOption, refContainer);\n viewRect = layout.applyPreserveAspect(geoModel, viewRect, aspect);\n }\n viewCoordSysSetViewRect(viewCoordSys, viewRect.x, viewRect.y, viewRect.width, viewRect.height);\n viewCoordSysSetRoamOptionFromModel(viewCoordSys, geoModel);\n}\n// Back compat for ECharts2, where the coord map is set on map series:\n// {type: 'map', geoCoord: {'cityA': [116.46,39.92], 'cityA': [119.12,24.61]}},\nfunction setGeoCoords(geo, model) {\n zrUtil.each(model.get('geoCoord'), function (geoCoord, name) {\n geo.addGeoCoord(name, geoCoord);\n });\n}\nvar GeoCreator = /** @class */function () {\n function GeoCreator() {\n // For deciding which dimensions to use when creating list data\n this.dimensions = geo2DDimensions;\n }\n GeoCreator.prototype.create = function (ecModel, api) {\n var geoList = [];\n function getCommonGeoProperties(model) {\n return {\n nameProperty: model.get('nameProperty'),\n aspectScale: model.get('aspectScale'),\n projection: model.get('projection'),\n clip: model.getShallow('clip', true)\n };\n }\n // FIXME Create each time may be slow\n ecModel.eachComponent('geo', function (geoModel, idx) {\n var mapName = geoModel.get('map');\n var geo = new Geo(mapName + idx, mapName, zrUtil.extend({\n nameMap: geoModel.get('nameMap'),\n api: api,\n ecModel: ecModel\n }, getCommonGeoProperties(geoModel)));\n geoList.push(geo);\n // setGeoCoords(geo, geoModel);\n geoModel.coordinateSystem = geo;\n geo.model = geoModel;\n // Inject resize method\n geo.resize = resizeGeo;\n geo.resize(geoModel, api);\n });\n ecModel.eachSeries(function (seriesModel) {\n injectCoordSysByOption({\n targetModel: seriesModel,\n coordSysType: 'geo',\n coordSysProvider: function () {\n var geoModel = seriesModel.subType === SERIES_TYPE_MAP ? seriesModel.getHostGeoModel() : seriesModel.getReferringComponents('geo', SINGLE_REFERRING).models[0];\n return geoModel && geoModel.coordinateSystem;\n },\n allowNotFound: true\n });\n });\n // If has map series\n zrUtil.each(buildAllMapSeriesGroups(ecModel, true), function (mapSeriesGroup, groupKey) {\n if (!mapSeriesGroupHasOwnGeo(groupKey)) {\n return;\n }\n var firstDeclaredMapSeries = mapSeriesGroup.r[0];\n var nameMapList = [];\n zrUtil.each(mapSeriesGroup.r, function (mapSeries) {\n nameMapList.push(mapSeries.get('nameMap'));\n // MAP_SERIES_GROUP must not be set here, as series filtering is not performed.\n // Clear it first, including series to be filtered.\n mapSeries.seriesGroup = null;\n });\n var mapType = groupKey.slice(1);\n var geo = new Geo(mapType, mapType, zrUtil.extend({\n nameMap: zrUtil.mergeAll(nameMapList),\n api: api,\n ecModel: ecModel\n }, getCommonGeoProperties(firstDeclaredMapSeries)));\n var scaleLimit;\n zrUtil.each(mapSeriesGroup.r, function (mapSeries) {\n scaleLimit = zrUtil.retrieve2(scaleLimit, mapSeries.get('scaleLimit'));\n });\n geoList.push(geo);\n // Inject resize method\n geo.resize = resizeGeo;\n geo.resize(firstDeclaredMapSeries, api);\n zrUtil.each(mapSeriesGroup.r, function (mapSeries) {\n mapSeries.coordinateSystem = geo;\n setGeoCoords(geo, mapSeries);\n });\n });\n return geoList;\n };\n /**\n * Fill given regions array\n */\n GeoCreator.prototype.getFilledRegions = function (originRegionArr, mapName, nameMap, nameProperty) {\n // Not use the original\n var regionsArr = (originRegionArr || []).slice();\n var dataNameMap = zrUtil.createHashMap();\n for (var i = 0; i < regionsArr.length; i++) {\n dataNameMap.set(regionsArr[i].name, regionsArr[i]);\n }\n var source = geoSourceManager.load(mapName, nameMap, nameProperty);\n zrUtil.each(source.regions, function (region) {\n var name = region.name;\n var regionOption = dataNameMap.get(name);\n // apply specified echarts style in GeoJSON data\n var specifiedGeoJSONRegionStyle = region.properties && region.properties.echartsStyle;\n if (!regionOption) {\n regionOption = {\n name: name\n };\n regionsArr.push(regionOption);\n }\n specifiedGeoJSONRegionStyle && zrUtil.merge(regionOption, specifiedGeoJSONRegionStyle);\n });\n return regionsArr;\n };\n return GeoCreator;\n}();\nvar geoCreator = new GeoCreator();\nexport default geoCreator;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\nimport ComponentModel from '../../model/Component.js';\nimport Model from '../../model/Model.js';\nimport geoCreator from './geoCreator.js';\nimport geoSourceManager from './geoSourceManager.js';\nimport tokens from '../../visual/tokens.js';\n;\nvar GeoModel = /** @class */function (_super) {\n __extends(GeoModel, _super);\n function GeoModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GeoModel.type;\n return _this;\n }\n GeoModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n var source = geoSourceManager.getGeoResource(option.map);\n if (source && source.type === 'geoJSON') {\n var itemStyle = option.itemStyle = option.itemStyle || {};\n if (!('color' in itemStyle)) {\n itemStyle.color = option.defaultItemStyleColor || tokens.color.backgroundTint;\n }\n }\n // Default label emphasis `show`\n modelUtil.defaultEmphasis(option, 'label', ['show']);\n };\n GeoModel.prototype.optionUpdated = function () {\n var _this = this;\n var option = this.option;\n option.regions = geoCreator.getFilledRegions(option.regions, option.map, option.nameMap, option.nameProperty);\n var selectedMap = {};\n this._optionModelMap = zrUtil.reduce(option.regions || [], function (optionModelMap, regionOpt) {\n var regionName = regionOpt.name;\n if (regionName) {\n optionModelMap.set(regionName, new Model(regionOpt, _this, _this.ecModel));\n if (regionOpt.selected) {\n selectedMap[regionName] = true;\n }\n }\n return optionModelMap;\n }, zrUtil.createHashMap());\n if (!option.selectedMap) {\n option.selectedMap = selectedMap;\n }\n };\n /**\n * Get model of region.\n */\n GeoModel.prototype.getRegionModel = function (name) {\n return this._optionModelMap.get(name) || new Model(null, this, this.ecModel);\n };\n /**\n * Format label\n * @param name Region name\n */\n GeoModel.prototype.getFormattedLabel = function (name, status) {\n var regionModel = this.getRegionModel(name);\n var formatter = status === 'normal' ? regionModel.get(['label', 'formatter']) : regionModel.get(['emphasis', 'label', 'formatter']);\n var params = {\n name: name\n };\n if (zrUtil.isFunction(formatter)) {\n params.status = status;\n return formatter(params);\n } else if (zrUtil.isString(formatter)) {\n return formatter.replace('{a}', name != null ? name : '');\n }\n };\n // PENGING If selectedMode is null ?\n GeoModel.prototype.select = function (name) {\n var option = this.option;\n var selectedMode = option.selectedMode;\n if (!selectedMode) {\n return;\n }\n if (selectedMode !== 'multiple') {\n option.selectedMap = null;\n }\n var selectedMap = option.selectedMap || (option.selectedMap = {});\n selectedMap[name] = true;\n };\n GeoModel.prototype.unSelect = function (name) {\n var selectedMap = this.option.selectedMap;\n if (selectedMap) {\n selectedMap[name] = false;\n }\n };\n GeoModel.prototype.toggleSelected = function (name) {\n this[this.isSelected(name) ? 'unSelect' : 'select'](name);\n };\n GeoModel.prototype.isSelected = function (name) {\n var selectedMap = this.option.selectedMap;\n return !!(selectedMap && selectedMap[name]);\n };\n GeoModel.prototype.__ownRoamView = function () {\n return this.coordinateSystem.view;\n };\n GeoModel.type = 'geo';\n GeoModel.layoutMode = 'box';\n GeoModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n show: true,\n left: 'center',\n top: 'center',\n // Default value:\n // for geoSVG source: 1,\n // for geoJSON source: 0.75.\n aspectScale: null,\n // /// Layout with center and size\n // If you want to put map in a fixed size box with right aspect ratio\n // This two properties may be more convenient\n // layoutCenter: [50%, 50%]\n // layoutSize: 100\n silent: false,\n // Map type\n map: '',\n // Define left-top, right-bottom coords to control view\n // For example, [ [180, 90], [-180, -90] ]\n boundingCoords: null,\n // Default on center of map\n center: null,\n zoom: 1,\n scaleLimit: null,\n // selectedMode: false\n label: {\n show: false,\n color: tokens.color.tertiary\n },\n itemStyle: {\n borderWidth: 0.5,\n borderColor: tokens.color.border\n },\n emphasis: {\n label: {\n show: true,\n color: tokens.color.primary\n },\n itemStyle: {\n color: tokens.color.highlight\n }\n },\n select: {\n label: {\n show: true,\n color: tokens.color.primary\n },\n itemStyle: {\n color: tokens.color.highlight\n }\n },\n regions: []\n // tooltip: {\n // show: false\n // }\n };\n return GeoModel;\n}(ComponentModel);\nexport default GeoModel;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as echarts from '../../core/echarts.js';\nimport { noop } from 'zrender/lib/core/util.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nexport function take(zr, resourceKey, userKey) {\n inner(zr)[resourceKey] = userKey;\n}\nexport function release(zr, resourceKey, userKey) {\n var store = inner(zr);\n var uKey = store[resourceKey];\n if (uKey === userKey) {\n store[resourceKey] = null;\n }\n}\nexport function isTaken(zr, resourceKey) {\n return !!inner(zr)[resourceKey];\n}\n/**\n * payload: {\n * type: 'takeGlobalCursor',\n * key: 'dataZoomSelect', or 'brush', or ...,\n * If no userKey, release global cursor.\n * }\n */\n// TODO: SELF REGISTERED.\necharts.registerAction({\n type: 'takeGlobalCursor',\n event: 'globalCursorTaken',\n update: 'update'\n}, noop);", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { retrieveZInfo } from '../../util/graphic.js';\nvar IRRELEVANT_EXCLUDES = {\n 'axisPointer': 1,\n 'tooltip': 1,\n 'brush': 1\n};\n/**\n * Used on roam/brush triggering determination.\n * This is to avoid that: mouse clicking on an elements that is over geo or graph,\n * but roam is triggered unexpectedly.\n */\nexport function onIrrelevantElement(e, api, targetComponent) {\n var eventElComponent = api.getComponentByElement(e.topTarget);\n if (!eventElComponent || eventElComponent === targetComponent || IRRELEVANT_EXCLUDES.hasOwnProperty(eventElComponent.mainType)) {\n return false;\n }\n // At present the `true` return is conservative. That is, the caller, such as a RoamController,\n // is more likely to get a `false` return and start a roam behavior, becuase even if the\n // `model.coordinateSystem` does not exist, the `e.topTarget` may be also a relevant element,\n // such as axis split line/area or series elements, where roam should be available. Otherwise,\n // if a dataZoom-served cartesian is full of series elements, the dataZoom-roaming can hardly\n // be triggered.\n var eventElCoordSys = eventElComponent.coordinateSystem;\n // If eventElComponent is axisModel, it works only if it is injected with coordinateSystem.\n if (!eventElCoordSys || eventElCoordSys.model === targetComponent) {\n return false;\n }\n // e.g., if a cartesian is covered by a graph, the graph has a higher presedence in roam.\n // A potential bad case is that RoamController does not prevent the cartesian from handling zr\n // event, such as click and hovering, but it's fine so far.\n // Aslo be conservative, if equals, return false.\n var eventElCmptZInfo = retrieveZInfo(eventElComponent);\n var targetCmptZInfo = retrieveZInfo(targetComponent);\n if ((eventElCmptZInfo.zlevel - targetCmptZInfo.zlevel || eventElCmptZInfo.z - targetCmptZInfo.z) <= 0) {\n return false;\n }\n return true;\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Eventful from 'zrender/lib/core/Eventful.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport * as interactionMutex from './interactionMutex.js';\nimport { isString, bind, defaults, extend, retrieve2 } from 'zrender/lib/core/util.js';\nimport { makeInner } from '../../util/model.js';\nimport { retrieveZInfo } from '../../util/graphic.js';\nimport { onIrrelevantElement } from './cursorHelper.js';\n;\n/**\n * An manager of zoom and pan(darg) hehavior.\n * But it is not responsible for updating the view, since view updates vary and can\n * not be handled in a uniform way.\n *\n * Note: regarding view updates:\n * - Transformabe views typically use `coord/View` (e.g., geo and series.graph roaming).\n * Some commonly used view update logic has been organized into `roamHelper.ts`.\n * - Non-transformable views handle updates themselves, possibly involving re-layout,\n * (e.g., treemap).\n * - Some scenarios do not require transformation (e.g., dataZoom roaming for cartesian,\n * brush component).\n */\nvar RoamController = /** @class */function (_super) {\n __extends(RoamController, _super);\n function RoamController(zr) {\n var _this = _super.call(this) || this;\n _this._zr = zr;\n // Avoid two roamController bind the same handler\n var mousedownHandler = bind(_this._mousedownHandler, _this);\n var mousemoveHandler = bind(_this._mousemoveHandler, _this);\n var mouseupHandler = bind(_this._mouseupHandler, _this);\n var mousewheelHandler = bind(_this._mousewheelHandler, _this);\n var pinchHandler = bind(_this._pinchHandler, _this);\n /**\n * Notice:\n * - only enable needed types. For example, if 'zoom'\n * is not needed, 'zoom' should not be enabled, otherwise\n * default mousewheel behaviour (scroll page) will be disabled.\n * - This method is idempotent.\n */\n _this.enable = function (controlType, rawOpt) {\n var zInfo = rawOpt.zInfo;\n var _a = retrieveZInfo(zInfo.component),\n z = _a.z,\n zlevel = _a.zlevel;\n var zInfoParsed = {\n component: zInfo.component,\n z: z,\n zlevel: zlevel,\n // By default roam controller is the lowest z2 comparing to other elememts in a component.\n z2: retrieve2(zInfo.z2, -Infinity)\n };\n var triggerInfo = extend({}, rawOpt.triggerInfo);\n this._opt = defaults(extend({}, rawOpt), {\n zoomOnMouseWheel: true,\n moveOnMouseMove: true,\n // By default, wheel do not trigger move.\n moveOnMouseWheel: false,\n preventDefaultMouseMove: true,\n zInfoParsed: zInfoParsed,\n triggerInfo: triggerInfo,\n cursorGrab: 'grab',\n cursorGrabbing: 'grabbing'\n });\n if (controlType == null) {\n controlType = true;\n }\n // A quick optimization for repeatedly calling `enable` during roaming.\n // Assert `disable` is only affected by `controlType`.\n if (!this._enabled || this._controlType !== controlType) {\n // Disable previous first\n this.disable();\n this._enabled = true;\n if (controlType === true || controlType === 'move' || controlType === 'pan') {\n addRoamZrListener(zr, 'mousedown', mousedownHandler, zInfoParsed);\n addRoamZrListener(zr, 'mousemove', mousemoveHandler, zInfoParsed);\n addRoamZrListener(zr, 'mouseup', mouseupHandler, zInfoParsed);\n }\n if (controlType === true || controlType === 'scale' || controlType === 'zoom') {\n addRoamZrListener(zr, 'mousewheel', mousewheelHandler, zInfoParsed);\n addRoamZrListener(zr, 'pinch', pinchHandler, zInfoParsed);\n }\n }\n };\n _this.disable = function () {\n if (this._enabled) {\n this._enabled = false;\n removeRoamZrListener(zr, 'mousedown', mousedownHandler);\n removeRoamZrListener(zr, 'mousemove', mousemoveHandler);\n removeRoamZrListener(zr, 'mouseup', mouseupHandler);\n removeRoamZrListener(zr, 'mousewheel', mousewheelHandler);\n removeRoamZrListener(zr, 'pinch', pinchHandler);\n }\n };\n return _this;\n }\n RoamController.prototype.isDragging = function () {\n return this._dragging;\n };\n RoamController.prototype.isPinching = function () {\n return this._pinching;\n };\n RoamController.prototype._checkPointer = function (e, x, y) {\n var opt = this._opt;\n var zInfoParsed = opt.zInfoParsed;\n if (onIrrelevantElement(e, opt.api, zInfoParsed.component)) {\n return false;\n }\n ;\n var triggerInfo = opt.triggerInfo;\n var roamTrigger = triggerInfo.roamTrigger;\n var inArea = false;\n if (roamTrigger === 'global') {\n inArea = true;\n }\n if (!inArea) {\n inArea = triggerInfo.isInSelf(e, x, y);\n }\n if (inArea && triggerInfo.isInClip && !triggerInfo.isInClip(e, x, y)) {\n inArea = false;\n }\n return inArea;\n };\n RoamController.prototype._decideCursorStyle = function (e, x, y, forReverse) {\n // If this cursor style decision is not strictly consistent with zrender,\n // it's fine - zr will set the cursor on the next mousemove.\n // This `grab` cursor style should take the lowest precedence. If the hovring element already\n // have a cursor, zrender will set it to be non-'default' before entering this handler.\n // (note, e.target is never silent, e.topTarget can be silent be irrelevant.)\n var target = e.target;\n if (!target && this._checkPointer(e, x, y)) {\n // To indicate users that this area is draggable, otherwise users probably cannot kwown\n // that when hovering out of the shape but still inside the bounding rect.\n return this._opt.cursorGrab;\n }\n if (forReverse) {\n return target && target.cursor || 'default';\n }\n };\n RoamController.prototype.dispose = function () {\n this.disable();\n };\n RoamController.prototype._mousedownHandler = function (e) {\n if (eventTool.isMiddleOrRightButtonOnMouseUpDown(e) || eventConsumed(e)) {\n return;\n }\n var el = e.target;\n while (el) {\n if (el.draggable) {\n return;\n }\n // check if host is draggable\n el = el.__hostTarget || el.parent;\n }\n var x = e.offsetX;\n var y = e.offsetY;\n // To determine dragging start, only by checking on mosedown, but not mousemove.\n // Mouse can be out of target when mouse moving.\n if (this._checkPointer(e, x, y)) {\n this._x = x;\n this._y = y;\n this._dragging = true;\n }\n };\n RoamController.prototype._mousemoveHandler = function (e) {\n var zr = this._zr;\n if (e.gestureEvent === 'pinch' || interactionMutex.isTaken(zr, 'globalPan') || eventConsumed(e)) {\n return;\n }\n var x = e.offsetX;\n var y = e.offsetY;\n if (!this._dragging || !isAvailableBehavior('moveOnMouseMove', e, this._opt)) {\n var cursorStyle = this._decideCursorStyle(e, x, y, false);\n if (cursorStyle) {\n zr.setCursorStyle(cursorStyle);\n }\n return;\n }\n zr.setCursorStyle(this._opt.cursorGrabbing);\n var oldX = this._x;\n var oldY = this._y;\n var dx = x - oldX;\n var dy = y - oldY;\n this._x = x;\n this._y = y;\n if (this._opt.preventDefaultMouseMove) {\n eventTool.stop(e.event);\n }\n e.__ecRoamConsumed = true;\n trigger(this, 'pan', 'moveOnMouseMove', e, {\n dx: dx,\n dy: dy,\n oldX: oldX,\n oldY: oldY,\n newX: x,\n newY: y,\n isAvailableBehavior: null\n });\n };\n RoamController.prototype._mouseupHandler = function (e) {\n if (eventConsumed(e)) {\n return;\n }\n var zr = this._zr;\n if (!eventTool.isMiddleOrRightButtonOnMouseUpDown(e)) {\n this._dragging = false;\n var cursorStyle = this._decideCursorStyle(e, e.offsetX, e.offsetY, true);\n if (cursorStyle) {\n zr.setCursorStyle(cursorStyle);\n }\n }\n };\n RoamController.prototype._mousewheelHandler = function (e) {\n if (eventConsumed(e)) {\n return;\n }\n var shouldZoom = isAvailableBehavior('zoomOnMouseWheel', e, this._opt);\n var shouldMove = isAvailableBehavior('moveOnMouseWheel', e, this._opt);\n var wheelDelta = e.wheelDelta;\n var absWheelDeltaDelta = Math.abs(wheelDelta);\n var originX = e.offsetX;\n var originY = e.offsetY;\n // wheelDelta maybe -0 in chrome mac.\n if (wheelDelta === 0 || !shouldZoom && !shouldMove) {\n return;\n }\n // If both `shouldZoom` and `shouldMove` is true, trigger\n // their event both, and the final behavior is determined\n // by event listener themselves.\n if (shouldZoom) {\n // Convenience:\n // Mac and VM Windows on Mac: scroll up: zoom out.\n // Windows: scroll up: zoom in.\n // FIXME: Should do more test in different environment.\n // wheelDelta is too complicated in difference nvironment\n // (https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel),\n // although it has been normallized by zrender.\n // wheelDelta of mouse wheel is bigger than touch pad.\n var factor = absWheelDeltaDelta > 3 ? 1.4 : absWheelDeltaDelta > 1 ? 1.2 : 1.1;\n var scale = wheelDelta > 0 ? factor : 1 / factor;\n this._checkTriggerMoveZoom(this, 'zoom', 'zoomOnMouseWheel', e, {\n scale: scale,\n originX: originX,\n originY: originY,\n isAvailableBehavior: null\n });\n }\n if (shouldMove) {\n // FIXME: Should do more test in different environment.\n var absDelta = Math.abs(wheelDelta);\n // wheelDelta of mouse wheel is bigger than touch pad.\n var scrollDelta = (wheelDelta > 0 ? 1 : -1) * (absDelta > 3 ? 0.4 : absDelta > 1 ? 0.15 : 0.05);\n this._checkTriggerMoveZoom(this, 'scrollMove', 'moveOnMouseWheel', e, {\n scrollDelta: scrollDelta,\n originX: originX,\n originY: originY,\n isAvailableBehavior: null\n });\n }\n };\n RoamController.prototype._pinchHandler = function (e) {\n if (interactionMutex.isTaken(this._zr, 'globalPan') || eventConsumed(e)) {\n return;\n }\n var scale = e.pinchScale > 1 ? 1.1 : 1 / 1.1;\n this._checkTriggerMoveZoom(this, 'zoom', null, e, {\n scale: scale,\n originX: e.pinchX,\n originY: e.pinchY,\n isAvailableBehavior: null\n });\n };\n RoamController.prototype._checkTriggerMoveZoom = function (controller, eventName, behaviorToCheck, e, contollerEvent) {\n if (controller._checkPointer(e, contollerEvent.originX, contollerEvent.originY)) {\n // When mouse is out of roamController rect,\n // default befavoius should not be be disabled, otherwise\n // page sliding is disabled, contrary to expectation.\n eventTool.stop(e.event);\n e.__ecRoamConsumed = true;\n trigger(controller, eventName, behaviorToCheck, e, contollerEvent);\n }\n };\n return RoamController;\n}(Eventful);\nfunction eventConsumed(e) {\n return e.__ecRoamConsumed;\n}\nvar innerZrStore = makeInner();\nfunction ensureZrStore(zr) {\n var store = innerZrStore(zr);\n store.roam = store.roam || {};\n store.uniform = store.uniform || {};\n return store;\n}\n/**\n * Listeners are sorted by z2/z/zlevel in descending order.\n * This decides the precedence between different roam controllers if they are overlapped.\n *\n * [MEMO]: It's not easy to perfectly reconcile the conflicts caused by overlap.\n * - Consider cases:\n * - Multiple roam controllers overlapped.\n * - Usually only the topmost can trigger roam.\n * - Roam controllers overlap with other zr elements:\n * - zr elements are relevant or irrelevent to the host of the roam controller. e.g., axis split line\n * or series elements is relevant to a cartesian and should trigger roam.\n * - zr elements is above or below the roam controller host, which affects the precedence of interaction.\n * - zr elements may not silent only for triggering tooltip by hovering, which is available to roam;\n * or may not silent for click, where roam is not preferable.\n * - Approach - `addRoamZrListener+pointerChecker+onIrrelevantElement` (currently used):\n * - Resolve the precedence between different roam controllers\n * - But cannot prevent the handling on other zr elements that under the roam controller in z-order.\n * - Approach - \"use an invisible zr elements to receive the zr events to trigger roam\":\n * - More complicated in impl.\n * - May cause bad cases where zr event cannot be receive due to other non-silient zr elements covering it.\n */\nfunction addRoamZrListener(zr, eventType, listener, zInfoParsed) {\n var store = ensureZrStore(zr);\n var roam = store.roam;\n var listenerList = roam[eventType] = roam[eventType] || [];\n var idx = 0;\n for (; idx < listenerList.length; idx++) {\n var currZInfo = listenerList[idx].zInfoParsed;\n if ((currZInfo.zlevel - zInfoParsed.zlevel || currZInfo.z - zInfoParsed.z || currZInfo.z2 - zInfoParsed.z2\n // If all equals, the latter added one has a higher precedence.\n ) <= 0) {\n break;\n }\n }\n listenerList.splice(idx, 0, {\n listener: listener,\n zInfoParsed: zInfoParsed\n });\n ensureUniformListener(zr, eventType);\n}\nfunction removeRoamZrListener(zr, eventType, listener) {\n var store = ensureZrStore(zr);\n var listenerList = store.roam[eventType] || [];\n for (var idx = 0; idx < listenerList.length; idx++) {\n if (listenerList[idx].listener === listener) {\n listenerList.splice(idx, 1);\n if (!listenerList.length) {\n removeUniformListener(zr, eventType);\n }\n return;\n }\n }\n}\nfunction ensureUniformListener(zr, eventType) {\n var store = ensureZrStore(zr);\n if (!store.uniform[eventType]) {\n zr.on(eventType, store.uniform[eventType] = function (event) {\n var listenerList = store.roam[eventType];\n if (listenerList) {\n for (var i = 0; i < listenerList.length; i++) {\n listenerList[i].listener(event);\n }\n }\n });\n }\n}\nfunction removeUniformListener(zr, eventType) {\n var store = ensureZrStore(zr);\n var uniform = store.uniform;\n if (uniform[eventType]) {\n zr.off(eventType, uniform[eventType]);\n uniform[eventType] = null;\n }\n}\nfunction trigger(controller, eventName, behaviorToCheck, e, contollerEvent) {\n // Also provide behavior checker for event listener, for some case that\n // multiple components share one listener.\n contollerEvent.isAvailableBehavior = bind(isAvailableBehavior, null, behaviorToCheck, e);\n // TODO should not have type issue.\n controller.trigger(eventName, contollerEvent);\n}\n// settings: {\n// zoomOnMouseWheel\n// moveOnMouseMove\n// moveOnMouseWheel\n// }\n// The value can be: true / false / 'shift' / 'ctrl' / 'alt'.\nfunction isAvailableBehavior(behaviorToCheck, e, settings) {\n var setting = settings[behaviorToCheck];\n return !behaviorToCheck || setting && (!isString(setting) || e.event[setting + 'Key']);\n}\nexport default RoamController;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport View, { getOwnRoamViewCoordSys, ownRoamModelCoordSysUpdateInAction, ownRoamViewUpdateDirectlyInAction, viewCoordSysSetBoundingRect, viewCoordSysSetViewRect, useLegacyViewCoordSysCenterBase, viewCoordSysSetRoamOptionFromModel } from '../../coord/View.js';\nimport { COMPONENT_MAIN_TYPE_SERIES, ROAM_ACTION_TYPE_SUFFIX } from '../../util/types.js';\nimport { BoundingRect, payloadDisableAnimation } from '../../util/graphic.js';\nimport { makeQueryConditionKindA } from '../../util/model.js';\nimport { defaults, retrieve2 } from 'zrender/lib/core/util.js';\n/**\n * An abstraction for some similar impl in roaming.\n *\n * Require action like `registerRoamActionSimply`.\n */\nexport function updateRoamControllerSimply(componentOrSeries, api, controller,\n// Can use `createIsInSelfByPointerCheckerEl`\nisInSelf, clipRect, extraOnRoam, roamTypeDefault, geoBackwardCompat) {\n var coordSys = getOwnRoamViewCoordSys(componentOrSeries);\n if (!coordSys) {\n controller.disable();\n return;\n }\n controller.enable(\n // NOTE:\n // If roamTypeDefault is null/undefined, roamType will be set as true.\n // PENDING:\n // In MapSeries case, it has long been retrieving `roam` option from the first MapSeries\n // that are not filtered out by a legend. But that requires `roam: true` to be set in all\n // MapSeries option, otherwise if a legend hides the `roam: true` MapSeries, the map can\n // not be roamed unexpectedly.\n retrieve2(componentOrSeries.get('roam'), roamTypeDefault), {\n api: api,\n zInfo: {\n component: componentOrSeries\n },\n triggerInfo: {\n roamTrigger: componentOrSeries.get('roamTrigger'),\n isInSelf: isInSelf,\n isInClip: function (e, x, y) {\n return !clipRect || clipRect.contain(x, y);\n }\n }\n });\n function dispatchAction(extra) {\n var mainType = componentOrSeries.mainType;\n var payload = payloadDisableAnimation(defaults({\n type: makeViewCoordSysActionType(mainType, componentOrSeries.subType, ROAM_ACTION_TYPE_SUFFIX)\n }, extra));\n if (geoBackwardCompat) {\n payload.componentType = mainType;\n }\n // Like `seriesId`, `geoId`.\n payload[mainType + \"Id\"] = componentOrSeries.id;\n api.dispatchAction(payload);\n }\n controller.off('pan').off('zoom')\n // NOTICE: 'pan' and 'zoom' listener should do nothing except `api.dispatchAction`,\n // the rest logic should be performed in the action handler and `updateTransform`;\n // otherwise, it can cause inconsistency if users trigger this action explicitly.\n .on('pan', function (event) {\n extraOnRoam && extraOnRoam('pan');\n dispatchAction({\n dx: event.dx,\n dy: event.dy\n });\n }).on('zoom', function (event) {\n extraOnRoam && extraOnRoam('zoom');\n dispatchAction({\n zoom: event.scale,\n originX: event.originX,\n originY: event.originY\n });\n });\n}\nexport function createIsInSelfByPointerCheckerEl(pointerCheckerEl) {\n return function (e, x, y) {\n tmpRectCII.copy(pointerCheckerEl.getBoundingRect());\n tmpRectCII.applyTransform(pointerCheckerEl.getComputedTransform());\n return tmpRectCII.contain(x, y);\n };\n}\nvar tmpRectCII = new BoundingRect(0, 0, 0, 0);\nexport function registerRoamActionSimply(registers, mainType, subType) {\n var actionType = makeViewCoordSysActionType(mainType, subType, ROAM_ACTION_TYPE_SUFFIX);\n registers.registerAction({\n type: actionType,\n event: actionType,\n // If `mainType` is a coord sys, 'update:' should be 'updateTransform' to\n // broadcast the update. But currently there is no such case required.\n // If 'updateTransform' is used, the owner of VIEW_COORD_SYS update firstly\n // in the action handler as follows, and then series and components laid\n // out on this VIEW_COORD_SYS update in `View['updateTransform']`.\n update: 'none'\n }, function (payload, ecModel, api) {\n ecModel.eachComponent(makeQueryConditionKindA(payload, mainType, subType), function (componentOrSeries) {\n ownRoamModelCoordSysUpdateInAction(payload, componentOrSeries);\n ownRoamViewUpdateDirectlyInAction(payload, componentOrSeries, ecModel, api);\n });\n });\n}\nfunction makeViewCoordSysActionType(mainType, subType, suffix) {\n // e.g. 'treeRoam', 'sankeyRoam', 'geoRoam'\n return (mainType !== COMPONENT_MAIN_TYPE_SERIES ? mainType : subType === 'map' ? 'geo' // Historical setting.\n : subType) + suffix;\n}\nexport function isRoamPayloadHasZoom(payload) {\n return payload.zoom != null;\n}\nexport function createViewCoordSysSimply(componentOrSeries, api,\n// VIEW_COORD_SYS DataRect init:\nx, y, width, height,\n// VIEW_COORD_SYS ViewRect init:\n// Use DataRect by default, which means DataRect is in pixel space.\nviewRect) {\n var viewCoordSys = new View(null, useLegacyViewCoordSysCenterBase(componentOrSeries.ecModel, api));\n viewCoordSysSetBoundingRect(viewCoordSys, x, y, width, height);\n viewRect ? viewCoordSysSetViewRect(viewCoordSys, viewRect.x, viewRect.y, viewRect.width, viewRect.height) : viewCoordSysSetViewRect(viewCoordSys, x, y, width, height);\n viewCoordSysSetRoamOptionFromModel(viewCoordSys, componentOrSeries);\n return viewCoordSys;\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport RoamController from './RoamController.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, enableComponentHighDownFeatures, setDefaultStateProxy } from '../../util/states.js';\nimport geoSourceManager from '../../coord/geo/geoSourceManager.js';\nimport { getUID } from '../../util/component.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport { applyViewCoordSysTransToElement, VIEW_COORD_SYS_TRANS_RAW, VIEW_COORD_SYS_TRANS_ROAM, viewCoordSysCopyTrans, viewCoordSysCopyViewRect } from '../../coord/View.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { makeInner } from '../../util/model.js';\nimport { updateRoamControllerSimply } from './roamHelper.js';\nimport { transformableGetLocalTransform } from 'zrender/lib/core/Transformable.js';\nimport { applyTransform } from 'zrender/lib/core/vector.js';\n/**\n * Only these tags enable use `itemStyle` if they are named in SVG.\n * Other tags like <text> <tspan> <image> might not suitable for `itemStyle`.\n * They will not be considered to be styled until some requirements come.\n */\nvar OPTION_STYLE_ENABLED_TAGS = ['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path'];\nvar OPTION_STYLE_ENABLED_TAG_MAP = zrUtil.createHashMap(OPTION_STYLE_ENABLED_TAGS);\nvar STATE_TRIGGER_TAG_MAP = zrUtil.createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(['g']));\nvar LABEL_HOST_MAP = zrUtil.createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(['g']));\nvar mapLabelRaw = makeInner();\nfunction getFixedItemStyle(model) {\n var itemStyle = model.getItemStyle();\n var areaColor = model.get('areaColor');\n // If user want the color not to be changed when hover,\n // they should both set areaColor and color to be null.\n if (areaColor != null) {\n itemStyle.fill = areaColor;\n }\n return itemStyle;\n}\n// Only stroke can be used for line.\n// Using fill in style if stroke not exits.\n// TODO Not sure yet. Perhaps a separate `lineStyle`?\nfunction fixLineStyle(styleHost) {\n var style = styleHost.style;\n if (style) {\n style.stroke = style.stroke || style.fill;\n style.fill = null;\n }\n}\nvar MapDraw = /** @class */function () {\n function MapDraw(api) {\n var group = this.group = new graphic.Group();\n var transformGroup = this._transformGroup = new graphic.Group();\n group.add(transformGroup);\n this.uid = getUID('ec_map_draw');\n this._controller = new RoamController(api.getZr());\n transformGroup.add(this._regionsGroup = new graphic.Group());\n transformGroup.add(this._svgGroup = new graphic.Group());\n }\n MapDraw.prototype.draw = function (mapOrGeoModel, ecModel, api, fromView, payload) {\n var mapDraw = this;\n // Map series has data. GEO model that controlled by map series\n // will be assigned with map data. Other GEO model has no data.\n var data = mapOrGeoModel.getData && mapOrGeoModel.getData();\n if (isGeoModel(mapOrGeoModel)) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'map'\n }, function (mapSeries) {\n if (!data && mapSeries.getHostGeoModel() === mapOrGeoModel) {\n data = mapSeries.getData();\n }\n });\n }\n var geo = mapOrGeoModel.coordinateSystem;\n var viewCoordSys = geo.view;\n var regionsGroup = this._regionsGroup;\n var transformGroup = this._transformGroup;\n // No animation when first draw or in action\n var isFirstDraw = !regionsGroup.childAt(0) || payload;\n var clipRect;\n if (geo.shouldClip()) {\n clipRect = viewCoordSysCopyViewRect(null, viewCoordSys);\n this.group.setClipPath(new graphic.Rect({\n shape: clipRect.clone()\n }));\n } else {\n this.group.removeClipPath();\n }\n applyViewCoordSysTransToElement(transformGroup, VIEW_COORD_SYS_TRANS_ROAM, viewCoordSys, isFirstDraw ? null : mapOrGeoModel);\n var isVisualEncodedByVisualMap = data && data.getVisual('visualMeta') && data.getVisual('visualMeta').length > 0;\n if (geo.resourceType === 'geoJSON') {\n this._buildGeoJSON(viewCoordSys, api, geo, mapOrGeoModel, data, isVisualEncodedByVisualMap);\n } else if (geo.resourceType === 'geoSVG') {\n this._buildSVG(viewCoordSys, api, geo, mapOrGeoModel, data, isVisualEncodedByVisualMap);\n }\n updateRoamControllerSimply(mapOrGeoModel, api, this._controller, function (e, x, y) {\n return mapOrGeoModel.coordinateSystem.containPoint([x, y]);\n }, clipRect, function () {\n mapDraw._mouseDownFlag = false;\n }, false,\n // Default roam type.\n true);\n this._updateMapSelectHandler(mapOrGeoModel, regionsGroup, api, fromView);\n };\n MapDraw.prototype.__updateOnOwnRoam = function (mapOrGeoModel) {\n applyViewCoordSysTransToElement(this._transformGroup, VIEW_COORD_SYS_TRANS_ROAM, mapOrGeoModel.coordinateSystem.view, null);\n };\n MapDraw.prototype._buildGeoJSON = function (viewCoordSys, api, geo, mapOrGeoModel, data, isVisualEncodedByVisualMap) {\n var regionsGroupByName = this._regionsGroupByName = zrUtil.createHashMap();\n var regionsInfoByName = zrUtil.createHashMap();\n var regionsGroup = this._regionsGroup;\n var projection = geo.projection;\n var projectionStream = projection && projection.stream;\n var transMt = transformableGetLocalTransform(viewCoordSysCopyTrans(null, viewCoordSys, VIEW_COORD_SYS_TRANS_RAW));\n function transformPoint(point, project) {\n if (project) {\n // projection may return null point.\n point = project(point);\n }\n return point && applyTransform([], point, transMt);\n }\n ;\n function transformPolygonPoints(inPoints) {\n var outPoints = [];\n // If projectionStream is provided. Use it instead of single point project.\n var project = !projectionStream && projection && projection.project;\n for (var i = 0; i < inPoints.length; ++i) {\n var newPt = transformPoint(inPoints[i], project);\n newPt && outPoints.push(newPt);\n }\n return outPoints;\n }\n function getPolyShape(points) {\n return {\n shape: {\n points: transformPolygonPoints(points)\n }\n };\n }\n regionsGroup.removeAll();\n // Only when the resource is GeoJSON, there is `geo.regions`.\n zrUtil.each(geo.regions, function (region) {\n var regionName = region.name;\n // Consider in GeoJson properties.name may be duplicated, for example,\n // there is multiple region named \"United Kindom\" or \"France\" (so many\n // colonies). And it is not appropriate to merge them in geo, which\n // will make them share the same label and bring trouble in label\n // location calculation.\n var regionGroup = regionsGroupByName.get(regionName);\n var _a = regionsInfoByName.get(regionName) || {},\n dataIdx = _a.dataIdx,\n regionModel = _a.regionModel;\n if (!regionGroup) {\n regionGroup = regionsGroupByName.set(regionName, new graphic.Group());\n regionsGroup.add(regionGroup);\n dataIdx = data ? data.indexOfName(regionName) : null;\n regionModel = isGeoModel(mapOrGeoModel) ? mapOrGeoModel.getRegionModel(regionName) : data ? data.getItemModel(dataIdx) : null;\n var silent = regionModel.get('silent', true);\n silent != null && (regionGroup.silent = silent);\n regionsInfoByName.set(regionName, {\n dataIdx: dataIdx,\n regionModel: regionModel\n });\n }\n var polygonSubpaths = [];\n var polylineSubpaths = [];\n zrUtil.each(region.geometries, function (geometry) {\n // Polygon and MultiPolygon\n if (geometry.type === 'polygon') {\n var polys = [geometry.exterior].concat(geometry.interiors || []);\n if (projectionStream) {\n polys = projectPolys(polys, projectionStream);\n }\n zrUtil.each(polys, function (poly) {\n polygonSubpaths.push(new graphic.Polygon(getPolyShape(poly)));\n });\n }\n // LineString and MultiLineString\n else {\n var points = geometry.points;\n if (projectionStream) {\n points = projectPolys(points, projectionStream, true);\n }\n zrUtil.each(points, function (points) {\n polylineSubpaths.push(new graphic.Polyline(getPolyShape(points)));\n });\n }\n });\n var centerPt = transformPoint(region.getCenter(), projection && projection.project);\n function createCompoundPath(subpaths, isLine) {\n if (!subpaths.length) {\n return;\n }\n var compoundPath = new graphic.CompoundPath({\n culling: true,\n segmentIgnoreThreshold: 1,\n shape: {\n paths: subpaths\n }\n });\n regionGroup.add(compoundPath);\n applyOptionStyleForRegion(api, data, isVisualEncodedByVisualMap, compoundPath, dataIdx, regionModel);\n resetLabelForRegion(mapOrGeoModel, data, compoundPath, regionName, regionModel, dataIdx, centerPt);\n if (isLine) {\n fixLineStyle(compoundPath);\n zrUtil.each(compoundPath.states, fixLineStyle);\n }\n }\n createCompoundPath(polygonSubpaths);\n createCompoundPath(polylineSubpaths, true);\n });\n // Ensure children have been added to `regionGroup` before calling them.\n regionsGroupByName.each(function (regionGroup, regionName) {\n var _a = regionsInfoByName.get(regionName),\n dataIdx = _a.dataIdx,\n regionModel = _a.regionModel;\n resetEventTriggerForRegion(mapOrGeoModel, data, regionGroup, regionName, regionModel, dataIdx);\n resetTooltipForRegion(mapOrGeoModel, data, regionGroup, regionName, regionModel);\n resetStateTriggerForRegion(mapOrGeoModel, regionGroup, regionName, regionModel);\n }, this);\n };\n MapDraw.prototype._buildSVG = function (viewCoordSys, api, geo, mapOrGeoModel, data, isVisualEncodedByVisualMap) {\n var mapName = geo.map;\n viewCoordSysCopyTrans(this._svgGroup, viewCoordSys, VIEW_COORD_SYS_TRANS_RAW);\n if (this._svgResourceChanged(mapName)) {\n this._freeSVG();\n this._useSVG(mapName);\n }\n var svgDispatcherMap = this._svgDispatcherMap = zrUtil.createHashMap();\n var focusSelf = false;\n zrUtil.each(this._svgGraphicRecord.named, function (namedItem) {\n // Note that we also allow different elements have the same name.\n // For example, a glyph of a city and the label of the city have\n // the same name and their tooltip info can be defined in a single\n // region option.\n var regionName = namedItem.name;\n var svgNodeTagLower = namedItem.svgNodeTagLower;\n var el = namedItem.el;\n var dataIdx = data ? data.indexOfName(regionName) : null;\n var regionModel = mapOrGeoModel.getRegionModel(regionName);\n if (OPTION_STYLE_ENABLED_TAG_MAP.get(svgNodeTagLower) != null && el instanceof Displayable) {\n applyOptionStyleForRegion(api, data, isVisualEncodedByVisualMap, el, dataIdx, regionModel);\n }\n if (el instanceof Displayable) {\n el.culling = true;\n }\n var silent = regionModel.get('silent', true);\n silent != null && (el.silent = silent);\n // We do not know how the SVG like so we'd better not to change z2.\n // Otherwise it might bring some unexpected result. For example,\n // an area hovered that make some inner city can not be clicked.\n el.z2EmphasisLift = 0;\n // If self named:\n if (!namedItem.namedFrom) {\n // label should batter to be displayed based on the center of <g>\n // if it is named rather than displayed on each child.\n if (LABEL_HOST_MAP.get(svgNodeTagLower) != null) {\n resetLabelForRegion(mapOrGeoModel, data, el, regionName, regionModel, dataIdx, null);\n }\n resetEventTriggerForRegion(mapOrGeoModel, data, el, regionName, regionModel, dataIdx);\n resetTooltipForRegion(mapOrGeoModel, data, el, regionName, regionModel);\n if (STATE_TRIGGER_TAG_MAP.get(svgNodeTagLower) != null) {\n var focus_1 = resetStateTriggerForRegion(mapOrGeoModel, el, regionName, regionModel);\n if (focus_1 === 'self') {\n focusSelf = true;\n }\n var els = svgDispatcherMap.get(regionName) || svgDispatcherMap.set(regionName, []);\n els.push(el);\n }\n }\n }, this);\n this._enableBlurEntireSVG(focusSelf, mapOrGeoModel);\n };\n MapDraw.prototype._enableBlurEntireSVG = function (focusSelf, mapOrGeoModel) {\n // It's a little complicated to support blurring the entire geoSVG in series-map.\n // So do not support it until some requirements come.\n // At present, in series-map, only regions can be blurred.\n if (focusSelf && isGeoModel(mapOrGeoModel)) {\n var blurStyle = mapOrGeoModel.getModel(['blur', 'itemStyle']).getItemStyle();\n // Only support `opacity` here. Because not sure that other props are suitable for\n // all of the elements generated by SVG (especially for Text/TSpan/Image/... ).\n var opacity_1 = blurStyle.opacity;\n this._svgGraphicRecord.root.traverse(function (el) {\n if (!el.isGroup) {\n // PENDING: clear those settings to SVG elements when `_freeSVG`.\n // (Currently it happen not to be needed.)\n setDefaultStateProxy(el);\n var style = el.ensureState('blur').style || {};\n // Do not overwrite the region style that already set from region option.\n if (style.opacity == null && opacity_1 != null) {\n style.opacity = opacity_1;\n }\n // If `ensureState('blur').style = {}`, there will be default opacity.\n // Enable `stateTransition` (animation).\n el.ensureState('emphasis');\n }\n });\n }\n };\n MapDraw.prototype.remove = function () {\n this._regionsGroup.removeAll();\n this._regionsGroupByName = null;\n this._svgGroup.removeAll();\n this._freeSVG();\n this._controller.disable();\n };\n MapDraw.prototype.findHighDownDispatchers = function (name, geoModel) {\n if (name == null) {\n return [];\n }\n var geo = geoModel.coordinateSystem;\n if (geo.resourceType === 'geoJSON') {\n var regionsGroupByName = this._regionsGroupByName;\n if (regionsGroupByName) {\n var regionGroup = regionsGroupByName.get(name);\n return regionGroup ? [regionGroup] : [];\n }\n } else if (geo.resourceType === 'geoSVG') {\n return this._svgDispatcherMap && this._svgDispatcherMap.get(name) || [];\n }\n };\n MapDraw.prototype._svgResourceChanged = function (mapName) {\n return this._svgMapName !== mapName;\n };\n MapDraw.prototype._useSVG = function (mapName) {\n var resource = geoSourceManager.getGeoResource(mapName);\n if (resource && resource.type === 'geoSVG') {\n var svgGraphic = resource.useGraphic(this.uid);\n this._svgGroup.add(svgGraphic.root);\n this._svgGraphicRecord = svgGraphic;\n this._svgMapName = mapName;\n }\n };\n MapDraw.prototype._freeSVG = function () {\n var mapName = this._svgMapName;\n if (mapName == null) {\n return;\n }\n var resource = geoSourceManager.getGeoResource(mapName);\n if (resource && resource.type === 'geoSVG') {\n resource.freeGraphic(this.uid);\n }\n this._svgGraphicRecord = null;\n this._svgDispatcherMap = null;\n this._svgGroup.removeAll();\n this._svgMapName = null;\n };\n /**\n * FIXME: this is a temporarily workaround.\n * When `geoRoam` the elements need to be reset in `MapView['render']`, because the props like\n * `ignore` might have been modified by `LabelManager`, and `LabelManager#addLabelsOfSeries`\n * will subsequently cache `defaultAttr` like `ignore`. If do not do this reset, the modified\n * props will have no chance to be restored.\n * Note: This reset should be after `clearStates` in `renderSeries` because `useStates` in\n * `renderSeries` will cache the modified `ignore` to `el._normalState`.\n * TODO:\n * Use clone/immutable in `LabelManager`?\n */\n MapDraw.prototype.resetForLabelLayout = function () {\n this.group.traverse(function (el) {\n var label = el.getTextContent();\n if (label) {\n label.ignore = mapLabelRaw(label).ignore;\n }\n });\n };\n MapDraw.prototype._updateMapSelectHandler = function (mapOrGeoModel, regionsGroup, api, fromView) {\n var mapDraw = this;\n regionsGroup.off('mousedown');\n regionsGroup.off('click');\n if (mapOrGeoModel.get('selectedMode')) {\n regionsGroup.on('mousedown', function () {\n mapDraw._mouseDownFlag = true;\n });\n regionsGroup.on('click', function (e) {\n if (!mapDraw._mouseDownFlag) {\n return;\n }\n mapDraw._mouseDownFlag = false;\n });\n }\n };\n return MapDraw;\n}();\n;\nfunction applyOptionStyleForRegion(api, data, isVisualEncodedByVisualMap, el, dataIndex, regionModel) {\n // All of the path are using `itemStyle`, because\n // (1) Some SVG also use fill on polyline (The different between\n // polyline and polygon is \"open\" or \"close\" but not fill or not).\n // (2) For the common props like opacity, if some use itemStyle\n // and some use `lineStyle`, it might confuse users.\n // (3) Most SVG use <path>, where can not detect whether to draw a \"line\"\n // or a filled shape, so use `itemStyle` for <path>.\n var normalStyleModel = regionModel.getModel('itemStyle');\n var emphasisStyleModel = regionModel.getModel(['emphasis', 'itemStyle']);\n var blurStyleModel = regionModel.getModel(['blur', 'itemStyle']);\n var selectStyleModel = regionModel.getModel(['select', 'itemStyle']);\n // NOTE: DON'T use 'style' in visual when drawing map.\n // This component is used for drawing underlying map for both geo component and map series.\n var normalStyle = getFixedItemStyle(normalStyleModel);\n var emphasisStyle = getFixedItemStyle(emphasisStyleModel);\n var selectStyle = getFixedItemStyle(selectStyleModel);\n var blurStyle = getFixedItemStyle(blurStyleModel);\n // Update the itemStyle if has data visual\n if (data) {\n // Only visual color of each item will be used. It can be encoded by visualMap\n // But visual color of series is used in symbol drawing\n // Visual color for each series is for the symbol draw\n var style = data.getItemVisual(dataIndex, 'style');\n var decal = data.getItemVisual(dataIndex, 'decal');\n if (isVisualEncodedByVisualMap && style.fill) {\n normalStyle.fill = style.fill;\n }\n if (decal) {\n normalStyle.decal = createOrUpdatePatternFromDecal(decal, api);\n }\n }\n // SVG text, tspan and image can be named but not supporeted\n // to be styled by region option yet.\n el.setStyle(normalStyle);\n el.style.strokeNoScale = true;\n el.ensureState('emphasis').style = emphasisStyle;\n el.ensureState('select').style = selectStyle;\n el.ensureState('blur').style = blurStyle;\n // Enable blur\n setDefaultStateProxy(el);\n}\nfunction resetLabelForRegion(mapOrGeoModel, data, el, regionName, regionModel,\n// Exist only if `viewBuildCtx.data` exists.\ndataIdx,\n// If labelXY not provided, use `textConfig.position: 'inside'`\nlabelXY) {\n var isDataNaN = data && isNaN(data.get(data.mapDimension('value'), dataIdx));\n var itemLayout = data && data.getItemLayout(dataIdx);\n // In the following cases label will be drawn\n // 1. In map series and data value is NaN\n // 2. In geo component\n // 3. Region has no series legendIcon, which will be add a showLabel flag in mapSymbolLayout\n if (isGeoModel(mapOrGeoModel) || isDataNaN || itemLayout && itemLayout.showLabel) {\n var query = !isGeoModel(mapOrGeoModel) ? dataIdx : regionName;\n var labelFetcher = void 0;\n // Consider dataIdx not found.\n if (!data || dataIdx >= 0) {\n labelFetcher = mapOrGeoModel;\n }\n var specifiedTextOpt = labelXY ? {\n normal: {\n align: 'center',\n verticalAlign: 'middle'\n }\n } : null;\n // Caveat: must be called after `setDefaultStateProxy(el);` called.\n // because textContent will be assign with `el.stateProxy` inside.\n setLabelStyle(el, getLabelStatesModels(regionModel), {\n labelFetcher: labelFetcher,\n labelDataIndex: query,\n defaultText: regionName\n }, specifiedTextOpt);\n var textEl = el.getTextContent();\n if (textEl) {\n mapLabelRaw(textEl).ignore = textEl.ignore;\n if (el.textConfig && labelXY) {\n // Compute a relative offset based on the el bounding rect.\n var rect = el.getBoundingRect().clone();\n // Need to make sure the percent position base on the same rect in normal and\n // emphasis state. Otherwise if using boundingRect of el, but the emphasis state\n // has borderWidth (even 0.5px), the text position will be changed obviously\n // if the position is very big like ['1234%', '1345%'].\n el.textConfig.layoutRect = rect;\n el.textConfig.position = [(labelXY[0] - rect.x) / rect.width * 100 + '%', (labelXY[1] - rect.y) / rect.height * 100 + '%'];\n }\n }\n // PENDING:\n // If labelLayout is enabled (test/label-layout.html), el.dataIndex should be specified.\n // But el.dataIndex is also used to determine whether user event should be triggered,\n // where el.seriesIndex or el.dataModel must be specified. At present for a single el\n // there is not case that \"only label layout enabled but user event disabled\", so here\n // we depends `resetEventTriggerForRegion` to do the job of setting `el.dataIndex`.\n el.disableLabelAnimation = true;\n } else {\n el.removeTextContent();\n el.removeTextConfig();\n el.disableLabelAnimation = null;\n }\n}\nfunction resetEventTriggerForRegion(mapOrGeoModel, data, eventTrigger, regionName, regionModel,\n// Exist only if `viewBuildCtx.data` exists.\ndataIdx) {\n // setItemGraphicEl, setHoverStyle after all polygons and labels\n // are added to the regionGroup\n if (data) {\n // FIXME: when series-map use a SVG map, and there are duplicated name specified\n // on different SVG elements, after `data.setItemGraphicEl(...)`:\n // (1) all of them will be mounted with `dataIndex`, `seriesIndex`, so that tooltip\n // can be triggered only mouse hover. That's correct.\n // (2) only the last element will be kept in `data`, so that if trigger tooltip\n // by `dispatchAction`, only the last one can be found and triggered. That might be\n // not correct. We will fix it in future if anyone demanding that.\n data.setItemGraphicEl(dataIdx, eventTrigger);\n }\n // series-map will not trigger \"geoselectchange\" no matter it is\n // based on a declared geo component. Because series-map will\n // trigger \"selectchange\". If it trigger both the two events,\n // If users call `chart.dispatchAction({type: 'toggleSelect'})`,\n // it not easy to also fire event \"geoselectchanged\".\n else {\n // Package custom mouse event for geo component\n getECData(eventTrigger).eventData = {\n componentType: 'geo',\n componentIndex: mapOrGeoModel.componentIndex,\n geoIndex: mapOrGeoModel.componentIndex,\n name: regionName,\n region: regionModel && regionModel.option || {}\n };\n }\n}\nfunction resetTooltipForRegion(mapOrGeoModel, data, el, regionName, regionModel) {\n if (!data) {\n graphic.setTooltipConfig({\n el: el,\n componentModel: mapOrGeoModel,\n itemName: regionName,\n // @ts-ignore FIXME:TS fix the \"compatible with each other\"?\n itemTooltipOption: regionModel.get('tooltip')\n });\n }\n}\nfunction resetStateTriggerForRegion(mapOrGeoModel, el, regionName, regionModel) {\n // @ts-ignore FIXME:TS fix the \"compatible with each other\"?\n el.highDownSilentOnTouch = !!mapOrGeoModel.get('selectedMode');\n // @ts-ignore FIXME:TS fix the \"compatible with each other\"?\n var emphasisModel = regionModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n toggleHoverEmphasis(el, focus, emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n if (isGeoModel(mapOrGeoModel)) {\n enableComponentHighDownFeatures(el, mapOrGeoModel, regionName);\n }\n return focus;\n}\nfunction projectPolys(rings,\n// Polygons include exterior and interiors. Or polylines.\ncreateStream, isLine) {\n var polygons = [];\n var curPoly;\n function startPolygon() {\n curPoly = [];\n }\n function endPolygon() {\n if (curPoly.length) {\n polygons.push(curPoly);\n curPoly = [];\n }\n }\n var stream = createStream({\n polygonStart: startPolygon,\n polygonEnd: endPolygon,\n lineStart: startPolygon,\n lineEnd: endPolygon,\n point: function (x, y) {\n // May have NaN values from stream.\n if (isFinite(x) && isFinite(y)) {\n curPoly.push([x, y]);\n }\n },\n sphere: function () {}\n });\n !isLine && stream.polygonStart();\n zrUtil.each(rings, function (ring) {\n stream.lineStart();\n for (var i = 0; i < ring.length; i++) {\n stream.point(ring[i][0], ring[i][1]);\n }\n stream.lineEnd();\n });\n !isLine && stream.polygonEnd();\n return polygons;\n}\nfunction isGeoModel(mapOrGeoModel) {\n return mapOrGeoModel.mainType === 'geo';\n}\nexport default MapDraw;\n// @ts-ignore FIXME:TS fix the \"compatible with each other\"?", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport MapDraw from '../helper/MapDraw.js';\nimport ComponentView from '../../view/Component.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { findEventDispatcher } from '../../util/event.js';\nvar GeoView = /** @class */function (_super) {\n __extends(GeoView, _super);\n function GeoView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GeoView.type;\n _this.focusBlurEnabled = true;\n return _this;\n }\n GeoView.prototype.init = function (ecModel, api) {\n this._api = api;\n };\n GeoView.prototype.render = function (geoModel, ecModel, api, payload) {\n this._model = geoModel;\n if (!geoModel.get('show')) {\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n return;\n }\n if (!this._mapDraw) {\n this._mapDraw = new MapDraw(api);\n }\n var mapDraw = this._mapDraw;\n mapDraw.draw(geoModel, ecModel, api, this, payload);\n mapDraw.group.on('click', this._handleRegionClick, this);\n mapDraw.group.silent = geoModel.get('silent');\n this.group.add(mapDraw.group);\n this.updateSelectStatus(geoModel, ecModel, api);\n };\n /**\n * @implements RoamHostView['__updateOnOwnRoam']\n */\n GeoView.prototype.__updateOnOwnRoam = function (payload, model, api) {\n var mapDraw = this._mapDraw;\n if (mapDraw) {\n mapDraw.__updateOnOwnRoam(model);\n }\n };\n GeoView.prototype._handleRegionClick = function (e) {\n var eventData;\n findEventDispatcher(e.target, function (current) {\n return (eventData = getECData(current).eventData) != null;\n }, true);\n if (eventData) {\n this._api.dispatchAction({\n type: 'geoToggleSelect',\n geoId: this._model.id,\n name: eventData.name\n });\n }\n };\n GeoView.prototype.updateSelectStatus = function (model, ecModel, api) {\n var _this = this;\n this._mapDraw.group.traverse(function (node) {\n var eventData = getECData(node).eventData;\n if (eventData) {\n _this._model.isSelected(eventData.name) ? api.enterSelect(node) : api.leaveSelect(node);\n // No need to traverse children.\n return true;\n }\n });\n };\n GeoView.prototype.findHighDownDispatchers = function (name) {\n return this._mapDraw && this._mapDraw.findHighDownDispatchers(name, this._model);\n };\n GeoView.prototype.dispose = function () {\n this._mapDraw && this._mapDraw.remove();\n };\n GeoView.type = 'geo';\n return GeoView;\n}(ComponentView);\nexport default GeoView;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport GeoModel from '../../coord/geo/GeoModel.js';\nimport geoCreator from '../../coord/geo/geoCreator.js';\nimport { COMPONENT_MAIN_TYPE_SERIES } from '../../util/types.js';\nimport { each } from 'zrender/lib/core/util.js';\nimport { mapSeriesNeedsDrawMap } from '../../chart/map/MapSeries.js';\nimport GeoView from './GeoView.js';\nimport geoSourceManager from '../../coord/geo/geoSourceManager.js';\nimport { makeQueryConditionKindA } from '../../util/model.js';\nimport { ownRoamModelCoordSysUpdateInAction, ownRoamViewUpdateDirectlyInAction } from '../../coord/View.js';\nfunction registerMap(mapName, geoJson, specialAreas) {\n geoSourceManager.registerMap(mapName, geoJson, specialAreas);\n}\nexport function install(registers) {\n registers.registerCoordinateSystem('geo', geoCreator);\n registers.registerComponentModel(GeoModel);\n registers.registerComponentView(GeoView);\n registers.registerImpl('registerMap', registerMap);\n registers.registerImpl('getMap', function (mapName) {\n return geoSourceManager.getMapForUser(mapName);\n });\n function makeAction(method, actionInfo) {\n actionInfo.update = 'geo:updateSelectStatus';\n registers.registerAction(actionInfo, function (payload, ecModel) {\n var selected = {};\n var allSelected = [];\n ecModel.eachComponent({\n mainType: 'geo',\n query: payload\n }, function (geoModel) {\n geoModel[method](payload.name);\n var geo = geoModel.coordinateSystem;\n each(geo.regions, function (region) {\n selected[region.name] = geoModel.isSelected(region.name) || false;\n });\n // Notice: there might be duplicated name in different regions.\n var names = [];\n each(selected, function (v, name) {\n selected[name] && names.push(name);\n });\n allSelected.push({\n geoIndex: geoModel.componentIndex,\n // Use singular, the same naming convention as the event `selectchanged`.\n name: names\n });\n });\n return {\n selected: selected,\n allSelected: allSelected,\n name: payload.name\n };\n });\n }\n makeAction('toggleSelected', {\n type: 'geoToggleSelect',\n event: 'geoselectchanged'\n });\n makeAction('select', {\n type: 'geoSelect',\n event: 'geoselected'\n });\n makeAction('unSelect', {\n type: 'geoUnSelect',\n event: 'geounselected'\n });\n /**\n * @payload\n * @property {string} [componentType=series]\n * @property {number} [dx]\n * @property {number} [dy]\n * @property {number} [zoom]\n * @property {number} [originX]\n * @property {number} [originY]\n */\n registers.registerAction({\n type: 'geoRoam',\n event: 'geoRoam',\n update: 'updateTransform'\n }, function (payload, ecModel, api) {\n // `payload.componentType` is supported only for backward compatibility.\n var mainType = payload.componentType || (payload.geoId != null || payload.geoName != null || payload.geoIndex != null ? 'geo' : COMPONENT_MAIN_TYPE_SERIES);\n var isSeries = mainType === COMPONENT_MAIN_TYPE_SERIES;\n if (mainType !== 'geo' && !isSeries) {\n return;\n }\n var subType = isSeries ? 'map' : null;\n ecModel.eachComponent(makeQueryConditionKindA(payload, mainType, subType), function (componentOrSeries) {\n if (isSeries\n // Only when `needsDrawMap: true`, the `MapSeries` host geo coord sys and call `MapDraw`.\n && !mapSeriesNeedsDrawMap(componentOrSeries)) {\n return;\n }\n // Since 'updateTransform' is used, geo model and view update firstly here, and then series\n // and components laid out on this VIEW_COORD_SYS update in `View['updateTransform']`.\n ownRoamModelCoordSysUpdateInAction(payload, componentOrSeries, isSeries ? componentOrSeries.seriesGroup.r : null);\n ownRoamViewUpdateDirectlyInAction(payload, componentOrSeries, ecModel, api);\n });\n });\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\nexport default function parallelPreprocessor(option) {\n createParallelIfNeeded(option);\n mergeAxisOptionFromParallel(option);\n}\n/**\n * Create a parallel coordinate if not exists.\n * @inner\n */\nfunction createParallelIfNeeded(option) {\n if (option.parallel) {\n return;\n }\n var hasParallelSeries = false;\n zrUtil.each(option.series, function (seriesOpt) {\n if (seriesOpt && seriesOpt.type === 'parallel') {\n hasParallelSeries = true;\n }\n });\n if (hasParallelSeries) {\n option.parallel = [{}];\n }\n}\n/**\n * Merge aixs definition from parallel option (if exists) to axis option.\n * @inner\n */\nfunction mergeAxisOptionFromParallel(option) {\n var axes = modelUtil.normalizeToArray(option.parallelAxis);\n zrUtil.each(axes, function (axisOption) {\n if (!zrUtil.isObject(axisOption)) {\n return;\n }\n var parallelIndex = axisOption.parallelIndex || 0;\n var parallelOption = modelUtil.normalizeToArray(option.parallel)[parallelIndex];\n if (parallelOption && parallelOption.parallelAxisDefault) {\n zrUtil.merge(axisOption, parallelOption.parallelAxisDefault, false);\n }\n });\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nimport { each, bind, extend } from 'zrender/lib/core/util.js';\nimport { createOrUpdate, clear } from '../../util/throttle.js';\nvar CLICK_THRESHOLD = 5; // > 4\nvar ParallelView = /** @class */function (_super) {\n __extends(ParallelView, _super);\n function ParallelView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelView.type;\n return _this;\n }\n ParallelView.prototype.render = function (parallelModel, ecModel, api) {\n this._model = parallelModel;\n this._api = api;\n if (!this._handlers) {\n this._handlers = {};\n each(handlers, function (handler, eventName) {\n api.getZr().on(eventName, this._handlers[eventName] = bind(handler, this));\n }, this);\n }\n createOrUpdate(this, '_throttledDispatchExpand', parallelModel.get('axisExpandRate'), 'fixRate');\n };\n ParallelView.prototype.dispose = function (ecModel, api) {\n clear(this, '_throttledDispatchExpand');\n each(this._handlers, function (handler, eventName) {\n api.getZr().off(eventName, handler);\n });\n this._handlers = null;\n };\n /**\n * @internal\n * @param {Object} [opt] If null, cancel the last action triggering for debounce.\n */\n ParallelView.prototype._throttledDispatchExpand = function (opt) {\n this._dispatchExpand(opt);\n };\n /**\n * @internal\n */\n ParallelView.prototype._dispatchExpand = function (opt) {\n opt && this._api.dispatchAction(extend({\n type: 'parallelAxisExpand'\n }, opt));\n };\n ParallelView.type = 'parallel';\n return ParallelView;\n}(ComponentView);\nvar handlers = {\n mousedown: function (e) {\n if (checkTrigger(this, 'click')) {\n this._mouseDownPoint = [e.offsetX, e.offsetY];\n }\n },\n mouseup: function (e) {\n var mouseDownPoint = this._mouseDownPoint;\n if (checkTrigger(this, 'click') && mouseDownPoint) {\n var point = [e.offsetX, e.offsetY];\n var dist = Math.pow(mouseDownPoint[0] - point[0], 2) + Math.pow(mouseDownPoint[1] - point[1], 2);\n if (dist > CLICK_THRESHOLD) {\n return;\n }\n var result = this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]);\n result.behavior !== 'none' && this._dispatchExpand({\n axisExpandWindow: result.axisExpandWindow\n });\n }\n this._mouseDownPoint = null;\n },\n mousemove: function (e) {\n // Should do nothing when brushing.\n if (this._mouseDownPoint || !checkTrigger(this, 'mousemove')) {\n return;\n }\n var model = this._model;\n var result = model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]);\n var behavior = result.behavior;\n behavior === 'jump' && this._throttledDispatchExpand.debounceNextCall(model.get('axisExpandDebounce'));\n this._throttledDispatchExpand(behavior === 'none' ? null // Cancel the last trigger, in case that mouse slide out of the area quickly.\n : {\n axisExpandWindow: result.axisExpandWindow,\n // Jumping uses animation, and sliding suppresses animation.\n animation: behavior === 'jump' ? null : {\n duration: 0 // Disable animation.\n }\n });\n }\n};\nfunction checkTrigger(view, triggerOn) {\n var model = view._model;\n return model.get('axisExpandable') && model.get('axisExpandTriggerOn') === triggerOn;\n}\nexport default ParallelView;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nexport var COORD_SYS_TYPE_PARALLEL = 'parallel';\nexport var COMPONENT_TYPE_PARALLEL = COORD_SYS_TYPE_PARALLEL;\nvar ParallelModel = /** @class */function (_super) {\n __extends(ParallelModel, _super);\n function ParallelModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelModel.type;\n return _this;\n }\n ParallelModel.prototype.init = function () {\n _super.prototype.init.apply(this, arguments);\n this.mergeOption({});\n };\n ParallelModel.prototype.mergeOption = function (newOption) {\n var thisOption = this.option;\n newOption && zrUtil.merge(thisOption, newOption, true);\n this._initDimensions();\n };\n /**\n * Whether series or axis is in this coordinate system.\n */\n ParallelModel.prototype.contains = function (model, ecModel) {\n var parallelIndex = model.get('parallelIndex');\n return parallelIndex != null && ecModel.getComponent('parallel', parallelIndex) === this;\n };\n ParallelModel.prototype.setAxisExpand = function (opt) {\n zrUtil.each(['axisExpandable', 'axisExpandCenter', 'axisExpandCount', 'axisExpandWidth', 'axisExpandWindow'], function (name) {\n if (opt.hasOwnProperty(name)) {\n // @ts-ignore FIXME: why \"never\" inferred in this.option[name]?\n this.option[name] = opt[name];\n }\n }, this);\n };\n ParallelModel.prototype._initDimensions = function () {\n var dimensions = this.dimensions = [];\n var parallelAxisIndex = this.parallelAxisIndex = [];\n var axisModels = zrUtil.filter(this.ecModel.queryComponents({\n mainType: 'parallelAxis'\n }), function (axisModel) {\n // Can not use this.contains here, because\n // initialization has not been completed yet.\n return (axisModel.get('parallelIndex') || 0) === this.componentIndex;\n }, this);\n zrUtil.each(axisModels, function (axisModel) {\n dimensions.push('dim' + axisModel.get('dim'));\n parallelAxisIndex.push(axisModel.componentIndex);\n });\n };\n ParallelModel.type = COMPONENT_TYPE_PARALLEL;\n ParallelModel.dependencies = ['parallelAxis'];\n ParallelModel.layoutMode = 'box';\n ParallelModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n left: 80,\n top: 60,\n right: 80,\n bottom: 60,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n layout: 'horizontal',\n // FIXME\n // naming?\n axisExpandable: false,\n axisExpandCenter: null,\n axisExpandCount: 0,\n axisExpandWidth: 50,\n axisExpandRate: 17,\n axisExpandDebounce: 50,\n // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full.\n // Do not doc to user until necessary.\n axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4],\n axisExpandTriggerOn: 'click',\n parallelAxisDefault: null\n };\n return ParallelModel;\n}(ComponentModel);\nexport default ParallelModel;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar ParallelAxis = /** @class */function (_super) {\n __extends(ParallelAxis, _super);\n function ParallelAxis(dim, scale, coordExtent, axisType, axisIndex) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n _this.type = axisType || 'value';\n _this.axisIndex = axisIndex;\n return _this;\n }\n ParallelAxis.prototype.isHorizontal = function () {\n return this.coordinateSystem.getModel().get('layout') !== 'horizontal';\n };\n return ParallelAxis;\n}(Axis);\nexport default ParallelAxis;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { addSafe } from '../../util/number.js';\n/**\n * Calculate slider move result.\n * Usage:\n * (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as\n * maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`.\n * (2) If handle0 is forbidden to cross handle1, set minSpan as `0`.\n *\n * [CAVEAT]\n * This method is inefficient due to the use of `addSafe`.\n *\n * @param delta Move length.\n * @param handleEnds handleEnds[0] can be bigger then handleEnds[1].\n * handleEnds will be modified in this method.\n * @param extent handleEnds is restricted by extent.\n * extent[0] should less or equals than extent[1].\n * @param handleIndex Can be 'all', means that both move the two handleEnds.\n * @param minSpan The range of dataZoom can not be smaller than that.\n * If not set, handle0 and cross handle1. If set as a non-negative\n * number (including `0`), handles will push each other when reaching\n * the minSpan.\n * @param maxSpan The range of dataZoom can not be larger than that.\n * @return The input handleEnds.\n */\nexport default function sliderMove(delta, handleEnds, extent, handleIndex, minSpan, maxSpan) {\n delta = delta || 0;\n // Consider `7.1e-9 - 7e-9` get `1.0000000000000007e-10`, so use `addSafe`\n // to remove rounding error whenever possible.\n var extentSpan = addSafe(extent[1], -extent[0]);\n // Notice maxSpan and minSpan can be null/undefined.\n if (minSpan != null) {\n minSpan = restrict(minSpan, [0, extentSpan]);\n }\n if (maxSpan != null) {\n maxSpan = Math.max(maxSpan, minSpan != null ? minSpan : 0);\n }\n if (handleIndex === 'all') {\n var handleSpan = Math.abs(addSafe(handleEnds[1], -handleEnds[0]));\n handleSpan = restrict(handleSpan, [0, extentSpan]);\n minSpan = maxSpan = restrict(handleSpan, [minSpan, maxSpan]);\n handleIndex = 0;\n }\n handleEnds[0] = restrict(handleEnds[0], extent);\n handleEnds[1] = restrict(handleEnds[1], extent);\n var originalDistSign = getSpanSign(handleEnds, handleIndex);\n handleEnds[handleIndex] += delta;\n // Restrict in extent.\n var extentMinSpan = minSpan || 0;\n var realExtent = extent.slice();\n originalDistSign.sign < 0 ? realExtent[0] = addSafe(realExtent[0], extentMinSpan) : realExtent[1] = addSafe(realExtent[1], -extentMinSpan);\n handleEnds[handleIndex] = restrict(handleEnds[handleIndex], realExtent);\n // Expand span.\n var currDistSign;\n currDistSign = getSpanSign(handleEnds, handleIndex);\n if (minSpan != null && (currDistSign.sign !== originalDistSign.sign || currDistSign.span < minSpan)) {\n // If minSpan exists, 'cross' is forbidden.\n handleEnds[1 - handleIndex] = addSafe(handleEnds[handleIndex], originalDistSign.sign * minSpan);\n }\n // Shrink span.\n currDistSign = getSpanSign(handleEnds, handleIndex);\n if (maxSpan != null && currDistSign.span > maxSpan) {\n handleEnds[1 - handleIndex] = addSafe(handleEnds[handleIndex], currDistSign.sign * maxSpan);\n }\n return handleEnds;\n}\nfunction getSpanSign(handleEnds, handleIndex) {\n var dist = handleEnds[handleIndex] - handleEnds[1 - handleIndex];\n // If `handleEnds[0] === handleEnds[1]`, always believe that handleEnd[0]\n // is at left of handleEnds[1] for non-cross case.\n return {\n span: Math.abs(dist),\n sign: dist > 0 ? -1 : dist < 0 ? 1 : handleIndex ? -1 : 1\n };\n}\nfunction restrict(value, extend) {\n return Math.min(extend[1] != null ? extend[1] : Infinity, Math.max(extend[0] != null ? extend[0] : -Infinity, value));\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Parallel Coordinates\n * <https://en.wikipedia.org/wiki/Parallel_coordinates>\n */\nimport { each, createHashMap, clone } from 'zrender/lib/core/util.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport ParallelAxis from './ParallelAxis.js';\nimport * as graphic from '../../util/graphic.js';\nimport { mathCeil, mathFloor, mathMax, mathMin, mathPI, round } from '../../util/number.js';\nimport sliderMove from '../../component/helper/sliderMove.js';\nimport { COORD_SYS_TYPE_PARALLEL } from './ParallelModel.js';\nimport { scaleCalcNice } from '../axisNiceTicks.js';\nimport { AXIS_EXTENT_INFO_BUILD_FROM_COORD_SYS_UPDATE, scaleRawExtentInfoCreate } from '../scaleRawExtentInfo.js';\nvar Parallel = /** @class */function () {\n function Parallel(parallelModel, ecModel, api) {\n this.type = COORD_SYS_TYPE_PARALLEL;\n /**\n * key: dimension\n */\n this._axesMap = createHashMap();\n /**\n * key: dimension\n * value: {position: [], rotation, }\n */\n this._axesLayout = {};\n this.dimensions = parallelModel.dimensions;\n this._model = parallelModel;\n this._init(parallelModel, ecModel, api);\n }\n Parallel.prototype._init = function (parallelModel, ecModel, api) {\n var dimensions = parallelModel.dimensions;\n var parallelAxisIndex = parallelModel.parallelAxisIndex;\n each(dimensions, function (dim, idx) {\n var axisIndex = parallelAxisIndex[idx];\n var axisModel = ecModel.getComponent('parallelAxis', axisIndex);\n var axisType = axisHelper.determineAxisType(axisModel);\n var axis = this._axesMap.set(dim, new ParallelAxis(dim, axisHelper.createScaleByModel(axisModel, axisType, false), [0, 0], axisType, axisIndex));\n axis.onBand = axisHelper.isAxisOnBand(axis.scale, axisModel);\n axis.inverse = axisModel.get('inverse');\n // Injection\n axisModel.axis = axis;\n axis.model = axisModel;\n axis.coordinateSystem = axisModel.coordinateSystem = this;\n }, this);\n };\n /**\n * Update axis scale after data processed\n */\n Parallel.prototype.update = function (ecModel, api) {\n each(this.dimensions, function (dim) {\n var axis = this._axesMap.get(dim);\n scaleRawExtentInfoCreate(axis, AXIS_EXTENT_INFO_BUILD_FROM_COORD_SYS_UPDATE);\n scaleCalcNice(axis);\n }, this);\n };\n Parallel.prototype.containPoint = function (point) {\n var layoutInfo = this._makeLayoutInfo();\n var axisBase = layoutInfo.axisBase;\n var layoutBase = layoutInfo.layoutBase;\n var pixelDimIndex = layoutInfo.pixelDimIndex;\n var pAxis = point[1 - pixelDimIndex];\n var pLayout = point[pixelDimIndex];\n return pAxis >= axisBase && pAxis <= axisBase + layoutInfo.axisLength && pLayout >= layoutBase && pLayout <= layoutBase + layoutInfo.layoutLength;\n };\n Parallel.prototype.getModel = function () {\n return this._model;\n };\n /**\n * Resize the parallel coordinate system.\n */\n Parallel.prototype.resize = function (parallelModel, api) {\n var refContainer = layoutUtil.createBoxLayoutReference(parallelModel, api).refContainer;\n this._rect = layoutUtil.getLayoutRect(parallelModel.getBoxLayoutParams(), refContainer);\n this._layoutAxes();\n };\n Parallel.prototype.getRect = function () {\n return this._rect;\n };\n Parallel.prototype._makeLayoutInfo = function () {\n var parallelModel = this._model;\n var rect = this._rect;\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n var layout = parallelModel.get('layout');\n var pixelDimIndex = layout === 'horizontal' ? 0 : 1;\n var layoutLength = rect[wh[pixelDimIndex]];\n var layoutExtent = [0, layoutLength];\n var axisCount = this.dimensions.length;\n var axisExpandWidth = restrict(parallelModel.get('axisExpandWidth'), layoutExtent);\n var axisExpandCount = restrict(parallelModel.get('axisExpandCount') || 0, [0, axisCount]);\n var axisExpandable = parallelModel.get('axisExpandable') && axisCount > 3 && axisCount > axisExpandCount && axisExpandCount > 1 && axisExpandWidth > 0 && layoutLength > 0;\n // `axisExpandWindow` is According to the coordinates of [0, axisExpandLength],\n // for sake of consider the case that axisCollapseWidth is 0 (when screen is narrow),\n // where collapsed axes should be overlapped.\n var axisExpandWindow = parallelModel.get('axisExpandWindow');\n var winSize;\n if (!axisExpandWindow) {\n winSize = restrict(axisExpandWidth * (axisExpandCount - 1), layoutExtent);\n var axisExpandCenter = parallelModel.get('axisExpandCenter') || mathFloor(axisCount / 2);\n axisExpandWindow = [axisExpandWidth * axisExpandCenter - winSize / 2];\n axisExpandWindow[1] = axisExpandWindow[0] + winSize;\n } else {\n winSize = restrict(axisExpandWindow[1] - axisExpandWindow[0], layoutExtent);\n axisExpandWindow[1] = axisExpandWindow[0] + winSize;\n }\n var axisCollapseWidth = (layoutLength - winSize) / (axisCount - axisExpandCount);\n // Avoid axisCollapseWidth is too small.\n axisCollapseWidth < 3 && (axisCollapseWidth = 0);\n // Find the first and last indices > ewin[0] and < ewin[1].\n var winInnerIndices = [mathFloor(round(axisExpandWindow[0] / axisExpandWidth, 1)) + 1, mathCeil(round(axisExpandWindow[1] / axisExpandWidth, 1)) - 1];\n // Pos in ec coordinates.\n var axisExpandWindow0Pos = axisCollapseWidth / axisExpandWidth * axisExpandWindow[0];\n return {\n layout: layout,\n pixelDimIndex: pixelDimIndex,\n layoutBase: rect[xy[pixelDimIndex]],\n layoutLength: layoutLength,\n axisBase: rect[xy[1 - pixelDimIndex]],\n axisLength: rect[wh[1 - pixelDimIndex]],\n axisExpandable: axisExpandable,\n axisExpandWidth: axisExpandWidth,\n axisCollapseWidth: axisCollapseWidth,\n axisExpandWindow: axisExpandWindow,\n axisCount: axisCount,\n winInnerIndices: winInnerIndices,\n axisExpandWindow0Pos: axisExpandWindow0Pos\n };\n };\n Parallel.prototype._layoutAxes = function () {\n var rect = this._rect;\n var axes = this._axesMap;\n var dimensions = this.dimensions;\n var layoutInfo = this._makeLayoutInfo();\n var layout = layoutInfo.layout;\n axes.each(function (axis) {\n var axisExtent = [0, layoutInfo.axisLength];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(axisExtent[idx], axisExtent[1 - idx]);\n });\n each(dimensions, function (dim, idx) {\n var posInfo = (layoutInfo.axisExpandable ? layoutAxisWithExpand : layoutAxisWithoutExpand)(idx, layoutInfo);\n var positionTable = {\n horizontal: {\n x: posInfo.position,\n y: layoutInfo.axisLength\n },\n vertical: {\n x: 0,\n y: posInfo.position\n }\n };\n var rotationTable = {\n horizontal: mathPI / 2,\n vertical: 0\n };\n var position = [positionTable[layout].x + rect.x, positionTable[layout].y + rect.y];\n var rotation = rotationTable[layout];\n var transform = matrix.create();\n matrix.rotate(transform, transform, rotation);\n matrix.translate(transform, transform, position);\n // TODO\n // tick layout info\n // TODO\n // update dimensions info based on axis order.\n this._axesLayout[dim] = {\n position: position,\n rotation: rotation,\n transform: transform,\n axisNameAvailableWidth: posInfo.axisNameAvailableWidth,\n axisLabelShow: posInfo.axisLabelShow,\n nameTruncateMaxWidth: posInfo.nameTruncateMaxWidth,\n tickDirection: 1,\n labelDirection: 1\n };\n }, this);\n };\n /**\n * Get axis by dim.\n */\n Parallel.prototype.getAxis = function (dim) {\n return this._axesMap.get(dim);\n };\n /**\n * Convert a dim value of a single item of series data to Point.\n */\n Parallel.prototype.dataToPoint = function (value, dim) {\n return this.axisCoordToPoint(this._axesMap.get(dim).dataToCoord(value), dim);\n };\n /**\n * Travel data for one time, get activeState of each data item.\n * @param start the start dataIndex that travel from.\n * @param end the next dataIndex of the last dataIndex will be travel.\n */\n Parallel.prototype.eachActiveState = function (data, callback, start, end) {\n start == null && (start = 0);\n end == null && (end = data.count());\n var axesMap = this._axesMap;\n var dimensions = this.dimensions;\n var dataDimensions = [];\n var axisModels = [];\n each(dimensions, function (axisDim) {\n dataDimensions.push(data.mapDimension(axisDim));\n axisModels.push(axesMap.get(axisDim).model);\n });\n var hasActiveSet = this.hasAxisBrushed();\n for (var dataIndex = start; dataIndex < end; dataIndex++) {\n var activeState = void 0;\n if (!hasActiveSet) {\n activeState = 'normal';\n } else {\n activeState = 'active';\n var values = data.getValues(dataDimensions, dataIndex);\n for (var j = 0, lenj = dimensions.length; j < lenj; j++) {\n var state = axisModels[j].getActiveState(values[j]);\n if (state === 'inactive') {\n activeState = 'inactive';\n break;\n }\n }\n }\n callback(activeState, dataIndex);\n }\n };\n /**\n * Whether has any activeSet.\n */\n Parallel.prototype.hasAxisBrushed = function () {\n var dimensions = this.dimensions;\n var axesMap = this._axesMap;\n var hasActiveSet = false;\n for (var j = 0, lenj = dimensions.length; j < lenj; j++) {\n if (axesMap.get(dimensions[j]).model.getActiveState() !== 'normal') {\n hasActiveSet = true;\n }\n }\n return hasActiveSet;\n };\n /**\n * Convert coords of each axis to Point.\n * Return point. For example: [10, 20]\n */\n Parallel.prototype.axisCoordToPoint = function (coord, dim) {\n var axisLayout = this._axesLayout[dim];\n return graphic.applyTransform([coord, 0], axisLayout.transform);\n };\n /**\n * Get axis layout.\n */\n Parallel.prototype.getAxisLayout = function (dim) {\n return clone(this._axesLayout[dim]);\n };\n /**\n * @return {Object} {axisExpandWindow, delta, behavior: 'jump' | 'slide' | 'none'}.\n */\n Parallel.prototype.getSlidedAxisExpandWindow = function (point) {\n var layoutInfo = this._makeLayoutInfo();\n var pixelDimIndex = layoutInfo.pixelDimIndex;\n var axisExpandWindow = layoutInfo.axisExpandWindow.slice();\n var winSize = axisExpandWindow[1] - axisExpandWindow[0];\n var extent = [0, layoutInfo.axisExpandWidth * (layoutInfo.axisCount - 1)];\n // Out of the area of coordinate system.\n if (!this.containPoint(point)) {\n return {\n behavior: 'none',\n axisExpandWindow: axisExpandWindow\n };\n }\n // Convert the point from global to expand coordinates.\n var pointCoord = point[pixelDimIndex] - layoutInfo.layoutBase - layoutInfo.axisExpandWindow0Pos;\n // For dragging operation convenience, the window should not be\n // slided when mouse is the center area of the window.\n var delta;\n var behavior = 'slide';\n var axisCollapseWidth = layoutInfo.axisCollapseWidth;\n var triggerArea = this._model.get('axisExpandSlideTriggerArea');\n // But consider touch device, jump is necessary.\n var useJump = triggerArea[0] != null;\n if (axisCollapseWidth) {\n if (useJump && axisCollapseWidth && pointCoord < winSize * triggerArea[0]) {\n behavior = 'jump';\n delta = pointCoord - winSize * triggerArea[2];\n } else if (useJump && axisCollapseWidth && pointCoord > winSize * (1 - triggerArea[0])) {\n behavior = 'jump';\n delta = pointCoord - winSize * (1 - triggerArea[2]);\n } else {\n (delta = pointCoord - winSize * triggerArea[1]) >= 0 && (delta = pointCoord - winSize * (1 - triggerArea[1])) <= 0 && (delta = 0);\n }\n delta *= layoutInfo.axisExpandWidth / axisCollapseWidth;\n delta ? sliderMove(delta, axisExpandWindow, extent, 'all')\n // Avoid nonsense triger on mousemove.\n : behavior = 'none';\n }\n // When screen is too narrow, make it visible and slidable, although it is hard to interact.\n else {\n var winSize2 = axisExpandWindow[1] - axisExpandWindow[0];\n var pos = extent[1] * pointCoord / winSize2;\n axisExpandWindow = [mathMax(0, pos - winSize2 / 2)];\n axisExpandWindow[1] = mathMin(extent[1], axisExpandWindow[0] + winSize2);\n axisExpandWindow[0] = axisExpandWindow[1] - winSize2;\n }\n return {\n axisExpandWindow: axisExpandWindow,\n behavior: behavior\n };\n };\n return Parallel;\n}();\nfunction restrict(len, extent) {\n return mathMin(mathMax(len, extent[0]), extent[1]);\n}\nfunction layoutAxisWithoutExpand(axisIndex, layoutInfo) {\n var step = layoutInfo.layoutLength / (layoutInfo.axisCount - 1);\n return {\n position: step * axisIndex,\n axisNameAvailableWidth: step,\n axisLabelShow: true\n };\n}\nfunction layoutAxisWithExpand(axisIndex, layoutInfo) {\n var layoutLength = layoutInfo.layoutLength;\n var axisExpandWidth = layoutInfo.axisExpandWidth;\n var axisCount = layoutInfo.axisCount;\n var axisCollapseWidth = layoutInfo.axisCollapseWidth;\n var winInnerIndices = layoutInfo.winInnerIndices;\n var position;\n var axisNameAvailableWidth = axisCollapseWidth;\n var axisLabelShow = false;\n var nameTruncateMaxWidth;\n if (axisIndex < winInnerIndices[0]) {\n position = axisIndex * axisCollapseWidth;\n nameTruncateMaxWidth = axisCollapseWidth;\n } else if (axisIndex <= winInnerIndices[1]) {\n position = layoutInfo.axisExpandWindow0Pos + axisIndex * axisExpandWidth - layoutInfo.axisExpandWindow[0];\n axisNameAvailableWidth = axisExpandWidth;\n axisLabelShow = true;\n } else {\n position = layoutLength - (axisCount - 1 - axisIndex) * axisCollapseWidth;\n nameTruncateMaxWidth = axisCollapseWidth;\n }\n return {\n position: position,\n axisNameAvailableWidth: axisNameAvailableWidth,\n axisLabelShow: axisLabelShow,\n nameTruncateMaxWidth: nameTruncateMaxWidth\n };\n}\nexport default Parallel;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Parallel coordinate system creator.\n */\nimport Parallel from './Parallel.js';\nimport { COMPONENT_TYPE_PARALLEL, COORD_SYS_TYPE_PARALLEL } from './ParallelModel.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nimport { each } from 'zrender/lib/core/util.js';\nimport { associateSeriesWithAxis } from '../axisStatistics.js';\nfunction createParallelCoordSys(ecModel, api) {\n var coordSysList = [];\n ecModel.eachComponent(COMPONENT_TYPE_PARALLEL, function (parallelModel, idx) {\n var coordSys = new Parallel(parallelModel, ecModel, api);\n coordSys.name = 'parallel_' + idx;\n coordSys.resize(parallelModel, api);\n parallelModel.coordinateSystem = coordSys;\n coordSys.model = parallelModel;\n coordSysList.push(coordSys);\n });\n // Inject the coordinateSystems into seriesModel\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === COORD_SYS_TYPE_PARALLEL) {\n var parallelModel = seriesModel.getReferringComponents(COMPONENT_TYPE_PARALLEL, SINGLE_REFERRING).models[0];\n var parallel_1 = seriesModel.coordinateSystem = parallelModel.coordinateSystem;\n if (parallel_1) {\n each(parallel_1.dimensions, function (dim) {\n associateSeriesWithAxis(parallel_1.getAxis(dim), seriesModel, COORD_SYS_TYPE_PARALLEL);\n });\n }\n }\n });\n return coordSysList;\n}\nvar parallelCoordSysCreator = {\n create: createParallelCoordSys\n};\nexport default parallelCoordSysCreator;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport makeStyleMapper from '../../model/mixin/makeStyleMapper.js';\nimport * as numberUtil from '../../util/number.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nvar ParallelAxisModel = /** @class */function (_super) {\n __extends(ParallelAxisModel, _super);\n function ParallelAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelAxisModel.type;\n /**\n * @readOnly\n */\n _this.activeIntervals = [];\n return _this;\n }\n ParallelAxisModel.prototype.getAreaSelectStyle = function () {\n return makeStyleMapper([['fill', 'color'], ['lineWidth', 'borderWidth'], ['stroke', 'borderColor'], ['width', 'width'], ['opacity', 'opacity']\n // Option decal is in `DecalObject` but style.decal is in `PatternObject`.\n // So do not transfer decal directly.\n ])(this.getModel('areaSelectStyle'));\n };\n /**\n * The code of this feature is put on AxisModel but not ParallelAxis,\n * because axisModel can be alive after echarts updating but instance of\n * ParallelAxis having been disposed. this._activeInterval should be kept\n * when action dispatched (i.e. legend click).\n *\n * @param intervals `interval.length === 0` means set all active.\n */\n ParallelAxisModel.prototype.setActiveIntervals = function (intervals) {\n var activeIntervals = this.activeIntervals = zrUtil.clone(intervals);\n // Normalize\n if (activeIntervals) {\n for (var i = activeIntervals.length - 1; i >= 0; i--) {\n numberUtil.asc(activeIntervals[i]);\n }\n }\n };\n /**\n * @param value When only attempting detect whether 'no activeIntervals set',\n * `value` is not needed to be input.\n */\n ParallelAxisModel.prototype.getActiveState = function (value) {\n var activeIntervals = this.activeIntervals;\n if (!activeIntervals.length) {\n return 'normal';\n }\n if (value == null || isNaN(+value)) {\n return 'inactive';\n }\n // Simple optimization\n if (activeIntervals.length === 1) {\n var interval = activeIntervals[0];\n if (interval[0] <= value && value <= interval[1]) {\n return 'active';\n }\n } else {\n for (var i = 0, len = activeIntervals.length; i < len; i++) {\n if (activeIntervals[i][0] <= value && value <= activeIntervals[i][1]) {\n return 'active';\n }\n }\n }\n return 'inactive';\n };\n return ParallelAxisModel;\n}(ComponentModel);\nzrUtil.mixin(ParallelAxisModel, AxisModelCommonMixin);\nexport default ParallelAxisModel;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { curry, each, map, bind, merge, clone, defaults, assert } from 'zrender/lib/core/util.js';\nimport Eventful from 'zrender/lib/core/Eventful.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as interactionMutex from './interactionMutex.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport tokens from '../../visual/tokens.js';\nvar BRUSH_PANEL_GLOBAL = true;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathPow = Math.pow;\nvar COVER_Z = 10000;\nvar UNSELECT_THRESHOLD = 6;\nvar MIN_RESIZE_LINE_WIDTH = 6;\nvar MUTEX_RESOURCE_KEY = 'globalPan';\nvar DIRECTION_MAP = {\n w: [0, 0],\n e: [0, 1],\n n: [1, 0],\n s: [1, 1]\n};\nvar CURSOR_MAP = {\n w: 'ew',\n e: 'ew',\n n: 'ns',\n s: 'ns',\n ne: 'nesw',\n sw: 'nesw',\n nw: 'nwse',\n se: 'nwse'\n};\nvar DEFAULT_BRUSH_OPT = {\n brushStyle: {\n lineWidth: 2,\n stroke: tokens.color.backgroundTint,\n fill: tokens.color.borderTint\n },\n transformable: true,\n brushMode: 'single',\n removeOnClick: false\n};\nvar baseUID = 0;\n/**\n * params:\n * areas: Array.<Array>, coord relates to container group,\n * If no container specified, to global.\n * opt {\n * isEnd: boolean,\n * removeOnClick: boolean\n * }\n */\nvar BrushController = /** @class */function (_super) {\n __extends(BrushController, _super);\n function BrushController(zr) {\n var _this = _super.call(this) || this;\n /**\n * @internal\n */\n _this._track = [];\n /**\n * @internal\n */\n _this._covers = [];\n _this._handlers = {};\n if (process.env.NODE_ENV !== 'production') {\n assert(zr);\n }\n _this._zr = zr;\n _this.group = new graphic.Group();\n _this._uid = 'brushController_' + baseUID++;\n each(pointerHandlers, function (handler, eventName) {\n this._handlers[eventName] = bind(handler, this);\n }, _this);\n return _this;\n }\n /**\n * If set to `false`, select disabled.\n */\n BrushController.prototype.enableBrush = function (brushOption) {\n if (process.env.NODE_ENV !== 'production') {\n assert(this._mounted);\n }\n this._brushType && this._doDisableBrush();\n brushOption.brushType && this._doEnableBrush(brushOption);\n return this;\n };\n BrushController.prototype._doEnableBrush = function (brushOption) {\n var zr = this._zr;\n // Consider roam, which takes globalPan too.\n if (!this._enableGlobalPan) {\n interactionMutex.take(zr, MUTEX_RESOURCE_KEY, this._uid);\n }\n each(this._handlers, function (handler, eventName) {\n zr.on(eventName, handler);\n });\n this._brushType = brushOption.brushType;\n this._brushOption = merge(clone(DEFAULT_BRUSH_OPT), brushOption, true);\n };\n BrushController.prototype._doDisableBrush = function () {\n var zr = this._zr;\n interactionMutex.release(zr, MUTEX_RESOURCE_KEY, this._uid);\n each(this._handlers, function (handler, eventName) {\n zr.off(eventName, handler);\n });\n this._brushType = this._brushOption = null;\n };\n /**\n * @param panelOpts If not pass, it is global brush.\n */\n BrushController.prototype.setPanels = function (panelOpts) {\n if (panelOpts && panelOpts.length) {\n var panels_1 = this._panels = {};\n each(panelOpts, function (panelOpts) {\n panels_1[panelOpts.panelId] = clone(panelOpts);\n });\n } else {\n this._panels = null;\n }\n return this;\n };\n BrushController.prototype.mount = function (opt) {\n opt = opt || {};\n if (process.env.NODE_ENV !== 'production') {\n this._mounted = true; // should be at first.\n }\n this._enableGlobalPan = opt.enableGlobalPan;\n var thisGroup = this.group;\n this._zr.add(thisGroup);\n thisGroup.attr({\n x: opt.x || 0,\n y: opt.y || 0,\n rotation: opt.rotation || 0,\n scaleX: opt.scaleX || 1,\n scaleY: opt.scaleY || 1\n });\n this._transform = thisGroup.getLocalTransform();\n return this;\n };\n // eachCover(cb, context): void {\n // each(this._covers, cb, context);\n // }\n /**\n * Update covers.\n * @param coverConfigList\n * If coverConfigList is null/undefined, all covers removed.\n */\n BrushController.prototype.updateCovers = function (coverConfigList) {\n if (process.env.NODE_ENV !== 'production') {\n assert(this._mounted);\n }\n coverConfigList = map(coverConfigList, function (coverConfig) {\n return merge(clone(DEFAULT_BRUSH_OPT), coverConfig, true);\n });\n var tmpIdPrefix = '\\0-brush-index-';\n var oldCovers = this._covers;\n var newCovers = this._covers = [];\n var controller = this;\n var creatingCover = this._creatingCover;\n new DataDiffer(oldCovers, coverConfigList, oldGetKey, getKey).add(addOrUpdate).update(addOrUpdate).remove(remove).execute();\n return this;\n function getKey(brushOption, index) {\n return (brushOption.id != null ? brushOption.id : tmpIdPrefix + index) + '-' + brushOption.brushType;\n }\n function oldGetKey(cover, index) {\n return getKey(cover.__brushOption, index);\n }\n function addOrUpdate(newIndex, oldIndex) {\n var newBrushInternal = coverConfigList[newIndex];\n // Consider setOption in event listener of brushSelect,\n // where updating cover when creating should be forbidden.\n if (oldIndex != null && oldCovers[oldIndex] === creatingCover) {\n newCovers[newIndex] = oldCovers[oldIndex];\n } else {\n var cover = newCovers[newIndex] = oldIndex != null ? (oldCovers[oldIndex].__brushOption = newBrushInternal, oldCovers[oldIndex]) : endCreating(controller, createCover(controller, newBrushInternal));\n updateCoverAfterCreation(controller, cover);\n }\n }\n function remove(oldIndex) {\n if (oldCovers[oldIndex] !== creatingCover) {\n controller.group.remove(oldCovers[oldIndex]);\n }\n }\n };\n BrushController.prototype.unmount = function () {\n if (process.env.NODE_ENV !== 'production') {\n if (!this._mounted) {\n return;\n }\n }\n this.enableBrush(false);\n // container may 'removeAll' outside.\n clearCovers(this);\n this._zr.remove(this.group);\n if (process.env.NODE_ENV !== 'production') {\n this._mounted = false; // should be at last.\n }\n return this;\n };\n BrushController.prototype.dispose = function () {\n this.unmount();\n this.off();\n };\n return BrushController;\n}(Eventful);\nfunction createCover(controller, brushOption) {\n var cover = coverRenderers[brushOption.brushType].createCover(controller, brushOption);\n cover.__brushOption = brushOption;\n updateZ(cover, brushOption);\n controller.group.add(cover);\n return cover;\n}\nfunction endCreating(controller, creatingCover) {\n var coverRenderer = getCoverRenderer(creatingCover);\n if (coverRenderer.endCreating) {\n coverRenderer.endCreating(controller, creatingCover);\n updateZ(creatingCover, creatingCover.__brushOption);\n }\n return creatingCover;\n}\nfunction updateCoverShape(controller, cover) {\n var brushOption = cover.__brushOption;\n getCoverRenderer(cover).updateCoverShape(controller, cover, brushOption.range, brushOption);\n}\nfunction updateZ(cover, brushOption) {\n var z = brushOption.z;\n z == null && (z = COVER_Z);\n cover.traverse(function (el) {\n el.z = z;\n el.z2 = z; // Consider in given container.\n });\n}\nfunction updateCoverAfterCreation(controller, cover) {\n getCoverRenderer(cover).updateCommon(controller, cover);\n updateCoverShape(controller, cover);\n}\nfunction getCoverRenderer(cover) {\n return coverRenderers[cover.__brushOption.brushType];\n}\n// return target panel or `true` (means global panel)\nfunction getPanelByPoint(controller, e, localCursorPoint) {\n var panels = controller._panels;\n if (!panels) {\n return BRUSH_PANEL_GLOBAL; // Global panel\n }\n var panel;\n var transform = controller._transform;\n each(panels, function (pn) {\n pn.isTargetByCursor(e, localCursorPoint, transform) && (panel = pn);\n });\n return panel;\n}\n// Return a panel or true\nfunction getPanelByCover(controller, cover) {\n var panels = controller._panels;\n if (!panels) {\n return BRUSH_PANEL_GLOBAL; // Global panel\n }\n var panelId = cover.__brushOption.panelId;\n // User may give cover without coord sys info,\n // which is then treated as global panel.\n return panelId != null ? panels[panelId] : BRUSH_PANEL_GLOBAL;\n}\nfunction clearCovers(controller) {\n var covers = controller._covers;\n var originalLength = covers.length;\n each(covers, function (cover) {\n controller.group.remove(cover);\n }, controller);\n covers.length = 0;\n return !!originalLength;\n}\nfunction trigger(controller, opt) {\n var areas = map(controller._covers, function (cover) {\n var brushOption = cover.__brushOption;\n var range = clone(brushOption.range);\n return {\n brushType: brushOption.brushType,\n panelId: brushOption.panelId,\n range: range\n };\n });\n controller.trigger('brush', {\n areas: areas,\n isEnd: !!opt.isEnd,\n removeOnClick: !!opt.removeOnClick\n });\n}\nfunction shouldShowCover(controller) {\n var track = controller._track;\n if (!track.length) {\n return false;\n }\n var p2 = track[track.length - 1];\n var p1 = track[0];\n var dx = p2[0] - p1[0];\n var dy = p2[1] - p1[1];\n var dist = mathPow(dx * dx + dy * dy, 0.5);\n return dist > UNSELECT_THRESHOLD;\n}\nfunction getTrackEnds(track) {\n var tail = track.length - 1;\n tail < 0 && (tail = 0);\n return [track[0], track[tail]];\n}\n;\nfunction createBaseRectCover(rectRangeConverter, controller, brushOption, edgeNameSequences) {\n var cover = new graphic.Group();\n cover.add(new graphic.Rect({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true,\n draggable: true,\n cursor: 'move',\n drift: curry(driftRect, rectRangeConverter, controller, cover, ['n', 's', 'w', 'e']),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n each(edgeNameSequences, function (nameSequence) {\n cover.add(new graphic.Rect({\n name: nameSequence.join(''),\n style: {\n opacity: 0\n },\n draggable: true,\n silent: true,\n invisible: true,\n drift: curry(driftRect, rectRangeConverter, controller, cover, nameSequence),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n });\n return cover;\n}\nfunction updateBaseRect(controller, cover, localRange, brushOption) {\n var lineWidth = brushOption.brushStyle.lineWidth || 0;\n var handleSize = mathMax(lineWidth, MIN_RESIZE_LINE_WIDTH);\n var x = localRange[0][0];\n var y = localRange[1][0];\n var xa = x - lineWidth / 2;\n var ya = y - lineWidth / 2;\n var x2 = localRange[0][1];\n var y2 = localRange[1][1];\n var x2a = x2 - handleSize + lineWidth / 2;\n var y2a = y2 - handleSize + lineWidth / 2;\n var width = x2 - x;\n var height = y2 - y;\n var widtha = width + lineWidth;\n var heighta = height + lineWidth;\n updateRectShape(controller, cover, 'main', x, y, width, height);\n if (brushOption.transformable) {\n updateRectShape(controller, cover, 'w', xa, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'e', x2a, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'n', xa, ya, widtha, handleSize);\n updateRectShape(controller, cover, 's', xa, y2a, widtha, handleSize);\n updateRectShape(controller, cover, 'nw', xa, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'ne', x2a, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'sw', xa, y2a, handleSize, handleSize);\n updateRectShape(controller, cover, 'se', x2a, y2a, handleSize, handleSize);\n }\n}\nfunction updateCommon(controller, cover) {\n var brushOption = cover.__brushOption;\n var transformable = brushOption.transformable;\n var mainEl = cover.childAt(0);\n mainEl.useStyle(makeStyle(brushOption));\n mainEl.attr({\n silent: !transformable,\n cursor: transformable ? 'move' : 'default'\n });\n each([['w'], ['e'], ['n'], ['s'], ['s', 'e'], ['s', 'w'], ['n', 'e'], ['n', 'w']], function (nameSequence) {\n var el = cover.childOfName(nameSequence.join(''));\n var globalDir = nameSequence.length === 1 ? getGlobalDirection1(controller, nameSequence[0]) : getGlobalDirection2(controller, nameSequence);\n el && el.attr({\n silent: !transformable,\n invisible: !transformable,\n cursor: transformable ? CURSOR_MAP[globalDir] + '-resize' : null\n });\n });\n}\nfunction updateRectShape(controller, cover, name, x, y, w, h) {\n var el = cover.childOfName(name);\n el && el.setShape(pointsToRect(clipByPanel(controller, cover, [[x, y], [x + w, y + h]])));\n}\nfunction makeStyle(brushOption) {\n return defaults({\n strokeNoScale: true\n }, brushOption.brushStyle);\n}\nfunction formatRectRange(x, y, x2, y2) {\n var min = [mathMin(x, x2), mathMin(y, y2)];\n var max = [mathMax(x, x2), mathMax(y, y2)];\n return [[min[0], max[0]], [min[1], max[1]] // y range\n ];\n}\nfunction getTransform(controller) {\n return graphic.getTransform(controller.group);\n}\nfunction getGlobalDirection1(controller, localDirName) {\n var map = {\n w: 'left',\n e: 'right',\n n: 'top',\n s: 'bottom'\n };\n var inverseMap = {\n left: 'w',\n right: 'e',\n top: 'n',\n bottom: 's'\n };\n var dir = graphic.transformDirection(map[localDirName], getTransform(controller));\n return inverseMap[dir];\n}\nfunction getGlobalDirection2(controller, localDirNameSeq) {\n var globalDir = [getGlobalDirection1(controller, localDirNameSeq[0]), getGlobalDirection1(controller, localDirNameSeq[1])];\n (globalDir[0] === 'e' || globalDir[0] === 'w') && globalDir.reverse();\n return globalDir.join('');\n}\nfunction driftRect(rectRangeConverter, controller, cover, dirNameSequence, dx, dy) {\n var brushOption = cover.__brushOption;\n var rectRange = rectRangeConverter.toRectRange(brushOption.range);\n var localDelta = toLocalDelta(controller, dx, dy);\n each(dirNameSequence, function (dirName) {\n var ind = DIRECTION_MAP[dirName];\n rectRange[ind[0]][ind[1]] += localDelta[ind[0]];\n });\n brushOption.range = rectRangeConverter.fromRectRange(formatRectRange(rectRange[0][0], rectRange[1][0], rectRange[0][1], rectRange[1][1]));\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\nfunction driftPolygon(controller, cover, dx, dy) {\n var range = cover.__brushOption.range;\n var localDelta = toLocalDelta(controller, dx, dy);\n each(range, function (point) {\n point[0] += localDelta[0];\n point[1] += localDelta[1];\n });\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\nfunction toLocalDelta(controller, dx, dy) {\n var thisGroup = controller.group;\n var localD = thisGroup.transformCoordToLocal(dx, dy);\n var localZero = thisGroup.transformCoordToLocal(0, 0);\n return [localD[0] - localZero[0], localD[1] - localZero[1]];\n}\nfunction clipByPanel(controller, cover, data) {\n var panel = getPanelByCover(controller, cover);\n return panel && panel !== BRUSH_PANEL_GLOBAL ? panel.clipPath(data, controller._transform) : clone(data);\n}\nfunction pointsToRect(points) {\n var xmin = mathMin(points[0][0], points[1][0]);\n var ymin = mathMin(points[0][1], points[1][1]);\n var xmax = mathMax(points[0][0], points[1][0]);\n var ymax = mathMax(points[0][1], points[1][1]);\n return {\n x: xmin,\n y: ymin,\n width: xmax - xmin,\n height: ymax - ymin\n };\n}\nfunction resetCursor(controller, e, localCursorPoint) {\n if (\n // Check active\n !controller._brushType\n // resetCursor should be always called when mouse is in zr area,\n // but not called when mouse is out of zr area to avoid bad influence\n // if `mousemove`, `mouseup` are triggered from `document` event.\n || isOutsideZrArea(controller, e.offsetX, e.offsetY)) {\n return;\n }\n var zr = controller._zr;\n var covers = controller._covers;\n var currPanel = getPanelByPoint(controller, e, localCursorPoint);\n // Check whether in covers.\n if (!controller._dragging) {\n for (var i = 0; i < covers.length; i++) {\n var brushOption = covers[i].__brushOption;\n if (currPanel && (currPanel === BRUSH_PANEL_GLOBAL || brushOption.panelId === currPanel.panelId) && coverRenderers[brushOption.brushType].contain(covers[i], localCursorPoint[0], localCursorPoint[1])) {\n // Use cursor style set on cover.\n return;\n }\n }\n }\n currPanel && zr.setCursorStyle('crosshair');\n}\nfunction preventDefault(e) {\n var rawE = e.event;\n rawE.preventDefault && rawE.preventDefault();\n}\nfunction mainShapeContain(cover, x, y) {\n return cover.childOfName('main').contain(x, y);\n}\nfunction updateCoverByMouse(controller, e, localCursorPoint, isEnd) {\n var creatingCover = controller._creatingCover;\n var panel = controller._creatingPanel;\n var thisBrushOption = controller._brushOption;\n var eventParams;\n controller._track.push(localCursorPoint.slice());\n if (shouldShowCover(controller) || creatingCover) {\n if (panel && !creatingCover) {\n thisBrushOption.brushMode === 'single' && clearCovers(controller);\n var brushOption = clone(thisBrushOption);\n brushOption.brushType = determineBrushType(brushOption.brushType, panel);\n brushOption.panelId = panel === BRUSH_PANEL_GLOBAL ? null : panel.panelId;\n creatingCover = controller._creatingCover = createCover(controller, brushOption);\n controller._covers.push(creatingCover);\n }\n if (creatingCover) {\n var coverRenderer = coverRenderers[determineBrushType(controller._brushType, panel)];\n var coverBrushOption = creatingCover.__brushOption;\n coverBrushOption.range = coverRenderer.getCreatingRange(clipByPanel(controller, creatingCover, controller._track));\n if (isEnd) {\n endCreating(controller, creatingCover);\n coverRenderer.updateCommon(controller, creatingCover);\n }\n updateCoverShape(controller, creatingCover);\n eventParams = {\n isEnd: isEnd\n };\n }\n } else if (isEnd && thisBrushOption.brushMode === 'single' && thisBrushOption.removeOnClick) {\n // Help user to remove covers easily, only by a tiny drag, in 'single' mode.\n // But a single click do not clear covers, because user may have casual\n // clicks (for example, click on other component and do not expect covers\n // disappear).\n // Only some cover removed, trigger action, but not every click trigger action.\n if (getPanelByPoint(controller, e, localCursorPoint) && clearCovers(controller)) {\n eventParams = {\n isEnd: isEnd,\n removeOnClick: true\n };\n }\n }\n return eventParams;\n}\nfunction determineBrushType(brushType, panel) {\n if (brushType === 'auto') {\n if (process.env.NODE_ENV !== 'production') {\n assert(panel && panel.defaultBrushType, 'MUST have defaultBrushType when brushType is \"atuo\"');\n }\n return panel.defaultBrushType;\n }\n return brushType;\n}\nvar pointerHandlers = {\n mousedown: function (e) {\n if (this._dragging) {\n // In case some browser do not support globalOut,\n // and release mouse out side the browser.\n handleDragEnd(this, e);\n } else if (!e.target || !e.target.draggable) {\n preventDefault(e);\n var localCursorPoint = this.group.transformCoordToLocal(e.offsetX, e.offsetY);\n this._creatingCover = null;\n var panel = this._creatingPanel = getPanelByPoint(this, e, localCursorPoint);\n if (panel) {\n this._dragging = true;\n this._track = [localCursorPoint.slice()];\n }\n }\n },\n mousemove: function (e) {\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = this.group.transformCoordToLocal(x, y);\n resetCursor(this, e, localCursorPoint);\n if (this._dragging) {\n preventDefault(e);\n var eventParams = updateCoverByMouse(this, e, localCursorPoint, false);\n eventParams && trigger(this, eventParams);\n }\n },\n mouseup: function (e) {\n handleDragEnd(this, e);\n }\n};\nfunction handleDragEnd(controller, e) {\n if (controller._dragging) {\n preventDefault(e);\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = controller.group.transformCoordToLocal(x, y);\n var eventParams = updateCoverByMouse(controller, e, localCursorPoint, true);\n controller._dragging = false;\n controller._track = [];\n controller._creatingCover = null;\n // trigger event should be at final, after procedure will be nested.\n eventParams && trigger(controller, eventParams);\n }\n}\nfunction isOutsideZrArea(controller, x, y) {\n var zr = controller._zr;\n return x < 0 || x > zr.getWidth() || y < 0 || y > zr.getHeight();\n}\n/**\n * key: brushType\n */\nvar coverRenderers = {\n lineX: getLineRenderer(0),\n lineY: getLineRenderer(1),\n rect: {\n createCover: function (controller, brushOption) {\n function returnInput(range) {\n return range;\n }\n return createBaseRectCover({\n toRectRange: returnInput,\n fromRectRange: returnInput\n }, controller, brushOption, [['w'], ['e'], ['n'], ['s'], ['s', 'e'], ['s', 'w'], ['n', 'e'], ['n', 'w']]);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n return formatRectRange(ends[1][0], ends[1][1], ends[0][0], ends[0][1]);\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n updateBaseRect(controller, cover, localRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n },\n polygon: {\n createCover: function (controller, brushOption) {\n var cover = new graphic.Group();\n // Do not use graphic.Polygon because graphic.Polyline do not close the\n // border of the shape when drawing, which is a better experience for user.\n cover.add(new graphic.Polyline({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true\n }));\n return cover;\n },\n getCreatingRange: function (localTrack) {\n return localTrack;\n },\n endCreating: function (controller, cover) {\n cover.remove(cover.childAt(0));\n // Use graphic.Polygon close the shape.\n cover.add(new graphic.Polygon({\n name: 'main',\n draggable: true,\n drift: curry(driftPolygon, controller, cover),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n cover.childAt(0).setShape({\n points: clipByPanel(controller, cover, localRange)\n });\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n }\n};\nfunction getLineRenderer(xyIndex) {\n return {\n createCover: function (controller, brushOption) {\n return createBaseRectCover({\n toRectRange: function (range) {\n var rectRange = [range, [0, 100]];\n xyIndex && rectRange.reverse();\n return rectRange;\n },\n fromRectRange: function (rectRange) {\n return rectRange[xyIndex];\n }\n }, controller, brushOption, [[['w'], ['e']], [['n'], ['s']]][xyIndex]);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n var min = mathMin(ends[0][xyIndex], ends[1][xyIndex]);\n var max = mathMax(ends[0][xyIndex], ends[1][xyIndex]);\n return [min, max];\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n var otherExtent;\n // If brushWidth not specified, fit the panel.\n var panel = getPanelByCover(controller, cover);\n if (panel !== BRUSH_PANEL_GLOBAL && panel.getLinearBrushOtherExtent) {\n otherExtent = panel.getLinearBrushOtherExtent(xyIndex);\n } else {\n var zr = controller._zr;\n otherExtent = [0, [zr.getWidth(), zr.getHeight()][1 - xyIndex]];\n }\n var rectRange = [localRange, otherExtent];\n xyIndex && rectRange.reverse();\n updateBaseRect(controller, cover, rectRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n };\n}\nexport default BrushController;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { onIrrelevantElement } from './cursorHelper.js';\nimport * as graphicUtil from '../../util/graphic.js';\nexport function makeRectPanelClipPath(rect) {\n rect = normalizeRect(rect);\n return function (localPoints) {\n return graphicUtil.clipPointsByRect(localPoints, rect);\n };\n}\nexport function makeLinearBrushOtherExtent(rect, specifiedXYIndex) {\n rect = normalizeRect(rect);\n return function (xyIndex) {\n var idx = specifiedXYIndex != null ? specifiedXYIndex : xyIndex;\n var brushWidth = idx ? rect.width : rect.height;\n var base = idx ? rect.x : rect.y;\n return [base, base + (brushWidth || 0)];\n };\n}\nexport function makeRectIsTargetByCursor(rect, api, targetModel) {\n var boundingRect = normalizeRect(rect);\n return function (e, localCursorPoint) {\n return boundingRect.contain(localCursorPoint[0], localCursorPoint[1]) && !onIrrelevantElement(e, api, targetModel);\n };\n}\n// Consider width/height is negative.\nfunction normalizeRect(rect) {\n return BoundingRect.create(rect);\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport BrushController from '../helper/BrushController.js';\nimport * as brushHelper from '../helper/brushHelper.js';\nimport * as graphic from '../../util/graphic.js';\nimport ComponentView from '../../view/Component.js';\nvar ParallelAxisView = /** @class */function (_super) {\n __extends(ParallelAxisView, _super);\n function ParallelAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelAxisView.type;\n return _this;\n }\n ParallelAxisView.prototype.init = function (ecModel, api) {\n _super.prototype.init.apply(this, arguments);\n (this._brushController = new BrushController(api.getZr())).on('brush', zrUtil.bind(this._onBrush, this));\n };\n ParallelAxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n if (fromAxisAreaSelect(axisModel, ecModel, payload)) {\n return;\n }\n this.axisModel = axisModel;\n this.api = api;\n this.group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n this.group.add(this._axisGroup);\n if (!axisModel.get('show')) {\n return;\n }\n var coordSysModel = getCoordSysModel(axisModel, ecModel);\n var coordSys = coordSysModel.coordinateSystem;\n var areaSelectStyle = axisModel.getAreaSelectStyle();\n var areaWidth = areaSelectStyle.width;\n var dim = axisModel.axis.dim;\n var axisLayout = coordSys.getAxisLayout(dim);\n var builderOpt = zrUtil.extend({\n strokeContainThreshold: areaWidth\n }, axisLayout);\n var axisBuilder = new AxisBuilder(axisModel, api, builderOpt);\n axisBuilder.build();\n this._axisGroup.add(axisBuilder.group);\n this._refreshBrushController(builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api);\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n };\n // /**\n // * @override\n // */\n // updateVisual(axisModel, ecModel, api, payload) {\n // this._brushController && this._brushController\n // .updateCovers(getCoverInfoList(axisModel));\n // }\n ParallelAxisView.prototype._refreshBrushController = function (builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api) {\n // After filtering, axis may change, select area needs to be update.\n var extent = axisModel.axis.getExtent();\n var extentLen = extent[1] - extent[0];\n var extra = Math.min(30, Math.abs(extentLen) * 0.1); // Arbitrary value.\n // width/height might be negative, which will be\n // normalized in BoundingRect.\n var rect = graphic.BoundingRect.create({\n x: extent[0],\n y: -areaWidth / 2,\n width: extentLen,\n height: areaWidth\n });\n rect.x -= extra;\n rect.width += 2 * extra;\n this._brushController.mount({\n enableGlobalPan: true,\n rotation: builderOpt.rotation,\n x: builderOpt.position[0],\n y: builderOpt.position[1]\n }).setPanels([{\n panelId: 'pl',\n clipPath: brushHelper.makeRectPanelClipPath(rect),\n isTargetByCursor: brushHelper.makeRectIsTargetByCursor(rect, api, coordSysModel),\n getLinearBrushOtherExtent: brushHelper.makeLinearBrushOtherExtent(rect, 0)\n }]).enableBrush({\n brushType: 'lineX',\n brushStyle: areaSelectStyle,\n removeOnClick: true\n }).updateCovers(getCoverInfoList(axisModel));\n };\n ParallelAxisView.prototype._onBrush = function (eventParam) {\n var coverInfoList = eventParam.areas;\n // Do not cache these object, because the mey be changed.\n var axisModel = this.axisModel;\n var axis = axisModel.axis;\n var intervals = zrUtil.map(coverInfoList, function (coverInfo) {\n return [axis.coordToData(coverInfo.range[0], true), axis.coordToData(coverInfo.range[1], true)];\n });\n // If realtime is true, action is not dispatched on drag end, because\n // the drag end emits the same params with the last drag move event,\n // and may have some delay when using touch pad.\n if (!axisModel.option.realtime === eventParam.isEnd || eventParam.removeOnClick) {\n // jshint ignore:line\n this.api.dispatchAction({\n type: 'axisAreaSelect',\n parallelAxisId: axisModel.id,\n intervals: intervals\n });\n }\n };\n ParallelAxisView.prototype.dispose = function () {\n this._brushController.dispose();\n };\n ParallelAxisView.type = 'parallelAxis';\n return ParallelAxisView;\n}(ComponentView);\nfunction fromAxisAreaSelect(axisModel, ecModel, payload) {\n return payload && payload.type === 'axisAreaSelect' && ecModel.findComponents({\n mainType: 'parallelAxis',\n query: payload\n })[0] === axisModel;\n}\nfunction getCoverInfoList(axisModel) {\n var axis = axisModel.axis;\n return zrUtil.map(axisModel.activeIntervals, function (interval) {\n return {\n brushType: 'lineX',\n panelId: 'pl',\n range: [axis.dataToCoord(interval[0], true), axis.dataToCoord(interval[1], true)]\n };\n });\n}\nfunction getCoordSysModel(axisModel, ecModel) {\n return ecModel.getComponent('parallel', axisModel.get('parallelIndex'));\n}\nexport default ParallelAxisView;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar actionInfo = {\n type: 'axisAreaSelect',\n event: 'axisAreaSelected'\n // update: 'updateVisual'\n};\nexport function installParallelActions(registers) {\n registers.registerAction(actionInfo, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'parallelAxis',\n query: payload\n }, function (parallelAxisModel) {\n parallelAxisModel.axis.model.setActiveIntervals(payload.intervals);\n });\n });\n /**\n * @payload\n */\n registers.registerAction('parallelAxisExpand', function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'parallel',\n query: payload\n }, function (parallelModel) {\n parallelModel.setAxisExpand(payload);\n });\n });\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport parallelPreprocessor from '../../coord/parallel/parallelPreprocessor.js';\nimport ParallelView from './ParallelView.js';\nimport ParallelModel from '../../coord/parallel/ParallelModel.js';\nimport parallelCoordSysCreator from '../../coord/parallel/parallelCreator.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport ParallelAxisModel from '../../coord/parallel/AxisModel.js';\nimport ParallelAxisView from '../axis/ParallelAxisView.js';\nimport { installParallelActions } from '../axis/parallelAxisAction.js';\nvar defaultAxisOption = {\n type: 'value',\n areaSelectStyle: {\n width: 20,\n borderWidth: 1,\n borderColor: 'rgba(160,197,232)',\n color: 'rgba(160,197,232)',\n opacity: 0.3\n },\n realtime: true,\n z: 10\n};\nexport function install(registers) {\n registers.registerComponentView(ParallelView);\n registers.registerComponentModel(ParallelModel);\n registers.registerCoordinateSystem('parallel', parallelCoordSysCreator);\n registers.registerPreprocessor(parallelPreprocessor);\n registers.registerComponentModel(ParallelAxisModel);\n registers.registerComponentView(ParallelAxisView);\n axisModelCreator(registers, 'parallel', ParallelAxisModel, defaultAxisOption);\n installParallelActions(registers);\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { assert } from 'zrender/lib/core/util.js';\nimport { error } from './log.js';\nimport { UNDEFINED_STR } from './types.js';\nimport { MAX_SAFE_INTEGER } from './number.js';\n/* global Int8Array, Int16Array, Int32Array, Uint8Array, Uint16Array, Uint32Array,\n Uint8ClampedArray, Float32Array, Float64Array */\nexport var Int8ArrayCtor = typeof Int8Array !== UNDEFINED_STR ? Int8Array : undefined;\nexport var Int16ArrayCtor = typeof Int16Array !== UNDEFINED_STR ? Int16Array : undefined;\nexport var Int32ArrayCtor = typeof Int32Array !== UNDEFINED_STR ? Int32Array : undefined;\nexport var Uint8ArrayCtor = typeof Uint8Array !== UNDEFINED_STR ? Uint8Array : undefined;\nexport var Uint16ArrayCtor = typeof Uint16Array !== UNDEFINED_STR ? Uint16Array : undefined;\nexport var Uint32ArrayCtor = typeof Uint32Array !== UNDEFINED_STR ? Uint32Array : undefined;\nexport var Uint8ClampedArrayCtor = typeof Uint8ClampedArray !== UNDEFINED_STR ? Uint8ClampedArray : undefined;\nexport var Float32ArrayCtor = typeof Float32Array !== UNDEFINED_STR ? Float32Array : undefined;\nexport var Float64ArrayCtor = typeof Float64Array !== UNDEFINED_STR ? Float64Array : undefined;\nexport function createFloat32Array(capacity) {\n return tryEnsureTypedArray({\n ctor: Float32ArrayCtor\n }, capacity).arr;\n}\nexport function tryEnsureTypedArray(tyArr,\n// Can add more types if needed.\n// NOTICE: Callers need to manage data length themselves.\n// Do not consider `capacity` as the data length.\ncapacity) {\n if (process.env.NODE_ENV !== 'production') {\n assert(capacity != null && isFinite(capacity) && capacity >= 0 && tyArr.hasOwnProperty('ctor'));\n }\n var existingArr = tyArr.arr;\n var ctor = tyArr.ctor;\n if (capacity > MAX_SAFE_INTEGER) {\n capacity = MAX_SAFE_INTEGER;\n }\n if (!existingArr || tyArr.typed && existingArr.length < capacity) {\n var nextArr = void 0;\n if (ctor) {\n try {\n // A large contiguous memory allocation may cause OOM.\n nextArr = new ctor(capacity);\n tyArr.typed = true;\n existingArr && nextArr.set(existingArr);\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n error(e);\n }\n }\n }\n if (!nextArr) {\n nextArr = [];\n tyArr.typed = false;\n if (existingArr) {\n for (var i = 0, len = existingArr.length; i < len; i++) {\n nextArr[i] = existingArr[i];\n }\n }\n }\n tyArr.arr = nextArr;\n }\n return tyArr;\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createHashMap } from 'zrender/lib/core/util.js';\nimport { asc, isNullableNumberFinite } from '../util/number.js';\nimport { parseSanitizationFilter, passesSanitizationFilter } from '../data/helper/dataValueHelper.js';\nimport { tryEnsureTypedArray, Float64ArrayCtor } from '../util/vendor.js';\nimport { eachSeriesDealForAxisStat, LINEAR_POSITIVE_MIN_GAP_NO_VALID_VALUE, LINEAR_POSITIVE_MIN_GAP_SINGLE_VALID_VALUE, registerMetricImpl } from './axisStatistics.js';\nexport function registerMetricImplLiPosMinGap() {\n registerMetricImpl('liPosMinGap', metricLiPosMinGapImpl);\n}\nfunction metricLiPosMinGapImpl(ecModel, perKeyPerAxis, ecPreparePerKeyPerAxis) {\n var newSerUids = createHashMap();\n var ecPrepareSerUids = ecPreparePerKeyPerAxis.serUids;\n var ecPrepareLiPosMinGap = ecPreparePerKeyPerAxis.liPosMinGap;\n var ecPrepareCacheMiss;\n var axis = perKeyPerAxis.axis;\n var scale = axis.scale;\n // const linearValueExtent = initExtentForUnion();\n var needTransform = scale.needTransform();\n var filter = scale.getFilter ? scale.getFilter() : null;\n var filterParsed = parseSanitizationFilter(filter);\n // const timeRetrieve: number[] = []; // _EC_PERF_\n // const timeSort: number[] = []; // _EC_PERF_\n // const timeAll: number[] = []; // _EC_PERF_\n // timeAll[0] = Date.now(); // _EC_PERF_\n function eachSeries(cb) {\n eachSeriesDealForAxisStat(ecModel, perKeyPerAxis.sers, function (seriesModel) {\n var rawData = seriesModel.getRawData();\n // NOTE: Currently there is no series that a \"base axis\" can map to multiple dimensions.\n var dimStoreIdx = rawData.getDimensionIndex(rawData.mapDimension(axis.dim));\n if (dimStoreIdx >= 0) {\n cb(dimStoreIdx, seriesModel, rawData.getStore());\n }\n });\n }\n var bufferCapacity = 0;\n eachSeries(function (dimStoreIdx, seriesModel, rawDataStore) {\n newSerUids.set(seriesModel.uid, 1);\n if (!ecPrepareSerUids || !ecPrepareSerUids.hasKey(seriesModel.uid)) {\n ecPrepareCacheMiss = true;\n }\n bufferCapacity += rawDataStore.count();\n });\n if (!ecPrepareSerUids || ecPrepareSerUids.keys().length !== newSerUids.keys().length) {\n ecPrepareCacheMiss = true;\n }\n if (!ecPrepareCacheMiss && ecPrepareLiPosMinGap != null) {\n // Consider the fact in practice:\n // - Series data can only be changed in EC_PREPARE.\n // - The relationship between series and axes can only be changed in EC_PREPARE and\n // SERIES_FILTER.\n // (See EC_CYCLE for more info)\n // Therefore, some statistics results can be cached in `GlobalModelCachePerECPrepare` to avoid\n // repeated time-consuming calculation for large data (e.g., over 1e5 data items).\n perKeyPerAxis.liPosMinGap = ecPrepareLiPosMinGap;\n return;\n }\n tryEnsureTypedArray(tmpValueBuffer, bufferCapacity);\n // timeRetrieve[0] = Date.now(); // _EC_PERF_\n var writeIdx = 0;\n eachSeries(function (dimStoreIdx, seriesModel, store) {\n // NOTE: It appears to be optimized by traveling only in a specific window (e.g., the current window)\n // instead of the entire data, but that would likely generate inconsistent result and bring\n // jitter when dataZoom roaming.\n for (var i = 0, cnt = store.count(); i < cnt; ++i) {\n // Manually inline some code for performance, since no other optimization\n // (such as, progressive) can be applied here.\n var val = store.get(dimStoreIdx, i);\n // NOTE: in most cases, filter does not exist.\n if (isFinite(val) && (!filter || passesSanitizationFilter(filterParsed, val))) {\n if (needTransform) {\n // PENDING: time-consuming if axis break is applied.\n val = scale.transformIn(val, null);\n }\n tmpValueBuffer.arr[writeIdx++] = val;\n // val < linearValueExtent[0] && (linearValueExtent[0] = val);\n // val > linearValueExtent[1] && (linearValueExtent[1] = val);\n }\n }\n });\n // Indicatively, retrieving values above costs 40ms for 1e6 values in a certain platform.\n // timeRetrieve[1] = Date.now(); // _EC_PERF_\n var tmpValueBufferView = tmpValueBuffer.typed ? tmpValueBuffer.arr.subarray(0, writeIdx) : (tmpValueBuffer.arr.length = writeIdx, tmpValueBuffer.arr);\n // timeSort[0] = Date.now(); // _EC_PERF_\n // Sort axis values into ascending order to calculate gaps.\n if (tmpValueBuffer.typed) {\n // Indicatively, 5ms for 1e6 values in a certain platform.\n tmpValueBufferView.sort();\n } else {\n asc(tmpValueBufferView);\n }\n // timeAll[1] = timeSort[1] = Date.now(); // _EC_PERF_\n // console.log('axisStatistics_minGap_retrieve', timeRetrieve[1] - timeRetrieve[0]); // _EC_PERF_\n // console.log('axisStatistics_minGap_sort', timeSort[1] - timeSort[0]); // _EC_PERF_\n // console.log('axisStatistics_minGap_all', timeAll[1] - timeAll[0]); // _EC_PERF_\n var min = Infinity;\n for (var j = 1; j < writeIdx; ++j) {\n var delta = tmpValueBufferView[j] - tmpValueBufferView[j - 1];\n if (\n // - Different series normally have the same values (e.g., barA, barB, barC),\n // which should be ignored.\n // - A single series with multiple same values is often not meaningful to\n // create `bandWidth`, so it is also ignored.\n delta > 0 && delta < min) {\n min = delta;\n }\n }\n ecPreparePerKeyPerAxis.liPosMinGap = perKeyPerAxis.liPosMinGap = isNullableNumberFinite(min) ? min : writeIdx > 0 ? LINEAR_POSITIVE_MIN_GAP_SINGLE_VALID_VALUE : LINEAR_POSITIVE_MIN_GAP_NO_VALID_VALUE;\n ecPreparePerKeyPerAxis.serUids = newSerUids;\n}\n// For performance optimization.\nvar tmpValueBuffer = tryEnsureTypedArray({\n ctor: Float64ArrayCtor\n}, 50 // An arbitrary initial capability.\n);", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { calcBandWidth } from '../../coord/axisBand.js';\nimport { AXIS_STAT_KEY_DELIMITER } from '../../coord/axisStatistics.js';\nimport { registerMetricImplLiPosMinGap } from '../../coord/axisStatisticsMetricsImpl.js';\nimport { isOrdinalScale } from '../../scale/helper.js';\nimport { isNullableNumberFinite } from '../../util/number.js';\n/**\n * Require `requireAxisStatistics`.\n *\n * Simply expand `Scale` extent by half bandWidth.\n * Do nothing if an `OrdinalScale` has `boundaryGap: true`.\n */\nexport function createBandWidthBasedAxisContainShapeHandler(axisStatKey) {\n // [AXIS_CONTAIN_SHAPE_COMMON_STRATEGY]:\n // The calculation below is based on a proportion mapping\n // from `[barsBoundVal[0], barsBoundVal[1]]` to `[minValNew, maxValNew]`:\n // |------|------------------------------|---|\n // barsBoundVal[0] minValOld maxValOld barsBoundVal[1]\n // |----|----------------------|--|\n // minValNew minValOld maxValOld maxValNew\n // (Note: `|---|` above represents \"pixels\" rather than \"data\".)\n return function (axis, ecModel) {\n var bandWidthResult = calcBandWidth(axis, {\n fromStat: {\n key: axisStatKey\n }\n });\n if (isNullableNumberFinite(bandWidthResult.w2)) {\n return [-bandWidthResult.w2 / 2, bandWidthResult.w2 / 2];\n }\n };\n}\n/**\n * A pre-built `makeAxisStatKey`.\n * See `makeAxisStatKey2`. Use two functions rather than a optional parameter to impose checking.\n */\nexport function makeAxisStatKey(seriesType) {\n return seriesType + AXIS_STAT_KEY_DELIMITER;\n}\nexport function makeAxisStatKey2(seriesType, coordSysType) {\n return seriesType + AXIS_STAT_KEY_DELIMITER + coordSysType;\n}\n/**\n * A pre-built `getMetrics`.\n */\nexport function createMetricsNonOrdinalLinearPositiveMinGap(axis) {\n registerMetricImplLiPosMinGap();\n return {\n // non-category scale do not use `liPosMinGap` to calculate `bandWidth`.\n liPosMinGap: !isOrdinalScale(axis.scale)\n };\n}\n;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { assert } from 'zrender/lib/core/util.js';\nimport { createMetricsNonOrdinalLinearPositiveMinGap } from '../chart/helper/axisSnippets.js';\nimport { requireAxisStatistics } from '../coord/axisStatistics.js';\nimport { isNullableNumberFinite } from '../util/number.js';\nexport var SERIES_TYPE_BAR = 'bar';\nexport var SERIES_TYPE_PICTORIAL_BAR = 'pictorialBar';\nexport function requireAxisStatisticsForBaseBar(registers, axisStatKey, seriesType, coordSysType) {\n requireAxisStatistics(registers, {\n key: axisStatKey,\n seriesType: seriesType,\n coordSysType: coordSysType,\n getMetrics: createMetricsNonOrdinalLinearPositiveMinGap\n });\n}\n// See cases in `test/bar-start.html` and `#7412`, `#8747`.\nexport function getStartValue(baseAxis) {\n var val = baseAxis.scale.rawExtentInfo.makeRenderInfo().startValue;\n if (process.env.NODE_ENV !== 'production') {\n assert(isNullableNumberFinite(val));\n }\n return val;\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport { mixin } from 'zrender/lib/core/util.js';\n// PENDING: For historical reason,\n// in ec option:\n// It can only declare as `series:{coordinateSystem: \"singleAxis\", ...}`\n// rather than 'single'. Therefore every `.get('coordinateSystem')` must\n// match \"singleAxis\". (See `referHelper.ts`)\n// And the component name can only be `singleAxis: {...}`.\n// But the internal convention uses 'singe' as coordinate system name\n// and dimension name.\nexport var COORD_SYS_TYPE_SINGLE = 'single';\nexport var COORD_SYS_TYPE_SINGLE_AXIS_COMPATIBLE = 'singleAxis';\nexport var COMPONENT_TYPE_SINGLE_AXIS = 'singleAxis';\nvar SingleAxisModel = /** @class */function (_super) {\n __extends(SingleAxisModel, _super);\n function SingleAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SingleAxisModel.type;\n return _this;\n }\n SingleAxisModel.prototype.getCoordSysModel = function () {\n return this;\n };\n SingleAxisModel.type = COMPONENT_TYPE_SINGLE_AXIS;\n SingleAxisModel.layoutMode = 'box';\n SingleAxisModel.defaultOption = {\n left: '5%',\n top: '5%',\n right: '5%',\n bottom: '5%',\n type: 'value',\n position: 'bottom',\n orient: 'horizontal',\n axisLine: {\n show: true,\n lineStyle: {\n width: 1,\n type: 'solid'\n }\n },\n // Single coordinate system and single axis is the,\n // which is used as the parent tooltip model.\n // same model, so we set default tooltip show as true.\n tooltip: {\n show: true\n },\n axisTick: {\n show: true,\n length: 6,\n lineStyle: {\n width: 1\n }\n },\n axisLabel: {\n show: true,\n interval: 'auto'\n },\n splitLine: {\n show: true,\n lineStyle: {\n type: 'dashed',\n opacity: 0.2\n }\n },\n jitter: 0,\n jitterOverlap: true,\n jitterMargin: 2\n };\n return SingleAxisModel;\n}(ComponentModel);\nmixin(SingleAxisModel, AxisModelCommonMixin.prototype);\nexport default SingleAxisModel;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { retrieveRawValue } from '../../data/helper/dataProvider.js';\nimport { isArray } from 'zrender/lib/core/util.js';\n/**\n * @return label string. Not null/undefined\n */\nexport function getDefaultLabel(data, dataIndex) {\n var labelDims = data.mapDimensionsAll('defaultedLabel');\n var len = labelDims.length;\n // Simple optimization (in lots of cases, label dims length is 1)\n if (len === 1) {\n var rawVal = retrieveRawValue(data, dataIndex, labelDims[0]);\n return rawVal != null ? rawVal + '' : null;\n } else if (len) {\n var vals = [];\n for (var i = 0; i < labelDims.length; i++) {\n vals.push(retrieveRawValue(data, dataIndex, labelDims[i]));\n }\n return vals.join(' ');\n }\n}\nexport function getDefaultInterpolatedLabel(data, interpolatedValue) {\n var labelDims = data.mapDimensionsAll('defaultedLabel');\n if (!isArray(interpolatedValue)) {\n return interpolatedValue + '';\n }\n var vals = [];\n for (var i = 0; i < labelDims.length; i++) {\n var dimIndex = data.getDimensionIndex(labelDims[i]);\n if (dimIndex >= 0) {\n vals.push(interpolatedValue[dimIndex]);\n }\n }\n return vals.join(' ');\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { createSymbol, normalizeSymbolOffset, normalizeSymbolSize } from '../../util/symbol.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { enterEmphasis, leaveEmphasis, toggleHoverEmphasis } from '../../util/states.js';\nimport { getDefaultLabel } from './labelHelper.js';\nimport { extend, retrieve2 } from 'zrender/lib/core/util.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar Symbol = /** @class */function (_super) {\n __extends(Symbol, _super);\n function Symbol(data, idx, seriesScope, opts) {\n var _this = _super.call(this) || this;\n _this.updateData(data, idx, seriesScope, opts);\n return _this;\n }\n Symbol.prototype._createSymbol = function (symbolType, data, idx, symbolSize, z2, keepAspect) {\n // Remove paths created before\n this.removeAll();\n // let symbolPath = createSymbol(\n // symbolType, -0.5, -0.5, 1, 1, color\n // );\n // If width/height are set too small (e.g., set to 1) on ios10\n // and macOS Sierra, a circle stroke become a rect, no matter what\n // the scale is set. So we set width/height as 2. See #4150.\n var symbolPath = createSymbol(symbolType, -1, -1, 2, 2, null, keepAspect);\n symbolPath.attr({\n z2: retrieve2(z2, 100),\n culling: true,\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2\n });\n // Rewrite drift method\n symbolPath.drift = driftSymbol;\n this._symbolType = symbolType;\n this.add(symbolPath);\n };\n /**\n * Stop animation\n * @param {boolean} toLastFrame\n */\n Symbol.prototype.stopSymbolAnimation = function (toLastFrame) {\n this.childAt(0).stopAnimation(null, toLastFrame);\n };\n Symbol.prototype.getSymbolType = function () {\n return this._symbolType;\n };\n /**\n * FIXME:\n * Caution: This method breaks the encapsulation of this module,\n * but it indeed brings convenience. So do not use the method\n * unless you detailedly know all the implements of `Symbol`,\n * especially animation.\n *\n * Get symbol path element.\n */\n Symbol.prototype.getSymbolPath = function () {\n return this.childAt(0);\n };\n /**\n * Highlight symbol\n */\n Symbol.prototype.highlight = function () {\n enterEmphasis(this.childAt(0));\n };\n /**\n * Downplay symbol\n */\n Symbol.prototype.downplay = function () {\n leaveEmphasis(this.childAt(0));\n };\n /**\n * @param {number} zlevel\n * @param {number} z\n */\n Symbol.prototype.setZ = function (zlevel, z) {\n var symbolPath = this.childAt(0);\n symbolPath.zlevel = zlevel;\n symbolPath.z = z;\n };\n Symbol.prototype.setDraggable = function (draggable, hasCursorOption) {\n var symbolPath = this.childAt(0);\n symbolPath.draggable = draggable;\n symbolPath.cursor = !hasCursorOption && draggable ? 'move' : symbolPath.cursor;\n };\n /**\n * Update symbol properties\n */\n Symbol.prototype.updateData = function (data, idx, seriesScope, opts) {\n this.silent = false;\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n var seriesModel = data.hostModel;\n var symbolSize = Symbol.getSymbolSize(data, idx);\n var z2 = Symbol.getSymbolZ2(data, idx);\n var isInit = symbolType !== this._symbolType;\n var disableAnimation = opts && opts.disableAnimation;\n if (isInit) {\n var keepAspect = data.getItemVisual(idx, 'symbolKeepAspect');\n this._createSymbol(symbolType, data, idx, symbolSize, z2, keepAspect);\n } else {\n var symbolPath = this.childAt(0);\n symbolPath.silent = false;\n var target = {\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2\n };\n disableAnimation ? symbolPath.attr(target) : graphic.updateProps(symbolPath, target, seriesModel, idx);\n saveOldStyle(symbolPath);\n }\n this._updateCommon(data, idx, symbolSize, seriesScope, opts);\n if (isInit) {\n var symbolPath = this.childAt(0);\n if (!disableAnimation) {\n var target = {\n scaleX: this._sizeX,\n scaleY: this._sizeY,\n style: {\n // Always fadeIn. Because it has fadeOut animation when symbol is removed..\n opacity: symbolPath.style.opacity\n }\n };\n symbolPath.scaleX = symbolPath.scaleY = 0;\n symbolPath.style.opacity = 0;\n graphic.initProps(symbolPath, target, seriesModel, idx);\n }\n }\n if (disableAnimation) {\n // Must stop leave transition manually if don't call initProps or updateProps.\n this.childAt(0).stopAnimation('leave');\n }\n };\n Symbol.prototype._updateCommon = function (data, idx, symbolSize, seriesScope, opts) {\n var symbolPath = this.childAt(0);\n var seriesModel = data.hostModel;\n var emphasisItemStyle;\n var blurItemStyle;\n var selectItemStyle;\n var focus;\n var blurScope;\n var emphasisDisabled;\n var labelStatesModels;\n var hoverScale;\n var cursorStyle;\n if (seriesScope) {\n emphasisItemStyle = seriesScope.emphasisItemStyle;\n blurItemStyle = seriesScope.blurItemStyle;\n selectItemStyle = seriesScope.selectItemStyle;\n focus = seriesScope.focus;\n blurScope = seriesScope.blurScope;\n labelStatesModels = seriesScope.labelStatesModels;\n hoverScale = seriesScope.hoverScale;\n cursorStyle = seriesScope.cursorStyle;\n emphasisDisabled = seriesScope.emphasisDisabled;\n }\n if (!seriesScope || data.hasItemOption) {\n var itemModel = seriesScope && seriesScope.itemModel ? seriesScope.itemModel : data.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n emphasisItemStyle = emphasisModel.getModel('itemStyle').getItemStyle();\n selectItemStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle();\n blurItemStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle();\n focus = emphasisModel.get('focus');\n blurScope = emphasisModel.get('blurScope');\n emphasisDisabled = emphasisModel.get('disabled');\n labelStatesModels = getLabelStatesModels(itemModel);\n hoverScale = emphasisModel.getShallow('scale');\n cursorStyle = itemModel.getShallow('cursor');\n }\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate');\n symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);\n var symbolOffset = normalizeSymbolOffset(data.getItemVisual(idx, 'symbolOffset'), symbolSize);\n if (symbolOffset) {\n symbolPath.x = symbolOffset[0];\n symbolPath.y = symbolOffset[1];\n }\n cursorStyle && symbolPath.attr('cursor', cursorStyle);\n var symbolStyle = data.getItemVisual(idx, 'style');\n var visualColor = symbolStyle.fill;\n if (symbolPath instanceof ZRImage) {\n var pathStyle = symbolPath.style;\n symbolPath.useStyle(extend({\n // TODO other properties like x, y ?\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, symbolStyle));\n } else {\n if (symbolPath.__isEmptyBrush) {\n // fill and stroke will be swapped if it's empty.\n // So we cloned a new style to avoid it affecting the original style in visual storage.\n // TODO Better implementation. No empty logic!\n symbolPath.useStyle(extend({}, symbolStyle));\n } else {\n symbolPath.useStyle(symbolStyle);\n }\n // Disable decal because symbol scale will been applied on the decal.\n symbolPath.style.decal = null;\n symbolPath.setColor(visualColor, opts && opts.symbolInnerColor);\n symbolPath.style.strokeNoScale = true;\n }\n var liftZ = data.getItemVisual(idx, 'liftZ');\n var z2Origin = this._z2;\n if (liftZ != null) {\n if (z2Origin == null) {\n this._z2 = symbolPath.z2;\n symbolPath.z2 += liftZ;\n }\n } else if (z2Origin != null) {\n symbolPath.z2 = z2Origin;\n this._z2 = null;\n }\n var useNameLabel = opts && opts.useNameLabel;\n setLabelStyle(symbolPath, labelStatesModels, {\n labelFetcher: seriesModel,\n labelDataIndex: idx,\n defaultText: getLabelDefaultText,\n inheritColor: visualColor,\n defaultOpacity: symbolStyle.opacity\n });\n // Do not execute util needed.\n function getLabelDefaultText(idx) {\n return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx);\n }\n this._sizeX = symbolSize[0] / 2;\n this._sizeY = symbolSize[1] / 2;\n var emphasisState = symbolPath.ensureState('emphasis');\n emphasisState.style = emphasisItemStyle;\n symbolPath.ensureState('select').style = selectItemStyle;\n symbolPath.ensureState('blur').style = blurItemStyle;\n // null / undefined / true means to use default strategy.\n // 0 / false / negative number / NaN / Infinity means no scale.\n var scaleRatio = hoverScale == null || hoverScale === true ? Math.max(1.1, 3 / this._sizeY)\n // PENDING: restrict hoverScale > 1? It seems unreasonable to scale down\n : isFinite(hoverScale) && hoverScale > 0 ? +hoverScale : 1;\n // always set scale to allow resetting\n emphasisState.scaleX = this._sizeX * scaleRatio;\n emphasisState.scaleY = this._sizeY * scaleRatio;\n this.setSymbolScale(1);\n toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);\n };\n Symbol.prototype.setSymbolScale = function (scale) {\n this.scaleX = this.scaleY = scale;\n };\n Symbol.prototype.fadeOut = function (cb, seriesModel, opt) {\n var symbolPath = this.childAt(0);\n var dataIndex = getECData(this).dataIndex;\n var animationOpt = opt && opt.animation;\n // Avoid mistaken hover when fading out\n this.silent = symbolPath.silent = true;\n // Not show text when animating\n if (opt && opt.fadeLabel) {\n var textContent = symbolPath.getTextContent();\n if (textContent) {\n graphic.removeElement(textContent, {\n style: {\n opacity: 0\n }\n }, seriesModel, {\n dataIndex: dataIndex,\n removeOpt: animationOpt,\n cb: function () {\n symbolPath.removeTextContent();\n }\n });\n }\n } else {\n symbolPath.removeTextContent();\n }\n graphic.removeElement(symbolPath, {\n style: {\n opacity: 0\n },\n scaleX: 0,\n scaleY: 0\n }, seriesModel, {\n dataIndex: dataIndex,\n cb: cb,\n removeOpt: animationOpt\n });\n };\n Symbol.getSymbolSize = function (data, idx) {\n return normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n };\n Symbol.getSymbolZ2 = function (data, idx) {\n return data.getItemVisual(idx, 'z2');\n };\n return Symbol;\n}(graphic.Group);\nfunction driftSymbol(dx, dy) {\n this.parent.drift(dx, dy);\n}\nexport default Symbol;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport SymbolClz from './Symbol.js';\nimport { isObject } from 'zrender/lib/core/util.js';\nimport { getLabelStatesModels } from '../../label/labelStyle.js';\nfunction symbolNeedsDraw(data, point, idx, opt) {\n return point && !isNaN(point[0]) && !isNaN(point[1]) && !(opt && opt.isIgnore && opt.isIgnore(idx))\n // We do not set clipShape on group, because it will cut part of\n // the symbol element shape. We use the same clip shape here as\n // the line clip.\n && !(opt && opt.clipShape && !opt.clipShape.contain(point[0], point[1])) && data.getItemVisual(idx, 'symbol') !== 'none';\n}\nfunction normalizeUpdateOpt(opt) {\n if (opt != null && !isObject(opt)) {\n opt = {\n isIgnore: opt\n };\n }\n return opt || {};\n}\nfunction makeSeriesScope(data) {\n var seriesModel = data.hostModel;\n var emphasisModel = seriesModel.getModel('emphasis');\n return {\n emphasisItemStyle: emphasisModel.getModel('itemStyle').getItemStyle(),\n blurItemStyle: seriesModel.getModel(['blur', 'itemStyle']).getItemStyle(),\n selectItemStyle: seriesModel.getModel(['select', 'itemStyle']).getItemStyle(),\n focus: emphasisModel.get('focus'),\n blurScope: emphasisModel.get('blurScope'),\n emphasisDisabled: emphasisModel.get('disabled'),\n hoverScale: emphasisModel.get('scale'),\n labelStatesModels: getLabelStatesModels(seriesModel),\n cursorStyle: seriesModel.get('cursor')\n };\n}\nfunction createEl(SymbolCtor, data, newIdx, seriesScope, symbolUpdateOpt, point, group) {\n var symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt);\n symbolEl.setPosition(point);\n data.setItemGraphicEl(newIdx, symbolEl);\n group.add(symbolEl);\n return symbolEl;\n}\nvar SymbolDraw = /** @class */function () {\n function SymbolDraw(SymbolCtor) {\n this.group = new graphic.Group();\n this._SymbolCtor = SymbolCtor || SymbolClz;\n }\n /**\n * Update symbols draw by new data\n */\n SymbolDraw.prototype.updateData = function (data, opt) {\n // Remove progressive els.\n this._progressiveEls = null;\n opt = normalizeUpdateOpt(opt);\n var group = this.group;\n var seriesModel = data.hostModel;\n var oldData = this._data;\n var SymbolCtor = this._SymbolCtor;\n var disableAnimation = opt.disableAnimation;\n var seriesScope = this._seriesScope = makeSeriesScope(data);\n var symbolUpdateOpt = {\n disableAnimation: disableAnimation\n };\n var getSymbolPoint = opt.getSymbolPoint || function (idx) {\n return data.getItemLayout(idx);\n };\n // There is no oldLineData only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!oldData) {\n group.removeAll();\n }\n data.diff(oldData).add(function (newIdx) {\n var point = getSymbolPoint(newIdx);\n if (symbolNeedsDraw(data, point, newIdx, opt)) {\n createEl(SymbolCtor, data, newIdx, seriesScope, symbolUpdateOpt, point, group);\n }\n }).update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n var point = getSymbolPoint(newIdx);\n if (!symbolNeedsDraw(data, point, newIdx, opt)) {\n group.remove(symbolEl);\n return;\n }\n var newSymbolType = data.getItemVisual(newIdx, 'symbol') || 'circle';\n var oldSymbolType = symbolEl && symbolEl.getSymbolType && symbolEl.getSymbolType();\n if (!symbolEl\n // Create a new if symbol type changed.\n || oldSymbolType && oldSymbolType !== newSymbolType) {\n group.remove(symbolEl);\n symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt);\n symbolEl.setPosition(point);\n } else {\n symbolEl.updateData(data, newIdx, seriesScope, symbolUpdateOpt);\n var target = {\n x: point[0],\n y: point[1]\n };\n disableAnimation ? symbolEl.attr(target) : graphic.updateProps(symbolEl, target, seriesModel);\n }\n // Add back\n group.add(symbolEl);\n data.setItemGraphicEl(newIdx, symbolEl);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && el.fadeOut(function () {\n group.remove(el);\n }, seriesModel);\n }).execute();\n this._getSymbolPoint = getSymbolPoint;\n this._data = data;\n };\n ;\n SymbolDraw.prototype.updateLayout = function (opt) {\n var data = this._data;\n if (!data) {\n return;\n }\n var symbolDraw = this;\n var store = data.getStore();\n for (var idx = 0, len = store.count(); idx < len; idx++) {\n var el = data.getItemGraphicEl(idx);\n var point = symbolDraw._getSymbolPoint(idx);\n // FIXME: [FIXME_SYMBOL_CLIP_CONSIDERING_COORD_SYS_ALIGNMENT_DURING_ANIMATION]\n // See VIEW_COORD_SYS animation (by center/zoom change) and FIXME_VIEW_COORD_SYS_SYNC_BACK.\n // If we create symbols when roaming them into the clip area, they can not be laid out\n // based on the intermediate state but can only based on the final state of VIEW_COORD_SYS,\n // and introduce visual artifacts.\n // Consider clip, need to handle create or remove.\n if (symbolNeedsDraw(data, point, idx, opt)) {\n el = el || createEl(symbolDraw._SymbolCtor, data, idx, symbolDraw._seriesScope, {\n disableAnimation: true\n }, point, symbolDraw.group);\n el.stopAnimation();\n el.setPosition(point);\n el.markRedraw();\n } else if (el) {\n symbolDraw.group.remove(el);\n data.setItemGraphicEl(idx, null);\n }\n }\n };\n ;\n SymbolDraw.prototype.incrementalPrepareUpdate = function (data) {\n this._seriesScope = makeSeriesScope(data);\n this._data = null;\n this.group.removeAll();\n };\n ;\n SymbolDraw.prototype.incrementalUpdate = function (taskParams, data, incrementalId, opt) {\n // Clear\n this._progressiveEls = [];\n opt = normalizeUpdateOpt(opt);\n function updateIncrementalAndHover(el) {\n if (!el.isGroup) {\n el.incremental = incrementalId;\n el.ensureState('emphasis').hoverLayer = graphic.HOVER_LAYER_FOR_INCREMENTAL;\n }\n }\n for (var idx = taskParams.start; idx < taskParams.end; idx++) {\n var point = data.getItemLayout(idx);\n if (symbolNeedsDraw(data, point, idx, opt)) {\n var el = new this._SymbolCtor(data, idx, this._seriesScope);\n el.traverse(updateIncrementalAndHover);\n el.setPosition(point);\n this.group.add(el);\n data.setItemGraphicEl(idx, el);\n this._progressiveEls.push(el);\n }\n }\n };\n ;\n SymbolDraw.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n SymbolDraw.prototype.remove = function (enableAnimation) {\n var group = this.group;\n var data = this._data;\n // Incremental model do not have this._data.\n if (data && enableAnimation) {\n data.eachItemGraphicEl(function (el) {\n el.fadeOut(function () {\n group.remove(el);\n }, data.hostModel);\n });\n } else {\n group.removeAll();\n }\n };\n ;\n return SymbolDraw;\n}();\nexport default SymbolDraw;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport function isCoordinateSystemType(coordSys, type) {\n return coordSys.type === type;\n}\nexport function isGeoLikeCoordSys(coordSys) {\n var dimensions = coordSys.dimensions;\n // Not use coordSys.type === 'geo' because coordSys maybe extended\n return dimensions[0] === 'lng' && dimensions[1] === 'lat' && !!coordSys.getViewRect;\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, hasOwn } from 'zrender/lib/core/util.js';\nimport tokens from '../visual/tokens.js';\nvar deprecatedLogs = {};\n/**\n * Whether need to call `convertEC4CompatibleStyle`.\n */\nexport function isEC4CompatibleStyle(style, elType, hasOwnTextContentOption, hasOwnTextConfig) {\n // Since echarts5, `RectText` is separated from its host element and style.text\n // does not exist any more. The compat work brings some extra burden on performance.\n // So we provide:\n // `legacy: true` force make compat.\n // `legacy: false`, force do not compat.\n // `legacy` not set: auto detect whether legacy.\n // But in this case we do not compat (difficult to detect and rare case):\n // Because custom series and graphic component support \"merge\", users may firstly\n // only set `textStrokeWidth` style or secondly only set `text`.\n return style && (style.legacy || style.legacy !== false && !hasOwnTextContentOption && !hasOwnTextConfig && elType !== 'tspan'\n // Difficult to detect whether legacy for a \"text\" el.\n && (elType === 'text' || hasOwn(style, 'text')));\n}\n/**\n * `EC4CompatibleStyle` is style that might be in echarts4 format or echarts5 format.\n * @param hostStyle The properties might be modified.\n * @return If be text el, `textContentStyle` and `textConfig` will not be returned.\n * Otherwise a `textContentStyle` and `textConfig` will be created, whose props area\n * retried from the `hostStyle`.\n */\nexport function convertFromEC4CompatibleStyle(hostStyle, elType, isNormal) {\n var srcStyle = hostStyle;\n var textConfig;\n var textContent;\n var textContentStyle;\n if (elType === 'text') {\n textContentStyle = srcStyle;\n } else {\n textContentStyle = {};\n hasOwn(srcStyle, 'text') && (textContentStyle.text = srcStyle.text);\n hasOwn(srcStyle, 'rich') && (textContentStyle.rich = srcStyle.rich);\n hasOwn(srcStyle, 'textFill') && (textContentStyle.fill = srcStyle.textFill);\n hasOwn(srcStyle, 'textStroke') && (textContentStyle.stroke = srcStyle.textStroke);\n hasOwn(srcStyle, 'fontFamily') && (textContentStyle.fontFamily = srcStyle.fontFamily);\n hasOwn(srcStyle, 'fontSize') && (textContentStyle.fontSize = srcStyle.fontSize);\n hasOwn(srcStyle, 'fontStyle') && (textContentStyle.fontStyle = srcStyle.fontStyle);\n hasOwn(srcStyle, 'fontWeight') && (textContentStyle.fontWeight = srcStyle.fontWeight);\n textContent = {\n type: 'text',\n style: textContentStyle,\n // ec4 does not support rectText trigger.\n // And when text position is different in normal and emphasis\n // => hover text trigger emphasis;\n // => text position changed, leave mouse pointer immediately;\n // That might cause incorrect state.\n silent: true\n };\n textConfig = {};\n var hasOwnPos = hasOwn(srcStyle, 'textPosition');\n if (isNormal) {\n textConfig.position = hasOwnPos ? srcStyle.textPosition : 'inside';\n } else {\n hasOwnPos && (textConfig.position = srcStyle.textPosition);\n }\n hasOwn(srcStyle, 'textPosition') && (textConfig.position = srcStyle.textPosition);\n hasOwn(srcStyle, 'textOffset') && (textConfig.offset = srcStyle.textOffset);\n hasOwn(srcStyle, 'textRotation') && (textConfig.rotation = srcStyle.textRotation);\n hasOwn(srcStyle, 'textDistance') && (textConfig.distance = srcStyle.textDistance);\n }\n convertEC4CompatibleRichItem(textContentStyle, hostStyle);\n each(textContentStyle.rich, function (richItem) {\n convertEC4CompatibleRichItem(richItem, richItem);\n });\n return {\n textConfig: textConfig,\n textContent: textContent\n };\n}\n/**\n * The result will be set to `out`.\n */\nfunction convertEC4CompatibleRichItem(out, richItem) {\n if (!richItem) {\n return;\n }\n // (1) For simplicity, make textXXX properties (deprecated since ec5) has\n // higher priority. For example, consider in ec4 `borderColor: 5, textBorderColor: 10`\n // on a rect means `borderColor: 4` on the rect and `borderColor: 10` on an attached\n // richText in ec5.\n // (2) `out === richItem` if and only if `out` is text el or rich item.\n // So we can overwrite existing props in `out` since textXXX has higher priority.\n richItem.font = richItem.textFont || richItem.font;\n hasOwn(richItem, 'textStrokeWidth') && (out.lineWidth = richItem.textStrokeWidth);\n hasOwn(richItem, 'textAlign') && (out.align = richItem.textAlign);\n hasOwn(richItem, 'textVerticalAlign') && (out.verticalAlign = richItem.textVerticalAlign);\n hasOwn(richItem, 'textLineHeight') && (out.lineHeight = richItem.textLineHeight);\n hasOwn(richItem, 'textWidth') && (out.width = richItem.textWidth);\n hasOwn(richItem, 'textHeight') && (out.height = richItem.textHeight);\n hasOwn(richItem, 'textBackgroundColor') && (out.backgroundColor = richItem.textBackgroundColor);\n hasOwn(richItem, 'textPadding') && (out.padding = richItem.textPadding);\n hasOwn(richItem, 'textBorderColor') && (out.borderColor = richItem.textBorderColor);\n hasOwn(richItem, 'textBorderWidth') && (out.borderWidth = richItem.textBorderWidth);\n hasOwn(richItem, 'textBorderRadius') && (out.borderRadius = richItem.textBorderRadius);\n hasOwn(richItem, 'textBoxShadowColor') && (out.shadowColor = richItem.textBoxShadowColor);\n hasOwn(richItem, 'textBoxShadowBlur') && (out.shadowBlur = richItem.textBoxShadowBlur);\n hasOwn(richItem, 'textBoxShadowOffsetX') && (out.shadowOffsetX = richItem.textBoxShadowOffsetX);\n hasOwn(richItem, 'textBoxShadowOffsetY') && (out.shadowOffsetY = richItem.textBoxShadowOffsetY);\n}\n/**\n * Convert to pure echarts4 format style.\n * `itemStyle` will be modified, added with ec4 style properties from\n * `textStyle` and `textConfig`.\n *\n * [Caveat]: For simplicity, `insideRollback` in ec4 does not compat, where\n * `styleEmphasis: {textFill: 'red'}` will remove the normal auto added stroke.\n */\nexport function convertToEC4StyleForCustomSerise(itemStl, txStl, txCfg) {\n var out = itemStl;\n // See `custom.ts`, a trick to set extra `textPosition` firstly.\n out.textPosition = out.textPosition || txCfg.position || 'inside';\n txCfg.offset != null && (out.textOffset = txCfg.offset);\n txCfg.rotation != null && (out.textRotation = txCfg.rotation);\n txCfg.distance != null && (out.textDistance = txCfg.distance);\n var isInside = out.textPosition.indexOf('inside') >= 0;\n var hostFill = itemStl.fill || tokens.color.neutral99;\n convertToEC4RichItem(out, txStl);\n var textFillNotSet = out.textFill == null;\n if (isInside) {\n if (textFillNotSet) {\n out.textFill = txCfg.insideFill || tokens.color.neutral00;\n !out.textStroke && txCfg.insideStroke && (out.textStroke = txCfg.insideStroke);\n !out.textStroke && (out.textStroke = hostFill);\n out.textStrokeWidth == null && (out.textStrokeWidth = 2);\n }\n } else {\n if (textFillNotSet) {\n out.textFill = itemStl.fill || txCfg.outsideFill || tokens.color.neutral00;\n }\n !out.textStroke && txCfg.outsideStroke && (out.textStroke = txCfg.outsideStroke);\n }\n out.text = txStl.text;\n out.rich = txStl.rich;\n each(txStl.rich, function (richItem) {\n convertToEC4RichItem(richItem, richItem);\n });\n return out;\n}\nfunction convertToEC4RichItem(out, richItem) {\n if (!richItem) {\n return;\n }\n hasOwn(richItem, 'fill') && (out.textFill = richItem.fill);\n hasOwn(richItem, 'stroke') && (out.textStroke = richItem.fill);\n hasOwn(richItem, 'lineWidth') && (out.textStrokeWidth = richItem.lineWidth);\n hasOwn(richItem, 'font') && (out.font = richItem.font);\n hasOwn(richItem, 'fontStyle') && (out.fontStyle = richItem.fontStyle);\n hasOwn(richItem, 'fontWeight') && (out.fontWeight = richItem.fontWeight);\n hasOwn(richItem, 'fontSize') && (out.fontSize = richItem.fontSize);\n hasOwn(richItem, 'fontFamily') && (out.fontFamily = richItem.fontFamily);\n hasOwn(richItem, 'align') && (out.textAlign = richItem.align);\n hasOwn(richItem, 'verticalAlign') && (out.textVerticalAlign = richItem.verticalAlign);\n hasOwn(richItem, 'lineHeight') && (out.textLineHeight = richItem.lineHeight);\n hasOwn(richItem, 'width') && (out.textWidth = richItem.width);\n hasOwn(richItem, 'height') && (out.textHeight = richItem.height);\n hasOwn(richItem, 'backgroundColor') && (out.textBackgroundColor = richItem.backgroundColor);\n hasOwn(richItem, 'padding') && (out.textPadding = richItem.padding);\n hasOwn(richItem, 'borderColor') && (out.textBorderColor = richItem.borderColor);\n hasOwn(richItem, 'borderWidth') && (out.textBorderWidth = richItem.borderWidth);\n hasOwn(richItem, 'borderRadius') && (out.textBorderRadius = richItem.borderRadius);\n hasOwn(richItem, 'shadowColor') && (out.textBoxShadowColor = richItem.shadowColor);\n hasOwn(richItem, 'shadowBlur') && (out.textBoxShadowBlur = richItem.shadowBlur);\n hasOwn(richItem, 'shadowOffsetX') && (out.textBoxShadowOffsetX = richItem.shadowOffsetX);\n hasOwn(richItem, 'shadowOffsetY') && (out.textBoxShadowOffsetY = richItem.shadowOffsetY);\n hasOwn(richItem, 'textShadowColor') && (out.textShadowColor = richItem.textShadowColor);\n hasOwn(richItem, 'textShadowBlur') && (out.textShadowBlur = richItem.textShadowBlur);\n hasOwn(richItem, 'textShadowOffsetX') && (out.textShadowOffsetX = richItem.textShadowOffsetX);\n hasOwn(richItem, 'textShadowOffsetY') && (out.textShadowOffsetY = richItem.textShadowOffsetY);\n}\nexport function warnDeprecated(deprecated, insteadApproach) {\n if (process.env.NODE_ENV !== 'production') {\n var key = deprecated + '^_^' + insteadApproach;\n if (!deprecatedLogs[key]) {\n console.warn(\"[ECharts] DEPRECATED: \\\"\" + deprecated + \"\\\" has been deprecated. \" + insteadApproach);\n deprecatedLogs[key] = true;\n }\n }\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as zrColor from 'zrender/lib/tool/color.js';\nimport { linearMap } from '../util/number.js';\nimport { warn } from '../util/log.js';\nvar each = zrUtil.each;\nvar isObject = zrUtil.isObject;\nvar CATEGORY_DEFAULT_VISUAL_INDEX = -1;\nvar VisualMapping = /** @class */function () {\n function VisualMapping(option) {\n var mappingMethod = option.mappingMethod;\n var visualType = option.type;\n var thisOption = this.option = zrUtil.clone(option);\n this.type = visualType;\n this.mappingMethod = mappingMethod;\n this._normalizeData = normalizers[mappingMethod];\n var visualHandler = VisualMapping.visualHandlers[visualType];\n this.applyVisual = visualHandler.applyVisual;\n this.getColorMapper = visualHandler.getColorMapper;\n this._normalizedToVisual = visualHandler._normalizedToVisual[mappingMethod];\n if (mappingMethod === 'piecewise') {\n normalizeVisualRange(thisOption);\n preprocessForPiecewise(thisOption);\n } else if (mappingMethod === 'category') {\n thisOption.categories ? preprocessForSpecifiedCategory(thisOption)\n // categories is ordinal when thisOption.categories not specified,\n // which need no more preprocess except normalize visual.\n : normalizeVisualRange(thisOption, true);\n } else {\n // mappingMethod === 'linear' or 'fixed'\n zrUtil.assert(mappingMethod !== 'linear' || thisOption.dataExtent);\n normalizeVisualRange(thisOption);\n }\n }\n VisualMapping.prototype.mapValueToVisual = function (value) {\n var normalized = this._normalizeData(value);\n return this._normalizedToVisual(normalized, value);\n };\n VisualMapping.prototype.getNormalizer = function () {\n return zrUtil.bind(this._normalizeData, this);\n };\n /**\n * List available visual types.\n *\n * @public\n * @return {Array.<string>}\n */\n VisualMapping.listVisualTypes = function () {\n return zrUtil.keys(VisualMapping.visualHandlers);\n };\n // /**\n // * @public\n // */\n // static addVisualHandler(name, handler) {\n // visualHandlers[name] = handler;\n // }\n /**\n * @public\n */\n VisualMapping.isValidType = function (visualType) {\n return VisualMapping.visualHandlers.hasOwnProperty(visualType);\n };\n /**\n * Convenient method.\n * Visual can be Object or Array or primary type.\n */\n VisualMapping.eachVisual = function (visual, callback, context) {\n if (zrUtil.isObject(visual)) {\n zrUtil.each(visual, callback, context);\n } else {\n callback.call(context, visual);\n }\n };\n VisualMapping.mapVisual = function (visual, callback, context) {\n var isPrimary;\n var newVisual = zrUtil.isArray(visual) ? [] : zrUtil.isObject(visual) ? {} : (isPrimary = true, null);\n VisualMapping.eachVisual(visual, function (v, key) {\n var newVal = callback.call(context, v, key);\n isPrimary ? newVisual = newVal : newVisual[key] = newVal;\n });\n return newVisual;\n };\n /**\n * Retrieve visual properties from given object.\n */\n VisualMapping.retrieveVisuals = function (obj) {\n var ret = {};\n var hasVisual;\n obj && each(VisualMapping.visualHandlers, function (h, visualType) {\n if (obj.hasOwnProperty(visualType)) {\n ret[visualType] = obj[visualType];\n hasVisual = true;\n }\n });\n return hasVisual ? ret : null;\n };\n /**\n * Give order to visual types, considering colorSaturation, colorAlpha depends on color.\n *\n * @public\n * @param {(Object|Array)} visualTypes If Object, like: {color: ..., colorSaturation: ...}\n * IF Array, like: ['color', 'symbol', 'colorSaturation']\n * @return {Array.<string>} Sorted visual types.\n */\n VisualMapping.prepareVisualTypes = function (visualTypes) {\n if (zrUtil.isArray(visualTypes)) {\n visualTypes = visualTypes.slice();\n } else if (isObject(visualTypes)) {\n var types_1 = [];\n each(visualTypes, function (item, type) {\n types_1.push(type);\n });\n visualTypes = types_1;\n } else {\n return [];\n }\n visualTypes.sort(function (type1, type2) {\n // color should be front of colorSaturation, colorAlpha, ...\n // symbol and symbolSize do not matter.\n return type2 === 'color' && type1 !== 'color' && type1.indexOf('color') === 0 ? 1 : -1;\n });\n return visualTypes;\n };\n /**\n * 'color', 'colorSaturation', 'colorAlpha', ... are depends on 'color'.\n * Other visuals are only depends on themself.\n */\n VisualMapping.dependsOn = function (visualType1, visualType2) {\n return visualType2 === 'color' ? !!(visualType1 && visualType1.indexOf(visualType2) === 0) : visualType1 === visualType2;\n };\n /**\n * @param value\n * @param pieceList [{value: ..., interval: [min, max]}, ...]\n * Always from small to big.\n * @param findClosestWhenOutside Default to be false\n * @return index\n */\n VisualMapping.findPieceIndex = function (value, pieceList, findClosestWhenOutside) {\n var possibleI;\n var abs = Infinity;\n // value has the higher priority.\n for (var i = 0, len = pieceList.length; i < len; i++) {\n var pieceValue = pieceList[i].value;\n if (pieceValue != null) {\n if (pieceValue === value\n // FIXME\n // It is supposed to compare value according to value type of dimension,\n // but currently value type can exactly be string or number.\n // Compromise for numeric-like string (like '12'), especially\n // in the case that visualMap.categories is ['22', '33'].\n || zrUtil.isString(pieceValue) && pieceValue === value + '') {\n return i;\n }\n findClosestWhenOutside && updatePossible(pieceValue, i);\n }\n }\n for (var i = 0, len = pieceList.length; i < len; i++) {\n var piece = pieceList[i];\n var interval = piece.interval;\n var close_1 = piece.close;\n if (interval) {\n if (interval[0] === -Infinity) {\n if (littleThan(close_1[1], value, interval[1])) {\n return i;\n }\n } else if (interval[1] === Infinity) {\n if (littleThan(close_1[0], interval[0], value)) {\n return i;\n }\n } else if (littleThan(close_1[0], interval[0], value) && littleThan(close_1[1], value, interval[1])) {\n return i;\n }\n findClosestWhenOutside && updatePossible(interval[0], i);\n findClosestWhenOutside && updatePossible(interval[1], i);\n }\n }\n if (findClosestWhenOutside) {\n return value === Infinity ? pieceList.length - 1 : value === -Infinity ? 0 : possibleI;\n }\n function updatePossible(val, index) {\n var newAbs = Math.abs(val - value);\n if (newAbs < abs) {\n abs = newAbs;\n possibleI = index;\n }\n }\n };\n VisualMapping.visualHandlers = {\n color: {\n applyVisual: makeApplyVisual('color'),\n getColorMapper: function () {\n var thisOption = this.option;\n return zrUtil.bind(thisOption.mappingMethod === 'category' ? function (value, isNormalized) {\n !isNormalized && (value = this._normalizeData(value));\n return doMapCategory.call(this, value);\n } : function (value, isNormalized, out) {\n // If output rgb array\n // which will be much faster and useful in pixel manipulation\n var returnRGBArray = !!out;\n !isNormalized && (value = this._normalizeData(value));\n out = zrColor.fastLerp(value, thisOption.parsedVisual, out);\n return returnRGBArray ? out : zrColor.stringify(out, 'rgba');\n }, this);\n },\n _normalizedToVisual: {\n linear: function (normalized) {\n return zrColor.stringify(zrColor.fastLerp(normalized, this.option.parsedVisual), 'rgba');\n },\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n if (result == null) {\n result = zrColor.stringify(zrColor.fastLerp(normalized, this.option.parsedVisual), 'rgba');\n }\n return result;\n },\n fixed: doMapFixed\n }\n },\n colorHue: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, value);\n }),\n colorSaturation: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, null, value);\n }),\n colorLightness: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, null, null, value);\n }),\n colorAlpha: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyAlpha(color, value);\n }),\n decal: {\n applyVisual: makeApplyVisual('decal'),\n _normalizedToVisual: {\n linear: null,\n category: doMapCategory,\n piecewise: null,\n fixed: null\n }\n },\n opacity: {\n applyVisual: makeApplyVisual('opacity'),\n _normalizedToVisual: createNormalizedToNumericVisual([0, 1])\n },\n liftZ: {\n applyVisual: makeApplyVisual('liftZ'),\n _normalizedToVisual: {\n linear: doMapFixed,\n category: doMapFixed,\n piecewise: doMapFixed,\n fixed: doMapFixed\n }\n },\n symbol: {\n applyVisual: function (value, getter, setter) {\n var symbolCfg = this.mapValueToVisual(value);\n setter('symbol', symbolCfg);\n },\n _normalizedToVisual: {\n linear: doMapToArray,\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n if (result == null) {\n result = doMapToArray.call(this, normalized);\n }\n return result;\n },\n fixed: doMapFixed\n }\n },\n symbolSize: {\n applyVisual: makeApplyVisual('symbolSize'),\n _normalizedToVisual: createNormalizedToNumericVisual([0, 1])\n }\n };\n return VisualMapping;\n}();\nfunction preprocessForPiecewise(thisOption) {\n var pieceList = thisOption.pieceList;\n thisOption.hasSpecialVisual = false;\n zrUtil.each(pieceList, function (piece, index) {\n piece.originIndex = index;\n // piece.visual is \"result visual value\" but not\n // a visual range, so it does not need to be normalized.\n if (piece.visual != null) {\n thisOption.hasSpecialVisual = true;\n }\n });\n}\nfunction preprocessForSpecifiedCategory(thisOption) {\n // Hash categories.\n var categories = thisOption.categories;\n var categoryMap = thisOption.categoryMap = {};\n var visual = thisOption.visual;\n each(categories, function (cate, index) {\n categoryMap[cate] = index;\n });\n // Process visual map input.\n if (!zrUtil.isArray(visual)) {\n var visualArr_1 = [];\n if (zrUtil.isObject(visual)) {\n each(visual, function (v, cate) {\n var index = categoryMap[cate];\n visualArr_1[index != null ? index : CATEGORY_DEFAULT_VISUAL_INDEX] = v;\n });\n } else {\n // Is primary type, represents default visual.\n visualArr_1[CATEGORY_DEFAULT_VISUAL_INDEX] = visual;\n }\n visual = setVisualToOption(thisOption, visualArr_1);\n }\n // Remove categories that has no visual,\n // then we can mapping them to CATEGORY_DEFAULT_VISUAL_INDEX.\n for (var i = categories.length - 1; i >= 0; i--) {\n if (visual[i] == null) {\n delete categoryMap[categories[i]];\n categories.pop();\n }\n }\n}\nfunction normalizeVisualRange(thisOption, isCategory) {\n var visual = thisOption.visual;\n var visualArr = [];\n if (zrUtil.isObject(visual)) {\n each(visual, function (v) {\n visualArr.push(v);\n });\n } else if (visual != null) {\n visualArr.push(visual);\n }\n var doNotNeedPair = {\n color: 1,\n symbol: 1\n };\n if (!isCategory && visualArr.length === 1 && !doNotNeedPair.hasOwnProperty(thisOption.type)) {\n // Do not care visualArr.length === 0, which is illegal.\n visualArr[1] = visualArr[0];\n }\n setVisualToOption(thisOption, visualArr);\n}\nfunction makePartialColorVisualHandler(applyValue) {\n return {\n applyVisual: function (value, getter, setter) {\n // Only used in HSL\n var colorChannel = this.mapValueToVisual(value);\n // Must not be array value\n setter('color', applyValue(getter('color'), colorChannel));\n },\n _normalizedToVisual: createNormalizedToNumericVisual([0, 1])\n };\n}\nfunction doMapToArray(normalized) {\n var visual = this.option.visual;\n return visual[Math.round(linearMap(normalized, [0, 1], [0, visual.length - 1], true))] || {}; // TODO {}?\n}\nfunction makeApplyVisual(visualType) {\n return function (value, getter, setter) {\n setter(visualType, this.mapValueToVisual(value));\n };\n}\nfunction doMapCategory(normalized) {\n var visual = this.option.visual;\n return visual[this.option.loop && normalized !== CATEGORY_DEFAULT_VISUAL_INDEX ? normalized % visual.length : normalized];\n}\nfunction doMapFixed() {\n // visual will be convert to array.\n return this.option.visual[0];\n}\n/**\n * Create mapped to numeric visual\n */\nfunction createNormalizedToNumericVisual(sourceExtent) {\n return {\n linear: function (normalized) {\n return linearMap(normalized, sourceExtent, this.option.visual, true);\n },\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n if (result == null) {\n result = linearMap(normalized, sourceExtent, this.option.visual, true);\n }\n return result;\n },\n fixed: doMapFixed\n };\n}\nfunction getSpecifiedVisual(value) {\n var thisOption = this.option;\n var pieceList = thisOption.pieceList;\n if (thisOption.hasSpecialVisual) {\n var pieceIndex = VisualMapping.findPieceIndex(value, pieceList);\n var piece = pieceList[pieceIndex];\n if (piece && piece.visual) {\n return piece.visual[this.type];\n }\n }\n}\nfunction setVisualToOption(thisOption, visualArr) {\n thisOption.visual = visualArr;\n if (thisOption.type === 'color') {\n thisOption.parsedVisual = zrUtil.map(visualArr, function (item) {\n var color = zrColor.parse(item);\n if (!color && process.env.NODE_ENV !== 'production') {\n warn(\"'\" + item + \"' is an illegal color, fallback to '#000000'\", true);\n }\n return color || [0, 0, 0, 1];\n });\n }\n return visualArr;\n}\n/**\n * Normalizers by mapping methods.\n */\nvar normalizers = {\n linear: function (value) {\n return linearMap(value, this.option.dataExtent, [0, 1], true);\n },\n piecewise: function (value) {\n var pieceList = this.option.pieceList;\n var pieceIndex = VisualMapping.findPieceIndex(value, pieceList, true);\n if (pieceIndex != null) {\n return linearMap(pieceIndex, [0, pieceList.length - 1], [0, 1], true);\n }\n },\n category: function (value) {\n var index = this.option.categories ? this.option.categoryMap[value] : value; // ordinal value\n return index == null ? CATEGORY_DEFAULT_VISUAL_INDEX : index;\n },\n fixed: zrUtil.noop\n};\nfunction littleThan(close, a, b) {\n return close ? a <= b : a < b;\n}\nexport default VisualMapping;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Line path for bezier and straight line draw\n */\nimport * as graphic from '../../util/graphic.js';\nimport * as vec2 from 'zrender/lib/core/vector.js';\nimport tokens from '../../visual/tokens.js';\nvar straightLineProto = graphic.Line.prototype;\nvar bezierCurveProto = graphic.BezierCurve.prototype;\nvar StraightLineShape = /** @class */function () {\n function StraightLineShape() {\n // Start point\n this.x1 = 0;\n this.y1 = 0;\n // End point\n this.x2 = 0;\n this.y2 = 0;\n this.percent = 1;\n }\n return StraightLineShape;\n}();\nvar CurveShape = /** @class */function (_super) {\n __extends(CurveShape, _super);\n function CurveShape() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return CurveShape;\n}(StraightLineShape);\nfunction isStraightLine(shape) {\n return isNaN(+shape.cpx1) || isNaN(+shape.cpy1);\n}\nvar ECLinePath = /** @class */function (_super) {\n __extends(ECLinePath, _super);\n function ECLinePath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'ec-line';\n return _this;\n }\n ECLinePath.prototype.getDefaultStyle = function () {\n return {\n stroke: tokens.color.neutral99,\n fill: null\n };\n };\n ECLinePath.prototype.getDefaultShape = function () {\n return new StraightLineShape();\n };\n ECLinePath.prototype.buildPath = function (ctx, shape) {\n if (isStraightLine(shape)) {\n straightLineProto.buildPath.call(this, ctx, shape);\n } else {\n bezierCurveProto.buildPath.call(this, ctx, shape);\n }\n };\n ECLinePath.prototype.pointAt = function (t) {\n if (isStraightLine(this.shape)) {\n return straightLineProto.pointAt.call(this, t);\n } else {\n return bezierCurveProto.pointAt.call(this, t);\n }\n };\n ECLinePath.prototype.tangentAt = function (t) {\n var shape = this.shape;\n var p = isStraightLine(shape) ? [shape.x2 - shape.x1, shape.y2 - shape.y1] : bezierCurveProto.tangentAt.call(this, t);\n return vec2.normalize(p, p);\n };\n return ECLinePath;\n}(graphic.Path);\nexport default ECLinePath;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { isArray, each, retrieve2 } from 'zrender/lib/core/util.js';\nimport * as vector from 'zrender/lib/core/vector.js';\nimport * as symbolUtil from '../../util/symbol.js';\nimport ECLinePath from './LinePath.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, enterEmphasis, leaveEmphasis, SPECIAL_STATES } from '../../util/states.js';\nimport { getLabelStatesModels, setLabelStyle } from '../../label/labelStyle.js';\nimport { round } from '../../util/number.js';\nimport tokens from '../../visual/tokens.js';\nvar SYMBOL_CATEGORIES = ['fromSymbol', 'toSymbol'];\nfunction makeSymbolTypeKey(symbolCategory) {\n return '_' + symbolCategory + 'Type';\n}\nfunction makeSymbolTypeValue(name, lineData, idx) {\n var symbolType = lineData.getItemVisual(idx, name);\n if (!symbolType || symbolType === 'none') {\n return symbolType;\n }\n var symbolSize = lineData.getItemVisual(idx, name + 'Size');\n var symbolRotate = lineData.getItemVisual(idx, name + 'Rotate');\n var symbolOffset = lineData.getItemVisual(idx, name + 'Offset');\n var symbolKeepAspect = lineData.getItemVisual(idx, name + 'KeepAspect');\n var symbolSizeArr = symbolUtil.normalizeSymbolSize(symbolSize);\n var symbolOffsetArr = symbolUtil.normalizeSymbolOffset(symbolOffset || 0, symbolSizeArr);\n return symbolType + symbolSizeArr + symbolOffsetArr + (symbolRotate || '') + (symbolKeepAspect || '');\n}\n/**\n * @inner\n */\nfunction createSymbol(name, lineData, idx) {\n var symbolType = lineData.getItemVisual(idx, name);\n if (!symbolType || symbolType === 'none') {\n return;\n }\n var symbolSize = lineData.getItemVisual(idx, name + 'Size');\n var symbolRotate = lineData.getItemVisual(idx, name + 'Rotate');\n var symbolOffset = lineData.getItemVisual(idx, name + 'Offset');\n var symbolKeepAspect = lineData.getItemVisual(idx, name + 'KeepAspect');\n var symbolSizeArr = symbolUtil.normalizeSymbolSize(symbolSize);\n var symbolOffsetArr = symbolUtil.normalizeSymbolOffset(symbolOffset || 0, symbolSizeArr);\n var symbolPath = symbolUtil.createSymbol(symbolType, -symbolSizeArr[0] / 2 + symbolOffsetArr[0], -symbolSizeArr[1] / 2 + symbolOffsetArr[1], symbolSizeArr[0], symbolSizeArr[1], null, symbolKeepAspect);\n symbolPath.__specifiedRotation = symbolRotate == null || isNaN(symbolRotate) ? void 0 : +symbolRotate * Math.PI / 180 || 0;\n symbolPath.name = name;\n return symbolPath;\n}\nfunction createLine(points) {\n var line = new ECLinePath({\n name: 'line',\n subPixelOptimize: true\n });\n setLinePoints(line.shape, points);\n return line;\n}\nfunction setLinePoints(targetShape, points) {\n targetShape.x1 = points[0][0];\n targetShape.y1 = points[0][1];\n targetShape.x2 = points[1][0];\n targetShape.y2 = points[1][1];\n targetShape.percent = 1;\n var cp1 = points[2];\n if (cp1) {\n targetShape.cpx1 = cp1[0];\n targetShape.cpy1 = cp1[1];\n } else {\n targetShape.cpx1 = NaN;\n targetShape.cpy1 = NaN;\n }\n}\nvar Line = /** @class */function (_super) {\n __extends(Line, _super);\n function Line(lineData, idx, seriesScope) {\n var _this = _super.call(this) || this;\n _this._createLine(lineData, idx, seriesScope);\n return _this;\n }\n Line.prototype._createLine = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var linePoints = lineData.getItemLayout(idx);\n var z2 = lineData.getItemVisual(idx, 'z2');\n var line = createLine(linePoints);\n line.shape.percent = 0;\n graphic.initProps(line, {\n z2: retrieve2(z2, 0),\n shape: {\n percent: 1\n }\n }, seriesModel, idx);\n this.add(line);\n each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbol = createSymbol(symbolCategory, lineData, idx);\n // symbols must added after line to make sure\n // it will be updated after line#update.\n // Or symbol position and rotation update in line#beforeUpdate will be one frame slow\n this.add(symbol);\n this[makeSymbolTypeKey(symbolCategory)] = makeSymbolTypeValue(symbolCategory, lineData, idx);\n }, this);\n this._updateCommonStl(lineData, idx, seriesScope);\n };\n // TODO More strict on the List type in parameters?\n Line.prototype.updateData = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var line = this.childOfName('line');\n var linePoints = lineData.getItemLayout(idx);\n var target = {\n shape: {}\n };\n setLinePoints(target.shape, linePoints);\n graphic.updateProps(line, target, seriesModel, idx);\n each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbolType = makeSymbolTypeValue(symbolCategory, lineData, idx);\n var key = makeSymbolTypeKey(symbolCategory);\n // Symbol changed\n if (this[key] !== symbolType) {\n this.remove(this.childOfName(symbolCategory));\n var symbol = createSymbol(symbolCategory, lineData, idx);\n this.add(symbol);\n }\n this[key] = symbolType;\n }, this);\n this._updateCommonStl(lineData, idx, seriesScope);\n };\n ;\n Line.prototype.getLinePath = function () {\n return this.childAt(0);\n };\n Line.prototype._updateCommonStl = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var line = this.childOfName('line');\n var emphasisLineStyle = seriesScope && seriesScope.emphasisLineStyle;\n var blurLineStyle = seriesScope && seriesScope.blurLineStyle;\n var selectLineStyle = seriesScope && seriesScope.selectLineStyle;\n var labelStatesModels = seriesScope && seriesScope.labelStatesModels;\n var emphasisDisabled = seriesScope && seriesScope.emphasisDisabled;\n var focus = seriesScope && seriesScope.focus;\n var blurScope = seriesScope && seriesScope.blurScope;\n // Optimization for large dataset\n if (!seriesScope || lineData.hasItemOption) {\n var itemModel = lineData.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n emphasisLineStyle = emphasisModel.getModel('lineStyle').getLineStyle();\n blurLineStyle = itemModel.getModel(['blur', 'lineStyle']).getLineStyle();\n selectLineStyle = itemModel.getModel(['select', 'lineStyle']).getLineStyle();\n emphasisDisabled = emphasisModel.get('disabled');\n focus = emphasisModel.get('focus');\n blurScope = emphasisModel.get('blurScope');\n labelStatesModels = getLabelStatesModels(itemModel);\n }\n var lineStyle = lineData.getItemVisual(idx, 'style');\n var visualColor = lineStyle.stroke;\n line.useStyle(lineStyle);\n line.style.fill = null;\n line.style.strokeNoScale = true;\n line.ensureState('emphasis').style = emphasisLineStyle;\n line.ensureState('blur').style = blurLineStyle;\n line.ensureState('select').style = selectLineStyle;\n // Update symbol\n each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbol = this.childOfName(symbolCategory);\n if (symbol) {\n // Share opacity and color with line.\n symbol.setColor(visualColor);\n symbol.style.opacity = lineStyle.opacity;\n for (var i = 0; i < SPECIAL_STATES.length; i++) {\n var stateName = SPECIAL_STATES[i];\n var lineState = line.getState(stateName);\n if (lineState) {\n var lineStateStyle = lineState.style || {};\n var state = symbol.ensureState(stateName);\n var stateStyle = state.style || (state.style = {});\n if (lineStateStyle.stroke != null) {\n stateStyle[symbol.__isEmptyBrush ? 'stroke' : 'fill'] = lineStateStyle.stroke;\n }\n if (lineStateStyle.opacity != null) {\n stateStyle.opacity = lineStateStyle.opacity;\n }\n }\n }\n symbol.markRedraw();\n }\n }, this);\n var rawVal = seriesModel.getRawValue(idx);\n setLabelStyle(this, labelStatesModels, {\n labelDataIndex: idx,\n labelFetcher: {\n getFormattedLabel: function (dataIndex, stateName) {\n return seriesModel.getFormattedLabel(dataIndex, stateName, lineData.dataType);\n }\n },\n inheritColor: visualColor || tokens.color.neutral99,\n defaultOpacity: lineStyle.opacity,\n defaultText: (rawVal == null ? lineData.getName(idx) : isFinite(rawVal)\n // PENDING: the `rawVal` is not supposed to be rounded. But this rounding was introduced\n // in the early stages, so changing it would likely be breaking.\n ? round(rawVal, 10) : rawVal) + ''\n });\n var label = this.getTextContent();\n // Always set `textStyle` even if `normalStyle.text` is null, because default\n // values have to be set on `normalStyle`.\n if (label) {\n var labelNormalModel = labelStatesModels.normal;\n label.__align = label.style.align;\n label.__verticalAlign = label.style.verticalAlign;\n // 'start', 'middle', 'end'\n label.__position = labelNormalModel.get('position') || 'middle';\n var distance = labelNormalModel.get('distance');\n if (!isArray(distance)) {\n distance = [distance, distance];\n }\n label.__labelDistance = distance;\n }\n this.setTextConfig({\n position: null,\n local: true,\n inside: false // Can't be inside for stroke element.\n });\n toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);\n };\n Line.prototype.highlight = function () {\n enterEmphasis(this);\n };\n Line.prototype.downplay = function () {\n leaveEmphasis(this);\n };\n Line.prototype.updateLayout = function (lineData, idx) {\n this.childOfName('line').stopAnimation();\n this.setLinePoints(lineData.getItemLayout(idx));\n };\n Line.prototype.setLinePoints = function (points) {\n var linePath = this.childOfName('line');\n setLinePoints(linePath.shape, points);\n linePath.dirty();\n };\n Line.prototype.beforeUpdate = function () {\n var lineGroup = this;\n var symbolFrom = lineGroup.childOfName('fromSymbol');\n var symbolTo = lineGroup.childOfName('toSymbol');\n var label = lineGroup.getTextContent();\n // Quick reject\n if (!symbolFrom && !symbolTo && (!label || label.ignore)) {\n return;\n }\n var invScale = 1;\n var parentNode = this.parent;\n while (parentNode) {\n if (parentNode.scaleX) {\n invScale /= parentNode.scaleX;\n }\n parentNode = parentNode.parent;\n }\n var line = lineGroup.childOfName('line');\n // If line not changed\n // FIXME Parent scale changed\n if (!this.__dirty && !line.__dirty) {\n return;\n }\n var percent = line.shape.percent;\n var fromPos = line.pointAt(0);\n var toPos = line.pointAt(percent);\n var d = vector.sub([], toPos, fromPos);\n vector.normalize(d, d);\n function setSymbolRotation(symbol, percent) {\n // Fix #12388\n // when symbol is set to be 'arrow' in markLine,\n // symbolRotate value will be ignored, and compulsively use tangent angle.\n // rotate by default if symbol rotation is not specified\n var specifiedRotation = symbol.__specifiedRotation;\n if (specifiedRotation == null) {\n var tangent = line.tangentAt(percent);\n symbol.attr('rotation', (percent === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(tangent[1], tangent[0]));\n } else {\n symbol.attr('rotation', specifiedRotation);\n }\n }\n if (symbolFrom) {\n symbolFrom.setPosition(fromPos);\n setSymbolRotation(symbolFrom, 0);\n symbolFrom.scaleX = symbolFrom.scaleY = invScale * percent;\n symbolFrom.markRedraw();\n }\n if (symbolTo) {\n symbolTo.setPosition(toPos);\n setSymbolRotation(symbolTo, 1);\n symbolTo.scaleX = symbolTo.scaleY = invScale * percent;\n symbolTo.markRedraw();\n }\n if (label && !label.ignore) {\n label.x = label.y = 0;\n label.originX = label.originY = 0;\n var textAlign = void 0;\n var textVerticalAlign = void 0;\n var distance = label.__labelDistance;\n var distanceX = distance[0] * invScale;\n var distanceY = distance[1] * invScale;\n var halfPercent = percent / 2;\n var tangent = line.tangentAt(halfPercent);\n var n = [tangent[1], -tangent[0]];\n var cp = line.pointAt(halfPercent);\n if (n[1] > 0) {\n n[0] = -n[0];\n n[1] = -n[1];\n }\n var dir = tangent[0] < 0 ? -1 : 1;\n if (label.__position !== 'start' && label.__position !== 'end') {\n var rotation = -Math.atan2(tangent[1], tangent[0]);\n if (toPos[0] < fromPos[0]) {\n rotation = Math.PI + rotation;\n }\n label.rotation = rotation;\n }\n var dy = void 0;\n switch (label.__position) {\n case 'insideStartTop':\n case 'insideMiddleTop':\n case 'insideEndTop':\n case 'middle':\n dy = -distanceY;\n textVerticalAlign = 'bottom';\n break;\n case 'insideStartBottom':\n case 'insideMiddleBottom':\n case 'insideEndBottom':\n dy = distanceY;\n textVerticalAlign = 'top';\n break;\n default:\n dy = 0;\n textVerticalAlign = 'middle';\n }\n switch (label.__position) {\n case 'end':\n label.x = d[0] * distanceX + toPos[0];\n label.y = d[1] * distanceY + toPos[1];\n textAlign = d[0] > 0.8 ? 'left' : d[0] < -0.8 ? 'right' : 'center';\n textVerticalAlign = d[1] > 0.8 ? 'top' : d[1] < -0.8 ? 'bottom' : 'middle';\n break;\n case 'start':\n label.x = -d[0] * distanceX + fromPos[0];\n label.y = -d[1] * distanceY + fromPos[1];\n textAlign = d[0] > 0.8 ? 'right' : d[0] < -0.8 ? 'left' : 'center';\n textVerticalAlign = d[1] > 0.8 ? 'bottom' : d[1] < -0.8 ? 'top' : 'middle';\n break;\n case 'insideStartTop':\n case 'insideStart':\n case 'insideStartBottom':\n label.x = distanceX * dir + fromPos[0];\n label.y = fromPos[1] + dy;\n textAlign = tangent[0] < 0 ? 'right' : 'left';\n label.originX = -distanceX * dir;\n label.originY = -dy;\n break;\n case 'insideMiddleTop':\n case 'insideMiddle':\n case 'insideMiddleBottom':\n case 'middle':\n label.x = cp[0];\n label.y = cp[1] + dy;\n textAlign = 'center';\n label.originY = -dy;\n break;\n case 'insideEndTop':\n case 'insideEnd':\n case 'insideEndBottom':\n label.x = -distanceX * dir + toPos[0];\n label.y = toPos[1] + dy;\n textAlign = tangent[0] >= 0 ? 'right' : 'left';\n label.originX = distanceX * dir;\n label.originY = -dy;\n break;\n }\n label.scaleX = label.scaleY = invScale;\n label.setStyle({\n // Use the user specified text align and baseline first\n verticalAlign: label.__verticalAlign || textVerticalAlign,\n align: label.__align || textAlign\n });\n }\n };\n return Line;\n}(graphic.Group);\nexport default Line;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport LineGroup from './Line.js';\nimport { getLabelStatesModels } from '../../label/labelStyle.js';\nvar LineDraw = /** @class */function () {\n function LineDraw(LineCtor) {\n this.group = new graphic.Group();\n this._LineCtor = LineCtor || LineGroup;\n }\n LineDraw.prototype.updateData = function (lineData) {\n var _this = this;\n // Remove progressive els.\n this._progressiveEls = null;\n var lineDraw = this;\n var group = lineDraw.group;\n var oldLineData = lineDraw._lineData;\n lineDraw._lineData = lineData;\n // There is no oldLineData only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!oldLineData) {\n group.removeAll();\n }\n var seriesScope = makeSeriesScope(lineData);\n lineData.diff(oldLineData).add(function (idx) {\n _this._doAdd(lineData, idx, seriesScope);\n }).update(function (newIdx, oldIdx) {\n _this._doUpdate(oldLineData, lineData, oldIdx, newIdx, seriesScope);\n }).remove(function (idx) {\n group.remove(oldLineData.getItemGraphicEl(idx));\n }).execute();\n };\n ;\n LineDraw.prototype.updateLayout = function () {\n var lineData = this._lineData;\n // Do not support update layout in incremental mode.\n if (!lineData) {\n return;\n }\n lineData.eachItemGraphicEl(function (el, idx) {\n el.updateLayout(lineData, idx);\n }, this);\n };\n ;\n LineDraw.prototype.incrementalPrepareUpdate = function (lineData) {\n this._seriesScope = makeSeriesScope(lineData);\n this._lineData = null;\n this.group.removeAll();\n };\n ;\n LineDraw.prototype.incrementalUpdate = function (taskParams, lineData, incrementalId) {\n this._progressiveEls = [];\n function updateIncrementalAndHover(el) {\n if (!el.isGroup && !isEffectObject(el)) {\n el.incremental = incrementalId;\n el.ensureState('emphasis').hoverLayer = graphic.HOVER_LAYER_FOR_INCREMENTAL;\n }\n }\n for (var idx = taskParams.start; idx < taskParams.end; idx++) {\n var itemLayout = lineData.getItemLayout(idx);\n if (lineNeedsDraw(itemLayout)) {\n var el = new this._LineCtor(lineData, idx, this._seriesScope);\n el.traverse(updateIncrementalAndHover);\n this.group.add(el);\n lineData.setItemGraphicEl(idx, el);\n this._progressiveEls.push(el);\n }\n }\n };\n ;\n LineDraw.prototype.remove = function () {\n this.group.removeAll();\n };\n ;\n LineDraw.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n LineDraw.prototype._doAdd = function (lineData, idx, seriesScope) {\n var itemLayout = lineData.getItemLayout(idx);\n if (!lineNeedsDraw(itemLayout)) {\n return;\n }\n var el = new this._LineCtor(lineData, idx, seriesScope);\n lineData.setItemGraphicEl(idx, el);\n this.group.add(el);\n };\n LineDraw.prototype._doUpdate = function (oldLineData, newLineData, oldIdx, newIdx, seriesScope) {\n var itemEl = oldLineData.getItemGraphicEl(oldIdx);\n if (!lineNeedsDraw(newLineData.getItemLayout(newIdx))) {\n this.group.remove(itemEl);\n return;\n }\n if (!itemEl) {\n itemEl = new this._LineCtor(newLineData, newIdx, seriesScope);\n } else {\n itemEl.updateData(newLineData, newIdx, seriesScope);\n }\n newLineData.setItemGraphicEl(newIdx, itemEl);\n this.group.add(itemEl);\n };\n return LineDraw;\n}();\nfunction isEffectObject(el) {\n return el.animators && el.animators.length > 0;\n}\nfunction makeSeriesScope(lineData) {\n var hostModel = lineData.hostModel;\n var emphasisModel = hostModel.getModel('emphasis');\n return {\n lineStyle: hostModel.getModel('lineStyle').getLineStyle(),\n emphasisLineStyle: emphasisModel.getModel(['lineStyle']).getLineStyle(),\n blurLineStyle: hostModel.getModel(['blur', 'lineStyle']).getLineStyle(),\n selectLineStyle: hostModel.getModel(['select', 'lineStyle']).getLineStyle(),\n emphasisDisabled: emphasisModel.get('disabled'),\n blurScope: emphasisModel.get('blurScope'),\n focus: emphasisModel.get('focus'),\n labelStatesModels: getLabelStatesModels(hostModel)\n };\n}\nfunction isPointNaN(pt) {\n return isNaN(pt[0]) || isNaN(pt[1]);\n}\nfunction lineNeedsDraw(pts) {\n return pts && !isPointNaN(pts[0]) && !isPointNaN(pts[1]);\n}\nexport default LineDraw;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { makeInner } from '../../util/model.js';\n/**\n * @caveat Do not import other `src/component/thumbnail/*` files.\n * This file should be decoupled from them for sake of the size consideration.\n */\n/**\n * FIXME: This is a temporary implementation. May need refactor to decouple\n * the direct call from series.graph to thumbnail.\n */\nvar inner = makeInner();\nexport function getThumbnailBridge(model) {\n if (model) {\n return inner(model).bridge;\n }\n}\nexport function injectThumbnailBridge(model, thumbnailBridge) {\n if (model) {\n inner(model).bridge = thumbnailBridge;\n }\n}\n;", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { makeInner, normalizeToArray } from '../util/model.js';\nimport { assert, bind, each, eqNaN, extend, hasOwn, indexOf, isArrayLike, keys, reduce } from 'zrender/lib/core/util.js';\nimport { cloneValue } from 'zrender/lib/animation/Animator.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { getAnimationConfig } from './basicTransition.js';\nimport { Path } from '../util/graphic.js';\nimport { warn } from '../util/log.js';\nimport { TRANSFORMABLE_PROPS } from 'zrender/lib/core/Transformable.js';\nvar LEGACY_TRANSFORM_PROPS_MAP = {\n position: ['x', 'y'],\n scale: ['scaleX', 'scaleY'],\n origin: ['originX', 'originY']\n};\nvar LEGACY_TRANSFORM_PROPS = keys(LEGACY_TRANSFORM_PROPS_MAP);\nvar TRANSFORM_PROPS_MAP = reduce(TRANSFORMABLE_PROPS, function (obj, key) {\n obj[key] = 1;\n return obj;\n}, {});\nvar transformPropNamesStr = TRANSFORMABLE_PROPS.join(', ');\n// '' means root\nexport var ELEMENT_ANIMATABLE_PROPS = ['', 'style', 'shape', 'extra'];\n;\nvar transitionInnerStore = makeInner();\n;\nfunction getElementAnimationConfig(animationType, el, elOption, parentModel, dataIndex) {\n var animationProp = animationType + \"Animation\";\n var config = getAnimationConfig(animationType, parentModel, dataIndex) || {};\n var userDuring = transitionInnerStore(el).userDuring;\n // Only set when duration is > 0 and it's need to be animated.\n if (config.duration > 0) {\n // For simplicity, if during not specified, the previous during will not work any more.\n config.during = userDuring ? bind(duringCall, {\n el: el,\n userDuring: userDuring\n }) : null;\n config.setToFinal = true;\n config.scope = animationType;\n }\n extend(config, elOption[animationProp]);\n return config;\n}\nexport function applyUpdateTransition(el, elOption, animatableModel, opts) {\n opts = opts || {};\n var dataIndex = opts.dataIndex,\n isInit = opts.isInit,\n clearStyle = opts.clearStyle;\n var hasAnimation = animatableModel.isAnimationEnabled();\n // Save the meta info for further morphing. Like apply on the sub morphing elements.\n var store = transitionInnerStore(el);\n var styleOpt = elOption.style;\n store.userDuring = elOption.during;\n var transFromProps = {};\n var propsToSet = {};\n prepareTransformAllPropsFinal(el, elOption, propsToSet);\n if (el.type === 'compound') {\n /**\n * We cannot directly clone shape for compoundPath,\n * because it makes the path to be an object instead of a Path instance,\n * and thus missing `buildPath` method.\n */\n var paths = el.shape.paths;\n var optionPaths = elOption.shape.paths;\n for (var i = 0; i < optionPaths.length; i++) {\n var path = optionPaths[i];\n prepareShapeOrExtraAllPropsFinal('shape', path, paths[i]);\n }\n } else {\n prepareShapeOrExtraAllPropsFinal('shape', elOption, propsToSet);\n prepareShapeOrExtraAllPropsFinal('extra', elOption, propsToSet);\n }\n if (!isInit && hasAnimation) {\n prepareTransformTransitionFrom(el, elOption, transFromProps);\n prepareShapeOrExtraTransitionFrom('shape', el, elOption, transFromProps);\n prepareShapeOrExtraTransitionFrom('extra', el, elOption, transFromProps);\n prepareStyleTransitionFrom(el, elOption, styleOpt, transFromProps);\n }\n propsToSet.style = styleOpt;\n applyPropsDirectly(el, propsToSet, clearStyle);\n applyMiscProps(el, elOption);\n if (hasAnimation) {\n if (isInit) {\n var enterFromProps_1 = {};\n each(ELEMENT_ANIMATABLE_PROPS, function (propName) {\n var prop = propName ? elOption[propName] : elOption;\n if (prop && prop.enterFrom) {\n if (propName) {\n enterFromProps_1[propName] = enterFromProps_1[propName] || {};\n }\n extend(propName ? enterFromProps_1[propName] : enterFromProps_1, prop.enterFrom);\n }\n });\n var config = getElementAnimationConfig('enter', el, elOption, animatableModel, dataIndex);\n if (config.duration > 0) {\n el.animateFrom(enterFromProps_1, config);\n }\n } else {\n applyPropsTransition(el, elOption, dataIndex || 0, animatableModel, transFromProps);\n }\n }\n // Store leave to be used in leave transition.\n updateLeaveTo(el, elOption);\n styleOpt ? el.dirty() : el.markRedraw();\n}\nexport function updateLeaveTo(el, elOption) {\n // Try merge to previous set leaveTo\n var leaveToProps = transitionInnerStore(el).leaveToProps;\n for (var i = 0; i < ELEMENT_ANIMATABLE_PROPS.length; i++) {\n var propName = ELEMENT_ANIMATABLE_PROPS[i];\n var prop = propName ? elOption[propName] : elOption;\n if (prop && prop.leaveTo) {\n if (!leaveToProps) {\n leaveToProps = transitionInnerStore(el).leaveToProps = {};\n }\n if (propName) {\n leaveToProps[propName] = leaveToProps[propName] || {};\n }\n extend(propName ? leaveToProps[propName] : leaveToProps, prop.leaveTo);\n }\n }\n}\nexport function applyLeaveTransition(el, elOption, animatableModel, onRemove) {\n if (el) {\n var parent_1 = el.parent;\n var leaveToProps = transitionInnerStore(el).leaveToProps;\n if (leaveToProps) {\n // TODO TODO use leave after leaveAnimation in series is introduced\n // TODO Data index?\n var config = getElementAnimationConfig('update', el, elOption, animatableModel, 0);\n config.done = function () {\n parent_1 && parent_1.remove(el);\n onRemove && onRemove();\n };\n el.animateTo(leaveToProps, config);\n } else {\n parent_1 && parent_1.remove(el);\n onRemove && onRemove();\n }\n }\n}\nexport function isTransitionAll(transition) {\n return transition === 'all';\n}\nfunction applyPropsDirectly(el,\n// Can be null/undefined\nallPropsFinal, clearStyle) {\n var styleOpt = allPropsFinal.style;\n if (!el.isGroup && styleOpt) {\n if (clearStyle) {\n el.useStyle({});\n // When style object changed, how to trade the existing animation?\n // It is probably complicated and not needed to cover all the cases.\n // But still need consider the case:\n // (1) When using init animation on `style.opacity`, and before the animation\n // ended users triggers an update by mousewhel. At that time the init\n // animation should better be continued rather than terminated.\n // So after `useStyle` called, we should change the animation target manually\n // to continue the effect of the init animation.\n // (2) PENDING: If the previous animation targeted at a `val1`, and currently we need\n // to update the value to `val2` and no animation declared, should be terminate\n // the previous animation or just modify the target of the animation?\n // Therotically That will happen not only on `style` but also on `shape` and\n // `transfrom` props. But we haven't handle this case at present yet.\n // (3) PENDING: Is it proper to visit `animators` and `targetName`?\n var animators = el.animators;\n for (var i = 0; i < animators.length; i++) {\n var animator = animators[i];\n // targetName is the \"topKey\".\n if (animator.targetName === 'style') {\n animator.changeTarget(el.style);\n }\n }\n }\n el.setStyle(styleOpt);\n }\n if (allPropsFinal) {\n // Not set style here.\n allPropsFinal.style = null;\n // Set el to the final state firstly.\n allPropsFinal && el.attr(allPropsFinal);\n allPropsFinal.style = styleOpt;\n }\n}\nfunction applyPropsTransition(el, elOption, dataIndex, model,\n// Can be null/undefined\ntransFromProps) {\n if (transFromProps) {\n var config = getElementAnimationConfig('update', el, elOption, model, dataIndex);\n if (config.duration > 0) {\n el.animateFrom(transFromProps, config);\n }\n }\n}\nfunction applyMiscProps(el, elOption) {\n // Merge by default.\n hasOwn(elOption, 'silent') && (el.silent = elOption.silent);\n hasOwn(elOption, 'ignore') && (el.ignore = elOption.ignore);\n if (el instanceof Displayable) {\n hasOwn(elOption, 'invisible') && (el.invisible = elOption.invisible);\n }\n if (el instanceof Path) {\n hasOwn(elOption, 'autoBatch') && (el.autoBatch = elOption.autoBatch);\n }\n}\n// Use it to avoid it be exposed to user.\nvar tmpDuringScope = {};\nvar transitionDuringAPI = {\n // Usually other props do not need to be changed in animation during.\n setTransform: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assert(hasOwn(TRANSFORM_PROPS_MAP, key), 'Only ' + transformPropNamesStr + ' available in `setTransform`.');\n }\n tmpDuringScope.el[key] = val;\n return this;\n },\n getTransform: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assert(hasOwn(TRANSFORM_PROPS_MAP, key), 'Only ' + transformPropNamesStr + ' available in `getTransform`.');\n }\n return tmpDuringScope.el[key];\n },\n setShape: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var el = tmpDuringScope.el;\n var shape = el.shape || (el.shape = {});\n shape[key] = val;\n el.dirtyShape && el.dirtyShape();\n return this;\n },\n getShape: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var shape = tmpDuringScope.el.shape;\n if (shape) {\n return shape[key];\n }\n },\n setStyle: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var el = tmpDuringScope.el;\n var style = el.style;\n if (style) {\n if (process.env.NODE_ENV !== 'production') {\n if (eqNaN(val)) {\n warn('style.' + key + ' must not be assigned with NaN.');\n }\n }\n style[key] = val;\n el.dirtyStyle && el.dirtyStyle();\n }\n return this;\n },\n getStyle: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var style = tmpDuringScope.el.style;\n if (style) {\n return style[key];\n }\n },\n setExtra: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var extra = tmpDuringScope.el.extra || (tmpDuringScope.el.extra = {});\n extra[key] = val;\n return this;\n },\n getExtra: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var extra = tmpDuringScope.el.extra;\n if (extra) {\n return extra[key];\n }\n }\n};\nfunction assertNotReserved(key) {\n if (process.env.NODE_ENV !== 'production') {\n if (key === 'transition' || key === 'enterFrom' || key === 'leaveTo') {\n throw new Error('key must not be \"' + key + '\"');\n }\n }\n}\nfunction duringCall() {\n // Do not provide \"percent\" until some requirements come.\n // Because consider thies case:\n // enterFrom: {x: 100, y: 30}, transition: 'x'.\n // And enter duration is different from update duration.\n // Thus it might be confused about the meaning of \"percent\" in during callback.\n var scope = this;\n var el = scope.el;\n if (!el) {\n return;\n }\n // If el is remove from zr by reason like legend, during still need to called,\n // because el will be added back to zr and the prop value should not be incorrect.\n var latestUserDuring = transitionInnerStore(el).userDuring;\n var scopeUserDuring = scope.userDuring;\n // Ensured a during is only called once in each animation frame.\n // If a during is called multiple times in one frame, maybe some users' calculation logic\n // might be wrong (not sure whether this usage exists).\n // The case of a during might be called twice can be: by default there is a animator for\n // 'x', 'y' when init. Before the init animation finished, call `setOption` to start\n // another animators for 'style'/'shape'/'extra'.\n if (latestUserDuring !== scopeUserDuring) {\n // release\n scope.el = scope.userDuring = null;\n return;\n }\n tmpDuringScope.el = el;\n // Give no `this` to user in \"during\" calling.\n scopeUserDuring(transitionDuringAPI);\n // FIXME: if in future meet the case that some prop will be both modified in `during` and `state`,\n // consider the issue that the prop might be incorrect when return to \"normal\" state.\n}\nfunction prepareShapeOrExtraTransitionFrom(mainAttr, fromEl, elOption, transFromProps) {\n var attrOpt = elOption[mainAttr];\n if (!attrOpt) {\n return;\n }\n var elPropsInAttr = fromEl[mainAttr];\n var transFromPropsInAttr;\n if (elPropsInAttr) {\n var transition = elOption.transition;\n var attrTransition = attrOpt.transition;\n if (attrTransition) {\n !transFromPropsInAttr && (transFromPropsInAttr = transFromProps[mainAttr] = {});\n if (isTransitionAll(attrTransition)) {\n extend(transFromPropsInAttr, elPropsInAttr);\n } else {\n var transitionKeys = normalizeToArray(attrTransition);\n for (var i = 0; i < transitionKeys.length; i++) {\n var key = transitionKeys[i];\n var elVal = elPropsInAttr[key];\n transFromPropsInAttr[key] = elVal;\n }\n }\n } else if (isTransitionAll(transition) || indexOf(transition, mainAttr) >= 0) {\n !transFromPropsInAttr && (transFromPropsInAttr = transFromProps[mainAttr] = {});\n var elPropsInAttrKeys = keys(elPropsInAttr);\n for (var i = 0; i < elPropsInAttrKeys.length; i++) {\n var key = elPropsInAttrKeys[i];\n var elVal = elPropsInAttr[key];\n if (isNonStyleTransitionEnabled(attrOpt[key], elVal)) {\n transFromPropsInAttr[key] = elVal;\n }\n }\n }\n }\n}\nfunction prepareShapeOrExtraAllPropsFinal(mainAttr, elOption, allProps) {\n var attrOpt = elOption[mainAttr];\n if (!attrOpt) {\n return;\n }\n var allPropsInAttr = allProps[mainAttr] = {};\n var keysInAttr = keys(attrOpt);\n for (var i = 0; i < keysInAttr.length; i++) {\n var key = keysInAttr[i];\n // To avoid share one object with different element, and\n // to avoid user modify the object inexpectedly, have to clone.\n allPropsInAttr[key] = cloneValue(attrOpt[key]);\n }\n}\nfunction prepareTransformTransitionFrom(el, elOption, transFromProps) {\n var transition = elOption.transition;\n var transitionKeys = isTransitionAll(transition) ? TRANSFORMABLE_PROPS : normalizeToArray(transition || []);\n for (var i = 0; i < transitionKeys.length; i++) {\n var key = transitionKeys[i];\n if (key === 'style' || key === 'shape' || key === 'extra') {\n continue;\n }\n var elVal = el[key];\n if (process.env.NODE_ENV !== 'production') {\n checkTransformPropRefer(key, 'el.transition');\n }\n // Do not clone, animator will perform that clone.\n transFromProps[key] = elVal;\n }\n}\nfunction prepareTransformAllPropsFinal(el, elOption, allProps) {\n for (var i = 0; i < LEGACY_TRANSFORM_PROPS.length; i++) {\n var legacyName = LEGACY_TRANSFORM_PROPS[i];\n var xyName = LEGACY_TRANSFORM_PROPS_MAP[legacyName];\n var legacyArr = elOption[legacyName];\n if (legacyArr) {\n allProps[xyName[0]] = legacyArr[0];\n allProps[xyName[1]] = legacyArr[1];\n }\n }\n for (var i = 0; i < TRANSFORMABLE_PROPS.length; i++) {\n var key = TRANSFORMABLE_PROPS[i];\n if (elOption[key] != null) {\n allProps[key] = elOption[key];\n }\n }\n}\nfunction prepareStyleTransitionFrom(fromEl, elOption, styleOpt, transFromProps) {\n if (!styleOpt) {\n return;\n }\n var fromElStyle = fromEl.style;\n var transFromStyleProps;\n if (fromElStyle) {\n var styleTransition = styleOpt.transition;\n var elTransition = elOption.transition;\n if (styleTransition && !isTransitionAll(styleTransition)) {\n var transitionKeys = normalizeToArray(styleTransition);\n !transFromStyleProps && (transFromStyleProps = transFromProps.style = {});\n for (var i = 0; i < transitionKeys.length; i++) {\n var key = transitionKeys[i];\n var elVal = fromElStyle[key];\n // Do not clone, see `checkNonStyleTansitionRefer`.\n transFromStyleProps[key] = elVal;\n }\n } else if (fromEl.getAnimationStyleProps && (isTransitionAll(elTransition) || isTransitionAll(styleTransition) || indexOf(elTransition, 'style') >= 0)) {\n var animationProps = fromEl.getAnimationStyleProps();\n var animationStyleProps = animationProps ? animationProps.style : null;\n if (animationStyleProps) {\n !transFromStyleProps && (transFromStyleProps = transFromProps.style = {});\n var styleKeys = keys(styleOpt);\n for (var i = 0; i < styleKeys.length; i++) {\n var key = styleKeys[i];\n if (animationStyleProps[key]) {\n var elVal = fromElStyle[key];\n transFromStyleProps[key] = elVal;\n }\n }\n }\n }\n }\n}\nfunction isNonStyleTransitionEnabled(optVal, elVal) {\n // The same as `checkNonStyleTansitionRefer`.\n return !isArrayLike(optVal) ? optVal != null && isFinite(optVal) : optVal !== elVal;\n}\nvar checkTransformPropRefer;\nif (process.env.NODE_ENV !== 'production') {\n checkTransformPropRefer = function (key, usedIn) {\n if (!hasOwn(TRANSFORM_PROPS_MAP, key)) {\n warn('Prop `' + key + '` is not a permitted in `' + usedIn + '`. ' + 'Only `' + keys(TRANSFORM_PROPS_MAP).join('`, `') + '` are permitted.');\n }\n };\n}", "\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { keys, filter, each, isArray, indexOf } from 'zrender/lib/core/util.js';\nimport { ELEMENT_ANIMATABLE_PROPS } from './customGraphicTransition.js';\nimport { getAnimationConfig } from './basicTransition.js';\nimport { warn } from '../util/log.js';\nimport { makeInner } from '../util/model.js';\nvar getStateToRestore = makeInner();\nvar KEYFRAME_EXCLUDE_KEYS = ['percent', 'easing', 'shape', 'style', 'extra'];\n/**\n * Stop previous keyframe animation and restore the attributes.\n * Avoid new keyframe animation starts with wrong internal state when the percent: 0 is not set.\n */\nexport function stopPreviousKeyframeAnimationAndRestore(el) {\n // Stop previous keyframe animation.\n el.stopAnimation('keyframe');\n // Restore\n el.attr(getStateToRestore(el));\n}\nexport function applyKeyframeAnimation(el, animationOpts, animatableModel) {\n if (!animatableModel.isAnimationEnabled() || !animationOpts) {\n return;\n }\n if (isArray(animationOpts)) {\n each(animationOpts, function (singleAnimationOpts) {\n applyKeyframeAnimation(el, singleAnimationOpts, animatableModel);\n });\n return;\n }\n var keyframes = animationOpts.keyframes;\n var duration = animationOpts.duration;\n if (animatableModel && duration == null) {\n // Default to use duration of config.\n // NOTE: animation config from payload will be ignored because they are mainly for transitions.\n var config = getAnimationConfig('enter', animatableModel, 0);\n duration = config && config.duration;\n }\n if (!keyframes || !duration) {\n return;\n }\n var stateToRestore = getStateToRestore(el);\n each(ELEMENT_ANIMATABLE_PROPS, function (targetPropName) {\n if (targetPropName && !el[targetPropName]) {\n return;\n }\n var animator;\n var endFrameIsSet = false;\n // Sort keyframes by percent.\n keyframes.sort(function (a, b) {\n return a.percent - b.percent;\n });\n each(keyframes, function (kf) {\n // Stop current animation.\n var animators = el.animators;\n var kfValues = targetPropName ? kf[targetPropName] : kf;\n if (process.env.NODE_ENV !== 'production') {\n if (kf.percent >= 1) {\n endFrameIsSet = true;\n }\n }\n if (!kfValues) {\n return;\n }\n var propKeys = keys(kfValues);\n if (!targetPropName) {\n // PENDING performance?\n propKeys = filter(propKeys, function (key) {\n return indexOf(KEYFRAME_EXCLUDE_KEYS, key) < 0;\n });\n }\n if (!propKeys.length) {\n return;\n }\n if (!animator) {\n animator = el.animate(targetPropName, animationOpts.loop, true);\n animator.scope = 'keyframe';\n }\n for (var i = 0; i < animators.length; i++) {\n // Stop all other animation that is not keyframe.\n if (animators[i] !== animator && animators[i].targetName === animator.targetName) {\n animators[i].stopTracks(propKeys);\n }\n }\n targetPropName && (stateToRestore[targetPropName] = stateToRestore[targetPropName] || {});\n var savedTarget = targetPropName ? stateToRestore[targetPropName] : stateToRestore;\n each(propKeys, function (key) {\n // Save original value.\n savedTarget[key] = ((targetPropName ? el[targetPropName] : el) || {})[key];\n });\n animator.whenWithKeys(duration * kf.percent, kfValues, propKeys, kf.easing);\n });\n if (!animator) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!endFrameIsSet) {\n warn('End frame with percent: 1 is missing in the keyframeAnimation.', true);\n }\n }\n animator.delay(animationOpts.delay || 0).duration(duration).start(animationOpts.easing);\n });\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDO,IAAI,uBAAuB;AAAA,EAChC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,QAAQ;AACV;AACO,IAAI,6BAA6B,CAAC,OAAO,KAAK;AAC9C,IAAI,8BAA8B;AACzC,IAAI;AAAA;AAAA,EAAyB,SAAU,QAAQ;AAC7C,cAAUA,YAAW,MAAM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iBAAO,QAAQ,uBAAuB,GAAG,IAAI;AAAA,QAC/C,CAAC;AAAA,MACH;AACA,UAAI,CAAC,SAAS,QAAQ;AACpB;AAAA,MACF;AACA,UAAI,CAAC,UAAU;AACb,mBAAW,GAAG,QAAQ,gBAAgB,cAAc,MAAM,IAAI;AAC9D,iBAAS,QAAQ;AAAA,MACnB;AACA,eAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AAEzC,YAAI,UAAU,CAAC,MAAM,YAAY,UAAU,CAAC,EAAE,eAAe,SAAS,YAAY;AAChF,oBAAU,CAAC,EAAE,WAAW,QAAQ;AAAA,QAClC;AAAA,MACF;AACA,yBAAmB,eAAe,cAAc,IAAI,eAAe,cAAc,KAAK,CAAC;AACvF,UAAI,cAAc,iBAAiB,eAAe,cAAc,IAAI;AACpE,WAAK,UAAU,SAAU,KAAK;AAE5B,oBAAY,GAAG,MAAM,iBAAiB,GAAG,cAAc,IAAI,OAAO,CAAC,GAAG,GAAG;AAAA,MAC3E,CAAC;AACD,eAAS,aAAa,WAAW,GAAG,SAAS,UAAU,UAAU,GAAG,MAAM;AAAA,IAC5E,CAAC;AACD,QAAI,CAAC,UAAU;AACb;AAAA,IACF;AACA,QAAI,MAAuC;AACzC,UAAI,CAAC,eAAe;AAClB,aAAK,kEAAkE,IAAI;AAAA,MAC7E;AAAA,IACF;AACA,aAAS,MAAM,cAAc,SAAS,CAAC,EAAE,SAAS,QAAQ,EAAE,MAAM,cAAc,MAAM;AAAA,EACxF,CAAC;AACH;",
6
+ "names": ["GridModel", "CartesianAxisModel", "defaultOption", "AxisModel", "Cartesian", "scale", "Cartesian2D", "Axis2D", "scale", "asc", "AxisBuilderSharedContext", "layout", "AxisBuilder", "layout", "scale", "inner", "layout", "layout", "min", "max", "Grid", "scale", "axis", "scale", "AxisView", "Component_default", "CartesianAxisView", "scale", "CartesianXAxisView", "CartesianYAxisView", "GridView", "Component_default", "RadarModel", "scale", "RadarView", "colorIndex", "points", "splitAreas", "splitLines", "Component_default", "IndicatorAxis", "scale", "Radar", "install", "inner", "View", "copy", "SVGParser", "stop", "points", "type", "value", "scale", "GeoSVGResource", "points", "GeoJSONResource", "Geo", "map", "geoCoord", "getCoordSys", "getCoordSys", "MapSeries", "geoCoord", "GeoCreator", "GeoModel", "inner", "RoamController", "scale", "MapDraw", "points", "GeoView", "Component_default", "install", "actionInfo", "ParallelView", "Component_default", "ParallelModel", "ParallelAxis", "scale", "extend", "Parallel", "layout", "restrict", "applyTransform", "ParallelAxisModel", "mathMin", "mathMax", "BrushController", "panelOpts", "trigger", "trigger", "mathMax", "min", "mathMin", "max", "getTransform", "map", "points", "ParallelAxisView", "Component_default", "install", "scale", "filter", "min", "SingleAxisModel", "AxisModel_default", "Symbol", "idx", "scale", "SymbolDraw", "el", "each", "isObject", "VisualMapping", "StraightLineShape", "CurveShape", "ECLinePath", "createSymbol", "points", "Line", "percent", "tangent", "Line_default", "LineDraw", "Line_default", "makeSeriesScope", "el", "inner"]
7
+ }