@vtx/cs-map 1.0.38 → 1.0.40

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 (386) hide show
  1. package/lib/_util/EventEmitter.js +79 -0
  2. package/lib/_util/EventEmitter.js.map +1 -0
  3. package/lib/_util/Provider.js +12 -0
  4. package/lib/_util/Provider.js.map +1 -0
  5. package/lib/_util/filterSpecialCharacters.js +90 -0
  6. package/lib/_util/filterSpecialCharacters.js.map +1 -0
  7. package/lib/_util/generateRandomPosition.js +24 -0
  8. package/lib/_util/generateRandomPosition.js.map +1 -0
  9. package/lib/_util/getBBoxFromGeojson.js +110 -0
  10. package/lib/_util/getBBoxFromGeojson.js.map +1 -0
  11. package/lib/_util/getComponentProps.js +14 -0
  12. package/lib/_util/getComponentProps.js.map +1 -0
  13. package/lib/_util/getCookie.js +24 -0
  14. package/lib/_util/getCookie.js.map +1 -0
  15. package/lib/_util/getDefaultMapInfo.js +33 -0
  16. package/lib/_util/getDefaultMapInfo.js.map +1 -0
  17. package/lib/_util/getSystemInfo.js +26 -0
  18. package/lib/_util/getSystemInfo.js.map +1 -0
  19. package/lib/_util/getToken.js +13 -0
  20. package/lib/_util/getToken.js.map +1 -0
  21. package/lib/_util/getUrlParam.js +15 -0
  22. package/lib/_util/getUrlParam.js.map +1 -0
  23. package/lib/_util/http.js +186 -0
  24. package/lib/_util/http.js.map +1 -0
  25. package/lib/_util/isFunction.js +10 -0
  26. package/lib/_util/isFunction.js.map +1 -0
  27. package/lib/_util/isObject.js +10 -0
  28. package/lib/_util/isObject.js.map +1 -0
  29. package/lib/_util/layer.js +140 -0
  30. package/lib/_util/layer.js.map +1 -0
  31. package/lib/_util/mapTool.js +187 -0
  32. package/lib/_util/mapTool.js.map +1 -0
  33. package/lib/_util/setCookie.js +15 -0
  34. package/lib/_util/setCookie.js.map +1 -0
  35. package/lib/_util/transformRgb.js +33 -0
  36. package/lib/_util/transformRgb.js.map +1 -0
  37. package/lib/_util/useColSize.js +28 -0
  38. package/lib/_util/useColSize.js.map +1 -0
  39. package/lib/_util/useInterval.js +19 -0
  40. package/lib/_util/useInterval.js.map +1 -0
  41. package/lib/_util/useProps.js +14 -0
  42. package/lib/_util/useProps.js.map +1 -0
  43. package/lib/_util/useSet.js +44 -0
  44. package/lib/_util/useSet.js.map +1 -0
  45. package/lib/assets/base-img-1.png +0 -0
  46. package/lib/assets/base-img-2.png +0 -0
  47. package/lib/assets/base-img-3.png +0 -0
  48. package/lib/assets/base-img-4.png +0 -0
  49. package/lib/assets/base-img-5.png +0 -0
  50. package/lib/assets/base-img.png +0 -0
  51. package/lib/assets/bz.png +0 -0
  52. package/lib/assets/colors.png +0 -0
  53. package/lib/assets/colors1.png +0 -0
  54. package/lib/assets/ll.png +0 -0
  55. package/lib/assets/people.gif +0 -0
  56. package/lib/assets/sw.png +0 -0
  57. package/lib/assets/water.png +0 -0
  58. package/lib/assets/yl.png +0 -0
  59. package/lib/cesium-tiles-layer/CesiumTilesLayer.js +56 -0
  60. package/lib/cesium-tiles-layer/CesiumTilesLayer.js.map +1 -0
  61. package/lib/cesium-tiles-layer/index.js +73 -0
  62. package/lib/cesium-tiles-layer/index.js.map +1 -0
  63. package/lib/cesium-tiles-layer/style/css.js +4 -0
  64. package/lib/cesium-tiles-layer/style/css.js.map +1 -0
  65. package/lib/cesium-tiles-layer/style/index.css +0 -0
  66. package/lib/cesium-tiles-layer/style/index.js +4 -0
  67. package/lib/cesium-tiles-layer/style/index.js.map +1 -0
  68. package/lib/cesium-tiles-layer/style/index.less +0 -0
  69. package/lib/circle/circle.js +67 -0
  70. package/lib/circle/circle.js.map +1 -0
  71. package/lib/circle/index.js +49 -0
  72. package/lib/circle/index.js.map +1 -0
  73. package/lib/circle/style/css.js +2 -0
  74. package/lib/circle/style/css.js.map +1 -0
  75. package/lib/circle/style/index.js +2 -0
  76. package/lib/circle/style/index.js.map +1 -0
  77. package/lib/config.js +12 -0
  78. package/lib/config.js.map +1 -0
  79. package/lib/demand-layer/DemandLayer.js +409 -0
  80. package/lib/demand-layer/DemandLayer.js.map +1 -0
  81. package/lib/demand-layer/index.js +104 -0
  82. package/lib/demand-layer/index.js.map +1 -0
  83. package/lib/demand-layer/style/css.js +4 -0
  84. package/lib/demand-layer/style/css.js.map +1 -0
  85. package/lib/demand-layer/style/index.css +0 -0
  86. package/lib/demand-layer/style/index.js +4 -0
  87. package/lib/demand-layer/style/index.js.map +1 -0
  88. package/lib/demand-layer/style/index.less +0 -0
  89. package/lib/events/index.js +27 -0
  90. package/lib/events/index.js.map +1 -0
  91. package/lib/feature-layer/FeatureLayer.js +458 -0
  92. package/lib/feature-layer/FeatureLayer.js.map +1 -0
  93. package/lib/feature-layer/createFeatureCollection.js +127 -0
  94. package/lib/feature-layer/createFeatureCollection.js.map +1 -0
  95. package/lib/feature-layer/index.js +115 -0
  96. package/lib/feature-layer/index.js.map +1 -0
  97. package/lib/feature-layer/style/css.js +4 -0
  98. package/lib/feature-layer/style/css.js.map +1 -0
  99. package/lib/feature-layer/style/index.css +0 -0
  100. package/lib/feature-layer/style/index.js +4 -0
  101. package/lib/feature-layer/style/index.js.map +1 -0
  102. package/lib/feature-layer/style/index.less +0 -0
  103. package/lib/fly-line-layer/FlyLineLayer.js +259 -0
  104. package/lib/fly-line-layer/FlyLineLayer.js.map +1 -0
  105. package/lib/fly-line-layer/index.js +90 -0
  106. package/lib/fly-line-layer/index.js.map +1 -0
  107. package/lib/fly-line-layer/lineFlowMaterialProperty.js +89 -0
  108. package/lib/fly-line-layer/lineFlowMaterialProperty.js.map +1 -0
  109. package/lib/fly-line-layer/style/css.js +4 -0
  110. package/lib/fly-line-layer/style/css.js.map +1 -0
  111. package/lib/fly-line-layer/style/index.css +0 -0
  112. package/lib/fly-line-layer/style/index.js +4 -0
  113. package/lib/fly-line-layer/style/index.js.map +1 -0
  114. package/lib/fly-line-layer/style/index.less +0 -0
  115. package/lib/gif-dom-layer/GifDomLayer.js +104 -0
  116. package/lib/gif-dom-layer/GifDomLayer.js.map +1 -0
  117. package/lib/gif-dom-layer/index.js +44 -0
  118. package/lib/gif-dom-layer/index.js.map +1 -0
  119. package/lib/gif-dom-layer/style/css.js +4 -0
  120. package/lib/gif-dom-layer/style/css.js.map +1 -0
  121. package/lib/gif-dom-layer/style/index.css +0 -0
  122. package/lib/gif-dom-layer/style/index.js +4 -0
  123. package/lib/gif-dom-layer/style/index.js.map +1 -0
  124. package/lib/gif-dom-layer/style/index.less +0 -0
  125. package/lib/gradation-line-layer/GradationLineLayer.js +103 -0
  126. package/lib/gradation-line-layer/GradationLineLayer.js.map +1 -0
  127. package/lib/gradation-line-layer/index.js +83 -0
  128. package/lib/gradation-line-layer/index.js.map +1 -0
  129. package/lib/gradation-line-layer/style/css.js +4 -0
  130. package/lib/gradation-line-layer/style/css.js.map +1 -0
  131. package/lib/gradation-line-layer/style/index.css +0 -0
  132. package/lib/gradation-line-layer/style/index.js +4 -0
  133. package/lib/gradation-line-layer/style/index.js.map +1 -0
  134. package/lib/gradation-line-layer/style/index.less +0 -0
  135. package/lib/group-layer/GroupLayer.js +135 -0
  136. package/lib/group-layer/GroupLayer.js.map +1 -0
  137. package/lib/group-layer/index.js +71 -0
  138. package/lib/group-layer/index.js.map +1 -0
  139. package/lib/group-layer/style/css.js +4 -0
  140. package/lib/group-layer/style/css.js.map +1 -0
  141. package/lib/group-layer/style/index.css +0 -0
  142. package/lib/group-layer/style/index.js +4 -0
  143. package/lib/group-layer/style/index.js.map +1 -0
  144. package/lib/group-layer/style/index.less +0 -0
  145. package/lib/heatmap-layer/CesiumHeatmap.js +445 -0
  146. package/lib/heatmap-layer/CesiumHeatmap.js.map +1 -0
  147. package/lib/heatmap-layer/HeatmapLayer.js +157 -0
  148. package/lib/heatmap-layer/HeatmapLayer.js.map +1 -0
  149. package/lib/heatmap-layer/heatmap.js +610 -0
  150. package/lib/heatmap-layer/heatmap.js.map +1 -0
  151. package/lib/heatmap-layer/index.js +90 -0
  152. package/lib/heatmap-layer/index.js.map +1 -0
  153. package/lib/heatmap-layer/style/css.js +4 -0
  154. package/lib/heatmap-layer/style/css.js.map +1 -0
  155. package/lib/heatmap-layer/style/index.css +0 -0
  156. package/lib/heatmap-layer/style/index.js +4 -0
  157. package/lib/heatmap-layer/style/index.js.map +1 -0
  158. package/lib/heatmap-layer/style/index.less +0 -0
  159. package/lib/highlight-layer/HighlightLayer.js +262 -0
  160. package/lib/highlight-layer/HighlightLayer.js.map +1 -0
  161. package/lib/highlight-layer/index.js +25 -0
  162. package/lib/highlight-layer/index.js.map +1 -0
  163. package/lib/highlight-layer/style/css.js +4 -0
  164. package/lib/highlight-layer/style/css.js.map +1 -0
  165. package/lib/highlight-layer/style/index.css +0 -0
  166. package/lib/highlight-layer/style/index.js +4 -0
  167. package/lib/highlight-layer/style/index.js.map +1 -0
  168. package/lib/highlight-layer/style/index.less +0 -0
  169. package/lib/image-layer/ImageLayer.js +250 -0
  170. package/lib/image-layer/ImageLayer.js.map +1 -0
  171. package/lib/image-layer/index.js +134 -0
  172. package/lib/image-layer/index.js.map +1 -0
  173. package/lib/image-layer/style/css.js +4 -0
  174. package/lib/image-layer/style/css.js.map +1 -0
  175. package/lib/image-layer/style/index.css +0 -0
  176. package/lib/image-layer/style/index.js +4 -0
  177. package/lib/image-layer/style/index.js.map +1 -0
  178. package/lib/image-layer/style/index.less +0 -0
  179. package/lib/index.js +147 -0
  180. package/lib/index.js.map +1 -0
  181. package/lib/label/Label.js +74 -0
  182. package/lib/label/Label.js.map +1 -0
  183. package/lib/label/index.js +51 -0
  184. package/lib/label/index.js.map +1 -0
  185. package/lib/label/style/css.js +2 -0
  186. package/lib/label/style/css.js.map +1 -0
  187. package/lib/label/style/index.js +2 -0
  188. package/lib/label/style/index.js.map +1 -0
  189. package/lib/legend/index.js +208 -0
  190. package/lib/legend/index.js.map +1 -0
  191. package/lib/legend/style/css.js +8 -0
  192. package/lib/legend/style/css.js.map +1 -0
  193. package/lib/legend/style/index.css +60 -0
  194. package/lib/legend/style/index.js +8 -0
  195. package/lib/legend/style/index.js.map +1 -0
  196. package/lib/legend/style/index.less +63 -0
  197. package/lib/line-flow-layer/LineFlowLayer.js +104 -0
  198. package/lib/line-flow-layer/LineFlowLayer.js.map +1 -0
  199. package/lib/line-flow-layer/index.js +34 -0
  200. package/lib/line-flow-layer/index.js.map +1 -0
  201. package/lib/line-flow-layer/style/css.js +4 -0
  202. package/lib/line-flow-layer/style/css.js.map +1 -0
  203. package/lib/line-flow-layer/style/index.css +0 -0
  204. package/lib/line-flow-layer/style/index.js +4 -0
  205. package/lib/line-flow-layer/style/index.js.map +1 -0
  206. package/lib/line-flow-layer/style/index.less +0 -0
  207. package/lib/map/InfoTool/index.css +55 -0
  208. package/lib/map/InfoTool/index.js +246 -0
  209. package/lib/map/InfoTool/index.js.map +1 -0
  210. package/lib/map/InfoTool/index.less +46 -0
  211. package/lib/map/InfoTool/util.js +112 -0
  212. package/lib/map/InfoTool/util.js.map +1 -0
  213. package/lib/map/InfoWindow.js +72 -0
  214. package/lib/map/InfoWindow.js.map +1 -0
  215. package/lib/map/Layers.js +294 -0
  216. package/lib/map/Layers.js.map +1 -0
  217. package/lib/map/Popup.js +302 -0
  218. package/lib/map/Popup.js.map +1 -0
  219. package/lib/map/base/imagery/amap/AmapImageryProvider.js +46 -0
  220. package/lib/map/base/imagery/amap/AmapImageryProvider.js.map +1 -0
  221. package/lib/map/base/imagery/amap/AmapMercatorTilingScheme.js +46 -0
  222. package/lib/map/base/imagery/amap/AmapMercatorTilingScheme.js.map +1 -0
  223. package/lib/map/base/imagery/baidu/BaiduImageryProvider.js +146 -0
  224. package/lib/map/base/imagery/baidu/BaiduImageryProvider.js.map +1 -0
  225. package/lib/map/base/imagery/baidu/BaiduMercatorProjection.js +377 -0
  226. package/lib/map/base/imagery/baidu/BaiduMercatorProjection.js.map +1 -0
  227. package/lib/map/base/imagery/baidu/BaiduMercatorTilingScheme.js +121 -0
  228. package/lib/map/base/imagery/baidu/BaiduMercatorTilingScheme.js.map +1 -0
  229. package/lib/map/base/imagery/geoq/GeoQImageryProvider.js +48 -0
  230. package/lib/map/base/imagery/geoq/GeoQImageryProvider.js.map +1 -0
  231. package/lib/map/base/imagery/google/GoogleImageryProvider.js +41 -0
  232. package/lib/map/base/imagery/google/GoogleImageryProvider.js.map +1 -0
  233. package/lib/map/base/imagery/tdt/TdtImageryProvider.js +38 -0
  234. package/lib/map/base/imagery/tdt/TdtImageryProvider.js.map +1 -0
  235. package/lib/map/base/imagery/tencent/TencentImageryProvider.js +59 -0
  236. package/lib/map/base/imagery/tencent/TencentImageryProvider.js.map +1 -0
  237. package/lib/map/base/imagery/transform/AmapMercatorTilingScheme.js +46 -0
  238. package/lib/map/base/imagery/transform/AmapMercatorTilingScheme.js.map +1 -0
  239. package/lib/map/base/imagery/transform/CoordTransform.js +173 -0
  240. package/lib/map/base/imagery/transform/CoordTransform.js.map +1 -0
  241. package/lib/map/base/index.js +204 -0
  242. package/lib/map/base/index.js.map +1 -0
  243. package/lib/map/hooks/useGetMapFeatureInfoByText.js +117 -0
  244. package/lib/map/hooks/useGetMapFeatureInfoByText.js.map +1 -0
  245. package/lib/map/index.js +874 -0
  246. package/lib/map/index.js.map +1 -0
  247. package/lib/map/material/AroundPoint.js +65 -0
  248. package/lib/map/material/AroundPoint.js.map +1 -0
  249. package/lib/map/material/CircleRippleMaterialProperty.js +87 -0
  250. package/lib/map/material/CircleRippleMaterialProperty.js.map +1 -0
  251. package/lib/map/material/ODLineLayer.js +91 -0
  252. package/lib/map/material/ODLineLayer.js.map +1 -0
  253. package/lib/map/material/PolylineTrailLinkMaterialProperty.js +100 -0
  254. package/lib/map/material/PolylineTrailLinkMaterialProperty.js.map +1 -0
  255. package/lib/map/material/PolylineTrailMaterialProperty.js +101 -0
  256. package/lib/map/material/PolylineTrailMaterialProperty.js.map +1 -0
  257. package/lib/map/material/TilesBuilding.js +207 -0
  258. package/lib/map/material/TilesBuilding.js.map +1 -0
  259. package/lib/map/material/assets/colors1.png +0 -0
  260. package/lib/map/material/assets/colors2.png +0 -0
  261. package/lib/map/material/index.js +16 -0
  262. package/lib/map/material/index.js.map +1 -0
  263. package/lib/map/style/css.js +4 -0
  264. package/lib/map/style/css.js.map +1 -0
  265. package/lib/map/style/index.css +155 -0
  266. package/lib/map/style/index.js +4 -0
  267. package/lib/map/style/index.js.map +1 -0
  268. package/lib/map/style/index.less +149 -0
  269. package/lib/marker/Marker.js +112 -0
  270. package/lib/marker/Marker.js.map +1 -0
  271. package/lib/marker/index.js +49 -0
  272. package/lib/marker/index.js.map +1 -0
  273. package/lib/marker/style/css.js +2 -0
  274. package/lib/marker/style/css.js.map +1 -0
  275. package/lib/marker/style/index.js +2 -0
  276. package/lib/marker/style/index.js.map +1 -0
  277. package/lib/point/Point.js +69 -0
  278. package/lib/point/Point.js.map +1 -0
  279. package/lib/point/index.js +49 -0
  280. package/lib/point/index.js.map +1 -0
  281. package/lib/point/style/css.js +2 -0
  282. package/lib/point/style/css.js.map +1 -0
  283. package/lib/point/style/index.js +2 -0
  284. package/lib/point/style/index.js.map +1 -0
  285. package/lib/polygon/Polygon.js +67 -0
  286. package/lib/polygon/Polygon.js.map +1 -0
  287. package/lib/polygon/index.js +49 -0
  288. package/lib/polygon/index.js.map +1 -0
  289. package/lib/polygon/style/css.js +2 -0
  290. package/lib/polygon/style/css.js.map +1 -0
  291. package/lib/polygon/style/index.js +2 -0
  292. package/lib/polygon/style/index.js.map +1 -0
  293. package/lib/polyline/Polyline.js +68 -0
  294. package/lib/polyline/Polyline.js.map +1 -0
  295. package/lib/polyline/index.js +49 -0
  296. package/lib/polyline/index.js.map +1 -0
  297. package/lib/polyline/style/css.js +2 -0
  298. package/lib/polyline/style/css.js.map +1 -0
  299. package/lib/polyline/style/index.js +2 -0
  300. package/lib/polyline/style/index.js.map +1 -0
  301. package/lib/renderer/index.js +268 -0
  302. package/lib/renderer/index.js.map +1 -0
  303. package/lib/renderer/style/css.js +4 -0
  304. package/lib/renderer/style/css.js.map +1 -0
  305. package/lib/renderer/style/index.css +0 -0
  306. package/lib/renderer/style/index.js +4 -0
  307. package/lib/renderer/style/index.js.map +1 -0
  308. package/lib/renderer/style/index.less +0 -0
  309. package/lib/style/index.css +0 -0
  310. package/lib/style/index.less +2 -0
  311. package/lib/style/themes/compact.css +0 -0
  312. package/lib/style/themes/compact.less +1 -0
  313. package/lib/style/themes/dark.css +0 -0
  314. package/lib/style/themes/dark.less +9 -0
  315. package/lib/style/themes/default.css +0 -0
  316. package/lib/style/themes/default.less +7 -0
  317. package/lib/style/themes/index.css +0 -0
  318. package/lib/style/themes/index.less +1 -0
  319. package/lib/style/themes/variable.css +0 -0
  320. package/lib/style/themes/variable.less +5 -0
  321. package/lib/tools/assets/footer.png +0 -0
  322. package/lib/tools/assets/layer.png +0 -0
  323. package/lib/tools/assets/search.png +0 -0
  324. package/lib/tools/base-map-switch/index.js +103 -0
  325. package/lib/tools/base-map-switch/index.js.map +1 -0
  326. package/lib/tools/dimension-switch/index.js +38 -0
  327. package/lib/tools/dimension-switch/index.js.map +1 -0
  328. package/lib/tools/index.js +49 -0
  329. package/lib/tools/index.js.map +1 -0
  330. package/lib/tools/layer-control/index.js +171 -0
  331. package/lib/tools/layer-control/index.js.map +1 -0
  332. package/lib/tools/map-search/Select/index.js +55 -0
  333. package/lib/tools/map-search/Select/index.js.map +1 -0
  334. package/lib/tools/map-search/Select/style/css.js +4 -0
  335. package/lib/tools/map-search/Select/style/css.js.map +1 -0
  336. package/lib/tools/map-search/Select/style/index.css +45 -0
  337. package/lib/tools/map-search/Select/style/index.js +4 -0
  338. package/lib/tools/map-search/Select/style/index.js.map +1 -0
  339. package/lib/tools/map-search/Select/style/index.less +47 -0
  340. package/lib/tools/map-search/index.js +204 -0
  341. package/lib/tools/map-search/index.js.map +1 -0
  342. package/lib/tools/style/css.js +8 -0
  343. package/lib/tools/style/css.js.map +1 -0
  344. package/lib/tools/style/index.css +208 -0
  345. package/lib/tools/style/index.js +8 -0
  346. package/lib/tools/style/index.js.map +1 -0
  347. package/lib/tools/style/index.less +225 -0
  348. package/lib/tools/tools-item/index.js +66 -0
  349. package/lib/tools/tools-item/index.js.map +1 -0
  350. package/lib/trail-polyline-layer/TrailPolylineLayer.js +81 -0
  351. package/lib/trail-polyline-layer/TrailPolylineLayer.js.map +1 -0
  352. package/lib/trail-polyline-layer/TrailPolylineMaterial.js +30 -0
  353. package/lib/trail-polyline-layer/TrailPolylineMaterial.js.map +1 -0
  354. package/lib/trail-polyline-layer/index.js +28 -0
  355. package/lib/trail-polyline-layer/index.js.map +1 -0
  356. package/lib/trail-polyline-layer/style/css.js +4 -0
  357. package/lib/trail-polyline-layer/style/css.js.map +1 -0
  358. package/lib/trail-polyline-layer/style/index.css +0 -0
  359. package/lib/trail-polyline-layer/style/index.js +4 -0
  360. package/lib/trail-polyline-layer/style/index.js.map +1 -0
  361. package/lib/trail-polyline-layer/style/index.less +0 -0
  362. package/lib/use-props/style/css.js +2 -0
  363. package/lib/use-props/style/css.js.map +1 -0
  364. package/lib/use-props/style/index.js +2 -0
  365. package/lib/use-props/style/index.js.map +1 -0
  366. package/lib/water-surface-layer/WaterSurfaceLayer.js +136 -0
  367. package/lib/water-surface-layer/WaterSurfaceLayer.js.map +1 -0
  368. package/lib/water-surface-layer/index.js +52 -0
  369. package/lib/water-surface-layer/index.js.map +1 -0
  370. package/lib/water-surface-layer/style/css.js +4 -0
  371. package/lib/water-surface-layer/style/css.js.map +1 -0
  372. package/lib/water-surface-layer/style/index.css +0 -0
  373. package/lib/water-surface-layer/style/index.js +4 -0
  374. package/lib/water-surface-layer/style/index.js.map +1 -0
  375. package/lib/water-surface-layer/style/index.less +0 -0
  376. package/lib/weather/Weather.js +174 -0
  377. package/lib/weather/Weather.js.map +1 -0
  378. package/lib/weather/index.js +36 -0
  379. package/lib/weather/index.js.map +1 -0
  380. package/lib/weather/style/css.js +8 -0
  381. package/lib/weather/style/css.js.map +1 -0
  382. package/lib/weather/style/index.css +60 -0
  383. package/lib/weather/style/index.js +8 -0
  384. package/lib/weather/style/index.js.map +1 -0
  385. package/lib/weather/style/index.less +63 -0
  386. package/package.json +1 -1
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
8
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
10
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
11
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
+ // 发布订阅模式
14
+ var EventEmitter = /*#__PURE__*/function () {
15
+ function EventEmitter() {
16
+ _classCallCheck(this, EventEmitter);
17
+ // 事件对象,存放订阅的名字和事件 如:{'click': [handle, handle2]}
18
+ this.events = {};
19
+ }
20
+
21
+ // 订阅事件方法
22
+ _createClass(EventEmitter, [{
23
+ key: "on",
24
+ value: function on(eventName, callback) {
25
+ this.events[eventName] = this.events[eventName] || [];
26
+ this.events[eventName].push(callback);
27
+ }
28
+
29
+ // 触发事件方法
30
+ }, {
31
+ key: "emit",
32
+ value: function emit(eventName) {
33
+ var _this = this;
34
+ for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
35
+ rest[_key - 1] = arguments[_key];
36
+ }
37
+ if (this.events[eventName]) {
38
+ this.events[eventName].forEach(function (f) {
39
+ return f.apply(_this, rest);
40
+ });
41
+ }
42
+ }
43
+
44
+ // 移除订阅事件
45
+ }, {
46
+ key: "un",
47
+ value: function un(eventName, callback) {
48
+ if (this.events[eventName]) {
49
+ this.events[eventName] = this.events[eventName].filter(function (f) {
50
+ return f !== callback;
51
+ });
52
+ }
53
+ }
54
+
55
+ // 只执行一次订阅的事件
56
+ }, {
57
+ key: "once",
58
+ value: function once(eventName, callback) {
59
+ var _this2 = this;
60
+ //创建临时方法
61
+ var fn = function fn() {
62
+ for (var _len2 = arguments.length, rest = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
63
+ rest[_key2] = arguments[_key2];
64
+ }
65
+ // 执行原有的callback
66
+ callback.apply(_this2, rest);
67
+
68
+ // 执行移除事件,删除临时方法
69
+ _this2.un(eventName, fn);
70
+ };
71
+
72
+ // 执行订阅事件,绑定临时方法
73
+ this.on(eventName, fn);
74
+ }
75
+ }]);
76
+ return EventEmitter;
77
+ }();
78
+ var _default = exports["default"] = EventEmitter;
79
+ //# sourceMappingURL=EventEmitter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventEmitter.js","names":["EventEmitter","_classCallCheck","events","_createClass","key","value","on","eventName","callback","push","emit","_this","_len","arguments","length","rest","Array","_key","forEach","f","apply","un","filter","once","_this2","fn","_len2","_key2","_default","exports"],"sources":["_util/EventEmitter.js"],"sourcesContent":["// 发布订阅模式\nclass EventEmitter {\n constructor() {\n // 事件对象,存放订阅的名字和事件 如:{'click': [handle, handle2]}\n this.events = {};\n }\n\n // 订阅事件方法\n on(eventName, callback) {\n this.events[eventName] = this.events[eventName] || [];\n this.events[eventName].push(callback);\n }\n\n // 触发事件方法\n emit(eventName, ...rest) {\n if (this.events[eventName]) {\n this.events[eventName].forEach(f => f.apply(this, rest))\n }\n }\n\n // 移除订阅事件\n un(eventName, callback) {\n if (this.events[eventName]) {\n this.events[eventName] = this.events[eventName].filter(f => f !== callback)\n }\n }\n\n // 只执行一次订阅的事件\n once(eventName, callback) {\n //创建临时方法\n const fn = (...rest) => {\n\n // 执行原有的callback\n callback.apply(this, rest)\n\n // 执行移除事件,删除临时方法\n this.un(eventName, fn)\n }\n\n // 执行订阅事件,绑定临时方法\n this.on(eventName, fn);\n }\n}\n\nexport default EventEmitter;\n"],"mappings":";;;;;;;;;;;;AAAA;AAAA,IACMA,YAAY;EAChB,SAAAA,aAAA,EAAc;IAAAC,eAAA,OAAAD,YAAA;IACZ;IACA,IAAI,CAACE,MAAM,GAAG,CAAC,CAAC;EAClB;;EAEA;EAAAC,YAAA,CAAAH,YAAA;IAAAI,GAAA;IAAAC,KAAA,EACA,SAAAC,GAAGC,SAAS,EAAEC,QAAQ,EAAE;MACtB,IAAI,CAACN,MAAM,CAACK,SAAS,CAAC,GAAG,IAAI,CAACL,MAAM,CAACK,SAAS,CAAC,IAAI,EAAE;MACrD,IAAI,CAACL,MAAM,CAACK,SAAS,CAAC,CAACE,IAAI,CAACD,QAAQ,CAAC;IACvC;;IAEA;EAAA;IAAAJ,GAAA;IAAAC,KAAA,EACA,SAAAK,KAAKH,SAAS,EAAW;MAAA,IAAAI,KAAA;MAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAANC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,OAAAA,IAAA,WAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;QAAJF,IAAI,CAAAE,IAAA,QAAAJ,SAAA,CAAAI,IAAA;MAAA;MACrB,IAAI,IAAI,CAACf,MAAM,CAACK,SAAS,C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["default"] = exports.Context = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ var Context = exports.Context = /*#__PURE__*/_react["default"].createContext({});
10
+ var Provider = Context.Provider;
11
+ var _default = exports["default"] = Provider;
12
+ //# sourceMappingURL=Provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Provider.js","names":["_react","_interopRequireDefault","require","obj","__esModule","Context","exports","React","createContext","Provider","_default"],"sources":["_util/Provider.js"],"sourcesContent":["import React from 'react';\nconst Context = React.createContext({});\nconst Provider = Context.Provider;\nexport { Context };\nexport default Provider;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0B,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAC1B,IAAME,OAAO,GAAAC,OAAA,CAAAD,OAAA,gBAAGE,iBAAK,CAACC,aAAa,CAAC,CAAC,CAAC,CAAC;AACvC,IAAMC,QAAQ,GAAGJ,OAAO,CAACI,QAAQ;AAAC,IAAAC,QAAA,GAAAJ,OAAA,cAEnBG,QAAQ"}
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = filterSpecialCharacters;
7
+ var _lodash = _interopRequireDefault(require("lodash.difference"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
10
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
13
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
14
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
15
+ function isNotEmpty(value) {
16
+ return Array.isArray(value) && value.length > 0;
17
+ }
18
+
19
+ /**
20
+ * 过滤特殊字符
21
+ * @param {String} value 值
22
+ * @param {Object} option
23
+ * @param {Array} [option.include] 新增
24
+ * @param {Array} [option.exclude] 排除
25
+ */
26
+ function filterSpecialCharacters(value) {
27
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
28
+ _ref$include = _ref.include,
29
+ include = _ref$include === void 0 ? [] : _ref$include,
30
+ _ref$exclude = _ref.exclude,
31
+ exclude = _ref$exclude === void 0 ? [] : _ref$exclude;
32
+ // 特殊符号,- _ 排除
33
+ var specialCharacter = [
34
+ // 小括号
35
+ '(', ')', '(', ')',
36
+ // 中括号
37
+ '\\[', '\\]', '[', ']',
38
+ // 大括号
39
+ '{', '}', '{', '}',
40
+ // 方头括号
41
+ '【', '】',
42
+ // 尖括号
43
+ '<', '>',
44
+ // 书名号
45
+ '《', '》',
46
+ // 斜杠
47
+ '/',
48
+ // 反斜杠
49
+ '\\\\',
50
+ // 逗号
51
+ ',', ',',
52
+ // 句号
53
+ '.', '。',
54
+ // 冒号
55
+ ':', ':',
56
+ // 分号
57
+ ';', ';',
58
+ // 顿号
59
+ '、',
60
+ // 破折号
61
+ '——',
62
+ // 感叹号
63
+ '!', '!',
64
+ // 问号
65
+ '?', '?',
66
+ // 加减等于
67
+ '+', '=',
68
+ // 单引号
69
+ "'", '‘', '’',
70
+ // 双引号
71
+ '"', '“', '”',
72
+ // 金钱
73
+ '$', '¥',
74
+ // 百分号
75
+ '%', '%',
76
+ // 其它
77
+ '@', '#', '`', '~', '*', '^', '……', '|', '&'];
78
+
79
+ // 新增
80
+ if (isNotEmpty(include)) {
81
+ specialCharacter = Array.from(new Set([].concat(_toConsumableArray(specialCharacter), _toConsumableArray(include))));
82
+ }
83
+
84
+ // 移除
85
+ if (isNotEmpty(exclude)) {
86
+ specialCharacter = (0, _lodash["default"])(specialCharacter, exclude);
87
+ }
88
+ return value.replace(new RegExp("[".concat(specialCharacter.join(''), "]"), 'g'), '');
89
+ }
90
+ //# sourceMappingURL=filterSpecialCharacters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterSpecialCharacters.js","names":["_lodash","_interopRequireDefault","require","obj","__esModule","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","Array","from","test","iter","Symbol","iterator","isArray","len","length","i","arr2","isNotEmpty","value","filterSpecialCharacters","_ref","arguments","undefined","_ref$include","include","_ref$exclude","exclude","specialCharacter","Set","concat","difference","replace","RegExp","join"],"sources":["_util/filterSpecialCharacters.js"],"sourcesContent":["import difference from 'lodash.difference';\n\nfunction isNotEmpty(value) {\n return Array.isArray(value) && value.length > 0;\n}\n\n/**\n * 过滤特殊字符\n * @param {String} value 值\n * @param {Object} option\n * @param {Array} [option.include] 新增\n * @param {Array} [option.exclude] 排除\n */\nexport default function filterSpecialCharacters(value, { include = [], exclude = [] } = {}) {\n // 特殊符号,- _ 排除\n let specialCharacter = [\n // 小括号\n '(',\n ')',\n '(',\n ')',\n // 中括号\n '\\\\[',\n '\\\\]',\n '[',\n ']',\n // 大括号\n '{',\n '}',\n '{',\n '}',\n // 方头括号\n '【',\n '】',\n // 尖括号\n '<',\n '>',\n // 书名号\n '《',\n '》',\n // 斜杠\n '/',\n // 反斜杠\n '\\\\\\\\',\n // 逗号\n ',',\n ',',\n // 句号\n '.',\n '。',\n // 冒号\n ':',\n ':',\n // 分号\n ';',\n ';',\n // 顿号\n '、',\n // 破折号\n '——',\n // 感叹号\n '!',\n '!',\n // 问号\n '?',\n '?',\n // 加减等于\n '+',\n '=',\n // 单引号\n \"'\",\n '‘',\n '’',\n // 双引号\n '\"',\n '“',\n '”',\n // 金钱\n '$',\n '¥',\n // 百分号\n '%',\n '%',\n // 其它\n '@',\n '#',\n '`',\n '~',\n '*',\n '^',\n '……',\n '|',\n '&',\n ];\n\n // 新增\n if (isNotEmpty(include)) {\n specialCharacter = Array.from(new Set([...specialCharacter, ...include]));\n }\n\n // 移除\n if (isNotEmpty(exclude)) {\n specialCharacter = difference(specialCharacter, exclude);\n }\n\n return value.replace(new RegExp(`[${specialCharacter.join('')}]`, 'g'), '');\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,mBAAAC,GAAA,WAAAC,kBAAA,CAAAD,GAAA,KAAAE,gBAAA,CAAAF,GAAA,KAAAG,2BAAA,CAAAH,GAAA,KAAAI,kBAAA;AAAA,SAAAA,mBAAA,cAAAC,SAAA;AAAA,SAAAF,4BAAAG,CAAA,EAAAC,MAAA,SAAAD,CAAA,qBAAAA,CAAA,sBAAAE,iBAAA,CAAAF,CAAA,EAAAC,MAAA,OAAAE,CAAA,GAAAC,MAAA,CAAAC,SAAA,CAAAC,QAAA,CAAAC,IAAA,CAAAP,CAAA,EAAAQ,KAAA,aAAAL,CAAA,iBAAAH,CAAA,CAAAS,WAAA,EAAAN,CAAA,GAAAH,CAAA,CAAAS,WAAA,CAAAC,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+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ /**
8
+ * @description: 产生随机点
9
+ * @param {*} position:中心点坐标
10
+ * @param {*} num:随机点数量
11
+ * @return {*}
12
+ */
13
+ function generateRandomPosition(position, num) {
14
+ var list = [];
15
+ for (var i = 0; i < num; i++) {
16
+ // random产生的随机数范围是0-1,需要加上正负模拟
17
+ var lon = position[0] + Math.random() * 0.04 * (i % 2 === 0 ? 1 : -1);
18
+ var lat = position[1] + Math.random() * 0.04 * (i % 2 === 0 ? 1 : -1);
19
+ list.push([lon, lat]);
20
+ }
21
+ return list;
22
+ }
23
+ var _default = exports["default"] = generateRandomPosition;
24
+ //# sourceMappingURL=generateRandomPosition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateRandomPosition.js","names":["generateRandomPosition","position","num","list","i","lon","Math","random","lat","push","_default","exports"],"sources":["_util/generateRandomPosition.js"],"sourcesContent":["/**\n * @description: 产生随机点\n * @param {*} position:中心点坐标\n * @param {*} num:随机点数量\n * @return {*}\n */\nfunction generateRandomPosition(position, num) {\n let list = []\n for (let i = 0; i < num; i++) {\n // random产生的随机数范围是0-1,需要加上正负模拟\n let lon = position[0] + Math.random() * 0.04 * (i % 2 === 0 ? 1 : -1);\n let lat = position[1] + Math.random() * 0.04 * (i % 2 === 0 ? 1 : -1);\n list.push([lon, lat])\n }\n return list\n}\n\nexport default generateRandomPosition;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,sBAAsBA,CAACC,QAAQ,EAAEC,GAAG,EAAE;EAC3C,IAAIC,IAAI,GAAG,EAAE;EACb,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,GAAG,EAAEE,CAAC,EAAE,EAAE;IAC1B;IACA,IAAIC,GAAG,GAAGJ,QAAQ,CAAC,CAAC,CAAC,GAAGK,IAAI,CAACC,MAAM,CAAC,CAAC,GAAG,IAAI,IAAIH,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACrE,IAAII,GAAG,GAAGP,QAAQ,CAAC,CAAC,CAAC,GAAGK,IAAI,CAACC,MAAM,CAAC,CAAC,GAAG,IAAI,IAAIH,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACrED,IAAI,CAACM,IAAI,CAAC,CAACJ,GAAG,EAAEG,GAAG,CAAC,CAAC;EACzB;EACA,OAAOL,IAAI;AACf;AAAC,IAAAO,QAAA,GAAAC,OAAA,cAEcX,sBAAsB"}
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getBox = exports["default"] = exports.computeMinMax = void 0;
7
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
8
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
13
+ /**
14
+ * 兼容最小最大值
15
+ * @param minCoordinate
16
+ * @param maxCoordinate
17
+ * @param padding
18
+ * @returns {[*,*,*,*]}
19
+ */
20
+ var computeMinMax = exports.computeMinMax = function computeMinMax(minCoordinate, maxCoordinate, padding) {
21
+ if (padding) {
22
+ if (Array.isArray(padding)) {
23
+ if (padding.length === 2) {
24
+ minCoordinate[0] = minCoordinate[0] - padding[0];
25
+ maxCoordinate[0] = maxCoordinate[0] + padding[0];
26
+ minCoordinate[1] = minCoordinate[1] - padding[1];
27
+ maxCoordinate[1] = maxCoordinate[1] + padding[1];
28
+ } else if (padding.length === 4) {
29
+ maxCoordinate[0] = maxCoordinate[0] + padding[0];
30
+ maxCoordinate[1] = maxCoordinate[1] + padding[1];
31
+ minCoordinate[1] = minCoordinate[1] - padding[2];
32
+ minCoordinate[0] = minCoordinate[0] - padding[3];
33
+ }
34
+ } else {
35
+ maxCoordinate[0] = maxCoordinate[0] + padding;
36
+ minCoordinate[0] = minCoordinate[0] - padding;
37
+ maxCoordinate[1] = maxCoordinate[1] + padding;
38
+ minCoordinate[1] = minCoordinate[1] - padding;
39
+ }
40
+ }
41
+ return [minCoordinate[0], minCoordinate[1], maxCoordinate[0], maxCoordinate[1]];
42
+ };
43
+ var getPaddingByUnit = function getPaddingByUnit(padding, unit) {
44
+ if (unit === 'px') {
45
+ // 将像素值转换为度
46
+ var pixelToDegreeConversionFactor = 1 / 111000; // 1 度大约等于 111000 像素
47
+ padding = padding * pixelToDegreeConversionFactor;
48
+ } else if (unit === 'm') {
49
+ // 将 padding 值从米转换为度
50
+ padding = padding / 111000; // 1 度大约等于 111000 米
51
+ }
52
+ return padding;
53
+ };
54
+ var transformPaddingByUnit = function transformPaddingByUnit(padding, unit) {
55
+ if (padding) {
56
+ if (Array.isArray(padding)) {
57
+ padding = padding.map(function (item) {
58
+ return getPaddingByUnit(item, unit);
59
+ });
60
+ } else {
61
+ padding = getPaddingByUnit(padding, unit);
62
+ }
63
+ }
64
+ return padding;
65
+ };
66
+
67
+ /**
68
+ * 获取边界
69
+ * @param coordinates
70
+ * @param options
71
+ * @returns {[*,*,*,*]}
72
+ */
73
+ var getBox = exports.getBox = function getBox(coordinates, options) {
74
+ // 找到最小的经度和纬度值
75
+ var minCoordinate = [];
76
+ var maxCoordinate = [];
77
+ coordinates.forEach(function (c, index) {
78
+ var i = index % 2;
79
+ if (i === 0) {
80
+ if (minCoordinate[0] === undefined || c < minCoordinate[0]) {
81
+ minCoordinate[0] = c;
82
+ }
83
+ if (maxCoordinate[0] === undefined || c > maxCoordinate[0]) {
84
+ maxCoordinate[0] = c;
85
+ }
86
+ } else if (i === 1) {
87
+ if (minCoordinate[1] === undefined || c < minCoordinate[1]) {
88
+ minCoordinate[1] = c;
89
+ }
90
+ if (maxCoordinate[1] === undefined || c > maxCoordinate[1]) {
91
+ maxCoordinate[1] = c;
92
+ }
93
+ }
94
+ });
95
+ if (options) {
96
+ var padding = options.padding,
97
+ unit = options.unit;
98
+ return computeMinMax(minCoordinate, maxCoordinate, transformPaddingByUnit(padding, unit));
99
+ }
100
+ return [minCoordinate[0], minCoordinate[1], maxCoordinate[0], maxCoordinate[1]];
101
+ };
102
+ var _default = exports["default"] = function _default(geoJson, options) {
103
+ var coordinates = [];
104
+ geoJson.features.map(function (feature) {
105
+ var c = feature.geometry.coordinates.flat(Infinity);
106
+ coordinates.push.apply(coordinates, _toConsumableArray(c));
107
+ });
108
+ return getBox(coordinates, options);
109
+ };
110
+ //# sourceMappingURL=getBBoxFromGeojson.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBBoxFromGeojson.js","names":["computeMinMax","exports","minCoordinate","maxCoordinate","padding","Array","isArray","length","getPaddingByUnit","unit","pixelToDegreeConversionFactor","transformPaddingByUnit","map","item","getBox","coordinates","options","forEach","c","index","i","undefined","_default","geoJson","features","feature","geometry","flat","Infinity","push","apply","_toConsumableArray"],"sources":["_util/getBBoxFromGeojson.js"],"sourcesContent":["/**\n * 兼容最小最大值\n * @param minCoordinate\n * @param maxCoordinate\n * @param padding\n * @returns {[*,*,*,*]}\n */\nexport const computeMinMax = (minCoordinate, maxCoordinate, padding) => {\n if (padding) {\n if (Array.isArray(padding)) {\n if (padding.length === 2) {\n minCoordinate[0] = minCoordinate[0] - padding[0];\n maxCoordinate[0] = maxCoordinate[0] + padding[0];\n\n minCoordinate[1] = minCoordinate[1] - padding[1];\n maxCoordinate[1] = maxCoordinate[1] + padding[1];\n } else if (padding.length === 4) {\n maxCoordinate[0] = maxCoordinate[0] + padding[0];\n maxCoordinate[1] = maxCoordinate[1] + padding[1];\n\n minCoordinate[1] = minCoordinate[1] - padding[2];\n minCoordinate[0] = minCoordinate[0] - padding[3];\n\n }\n } else {\n maxCoordinate[0] = maxCoordinate[0] + padding;\n minCoordinate[0] = minCoordinate[0] - padding;\n\n maxCoordinate[1] = maxCoordinate[1] + padding;\n minCoordinate[1] = minCoordinate[1] - padding;\n }\n }\n\n\n return [minCoordinate[0], minCoordinate[1], maxCoordinate[0], maxCoordinate[1]]\n}\n\nconst getPaddingByUnit = (padding, unit) => {\n if (unit === 'px') {\n // 将像素值转换为度\n const pixelToDegreeConversionFactor = 1 / 111000; // 1 度大约等于 111000 像素\n padding = padding * pixelToDegreeConversionFactor;\n\n } else if (unit === 'm') {\n // 将 padding 值从米转换为度\n padding = padding / 111000; // 1 度大约等于 111000 米\n }\n\n return padding\n}\n\nconst transformPaddingByUnit = (padding, unit) => {\n if (padding) {\n if (Array.isArray(padding)) {\n padding = padding.map(item => getPaddingByUnit(item, unit))\n } else {\n padding = getPaddingByUnit(padding, unit)\n }\n }\n\n return padding\n}\n\n/**\n * 获取边界\n * @param coordinates\n * @param options\n * @returns {[*,*,*,*]}\n */\nexport const getBox = (coordinates, options) => {\n // 找到最小的经度和纬度值\n let minCoordinate = [];\n let maxCoordinate = [];\n\n coordinates.forEach((c, index) => {\n let i = index%2;\n if (i === 0) {\n if (minCoordinate[0] === undefined || c < minCoordinate[0]) {\n minCoordinate[0] = c;\n }\n\n if (maxCoordinate[0] === undefined || c > maxCoordinate[0]) {\n maxCoordinate[0] = c;\n }\n } else if (i === 1) {\n if (minCoordinate[1] === undefined || c < minCoordinate[1]) {\n minCoordinate[1] = c;\n }\n\n if (maxCoordinate[1] === undefined || c > maxCoordinate[1]) {\n maxCoordinate[1] = c;\n }\n }\n })\n\n if (options) {\n let {padding, unit} = options;\n\n return computeMinMax(minCoordinate, maxCoordinate, transformPaddingByUnit(padding, unit))\n }\n\n return [minCoordinate[0], minCoordinate[1], maxCoordinate[0], maxCoordinate[1]];\n}\n\nexport default (geoJson, options) => {\n const coordinates = [];\n\n geoJson.features.map(feature => {\n let c = feature.geometry.coordinates.flat(Infinity);\n coordinates.push(...c)\n });\n\n return getBox(coordinates, options)\n}\n"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMA,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,SAAhBA,aAAaA,CAAIE,aAAa,EAAEC,aAAa,EAAEC,OAAO,EAAK;EACpE,IAAIA,OAAO,EAAE;IACT,IAAIC,KAAK,CAACC,OAAO,CAACF,OAAO,CAAC,EAAE;MACxB,IAAIA,OAAO,CAACG,MAAM,KAAK,CAAC,EAAE;QACtBL,aAAa,CAAC,CAAC,CAAC,GAAGA,aAAa,CAAC,CAAC,CAAC,GAAGE,OAAO,CAAC,CAAC,CAAC;QAChDD,aAAa,CAAC,CAAC,CAAC,GAAGA,aAAa,CAAC,CAAC,CAAC,GAAGC,OAAO,CAAC,CAAC,CAAC;QAEhDF,aAAa,CAAC,CAAC,CAAC,GAAGA,aAAa,CAAC,CAAC,CAAC,GAAGE,OAAO,CAAC,CAAC,CAAC;QAChDD,aAAa,CAAC,CAAC,CAAC,GAAGA,aAAa,CAAC,CAAC,CAAC,GAAGC,OAAO,CAAC,CAAC,CAAC;MACpD,CAAC,MAAM,IAAIA,OAAO,CAACG,MAAM,KAAK,CAAC,EAAE;QAC7BJ,aAAa,CAAC,CAAC,CAAC,GAAGA,aAAa,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Aa,CAAC,CAAC,CAAC,KAAKkB,SAAS,IAAIH,CAAC,GAAGf,aAAa,CAAC,CAAC,CAAC,EAAE;QACxDA,aAAa,CAAC,CAAC,CAAC,GAAGe,CAAC;MACxB;IACJ;EACJ,CAAC,CAAC;EAEF,IAAIF,OAAO,EAAE;IACT,IAAKZ,OAAO,GAAUY,OAAO,CAAxBZ,OAAO;MAAEK,IAAI,GAAIO,OAAO,CAAfP,IAAI;IAElB,OAAOT,aAAa,CAACE,aAAa,EAAEC,aAAa,EAAEQ,sBAAsB,CAACP,OAAO,EAAEK,IAAI,CAAC,CAAC;EAC7F;EAEA,OAAO,CAACP,aAAa,CAAC,CAAC,CAAC,EAAEA,aAAa,CAAC,CAAC,CAAC,EAAEC,aAAa,CAAC,CAAC,CAAC,EAAEA,aAAa,CAAC,CAAC,CAAC,CAAC;AACnF,CAAC;AAAA,IAAAmB,QAAA,GAAArB,OAAA,cAEc,SAAAqB,SAACC,OAAO,EAAEP,OAAO,EAAK;EACjC,IAAMD,WAAW,GAAG,EAAE;EAEtBQ,OAAO,CAACC,QAAQ,CAACZ,GAAG,CAAC,UAAAa,OAAO,EAAI;IAC5B,IAAIP,CAAC,GAAGO,OAAO,CAACC,QAAQ,CAACX,WAAW,CAACY,IAAI,CAACC,QAAQ,CAAC;IACnDb,WAAW,CAACc,IAAI,CAAAC,KAAA,CAAhBf,WAAW,EAAAgB,kBAAA,CAASb,CAAC,EAAC;EAC1B,CAAC,CAAC;EAEF,OAAOJ,MAAM,CAACC,WAAW,EAAEC,OAAO,CAAC;AACvC,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = getComponentProps;
7
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
8
+ function getComponentProps(prop) {
9
+ if (prop && _typeof(prop) === 'object') {
10
+ return prop;
11
+ }
12
+ return {};
13
+ }
14
+ //# sourceMappingURL=getComponentProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getComponentProps.js","names":["getComponentProps","prop","_typeof"],"sources":["_util/getComponentProps.js"],"sourcesContent":["export default function getComponentProps(prop) {\n if (prop && typeof prop === 'object') {\n return prop;\n }\n return {};\n}\n"],"mappings":";;;;;;;AAAe,SAASA,iBAAiBA,CAACC,IAAI,EAAE;EAC5C,IAAIA,IAAI,IAAIC,OAAA,CAAOD,IAAI,MAAK,QAAQ,EAAE;IAClC,OAAOA,IAAI;EACf;EACA,OAAO,CAAC,CAAC;AACb"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ /**
8
+ * @name cookie取值
9
+ * @param c_name 要取得的字段名
10
+ * @returns {string} 返回字段对应的值, 若字段不存在则返回空
11
+ */
12
+ var _default = exports["default"] = function _default(c_name) {
13
+ if (document.cookie.length > 0) {
14
+ var c_start = document.cookie.indexOf("".concat(c_name, "="));
15
+ if (c_start !== -1) {
16
+ c_start = c_start + c_name.length + 1;
17
+ var c_end = document.cookie.indexOf(';', c_start);
18
+ if (c_end == -1) c_end = document.cookie.length;
19
+ return unescape(document.cookie.substring(c_start, c_end));
20
+ }
21
+ }
22
+ return '';
23
+ };
24
+ //# sourceMappingURL=getCookie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCookie.js","names":["_default","exports","c_name","document","cookie","length","c_start","indexOf","concat","c_end","unescape","substring"],"sources":["_util/getCookie.js"],"sourcesContent":["/**\n * @name cookie取值\n * @param c_name 要取得的字段名\n * @returns {string} 返回字段对应的值, 若字段不存在则返回空\n */\nexport default c_name => {\n if (document.cookie.length > 0) {\n let c_start = document.cookie.indexOf(`${c_name}=`);\n if (c_start !== -1) {\n c_start = c_start + c_name.length + 1;\n let c_end = document.cookie.indexOf(';', c_start);\n if (c_end == -1) c_end = document.cookie.length;\n return unescape(document.cookie.substring(c_start, c_end));\n }\n }\n return '';\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAJA,IAAAA,QAAA,GAAAC,OAAA,cAKe,SAAAD,SAAAE,MAAM,EAAI;EACrB,IAAIC,QAAQ,CAACC,MAAM,CAACC,MAAM,GAAG,CAAC,EAAE;IAC5B,IAAIC,OAAO,GAAGH,QAAQ,CAACC,MAAM,CAACG,OAAO,IAAAC,MAAA,CAAIN,MAAM,MAAG,CAAC;IACnD,IAAII,OAAO,KAAK,CAAC,CAAC,EAAE;MAChBA,OAAO,GAAGA,OAAO,GAAGJ,MAAM,CAACG,MAAM,GAAG,CAAC;MACrC,IAAII,KAAK,GAAGN,QAAQ,CAACC,MAAM,CAACG,OAAO,CAAC,GAAG,EAAED,OAAO,CAAC;MACjD,IAAIG,KAAK,IAAI,CAAC,CAAC,EAAEA,KAAK,GAAGN,QAAQ,CAACC,MAAM,CAACC,MAAM;MAC/C,OAAOK,QAAQ,CAACP,QAAQ,CAACC,MAAM,CAACO,SAAS,CAACL,OAAO,EAAEG,KAAK,CAAC,CAAC;IAC9D;EACJ;EACA,OAAO,EAAE;AACb,CAAC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
8
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
+ var _default = exports["default"] = function _default() {
14
+ var _systemInfo;
15
+ var systemInfo = window.sessionStorage.getItem('systemInfo');
16
+ systemInfo = systemInfo && JSON.parse(systemInfo) || {};
17
+ var val = _objectSpread(_objectSpread({}, systemInfo), {}, {
18
+ longitude: systemInfo.longitude,
19
+ latitude: systemInfo.latitude,
20
+ mapType: 'wgs84'
21
+ });
22
+ if ((_systemInfo = systemInfo) !== null && _systemInfo !== void 0 && _systemInfo.mapDefJson) {
23
+ var mapDefJson = JSON.parse(systemInfo.mapDefJson);
24
+ var defaultMap = mapDefJson.find(function (v) {
25
+ return v.defaultMap;
26
+ }) || {};
27
+ val = _objectSpread(_objectSpread(_objectSpread({}, val), defaultMap), {}, {
28
+ mapType: defaultMap.coordinate || 'wgs84'
29
+ });
30
+ }
31
+ return val;
32
+ };
33
+ //# sourceMappingURL=getDefaultMapInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDefaultMapInfo.js","names":["_default","_systemInfo","systemInfo","window","sessionStorage","getItem","JSON","parse","val","_objectSpread","longitude","latitude","mapType","mapDefJson","defaultMap","find","v","coordinate"],"sources":["_util/getDefaultMapInfo.js"],"sourcesContent":["export default () => {\n let systemInfo = window.sessionStorage.getItem('systemInfo');\n systemInfo = (systemInfo && JSON.parse(systemInfo)) || {};\n\n let val = {\n ...systemInfo,\n longitude: systemInfo.longitude,\n latitude: systemInfo.latitude,\n mapType: 'wgs84',\n };\n if (systemInfo?.mapDefJson) {\n let mapDefJson = JSON.parse(systemInfo.mapDefJson);\n let defaultMap = mapDefJson.find(v => v.defaultMap) || {};\n val = {\n ...val,\n ...defaultMap,\n mapType: defaultMap.coordinate || 'wgs84',\n };\n }\n\n return val;\n};\n"],"mappings":";;;;;;;;;;;;oCAAe,SAAAA,SAAA,EAAM;EAAA,IAAAC,WAAA;EACjB,IAAIC,UAAU,GAAGC,MAAM,CAACC,cAAc,CAACC,OAAO,CAAC,YAAY,CAAC;EAC5DH,UAAU,GAAIA,UAAU,IAAII,IAAI,CAACC,KAAK,CAACL,UAAU,CAAC,IAAK,CAAC,CAAC;EAEzD,IAAIM,GAAG,GAAAC,aAAA,CAAAA,aAAA,KACAP,UAAU;IACbQ,SAAS,EAAER,UAAU,CAACQ,SAAS;IAC/BC,QAAQ,EAAET,UAAU,CAACS,QAAQ;IAC7BC,OAAO,EAAE;EAAO,EACnB;EACD,KAAAX,WAAA,GAAIC,UAAU,cAAAD,WAAA,eAAVA,WAAA,CAAYY,UAAU,EAAE;IACxB,IAAIA,UAAU,GAAGP,IAAI,CAACC,KAAK,CAACL,UAAU,CAACW,UAAU,CAAC;IAClD,IAAIC,UAAU,GAAGD,UAAU,CAACE,IAAI,CAAC,UAAAC,CAAC;MAAA,OAAIA,CAAC,CAACF,UAAU;IAAA,EAAC,IAAI,CAAC,CAAC;IACzDN,GAAG,GAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,KACID,GAAG,GACHM,UAAU;MACbF,OAAO,EAAEE,UAAU,CAACG,UAAU,IAAI;IAAO,EAC5C;EACL;EAEA,OAAOT,GAAG;AACd,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
8
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
+ var _default = exports["default"] = function _default(key) {
14
+ var systemInfo = localStorage.getItem('systemInfo');
15
+ var system = {};
16
+ if (systemInfo && systemInfo !== '[object Object]') {
17
+ system = JSON.parse(decodeURIComponent(decodeURIComponent(systemInfo)));
18
+ system = _objectSpread(_objectSpread({}, system), {}, {
19
+ access_token: system.token
20
+ });
21
+ }
22
+ if (key) {
23
+ return system[key];
24
+ }
25
+ };
26
+ //# sourceMappingURL=getSystemInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSystemInfo.js","names":["_default","key","systemInfo","localStorage","getItem","system","JSON","parse","decodeURIComponent","_objectSpread","access_token","token"],"sources":["_util/getSystemInfo.js"],"sourcesContent":["export default key => {\n const systemInfo = localStorage.getItem('systemInfo');\n let system = {};\n if (systemInfo && systemInfo !== '[object Object]') {\n system = JSON.parse(decodeURIComponent(decodeURIComponent(systemInfo)));\n system = {\n ...system,\n access_token: system.token,\n };\n }\n if (key) {\n return system[key];\n }\n};\n"],"mappings":";;;;;;;;;;;;oCAAe,SAAAA,SAAAC,GAAG,EAAI;EAClB,IAAMC,UAAU,GAAGC,YAAY,CAACC,OAAO,CAAC,YAAY,CAAC;EACrD,IAAIC,MAAM,GAAG,CAAC,CAAC;EACf,IAAIH,UAAU,IAAIA,UAAU,KAAK,iBAAiB,EAAE;IAChDG,MAAM,GAAGC,IAAI,CAACC,KAAK,CAACC,kBAAkB,CAACA,kBAAkB,CAACN,UAAU,CAAC,CAAC,CAAC;IACvEG,MAAM,GAAAI,aAAA,CAAAA,aAAA,KACCJ,MAAM;MACTK,YAAY,EAAEL,MAAM,CAACM;IAAK,EAC7B;EACL;EACA,IAAIV,GAAG,EAAE;IACL,OAAOI,MAAM,CAACJ,GAAG,CAAC;EACtB;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _getCookie = _interopRequireDefault(require("./getCookie"));
8
+ var _utils = require("@vtx/utils");
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
+ var _default = exports["default"] = function _default() {
11
+ return (0, _utils.getUrlParam)('token') || (0, _utils.getUrlParam)('access_token') || (0, _getCookie["default"])('token') || localStorage.getItem('token') || localStorage.getItem('access_token') || sessionStorage.getItem('token') || sessionStorage.getItem('access_token');
12
+ };
13
+ //# sourceMappingURL=getToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getToken.js","names":["_getCookie","_interopRequireDefault","require","_utils","obj","__esModule","_default","exports","getUrlParam","getCookie","localStorage","getItem","sessionStorage"],"sources":["_util/getToken.js"],"sourcesContent":["import getCookie from './getCookie';\nimport { getUrlParam } from '@vtx/utils';\n\nexport default () => {\n return (\n getUrlParam('token') ||\n getUrlParam('access_token') ||\n getCookie('token') ||\n localStorage.getItem('token') ||\n localStorage.getItem('access_token') ||\n sessionStorage.getItem('token') ||\n sessionStorage.getItem('access_token')\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAyC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,IAAAE,QAAA,GAAAC,OAAA,cAE1B,SAAAD,SAAA,EAAM;EACjB,OACI,IAAAE,kBAAW,EAAC,OAAO,CAAC,IACpB,IAAAA,kBAAW,EAAC,cAAc,CAAC,IAC3B,IAAAC,qBAAS,EAAC,OAAO,CAAC,IAClBC,YAAY,CAACC,OAAO,CAAC,OAAO,CAAC,IAC7BD,YAAY,CAACC,OAAO,CAAC,cAAc,CAAC,IACpCC,cAAc,CAACD,OAAO,CAAC,OAAO,CAAC,IAC/BC,cAAc,CAACD,OAAO,CAAC,cAAc,CAAC;AAE9C,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _querystring = _interopRequireDefault(require("querystring"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ var getUrlParam = function getUrlParam(key) {
10
+ var href = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.href;
11
+ var params = _querystring["default"].parse(href.split('?')[1]);
12
+ return key ? params[key] : params;
13
+ };
14
+ var _default = exports["default"] = getUrlParam;
15
+ //# sourceMappingURL=getUrlParam.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getUrlParam.js","names":["_querystring","_interopRequireDefault","require","obj","__esModule","getUrlParam","key","href","arguments","length","undefined","window","location","params","qs","parse","split","_default","exports"],"sources":["_util/getUrlParam.js"],"sourcesContent":["import qs from 'querystring';\n\nconst getUrlParam = (key, href = window.location.href) => {\n const params = qs.parse(href.split('?')[1]);\n return key ? params[key] : params;\n};\n\nexport default getUrlParam;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6B,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAE7B,IAAME,WAAW,GAAG,SAAdA,WAAWA,CAAIC,GAAG,EAAkC;EAAA,IAAhCC,IAAI,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGG,MAAM,CAACC,QAAQ,CAACL,IAAI;EACjD,IAAMM,MAAM,GAAGC,uBAAE,CAACC,KAAK,CAACR,IAAI,CAACS,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;EAC3C,OAAOV,GAAG,GAAGO,MAAM,CAACP,GAAG,CAAC,GAAGO,MAAM;AACrC,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,cAEab,WAAW"}