@labelbee/lb-components 1.22.0-beta.5 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (482) hide show
  1. package/dist/assets/annotation/LLMTool/empty.svg.js +1 -1
  2. package/dist/assets/annotation/LLMTool/imgFail_cn.svg.js +1 -1
  3. package/dist/assets/annotation/LLMTool/imgFail_en.svg.js +1 -1
  4. package/dist/assets/annotation/LLMTool/loading.svg.js +1 -1
  5. package/dist/assets/annotation/audio/clip.svg.js +1 -1
  6. package/dist/assets/annotation/audio/clipA.svg.js +1 -1
  7. package/dist/assets/annotation/audio/clipASmall.svg.js +1 -1
  8. package/dist/assets/annotation/audio/clipSmall.svg.js +1 -1
  9. package/dist/assets/annotation/audio/delete.svg.js +1 -1
  10. package/dist/assets/annotation/audio/loop.svg.js +1 -1
  11. package/dist/assets/annotation/audio/loopA.svg.js +1 -1
  12. package/dist/assets/annotation/audio/progressDot.svg.js +1 -1
  13. package/dist/assets/annotation/audio/progressDotA.svg.js +1 -1
  14. package/dist/assets/annotation/audio/tag.svg.js +1 -1
  15. package/dist/assets/annotation/audio/tagA.svg.js +1 -1
  16. package/dist/assets/annotation/common/icon_adapt.svg.js +1 -1
  17. package/dist/assets/annotation/common/icon_adapt_black.svg.js +1 -1
  18. package/dist/assets/annotation/common/icon_back.svg.js +1 -1
  19. package/dist/assets/annotation/common/icon_backA.svg.js +1 -1
  20. package/dist/assets/annotation/common/icon_clear.svg.js +1 -1
  21. package/dist/assets/annotation/common/icon_clearSmall.svg.js +1 -1
  22. package/dist/assets/annotation/common/icon_clearSmall_a.svg.js +1 -1
  23. package/dist/assets/annotation/common/icon_clear_a.svg.js +1 -1
  24. package/dist/assets/annotation/common/icon_esc.svg.js +1 -1
  25. package/dist/assets/annotation/common/icon_invalid.svg.js +1 -1
  26. package/dist/assets/annotation/common/icon_invalid_a.svg.js +1 -1
  27. package/dist/assets/annotation/common/icon_left_squareOutlined.svg.js +1 -1
  28. package/dist/assets/annotation/common/icon_menu_fold.svg.js +1 -1
  29. package/dist/assets/annotation/common/icon_next.svg.js +1 -1
  30. package/dist/assets/annotation/common/icon_nextA.svg.js +1 -1
  31. package/dist/assets/annotation/common/icon_r.svg.js +1 -1
  32. package/dist/assets/annotation/common/icon_rA.svg.js +1 -1
  33. package/dist/assets/annotation/common/icon_right_squareOutlined.svg.js +1 -1
  34. package/dist/assets/annotation/common/icon_save.svg.js +1 -1
  35. package/dist/assets/annotation/common/icon_saveA.svg.js +1 -1
  36. package/dist/assets/annotation/image/brightness.svg.js +1 -1
  37. package/dist/assets/annotation/image/contrast.svg.js +1 -1
  38. package/dist/assets/annotation/image/icon_yuantu.svg.js +1 -1
  39. package/dist/assets/annotation/image/saturation.svg.js +1 -1
  40. package/dist/assets/annotation/lineTool/icon_line.svg.js +1 -1
  41. package/dist/assets/annotation/lineTool/icon_line_a.svg.js +1 -1
  42. package/dist/assets/annotation/pointCloudTool/addSvg.svg.js +1 -1
  43. package/dist/assets/annotation/pointCloudTool/cancel.svg.js +1 -1
  44. package/dist/assets/annotation/pointCloudTool/changePointCloudValid.svg.js +1 -1
  45. package/dist/assets/annotation/pointCloudTool/circleSelector.svg.js +1 -1
  46. package/dist/assets/annotation/pointCloudTool/circleSelector_a.svg.js +1 -1
  47. package/dist/assets/annotation/pointCloudTool/clearSvg.svg.js +1 -1
  48. package/dist/assets/annotation/pointCloudTool/copy.svg.js +1 -1
  49. package/dist/assets/annotation/pointCloudTool/coverMode.svg.js +1 -1
  50. package/dist/assets/annotation/pointCloudTool/finish.svg.js +1 -1
  51. package/dist/assets/annotation/pointCloudTool/highlight.svg.js +1 -0
  52. package/dist/assets/annotation/pointCloudTool/highlight_a.svg.js +1 -0
  53. package/dist/assets/annotation/pointCloudTool/lassoSelector.svg.js +1 -1
  54. package/dist/assets/annotation/pointCloudTool/lassoSelector_a.svg.js +1 -1
  55. package/dist/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -0
  56. package/dist/assets/annotation/pointCloudTool/nextBox.svg.js +1 -1
  57. package/dist/assets/annotation/pointCloudTool/nodata.svg.js +1 -1
  58. package/dist/assets/annotation/pointCloudTool/patse.svg.js +1 -1
  59. package/dist/assets/annotation/pointCloudTool/prevBox.svg.js +1 -1
  60. package/dist/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -0
  61. package/dist/assets/annotation/pointCloudTool/rotate180_black.svg.js +1 -1
  62. package/dist/assets/annotation/pointCloudTool/selectAll.svg.js +1 -1
  63. package/dist/assets/annotation/pointCloudTool/selectMultiple.svg.js +1 -1
  64. package/dist/assets/annotation/pointCloudTool/unCoverMode.svg.js +1 -1
  65. package/dist/assets/annotation/pointCloudTool/unitAttribute.svg.js +1 -1
  66. package/dist/assets/annotation/pointCloudTool/unitAttributeForbid.svg.js +1 -1
  67. package/dist/assets/annotation/pointCloudTool/unitAttributeHover.svg.js +1 -1
  68. package/dist/assets/annotation/pointTool/icon_point.svg.js +1 -1
  69. package/dist/assets/annotation/pointTool/icon_point_a.svg.js +1 -1
  70. package/dist/assets/annotation/polygonTool/icon_polygon.svg.js +1 -1
  71. package/dist/assets/annotation/polygonTool/icon_polygon_a.svg.js +1 -1
  72. package/dist/assets/annotation/rectTool/icon_rect.svg.js +1 -1
  73. package/dist/assets/annotation/rectTool/icon_rect_a.svg.js +1 -1
  74. package/dist/assets/annotation/toolHotKeyIcon/deleteRemark.svg.js +1 -1
  75. package/dist/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js +1 -1
  76. package/dist/assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js +1 -1
  77. package/dist/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js +1 -1
  78. package/dist/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js +1 -1
  79. package/dist/assets/annotation/toolHotKeyIcon/icon_down.svg.js +1 -1
  80. package/dist/assets/annotation/toolHotKeyIcon/icon_eraser.svg.js +1 -1
  81. package/dist/assets/annotation/toolHotKeyIcon/icon_eyeLock_kj.svg.js +1 -1
  82. package/dist/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js +1 -1
  83. package/dist/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js +1 -1
  84. package/dist/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js +1 -1
  85. package/dist/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js +1 -1
  86. package/dist/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js +1 -1
  87. package/dist/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js +1 -1
  88. package/dist/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js +1 -1
  89. package/dist/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js +1 -1
  90. package/dist/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js +1 -1
  91. package/dist/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js +1 -1
  92. package/dist/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js +1 -1
  93. package/dist/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js +1 -1
  94. package/dist/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js +1 -1
  95. package/dist/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js +1 -1
  96. package/dist/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js +1 -1
  97. package/dist/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js +1 -1
  98. package/dist/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js +1 -1
  99. package/dist/assets/annotation/toolHotKeyIcon/icon_line_static.svg.js +1 -1
  100. package/dist/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js +1 -1
  101. package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js +1 -1
  102. package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js +1 -1
  103. package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js +1 -1
  104. package/dist/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js +1 -1
  105. package/dist/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js +1 -1
  106. package/dist/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js +1 -1
  107. package/dist/assets/annotation/toolHotKeyIcon/icon_playPause.svg.js +1 -1
  108. package/dist/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js +1 -1
  109. package/dist/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js +1 -1
  110. package/dist/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js +1 -1
  111. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js +1 -1
  112. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js +1 -1
  113. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonCut_kj.svg.js +1 -1
  114. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js +1 -1
  115. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js +1 -1
  116. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js +1 -1
  117. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js +1 -1
  118. package/dist/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js +1 -1
  119. package/dist/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js +1 -1
  120. package/dist/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js +1 -1
  121. package/dist/assets/annotation/toolHotKeyIcon/icon_scribble.svg.js +1 -1
  122. package/dist/assets/annotation/toolHotKeyIcon/icon_segment.svg.js +1 -1
  123. package/dist/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js +1 -1
  124. package/dist/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js +1 -1
  125. package/dist/assets/annotation/toolHotKeyIcon/icon_strokeEnlarge.svg.js +1 -1
  126. package/dist/assets/annotation/toolHotKeyIcon/icon_strokeReduction.svg.js +1 -1
  127. package/dist/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js +1 -1
  128. package/dist/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js +1 -1
  129. package/dist/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js +1 -1
  130. package/dist/assets/annotation/toolHotKeyIcon/icon_up.svg.js +1 -1
  131. package/dist/assets/annotation/toolHotKeyIcon/nextRemark.svg.js +1 -1
  132. package/dist/assets/annotation/toolHotKeyIcon/preRemark.svg.js +1 -1
  133. package/dist/assets/annotation/toolHotKeyIcon/setValid.svg.js +1 -1
  134. package/dist/assets/annotation/video/icon_clip.svg.js +1 -1
  135. package/dist/assets/annotation/video/icon_keyboard_h.svg.js +1 -1
  136. package/dist/assets/annotation/video/icon_timePoint.svg.js +1 -1
  137. package/dist/assets/annotation/video/icon_videoCut.svg.js +1 -1
  138. package/dist/assets/annotation/video/icon_videoCutting.svg.js +1 -1
  139. package/dist/assets/attributeIcon/eraser.svg.js +1 -1
  140. package/dist/assets/attributeIcon/eraser_a.svg.js +1 -1
  141. package/dist/assets/attributeIcon/icon_eyeLock_a.svg.js +1 -1
  142. package/dist/assets/attributeIcon/icon_eyeLock_h.svg.js +1 -1
  143. package/dist/assets/attributeIcon/pen.svg.js +1 -1
  144. package/dist/assets/attributeIcon/pen_a.svg.js +1 -1
  145. package/dist/assets/attributeIcon/zoomUp.svg.js +1 -1
  146. package/dist/assets/predictTracking/icon.svg.js +1 -1
  147. package/dist/assets/toolStyle/icon_border.svg.js +1 -1
  148. package/dist/assets/toolStyle/icon_borderColor.svg.js +1 -1
  149. package/dist/assets/toolStyle/icon_defaultSize.svg.js +1 -1
  150. package/dist/assets/toolStyle/icon_opacityFill.svg.js +1 -1
  151. package/dist/assets/toolStyle/icon_opacityStroke.svg.js +1 -1
  152. package/dist/components/pointCloudView/PointCloudContext.js +1 -1
  153. package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
  154. package/dist/constant/index.js +1 -1
  155. package/dist/data/enums/ToolType.js +1 -1
  156. package/dist/hooks/annotation.js +1 -1
  157. package/dist/index.css +34 -76
  158. package/dist/index.js +1 -1
  159. package/dist/store/annotatedBox/index.js +1 -0
  160. package/dist/store/annotation/reducer.js +1 -1
  161. package/dist/store/ctx.js +1 -1
  162. package/dist/types/components/attributeList/index.d.ts +1 -1
  163. package/dist/types/components/pointCloudView/PointCloudContext.d.ts +3 -0
  164. package/dist/types/constant/index.d.ts +0 -4
  165. package/dist/types/data/enums/ToolType.d.ts +1 -2
  166. package/dist/types/hooks/annotation.d.ts +0 -1
  167. package/dist/types/index.d.ts +3 -2
  168. package/dist/types/store/annotatedBox/index.d.ts +14 -0
  169. package/dist/types/store/ctx.d.ts +0 -5
  170. package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +0 -1
  171. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.d.ts +9 -0
  172. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/arrow.d.ts +8 -0
  173. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.d.ts +11 -0
  174. package/dist/types/views/MainView/sidebar/SwitchAttributeList/index.d.ts +2 -3
  175. package/dist/utils/audio.js +1 -1
  176. package/dist/views/MainView/index.js +1 -1
  177. package/dist/views/MainView/sidebar/AnnotationText/index.js +1 -1
  178. package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  179. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.js +1 -0
  180. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.module.scss.js +1 -0
  181. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/arrow.js +1 -0
  182. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.js +1 -0
  183. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.module.scss.js +1 -0
  184. package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  185. package/dist/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
  186. package/dist/views/MainView/sidebar/index.js +1 -1
  187. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -1
  188. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  189. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js +1 -1
  190. package/es/App.js +1 -1
  191. package/es/assets/annotation/LLMTool/empty.svg.js +1 -1
  192. package/es/assets/annotation/LLMTool/imgFail_cn.svg.js +1 -1
  193. package/es/assets/annotation/LLMTool/imgFail_en.svg.js +1 -1
  194. package/es/assets/annotation/LLMTool/loading.svg.js +1 -1
  195. package/es/assets/annotation/audio/clip.svg.js +1 -1
  196. package/es/assets/annotation/audio/clipA.svg.js +1 -1
  197. package/es/assets/annotation/audio/clipASmall.svg.js +1 -1
  198. package/es/assets/annotation/audio/clipSmall.svg.js +1 -1
  199. package/es/assets/annotation/audio/delete.svg.js +1 -1
  200. package/es/assets/annotation/audio/loop.svg.js +1 -1
  201. package/es/assets/annotation/audio/loopA.svg.js +1 -1
  202. package/es/assets/annotation/audio/progressDot.svg.js +1 -1
  203. package/es/assets/annotation/audio/progressDotA.svg.js +1 -1
  204. package/es/assets/annotation/audio/tag.svg.js +1 -1
  205. package/es/assets/annotation/audio/tagA.svg.js +1 -1
  206. package/es/assets/annotation/common/icon_adapt.svg.js +1 -1
  207. package/es/assets/annotation/common/icon_adapt_black.svg.js +1 -1
  208. package/es/assets/annotation/common/icon_back.svg.js +1 -1
  209. package/es/assets/annotation/common/icon_backA.svg.js +1 -1
  210. package/es/assets/annotation/common/icon_clear.svg.js +1 -1
  211. package/es/assets/annotation/common/icon_clearSmall.svg.js +1 -1
  212. package/es/assets/annotation/common/icon_clearSmall_a.svg.js +1 -1
  213. package/es/assets/annotation/common/icon_clear_a.svg.js +1 -1
  214. package/es/assets/annotation/common/icon_esc.svg.js +1 -1
  215. package/es/assets/annotation/common/icon_invalid.svg.js +1 -1
  216. package/es/assets/annotation/common/icon_invalid_a.svg.js +1 -1
  217. package/es/assets/annotation/common/icon_left_squareOutlined.svg.js +1 -1
  218. package/es/assets/annotation/common/icon_menu_fold.svg.js +1 -1
  219. package/es/assets/annotation/common/icon_next.svg.js +1 -1
  220. package/es/assets/annotation/common/icon_nextA.svg.js +1 -1
  221. package/es/assets/annotation/common/icon_r.svg.js +1 -1
  222. package/es/assets/annotation/common/icon_rA.svg.js +1 -1
  223. package/es/assets/annotation/common/icon_right_squareOutlined.svg.js +1 -1
  224. package/es/assets/annotation/common/icon_save.svg.js +1 -1
  225. package/es/assets/annotation/common/icon_saveA.svg.js +1 -1
  226. package/es/assets/annotation/image/brightness.svg.js +1 -1
  227. package/es/assets/annotation/image/contrast.svg.js +1 -1
  228. package/es/assets/annotation/image/icon_yuantu.svg.js +1 -1
  229. package/es/assets/annotation/image/saturation.svg.js +1 -1
  230. package/es/assets/annotation/lineTool/icon_line.svg.js +1 -1
  231. package/es/assets/annotation/lineTool/icon_line_a.svg.js +1 -1
  232. package/es/assets/annotation/pointCloudTool/addSvg.svg.js +1 -1
  233. package/es/assets/annotation/pointCloudTool/cancel.svg.js +1 -1
  234. package/es/assets/annotation/pointCloudTool/changePointCloudValid.svg.js +1 -1
  235. package/es/assets/annotation/pointCloudTool/circleSelector.svg.js +1 -1
  236. package/es/assets/annotation/pointCloudTool/circleSelector_a.svg.js +1 -1
  237. package/es/assets/annotation/pointCloudTool/clearSvg.svg.js +1 -1
  238. package/es/assets/annotation/pointCloudTool/copy.svg.js +1 -1
  239. package/es/assets/annotation/pointCloudTool/coverMode.svg.js +1 -1
  240. package/es/assets/annotation/pointCloudTool/finish.svg.js +1 -1
  241. package/es/assets/annotation/pointCloudTool/highlight.svg.js +1 -0
  242. package/es/assets/annotation/pointCloudTool/highlight_a.svg.js +1 -0
  243. package/es/assets/annotation/pointCloudTool/lassoSelector.svg.js +1 -1
  244. package/es/assets/annotation/pointCloudTool/lassoSelector_a.svg.js +1 -1
  245. package/es/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -0
  246. package/es/assets/annotation/pointCloudTool/nextBox.svg.js +1 -1
  247. package/es/assets/annotation/pointCloudTool/nodata.svg.js +1 -1
  248. package/es/assets/annotation/pointCloudTool/patse.svg.js +1 -1
  249. package/es/assets/annotation/pointCloudTool/prevBox.svg.js +1 -1
  250. package/es/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -0
  251. package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js +1 -1
  252. package/es/assets/annotation/pointCloudTool/selectAll.svg.js +1 -1
  253. package/es/assets/annotation/pointCloudTool/selectMultiple.svg.js +1 -1
  254. package/es/assets/annotation/pointCloudTool/unCoverMode.svg.js +1 -1
  255. package/es/assets/annotation/pointCloudTool/unitAttribute.svg.js +1 -1
  256. package/es/assets/annotation/pointCloudTool/unitAttributeForbid.svg.js +1 -1
  257. package/es/assets/annotation/pointCloudTool/unitAttributeHover.svg.js +1 -1
  258. package/es/assets/annotation/pointTool/icon_point.svg.js +1 -1
  259. package/es/assets/annotation/pointTool/icon_point_a.svg.js +1 -1
  260. package/es/assets/annotation/polygonTool/icon_polygon.svg.js +1 -1
  261. package/es/assets/annotation/polygonTool/icon_polygon_a.svg.js +1 -1
  262. package/es/assets/annotation/rectTool/icon_rect.svg.js +1 -1
  263. package/es/assets/annotation/rectTool/icon_rect_a.svg.js +1 -1
  264. package/es/assets/annotation/toolHotKeyIcon/deleteRemark.svg.js +1 -1
  265. package/es/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js +1 -1
  266. package/es/assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js +1 -1
  267. package/es/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js +1 -1
  268. package/es/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js +1 -1
  269. package/es/assets/annotation/toolHotKeyIcon/icon_down.svg.js +1 -1
  270. package/es/assets/annotation/toolHotKeyIcon/icon_eraser.svg.js +1 -1
  271. package/es/assets/annotation/toolHotKeyIcon/icon_eyeLock_kj.svg.js +1 -1
  272. package/es/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js +1 -1
  273. package/es/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js +1 -1
  274. package/es/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js +1 -1
  275. package/es/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js +1 -1
  276. package/es/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js +1 -1
  277. package/es/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js +1 -1
  278. package/es/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js +1 -1
  279. package/es/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js +1 -1
  280. package/es/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js +1 -1
  281. package/es/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js +1 -1
  282. package/es/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js +1 -1
  283. package/es/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js +1 -1
  284. package/es/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js +1 -1
  285. package/es/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js +1 -1
  286. package/es/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js +1 -1
  287. package/es/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js +1 -1
  288. package/es/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js +1 -1
  289. package/es/assets/annotation/toolHotKeyIcon/icon_line_static.svg.js +1 -1
  290. package/es/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js +1 -1
  291. package/es/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js +1 -1
  292. package/es/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js +1 -1
  293. package/es/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js +1 -1
  294. package/es/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js +1 -1
  295. package/es/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js +1 -1
  296. package/es/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js +1 -1
  297. package/es/assets/annotation/toolHotKeyIcon/icon_playPause.svg.js +1 -1
  298. package/es/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js +1 -1
  299. package/es/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js +1 -1
  300. package/es/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js +1 -1
  301. package/es/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js +1 -1
  302. package/es/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js +1 -1
  303. package/es/assets/annotation/toolHotKeyIcon/icon_polygonCut_kj.svg.js +1 -1
  304. package/es/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js +1 -1
  305. package/es/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js +1 -1
  306. package/es/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js +1 -1
  307. package/es/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js +1 -1
  308. package/es/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js +1 -1
  309. package/es/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js +1 -1
  310. package/es/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js +1 -1
  311. package/es/assets/annotation/toolHotKeyIcon/icon_scribble.svg.js +1 -1
  312. package/es/assets/annotation/toolHotKeyIcon/icon_segment.svg.js +1 -1
  313. package/es/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js +1 -1
  314. package/es/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js +1 -1
  315. package/es/assets/annotation/toolHotKeyIcon/icon_strokeEnlarge.svg.js +1 -1
  316. package/es/assets/annotation/toolHotKeyIcon/icon_strokeReduction.svg.js +1 -1
  317. package/es/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js +1 -1
  318. package/es/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js +1 -1
  319. package/es/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js +1 -1
  320. package/es/assets/annotation/toolHotKeyIcon/icon_up.svg.js +1 -1
  321. package/es/assets/annotation/toolHotKeyIcon/nextRemark.svg.js +1 -1
  322. package/es/assets/annotation/toolHotKeyIcon/preRemark.svg.js +1 -1
  323. package/es/assets/annotation/toolHotKeyIcon/setValid.svg.js +1 -1
  324. package/es/assets/annotation/video/icon_clip.svg.js +1 -1
  325. package/es/assets/annotation/video/icon_keyboard_h.svg.js +1 -1
  326. package/es/assets/annotation/video/icon_timePoint.svg.js +1 -1
  327. package/es/assets/annotation/video/icon_videoCut.svg.js +1 -1
  328. package/es/assets/annotation/video/icon_videoCutting.svg.js +1 -1
  329. package/es/assets/attributeIcon/eraser.svg.js +1 -1
  330. package/es/assets/attributeIcon/eraser_a.svg.js +1 -1
  331. package/es/assets/attributeIcon/icon_eyeLock_a.svg.js +1 -1
  332. package/es/assets/attributeIcon/icon_eyeLock_h.svg.js +1 -1
  333. package/es/assets/attributeIcon/pen.svg.js +1 -1
  334. package/es/assets/attributeIcon/pen_a.svg.js +1 -1
  335. package/es/assets/attributeIcon/zoomUp.svg.js +1 -1
  336. package/es/assets/predictTracking/icon.svg.js +1 -1
  337. package/es/assets/toolStyle/icon_border.svg.js +1 -1
  338. package/es/assets/toolStyle/icon_borderColor.svg.js +1 -1
  339. package/es/assets/toolStyle/icon_defaultSize.svg.js +1 -1
  340. package/es/assets/toolStyle/icon_opacityFill.svg.js +1 -1
  341. package/es/assets/toolStyle/icon_opacityStroke.svg.js +1 -1
  342. package/es/components/LLMToolView/index.js +1 -1
  343. package/es/components/LLMToolView/modelAPIView/index.js +1 -1
  344. package/es/components/LLMToolView/questionView/components/imgView/index.js +1 -1
  345. package/es/components/LLMToolView/questionView/index.js +1 -1
  346. package/es/components/LLMToolView/sidebar/components/answerList/index.js +1 -1
  347. package/es/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  348. package/es/components/LLMToolView/sidebar/components/scoreGroupButton/index.js +1 -1
  349. package/es/components/LLMToolView/sidebar/components/textEditor/index.js +1 -1
  350. package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  351. package/es/components/LLMToolView/sidebar/index.js +1 -1
  352. package/es/components/attributeList/components/limitPopover/index.js +1 -1
  353. package/es/components/audioAnnotate/audioContext/index.js +1 -1
  354. package/es/components/audioAnnotate/audioSide/LabelDetailPopover/index.js +1 -1
  355. package/es/components/audioAnnotate/audioSide/clipSidebar/index.js +1 -1
  356. package/es/components/audioAnnotate/audioSide/labelSidebar/index.js +1 -1
  357. package/es/components/audioAnnotate/tagResultShow/index.js +1 -1
  358. package/es/components/audioPlayer/clipRegion/index.js +1 -1
  359. package/es/components/audioPlayer/clipTip/index.js +1 -1
  360. package/es/components/audioPlayer/combineTip/index.js +1 -1
  361. package/es/components/audioPlayer/progressDot/index.js +1 -1
  362. package/es/components/audioPlayer/zoomSlider/index.js +1 -1
  363. package/es/components/checkboxList/index.js +1 -1
  364. package/es/components/colorPalette/index.js +1 -1
  365. package/es/components/customAntd/IconWithText/index.js +1 -1
  366. package/es/components/diffMatchPatchComponent/index.js +2 -2
  367. package/es/components/fileException/FileError.js +1 -1
  368. package/es/components/fileException/FileInvalid.js +1 -1
  369. package/es/components/fileException/index.js +1 -1
  370. package/es/components/invalidPage/index.js +1 -1
  371. package/es/components/latexEditor/index.js +1 -1
  372. package/es/components/markdownView/index.js +1 -1
  373. package/es/components/measureCanvas/index.js +1 -1
  374. package/es/components/pointCloud2DRectOperationView/index.js +1 -1
  375. package/es/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  376. package/es/components/pointCloudView/PointCloud2DView.js +1 -1
  377. package/es/components/pointCloudView/PointCloud3DView.js +1 -1
  378. package/es/components/pointCloudView/PointCloudContext.js +1 -1
  379. package/es/components/pointCloudView/PointCloudInfos.js +1 -1
  380. package/es/components/pointCloudView/PointCloudSegment.js +1 -1
  381. package/es/components/pointCloudView/PointCloudSegment2DView.js +1 -1
  382. package/es/components/pointCloudView/PointCloudSegmentStatus.js +1 -1
  383. package/es/components/pointCloudView/PointCloudSegmentToolbar.js +1 -1
  384. package/es/components/pointCloudView/PointCloudTopView.js +1 -1
  385. package/es/components/pointCloudView/components/HighlightVisible/index.js +1 -1
  386. package/es/components/pointCloudView/components/PointCloudSizeSlider/index.js +1 -1
  387. package/es/components/pointCloudView/components/TitleButton/index.js +1 -1
  388. package/es/components/pointCloudView/components/UnifyParamsModal/index.js +1 -1
  389. package/es/components/pointCloudView/components/sideAndBackOverView/index.js +1 -1
  390. package/es/components/pointCloudView/index.js +1 -1
  391. package/es/components/predictTracking/predictTrackingIcon/index.js +1 -1
  392. package/es/components/predictTracking/previewResult/index.js +1 -1
  393. package/es/components/videoAnnotate/index.js +1 -1
  394. package/es/components/videoAnnotate/videoClipTool/components/annotatedList/index.js +1 -1
  395. package/es/components/videoAnnotate/videoClipTool/components/resizableSnippet/index.js +1 -1
  396. package/es/components/videoAnnotate/videoClipTool/components/timeSliceRange/index.js +1 -1
  397. package/es/components/videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.js +1 -1
  398. package/es/components/videoAnnotate/videoClipTool/components/videoTimeSlicesOverVideo/index.js +1 -1
  399. package/es/components/videoAnnotate/videoClipTool/components/videoTrack/index.js +1 -1
  400. package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptorI18nProvider.js +1 -1
  401. package/es/components/videoPlayer/VideoTagLayer.js +1 -1
  402. package/es/components/videoPlayer/VideoTextLayer.js +2 -2
  403. package/es/components/videoPlayer/components/SpeedController/index.js +1 -1
  404. package/es/components/videoPlayer/components/controller/index.js +1 -1
  405. package/es/components/videoPlayer/index.js +1 -1
  406. package/es/constant/index.js +1 -1
  407. package/es/data/enums/ToolType.js +1 -1
  408. package/es/hooks/annotation.js +1 -1
  409. package/es/hooks/useSafeSate.js +1 -1
  410. package/es/index.css +34 -76
  411. package/es/index.js +1 -1
  412. package/es/store/annotatedBox/index.js +1 -0
  413. package/es/store/annotation/reducer.js +1 -1
  414. package/es/store/ctx.js +1 -1
  415. package/es/utils/audio.js +1 -1
  416. package/es/views/MainView/LLMLayout/index.js +1 -1
  417. package/es/views/MainView/annotationOperation/index.js +1 -1
  418. package/es/views/MainView/annotationTips/index.js +1 -1
  419. package/es/views/MainView/index.js +1 -1
  420. package/es/views/MainView/sidebar/AnnotationText/index.js +1 -1
  421. package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  422. package/es/views/MainView/sidebar/GeneralOperation/useOperationList.js +1 -1
  423. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.js +1 -0
  424. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.module.scss.js +1 -0
  425. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/batchUpdateModal/index.js +1 -1
  426. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/arrow.js +1 -0
  427. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.js +1 -0
  428. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.module.scss.js +1 -0
  429. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  430. package/es/views/MainView/sidebar/ScribbleSidebar/index.js +1 -1
  431. package/es/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
  432. package/es/views/MainView/sidebar/TextAreaFormat/index.js +1 -1
  433. package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  434. package/es/views/MainView/sidebar/ToolIcons.js +1 -1
  435. package/es/views/MainView/sidebar/index.js +1 -1
  436. package/es/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -1
  437. package/es/views/MainView/toolFooter/FooterPopover.js +1 -1
  438. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -1
  439. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  440. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  441. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js +1 -1
  442. package/es/views/MainView/toolFooter/FooterTips/index.js +1 -1
  443. package/es/views/MainView/toolFooter/HiddenTips/index.js +1 -1
  444. package/es/views/MainView/toolFooter/PageNumber/index.js +1 -1
  445. package/es/views/MainView/toolFooter/Pagination.js +1 -1
  446. package/es/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
  447. package/es/views/MainView/toolFooter/ZoomController/index.js +1 -1
  448. package/es/views/MainView/toolFooter/index.js +1 -1
  449. package/es/views/MainView/toolHeader/ExportData/index.js +1 -1
  450. package/es/views/MainView/toolHeader/StepSwitch/index.js +1 -1
  451. package/es/views/MainView/toolHeader/SwitchPattern/index.js +1 -1
  452. package/es/views/MainView/toolHeader/headerOption/index.js +1 -1
  453. package/es/views/MainView/toolHeader/index.js +1 -1
  454. package/package.json +9 -6
  455. package/dist/components/NLPToolView/index.js +0 -1
  456. package/dist/components/NLPToolView/textContent/index.js +0 -1
  457. package/dist/components/NLPToolView/textContent/remarkMask.js +0 -1
  458. package/dist/components/NLPToolView/utils/index.js +0 -1
  459. package/dist/types/components/NLPToolView/index.d.ts +0 -15
  460. package/dist/types/components/NLPToolView/textContent/index.d.ts +0 -18
  461. package/dist/types/components/NLPToolView/textContent/remarkMask.d.ts +0 -12
  462. package/dist/types/components/NLPToolView/types.d.ts +0 -75
  463. package/dist/types/components/NLPToolView/utils/index.d.ts +0 -2
  464. package/dist/types/views/MainView/NLPLayout/index.d.ts +0 -11
  465. package/dist/types/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.d.ts +0 -13
  466. package/dist/types/views/MainView/sidebar/NLPSidebar/index.d.ts +0 -12
  467. package/dist/types/views/MainView/sidebar/NLPSidebar/indicatorDetermine.d.ts +0 -13
  468. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/NLP/index.d.ts +0 -6
  469. package/dist/views/MainView/NLPLayout/index.js +0 -1
  470. package/dist/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +0 -1
  471. package/dist/views/MainView/sidebar/NLPSidebar/index.js +0 -1
  472. package/dist/views/MainView/sidebar/NLPSidebar/indicatorDetermine.js +0 -1
  473. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/NLP/index.js +0 -1
  474. package/es/components/NLPToolView/index.js +0 -1
  475. package/es/components/NLPToolView/textContent/index.js +0 -1
  476. package/es/components/NLPToolView/textContent/remarkMask.js +0 -1
  477. package/es/components/NLPToolView/utils/index.js +0 -1
  478. package/es/views/MainView/NLPLayout/index.js +0 -1
  479. package/es/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +0 -1
  480. package/es/views/MainView/sidebar/NLPSidebar/index.js +0 -1
  481. package/es/views/MainView/sidebar/NLPSidebar/indicatorDetermine.js +0 -1
  482. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/NLP/index.js +0 -1
@@ -1 +1 @@
1
- import w from"classnames";import n,{useState as j,useRef as S,useEffect as F}from"react";import{useTranslation as _}from"react-i18next";import{connect as L}from"react-redux";import{PointCloudContext as B}from"../../pointCloudView/PointCloudContext.js";import{SetPredictResultVisible as D,SetPredictResult as T,SetPointCloudLoading as v,BatchUpdateImgListResultByPredictResult as I}from"../../../store/annotation/actionCreators.js";import{LabelBeeContext as U,useDispatch as E}from"../../../store/ctx.js";import{getClassName as o}from"../../../utils/dom.js";import{PointCloud as $}from"@labelbee/lb-annotation";import{PointCloudUtils as z,toolStyleConverter as A}from"@labelbee/lb-utils";import{views as G,sleep as Z,getViewsDataUrl as q}from"./util.js";var H=Object.defineProperty,J=Object.defineProperties,K=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,N=(i,e,t)=>e in i?H(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,W=(i,e)=>{for(var t in e||(e={}))M.call(e,t)&&N(i,t,e[t]);if(k)for(var t of k(e))Q.call(e,t)&&N(i,t,e[t]);return i},X=(i,e)=>J(i,K(e)),O=(i,e,t)=>new Promise((d,r)=>{var s=a=>{try{c(t.next(a))}catch(u){r(u)}},l=a=>{try{c(t.throw(a))}catch(u){r(u)}},c=a=>a.done?d(a.value):Promise.resolve(a.value).then(s,l);c((t=t.apply(i,e)).next())});const Y=i=>{const{predictionResult:e,predictionResultVisible:t,imgList:d}=i,[r,s]=j([]),l=E(),{t:c}=_(),a=()=>{D(l,!1),T(l,[]),s([])},u=()=>O(void 0,null,function*(){v(l,!0),yield l(I()),v(l,!1),a()});return t?n.createElement(n.Fragment,null,r.length>0&&n.createElement("div",{className:o("point-cloud-predict-tracking-container")},n.createElement("div",{className:o("point-cloud-predict-tracking-container","bar")},n.createElement("div",{className:o("point-cloud-predict-tracking-container","title")},n.createElement("div",null,c("ComplementaryTrackingPrediction"),r.length>0?`\uFF08${r.length}\uFF09`:""),n.createElement("div",{className:o("point-cloud-predict-tracking-container","option")},n.createElement("div",{className:w([o("point-cloud-predict-tracking-container","cancelOption"),o("point-cloud-predict-tracking-container","button")]),onClick:a},c("Cancel")),n.createElement("div",{className:w([o("point-cloud-predict-tracking-container","okOption"),o("point-cloud-predict-tracking-container","button")]),onClick:u},c("Apply")))),n.createElement("div",{className:o("point-cloud-predict-tracking-container","content")},n.createElement(ee,{list:r})))),e.length>0&&n.createElement(te,{result:e,imgList:d,setList:s})):null},ee=i=>{const{list:e}=i,{t}=_(),d=[t("TopView"),t("SideView"),t("BackView")];return n.createElement(n.Fragment,null,n.createElement("div",{className:o("point-cloud-predict-tracking-container","left")},d.map(r=>n.createElement("div",{className:o("point-cloud-predict-tracking-container","title"),key:r},r))),n.createElement("div",{className:o("point-cloud-predict-tracking-container","right")},e.map(r=>n.createElement("div",{className:o("point-cloud-predict-tracking-container","item"),key:r.id},G.map(s=>{const l=r[s];return n.createElement("div",{className:o("point-cloud-predict-tracking-container","view"),key:`${r.id}-${s}`},n.createElement("img",{src:l}))})))))},te=i=>{const e=n.useContext(B),t=E(),{result:d,imgList:r,setList:s}=i,l=S(null),c={width:600,height:600};return F(()=>{(()=>O(void 0,null,function*(){var u,P,h,y,C,b;const f=(u=e.mainViewInstance)==null?void 0:u.config;if(f&&l.current){const R=z.getDefaultOrthographicParams(c),p=new $({container:l.current,isOrthographicCamera:!0,orthographicParams:R,config:f});p.setShowDirection(!1);for(const m of d){const{index:g}=m,x=r[g].url?r[g].url:(C=(y=(h=(P=r[g])==null?void 0:P.webPointCloudFile)==null?void 0:h.lidar)==null?void 0:y.url)!=null?C:"";yield p.loadPCDFileByBox(x,m,{width:2,height:2,depth:2}),yield p.updateCameraZoom(e.zoom);const V=(b=A.getColorFromConfig({attribute:m.attribute},X(W({},f),{attributeConfigurable:!0}),{}))==null?void 0:b.fill;p.generateBox(m,V),yield Z(500),yield q(p,m,e.zoom),yield p.removeObjectByName(m.id,"box"),yield p.clearPointCloudAndRender()}s(d),v(t,!1)}}))()},[]),n.createElement("div",{style:c,ref:l,className:"generate-view"})},ne=i=>({predictionResult:i.annotation.predictionResult,predictionResultVisible:i.annotation.predictionResultVisible,imgList:i.annotation.imgList});var ie=L(ne,null,null,{context:U})(Y);export{ie as default};
1
+ import b from"classnames";import n,{useState as j,useRef as S,useEffect as F}from"react";import{useTranslation as w}from"react-i18next";import{connect as L}from"react-redux";import{PointCloudContext as B}from"../../pointCloudView/PointCloudContext.js";import{SetPredictResultVisible as D,SetPredictResult as T,SetPointCloudLoading as v,BatchUpdateImgListResultByPredictResult as I}from"../../../store/annotation/actionCreators.js";import{LabelBeeContext as U,useDispatch as E}from"../../../store/ctx.js";import{getClassName as o}from"../../../utils/dom.js";import{PointCloud as $}from"@labelbee/lb-annotation";import{PointCloudUtils as z,toolStyleConverter as A}from"@labelbee/lb-utils";import{views as G,sleep as Z,getViewsDataUrl as q}from"./util.js";var H=Object.defineProperty,J=Object.defineProperties,K=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,N=(i,e,t)=>e in i?H(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,W=(i,e)=>{for(var t in e||(e={}))M.call(e,t)&&N(i,t,e[t]);if(k)for(var t of k(e))Q.call(e,t)&&N(i,t,e[t]);return i},X=(i,e)=>J(i,K(e)),O=(i,e,t)=>new Promise((d,r)=>{var s=a=>{try{c(t.next(a))}catch(u){r(u)}},l=a=>{try{c(t.throw(a))}catch(u){r(u)}},c=a=>a.done?d(a.value):Promise.resolve(a.value).then(s,l);c((t=t.apply(i,e)).next())});const Y=i=>{const{predictionResult:e,predictionResultVisible:t,imgList:d}=i,[r,s]=j([]),l=E(),{t:c}=w(),a=()=>{D(l,!1),T(l,[]),s([])},u=()=>O(void 0,null,function*(){v(l,!0),yield l(I()),v(l,!1),a()});return t?n.createElement(n.Fragment,null,r.length>0&&n.createElement("div",{className:o("point-cloud-predict-tracking-container")},n.createElement("div",{className:o("point-cloud-predict-tracking-container","bar")},n.createElement("div",{className:o("point-cloud-predict-tracking-container","title")},n.createElement("div",null,c("ComplementaryTrackingPrediction"),r.length>0?`\uFF08${r.length}\uFF09`:""),n.createElement("div",{className:o("point-cloud-predict-tracking-container","option")},n.createElement("div",{className:b([o("point-cloud-predict-tracking-container","cancelOption"),o("point-cloud-predict-tracking-container","button")]),onClick:a},c("Cancel")),n.createElement("div",{className:b([o("point-cloud-predict-tracking-container","okOption"),o("point-cloud-predict-tracking-container","button")]),onClick:u},c("Apply")))),n.createElement("div",{className:o("point-cloud-predict-tracking-container","content")},n.createElement(ee,{list:r})))),e.length>0&&n.createElement(te,{result:e,imgList:d,setList:s})):null},ee=i=>{const{list:e}=i,{t}=w(),d=[t("TopView"),t("SideView"),t("BackView")];return n.createElement(n.Fragment,null,n.createElement("div",{className:o("point-cloud-predict-tracking-container","left")},d.map(r=>n.createElement("div",{className:o("point-cloud-predict-tracking-container","title"),key:r},r))),n.createElement("div",{className:o("point-cloud-predict-tracking-container","right")},e.map(r=>n.createElement("div",{className:o("point-cloud-predict-tracking-container","item"),key:r.id},G.map(s=>{const l=r[s];return n.createElement("div",{className:o("point-cloud-predict-tracking-container","view"),key:`${r.id}-${s}`},n.createElement("img",{src:l}))})))))},te=i=>{const e=n.useContext(B),t=E(),{result:d,imgList:r,setList:s}=i,l=S(null),c={width:600,height:600};return F(()=>{(()=>O(void 0,null,function*(){var u,P,h,y,_,C;const f=(u=e.mainViewInstance)==null?void 0:u.config;if(f&&l.current){const R=z.getDefaultOrthographicParams(c),p=new $({container:l.current,isOrthographicCamera:!0,orthographicParams:R,config:f});p.setShowDirection(!1);for(const m of d){const{index:g}=m,x=r[g].url?r[g].url:(_=(y=(h=(P=r[g])==null?void 0:P.webPointCloudFile)==null?void 0:h.lidar)==null?void 0:y.url)!=null?_:"";yield p.loadPCDFileByBox(x,m,{width:2,height:2,depth:2}),yield p.updateCameraZoom(e.zoom);const V=(C=A.getColorFromConfig({attribute:m.attribute},X(W({},f),{attributeConfigurable:!0}),{}))==null?void 0:C.fill;p.generateBox(m,V),yield Z(500),yield q(p,m,e.zoom),yield p.removeObjectByName(m.id,"box"),yield p.clearPointCloudAndRender()}s(d),v(t,!1)}}))()},[]),n.createElement("div",{style:c,ref:l,className:"generate-view"})},ne=i=>({predictionResult:i.annotation.predictionResult,predictionResultVisible:i.annotation.predictionResultVisible,imgList:i.annotation.imgList});var ie=L(ne,null,null,{context:U})(Y);export{ie as default};
@@ -1 +1 @@
1
- import m from"react";import{connect as I}from"react-redux";import{LabelBeeContext as w,useDispatch as S}from"../../store/ctx.js";import{ANNOTATION_ACTIONS as f}from"../../store/Actions.js";import{PageJump as T,PageBackward as O,PageForward as P}from"../../store/annotation/actionCreators.js";import{TagToolInstanceAdaptor as V}from"./videoTagTool/TagToolInstanceAdaptor.js";import{cTool as b}from"@labelbee/lb-annotation";import A from"./videoClipTool/index.js";import E from"../../utils/StepUtils.js";import{jsonParser as L}from"../../utils/index.js";import{VideoTextTool as N}from"./videoTextTool/index.js";var C=Object.defineProperty,h=Object.defineProperties,B=Object.getOwnPropertyDescriptors,j=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,y=(e,o,t)=>o in e?C(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,g=(e,o)=>{for(var t in o||(o={}))D.call(o,t)&&y(e,t,o[t]);if(j)for(var t of j(o))J.call(o,t)&&y(e,t,o[t]);return e},_=(e,o)=>h(e,B(o));const{EVideoToolName:v}=b,U=e=>{const{stepInfo:o,skipBeforePageTurning:t}=e,a=o==null?void 0:o.tool,r=S(),i=n=>{r({type:f.SET_TOOL,payload:{instance:n}})},l=()=>{r({type:f.SET_TOOL,payload:{instance:void 0}})},p=()=>{r({type:f.SET_LOADING,payload:{loading:!1}})},s=()=>{if(t){t(()=>r(O()));return}r(O())},c=()=>{if(t){t(()=>r(P()));return}r(P())};return a===v.VideoClipTool?m.createElement(A,_(g({},e),{pageBackward:s,pageForward:c,pageJump:n=>r(T(~~n-1)),onMounted:i,onUnmounted:l,onVideoLoaded:p})):a===v.VideoTextTool?m.createElement(N,_(g({},e),{pageBackward:s,pageForward:c,pageJump:n=>r(T(~~n-1)),onMounted:i,onUnmounted:l,onVideoLoaded:p})):a===v.VideoTagTool?m.createElement(V,_(g({},e),{pageBackward:s,pageForward:c,pageJump:n=>r(T(~~n-1)),onMounted:i,onUnmounted:l,onVideoLoaded:p})):null},k=e=>{var o,t,a,r,i;const{annotation:{imgList:l,imgIndex:p,step:s,stepList:c,loading:n,skipBeforePageTurning:x}}=e,u=E.getCurrentStepInfo((o=e.annotation)==null?void 0:o.step,(t=e.annotation)==null?void 0:t.stepList),d=(a=l[p])!=null?a:{};return{imgIndex:p,imgList:l,stepInfo:u,config:L(u==null?void 0:u.config),step:s,stepList:c,path:(i=(r=d==null?void 0:d.path)!=null?r:d==null?void 0:d.url)!=null?i:"",loading:n,skipBeforePageTurning:x}};var F=I(k,null,null,{context:w})(U);export{F as default};
1
+ import m from"react";import{connect as I}from"react-redux";import{LabelBeeContext as w,useDispatch as S}from"../../store/ctx.js";import{ANNOTATION_ACTIONS as f}from"../../store/Actions.js";import{PageJump as T,PageBackward as O,PageForward as P}from"../../store/annotation/actionCreators.js";import{TagToolInstanceAdaptor as V}from"./videoTagTool/TagToolInstanceAdaptor.js";import{cTool as b}from"@labelbee/lb-annotation";import A from"./videoClipTool/index.js";import E from"../../utils/StepUtils.js";import{jsonParser as L}from"../../utils/index.js";import{VideoTextTool as N}from"./videoTextTool/index.js";var C=Object.defineProperty,h=Object.defineProperties,B=Object.getOwnPropertyDescriptors,j=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,y=(e,o,t)=>o in e?C(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,g=(e,o)=>{for(var t in o||(o={}))D.call(o,t)&&y(e,t,o[t]);if(j)for(var t of j(o))J.call(o,t)&&y(e,t,o[t]);return e},_=(e,o)=>h(e,B(o));const{EVideoToolName:v}=b,U=e=>{const{stepInfo:o,skipBeforePageTurning:t}=e,a=o==null?void 0:o.tool,r=S(),i=n=>{r({type:f.SET_TOOL,payload:{instance:n}})},l=()=>{r({type:f.SET_TOOL,payload:{instance:void 0}})},p=()=>{r({type:f.SET_LOADING,payload:{loading:!1}})},s=()=>{if(t){t(()=>r(O()));return}r(O())},d=()=>{if(t){t(()=>r(P()));return}r(P())};return a===v.VideoClipTool?m.createElement(A,_(g({},e),{pageBackward:s,pageForward:d,pageJump:n=>r(T(~~n-1)),onMounted:i,onUnmounted:l,onVideoLoaded:p})):a===v.VideoTextTool?m.createElement(N,_(g({},e),{pageBackward:s,pageForward:d,pageJump:n=>r(T(~~n-1)),onMounted:i,onUnmounted:l,onVideoLoaded:p})):a===v.VideoTagTool?m.createElement(V,_(g({},e),{pageBackward:s,pageForward:d,pageJump:n=>r(T(~~n-1)),onMounted:i,onUnmounted:l,onVideoLoaded:p})):null},k=e=>{var o,t,a,r,i;const{annotation:{imgList:l,imgIndex:p,step:s,stepList:d,loading:n,skipBeforePageTurning:x}}=e,u=E.getCurrentStepInfo((o=e.annotation)==null?void 0:o.step,(t=e.annotation)==null?void 0:t.stepList),c=(a=l[p])!=null?a:{};return{imgIndex:p,imgList:l,stepInfo:u,config:L(u==null?void 0:u.config),step:s,stepList:d,path:(i=(r=c==null?void 0:c.path)!=null?r:c==null?void 0:c.url)!=null?i:"",loading:n,skipBeforePageTurning:x}};var F=I(k,null,null,{context:w})(U);export{F as default};
@@ -1 +1 @@
1
- import{timeFormat as E}from"../../../../../utils/audio.js";import{classnames as d}from"../../../../../utils/index.js";import{CloseCircleFilled as y,EnvironmentFilled as S,ScissorOutlined as I}from"@ant-design/icons";import t,{useState as L,useEffect as g}from"react";import{EClipStatus as N,TIME_SLICE_TYPE as j,ETimeSliceType as v}from"../../constant.js";import A from"../timeSliceRange/index.js";import k from"../ToolTipForClip.js";import{getDisplayContent as b}from"../videoTrack/index.js";import l from"./index.module.scss.js";import{decimalReserved as F}from"../../../../videoPlayer/utils.js";import{LabelBeeContext as $}from"../../../../../store/ctx.js";import{connect as D}from"react-redux";import{useTranslation as C}from"react-i18next";const R=({type:e})=>e===v.Time?t.createElement(S,null):t.createElement(I,{rotate:270}),V=()=>{const{t:e}=C();return t.createElement("div",{className:l.noContent},t.createElement("div",null,e("NoClippedData")),t.createElement("div",null,t.createElement("span",{className:l.hotkey},"X"),e("ClipSlice")),t.createElement("div",null,t.createElement("span",{className:l.hotkey},"E"),e("TimeStamp")))},h=({children:e})=>{const n=e.length===0;return t.createElement("div",{className:d({[l.empty]:n,[l.timeSliceListContent]:!0})},n?t.createElement(V,null):e)},O=({timeSliceProps:e,index:n,exportContext:r})=>{const{selectedID:o,attributeList:a,onSelectedTimeSlice:s,removeTimeSlice:c}=r;return t.createElement("div",{key:n,className:d({[l.timeSliceItem]:!0,[l.timeSliceItemActivated]:e.id===o}),onClick:()=>{s(e)}},t.createElement(k,{slot:t.createElement("div",{className:l.timeSliceItemContent},t.createElement("div",{className:l.textOverflow},`${n+1}\u3001\u3010${j[e.type]}\u3011 ${b(e,a)}`),t.createElement("div",{className:d({[l.textOverflow]:!0})},t.createElement(R,{type:e.type}),t.createElement("span",{style:{marginLeft:10}},`${E(e.start,"ss:SS")} ${e.end&&e.type===v.Period?"~ "+E(e.end,"ss:SS")+", "+F(e.end-e.start,2)+"s":""}`))),item:e,attributeList:a}),t.createElement(y,{className:l.timeSliceItemDeleteIcon,onClick:u=>{u.stopPropagation(),c(e)}}))},_=e=>{const{toolInstance:n}=e,{selectedID:r,result:o,videoPlayer:a,clipStatus:s,updateSelectedSliceTimeProperty:c}=(n==null?void 0:n.exportContext)||{},[u,f]=L(0),{t:x}=C();g(()=>(n&&n.singleOn("changeClipSidebar",i=>{f(m=>m+1)}),()=>{var i;(i=n==null?void 0:n.unbindAll)==null||i.call(n,"changeClipSidebar")}),[n]);const T=o==null?void 0:o.find(i=>i.id===r),p=o==null?void 0:o.filter(i=>i.end!==null);return(n==null?void 0:n.exportContext)?t.createElement("div",null,t.createElement("div",{className:l.timeSliceListHeader},x("AnnotatedList")),t.createElement(h,null,p==null?void 0:p.map((i,m)=>t.createElement(O,{timeSliceProps:i,index:m,key:i.id,exportContext:(n==null?void 0:n.exportContext)||{}}))),t.createElement(A,{selectedTimeSlice:T,videoPlayer:a,updateTimeForSelected:c,disabled:s===N.Clipping})):null},w=({annotation:e})=>{const{toolInstance:n}=e;return{toolInstance:n}};var B=D(w,null,null,{context:$})(_);export{B as default};
1
+ import{timeFormat as E}from"../../../../../utils/audio.js";import{classnames as d}from"../../../../../utils/index.js";import{CloseCircleFilled as y,EnvironmentFilled as S,ScissorOutlined as I}from"@ant-design/icons";import t,{useState as L,useEffect as g}from"react";import{EClipStatus as N,TIME_SLICE_TYPE as j,ETimeSliceType as v}from"../../constant.js";import A from"../timeSliceRange/index.js";import k from"../ToolTipForClip.js";import{getDisplayContent as b}from"../videoTrack/index.js";import l from"./index.module.scss.js";import{decimalReserved as F}from"../../../../videoPlayer/utils.js";import{LabelBeeContext as _}from"../../../../../store/ctx.js";import{connect as $}from"react-redux";import{useTranslation as C}from"react-i18next";const D=({type:e})=>e===v.Time?t.createElement(S,null):t.createElement(I,{rotate:270}),R=()=>{const{t:e}=C();return t.createElement("div",{className:l.noContent},t.createElement("div",null,e("NoClippedData")),t.createElement("div",null,t.createElement("span",{className:l.hotkey},"X"),e("ClipSlice")),t.createElement("div",null,t.createElement("span",{className:l.hotkey},"E"),e("TimeStamp")))},V=({children:e})=>{const n=e.length===0;return t.createElement("div",{className:d({[l.empty]:n,[l.timeSliceListContent]:!0})},n?t.createElement(R,null):e)},h=({timeSliceProps:e,index:n,exportContext:r})=>{const{selectedID:o,attributeList:a,onSelectedTimeSlice:s,removeTimeSlice:c}=r;return t.createElement("div",{key:n,className:d({[l.timeSliceItem]:!0,[l.timeSliceItemActivated]:e.id===o}),onClick:()=>{s(e)}},t.createElement(k,{slot:t.createElement("div",{className:l.timeSliceItemContent},t.createElement("div",{className:l.textOverflow},`${n+1}\u3001\u3010${j[e.type]}\u3011 ${b(e,a)}`),t.createElement("div",{className:d({[l.textOverflow]:!0})},t.createElement(D,{type:e.type}),t.createElement("span",{style:{marginLeft:10}},`${E(e.start,"ss:SS")} ${e.end&&e.type===v.Period?"~ "+E(e.end,"ss:SS")+", "+F(e.end-e.start,2)+"s":""}`))),item:e,attributeList:a}),t.createElement(y,{className:l.timeSliceItemDeleteIcon,onClick:u=>{u.stopPropagation(),c(e)}}))},O=e=>{const{toolInstance:n}=e,{selectedID:r,result:o,videoPlayer:a,clipStatus:s,updateSelectedSliceTimeProperty:c}=(n==null?void 0:n.exportContext)||{},[u,f]=L(0),{t:x}=C();g(()=>(n&&n.singleOn("changeClipSidebar",i=>{f(m=>m+1)}),()=>{var i;(i=n==null?void 0:n.unbindAll)==null||i.call(n,"changeClipSidebar")}),[n]);const T=o==null?void 0:o.find(i=>i.id===r),p=o==null?void 0:o.filter(i=>i.end!==null);return(n==null?void 0:n.exportContext)?t.createElement("div",null,t.createElement("div",{className:l.timeSliceListHeader},x("AnnotatedList")),t.createElement(V,null,p==null?void 0:p.map((i,m)=>t.createElement(h,{timeSliceProps:i,index:m,key:i.id,exportContext:(n==null?void 0:n.exportContext)||{}}))),t.createElement(A,{selectedTimeSlice:T,videoPlayer:a,updateTimeForSelected:c,disabled:s===N.Clipping})):null},w=({annotation:e})=>{const{toolInstance:n}=e;return{toolInstance:n}};var B=$(w,null,null,{context:_})(O);export{B as default};
@@ -1 +1 @@
1
- import{Resizable as D}from"re-resizable";import i,{useState as N}from"react";import W from"../ToolTipForClip.js";import{getDisplayContent as I}from"../videoTrack/index.js";import u from"./index.module.scss.js";import{decimalReserved as L}from"../../../../videoPlayer/utils.js";var k=Object.defineProperty,F=Object.defineProperties,H=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable,w=(e,t,r)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,n=(e,t)=>{for(var r in t||(t={}))A.call(t,r)&&w(e,r,t[r]);if(_)for(var r of _(t))G.call(t,r)&&w(e,r,t[r]);return e},g=(e,t)=>F(e,H(t));const y=45,K=e=>{var t;const{track:r,currentTime:s,attributeList:l,readonly:O,onClipping:b,onTrackResizeStart:c}=e,{start:d,end:P}=r,R=P||s,[S,f]=N({width:0,height:0}),z=(o,E,j,h)=>{var v;const C=(h.width-S.width)/((v=j.parentNode)==null?void 0:v.clientWidth);f(h),e.onResize(E,C)},T=()=>{f({width:0,height:0}),c==null||c()},m=n({transform:"none",overflow:"hidden",textOverflow:"ellipsis",fontSize:12},e.style),x={top:!1,right:!0,left:!0,bottom:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},p=i.createElement("div",{style:{margin:"10px 5px"}},i.createElement("div",{className:u.textOverflow},`${L(Math.max(R-d,1),0)}s`),i.createElement("div",{className:u.textOverflow},I(r,l)));let a;if(b||O||!e.isSelected){const o=g(n({},m),{height:y});e.isSelected&&s-d<0&&(o.width=100,o.backgroundColor="transparent"),a=i.createElement("div",{style:o},p)}else a=i.createElement(D,{size:{width:(t=e.style.width)!=null?t:0,height:y},minWidth:1,onResize:z,onResizeStart:T,enable:x,style:m},p);return i.createElement(W,{slot:a,item:g(n({},r),{end:r.end===null?s:r.end}),attributeList:l})};export{K as default};
1
+ import{Resizable as D}from"re-resizable";import i,{useState as N}from"react";import W from"../ToolTipForClip.js";import{getDisplayContent as I}from"../videoTrack/index.js";import u from"./index.module.scss.js";import{decimalReserved as L}from"../../../../videoPlayer/utils.js";var k=Object.defineProperty,F=Object.defineProperties,H=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable,w=(e,t,r)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))A.call(t,r)&&w(e,r,t[r]);if(_)for(var r of _(t))G.call(t,r)&&w(e,r,t[r]);return e},g=(e,t)=>F(e,H(t));const y=45,K=e=>{var t;const{track:r,currentTime:s,attributeList:n,readonly:O,onClipping:b,onTrackResizeStart:c}=e,{start:d,end:P}=r,R=P||s,[S,f]=N({width:0,height:0}),z=(o,E,j,h)=>{var v;const C=(h.width-S.width)/((v=j.parentNode)==null?void 0:v.clientWidth);f(h),e.onResize(E,C)},T=()=>{f({width:0,height:0}),c==null||c()},m=l({transform:"none",overflow:"hidden",textOverflow:"ellipsis",fontSize:12},e.style),x={top:!1,right:!0,left:!0,bottom:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},p=i.createElement("div",{style:{margin:"10px 5px"}},i.createElement("div",{className:u.textOverflow},`${L(Math.max(R-d,1),0)}s`),i.createElement("div",{className:u.textOverflow},I(r,n)));let a;if(b||O||!e.isSelected){const o=g(l({},m),{height:y});e.isSelected&&s-d<0&&(o.width=100,o.backgroundColor="transparent"),a=i.createElement("div",{style:o},p)}else a=i.createElement(D,{size:{width:(t=e.style.width)!=null?t:0,height:y},minWidth:1,onResize:z,onResizeStart:T,enable:x,style:m},p);return i.createElement(W,{slot:a,item:g(l({},r),{end:r.end===null?s:r.end}),attributeList:n})};export{K as default};
@@ -1 +1 @@
1
- import{classnames as h}from"../../../../../utils/index.js";import{Input as I,message as T}from"antd";import j from"lodash";import e,{useState as O,useEffect as y}from"react";import{ETimeSliceType as A,PER_SLICE_CHANGE as g}from"../../constant.js";import a from"./index.module.scss.js";import{precisionMinus as G,precisionAdd as M,timeFormat as l}from"../../../../../utils/audio.js";import{decimalReserved as _}from"../../../../videoPlayer/utils.js";import{useTranslation as v}from"react-i18next";const p=({initialVal:t,timeType:E="",videoPlayer:r,min:F,max:m,updateTime:i,disabled:c})=>{const[f,d]=O(""),{t:B}=v(),C=()=>{S(f).then(u=>{i(u)}).catch(u=>{T.error(u),x()})},R=u=>{const[s,o]=u.split(":");return~~s*60+parseFloat(o)},D=(u,s=!1)=>{if(F!==void 0&&u<F){const n=l(F,"ss.SS");return s?`\u4FEE\u6539\u65F6\u95F4\u5931\u8D25, \u4FEE\u6539\u65F6\u95F4\u4E0D\u5141\u8BB8\u5C11\u4E8E${n}`:`\u5F53\u524D\u65F6\u95F4\u683C\u5F0F\u8F93\u5165\u6709\u8BEF, \u8F93\u5165\u65F6\u95F4\u4E0D\u5141\u8BB8\u5C11\u4E8E${n}`}if(m!==void 0&&u>m){const n=l(m,"ss.SS");return s?`\u4FEE\u6539\u65F6\u95F4\u5931\u8D25, \u4FEE\u6539\u65F6\u95F4\u4E0D\u5141\u8BB8\u5927\u4E8E${n}`:`\u5F53\u524D\u65F6\u95F4\u683C\u5F0F\u8F93\u5165\u6709\u8BEF, \u8F93\u5165\u65F6\u95F4\u4E0D\u5141\u8BB8\u5927\u4E8E${n}`}const o=r==null?void 0:r.duration;if(r&&o&&u>o){const n=l(o,"ss.SS");return s?`\u4FEE\u6539\u65F6\u95F4\u5931\u8D25, \u8F93\u5165\u65F6\u95F4\u4E0D\u5141\u8BB8\u5927\u4E8E${n}`:`\u5F53\u524D\u65F6\u95F4\u683C\u5F0F\u8F93\u5165\u6709\u8BEF, \u8F93\u5165\u65F6\u95F4\u4E0D\u5141\u8BB8\u5927\u4E8E${n}`}},S=u=>new Promise((s,o)=>{if(u.match(/^\d+\:\d\d\.\d\d$/)){const n=R(u),N=D(n);if(N){o(N);return}s(n)}else o(new Error("\u5F53\u524D\u65F6\u95F4\u683C\u5F0F\u8F93\u5165\u6709\u8BEF, \u65F6\u95F4\u683C\u5F0F\u5E94\u4E3Axx:xx.xx"))}),x=()=>{j.isNumber(t)&&d(l(t,"ss.SS"))},$=()=>{if(!c&&r){const u=_(r==null?void 0:r.currentTime,2),s=D(u,!0);if(s){T.error(s);return}i(u)}};return y(()=>{x()},[t]),e.createElement("div",{className:a.inputWrapper},e.createElement(I,{placeholder:"00:00.00",value:f,onChange:u=>d(u.target.value),onBlur:C,onPressEnter:C,disabled:c}),e.createElement("span",{className:h({[a.getCurr]:!0,[a.disabled]:c!=null?c:!1}),onClick:$},B(E==="start"?"GetStartTime":"GetEndTime")))},w=({selectedTimeSlice:t,videoPlayer:E,updateTimeForSelected:r,disabled:F})=>{if(!t)return null;const{t:m}=v();return(t==null?void 0:t.type)===A.Period?e.createElement("div",{className:a.timeSliceInputContainer},e.createElement("div",{className:a.title},m("ClipTime")),e.createElement("div",{className:a.inputContainer},e.createElement(p,{initialVal:t.start,timeType:"start",videoPlayer:E,max:G(t.end,g),updateTime:i=>{r(i,"start")},disabled:F}),e.createElement("span",{className:a.spliter}),e.createElement(p,{initialVal:t.end,timeType:"end",videoPlayer:E,min:M(t.start,g),updateTime:i=>{r(i,"end")},disabled:F}))):e.createElement("div",{className:a.timeSliceInputContainer},e.createElement("div",{className:a.title},m("StampTime")),e.createElement(p,{initialVal:t.start,videoPlayer:E,updateTime:i=>{r(i,"start")}}))};export{w as default};
1
+ import{classnames as h}from"../../../../../utils/index.js";import{Input as I,message as T}from"antd";import _ from"lodash";import e,{useState as j,useEffect as O}from"react";import{ETimeSliceType as y,PER_SLICE_CHANGE as g}from"../../constant.js";import a from"./index.module.scss.js";import{precisionMinus as A,precisionAdd as G,timeFormat as l}from"../../../../../utils/audio.js";import{decimalReserved as M}from"../../../../videoPlayer/utils.js";import{useTranslation as v}from"react-i18next";const p=({initialVal:t,timeType:E="",videoPlayer:r,min:F,max:m,updateTime:i,disabled:c})=>{const[f,d]=j(""),{t:B}=v(),C=()=>{S(f).then(u=>{i(u)}).catch(u=>{T.error(u),x()})},R=u=>{const[s,o]=u.split(":");return~~s*60+parseFloat(o)},D=(u,s=!1)=>{if(F!==void 0&&u<F){const n=l(F,"ss.SS");return s?`\u4FEE\u6539\u65F6\u95F4\u5931\u8D25, \u4FEE\u6539\u65F6\u95F4\u4E0D\u5141\u8BB8\u5C11\u4E8E${n}`:`\u5F53\u524D\u65F6\u95F4\u683C\u5F0F\u8F93\u5165\u6709\u8BEF, \u8F93\u5165\u65F6\u95F4\u4E0D\u5141\u8BB8\u5C11\u4E8E${n}`}if(m!==void 0&&u>m){const n=l(m,"ss.SS");return s?`\u4FEE\u6539\u65F6\u95F4\u5931\u8D25, \u4FEE\u6539\u65F6\u95F4\u4E0D\u5141\u8BB8\u5927\u4E8E${n}`:`\u5F53\u524D\u65F6\u95F4\u683C\u5F0F\u8F93\u5165\u6709\u8BEF, \u8F93\u5165\u65F6\u95F4\u4E0D\u5141\u8BB8\u5927\u4E8E${n}`}const o=r==null?void 0:r.duration;if(r&&o&&u>o){const n=l(o,"ss.SS");return s?`\u4FEE\u6539\u65F6\u95F4\u5931\u8D25, \u8F93\u5165\u65F6\u95F4\u4E0D\u5141\u8BB8\u5927\u4E8E${n}`:`\u5F53\u524D\u65F6\u95F4\u683C\u5F0F\u8F93\u5165\u6709\u8BEF, \u8F93\u5165\u65F6\u95F4\u4E0D\u5141\u8BB8\u5927\u4E8E${n}`}},S=u=>new Promise((s,o)=>{if(u.match(/^\d+\:\d\d\.\d\d$/)){const n=R(u),N=D(n);if(N){o(N);return}s(n)}else o(new Error("\u5F53\u524D\u65F6\u95F4\u683C\u5F0F\u8F93\u5165\u6709\u8BEF, \u65F6\u95F4\u683C\u5F0F\u5E94\u4E3Axx:xx.xx"))}),x=()=>{_.isNumber(t)&&d(l(t,"ss.SS"))},$=()=>{if(!c&&r){const u=M(r==null?void 0:r.currentTime,2),s=D(u,!0);if(s){T.error(s);return}i(u)}};return O(()=>{x()},[t]),e.createElement("div",{className:a.inputWrapper},e.createElement(I,{placeholder:"00:00.00",value:f,onChange:u=>d(u.target.value),onBlur:C,onPressEnter:C,disabled:c}),e.createElement("span",{className:h({[a.getCurr]:!0,[a.disabled]:c!=null?c:!1}),onClick:$},B(E==="start"?"GetStartTime":"GetEndTime")))},w=({selectedTimeSlice:t,videoPlayer:E,updateTimeForSelected:r,disabled:F})=>{if(!t)return null;const{t:m}=v();return(t==null?void 0:t.type)===y.Period?e.createElement("div",{className:a.timeSliceInputContainer},e.createElement("div",{className:a.title},m("ClipTime")),e.createElement("div",{className:a.inputContainer},e.createElement(p,{initialVal:t.start,timeType:"start",videoPlayer:E,max:A(t.end,g),updateTime:i=>{r(i,"start")},disabled:F}),e.createElement("span",{className:a.spliter}),e.createElement(p,{initialVal:t.end,timeType:"end",videoPlayer:E,min:G(t.start,g),updateTime:i=>{r(i,"end")},disabled:F}))):e.createElement("div",{className:a.timeSliceInputContainer},e.createElement("div",{className:a.title},m("StampTime")),e.createElement(p,{initialVal:t.start,videoPlayer:E,updateTime:i=>{r(i,"start")}}))};export{w as default};
@@ -1 +1 @@
1
- import e from"react";import t from"./index.module.scss.js";import a from"../../../../../assets/annotation/video/icon_videoCut.svg.js";import n from"../../../../../assets/annotation/video/icon_timePoint.svg.js";const i=({toggleClipStatus:o,addTime:s})=>e.createElement("div",{className:t.clipToolbar},e.createElement("span",{className:t.buttonWrapper},e.createElement("img",{src:a,className:t.cutButton,onClick:()=>{o==null||o()}}),"\u622A\u53D6"),e.createElement("span",{className:t.buttonWrapper},e.createElement("img",{src:n,className:t.localButton,onClick:s}),"\u6807\u65F6\u95F4\u70B9"));export{i as default};
1
+ import e from"react";import t from"./index.module.scss.js";import s from"../../../../../assets/annotation/video/icon_videoCut.svg.js";import n from"../../../../../assets/annotation/video/icon_timePoint.svg.js";const i=({toggleClipStatus:o,addTime:a})=>e.createElement("div",{className:t.clipToolbar},e.createElement("span",{className:t.buttonWrapper},e.createElement("img",{src:s,className:t.cutButton,onClick:()=>{o==null||o()}}),"\u622A\u53D6"),e.createElement("span",{className:t.buttonWrapper},e.createElement("img",{src:n,className:t.localButton,onClick:a}),"\u6807\u65F6\u95F4\u70B9"));export{i as default};
@@ -1 +1 @@
1
- import{classnames as S}from"../../../../../utils/index.js";import{AttributeUtils as u,MathUtils as d}from"@labelbee/lb-annotation";import s from"react";import{CSSTransition as g,TransitionGroup as E}from"react-transition-group";import{TIME_SLICE_TYPE as h,ETimeSliceType as w}from"../../constant.js";import a from"./index.module.scss.js";var O=Object.defineProperty,P=Object.defineProperties,x=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,T=(i,e,r)=>e in i?O(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r,A=(i,e)=>{for(var r in e||(e={}))I.call(e,r)&&T(i,r,e[r]);if(f)for(var r of f(e))j.call(e,r)&&T(i,r,e[r]);return i},N=(i,e)=>P(i,x(e));const C=i=>{const{attributeList:e,result:r,currentTime:m,extraStyle:_}=i,y=t=>{const{type:o,start:n,end:p}=t;let l=!1;return o===w.Time?l=d.isInRange(m,[n-.1,n+.1]):l=p===null||d.isInRange(m,[n,p]),l},b=[],c=[];r.forEach(t=>{(y(t)?c:b).push(t)});const v=c.sort((t,o)=>t.start-o.start).map(t=>N(A({},t),{withinTime:!0})).map(t=>s.createElement(g,{classNames:"fade",key:t.id,timeout:500},s.createElement("div",{className:S({[a.timeSliceWrapper]:!0,[a.active]:t.withinTime})},s.createElement("div",{className:a.timeSliceItemAttribute,style:{textAlign:"right"}},s.createElement("span",{style:{backgroundColor:u.getAttributeColor(t.attribute,e)}},`${h[t.type]}: ${u.getAttributeShowText(t.attribute,e)||"\u65E0\u5C5E\u6027"}`)),t.textAttribute&&s.createElement("div",{className:a.timeSliceItemText},`\u6587\u672C: ${t.textAttribute}`))));return s.createElement("div",{className:a.videoTimeSlices,style:_},s.createElement(E,{className:"fade-group"},v))};export{C as default};
1
+ import{classnames as S}from"../../../../../utils/index.js";import{AttributeUtils as u,MathUtils as d}from"@labelbee/lb-annotation";import s from"react";import{CSSTransition as g,TransitionGroup as E}from"react-transition-group";import{TIME_SLICE_TYPE as h,ETimeSliceType as w}from"../../constant.js";import a from"./index.module.scss.js";var O=Object.defineProperty,P=Object.defineProperties,x=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,_=(i,e,r)=>e in i?O(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r,A=(i,e)=>{for(var r in e||(e={}))I.call(e,r)&&_(i,r,e[r]);if(f)for(var r of f(e))j.call(e,r)&&_(i,r,e[r]);return i},N=(i,e)=>P(i,x(e));const C=i=>{const{attributeList:e,result:r,currentTime:m,extraStyle:T}=i,y=t=>{const{type:o,start:n,end:p}=t;let l=!1;return o===w.Time?l=d.isInRange(m,[n-.1,n+.1]):l=p===null||d.isInRange(m,[n,p]),l},b=[],c=[];r.forEach(t=>{(y(t)?c:b).push(t)});const v=c.sort((t,o)=>t.start-o.start).map(t=>N(A({},t),{withinTime:!0})).map(t=>s.createElement(g,{classNames:"fade",key:t.id,timeout:500},s.createElement("div",{className:S({[a.timeSliceWrapper]:!0,[a.active]:t.withinTime})},s.createElement("div",{className:a.timeSliceItemAttribute,style:{textAlign:"right"}},s.createElement("span",{style:{backgroundColor:u.getAttributeColor(t.attribute,e)}},`${h[t.type]}: ${u.getAttributeShowText(t.attribute,e)||"\u65E0\u5C5E\u6027"}`)),t.textAttribute&&s.createElement("div",{className:a.timeSliceItemText},`\u6587\u672C: ${t.textAttribute}`))));return s.createElement("div",{className:a.videoTimeSlices,style:T},s.createElement(E,{className:"fade-group"},v))};export{C as default};
@@ -1 +1 @@
1
- import{timeFormat as $}from"../../../../../utils/audio.js";import{AttributeUtils as b,MathUtils as g}from"@labelbee/lb-annotation";import{EnvironmentFilled as z}from"@ant-design/icons";import i,{useContext as R,useRef as D,useMemo as S}from"react";import X from"../resizableSnippet/index.js";import{ETimeSliceType as N,EClipStatus as U}from"../../constant.js";import W from"../ToolTipForClip.js";import u from"./index.module.scss.js";import{decimalReserved as x,hashCode as L}from"../../../../videoPlayer/utils.js";import{VideoClipToolContext as q}from"../../VideoClipToolContext.js";import{VideoPlayerCtx as B}from"../../../../videoPlayer/index.js";import{useTranslation as G}from"react-i18next";var H=Object.defineProperty,K=Object.defineProperties,Q=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,A=(o,r,t)=>r in o?H(o,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[r]=t,J=(o,r)=>{for(var t in r||(r={}))Y.call(r,t)&&A(o,t,r[t]);if(w)for(var t of w(r))Z.call(r,t)&&A(o,t,r[t]);return o},tt=(o,r)=>K(o,Q(r));const et=(o,r)=>{const{t}=G(),{attribute:p,textAttribute:n}=o;return[b.getAttributeShowText(p,r)||t("NoAttribute"),n?`${t("textTool")}: ${n}`:""].filter(y=>y).join("\uFF0C")},rt=(o,r)=>{const t=(o||[]).filter(n=>n).map(()=>[]);o.forEach(n=>{if(n.id!==r){const s=t.findIndex(y=>{const l=n.start,c=n.end;return y.every(f=>{const T=[f.start,f.end],m=[l,c];return!g.isInRange(l,T)&&!g.isInRange(c,T)&&!g.isInRange(f.start,m)&&!g.isInRange(f.end,m)})});s>-1&&t[s].push(n)}});const p=ot(t.filter(n=>n.length>0));return p==null?void 0:p.map(n=>({data:n,id:L(n==null?void 0:n.map(s=>s.id).join("_"))}))},ot=(o,r=2)=>{let t=o;return t.length-r<0&&(t=t.concat(Array.from({length:r-t.length}))),t},nt=o=>{var r;const{currentTime:t,readonly:p,onTrackResizeStart:n}=o,{result:s,selectedAttribute:y,attributeList:l,selectedID:c,clipStatus:f,contextToCancel:T}=R(q),{duration:m}=R(B),C=D(null),I=t/m,h=(e,a=4)=>`${x(e*100,a)}%`,k=e=>{if(e){const a=b.getAttributeColor(e.attribute,l),v=Math.max((e.end||t)-e.start,0)/m,d={backgroundColor:a,left:h(e.start/m,2),width:h(e.end?Math.max(v,.001):v,2),position:"absolute",borderRadius:5};return e.type===N.Time&&(delete d.width,delete d.backgroundColor,d.top="50%",d.transform="translate(-50%)",d.color=a),d}return{}},_=b.getAttributeColor(y,l),E=((r=C.current)==null?void 0:r.clientWidth)||0,P=x(Math.max(E*I,0),0),F=x(Math.min(P,Math.floor(E-68)),0),j=e=>{if(e)return e.type===N.Time?i.createElement(W,{slot:i.createElement(z,{style:k(e)}),item:tt(J({},e),{end:e.end===null?t:e.end}),attributeList:l}):i.createElement(X,{track:e,currentTime:t,style:k(e),onResize:(a,v)=>o.onTrackResize(e.id,a,v),onTrackResizeStart:n,onClipping:f===U.Clipping,isSelected:e.id===c,readonly:p,attributeList:l})},M=S(()=>{const e=rt(s,c);return e==null?void 0:e.map((a,v)=>{var d;return i.createElement("div",{className:u.track,key:(a==null?void 0:a.id)||v},(d=a.data)==null?void 0:d.map(O=>j(O)))})},[s,c,m,JSON.stringify(l)]),V=S(()=>{const e=s.find(a=>(a==null?void 0:a.id)===c);return c&&e?i.createElement("div",{className:u.track,key:e==null?void 0:e.id},j(e)):null},[s,c,m,t,JSON.stringify(l)]);return i.createElement("div",{className:u.videoTrackContainer,ref:C,onContextMenu:T},i.createElement("div",{className:u.timeTrack}),i.createElement("div",{className:u.videoTrack},V,M),i.createElement("div",{className:u.timeline,style:{transform:`translate3d(${P}px, 0px, 0px)`,backgroundColor:_}}),i.createElement("div",{className:u.displayTime,style:{backgroundColor:_,transform:`translateX(${F}px, 0px, 0px)`}},$(t)))};var at=nt;export{at as default,et as getDisplayContent};
1
+ import{timeFormat as $}from"../../../../../utils/audio.js";import{AttributeUtils as b,MathUtils as g}from"@labelbee/lb-annotation";import{EnvironmentFilled as z}from"@ant-design/icons";import i,{useContext as R,useRef as D,useMemo as S}from"react";import X from"../resizableSnippet/index.js";import{ETimeSliceType as N,EClipStatus as U}from"../../constant.js";import W from"../ToolTipForClip.js";import u from"./index.module.scss.js";import{decimalReserved as x,hashCode as L}from"../../../../videoPlayer/utils.js";import{VideoClipToolContext as q}from"../../VideoClipToolContext.js";import{VideoPlayerCtx as B}from"../../../../videoPlayer/index.js";import{useTranslation as G}from"react-i18next";var H=Object.defineProperty,K=Object.defineProperties,Q=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,A=(o,r,t)=>r in o?H(o,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[r]=t,J=(o,r)=>{for(var t in r||(r={}))Y.call(r,t)&&A(o,t,r[t]);if(w)for(var t of w(r))Z.call(r,t)&&A(o,t,r[t]);return o},tt=(o,r)=>K(o,Q(r));const et=(o,r)=>{const{t}=G(),{attribute:p,textAttribute:n}=o;return[b.getAttributeShowText(p,r)||t("NoAttribute"),n?`${t("textTool")}: ${n}`:""].filter(y=>y).join("\uFF0C")},rt=(o,r)=>{const t=(o||[]).filter(n=>n).map(()=>[]);o.forEach(n=>{if(n.id!==r){const s=t.findIndex(y=>{const l=n.start,c=n.end;return y.every(f=>{const T=[f.start,f.end],m=[l,c];return!g.isInRange(l,T)&&!g.isInRange(c,T)&&!g.isInRange(f.start,m)&&!g.isInRange(f.end,m)})});s>-1&&t[s].push(n)}});const p=ot(t.filter(n=>n.length>0));return p==null?void 0:p.map(n=>({data:n,id:L(n==null?void 0:n.map(s=>s.id).join("_"))}))},ot=(o,r=2)=>{let t=o;return t.length-r<0&&(t=t.concat(Array.from({length:r-t.length}))),t},nt=o=>{var r;const{currentTime:t,readonly:p,onTrackResizeStart:n}=o,{result:s,selectedAttribute:y,attributeList:l,selectedID:c,clipStatus:f,contextToCancel:T}=R(q),{duration:m}=R(B),C=D(null),I=t/m,_=(e,a=4)=>`${x(e*100,a)}%`,h=e=>{if(e){const a=b.getAttributeColor(e.attribute,l),v=Math.max((e.end||t)-e.start,0)/m,d={backgroundColor:a,left:_(e.start/m,2),width:_(e.end?Math.max(v,.001):v,2),position:"absolute",borderRadius:5};return e.type===N.Time&&(delete d.width,delete d.backgroundColor,d.top="50%",d.transform="translate(-50%)",d.color=a),d}return{}},k=b.getAttributeColor(y,l),E=((r=C.current)==null?void 0:r.clientWidth)||0,P=x(Math.max(E*I,0),0),F=x(Math.min(P,Math.floor(E-68)),0),j=e=>{if(e)return e.type===N.Time?i.createElement(W,{slot:i.createElement(z,{style:h(e)}),item:tt(J({},e),{end:e.end===null?t:e.end}),attributeList:l}):i.createElement(X,{track:e,currentTime:t,style:h(e),onResize:(a,v)=>o.onTrackResize(e.id,a,v),onTrackResizeStart:n,onClipping:f===U.Clipping,isSelected:e.id===c,readonly:p,attributeList:l})},M=S(()=>{const e=rt(s,c);return e==null?void 0:e.map((a,v)=>{var d;return i.createElement("div",{className:u.track,key:(a==null?void 0:a.id)||v},(d=a.data)==null?void 0:d.map(O=>j(O)))})},[s,c,m,JSON.stringify(l)]),V=S(()=>{const e=s.find(a=>(a==null?void 0:a.id)===c);return c&&e?i.createElement("div",{className:u.track,key:e==null?void 0:e.id},j(e)):null},[s,c,m,t,JSON.stringify(l)]);return i.createElement("div",{className:u.videoTrackContainer,ref:C,onContextMenu:T},i.createElement("div",{className:u.timeTrack}),i.createElement("div",{className:u.videoTrack},V,M),i.createElement("div",{className:u.timeline,style:{transform:`translate3d(${P}px, 0px, 0px)`,backgroundColor:k}}),i.createElement("div",{className:u.displayTime,style:{backgroundColor:k,transform:`translateX(${F}px, 0px, 0px)`}},$(t)))};var at=nt;export{at as default,et as getDisplayContent};
@@ -1 +1 @@
1
- import o,{useEffect as c}from"react";import{i18n as a}from"@labelbee/lb-utils";import{I18nextProvider as i}from"react-i18next";import{TagToolInstanceAdaptor as p}from"./TagToolInstanceAdaptor.js";var f=Object.defineProperty,n=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,l=(e,r,t)=>r in e?f(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,u=(e,r)=>{for(var t in r||(r={}))m.call(r,t)&&l(e,t,r[t]);if(n)for(var t of n(r))s.call(r,t)&&l(e,t,r[t]);return e};const _=e=>(c(()=>{a.changeLanguage(e.lang)},[e.lang]),o.createElement(i,{i18n:a},o.createElement(p,u({},e))));export{_ as VideoTagTool};
1
+ import a,{useEffect as c}from"react";import{i18n as o}from"@labelbee/lb-utils";import{I18nextProvider as f}from"react-i18next";import{TagToolInstanceAdaptor as i}from"./TagToolInstanceAdaptor.js";var p=Object.defineProperty,n=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,l=(e,r,t)=>r in e?p(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,u=(e,r)=>{for(var t in r||(r={}))m.call(r,t)&&l(e,t,r[t]);if(n)for(var t of n(r))_.call(r,t)&&l(e,t,r[t]);return e};const s=e=>(c(()=>{o.changeLanguage(e.lang)},[e.lang]),a.createElement(f,{i18n:o},a.createElement(i,u({},e))));export{s as VideoTagTool};
@@ -1 +1 @@
1
- import e from"react";import{result2LabelKey as c}from"./utils.js";const m=({result:r,inputList:l,hasPromptLayer:a})=>{const o=c(r,l),n={position:"absolute",zIndex:20,padding:"0 20px",color:"white",fontSize:15,lineHeight:"32px",background:"rgba(0, 255, 255, 0.32)",top:a?40:0,right:0,maxHeight:"calc(100% - 80px)",overflowY:"scroll"};return e.createElement("div",{style:n},e.createElement("table",null,e.createElement("tbody",null,o.map(({keyLabel:t,valuesLabelArray:i})=>e.createElement("tr",{key:t},e.createElement("td",{style:{paddingRight:8}},`${t}:`),e.createElement("td",null,`${i.join("\u3001")}`))))))};export{m as VideoTagLayer};
1
+ import e from"react";import{result2LabelKey as c}from"./utils.js";const d=({result:l,inputList:r,hasPromptLayer:a})=>{const o=c(l,r),n={position:"absolute",zIndex:20,padding:"0 20px",color:"white",fontSize:15,lineHeight:"32px",background:"rgba(0, 255, 255, 0.32)",top:a?40:0,right:0,maxHeight:"calc(100% - 80px)",overflowY:"scroll"};return e.createElement("div",{style:n},e.createElement("table",null,e.createElement("tbody",null,o.map(({keyLabel:t,valuesLabelArray:i})=>e.createElement("tr",{key:t},e.createElement("td",{style:{paddingRight:8}},`${t}:`),e.createElement("td",null,`${i.join("\u3001")}`))))))};export{d as VideoTagLayer};
@@ -1,2 +1,2 @@
1
- import t,{useRef as y}from"react";const x=n=>{const{toolColor:i,value:l,configList:a,showEmptyValue:c,hasPromptLayer:u}=n,p=y(null),s=e=>{var o;const r=a==null?void 0:a.find(m=>m.key===e);return(o=r==null?void 0:r.label)!=null?o:e},d=e=>e.endsWith(`
2
- `)?e+" ":e;return t.createElement("div",{ref:p,style:{position:"absolute",right:0,top:u?40:0,zIndex:22,maxWidth:416,fontFamily:"SourceHanSansCN-Regular",background:i,color:"white",wordBreak:"break-all",lineHeight:"24px",whiteSpace:"pre-wrap",maxHeight:"80%",overflowY:"auto",opacity:.9}},Object.keys(l).filter(e=>c?!0:l[e]).map(e=>t.createElement("div",{key:e,style:{padding:"8px 16px"}},t.createElement("div",null,`${s(e)}:`),t.createElement("div",null,d(l[e])||"(\u7A7A)"))))};export{x as VideoTextLayer};
1
+ import t,{useRef as y}from"react";const x=n=>{const{toolColor:i,value:l,configList:a,showEmptyValue:u,hasPromptLayer:c}=n,d=y(null),p=e=>{var o;const r=a==null?void 0:a.find(m=>m.key===e);return(o=r==null?void 0:r.label)!=null?o:e},s=e=>e.endsWith(`
2
+ `)?e+" ":e;return t.createElement("div",{ref:d,style:{position:"absolute",right:0,top:c?40:0,zIndex:22,maxWidth:416,fontFamily:"SourceHanSansCN-Regular",background:i,color:"white",wordBreak:"break-all",lineHeight:"24px",whiteSpace:"pre-wrap",maxHeight:"80%",overflowY:"auto",opacity:.9}},Object.keys(l).filter(e=>u?!0:l[e]).map(e=>t.createElement("div",{key:e,style:{padding:"8px 16px"}},t.createElement("div",null,`${p(e)}:`),t.createElement("div",null,s(l[e])||"(\u7A7A)"))))};export{x as VideoTextLayer};
@@ -1 +1 @@
1
- import{CaretUpOutlined as k,CaretDownOutlined as x}from"@ant-design/icons";import t,{useState as I,useEffect as K}from"react";import d from"./index.module.scss.js";import{cKeyCode as L,CommonToolUtils as S}from"@labelbee/lb-annotation";import{useTranslation as T}from"react-i18next";const E=L.default,m=[.5,1,1.5,2,4,6,8,16],A=[.5,.75,1,1.25,1.5,1.75,2];var c;(function(e){e[e.Video=0]="Video",e[e.Audio=1]="Audio"})(c||(c={}));var f;(function(e){e[e.Increase=0]="Increase",e[e.Reduce=1]="Reduce"})(f||(f={}));const u={[0]:m,[1]:A},Y=e=>{const{onChange:C,playerType:_}=e,{t:p}=T(),o=u[_],P=o.slice(-1)[0],R=o[0],[s,y]=I(1),r=n=>{const a=n===0?1:-1;if(a===1&&s===P||a===-1&&s===R)return;const w=o.findIndex(D=>D===s)+a,l=o[w];y(l),C(l)},i=n=>{!S.hotkeyFilter(n)||(n.keyCode===E.Up&&r(0),n.keyCode===E.Down&&r(1))};return K(()=>(window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i))),t.createElement("div",{className:d.speedControllerWrap},t.createElement("span",{style:{display:"flex",alignItems:"center"}},t.createElement("span",{style:{fontSize:12}},p("Speed")),s,"x"),t.createElement("span",{className:d.speedController},t.createElement(k,{onClick:()=>r(0)}),t.createElement(x,{onClick:()=>r(1)})))};export{A as AUDIO_PLAYBACK_RATE_SPEED,c as EPlayerType,u as PLAYER_TYPE_RATE_SPEED,m as VIDEO_PLAYBACK_RATE_SPEED,Y as default};
1
+ import{CaretUpOutlined as k,CaretDownOutlined as x}from"@ant-design/icons";import t,{useState as I,useEffect as K}from"react";import d from"./index.module.scss.js";import{cKeyCode as L,CommonToolUtils as S}from"@labelbee/lb-annotation";import{useTranslation as T}from"react-i18next";const E=L.default,m=[.5,1,1.5,2,4,6,8,16],A=[.5,.75,1,1.25,1.5,1.75,2];var c;(function(e){e[e.Video=0]="Video",e[e.Audio=1]="Audio"})(c||(c={}));var f;(function(e){e[e.Increase=0]="Increase",e[e.Reduce=1]="Reduce"})(f||(f={}));const u={[0]:m,[1]:A},Y=e=>{const{onChange:_,playerType:C}=e,{t:p}=T(),o=u[C],P=o.slice(-1)[0],R=o[0],[s,y]=I(1),r=n=>{const a=n===0?1:-1;if(a===1&&s===P||a===-1&&s===R)return;const w=o.findIndex(D=>D===s)+a,l=o[w];y(l),_(l)},i=n=>{!S.hotkeyFilter(n)||(n.keyCode===E.Up&&r(0),n.keyCode===E.Down&&r(1))};return K(()=>(window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i))),t.createElement("div",{className:d.speedControllerWrap},t.createElement("span",{style:{display:"flex",alignItems:"center"}},t.createElement("span",{style:{fontSize:12}},p("Speed")),s,"x"),t.createElement("span",{className:d.speedController},t.createElement(k,{onClick:()=>r(0)}),t.createElement(x,{onClick:()=>r(1)})))};export{A as AUDIO_PLAYBACK_RATE_SPEED,c as EPlayerType,u as PLAYER_TYPE_RATE_SPEED,m as VIDEO_PLAYBACK_RATE_SPEED,Y as default};
@@ -1 +1 @@
1
- import e,{useContext as $,useMemo as w}from"react";import{getClassName as l}from"../../../../utils/dom.js";import{CaretUpOutlined as b,CaretDownOutlined as j,PauseOutlined as H,CaretRightOutlined as R}from"@ant-design/icons";import{VideoPlayerCtx as d}from"../../index.js";import{Pagination as S}from"../../../../views/MainView/toolFooter/Pagination.js";import M from"../../../../assets/annotation/video/icon_keyboard_h.svg.js";import F from"../../../../views/MainView/toolFooter/FooterTips/ToolHotKey/index.js";import{useTranslation as f}from"react-i18next";import{decimalReserved as g}from"../../utils.js";import{cTool as K}from"@labelbee/lb-annotation";import O from"../../../videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.js";import{VideoClipToolContext as A}from"../../../videoAnnotate/videoClipTool/VideoClipToolContext.js";const{EVideoToolName:B}=K,C=t=>{const o=Math.floor(t/60),n=~~Math.floor(t%60),r=(t*10).toString().split("").pop(),i=a=>a<10?`0${a}`:a;return`${i(o)}:${i(n)}:${r}`};var E;(function(t){t[t.Video=0]="Video",t[t.Audio=1]="Audio"})(E||(E={}));const I=()=>{const{currentTime:t,duration:o,buffered:n,setCurrentTime:r}=e.useContext(d),i=e.useRef(null),a=w(()=>`${g(n/o*100,1)}%`,[n,o]),c=w(()=>`${g(t/o*100,1)}%`,[t,o]),u=s=>{if(i.current){const p=s.clientX,v=i.current.clientWidth,m=g(p/v*o,1);r(m)}};return e.createElement("div",{className:l("video-progress"),ref:i,onMouseUp:s=>{s.stopPropagation(),s.nativeEvent.stopImmediatePropagation(),u(s)}},e.createElement("div",{className:l("video-slider")},e.createElement("div",{className:l("video-slider","played"),style:{width:c}}),e.createElement("div",{className:l("video-slider","loaded"),style:{width:a}}),e.createElement("div",{className:l("video-slider","played"),style:{width:c}})),e.createElement("div",{className:l("video-slider-bar"),style:{left:c}}))},_=()=>{const{updateNextPlaybackRate:t,playbackRate:o}=e.useContext(d),{t:n}=f();return e.createElement("span",{className:l("video-controller","speed")},e.createElement("span",null,n("Speed")),e.createElement("span",{className:l("video-controller","speedNum")},`${o}x`),e.createElement("span",{className:l("video-controller","speedButton")},e.createElement(b,{onClick:()=>{t()}}),e.createElement(j,{onClick:()=>{t(!1)}})))},L=()=>{const{t}=f();return e.createElement(F,{title:e.createElement("span",{className:l("video-controller","hotkey")},e.createElement("img",{src:M}),t("Hotkeys")),style:{},toolName:B.VideoTagTool})},U=()=>{const{imgIndex:t,imgList:o,pageBackward:n,pageJump:r,pageForward:i}=e.useContext(d);return e.createElement(S,{isVideo:!0,pageBackward:n,imgIndex:t,pageJump:r,totalPage:o.length,pageForward:i,footerCls:l("video-controller")})},X=()=>{const{currentTime:t,duration:o}=e.useContext(d),n=o*10-t*10,r=(n>0?n:0)/10;return e.createElement("div",{className:l("video-controller","time")},`${C(t)} / -${C(r)}`)},z=t=>{const{playPause:o,isPlay:n}=t;return e.createElement("span",{onClick:()=>{o()},className:l("video-controller","playButton")},n?e.createElement(H,null):e.createElement(R,null))},D=t=>{var o,n;const{footer:r}=t,{playPause:i,isPlay:a,addTime:c,toggleClipStatus:u}=e.useContext(d),{result:s}=$(A),p=(n=(o=s==null?void 0:s.filter(k=>k.end!==null))==null?void 0:o.length)!=null?n:0,{t:v}=f(),m=e.createElement(I,null),y=e.createElement(z,{playPause:i,isPlay:a}),T=e.createElement(X,null),x=e.createElement(_,null),N=e.createElement(U,null),P=e.createElement(L,null),V=e.createElement(O,{addTime:c,toggleClipStatus:u}),h=e.createElement("span",{style:{margin:"0px 8px",fontSize:12}},`${v("ItemsOfThisPage")}: ${p}`);return r?typeof r=="function"?r({videoProgress:m,videoPlayIcon:y,videoTime:T,videoSpeed:x,videoPageChange:N,videoHotKeys:P,videoClipHotKey:V,videoResultCount:h}):r:e.createElement("div",{className:l("video-controller","wrapper")},m,e.createElement("div",{className:l("video-controller")},y,T,x,V,e.createElement("div",{className:l("video-controller","holder")}),h,N,P))};export{E as EPlayerType,D as default,C as videoTimeFormat};
1
+ import e,{useContext as $,useMemo as w}from"react";import{getClassName as l}from"../../../../utils/dom.js";import{CaretUpOutlined as b,CaretDownOutlined as j,PauseOutlined as H,CaretRightOutlined as R}from"@ant-design/icons";import{VideoPlayerCtx as d}from"../../index.js";import{Pagination as S}from"../../../../views/MainView/toolFooter/Pagination.js";import M from"../../../../assets/annotation/video/icon_keyboard_h.svg.js";import _ from"../../../../views/MainView/toolFooter/FooterTips/ToolHotKey/index.js";import{useTranslation as f}from"react-i18next";import{decimalReserved as g}from"../../utils.js";import{cTool as F}from"@labelbee/lb-annotation";import K from"../../../videoAnnotate/videoClipTool/components/videoClipToolHotkey/index.js";import{VideoClipToolContext as O}from"../../../videoAnnotate/videoClipTool/VideoClipToolContext.js";const{EVideoToolName:A}=F,C=t=>{const o=Math.floor(t/60),n=~~Math.floor(t%60),r=(t*10).toString().split("").pop(),i=a=>a<10?`0${a}`:a;return`${i(o)}:${i(n)}:${r}`};var E;(function(t){t[t.Video=0]="Video",t[t.Audio=1]="Audio"})(E||(E={}));const B=()=>{const{currentTime:t,duration:o,buffered:n,setCurrentTime:r}=e.useContext(d),i=e.useRef(null),a=w(()=>`${g(n/o*100,1)}%`,[n,o]),c=w(()=>`${g(t/o*100,1)}%`,[t,o]),u=s=>{if(i.current){const p=s.clientX,v=i.current.clientWidth,m=g(p/v*o,1);r(m)}};return e.createElement("div",{className:l("video-progress"),ref:i,onMouseUp:s=>{s.stopPropagation(),s.nativeEvent.stopImmediatePropagation(),u(s)}},e.createElement("div",{className:l("video-slider")},e.createElement("div",{className:l("video-slider","played"),style:{width:c}}),e.createElement("div",{className:l("video-slider","loaded"),style:{width:a}}),e.createElement("div",{className:l("video-slider","played"),style:{width:c}})),e.createElement("div",{className:l("video-slider-bar"),style:{left:c}}))},I=()=>{const{updateNextPlaybackRate:t,playbackRate:o}=e.useContext(d),{t:n}=f();return e.createElement("span",{className:l("video-controller","speed")},e.createElement("span",null,n("Speed")),e.createElement("span",{className:l("video-controller","speedNum")},`${o}x`),e.createElement("span",{className:l("video-controller","speedButton")},e.createElement(b,{onClick:()=>{t()}}),e.createElement(j,{onClick:()=>{t(!1)}})))},L=()=>{const{t}=f();return e.createElement(_,{title:e.createElement("span",{className:l("video-controller","hotkey")},e.createElement("img",{src:M}),t("Hotkeys")),style:{},toolName:A.VideoTagTool})},U=()=>{const{imgIndex:t,imgList:o,pageBackward:n,pageJump:r,pageForward:i}=e.useContext(d);return e.createElement(S,{isVideo:!0,pageBackward:n,imgIndex:t,pageJump:r,totalPage:o.length,pageForward:i,footerCls:l("video-controller")})},X=()=>{const{currentTime:t,duration:o}=e.useContext(d),n=o*10-t*10,r=(n>0?n:0)/10;return e.createElement("div",{className:l("video-controller","time")},`${C(t)} / -${C(r)}`)},z=t=>{const{playPause:o,isPlay:n}=t;return e.createElement("span",{onClick:()=>{o()},className:l("video-controller","playButton")},n?e.createElement(H,null):e.createElement(R,null))},D=t=>{var o,n;const{footer:r}=t,{playPause:i,isPlay:a,addTime:c,toggleClipStatus:u}=e.useContext(d),{result:s}=$(O),p=(n=(o=s==null?void 0:s.filter(k=>k.end!==null))==null?void 0:o.length)!=null?n:0,{t:v}=f(),m=e.createElement(B,null),y=e.createElement(z,{playPause:i,isPlay:a}),T=e.createElement(X,null),x=e.createElement(I,null),N=e.createElement(U,null),P=e.createElement(L,null),V=e.createElement(K,{addTime:c,toggleClipStatus:u}),h=e.createElement("span",{style:{margin:"0px 8px",fontSize:12}},`${v("ItemsOfThisPage")}: ${p}`);return r?typeof r=="function"?r({videoProgress:m,videoPlayIcon:y,videoTime:T,videoSpeed:x,videoPageChange:N,videoHotKeys:P,videoClipHotKey:V,videoResultCount:h}):r:e.createElement("div",{className:l("video-controller","wrapper")},m,e.createElement("div",{className:l("video-controller")},y,T,x,V,e.createElement("div",{className:l("video-controller","holder")}),h,N,P))};export{E as EPlayerType,D as default,C as videoTimeFormat};
@@ -1 +1 @@
1
- import o from"react";import A from"./components/controller/index.js";import j from"../videoAnnotate/videoClipTool/components/videoTrack/index.js";import{getClassName as l}from"../../utils/dom.js";import{cKeyCode as M}from"@labelbee/lb-annotation";import{decimalReserved as d}from"./utils.js";import z from"../fileException/index.js";const s=M.default,c=o.createContext({isPlay:!1,playPause:()=>{},updateNextPlaybackRate:()=>{},playbackRate:1,currentTime:0,duration:0,buffered:0,setCurrentTime:()=>{},imgList:[],imgIndex:-1,pageBackward:()=>{},pageJump:f=>{},pageForward:()=>{},addTime:()=>{},toggleClipStatus:()=>{}}),U=50,p=.1,n=[.5,1,1.5,2,4,6,8,16];class v extends o.Component{constructor(a){super(a);this.changePlaybackPate=e=>{this.videoElm&&(this.videoElm.playbackRate=e,this.setState({playbackRate:e}))},this.playPause=()=>{var e,t,i;((e=this.videoElm)==null?void 0:e.paused)?(t=this.videoElm)==null||t.play():(i=this.videoElm)==null||i.pause()},this.updateNextPlaybackRate=(e=!0)=>{const t=n.findIndex(r=>r===this.state.playbackRate);let i=e?Math.min(t+1,n.length-1):Math.max(t-1,0);this.changePlaybackPate(n[i])},this.fastForward=()=>{this.videoElm&&this.setCurrentTime(this.videoElm.currentTime+p)},this.rewind=()=>{this.videoElm&&this.setCurrentTime(this.videoElm.currentTime-p)},this.keydown=e=>{e.keyCode===s.Space&&(e.preventDefault(),this.playPause()),e.keyCode===s.Up&&(e.preventDefault(),this.updateNextPlaybackRate()),e.keyCode===s.Down&&(e.preventDefault(),this.updateNextPlaybackRate(!1)),e.keyCode===s.Left&&(e.preventDefault(),this.rewind()),e.keyCode===s.Right&&(e.preventDefault(),this.fastForward())},this.onPlay=()=>{this.setState({isPlay:!0},this.onVideoStart)},this.onPause=()=>{this.onVideoStopped()},this.onTimeUpdate=()=>{var e;this.videoElm&&this.setState({currentTime:d((e=this.videoElm)==null?void 0:e.currentTime,1)})},this.onVideoStopped=()=>{this.setState({isPlay:!1}),this.timeInterval&&(clearInterval(this.timeInterval),this.timeInterval=void 0),this.videoElm&&this.setCurrentTime(this.videoElm.currentTime)},this.onVideoStart=()=>{this.timeInterval=window.setInterval(()=>{var e,t,i;if(this.videoElm)try{if(((e=this.videoElm)==null?void 0:e.buffered.length)>0){const r=(t=this.videoElm)==null?void 0:t.buffered.end(0);this.setState({currentTime:d((i=this.videoElm)==null?void 0:i.currentTime,1),buffered:r})}}catch(r){console.error(r)}},U)},this.resetVideoData=()=>{this.setState({currentTime:0,buffered:0,error:!1,isPlay:!1}),this.videoElm&&(this.videoElm.playbackRate=this.state.playbackRate),this.onVideoStopped()},this.setDuration=()=>{var e,t,i;if(this.videoElm){const r=d((e=this.videoElm)==null?void 0:e.duration,1);(i=(t=this.props).dataLoaded)==null||i.call(t),this.setState({duration:r})}},this.setCurrentTime=e=>{var t,i;this.videoElm&&(this.videoElm.currentTime=e,this.setState({currentTime:e}),(i=(t=this.props).updateCurrentTime)==null||i.call(t,e))},this.reload=()=>{var e;(e=this.videoElm)==null||e.load()},this.onError=()=>{this.resetVideoData(),this.setState({error:!0})},this.state={playbackRate:1,currentTime:0,isPlay:!1,duration:0,buffered:0,error:!1},this.videoRef=o.createRef()}get videoElm(){var a;return(a=this.videoRef)==null?void 0:a.current}get videoSrc(){var a,e;const{imgIndex:t,imgList:i}=this.props;return t>-1&&(e=(a=i[t])==null?void 0:a.url)!=null?e:""}componentDidMount(){var a,e;window.addEventListener("keydown",this.keydown),((a=this.videoRef)==null?void 0:a.current)&&this.props.setVideoRef&&this.props.setVideoRef((e=this.videoRef)==null?void 0:e.current)}componentWillUnmount(){window.removeEventListener("keydown",this.keydown)}render(){const{isPlay:a,playbackRate:e,currentTime:t,duration:i,buffered:r,error:E}=this.state,{imgList:y,imgIndex:k,pageBackward:g,pageJump:T,pageForward:R,valid:P,footer:b,drawLayerSlot:h}=this.props,C=isNaN(i)?0:Math.max(d(i,1)-t,0),{playPause:m,updateNextPlaybackRate:w,onPause:x,onPlay:S,onTimeUpdate:_,resetVideoData:V,setDuration:D,setCurrentTime:I,onError:N,videoRef:L,videoSrc:F}=this;return o.createElement(c.Provider,{value:{videoRef:this.videoRef,addTime:this.props.addTime,toggleClipStatus:this.props.toggleClipStatus,isPlay:a,playPause:m,updateNextPlaybackRate:w,playbackRate:e,currentTime:t,duration:i,buffered:r,setCurrentTime:I,imgIndex:k,imgList:y,pageBackward:g,pageJump:T,pageForward:R}},o.createElement(o.Fragment,null,h==null?void 0:h({currentTime:t,remainingTime:C,zoom:1,currentPos:{x:0,y:0}}),o.createElement("div",{className:l("video-wrapper")},o.createElement("div",{className:l("video-container")},o.createElement("video",{ref:L,className:l(this.props.showVideoTrack?"video-track":"video"),src:F,onPause:x,onPlay:S,onTimeUpdate:_,onLoadedMetadata:V,onError:N,onDurationChange:D,width:"100%",height:"100%",onClick:m}),this.props.showVideoTrack&&o.createElement(j,{currentTime:t,onTrackResize:this.props.onTrackResize,onTrackResizeStart:()=>{var u;(u=this.videoElm)==null||u.pause()},readonly:!1}),o.createElement(z,{fileType:"video",errorProps:{reloadImage:this.reload,backgroundColor:"#e2e2e2",ignoreOffsetY:!0,isError:E},invalidProps:{isValid:P}})),o.createElement(A,{footer:b}))))}}export{v as VideoPlayer,c as VideoPlayerCtx,v as default};
1
+ import o from"react";import A from"./components/controller/index.js";import j from"../videoAnnotate/videoClipTool/components/videoTrack/index.js";import{getClassName as l}from"../../utils/dom.js";import{cKeyCode as M}from"@labelbee/lb-annotation";import{decimalReserved as d}from"./utils.js";import z from"../fileException/index.js";const s=M.default,c=o.createContext({isPlay:!1,playPause:()=>{},updateNextPlaybackRate:()=>{},playbackRate:1,currentTime:0,duration:0,buffered:0,setCurrentTime:()=>{},imgList:[],imgIndex:-1,pageBackward:()=>{},pageJump:f=>{},pageForward:()=>{},addTime:()=>{},toggleClipStatus:()=>{}}),U=50,p=.1,n=[.5,1,1.5,2,4,6,8,16];class v extends o.Component{constructor(a){super(a);this.changePlaybackPate=e=>{this.videoElm&&(this.videoElm.playbackRate=e,this.setState({playbackRate:e}))},this.playPause=()=>{var e,t,i;((e=this.videoElm)==null?void 0:e.paused)?(t=this.videoElm)==null||t.play():(i=this.videoElm)==null||i.pause()},this.updateNextPlaybackRate=(e=!0)=>{const t=n.findIndex(r=>r===this.state.playbackRate);let i=e?Math.min(t+1,n.length-1):Math.max(t-1,0);this.changePlaybackPate(n[i])},this.fastForward=()=>{this.videoElm&&this.setCurrentTime(this.videoElm.currentTime+p)},this.rewind=()=>{this.videoElm&&this.setCurrentTime(this.videoElm.currentTime-p)},this.keydown=e=>{e.keyCode===s.Space&&(e.preventDefault(),this.playPause()),e.keyCode===s.Up&&(e.preventDefault(),this.updateNextPlaybackRate()),e.keyCode===s.Down&&(e.preventDefault(),this.updateNextPlaybackRate(!1)),e.keyCode===s.Left&&(e.preventDefault(),this.rewind()),e.keyCode===s.Right&&(e.preventDefault(),this.fastForward())},this.onPlay=()=>{this.setState({isPlay:!0},this.onVideoStart)},this.onPause=()=>{this.onVideoStopped()},this.onTimeUpdate=()=>{var e;this.videoElm&&this.setState({currentTime:d((e=this.videoElm)==null?void 0:e.currentTime,1)})},this.onVideoStopped=()=>{this.setState({isPlay:!1}),this.timeInterval&&(clearInterval(this.timeInterval),this.timeInterval=void 0),this.videoElm&&this.setCurrentTime(this.videoElm.currentTime)},this.onVideoStart=()=>{this.timeInterval=window.setInterval(()=>{var e,t,i;if(this.videoElm)try{if(((e=this.videoElm)==null?void 0:e.buffered.length)>0){const r=(t=this.videoElm)==null?void 0:t.buffered.end(0);this.setState({currentTime:d((i=this.videoElm)==null?void 0:i.currentTime,1),buffered:r})}}catch(r){console.error(r)}},U)},this.resetVideoData=()=>{this.setState({currentTime:0,buffered:0,error:!1,isPlay:!1}),this.videoElm&&(this.videoElm.playbackRate=this.state.playbackRate),this.onVideoStopped()},this.setDuration=()=>{var e,t,i;if(this.videoElm){const r=d((e=this.videoElm)==null?void 0:e.duration,1);(i=(t=this.props).dataLoaded)==null||i.call(t),this.setState({duration:r})}},this.setCurrentTime=e=>{var t,i;this.videoElm&&(this.videoElm.currentTime=e,this.setState({currentTime:e}),(i=(t=this.props).updateCurrentTime)==null||i.call(t,e))},this.reload=()=>{var e;(e=this.videoElm)==null||e.load()},this.onError=()=>{this.resetVideoData(),this.setState({error:!0})},this.state={playbackRate:1,currentTime:0,isPlay:!1,duration:0,buffered:0,error:!1},this.videoRef=o.createRef()}get videoElm(){var a;return(a=this.videoRef)==null?void 0:a.current}get videoSrc(){var a,e;const{imgIndex:t,imgList:i}=this.props;return t>-1&&(e=(a=i[t])==null?void 0:a.url)!=null?e:""}componentDidMount(){var a,e;window.addEventListener("keydown",this.keydown),((a=this.videoRef)==null?void 0:a.current)&&this.props.setVideoRef&&this.props.setVideoRef((e=this.videoRef)==null?void 0:e.current)}componentWillUnmount(){window.removeEventListener("keydown",this.keydown)}render(){const{isPlay:a,playbackRate:e,currentTime:t,duration:i,buffered:r,error:E}=this.state,{imgList:y,imgIndex:k,pageBackward:g,pageJump:T,pageForward:R,valid:P,footer:b,drawLayerSlot:h}=this.props,C=isNaN(i)?0:Math.max(d(i,1)-t,0),{playPause:m,updateNextPlaybackRate:w,onPause:x,onPlay:_,onTimeUpdate:S,resetVideoData:V,setDuration:D,setCurrentTime:I,onError:N,videoRef:L,videoSrc:F}=this;return o.createElement(c.Provider,{value:{videoRef:this.videoRef,addTime:this.props.addTime,toggleClipStatus:this.props.toggleClipStatus,isPlay:a,playPause:m,updateNextPlaybackRate:w,playbackRate:e,currentTime:t,duration:i,buffered:r,setCurrentTime:I,imgIndex:k,imgList:y,pageBackward:g,pageJump:T,pageForward:R}},o.createElement(o.Fragment,null,h==null?void 0:h({currentTime:t,remainingTime:C,zoom:1,currentPos:{x:0,y:0}}),o.createElement("div",{className:l("video-wrapper")},o.createElement("div",{className:l("video-container")},o.createElement("video",{ref:L,className:l(this.props.showVideoTrack?"video-track":"video"),src:F,onPause:x,onPlay:_,onTimeUpdate:S,onLoadedMetadata:V,onError:N,onDurationChange:D,width:"100%",height:"100%",onClick:m}),this.props.showVideoTrack&&o.createElement(j,{currentTime:t,onTrackResize:this.props.onTrackResize,onTrackResizeStart:()=>{var u;(u=this.videoElm)==null||u.pause()},readonly:!1}),o.createElement(z,{fileType:"video",errorProps:{reloadImage:this.reload,backgroundColor:"#e2e2e2",ignoreOffsetY:!0,isError:E},invalidProps:{isValid:P}})),o.createElement(A,{footer:b}))))}}export{v as VideoPlayer,c as VideoPlayerCtx,v as default};
@@ -1 +1 @@
1
- var n;(function(a){a[a.Check=0]="Check",a[a.ANNOTATION=1]="ANNOTATION",a[a.QUALITY_INSPECTION=2]="QUALITY_INSPECTION",a[a.PRE_ANNOTATION=3]="PRE_ANNOTATION",a[a.MANUAL_CORRECTION=4]="MANUAL_CORRECTION"})(n||(n={}));var r;(function(a){a[a.Backward=1]="Backward",a[a.Forward=2]="Forward",a[a.Jump=3]="Jump",a[a.Quit=4]="Quit",a[a.Export=5]="Export",a[a.StepChanged=6]="StepChanged",a[a.Save=7]="Save",a[a.BatchUpdateTrackID=8]="BatchUpdateTrackID",a[a.BatchUpdateImgList=9]="BatchUpdateImgList",a[a.SyncImgList=10001]="SyncImgList",a[a.SyncCurrentPageData=10002]="SyncCurrentPageData"})(r||(r={}));const N="bee",I=`${N}-component`;var c;(function(a){a.Default="default",a.Markdown="markdown"})(c||(c={}));var o;(function(a){a.Picture="picture",a.Text="text",a.None="none"})(o||(o={}));const O={Tool:"tool",Remark:"remark"};export{c as EDataFormatType,o as ELLMDataType,n as EStepType,r as ESubmitType,O as TOOL_PANEL_KEY,I as componentCls,N as prefix};
1
+ var n;(function(a){a[a.Check=0]="Check",a[a.ANNOTATION=1]="ANNOTATION",a[a.QUALITY_INSPECTION=2]="QUALITY_INSPECTION",a[a.PRE_ANNOTATION=3]="PRE_ANNOTATION",a[a.MANUAL_CORRECTION=4]="MANUAL_CORRECTION"})(n||(n={}));var c;(function(a){a[a.Backward=1]="Backward",a[a.Forward=2]="Forward",a[a.Jump=3]="Jump",a[a.Quit=4]="Quit",a[a.Export=5]="Export",a[a.StepChanged=6]="StepChanged",a[a.Save=7]="Save",a[a.BatchUpdateTrackID=8]="BatchUpdateTrackID",a[a.BatchUpdateImgList=9]="BatchUpdateImgList",a[a.SyncImgList=10001]="SyncImgList",a[a.SyncCurrentPageData=10002]="SyncCurrentPageData"})(c||(c={}));const o="bee",I=`${o}-component`;var r;(function(a){a.Default="default",a.Markdown="markdown"})(r||(r={}));var N;(function(a){a.Picture="picture",a.Text="text",a.None="none"})(N||(N={}));export{r as EDataFormatType,N as ELLMDataType,n as EStepType,c as ESubmitType,I as componentCls,o as prefix};
@@ -1 +1 @@
1
- var o;(function(n){n[n.Scribble=1]="Scribble",n[n.Erase=2]="Erase"})(o||(o={}));var t;(function(n){n.Rect="rectTool",n.Tag="tagTool",n.Point="pointTool",n.PointMarker="pointMarkerTool",n.Segmentation="segmentationTool",n.Filter="filterTool",n.Text="textTool",n.Polygon="polygonTool",n.Line="lineTool",n.LineMarker="lineMarkerTool",n.Empty="emptyTool",n.FolderTag="folderTagTool",n.RectTrack="rectTrackTool",n.ScribbleTool="scribbleTool",n.Face="faceTool",n.ClientAttribute="clientAttributeTool",n.OCRRelation="OCRRelationTool",n.SegmentByRect="segmentByRectTool",n.Cuboid="cuboidTool",n.PointCloudPolygon="pointCloudPolygon",n.LLM="LLMTool",n.NLP="NLPTool"})(t||(t={}));var r;(function(n){n[n.AnyString=0]="AnyString",n[n.Order=1]="Order",n[n.EnglishOnly=2]="EnglishOnly",n[n.NumberOnly=3]="NumberOnly",n[n.CustomFormat=4]="CustomFormat"})(r||(r={}));const i=1e3;export{o as EScribblePattern,r as ETextType,t as EToolName,i as TEXT_ATTRIBUTE_MAX_LENGTH};
1
+ var o;(function(n){n[n.Scribble=1]="Scribble",n[n.Erase=2]="Erase"})(o||(o={}));var t;(function(n){n.Rect="rectTool",n.Tag="tagTool",n.Point="pointTool",n.PointMarker="pointMarkerTool",n.Segmentation="segmentationTool",n.Filter="filterTool",n.Text="textTool",n.Polygon="polygonTool",n.Line="lineTool",n.LineMarker="lineMarkerTool",n.Empty="emptyTool",n.FolderTag="folderTagTool",n.RectTrack="rectTrackTool",n.ScribbleTool="scribbleTool",n.Face="faceTool",n.ClientAttribute="clientAttributeTool",n.OCRRelation="OCRRelationTool",n.SegmentByRect="segmentByRectTool",n.Cuboid="cuboidTool",n.PointCloudPolygon="pointCloudPolygon",n.LLM="LLMTool"})(t||(t={}));var r;(function(n){n[n.AnyString=0]="AnyString",n[n.Order=1]="Order",n[n.EnglishOnly=2]="EnglishOnly",n[n.NumberOnly=3]="NumberOnly",n[n.CustomFormat=4]="CustomFormat"})(r||(r={}));const i=1e3;export{o as EScribblePattern,r as ETextType,t as EToolName,i as TEXT_ATTRIBUTE_MAX_LENGTH};
@@ -1 +1 @@
1
- import{useRef as f,useEffect as m}from"react";import{useDispatch as O}from"../store/ctx.js";import{ANNOTATION_ACTIONS as c}from"../store/Actions.js";const T=({basicInfo:o}={})=>{var s;const u=O(),i={valid:(s=o==null?void 0:o.valid)!=null?s:!0,exportData:()=>[[],{}],exportCustomData:()=>({}),clearResult:()=>{},singleOn:()=>{},on:()=>{},unbind:()=>{},setResult:()=>{},history:{initRecord:()=>{},pushHistory:()=>{}},setDefaultAttribute:e=>{},setForbidOperation:()=>{},setShowDefaultCursor:()=>{},setSubAttribute:(e,n)=>{},setValid:()=>{},updateRotate:()=>{},redo:()=>{},undo:()=>{},setPointCloudGlobalPattern:e=>{}},t=f(i),l=e=>{u({type:c.SET_TOOL,payload:{instance:e}})},d=()=>{u({type:c.SET_TOOL,payload:{instance:void 0}})},p=()=>{Object.assign(t.current,i)},a=()=>{t.current.emit=e=>{const n=t.current.fns.get(e);n&&n.forEach(r=>{r&&(r==null||r())})},t.current.fns=new Map,t.current.singleOn=(e,n)=>{t.current.fns.set(e,[n])},t.current.on=(e,n)=>{t.current.singleOn(e,n)},t.current.unbindAll=e=>{t.current.fns.delete(e)}};return m(()=>(a(),l(t.current),()=>{d()}),[]),{toolInstanceRef:t,clearToolInstance:p,initEventEmitter:a}};export{T as useCustomToolInstance};
1
+ import{useRef as c,useEffect as d}from"react";import{useDispatch as p}from"../store/ctx.js";import{ANNOTATION_ACTIONS as a}from"../store/Actions.js";const m=({basicInfo:o}={})=>{var n;const r=p(),s={valid:(n=o==null?void 0:o.valid)!=null?n:!0,exportData:()=>[[],{}],exportCustomData:()=>({}),clearResult:()=>{},singleOn:()=>{},on:()=>{},unbind:()=>{},setResult:()=>{},history:{initRecord:()=>{},pushHistory:()=>{}},setDefaultAttribute:t=>{},setForbidOperation:()=>{},setShowDefaultCursor:()=>{},setSubAttribute:(t,O)=>{},setValid:()=>{},updateRotate:()=>{},redo:()=>{},undo:()=>{},setPointCloudGlobalPattern:t=>{}},e=c(s),u=t=>{r({type:a.SET_TOOL,payload:{instance:t}})},i=()=>{r({type:a.SET_TOOL,payload:{instance:void 0}})},l=()=>{Object.assign(e.current,s)};return d(()=>(u(e.current),()=>{i()}),[]),{toolInstanceRef:e,clearToolInstance:l}};export{m as useCustomToolInstance};
@@ -1 +1 @@
1
- import t from"react";import o from"./useUnmountedRef.js";function f(e){const n=o(),[u,r]=t.useState(e),s=t.useCallback(a=>{n.current||r(a)},[]);return[u,s]}export{f as default};
1
+ import t from"react";import o from"./useUnmountedRef.js";function f(e){const u=o(),[n,r]=t.useState(e),a=t.useCallback(s=>{u.current||r(s)},[]);return[n,a]}export{f as default};
package/es/index.css CHANGED
@@ -24,6 +24,39 @@
24
24
  .index-module_imgView__wmxDk .index-module_item__-80YI .index-module_image__V49oW .ant-image {
25
25
  display: flex;
26
26
  }
27
+ .index-module_annotatedBox__gmg-f {
28
+ padding: 24px;
29
+ border-bottom: 1px solid #eee;
30
+ }
31
+ .index-module_annotatedBox__gmg-f .index-module_tag__wIcdd {
32
+ color: #666;
33
+ background-color: #f3f4ff;
34
+ border-color: transparent;
35
+ cursor: pointer;
36
+ position: relative;
37
+ }
38
+ .index-module_annotatedBox__gmg-f .index-module_tag__wIcdd.index-module_disabled__OuTHq {
39
+ color: #ccc;
40
+ background-color: #f5f5f5;
41
+ cursor: not-allowed;
42
+ }
43
+ .index-module_annotatedBox__gmg-f .index-module_tag__wIcdd.index-module_selected__UhwdY {
44
+ color: #fff;
45
+ background-color: #666fff;
46
+ }
47
+ .index-module_annotatedBox__gmg-f .index-module_tag__wIcdd .index-module_highlight__g25J2 {
48
+ position: absolute;
49
+ right: -5px;
50
+ top: -5px;
51
+ }
52
+ .index-module_container__RwV5P {
53
+ padding: 12px 20px;
54
+ }
55
+ .index-module_container__RwV5P .index-module_content__vHpS9 {
56
+ display: flex;
57
+ justify-content: space-between;
58
+ margin-top: 4px;
59
+ }
27
60
  .index-module_latexEditor__0fK8G {
28
61
  line-height: 32px;
29
62
  background-color: #ededed;
@@ -1363,7 +1396,6 @@
1363
1396
  max-height: calc(100vh - 61px);
1364
1397
  display: flex;
1365
1398
  flex-direction: column;
1366
- max-height: 300px;
1367
1399
  overflow-y: auto;
1368
1400
  }
1369
1401
  .bee-sidebar .sensebee-radio-group .ant-radio-wrapper,
@@ -2827,7 +2859,7 @@
2827
2859
  width: 100%;
2828
2860
  }
2829
2861
  .bee-LLMView .bee-LLMView-tag {
2830
- color: #666FFF;
2862
+ color: #666fff;
2831
2863
  background: #eeefff;
2832
2864
  height: 20px;
2833
2865
  padding: 0px 8px;
@@ -2952,80 +2984,6 @@
2952
2984
  background-color: #eeefff;
2953
2985
  }
2954
2986
 
2955
- /** NLP style */
2956
- .bee-NLPLayout {
2957
- overflow: hidden;
2958
- }
2959
-
2960
- .bee-NLPView {
2961
- height: 100%;
2962
- background-color: #ffffff;
2963
- overflow-y: auto;
2964
- flex: auto;
2965
- padding: 26px 32px;
2966
- line-height: 26px;
2967
- }
2968
-
2969
- .bee-NLPView-question {
2970
- flex: 1;
2971
- overflow: hidden;
2972
- }
2973
- .bee-NLPView-question-title {
2974
- font-weight: 500;
2975
- font-size: 18px;
2976
- margin-bottom: 24px;
2977
- }
2978
- .bee-NLPView-question-content {
2979
- font-size: 14px;
2980
- font-weight: 400;
2981
- background-color: #f5f5f5;
2982
- border-radius: 4px;
2983
- padding: 8px;
2984
- }
2985
- .bee-NLPView-question-content-mask {
2986
- position: absolute;
2987
- left: 0px;
2988
- top: 0px;
2989
- background-color: transparent;
2990
- color: transparent;
2991
- z-index: 10;
2992
- opacity: 1;
2993
- }
2994
-
2995
- .bee-sidebar__content__NLPList {
2996
- display: flex;
2997
- flex-direction: column;
2998
- }
2999
- .bee-sidebar__content__NLPList__item {
3000
- display: flex;
3001
- align-items: center;
3002
- cursor: pointer;
3003
- }
3004
- .bee-sidebar__content__NLPList__item .bee-sidebar-pop-remove {
3005
- margin: 0px 16px;
3006
- display: none;
3007
- }
3008
- .bee-sidebar__content__NLPList__item:hover .bee-sidebar-pop-remove {
3009
- display: block;
3010
- }
3011
- .bee-sidebar__content__NLPList__item__text {
3012
- flex: 1 1;
3013
- padding: 16px;
3014
- font-weight: 400;
3015
- font-size: 12px;
3016
- line-height: 20px;
3017
- color: #666666;
3018
- overflow: hidden;
3019
- text-overflow: ellipsis;
3020
- white-space: nowrap;
3021
- }
3022
- .bee-sidebar__content__NLPList__item__active {
3023
- background-color: #eeefff;
3024
- }
3025
- .bee-sidebar__content__NLPList__item__active__text {
3026
- color: #666fff;
3027
- }
3028
-
3029
2987
  /** longText style */
3030
2988
  .bee-longText {
3031
2989
  display: flex;
package/es/index.js CHANGED
@@ -1 +1 @@
1
- export{default as AnnotationView}from"./components/AnnotationView/index.js";export{default as PointCloudAnnotationView}from"./components/AnnotationView/pointCloudAnnotationView.js";export{default as QuestionView}from"./components/LLMToolView/questionView/index.js";export{default as TextContent}from"./components/NLPToolView/textContent/index.js";import{i18n as c}from"@labelbee/lb-utils";export{i18n}from"@labelbee/lb-utils";import n,{useState as d,useImperativeHandle as m}from"react";import{I18nextProvider as f}from"react-i18next";import{Provider as u}from"react-redux";import x from"./App.js";import w from"./configureStore.js";import{PageBackward as P,PageForward as g,PageJump as v}from"./store/annotation/actionCreators.js";export{VideoTagTool}from"./components/videoAnnotate/videoTagTool/TagToolInstanceAdaptorI18nProvider.js";import{PointCloudProvider as T}from"./components/pointCloudView/PointCloudContext.js";import{LabelBeeContext as _}from"./store/ctx.js";export{default as PredictTracking}from"./components/predictTracking/predictTrackingIcon/index.js";export{default as LLMToolView}from"./components/LLMToolView/index.js";export{default as SwitchCuboidBoxIn2DView}from"./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js";export{default as MeasureCanvas}from"./components/measureCanvas/index.js";export{EDataFormatType,ELLMDataType,EStepType,ESubmitType,TOOL_PANEL_KEY,componentCls,prefix}from"./constant/index.js";var j=Object.defineProperty,V=Object.defineProperties,b=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,p=(o,e,t)=>e in o?j(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,E=(o,e)=>{for(var t in e||(e={}))C.call(e,t)&&p(o,t,e[t]);if(s)for(var t of s(e))O.call(e,t)&&p(o,t,e[t]);return o},A=(o,e)=>V(o,b(e));const r=w(),I=(o,e)=>{const[t,l]=d();return m(e,()=>({toolInstance:t,annotationEngine:r.getState().annotation.annotationEngine,pageBackwardActions:()=>r.dispatch(P()),pageForwardActions:()=>r.dispatch(g()),pageJump:a=>{const i=~~a-1;r.dispatch(v(i))},hello:()=>alert("hello labelBee!!!")}),[t]),n.createElement(u,{store:r,context:_},n.createElement(f,{i18n:c},n.createElement(T,null,n.createElement(x,A(E({},o),{setToolInstance:a=>{var i;l(a),(i=o.onLoad)==null||i.call(o,{toolInstance:a})}})))))};var L=n.forwardRef(I);export{L as default,r as store};
1
+ export{default as AnnotationView}from"./components/AnnotationView/index.js";export{default as PointCloudAnnotationView}from"./components/AnnotationView/pointCloudAnnotationView.js";export{default as QuestionView}from"./components/LLMToolView/questionView/index.js";import{i18n as l}from"@labelbee/lb-utils";export{i18n}from"@labelbee/lb-utils";import r,{useState as c,useImperativeHandle as m}from"react";import{I18nextProvider as f}from"react-i18next";import{Provider as u}from"react-redux";import x from"./App.js";import w from"./configureStore.js";import{PageBackward as v,PageForward as P,PageJump as g}from"./store/annotation/actionCreators.js";export{VideoTagTool}from"./components/videoAnnotate/videoTagTool/TagToolInstanceAdaptorI18nProvider.js";import{PointCloudProvider as T}from"./components/pointCloudView/PointCloudContext.js";import{LabelBeeContext as _}from"./store/ctx.js";export{default as PredictTracking}from"./components/predictTracking/predictTrackingIcon/index.js";export{default as LLMToolView}from"./components/LLMToolView/index.js";export{default as SwitchCuboidBoxIn2DView}from"./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js";export{default as MeasureCanvas}from"./components/measureCanvas/index.js";export{default as AnnotatedBox}from"./views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.js";export{FindTrackIDIndexInCheckMode as FindTrackIDIndex}from"./views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.js";export{EDataFormatType,ELLMDataType,EStepType,ESubmitType,componentCls,prefix}from"./constant/index.js";var j=Object.defineProperty,I=Object.defineProperties,b=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,p=(o,e,t)=>e in o?j(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,A=(o,e)=>{for(var t in e||(e={}))V.call(e,t)&&p(o,t,e[t]);if(s)for(var t of s(e))C.call(e,t)&&p(o,t,e[t]);return o},O=(o,e)=>I(o,b(e));const n=w(),E=(o,e)=>{const[t,d]=c();return m(e,()=>({toolInstance:t,annotationEngine:n.getState().annotation.annotationEngine,pageBackwardActions:()=>n.dispatch(v()),pageForwardActions:()=>n.dispatch(P()),pageJump:a=>{const i=~~a-1;n.dispatch(g(i))},hello:()=>alert("hello labelBee!!!")}),[t]),r.createElement(u,{store:n,context:_},r.createElement(f,{i18n:l},r.createElement(T,null,r.createElement(x,O(A({},o),{setToolInstance:a=>{var i;d(a),(i=o.onLoad)==null||i.call(o,{toolInstance:a})}})))))};var S=r.forwardRef(E);export{S as default,n as store};
@@ -0,0 +1 @@
1
+ import{create as o}from"zustand";const a=o(e=>({ptCtx:{},pointCloudBoxList:[],setPointCloudBoxList:t=>e(s=>({pointCloudBoxList:t})),highlightIDs:[],setHighlightIDs:t=>e(s=>({highlightIDs:t})),selectedIDs:[],setSelectedIDs:t=>e(s=>({selectedIDs:t})),setPtCtx:t=>e(s=>({ptCtx:t}))}));export{a as default};
@@ -1 +1 @@
1
- import{getFormatSize as At}from"../../components/customResizeHook/index.js";import{ESubmitType as K}from"../../constant/index.js";import Dt from"../../constant/styleString.js";import{ANNOTATION_ACTIONS as l}from"../Actions.js";import{jsonParser as w}from"../../utils/index.js";import Y from"../../utils/AnnotationDataUtils.js";import{ConfigUtils as vt}from"../../utils/ConfigUtils.js";import{composeResultWithBasicImgInfo as ut,composeResult as J}from"../../utils/data.js";import O from"../../utils/StepUtils.js";import X from"../../utils/ToolUtils.js";import{MathUtils as at,CommonToolUtils as yt,AnnotationEngine as Pt,ImgUtils as Rt}from"@labelbee/lb-annotation";import{PointCloudUtils as ct,i18n as G}from"@labelbee/lb-utils";import{Modal as dt}from"antd";import{message as pt}from"antd/es";import _t from"lodash";import{SetAnnotationLoading as $}from"./actionCreators.js";import{EToolName as W}from"../../data/enums/ToolType.js";var Ct=Object.defineProperty,Ot=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,It=(t,e,r)=>e in t?Ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,n=(t,e)=>{for(var r in e||(e={}))bt.call(e,r)&&It(t,r,e[r]);if(gt)for(var r of gt(e))Nt.call(e,r)&&It(t,r,e[r]);return t},i=(t,e)=>Ot(t,ht(e)),mt=(t,e,r)=>new Promise((S,d)=>{var A=m=>{try{T(r.next(m))}catch(y){d(y)}},f=m=>{try{T(r.throw(m))}catch(y){d(y)}},T=m=>m.done?S(m.value):Promise.resolve(m.value).then(A,f);T((r=r.apply(t,e)).next())});const x=(t,e)=>t.find(r=>r.step===e),ft={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,loadPCDFileLoading:!0,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1,highlightAttribute:""},Ut=t=>{const{imgList:e,imgPageSize:r}=t;return Math.ceil(e.length/r)},Tt=(t,e)=>t.reduce((r,S)=>{if(S){const d=S.result;if(w(d)[`step_${e}`])return r+1}return r},0)/t.length,Bt=(t,e)=>{const{step:r,stepList:S}=t,d=O.getCurrentStepInfo(r,S),A=vt.jsonParser(d.config);if(X.isVideoTool(d==null?void 0:d.tool)||X.isAudioTool(d==null?void 0:d.tool)||X.isPointCloudTool(d==null?void 0:d.tool)||[W.LLM,W.NLP].includes(d==null?void 0:d.tool))return;const f=document.getElementById("toolContainer");if(!f)throw"Not exist dom named id-toolContainer";const T=At({width:window.innerWidth,height:window.innerHeight}),m=new Pt({container:f,toolName:d.tool,size:T,imgNode:e,config:A,style:JSON.parse(Dt)});return{toolInstance:m==null?void 0:m.toolInstance,annotationEngine:m}},wt=(t,e)=>(r,S)=>mt(void 0,null,function*(){var d,A;const{stepList:f,step:T}=S().annotation,m=O.currentToolIsVideo(T,f),y=O.currentToolIsPointCloud(T,f),h=((d=O.getCurrentStepInfo(T,f))==null?void 0:d.tool)===W.LLM,b=((A=O.getCurrentStepInfo(T,f))==null?void 0:A.tool)===W.NLP,N=O.currentToolIsAudio(T,f);if($(r,!0),yield r(xt(t)),m){r(Ft(t));return}if(y||h||N||b){r(jt(t));return}r(Gt(t,e))}),xt=t=>(e,r)=>mt(void 0,null,function*(){const{getFileData:S,imgList:d}=r().annotation;if(S){const A=yield S(d[t],t);e({type:l.SET_FILE_DATA,payload:{fileData:A,index:t}})}}),Ft=t=>e=>{e({type:l.LOAD_FILE_DATA,payload:{nextIndex:t}})},jt=t=>e=>{$(e,!1),e({type:l.LOAD_FILE_DATA,payload:{nextIndex:t}})},Gt=(t,e)=>(r,S)=>{var d;const{toolInstance:A,imgList:f}=S().annotation,T=(d=f==null?void 0:f[t])==null?void 0:d.url;Rt.load(T).then(m=>{$(r,!1),r({type:l.LOAD_FILE_DATA,payload:{imgNode:m,nextIndex:t,nextBasicIndex:e}})}).catch(()=>{$(r,!1),A==null||A.setErrorImg(),r({type:l.LOAD_FILE_DATA,payload:{nextIndex:t,nextBasicIndex:e}})})},Vt=({toolInstance:t,imgList:e,imgIndex:r,stepList:S,step:d=1})=>{var A,f,T,m;const y=((A=e[r])==null?void 0:A.result)||"",[h,b,N]=(f=t==null?void 0:t.exportData())!=null?f:[],V=(m=(T=t==null?void 0:t.exportCustomData)==null?void 0:T.call(t))!=null?m:{},M=ut(y,b),k=J(M,{step:d,stepList:S},{rect:h},V);return e.map((F,H)=>H===r?n(i(n({},F),{result:k}),N):n({},F))},Mt=(t=n({},ft),e)=>{var r,S,d,A,f,T,m,y,h,b,N,V,M,k,F,H,q,Z,Q,tt,et,ot,nt,st,lt;switch(e.type){case l.INIT_ALL_STATE:return n(n({},t),ft);case l.UPDATE_TOOL_INSTANCE:return i(n({},t),{toolInstance:e.payload.toolInstance});case l.UPDATE_IMG_LIST:return i(n({},t),{imgList:e.payload.imgList});case l.CALC_STEP_PROGRESS:{const{imgList:o,step:s}=t,u=Tt(o,s);return i(n({},t),{stepProgress:u})}case l.SUBMIT_FILE_DATA:{const{imgList:o,imgIndex:s,step:u,stepList:a,toolInstance:p,onSubmit:c,resultList:L}=t;if(!p||!o[s])return t;const g=((r=o[s])==null?void 0:r.result)||"",[,_,I]=(S=p==null?void 0:p.exportData())!=null?S:[],E=(A=(d=p==null?void 0:p.exportCustomData)==null?void 0:d.call(p))!=null?A:{},D=ut(g,_),P=J(D,{step:u,stepList:a},{rect:L},E),v=t.imgList.map((C,R)=>{if(R===s){const j=Y.dataCorrection(P,g,u,a);return n(i(n({},C),{result:j}),I)}return C});if(((f=e.payload)==null?void 0:f.submitType)===K.SyncImgList)return i(n({},t),{imgList:v});c&&c([v[s]],(T=e.payload)==null?void 0:T.submitType,s,v);const U=Tt(v,u);return i(n({},t),{stepProgress:U,imgList:v})}case l.SAVE_RESULT:{const{imgList:o,imgIndex:s,onSave:u}=t;return u==null||u(o[s],s,o),n({},t)}case l.SUBMIT_RESULT:{const{imgList:o,basicIndex:s,resultList:u,toolInstance:a,basicResultList:p}=t;if(!a)return t;const[c]=(m=a==null?void 0:a.exportData())!=null?m:[];let L=c;if((p==null?void 0:p.length)>0){const g=(y=p[s])==null?void 0:y.id,_=c.map(I=>i(n({},I),{sourceID:g}));L=_t.cloneDeep(u).filter(I=>I.sourceID!==g),L.push(..._)}return i(n({},t),{resultList:L,imgList:o})}case l.SET_BASIC_INDEX:{const{toolInstance:o,step:s,imgList:u,imgIndex:a,stepList:p,annotationEngine:c,resultList:L,basicResultList:g}=t;if(!o||!c)return t;const _=e.payload.basicIndex,I=(h=g[_])==null?void 0:h.id,E=w((b=u[a])==null?void 0:b.result),D=(L||[]).filter(j=>j.sourceID===I),P=x(p,s),{dataSourceStep:v,tool:U}=P,C=x(p,v);let R=[];return v&&U&&(R=(N=E[`step_${v}`])==null?void 0:N.result,(R==null?void 0:R.length)>0?(c==null||c.setBasicInfo(C.tool,R[_]),c==null||c.launchOperation()):(c==null||c.setBasicInfo(C.tool),c==null||c.forbidOperation(),pt.info(G.t("NoDependency")))),o==null||o.setResult(D),o==null||o.history.initRecord(D,!0),i(n({},t),{basicIndex:_})}case l.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:o}=e.payload;return i(n({},t),{triggerEventAfterIndexChanged:!!o})}case l.LOAD_FILE_DATA:{const{imgList:o,step:s,toolInstance:u,annotationEngine:a,stepList:p}=t;if(!u)return i(n({},t),{imgIndex:e.payload.nextIndex});const c=O.getCurrentStepInfo(s,p),{nextIndex:L,imgNode:g,nextBasicIndex:_,imgError:I}=e.payload,E=_!=null?_:0,D=w((V=o[L])==null?void 0:V.result),P=D[`step_${c.step}`],v=!P,U={rotate:(M=D.rotate)!=null?M:0,valid:(k=D.valid)!=null?k:!0};g&&I!==!0?a==null||a.setImgNode(g,U):u==null||u.setValid(U.valid);const C=x(p,c.step),{dataSourceStep:R,tool:j}=C,it=x(p,R),rt=R&&j,B=(H=(F=D[`step_${R}`])==null?void 0:F.result)!=null?H:[],z=Y.getInitialResultList(P==null?void 0:P.result,u,C,B,v);if(a==null||a.launchOperation(),rt&&((B==null?void 0:B.length)>0?a==null||a.setBasicInfo(it.tool,B[E]):(a==null||a.setBasicInfo(it.tool),a==null||a.forbidOperation(),pt.info(G.t("NoDependency")))),c.tool!=="check"){const Lt=(Z=(q=B[E])==null?void 0:q.id)!=null?Z:"",Et=rt?z.filter(St=>yt.isSameSourceID(St.sourceID,Lt)):z;(Q=u==null?void 0:u.history)==null||Q.initRecord(z,!0),u==null||u.setResult(Et)}return i(n({},t),{imgIndex:L,basicIndex:E,basicResultList:B,resultList:z})}case l.UPDATE_ANNOTATION_CONFIG:return i(n({},t),{config:(tt=e.payload.config)!=null?tt:"{}"});case l.SET_TASK_STEP_LIST:{const{stepList:o}=e.payload;return i(n({},t),{stepList:o})}case l.SET_TASK_CONFIG:{const{stepList:o,step:s}=e.payload;return i(n({},t),{stepList:o,step:s})}case l.INIT_TOOL:{const{imgNode:o}=t,s=Bt(t,o);if(s){const{toolInstance:u,annotationEngine:a}=s;return i(n({},t),{toolInstance:u,annotationEngine:a})}return n({},t)}case l.SET_TOOL:{const o=(et=e.payload)==null?void 0:et.instance;return o?i(n({},t),{toolInstance:o}):n({},t)}case l.UPDATE_ON_SUBMIT:return i(n({},t),{onSubmit:e.payload.onSubmit});case l.UPDATE_ON_SAVE:return i(n({},t),{onSave:e.payload.onSave});case l.UPDATE_ON_PAGE_CHANGE:return i(n({},t),{onPageChange:e.payload.onPageChange});case l.SET_PREDICT_RESULT:return i(n({},t),{predictionResult:e.payload.result});case l.SET_PREDICT_RESULT_VISIBLE:return i(n({},t),{predictionResultVisible:e.payload.visible});case l.UPDATE_ON_STEP_CHANGE:return i(n({},t),{onStepChange:e.payload.onStepChange});case l.UPDATE_GET_FILE_DATA:return i(n({},t),{getFileData:e.payload.getFileData});case l.UPDATE_PAGE_SIZE:return i(n({},t),{pageSize:e.payload.pageSize});case l.UPDATE_LOAD_FILE_LIST:return i(n({},t),{loadFileList:e.payload.loadFileList});case l.UPDATE_BEFORE_ROTATE:return i(n({},t),{beforeRotate:e.payload.beforeRotate});case l.UPDATE_PRE_DATA_PROCESS:return i(n({},t),{preDataProcess:e.payload.preDataProcess});case l.SKIP_BEFORE_PAGE_TURNING:return i(n({},t),{skipBeforePageTurning:e.payload.skipBeforePageTurning});case l.SET_FILE_DATA:{const{fileData:o,index:s}=e.payload,{imgList:u}=t,a=[...u];return a[s]=n(n({},a[s]),o),i(n({},t),{imgList:a})}case l.UPDATE_ROTATE:{const{toolInstance:o,beforeRotate:s}=t;return s&&s()===!1||(ot=o==null?void 0:o.updateRotate)==null||ot.call(o),t}case l.UPDATE_ANNOTATION_VALID:{const{toolInstance:o}=t,s=(nt=o==null?void 0:o.valid)!=null?nt:!0;return dt.destroyAll(),dt.confirm({content:G.t(s?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{o==null||o.setValid(!s)},okText:G.t("Confirm"),cancelText:G.t("Cancel")}),t}case l.COPY_BACKWARD_RESULT:{const{toolInstance:o,imgIndex:s,imgList:u,step:a}=t;if(!o)return t;if(s===0||s>=u.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),t;const p=u[s-1].result;if(!p)return t;const c=Y.copyResultChange(p,a,(st=u[s].result)!=null?st:"");u[s]=i(n({},u[s]),{result:c});const g=w(c)[`step_${a}`],_=(g==null?void 0:g.result)||[];return o==null||o.setResult(_),o==null||o.history.pushHistory(_),(lt=o==null?void 0:o.asyncData)==null||lt.call(o,u[s]),i(n({},t),{imgList:[...u]})}case l.SET_STEP:{const{stepList:o,annotationEngine:s}=t,{toStep:u}=e.payload;if(!s)return t;const a=x(o,u);return s==null||s.setToolName(a.tool,a.config),i(n({},t),{step:u,toolInstance:s==null?void 0:s.toolInstance})}case l.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:o}=e.payload;return i(n({},t),{loadPCDFileLoading:!!o})}case l.SET_LOADING:{const{loading:o}=e.payload;return i(n({},t),{loading:!!o})}case l.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:o}=e.payload;return i(n({},t),{pointCloudLoading:!!o})}case l.SET_CHECK_MODE:{const{checkMode:o}=e.payload;return i(n({},t),{checkMode:!!o})}case l.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:o}=e.payload;return i(n({},t),{highlightAttribute:o})}case l.BATCH_UPDATE_TRACK_ID:{const{id:o,newID:s,rangeIndex:u,imgList:a}=e.payload,{imgIndex:p,onSubmit:c}=t,L=[],g=a.map((_,I)=>{if(at.isInRange(I,u)){const E=i(n({},_),{result:ct.batchUpdateTrackID({id:o,newID:s,result:_.result})});return L.push({imgIndex:I,newInfo:E}),E}return _});return c&&c([g[p]],K.BatchUpdateTrackID,p,g,{updateImgList:L}),i(n({},t),{imgList:g})}case l.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:o,newData:s,rangeIndex:u}=e.payload,{imgList:a,imgIndex:p,onSubmit:c}=t,L=[],g=a.map((_,I)=>{if(at.isInRange(I,u)){const E=i(n({},_),{result:ct.batchUpdateResultByTrackID({id:o,newData:s,result:_.result})});return L.push({imgIndex:I,newInfo:E}),E}return _});return c&&c([g[p]],K.BatchUpdateTrackID,p,g,{updateImgList:L}),i(n({},t),{imgList:g})}case l.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:o,imgList:s,stepList:u,step:a,predictionResult:p}=t,c={};p.forEach(I=>{const{index:E}=I;c[E]=_t.pick(I,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const L=`step_${a}`,g=[],_=s.map((I,E)=>{if(c[E]){const D=I.result==="{}"?w(J("",{step:a,stepList:u},{rect:[]},{})):w(I.result);D[L].result.push(c[E]);const P=i(n({},I),{result:JSON.stringify(D)});return g.push({imgIndex:E,newInfo:P}),P}return I});return o==null||o(_,K.BatchUpdateImgList,-1,_,{updateImgList:g}),i(n({},t),{imgList:_})}default:return t}};export{wt as LoadFileAndFileData,Mt as annotationReducer,Vt as composeResultByToolInstance,x as getStepConfig,Ut as getTotalPage};
1
+ import{getFormatSize as St}from"../../components/customResizeHook/index.js";import{ESubmitType as K}from"../../constant/index.js";import Dt from"../../constant/styleString.js";import{ANNOTATION_ACTIONS as l}from"../Actions.js";import{jsonParser as U}from"../../utils/index.js";import W from"../../utils/AnnotationDataUtils.js";import{ConfigUtils as vt}from"../../utils/ConfigUtils.js";import{composeResultWithBasicImgInfo as rt,composeResult as Y}from"../../utils/data.js";import N from"../../utils/StepUtils.js";import J from"../../utils/ToolUtils.js";import{MathUtils as ut,CommonToolUtils as yt,AnnotationEngine as Rt,ImgUtils as Pt}from"@labelbee/lb-annotation";import{PointCloudUtils as at,i18n as F}from"@labelbee/lb-utils";import{Modal as ct}from"antd";import{message as dt}from"antd/es";import pt from"lodash";import{SetAnnotationLoading as $}from"./actionCreators.js";import{EToolName as _t}from"../../data/enums/ToolType.js";var Ct=Object.defineProperty,Ot=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,It=(t,e,r)=>e in t?Ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,n=(t,e)=>{for(var r in e||(e={}))bt.call(e,r)&&It(t,r,e[r]);if(gt)for(var r of gt(e))Ut.call(e,r)&&It(t,r,e[r]);return t},i=(t,e)=>Ot(t,ht(e)),mt=(t,e,r)=>new Promise((E,d)=>{var f=m=>{try{S(r.next(m))}catch(y){d(y)}},A=m=>{try{S(r.throw(m))}catch(y){d(y)}},S=m=>m.done?E(m.value):Promise.resolve(m.value).then(f,A);S((r=r.apply(t,e)).next())});const B=(t,e)=>t.find(r=>r.step===e),ft={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,loadPCDFileLoading:!0,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1,highlightAttribute:""},Nt=t=>{const{imgList:e,imgPageSize:r}=t;return Math.ceil(e.length/r)},Tt=(t,e)=>t.reduce((r,E)=>{if(E){const d=E.result;if(U(d)[`step_${e}`])return r+1}return r},0)/t.length,Bt=(t,e)=>{const{step:r,stepList:E}=t,d=N.getCurrentStepInfo(r,E),f=vt.jsonParser(d.config);if(J.isVideoTool(d==null?void 0:d.tool)||J.isAudioTool(d==null?void 0:d.tool)||J.isPointCloudTool(d==null?void 0:d.tool)||_t.LLM===(d==null?void 0:d.tool))return;const A=document.getElementById("toolContainer");if(!A)throw"Not exist dom named id-toolContainer";const S=St({width:window.innerWidth,height:window.innerHeight}),m=new Rt({container:A,toolName:d.tool,size:S,imgNode:e,config:f,style:JSON.parse(Dt)});return{toolInstance:m==null?void 0:m.toolInstance,annotationEngine:m}},wt=(t,e)=>(r,E)=>mt(void 0,null,function*(){var d;const{stepList:f,step:A}=E().annotation,S=N.currentToolIsVideo(A,f),m=N.currentToolIsPointCloud(A,f),y=((d=N.getCurrentStepInfo(A,f))==null?void 0:d.tool)===_t.LLM,O=N.currentToolIsAudio(A,f);if($(r,!0),yield r(xt(t)),S){r(Ft(t));return}if(m||y||O){r(jt(t));return}r(Gt(t,e))}),xt=t=>(e,r)=>mt(void 0,null,function*(){const{getFileData:E,imgList:d}=r().annotation;if(E){const f=yield E(d[t],t);e({type:l.SET_FILE_DATA,payload:{fileData:f,index:t}})}}),Ft=t=>e=>{e({type:l.LOAD_FILE_DATA,payload:{nextIndex:t}})},jt=t=>e=>{$(e,!1),e({type:l.LOAD_FILE_DATA,payload:{nextIndex:t}})},Gt=(t,e)=>(r,E)=>{var d;const{toolInstance:f,imgList:A}=E().annotation,S=(d=A==null?void 0:A[t])==null?void 0:d.url;Pt.load(S).then(m=>{$(r,!1),r({type:l.LOAD_FILE_DATA,payload:{imgNode:m,nextIndex:t,nextBasicIndex:e}})}).catch(()=>{$(r,!1),f==null||f.setErrorImg(),r({type:l.LOAD_FILE_DATA,payload:{nextIndex:t,nextBasicIndex:e}})})},Vt=({toolInstance:t,imgList:e,imgIndex:r,stepList:E,step:d=1})=>{var f,A,S,m;const y=((f=e[r])==null?void 0:f.result)||"",[O,j,G]=(A=t==null?void 0:t.exportData())!=null?A:[],V=(m=(S=t==null?void 0:t.exportCustomData)==null?void 0:S.call(t))!=null?m:{},M=rt(y,j),k=Y(M,{step:d,stepList:E},{rect:O},V);return e.map((w,H)=>H===r?n(i(n({},w),{result:k}),G):n({},w))},Mt=(t=n({},ft),e)=>{var r,E,d,f,A,S,m,y,O,j,G,V,M,k,w,H,X,q,Z,Q,tt,et,ot,nt,st;switch(e.type){case l.INIT_ALL_STATE:return n(n({},t),ft);case l.UPDATE_TOOL_INSTANCE:return i(n({},t),{toolInstance:e.payload.toolInstance});case l.UPDATE_IMG_LIST:return i(n({},t),{imgList:e.payload.imgList});case l.CALC_STEP_PROGRESS:{const{imgList:o,step:s}=t,u=Tt(o,s);return i(n({},t),{stepProgress:u})}case l.SUBMIT_FILE_DATA:{const{imgList:o,imgIndex:s,step:u,stepList:a,toolInstance:p,onSubmit:c,resultList:T}=t;if(!p||!o[s])return t;const g=((r=o[s])==null?void 0:r.result)||"",[,_,I]=(E=p==null?void 0:p.exportData())!=null?E:[],L=(f=(d=p==null?void 0:p.exportCustomData)==null?void 0:d.call(p))!=null?f:{},D=rt(g,_),R=Y(D,{step:u,stepList:a},{rect:T},L),v=t.imgList.map((C,P)=>{if(P===s){const x=W.dataCorrection(R,g,u,a);return n(i(n({},C),{result:x}),I)}return C});if(((A=e.payload)==null?void 0:A.submitType)===K.SyncImgList)return i(n({},t),{imgList:v});c&&c([v[s]],(S=e.payload)==null?void 0:S.submitType,s,v);const h=Tt(v,u);return i(n({},t),{stepProgress:h,imgList:v})}case l.SAVE_RESULT:{const{imgList:o,imgIndex:s,onSave:u}=t;return u==null||u(o[s],s,o),n({},t)}case l.SUBMIT_RESULT:{const{imgList:o,basicIndex:s,resultList:u,toolInstance:a,basicResultList:p}=t;if(!a)return t;const[c]=(m=a==null?void 0:a.exportData())!=null?m:[];let T=c;if((p==null?void 0:p.length)>0){const g=(y=p[s])==null?void 0:y.id,_=c.map(I=>i(n({},I),{sourceID:g}));T=pt.cloneDeep(u).filter(I=>I.sourceID!==g),T.push(..._)}return i(n({},t),{resultList:T,imgList:o})}case l.SET_BASIC_INDEX:{const{toolInstance:o,step:s,imgList:u,imgIndex:a,stepList:p,annotationEngine:c,resultList:T,basicResultList:g}=t;if(!o||!c)return t;const _=e.payload.basicIndex,I=(O=g[_])==null?void 0:O.id,L=U((j=u[a])==null?void 0:j.result),D=(T||[]).filter(x=>x.sourceID===I),R=B(p,s),{dataSourceStep:v,tool:h}=R,C=B(p,v);let P=[];return v&&h&&(P=(G=L[`step_${v}`])==null?void 0:G.result,(P==null?void 0:P.length)>0?(c==null||c.setBasicInfo(C.tool,P[_]),c==null||c.launchOperation()):(c==null||c.setBasicInfo(C.tool),c==null||c.forbidOperation(),dt.info(F.t("NoDependency")))),o==null||o.setResult(D),o==null||o.history.initRecord(D,!0),i(n({},t),{basicIndex:_})}case l.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:o}=e.payload;return i(n({},t),{triggerEventAfterIndexChanged:!!o})}case l.LOAD_FILE_DATA:{const{imgList:o,step:s,toolInstance:u,annotationEngine:a,stepList:p}=t;if(!u)return i(n({},t),{imgIndex:e.payload.nextIndex});const c=N.getCurrentStepInfo(s,p),{nextIndex:T,imgNode:g,nextBasicIndex:_,imgError:I}=e.payload,L=_!=null?_:0,D=U((V=o[T])==null?void 0:V.result),R=D[`step_${c.step}`],v=!R,h={rotate:(M=D.rotate)!=null?M:0,valid:(k=D.valid)!=null?k:!0};g&&I!==!0?a==null||a.setImgNode(g,h):u==null||u.setValid(h.valid);const C=B(p,c.step),{dataSourceStep:P,tool:x}=C,lt=B(p,P),it=P&&x,b=(H=(w=D[`step_${P}`])==null?void 0:w.result)!=null?H:[],z=W.getInitialResultList(R==null?void 0:R.result,u,C,b,v);if(a==null||a.launchOperation(),it&&((b==null?void 0:b.length)>0?a==null||a.setBasicInfo(lt.tool,b[L]):(a==null||a.setBasicInfo(lt.tool),a==null||a.forbidOperation(),dt.info(F.t("NoDependency")))),c.tool!=="check"){const Lt=(q=(X=b[L])==null?void 0:X.id)!=null?q:"",Et=it?z.filter(At=>yt.isSameSourceID(At.sourceID,Lt)):z;(Z=u==null?void 0:u.history)==null||Z.initRecord(z,!0),u==null||u.setResult(Et)}return i(n({},t),{imgIndex:T,basicIndex:L,basicResultList:b,resultList:z})}case l.UPDATE_ANNOTATION_CONFIG:return i(n({},t),{config:(Q=e.payload.config)!=null?Q:"{}"});case l.SET_TASK_STEP_LIST:{const{stepList:o}=e.payload;return i(n({},t),{stepList:o})}case l.SET_TASK_CONFIG:{const{stepList:o,step:s}=e.payload;return i(n({},t),{stepList:o,step:s})}case l.INIT_TOOL:{const{imgNode:o}=t,s=Bt(t,o);if(s){const{toolInstance:u,annotationEngine:a}=s;return i(n({},t),{toolInstance:u,annotationEngine:a})}return n({},t)}case l.SET_TOOL:{const o=(tt=e.payload)==null?void 0:tt.instance;return o?i(n({},t),{toolInstance:o}):n({},t)}case l.UPDATE_ON_SUBMIT:return i(n({},t),{onSubmit:e.payload.onSubmit});case l.UPDATE_ON_SAVE:return i(n({},t),{onSave:e.payload.onSave});case l.UPDATE_ON_PAGE_CHANGE:return i(n({},t),{onPageChange:e.payload.onPageChange});case l.SET_PREDICT_RESULT:return i(n({},t),{predictionResult:e.payload.result});case l.SET_PREDICT_RESULT_VISIBLE:return i(n({},t),{predictionResultVisible:e.payload.visible});case l.UPDATE_ON_STEP_CHANGE:return i(n({},t),{onStepChange:e.payload.onStepChange});case l.UPDATE_GET_FILE_DATA:return i(n({},t),{getFileData:e.payload.getFileData});case l.UPDATE_PAGE_SIZE:return i(n({},t),{pageSize:e.payload.pageSize});case l.UPDATE_LOAD_FILE_LIST:return i(n({},t),{loadFileList:e.payload.loadFileList});case l.UPDATE_BEFORE_ROTATE:return i(n({},t),{beforeRotate:e.payload.beforeRotate});case l.UPDATE_PRE_DATA_PROCESS:return i(n({},t),{preDataProcess:e.payload.preDataProcess});case l.SKIP_BEFORE_PAGE_TURNING:return i(n({},t),{skipBeforePageTurning:e.payload.skipBeforePageTurning});case l.SET_FILE_DATA:{const{fileData:o,index:s}=e.payload,{imgList:u}=t,a=[...u];return a[s]=n(n({},a[s]),o),i(n({},t),{imgList:a})}case l.UPDATE_ROTATE:{const{toolInstance:o,beforeRotate:s}=t;return s&&s()===!1||(et=o==null?void 0:o.updateRotate)==null||et.call(o),t}case l.UPDATE_ANNOTATION_VALID:{const{toolInstance:o}=t,s=(ot=o==null?void 0:o.valid)!=null?ot:!0;return ct.destroyAll(),ct.confirm({content:F.t(s?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{o==null||o.setValid(!s)},okText:F.t("Confirm"),cancelText:F.t("Cancel")}),t}case l.COPY_BACKWARD_RESULT:{const{toolInstance:o,imgIndex:s,imgList:u,step:a}=t;if(!o)return t;if(s===0||s>=u.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),t;const p=u[s-1].result;if(!p)return t;const c=W.copyResultChange(p,a,(nt=u[s].result)!=null?nt:"");u[s]=i(n({},u[s]),{result:c});const g=U(c)[`step_${a}`],_=(g==null?void 0:g.result)||[];return o==null||o.setResult(_),o==null||o.history.pushHistory(_),(st=o==null?void 0:o.asyncData)==null||st.call(o,u[s]),i(n({},t),{imgList:[...u]})}case l.SET_STEP:{const{stepList:o,annotationEngine:s}=t,{toStep:u}=e.payload;if(!s)return t;const a=B(o,u);return s==null||s.setToolName(a.tool,a.config),i(n({},t),{step:u,toolInstance:s==null?void 0:s.toolInstance})}case l.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:o}=e.payload;return i(n({},t),{loadPCDFileLoading:!!o})}case l.SET_LOADING:{const{loading:o}=e.payload;return i(n({},t),{loading:!!o})}case l.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:o}=e.payload;return i(n({},t),{pointCloudLoading:!!o})}case l.SET_CHECK_MODE:{const{checkMode:o}=e.payload;return i(n({},t),{checkMode:!!o})}case l.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:o}=e.payload;return i(n({},t),{highlightAttribute:o})}case l.BATCH_UPDATE_TRACK_ID:{const{id:o,newID:s,rangeIndex:u,imgList:a}=e.payload,{imgIndex:p,onSubmit:c}=t,T=[],g=a.map((_,I)=>{if(ut.isInRange(I,u)){const L=i(n({},_),{result:at.batchUpdateTrackID({id:o,newID:s,result:_.result})});return T.push({imgIndex:I,newInfo:L}),L}return _});return c&&c([g[p]],K.BatchUpdateTrackID,p,g,{updateImgList:T}),i(n({},t),{imgList:g})}case l.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:o,newData:s,rangeIndex:u}=e.payload,{imgList:a,imgIndex:p,onSubmit:c}=t,T=[],g=a.map((_,I)=>{if(ut.isInRange(I,u)){const L=i(n({},_),{result:at.batchUpdateResultByTrackID({id:o,newData:s,result:_.result})});return T.push({imgIndex:I,newInfo:L}),L}return _});return c&&c([g[p]],K.BatchUpdateTrackID,p,g,{updateImgList:T}),i(n({},t),{imgList:g})}case l.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:o,imgList:s,stepList:u,step:a,predictionResult:p}=t,c={};p.forEach(I=>{const{index:L}=I;c[L]=pt.pick(I,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const T=`step_${a}`,g=[],_=s.map((I,L)=>{if(c[L]){const D=I.result==="{}"?U(Y("",{step:a,stepList:u},{rect:[]},{})):U(I.result);D[T].result.push(c[L]);const R=i(n({},I),{result:JSON.stringify(D)});return g.push({imgIndex:L,newInfo:R}),R}return I});return o==null||o(_,K.BatchUpdateImgList,-1,_,{updateImgList:g}),i(n({},t),{imgList:_})}default:return t}};export{wt as LoadFileAndFileData,Mt as annotationReducer,Vt as composeResultByToolInstance,B as getStepConfig,Nt as getTotalPage};
package/es/store/ctx.js CHANGED
@@ -1 +1 @@
1
- import e from"react";import{createDispatchHook as o,createSelectorHook as s}from"react-redux";const t=e.createContext(void 0),r=o(t),c=s(t),n=e.createContext({hoverKey:-1,newAnswerList:[],setHoverKey:()=>{},modelAPIResponse:[],setModelAPIResponse:()=>{},setNewAnswerList:()=>{}}),a=e.createContext({highlightKey:"",setHighlightKey:()=>{}});export{n as LLMContext,t as LabelBeeContext,a as NLPContext,r as useDispatch,c as useSelector};
1
+ import t from"react";import{createDispatchHook as o,createSelectorHook as s}from"react-redux";const e=t.createContext(void 0),r=o(e),c=s(e),n=t.createContext({hoverKey:-1,newAnswerList:[],setHoverKey:()=>{},modelAPIResponse:[],setModelAPIResponse:()=>{},setNewAnswerList:()=>{}});export{n as LLMContext,e as LabelBeeContext,r as useDispatch,c as useSelector};
package/es/utils/audio.js CHANGED
@@ -1 +1 @@
1
- import"antd";import{cStyle as b}from"@labelbee/lb-annotation";import"lodash";import s from"decimal.js";import c from"moment";const{COLORS_ARRAY:a,ICON_ARRAY:F,INVALID_ICON:k,NULL_COLOR:d,NULL_ICON:D,WHITE_FONT_COLOR_ARRAY:h}=b,p={label:"\u6587\u672C",key:"text",required:!1,default:"",maxLength:1e3},C=(t,e)=>{var r,n;try{const o=i(t,e);return(n=(r=e[o])==null?void 0:r.key)!=null?n:t}catch(o){return t}},i=(t,e)=>{try{return e.findIndex(n=>n.value===t)}catch(r){return-1}},m=(t,e)=>{try{const r=i(t,e);return r===-1?d:a[r%a.length]}catch(r){return d}},I=(t,e)=>{try{const r=m(t,e);return h.includes(r)?"#fff":"#333"}catch(r){return"#333"}},g=(t,e)=>{var r;try{const n=((r=t.match(/\((.*)\)/))==null?void 0:r[1].split(","))||[];return n.splice(3,1,e.toString()),`rgba(${n.join(",")})`}catch(n){return t}},v=(t,e)=>new s(Number(t)||0).minus(Number(e)||0).toNumber(),A=(t,e)=>new s(t).add(e).toNumber(),_=t=>{let e=null;return n=>e?n.target===(e==null?void 0:e.target):(e=n,setTimeout(()=>{e=null},t),!1)},N=_(300),O=t=>{const e=Math.floor(t*1e3),r=c.duration(e);return`${Math.floor(r.asMinutes())}:${c.utc(e).format("ss")}`},x=(t,e="ss.S")=>{const r=Math.floor(t*1e3),n=c.duration(r);return`${y(Math.floor(n.asMinutes()))}:${c.utc(r).format(e)}`},y=t=>t<10?`0${t}`:t,E=(t,e)=>{let r=null,n=null;const o=t.length;if(o===0)return{min:r,max:n};let u=0;return e<t[u]?n=t[u]:(t.forEach((l,f)=>{e>l&&(r=l,u=f)}),r&&u<o-1&&(n=t[u+1])),{min:r,max:n}},R=()=>{const t=document.createEvent("Event");t.initEvent("resize",!0,!0),window.dispatchEvent(t)};function L(t){try{const e=JSON.parse(t);return typeof e.valid=="boolean"?e.valid:!0}catch(e){return!0}}export{p as DEFAULT_TEXT_CONFIG_ITEM,R as dispatchResizeEvent,O as formatTime,m as getAttributeColor,I as getAttributeFontColor,i as getAttributeIndex,C as getAttributeShowText,E as getCanMoveRange,N as isDoubleClick,L as isImageValue,A as precisionAdd,v as precisionMinus,x as timeFormat,g as updateColorOpacity};
1
+ import"antd";import{cStyle as b}from"@labelbee/lb-annotation";import"lodash";import s from"decimal.js";import c from"moment";const{COLORS_ARRAY:a,ICON_ARRAY:F,INVALID_ICON:k,NULL_COLOR:d,NULL_ICON:D,WHITE_FONT_COLOR_ARRAY:h}=b,p={label:"\u6587\u672C",key:"text",required:!1,default:"",maxLength:1e3},C=(t,e)=>{var r,n;try{const o=i(t,e);return(n=(r=e[o])==null?void 0:r.key)!=null?n:t}catch(o){return t}},i=(t,e)=>{try{return e.findIndex(n=>n.value===t)}catch(r){return-1}},m=(t,e)=>{try{const r=i(t,e);return r===-1?d:a[r%a.length]}catch(r){return d}},I=(t,e)=>{try{const r=m(t,e);return h.includes(r)?"#fff":"#333"}catch(r){return"#333"}},g=(t,e)=>{var r;try{const n=((r=t.match(/\((.*)\)/))==null?void 0:r[1].split(","))||[];return n.splice(3,1,e.toString()),`rgba(${n.join(",")})`}catch(n){return t}},v=(t,e)=>new s(Number(t)||0).minus(Number(e)||0).toNumber(),A=(t,e)=>new s(t).add(e).toNumber(),_=t=>{let e=null;return n=>e?n.target===(e==null?void 0:e.target):(e=n,setTimeout(()=>{e=null},t),!1)},N=_(500),O=t=>{const e=Math.floor(t*1e3),r=c.duration(e);return`${Math.floor(r.asMinutes())}:${c.utc(e).format("ss")}`},x=(t,e="ss.S")=>{const r=Math.floor(t*1e3),n=c.duration(r);return`${y(Math.floor(n.asMinutes()))}:${c.utc(r).format(e)}`},y=t=>t<10?`0${t}`:t,E=(t,e)=>{let r=null,n=null;const o=t.length;if(o===0)return{min:r,max:n};let u=0;return e<t[u]?n=t[u]:(t.forEach((l,f)=>{e>l&&(r=l,u=f)}),r&&u<o-1&&(n=t[u+1])),{min:r,max:n}},R=()=>{const t=document.createEvent("Event");t.initEvent("resize",!0,!0),window.dispatchEvent(t)};function L(t){try{const e=JSON.parse(t);return typeof e.valid=="boolean"?e.valid:!0}catch(e){return!0}}export{p as DEFAULT_TEXT_CONFIG_ITEM,R as dispatchResizeEvent,O as formatTime,m as getAttributeColor,I as getAttributeFontColor,i as getAttributeIndex,C as getAttributeShowText,E as getCanMoveRange,N as isDoubleClick,L as isImageValue,A as precisionAdd,v as precisionMinus,x as timeFormat,g as updateColorOpacity};
@@ -1 +1 @@
1
- import{prefix as a}from"../../../constant/index.js";import{Layout as m}from"antd/es";import t,{useState as o,useMemo as f}from"react";import v from"../sidebar/index.js";import y from"../toolFooter/index.js";import{getClassName as M}from"../../../utils/dom.js";import{classnames as w}from"../../../utils/index.js";import{LLMContext as x}from"../../../store/ctx.js";import h from"../../../components/LLMToolView/index.js";const{Sider:j,Content:E}=m,c=`${a}-layout`,_=e=>{var l,n;const[s,d]=o(-1),[i,u]=o([]),[r,L]=o([]);return t.createElement(m,{className:M("layout","container")},t.createElement(x.Provider,{value:f(()=>({hoverKey:s,setHoverKey:d,modelAPIResponse:i,setModelAPIResponse:u,newAnswerList:r,setNewAnswerList:L}),[s,i,r])},e==null?void 0:e.leftSider,t.createElement(E,{className:w({[`${c}__content`]:!0,[`${a}-LLMLayout`]:!0})},t.createElement(h,{checkMode:e.checkMode,showTips:e.showTips,tips:e.tips}),t.createElement(y,{style:(l=e.style)==null?void 0:l.footer,mode:e.mode,footer:e==null?void 0:e.footer})),t.createElement(j,{className:`${c}__side`,width:600,style:{position:"relative"}},t.createElement(v,{sider:e==null?void 0:e.sider,checkMode:e==null?void 0:e.checkMode}),(n=e.drawLayerSlot)==null?void 0:n.call(e,{}))))};export{_ as default};
1
+ import{prefix as a}from"../../../constant/index.js";import{Layout as m}from"antd/es";import t,{useState as o,useMemo as L}from"react";import v from"../sidebar/index.js";import y from"../toolFooter/index.js";import{getClassName as M}from"../../../utils/dom.js";import{classnames as w}from"../../../utils/index.js";import{LLMContext as x}from"../../../store/ctx.js";import h from"../../../components/LLMToolView/index.js";const{Sider:_,Content:j}=m,c=`${a}-layout`,E=e=>{var l,n;const[s,d]=o(-1),[i,u]=o([]),[r,f]=o([]);return t.createElement(m,{className:M("layout","container")},t.createElement(x.Provider,{value:L(()=>({hoverKey:s,setHoverKey:d,modelAPIResponse:i,setModelAPIResponse:u,newAnswerList:r,setNewAnswerList:f}),[s,i,r])},e==null?void 0:e.leftSider,t.createElement(j,{className:w({[`${c}__content`]:!0,[`${a}-LLMLayout`]:!0})},t.createElement(h,{checkMode:e.checkMode,showTips:e.showTips,tips:e.tips}),t.createElement(y,{style:(l=e.style)==null?void 0:l.footer,mode:e.mode,footer:e==null?void 0:e.footer})),t.createElement(_,{className:`${c}__side`,width:600,style:{position:"relative"}},t.createElement(v,{sider:e==null?void 0:e.sider,checkMode:e==null?void 0:e.checkMode}),(n=e.drawLayerSlot)==null?void 0:n.call(e,{}))))};export{E as default};
@@ -1 +1 @@
1
- import{store as L}from"../../../index.js";import{LabelBeeContext as N}from"../../../store/ctx.js";import{message as y}from"antd/es";import D from"lodash";import f,{useState as _,useRef as O,useEffect as a}from"react";import{connect as M}from"react-redux";import U from"../../../components/fileException/FileError.js";import Z from"../../../hooks/useSize.js";import{InitToolStyleConfig as k}from"../../../store/toolStyle/actionCreators.js";import{ImgUtils as B}from"@labelbee/lb-annotation";import{i18n as P}from"@labelbee/lb-utils";import F from"../../../utils/StepUtils.js";var T=Object.defineProperty,V=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,$=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,j=(n,o,r)=>o in n?T(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r,A=(n,o)=>{for(var r in o||(o={}))$.call(o,r)&&j(n,r,o[r]);if(E)for(var r of E(o))q.call(o,r)&&j(n,r,o[r]);return n},G=(n,o)=>V(n,Y(o));const H=n=>{const[,o]=_(0),{imgAttribute:r,toolStyle:l,toolInstance:e,annotationEngine:t,imgList:d,imgIndex:h,dataInjectionAtCreation:p,renderEnhance:g,customRenderStyle:u,stepList:v,step:w,drawLayerSlot:S}=n,[x,b]=_({zoom:1,currentPos:{x:0,y:0}}),I=O(null),C=O(null),c=Z(I);a(()=>{L.dispatch(k())},[]),a(()=>{if(!!t){switch(P.language){case"cn":case"en":t.setLang(P.language);break}t==null||t.setDataInjectionAtCreation(p),t==null||t.setRenderEnhance(g),u&&(t==null||t.setCustomRenderStyle(u))}},[t,p,g,u]),a(()=>{const i=(s,z)=>{b({zoom:s,currentPos:z})},m=s=>{b(s)};return e&&(e.singleOn("messageError",s=>{y.error(s)}),e.singleOn("messageInfo",s=>{y.info(s)}),e.singleOn("changeAnnotationShow",()=>{o(s=>s+1)}),e.on("renderZoom",i),e.on("dragMove",m)),()=>{e&&(e.unbind("renderZoom",i),e.unbind("dragMove",m))}},[e]),a(()=>{var i;(t==null?void 0:t.setImgAttribute)?t.setImgAttribute(r):(i=e==null?void 0:e.setImgAttribute)==null||i.call(e,r)},[r,t]),a(()=>{e&&e.setStyle(l),t&&t.setStyle(l)},[l]),a(()=>{(e==null?void 0:e.setSize)&&e.setSize(c),t&&t.setSize(c)},[c]),a(()=>{const i=F.getCurrentStepInfo(w,v);e==null||e.setConfig(i.config)},[v]);const R=()=>{const i=d==null?void 0:d[h];!(i==null?void 0:i.url)||B.load(i.url).then(m=>{t.setImgNode(m)})};return f.createElement("div",{ref:I,className:"annotationOperation"},f.createElement("div",{className:"canvas",ref:C,style:c,id:"toolContainer"},S==null?void 0:S(x)),(e==null?void 0:e.isImgError)===!0&&f.createElement(U,G(A({},c),{reloadImage:R,backgroundColor:"#e2e2e2",ignoreOffsetY:!0})))},J=n=>{const o=D.pickBy(n.annotation,(r,l)=>["imgList","imgIndex","stepList","step","toolInstance","annotationEngine","loading"].includes(l));return A({imgAttribute:n.imgAttribute,toolStyle:n.toolStyle},o)};var K=M(J,null,null,{context:N})(H);export{K as default};
1
+ import{store as L}from"../../../index.js";import{LabelBeeContext as N}from"../../../store/ctx.js";import{message as I}from"antd/es";import D from"lodash";import f,{useState as y,useRef as O,useEffect as a}from"react";import{connect as M}from"react-redux";import U from"../../../components/fileException/FileError.js";import Z from"../../../hooks/useSize.js";import{InitToolStyleConfig as k}from"../../../store/toolStyle/actionCreators.js";import{ImgUtils as B}from"@labelbee/lb-annotation";import{i18n as P}from"@labelbee/lb-utils";import F from"../../../utils/StepUtils.js";var T=Object.defineProperty,V=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,$=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,j=(n,o,r)=>o in n?T(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r,A=(n,o)=>{for(var r in o||(o={}))$.call(o,r)&&j(n,r,o[r]);if(E)for(var r of E(o))q.call(o,r)&&j(n,r,o[r]);return n},G=(n,o)=>V(n,Y(o));const H=n=>{const[,o]=y(0),{imgAttribute:r,toolStyle:l,toolInstance:e,annotationEngine:t,imgList:d,imgIndex:h,dataInjectionAtCreation:p,renderEnhance:g,customRenderStyle:u,stepList:v,step:w,drawLayerSlot:S}=n,[x,_]=y({zoom:1,currentPos:{x:0,y:0}}),b=O(null),C=O(null),c=Z(b);a(()=>{L.dispatch(k())},[]),a(()=>{if(!!t){switch(P.language){case"cn":case"en":t.setLang(P.language);break}t==null||t.setDataInjectionAtCreation(p),t==null||t.setRenderEnhance(g),u&&(t==null||t.setCustomRenderStyle(u))}},[t,p,g,u]),a(()=>{const i=(s,z)=>{_({zoom:s,currentPos:z})},m=s=>{_(s)};return e&&(e.singleOn("messageError",s=>{I.error(s)}),e.singleOn("messageInfo",s=>{I.info(s)}),e.singleOn("changeAnnotationShow",()=>{o(s=>s+1)}),e.on("renderZoom",i),e.on("dragMove",m)),()=>{e&&(e.unbind("renderZoom",i),e.unbind("dragMove",m))}},[e]),a(()=>{var i;(t==null?void 0:t.setImgAttribute)?t.setImgAttribute(r):(i=e==null?void 0:e.setImgAttribute)==null||i.call(e,r)},[r,t]),a(()=>{e&&e.setStyle(l),t&&t.setStyle(l)},[l]),a(()=>{(e==null?void 0:e.setSize)&&e.setSize(c),t&&t.setSize(c)},[c]),a(()=>{const i=F.getCurrentStepInfo(w,v);e==null||e.setConfig(i.config)},[v]);const R=()=>{const i=d==null?void 0:d[h];!(i==null?void 0:i.url)||B.load(i.url).then(m=>{t.setImgNode(m)})};return f.createElement("div",{ref:b,className:"annotationOperation"},f.createElement("div",{className:"canvas",ref:C,style:c,id:"toolContainer"},S==null?void 0:S(x)),(e==null?void 0:e.isImgError)===!0&&f.createElement(U,G(A({},c),{reloadImage:R,backgroundColor:"#e2e2e2",ignoreOffsetY:!0})))},J=n=>{const o=D.pickBy(n.annotation,(r,l)=>["imgList","imgIndex","stepList","step","toolInstance","annotationEngine","loading"].includes(l));return A({imgAttribute:n.imgAttribute,toolStyle:n.toolStyle},o)};var K=M(J,null,null,{context:N})(H);export{K as default};
@@ -1 +1 @@
1
- import t from"react";import{Tooltip as l}from"antd";import{prefix as a}from"../../../constant/index.js";const m=({path:n,tips:e})=>!n&&!e?null:t.createElement("div",{className:`${a}-tips`},t.createElement(l,{placement:"bottomRight",title:e},t.createElement("span",{className:`${a}-tips__leftContent`,title:e},e)),t.createElement(l,{placement:"bottomRight",title:n},t.createElement("span",{className:`${a}-tips__path`},n)));export{m as default};
1
+ import t from"react";import{Tooltip as l}from"antd";import{prefix as n}from"../../../constant/index.js";const m=({path:a,tips:e})=>!a&&!e?null:t.createElement("div",{className:`${n}-tips`},t.createElement(l,{placement:"bottomRight",title:e},t.createElement("span",{className:`${n}-tips__leftContent`,title:e},e)),t.createElement(l,{placement:"bottomRight",title:a},t.createElement("span",{className:`${n}-tips__path`},a)));export{m as default};
@@ -1 +1 @@
1
- import{ViewportProvider as b}from"../../components/customResizeHook/index.js";import{prefix as C}from"../../constant/index.js";import{Spin as A}from"antd";import{Layout as E}from"antd/es";import t,{useState as O}from"react";import V from"./annotationOperation/index.js";import M from"./annotationTips/index.js";import k from"./sidebar/index.js";import h from"./toolFooter/index.js";import F from"./toolHeader/index.js";import{getStepConfig as _}from"../../store/annotation/reducer.js";import I from"../../components/videoAnnotate/index.js";import{connect as $}from"react-redux";import g from"../../utils/ToolUtils.js";import H from"../../components/pointCloudView/index.js";import{getClassName as R}from"../../utils/dom.js";import{classnames as W}from"../../utils/index.js";import B from"../../components/predictTracking/previewResult/index.js";import{LabelBeeContext as D}from"../../store/ctx.js";import{EToolName as c}from"../../data/enums/ToolType.js";import U from"./LLMLayout/index.js";import z from"./NLPLayout/index.js";import q from"../../components/audioAnnotate/index.js";import{LoadingOutlined as G}from"@ant-design/icons";import{useTranslation as J}from"react-i18next";import{EPointCloudName as K}from"@labelbee/lb-annotation";var Q=Object.defineProperty,T=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,P=(e,o,n)=>o in e?Q(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,i=(e,o)=>{for(var n in o||(o={}))X.call(o,n)&&P(e,n,o[n]);if(T)for(var n of T(o))Y.call(o,n)&&P(e,n,o[n]);return e};const{Sider:Z,Content:p}=E,u=`${C}-layout`,ee=e=>{var o;return t.createElement(t.Fragment,null,e.showTips===!0&&t.createElement(M,{path:e.path,tips:e.tips}),t.createElement(V,i({},e)),t.createElement(h,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},te=e=>{var o;return t.createElement(t.Fragment,null,t.createElement(H,{drawLayerSlot:e.drawLayerSlot,checkMode:e.checkMode,intelligentFit:e.intelligentFit,measureVisible:e.measureVisible}),t.createElement(h,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},oe=e=>{var o;const{stepList:n,step:r}=e,a=(o=_(n,r))==null?void 0:o.tool,m=g.isPointCloudTool(a),l=g.isVideoTool(a);return m?t.createElement(te,i({},e)):l?t.createElement(I,{drawLayerSlot:e.drawLayerSlot,footer:e.footer}):t.createElement(ee,i({},e))},f=e=>{var o,n,r;const{t:a}=J(),{stepList:m,step:l}=e,d=(o=_(m,l))==null?void 0:o.tool,s=![c.LLM,c.NLP].includes(d),v=![c.LLM,c.NLP].includes(d),L=[K.PointCloud].includes(d);return t.createElement(b,null,t.createElement(A,{spinning:e.loading,indicator:t.createElement(G,null),tip:t.createElement("span",{style:{marginTop:200}},a("LoadingTips")),delay:500},t.createElement(E,{className:W([u,e.className]),style:(n=e.style)==null?void 0:n.layout},t.createElement("header",{className:`${u}__header`,style:(r=e.style)==null?void 0:r.header},t.createElement(F,{header:e==null?void 0:e.header,headerName:e.headerName,goBack:e.goBack,exportData:e.exportData,hasLangNode:s,hasHeaderOption:v,hasPredictTrackingIcon:L})),e.children)))},ne=e=>{var o,n,r,a,m,l,d;const[s,v]=O(void 0),L=(n=(o=e.style)==null?void 0:o.sider)==null?void 0:n.width,{stepList:x,step:N}=e,y=(r=_(x,N))==null?void 0:r.tool,j=c.LLM===y,w=c.NLP===y,S=g.isAudioTool(y);return j?t.createElement(f,i({},e),t.createElement(U,i({},e))):w?t.createElement(f,i({},e),t.createElement(z,i({},e))):S?t.createElement(f,i({},e),t.createElement(q,i({},e))):t.createElement(f,i({},e),t.createElement(E,{className:R("layout","container")},e==null?void 0:e.leftSider,t.createElement(p,{className:`${u}__content`},t.createElement(oe,i({},e)),t.createElement(B,null)),t.createElement(Z,{className:`${u}__side`,width:(a=s!=null?s:L)!=null?a:240,style:(m=e.style)==null?void 0:m.sider},t.createElement(k,{sider:e==null?void 0:e.sider,enableColorPicker:e==null?void 0:e.enableColorPicker,setSiderWidth:v,propsSiderWidth:(d=(l=e.style)==null?void 0:l.sider)==null?void 0:d.width}))))},le=({annotation:e})=>{var o,n,r;const{imgList:a,loading:m}=e,l=(o=a[e.imgIndex])!=null?o:{};return{path:(r=(n=l==null?void 0:l.path)!=null?n:l==null?void 0:l.url)!=null?r:"",loading:m}};var ie=$(le,null,null,{context:D})(ne);export{ie as default};
1
+ import{ViewportProvider as S}from"../../components/customResizeHook/index.js";import{prefix as b}from"../../constant/index.js";import{Spin as C}from"antd";import{Layout as v}from"antd/es";import t,{useState as A}from"react";import O from"./annotationOperation/index.js";import V from"./annotationTips/index.js";import M from"./sidebar/index.js";import h from"./toolFooter/index.js";import k from"./toolHeader/index.js";import{getStepConfig as _}from"../../store/annotation/reducer.js";import F from"../../components/videoAnnotate/index.js";import{connect as I}from"react-redux";import y from"../../utils/ToolUtils.js";import $ from"../../components/pointCloudView/index.js";import{getClassName as H}from"../../utils/dom.js";import{classnames as R}from"../../utils/index.js";import W from"../../components/predictTracking/previewResult/index.js";import{LabelBeeContext as B}from"../../store/ctx.js";import{EToolName as E}from"../../data/enums/ToolType.js";import D from"./LLMLayout/index.js";import U from"../../components/audioAnnotate/index.js";import{LoadingOutlined as z}from"@ant-design/icons";import{useTranslation as q}from"react-i18next";import{EPointCloudName as G}from"@labelbee/lb-annotation";var J=Object.defineProperty,T=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,x=(e,o,n)=>o in e?J(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,a=(e,o)=>{for(var n in o||(o={}))K.call(o,n)&&x(e,n,o[n]);if(T)for(var n of T(o))Q.call(o,n)&&x(e,n,o[n]);return e};const{Sider:X,Content:Y}=v,c=`${b}-layout`,Z=e=>{var o;return t.createElement(t.Fragment,null,e.showTips===!0&&t.createElement(V,{path:e.path,tips:e.tips}),t.createElement(O,a({},e)),t.createElement(h,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},p=e=>{var o;return t.createElement(t.Fragment,null,t.createElement($,{drawLayerSlot:e.drawLayerSlot,checkMode:e.checkMode,intelligentFit:e.intelligentFit,measureVisible:e.measureVisible}),t.createElement(h,{style:(o=e.style)==null?void 0:o.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},ee=e=>{var o;const{stepList:n,step:i}=e,r=(o=_(n,i))==null?void 0:o.tool,d=y.isPointCloudTool(r),l=y.isVideoTool(r);return d?t.createElement(p,a({},e)):l?t.createElement(F,{drawLayerSlot:e.drawLayerSlot,footer:e.footer}):t.createElement(Z,a({},e))},L=e=>{var o,n,i;const{t:r}=q(),{stepList:d,step:l}=e,m=(o=_(d,l))==null?void 0:o.tool,s=![E.LLM].includes(m),u=![E.LLM].includes(m),f=[G.PointCloud].includes(m);return t.createElement(S,null,t.createElement(C,{spinning:e.loading,indicator:t.createElement(z,null),tip:t.createElement("span",{style:{marginTop:200}},r("LoadingTips")),delay:500},t.createElement(v,{className:R([c,e.className]),style:(n=e.style)==null?void 0:n.layout},t.createElement("header",{className:`${c}__header`,style:(i=e.style)==null?void 0:i.header},t.createElement(k,{header:e==null?void 0:e.header,headerName:e.headerName,goBack:e.goBack,exportData:e.exportData,hasLangNode:s,hasHeaderOption:u,hasPredictTrackingIcon:f})),e.children)))},te=e=>{var o,n,i,r,d,l,m;const[s,u]=A(void 0),f=(n=(o=e.style)==null?void 0:o.sider)==null?void 0:n.width,{stepList:w,step:j}=e,g=(i=_(w,j))==null?void 0:i.tool,P=E.LLM===g,N=y.isAudioTool(g);return P?t.createElement(L,a({},e),t.createElement(D,a({},e))):N?t.createElement(L,a({},e),t.createElement(U,a({},e))):t.createElement(L,a({},e),t.createElement(v,{className:H("layout","container")},e==null?void 0:e.leftSider,t.createElement(Y,{className:`${c}__content`},t.createElement(ee,a({},e)),t.createElement(W,null)),t.createElement(X,{className:`${c}__side`,width:(r=s!=null?s:f)!=null?r:240,style:(d=e.style)==null?void 0:d.sider},t.createElement(M,{sider:e==null?void 0:e.sider,enableColorPicker:e==null?void 0:e.enableColorPicker,setSiderWidth:u,propsSiderWidth:(m=(l=e.style)==null?void 0:l.sider)==null?void 0:m.width}))))},oe=({annotation:e})=>{var o,n,i;const{imgList:r,loading:d}=e,l=(o=r[e.imgIndex])!=null?o:{};return{path:(i=(n=l==null?void 0:l.path)!=null?n:l==null?void 0:l.url)!=null?i:"",loading:d}};var ne=I(oe,null,null,{context:B})(te);export{ne as default};
@@ -1 +1 @@
1
- import o,{useState as a,useEffect as u}from"react";import{message as m}from"antd/es";import x from"../TextAreaFormat/index.js";import{TextUtils as l}from"../../../../utils/TextUtils.js";import{connect as c}from"react-redux";import{LabelBeeContext as s}from"../../../../store/ctx.js";const f=({toolInstance:e})=>{var i;const[,n]=a(0);if(u(()=>{e&&(e.singleOn("selectedChange",()=>{n(r=>r+1)}),e.singleOn("updateTextAttribute",()=>{n(r=>r+1)}),e.singleOn("messageError",r=>{m.error(r)}))},[e]),!e)return null;const{config:t}=e;return((i=e==null?void 0:e.config)==null?void 0:i.textConfigurable)&&e.selectedID&&o.createElement(x,{onChange:e.textChange,textValue:e.selectedText,checkString:l.checkString(t==null?void 0:t.textCheckType,t==null?void 0:t.customFormat),textCheckType:t.textCheckType})};function d(e){return{toolInstance:e.annotation.toolInstance}}var g=c(d,null,null,{context:s})(f);export{g as default};
1
+ import i,{useState as a,useEffect as l}from"react";import{message as u}from"antd/es";import c from"../TextAreaFormat/index.js";import{TextUtils as m}from"../../../../utils/TextUtils.js";import{connect as s}from"react-redux";import{LabelBeeContext as x}from"../../../../store/ctx.js";const f=({toolInstance:e})=>{const[,n]=a(0);if(l(()=>{e&&(e.singleOn("selectedChange",()=>{n(r=>r+1)}),e.singleOn("updateTextAttribute",()=>{n(r=>r+1)}),e.singleOn("messageError",r=>{u.error(r)}))},[e]),!e)return null;const{config:t,selectedID:o}=e;return(t==null?void 0:t.textConfigurable)&&o?i.createElement(c,{onChange:e.textChange,textValue:e.selectedText,checkString:m.checkString(t==null?void 0:t.textCheckType,t==null?void 0:t.customFormat),textCheckType:t.textCheckType}):null};function d(e){return{toolInstance:e.annotation.toolInstance}}var p=s(d,null,null,{context:x})(f);export{p as default};