@funhub/platform 0.2.14 → 0.2.16

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 (894) hide show
  1. package/dist/_virtual/_rolldown/runtime.mjs +18 -1
  2. package/dist/assets/icons/channel-list/channel-active-indicator.mjs +31 -1
  3. package/dist/assets/icons/clear.mjs +17 -1
  4. package/dist/assets/icons/close-icon.mjs +18 -1
  5. package/dist/assets/icons/close.mjs +14 -1
  6. package/dist/assets/icons/common/collect_nor.mjs +21 -1
  7. package/dist/assets/icons/common/collect_sel.mjs +21 -1
  8. package/dist/assets/icons/common/follow_sel.mjs +17 -1
  9. package/dist/assets/icons/common/follow_user.mjs +17 -1
  10. package/dist/assets/icons/common/full_screen.mjs +17 -1
  11. package/dist/assets/icons/common/god_comment.mjs +17 -1
  12. package/dist/assets/icons/common/header-menu.mjs +29 -1
  13. package/dist/assets/icons/common/header-search-icon.mjs +17 -1
  14. package/dist/assets/icons/common/heart-like.mjs +31 -1
  15. package/dist/assets/icons/common/heart-unlike.mjs +18 -1
  16. package/dist/assets/icons/common/qq.mjs +32 -1
  17. package/dist/assets/icons/common/right_arrow.mjs +14 -1
  18. package/dist/assets/icons/common/right_arrow_thin.mjs +17 -1
  19. package/dist/assets/icons/common/share.mjs +17 -1
  20. package/dist/assets/icons/common/solid-arrow.mjs +17 -1
  21. package/dist/assets/icons/common/video_play.mjs +18 -1
  22. package/dist/assets/icons/common/wechat-friends.mjs +40 -1
  23. package/dist/assets/icons/common/wechat.mjs +39 -1
  24. package/dist/assets/icons/detail/check-ok.mjs +17 -1
  25. package/dist/assets/icons/detail/comment.mjs +19 -1
  26. package/dist/assets/icons/detail/commet_at.mjs +53 -1
  27. package/dist/assets/icons/detail/give_like.mjs +20 -1
  28. package/dist/assets/icons/detail/give_like_sel.mjs +27 -1
  29. package/dist/assets/icons/detail/min-collection.mjs +38 -1
  30. package/dist/assets/icons/detail/publish_pic.mjs +27 -1
  31. package/dist/assets/icons/detail/publish_video.mjs +30 -1
  32. package/dist/assets/icons/detail/un_like.mjs +20 -1
  33. package/dist/assets/icons/detail/un_like_sel.mjs +27 -1
  34. package/dist/assets/icons/detail/video_flag.mjs +17 -1
  35. package/dist/assets/icons/detail/video_play.mjs +18 -1
  36. package/dist/assets/icons/dislike.mjs +20 -1
  37. package/dist/assets/icons/dislike_sel.mjs +27 -1
  38. package/dist/assets/icons/empty/img-empty-adduser.mjs +463 -1
  39. package/dist/assets/icons/empty/img-empty-nodata.mjs +194 -1
  40. package/dist/assets/icons/eye-icon.mjs +21 -1
  41. package/dist/assets/icons/eye-off-icon.mjs +24 -1
  42. package/dist/assets/icons/filter_dark.mjs +17 -1
  43. package/dist/assets/icons/follow_nor.mjs +44 -1
  44. package/dist/assets/icons/follow_sel.mjs +31 -1
  45. package/dist/assets/icons/left-arrow-icon.mjs +18 -1
  46. package/dist/assets/icons/left_arrow.mjs +14 -1
  47. package/dist/assets/icons/like.mjs +20 -1
  48. package/dist/assets/icons/like_sel.mjs +27 -1
  49. package/dist/assets/icons/marquee-close.mjs +29 -1
  50. package/dist/assets/icons/marquee-speaker.mjs +22 -1
  51. package/dist/assets/icons/publish/publish_add.mjs +17 -1
  52. package/dist/assets/icons/publish/publish_at.mjs +53 -1
  53. package/dist/assets/icons/publish/publish_collection.mjs +28 -1
  54. package/dist/assets/icons/publish/publish_pic.mjs +27 -1
  55. package/dist/assets/icons/publish/publish_video.mjs +30 -1
  56. package/dist/assets/icons/refresh.mjs +18 -1
  57. package/dist/assets/icons/search/filter.mjs +17 -1
  58. package/dist/assets/icons/search.mjs +23 -1
  59. package/dist/assets/icons/share/share-link.mjs +39 -1
  60. package/dist/assets/icons/tabs/follow.mjs +20 -1
  61. package/dist/assets/icons/tabs/follow_active.mjs +17 -1
  62. package/dist/assets/icons/tabs/home.mjs +17 -1
  63. package/dist/assets/icons/tabs/home_active.mjs +17 -1
  64. package/dist/assets/icons/tabs/mine.mjs +26 -1
  65. package/dist/assets/icons/tabs/mine_active.mjs +17 -1
  66. package/dist/assets/icons/view.mjs +17 -1
  67. package/dist/assets/images/add.mjs +5 -1
  68. package/dist/assets/images/default_avatar.mjs +5 -1
  69. package/dist/assets/images/default_collection_cover.mjs +5 -1
  70. package/dist/assets/images/empty/img_empty_adduser.mjs +463 -1
  71. package/dist/assets/images/empty/img_empty_message.mjs +408 -1
  72. package/dist/assets/images/empty/img_empty_network.mjs +168 -1
  73. package/dist/assets/images/empty/img_empty_nodata.mjs +194 -1
  74. package/dist/assets/images/empty/img_empty_picture.mjs +59 -1
  75. package/dist/assets/images/empty/img_empty_search.mjs +250 -1
  76. package/dist/assets/images/frame.mjs +5 -1
  77. package/dist/assets/images/less.mjs +5 -1
  78. package/dist/assets/images/logo.mjs +5 -1
  79. package/dist/assets/images/shortcut-grid/shortcut-grid-card-bg-primary.mjs +29 -1
  80. package/dist/assets/images/subscript.mjs +5 -1
  81. package/dist/assets/images/user/default_avatar.mjs +5 -1
  82. package/dist/biz.mjs +173 -1
  83. package/dist/cli/init/create-client.mjs +12 -1
  84. package/dist/cli/init/create-sdk.mjs +12 -1
  85. package/dist/cli/init/shared/command.mjs +31 -1
  86. package/dist/cli/init/shared/constants.mjs +24 -1
  87. package/dist/cli/init/shared/create-project.mjs +58 -2
  88. package/dist/cli/init/shared/file.mjs +21 -1
  89. package/dist/cli/init/shared/package-manager.mjs +42 -1
  90. package/dist/cli/init/shared/prompts.mjs +107 -1
  91. package/dist/cli/init/shared/template.mjs +59 -1
  92. package/dist/cli.mjs +128 -2
  93. package/dist/common.mjs +50 -1
  94. package/dist/components/biz/basics/card-item/defaults/default-props.mjs +10 -1
  95. package/dist/components/biz/basics/card-item/runtime/client.mjs +83 -1
  96. package/dist/components/biz/basics/card-item/runtime/corners.mjs +33 -1
  97. package/dist/components/biz/basics/card-item/schema/component.mjs +14 -1
  98. package/dist/components/biz/basics/card-item/schema/data.schema.mjs +8 -1
  99. package/dist/components/biz/basics/card-item/schema/event.schema.mjs +8 -1
  100. package/dist/components/biz/basics/card-item/schema/index.mjs +17 -1
  101. package/dist/components/biz/basics/card-item/schema/props.schema.mjs +18 -1
  102. package/dist/components/biz/basics/card-item/schema/style.schema.mjs +7 -1
  103. package/dist/components/biz/basics/card-layout/defaults/default-props.mjs +13 -1
  104. package/dist/components/biz/basics/card-layout/runtime/client.mjs +38 -1
  105. package/dist/components/biz/basics/card-layout/schema/component.mjs +14 -1
  106. package/dist/components/biz/basics/card-layout/schema/data.schema.mjs +8 -1
  107. package/dist/components/biz/basics/card-layout/schema/event.schema.mjs +5 -1
  108. package/dist/components/biz/basics/card-layout/schema/index.mjs +17 -1
  109. package/dist/components/biz/basics/card-layout/schema/props.schema.mjs +28 -1
  110. package/dist/components/biz/basics/card-layout/schema/style.schema.mjs +7 -1
  111. package/dist/components/biz/basics/fullscreen-feed/basic-fullscreen.mjs +268 -1
  112. package/dist/components/biz/basics/fullscreen-feed/defaults/default-props.mjs +11 -1
  113. package/dist/components/biz/basics/fullscreen-feed/index.mjs +12 -1
  114. package/dist/components/biz/basics/fullscreen-feed/runtime/adapters.mjs +97 -1
  115. package/dist/components/biz/basics/fullscreen-feed/runtime/bottom-info.mjs +125 -1
  116. package/dist/components/biz/basics/fullscreen-feed/runtime/client.mjs +390 -1
  117. package/dist/components/biz/basics/fullscreen-feed/runtime/comment-modal.mjs +107 -1
  118. package/dist/components/biz/basics/fullscreen-feed/runtime/interaction-sync.mjs +134 -1
  119. package/dist/components/biz/basics/fullscreen-feed/runtime/post-slide.mjs +232 -1
  120. package/dist/components/biz/basics/fullscreen-feed/runtime/styles.module.mjs +25 -152
  121. package/dist/components/biz/basics/fullscreen-feed/runtime/use-mixed-feed-controller.mjs +193 -1
  122. package/dist/components/biz/basics/fullscreen-feed/runtime/use-series-feed-controller.mjs +212 -1
  123. package/dist/components/biz/basics/fullscreen-feed/runtime/user-action.mjs +273 -1
  124. package/dist/components/biz/basics/fullscreen-feed/runtime/video-slide.mjs +373 -1
  125. package/dist/components/biz/basics/fullscreen-feed/schema/component.mjs +14 -1
  126. package/dist/components/biz/basics/fullscreen-feed/schema/data.schema.mjs +11 -1
  127. package/dist/components/biz/basics/fullscreen-feed/schema/event.schema.mjs +13 -1
  128. package/dist/components/biz/basics/fullscreen-feed/schema/index.mjs +17 -1
  129. package/dist/components/biz/basics/fullscreen-feed/schema/props.schema.mjs +20 -1
  130. package/dist/components/biz/basics/fullscreen-feed/schema/style.schema.mjs +5 -1
  131. package/dist/components/biz/basics/logo/variants/basic-logo/defaults/default-props.mjs +19 -1
  132. package/dist/components/biz/basics/logo/variants/basic-logo/index.mjs +9 -1
  133. package/dist/components/biz/basics/logo/variants/basic-logo/runtime/client.mjs +171 -1
  134. package/dist/components/biz/basics/logo/variants/basic-logo/schema/component.mjs +14 -1
  135. package/dist/components/biz/basics/logo/variants/basic-logo/schema/data.schema.mjs +9 -1
  136. package/dist/components/biz/basics/logo/variants/basic-logo/schema/event.schema.mjs +23 -1
  137. package/dist/components/biz/basics/logo/variants/basic-logo/schema/index.mjs +17 -1
  138. package/dist/components/biz/basics/logo/variants/basic-logo/schema/props.schema.mjs +78 -1
  139. package/dist/components/biz/basics/logo/variants/basic-logo/schema/style.schema.mjs +7 -1
  140. package/dist/components/biz/basics/search/shared/components/search-box.mjs +56 -1
  141. package/dist/components/biz/basics/search/shared/config/default-data.mjs +15 -1
  142. package/dist/components/biz/basics/search/shared/config/schema.mjs +50 -1
  143. package/dist/components/biz/basics/search/variants/basic-search/defaults/default-props.mjs +10 -1
  144. package/dist/components/biz/basics/search/variants/basic-search/index.mjs +12 -1
  145. package/dist/components/biz/basics/search/variants/basic-search/runtime/client.mjs +33 -1
  146. package/dist/components/biz/basics/search/variants/basic-search/schema/component.mjs +14 -1
  147. package/dist/components/biz/basics/search/variants/basic-search/schema/data.schema.mjs +8 -1
  148. package/dist/components/biz/basics/search/variants/basic-search/schema/event.schema.mjs +7 -1
  149. package/dist/components/biz/basics/search/variants/basic-search/schema/index.mjs +17 -1
  150. package/dist/components/biz/basics/search/variants/basic-search/schema/props.schema.mjs +7 -1
  151. package/dist/components/biz/basics/search/variants/basic-search/schema/style.schema.mjs +7 -1
  152. package/dist/components/biz/basics/search/variants/filter-search/defaults/default-props.mjs +14 -1
  153. package/dist/components/biz/basics/search/variants/filter-search/index.mjs +12 -1
  154. package/dist/components/biz/basics/search/variants/filter-search/runtime/client.mjs +63 -1
  155. package/dist/components/biz/basics/search/variants/filter-search/schema/component.mjs +14 -1
  156. package/dist/components/biz/basics/search/variants/filter-search/schema/data.schema.mjs +8 -1
  157. package/dist/components/biz/basics/search/variants/filter-search/schema/event.schema.mjs +7 -1
  158. package/dist/components/biz/basics/search/variants/filter-search/schema/index.mjs +17 -1
  159. package/dist/components/biz/basics/search/variants/filter-search/schema/props.schema.mjs +22 -1
  160. package/dist/components/biz/basics/search/variants/filter-search/schema/style.schema.mjs +7 -1
  161. package/dist/components/biz/basics/search/variants/simple-search/defaults/default-props.mjs +10 -1
  162. package/dist/components/biz/basics/search/variants/simple-search/index.mjs +9 -1
  163. package/dist/components/biz/basics/search/variants/simple-search/runtime/client.mjs +37 -1
  164. package/dist/components/biz/basics/search/variants/simple-search/schema/component.mjs +14 -1
  165. package/dist/components/biz/basics/search/variants/simple-search/schema/data.schema.mjs +8 -1
  166. package/dist/components/biz/basics/search/variants/simple-search/schema/event.schema.mjs +7 -1
  167. package/dist/components/biz/basics/search/variants/simple-search/schema/index.mjs +17 -1
  168. package/dist/components/biz/basics/search/variants/simple-search/schema/props.schema.mjs +7 -1
  169. package/dist/components/biz/basics/search/variants/simple-search/schema/style.schema.mjs +7 -1
  170. package/dist/components/biz/basics/search/variants/tag-search/defaults/default-props.mjs +18 -1
  171. package/dist/components/biz/basics/search/variants/tag-search/index.mjs +9 -1
  172. package/dist/components/biz/basics/search/variants/tag-search/runtime/client.mjs +67 -1
  173. package/dist/components/biz/basics/search/variants/tag-search/schema/component.mjs +14 -1
  174. package/dist/components/biz/basics/search/variants/tag-search/schema/data.schema.mjs +8 -1
  175. package/dist/components/biz/basics/search/variants/tag-search/schema/event.schema.mjs +7 -1
  176. package/dist/components/biz/basics/search/variants/tag-search/schema/index.mjs +17 -1
  177. package/dist/components/biz/basics/search/variants/tag-search/schema/props.schema.mjs +37 -1
  178. package/dist/components/biz/basics/search/variants/tag-search/schema/style.schema.mjs +7 -1
  179. package/dist/components/biz/business/advertisement/ad-match.mjs +139 -1
  180. package/dist/components/biz/business/advertisement/ad-provider.mjs +50 -1
  181. package/dist/components/biz/business/advertisement/ad-query.mjs +39 -1
  182. package/dist/components/biz/business/advertisement/ad-runtime-provider.mjs +21 -1
  183. package/dist/components/biz/business/advertisement/banner-ad/client.mjs +274 -1
  184. package/dist/components/biz/business/advertisement/banner-ad/material.mjs +21 -1
  185. package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +55 -1
  186. package/dist/components/biz/business/advertisement/banner-ad/server.mjs +24 -1
  187. package/dist/components/biz/business/advertisement/feed-ad/index.mjs +36 -1
  188. package/dist/components/biz/business/advertisement/floating-ad/client.mjs +109 -1
  189. package/dist/components/biz/business/advertisement/floating-ad/material.mjs +21 -1
  190. package/dist/components/biz/business/advertisement/floating-ad/schema.mjs +11 -1
  191. package/dist/components/biz/business/advertisement/floating-ad/server.mjs +24 -1
  192. package/dist/components/biz/business/advertisement/icon-ad/client.mjs +187 -1
  193. package/dist/components/biz/business/advertisement/icon-ad/material.mjs +21 -1
  194. package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +42 -1
  195. package/dist/components/biz/business/advertisement/icon-ad/server.mjs +24 -1
  196. package/dist/components/biz/business/advertisement/popup-ad/client.mjs +161 -2
  197. package/dist/components/biz/business/advertisement/popup-ad/material.mjs +21 -1
  198. package/dist/components/biz/business/advertisement/popup-ad/schema.mjs +36 -1
  199. package/dist/components/biz/business/advertisement/popup-ad/server.mjs +24 -1
  200. package/dist/components/biz/business/advertisement/text-ad/client.mjs +370 -1
  201. package/dist/components/biz/business/advertisement/text-ad/material.mjs +21 -1
  202. package/dist/components/biz/business/advertisement/text-ad/schema.mjs +34 -1
  203. package/dist/components/biz/business/advertisement/text-ad/server.mjs +24 -1
  204. package/dist/components/biz/business/banner/variants/basic-banner/defaults/default-props.mjs +15 -1
  205. package/dist/components/biz/business/banner/variants/basic-banner/index.mjs +12 -1
  206. package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +62 -1
  207. package/dist/components/biz/business/banner/variants/basic-banner/material.mjs +21 -1
  208. package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +140 -1
  209. package/dist/components/biz/business/banner/variants/basic-banner/schema/component.mjs +14 -1
  210. package/dist/components/biz/business/banner/variants/basic-banner/schema/data.schema.mjs +53 -1
  211. package/dist/components/biz/business/banner/variants/basic-banner/schema/event.schema.mjs +5 -1
  212. package/dist/components/biz/business/banner/variants/basic-banner/schema/index.mjs +17 -1
  213. package/dist/components/biz/business/banner/variants/basic-banner/schema/props.schema.mjs +40 -1
  214. package/dist/components/biz/business/banner/variants/basic-banner/schema/style.schema.mjs +7 -1
  215. package/dist/components/biz/business/banner/variants/basic-banner/server.mjs +25 -1
  216. package/dist/components/biz/business/banner-carousel/client.mjs +133 -1
  217. package/dist/components/biz/business/banner-carousel/default-props.mjs +15 -1
  218. package/dist/components/biz/business/banner-carousel/material.mjs +22 -1
  219. package/dist/components/biz/business/banner-carousel/schema.mjs +94 -1
  220. package/dist/components/biz/business/banner-carousel/server.mjs +87 -1
  221. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/defaults/default-props.mjs +8 -1
  222. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/index.mjs +9 -1
  223. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/runtime/client.mjs +41 -1
  224. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/component.mjs +14 -1
  225. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/data.schema.mjs +8 -1
  226. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/event.schema.mjs +5 -1
  227. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/index.mjs +17 -1
  228. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/props.schema.mjs +12 -1
  229. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/style.schema.mjs +7 -1
  230. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs +8 -1
  231. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/index.mjs +9 -1
  232. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/runtime/client.mjs +106 -1
  233. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/component.mjs +14 -1
  234. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/data.schema.mjs +8 -1
  235. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/event.schema.mjs +5 -1
  236. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/index.mjs +17 -1
  237. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/props.schema.mjs +12 -1
  238. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/style.schema.mjs +7 -1
  239. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/defaults/default-props.mjs +8 -1
  240. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/index.mjs +9 -1
  241. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/runtime/client.mjs +41 -1
  242. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/component.mjs +14 -1
  243. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/data.schema.mjs +8 -1
  244. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/event.schema.mjs +5 -1
  245. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/index.mjs +17 -1
  246. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/props.schema.mjs +12 -1
  247. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/style.schema.mjs +7 -1
  248. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/defaults/default-props.mjs +8 -1
  249. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/index.mjs +9 -1
  250. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/runtime/client.mjs +41 -1
  251. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/component.mjs +14 -1
  252. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/data.schema.mjs +8 -1
  253. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/event.schema.mjs +5 -1
  254. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/index.mjs +17 -1
  255. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/props.schema.mjs +12 -1
  256. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/style.schema.mjs +7 -1
  257. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs +8 -1
  258. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/index.mjs +9 -1
  259. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/runtime/client.mjs +106 -1
  260. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/component.mjs +14 -1
  261. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/data.schema.mjs +8 -1
  262. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/event.schema.mjs +5 -1
  263. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/index.mjs +17 -1
  264. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/props.schema.mjs +12 -1
  265. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/style.schema.mjs +7 -1
  266. package/dist/components/biz/business/channel-list/channel-filter-dialog.mjs +190 -1
  267. package/dist/components/biz/business/channel-list/client.mjs +148 -1
  268. package/dist/components/biz/business/channel-list/default-props.mjs +13 -1
  269. package/dist/components/biz/business/channel-list/material.mjs +21 -1
  270. package/dist/components/biz/business/channel-list/schema.mjs +40 -1
  271. package/dist/components/biz/business/comment/comment-input.mjs +772 -5
  272. package/dist/components/biz/business/comment/comment-item.mjs +190 -1
  273. package/dist/components/biz/business/comment/comment-list.mjs +722 -1
  274. package/dist/components/biz/business/comment/comment-media.mjs +57 -1
  275. package/dist/components/biz/business/comment/comment-rich-text.mjs +69 -1
  276. package/dist/components/biz/business/comment/reply-detail.mjs +978 -1
  277. package/dist/components/biz/business/comment/time-display.mjs +20 -1
  278. package/dist/components/biz/business/comment/use-keyboard-handler.mjs +142 -1
  279. package/dist/components/biz/business/contact/contact-item.mjs +45 -1
  280. package/dist/components/biz/business/contact/contact-list.mjs +212 -1
  281. package/dist/components/biz/business/contact/contact-search.mjs +128 -1
  282. package/dist/components/biz/business/detail/shared/detail-follow-action.mjs +114 -1
  283. package/dist/components/biz/business/detail/shared/detail-info-tags.mjs +33 -1
  284. package/dist/components/biz/business/detail/shared/detail-info-title.mjs +84 -1
  285. package/dist/components/biz/business/detail/shared/detail-operate.mjs +411 -1
  286. package/dist/components/biz/business/detail/shared/detail-structured-data.mjs +63 -1
  287. package/dist/components/biz/business/detail/shared/editor-preview.mjs +68 -1
  288. package/dist/components/biz/business/detail/shared/material-route-context.mjs +44 -1
  289. package/dist/components/biz/business/detail/shared/metadata-utils.mjs +21 -1
  290. package/dist/components/biz/business/detail/shared/post-recommend-list.mjs +184 -1
  291. package/dist/components/biz/business/detail/shared/registry.mjs +55 -1
  292. package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +225 -1
  293. package/dist/components/biz/business/detail/shared/seo-config.mjs +28 -1
  294. package/dist/components/biz/business/detail/shared/use-video-detail-webview-bridge.mjs +320 -1
  295. package/dist/components/biz/business/detail/shared/video-detail-server-data.mjs +46 -1
  296. package/dist/components/biz/business/detail/shared/video-hero.mjs +896 -1
  297. package/dist/components/biz/business/detail/video-detail-actions/client.mjs +108 -1
  298. package/dist/components/biz/business/detail/video-detail-actions/material.mjs +18 -1
  299. package/dist/components/biz/business/detail/video-detail-actions/schema.mjs +11 -1
  300. package/dist/components/biz/business/detail/video-detail-actions/server.mjs +47 -1
  301. package/dist/components/biz/business/detail/video-detail-info/client.mjs +201 -1
  302. package/dist/components/biz/business/detail/video-detail-info/material.mjs +18 -1
  303. package/dist/components/biz/business/detail/video-detail-info/schema.mjs +14 -1
  304. package/dist/components/biz/business/detail/video-detail-info/server.mjs +45 -1
  305. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/client.mjs +51 -1
  306. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/material.mjs +18 -1
  307. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.mjs +14 -1
  308. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/server.mjs +45 -1
  309. package/dist/components/biz/business/detail/video-detail-player/client.mjs +136 -1
  310. package/dist/components/biz/business/detail/video-detail-player/material.mjs +18 -1
  311. package/dist/components/biz/business/detail/video-detail-player/schema.mjs +11 -1
  312. package/dist/components/biz/business/detail/video-detail-player/server.mjs +17 -1
  313. package/dist/components/biz/business/detail/video-detail-player-bridge-only/client.mjs +17 -1
  314. package/dist/components/biz/business/detail/video-detail-player-bridge-only/material.mjs +18 -1
  315. package/dist/components/biz/business/detail/video-detail-player-bridge-only/schema.mjs +13 -1
  316. package/dist/components/biz/business/detail/video-detail-player-bridge-only/server.mjs +17 -1
  317. package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +86 -1
  318. package/dist/components/biz/business/detail/video-detail-recommend/material.mjs +18 -1
  319. package/dist/components/biz/business/detail/video-detail-recommend/schema.mjs +35 -1
  320. package/dist/components/biz/business/detail/video-detail-recommend/server.mjs +18 -1
  321. package/dist/components/biz/business/detail/video-detail-recommend/shared.mjs +555 -1
  322. package/dist/components/biz/business/detail/video-detail-recommend/utils.mjs +75 -1
  323. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/defaults/default-props.mjs +12 -1
  324. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/index.mjs +9 -1
  325. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/runtime/client.mjs +66 -1
  326. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/component.mjs +14 -1
  327. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/data.schema.mjs +43 -1
  328. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/event.schema.mjs +5 -1
  329. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/index.mjs +17 -1
  330. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/props.schema.mjs +32 -1
  331. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/style.schema.mjs +7 -1
  332. package/dist/components/biz/business/floating-ball/client.mjs +31 -1
  333. package/dist/components/biz/business/floating-ball/material.mjs +18 -1
  334. package/dist/components/biz/business/floating-ball/schema.mjs +20 -1
  335. package/dist/components/biz/business/floating-ball/server.mjs +17 -1
  336. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs +11 -1
  337. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/index.mjs +9 -1
  338. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/runtime/client.mjs +71 -1
  339. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/component.mjs +14 -1
  340. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/data.schema.mjs +11 -1
  341. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs +17 -1
  342. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs +11 -1
  343. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/index.mjs +9 -1
  344. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/runtime/client.mjs +64 -1
  345. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/component.mjs +14 -1
  346. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/data.schema.mjs +11 -1
  347. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs +17 -1
  348. package/dist/components/biz/business/fullscreen-feed/variants/shared/runtime-compat.mjs +522 -1
  349. package/dist/components/biz/business/header-search/header-avatar-icon/client.mjs +21 -1
  350. package/dist/components/biz/business/header-search/header-avatar-icon/material.mjs +18 -1
  351. package/dist/components/biz/business/header-search/header-avatar-icon/schema.mjs +11 -1
  352. package/dist/components/biz/business/header-search/header-avatar-icon/server.mjs +17 -1
  353. package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +130 -1
  354. package/dist/components/biz/business/header-search/header-avatar-logo-search/material.mjs +18 -1
  355. package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +23 -1
  356. package/dist/components/biz/business/header-search/header-avatar-logo-search/server.mjs +17 -1
  357. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs +38 -1
  358. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.mjs +18 -1
  359. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.mjs +20 -1
  360. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/server.mjs +17 -1
  361. package/dist/components/biz/business/header-search/header-logo-search/client.mjs +32 -1
  362. package/dist/components/biz/business/header-search/header-logo-search/material.mjs +18 -1
  363. package/dist/components/biz/business/header-search/header-logo-search/schema.mjs +22 -1
  364. package/dist/components/biz/business/header-search/header-logo-search/server.mjs +17 -1
  365. package/dist/components/biz/business/header-search/header-search/client.mjs +19 -1
  366. package/dist/components/biz/business/header-search/header-search/material.mjs +18 -1
  367. package/dist/components/biz/business/header-search/header-search/schema.mjs +11 -1
  368. package/dist/components/biz/business/header-search/header-search/server.mjs +17 -1
  369. package/dist/components/biz/business/header-search/shared/avatar.mjs +53 -1
  370. package/dist/components/biz/business/header-search/shared/header-action.mjs +29 -1
  371. package/dist/components/biz/business/header-search/shared/header-search-icon.mjs +26 -1
  372. package/dist/components/biz/business/header-search/shared/header-shell.mjs +21 -1
  373. package/dist/components/biz/business/header-search/shared/logo.mjs +25 -1
  374. package/dist/components/biz/business/header-search/shared/search.mjs +47 -1
  375. package/dist/components/biz/business/home-recommend/home-recommend-grid/client.mjs +48 -1
  376. package/dist/components/biz/business/home-recommend/home-recommend-grid/index.mjs +14 -1
  377. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +229 -1
  378. package/dist/components/biz/business/home-recommend/home-recommend-grid/material.mjs +18 -1
  379. package/dist/components/biz/business/home-recommend/home-recommend-grid/schema.mjs +24 -1
  380. package/dist/components/biz/business/home-recommend/home-recommend-grid/server.mjs +48 -1
  381. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/client.mjs +44 -1
  382. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/index.mjs +14 -1
  383. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +211 -1
  384. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.mjs +18 -1
  385. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/schema.mjs +24 -1
  386. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/server.mjs +42 -1
  387. package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +897 -1
  388. package/dist/components/biz/business/home-recommend/shared/home-recommend-default-config.mjs +24 -1
  389. package/dist/components/biz/business/home-recommend/shared/home-recommend-play-count.mjs +30 -1
  390. package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +178 -1
  391. package/dist/components/biz/business/home-recommend/shared/home-recommend-runtime-props.mjs +47 -1
  392. package/dist/components/biz/business/home-recommend/shared/home-recommend-server-data.mjs +336 -1
  393. package/dist/components/biz/business/home-recommend/shared/home-recommend-smart-layout.mjs +73 -1
  394. package/dist/components/biz/business/home-recommend/shared/home-recommend-smart-tag.mjs +21 -1
  395. package/dist/components/biz/business/home-recommend/shared/home-recommend-video-detail.mjs +73 -1
  396. package/dist/components/biz/business/hot-recommend/client.mjs +242 -1
  397. package/dist/components/biz/business/hot-recommend/material.mjs +18 -1
  398. package/dist/components/biz/business/hot-recommend/schema.mjs +25 -1
  399. package/dist/components/biz/business/hot-recommend/server.mjs +17 -1
  400. package/dist/components/biz/business/image-text-recommend/client.mjs +443 -1
  401. package/dist/components/biz/business/image-text-recommend/material.mjs +21 -1
  402. package/dist/components/biz/business/image-text-recommend/schema.mjs +79 -1
  403. package/dist/components/biz/business/image-text-recommend/server.mjs +53 -1
  404. package/dist/components/biz/business/image-text-recommend/shared/query.mjs +33 -1
  405. package/dist/components/biz/business/large-feature-grid/card-item.mjs +94 -1
  406. package/dist/components/biz/business/large-feature-grid/client.mjs +222 -1
  407. package/dist/components/biz/business/large-feature-grid/material.mjs +21 -1
  408. package/dist/components/biz/business/large-feature-grid/schema.mjs +122 -1
  409. package/dist/components/biz/business/large-feature-grid/server.mjs +16 -1
  410. package/dist/components/biz/business/marquee/client.mjs +276 -1
  411. package/dist/components/biz/business/marquee/material.mjs +21 -1
  412. package/dist/components/biz/business/marquee/schema.mjs +86 -1
  413. package/dist/components/biz/business/marquee/server.mjs +17 -1
  414. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/defaults/default-props.mjs +21 -1
  415. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/index.mjs +9 -1
  416. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/channel-filter-dialog.mjs +180 -1
  417. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/client.mjs +154 -1
  418. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/component.mjs +14 -1
  419. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/data.schema.mjs +9 -1
  420. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/event.schema.mjs +27 -1
  421. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/index.mjs +17 -1
  422. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/props.schema.mjs +92 -1
  423. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/style.schema.mjs +7 -1
  424. package/dist/components/biz/business/post-card/variants/basic-post-card/defaults/default-props.mjs +8 -1
  425. package/dist/components/biz/business/post-card/variants/basic-post-card/index.mjs +9 -1
  426. package/dist/components/biz/business/post-card/variants/basic-post-card/runtime/client.mjs +119 -1
  427. package/dist/components/biz/business/post-card/variants/basic-post-card/schema/component.mjs +14 -1
  428. package/dist/components/biz/business/post-card/variants/basic-post-card/schema/data.schema.mjs +8 -1
  429. package/dist/components/biz/business/post-card/variants/basic-post-card/schema/event.schema.mjs +5 -1
  430. package/dist/components/biz/business/post-card/variants/basic-post-card/schema/index.mjs +17 -1
  431. package/dist/components/biz/business/post-card/variants/basic-post-card/schema/props.schema.mjs +5 -1
  432. package/dist/components/biz/business/post-card/variants/basic-post-card/schema/style.schema.mjs +7 -1
  433. package/dist/components/biz/business/profile/profile-header/client.mjs +343 -1
  434. package/dist/components/biz/business/profile/profile-header/material.mjs +59 -1
  435. package/dist/components/biz/business/profile/profile-header/schema.mjs +11 -1
  436. package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +262 -1
  437. package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +182 -1
  438. package/dist/components/biz/business/profile/profile-main/client.mjs +234 -1
  439. package/dist/components/biz/business/profile/profile-main/empty-state.mjs +43 -1
  440. package/dist/components/biz/business/profile/profile-main/material.mjs +18 -1
  441. package/dist/components/biz/business/profile/profile-main/schema.mjs +11 -1
  442. package/dist/components/biz/business/profile/profile-main/server.mjs +13 -1
  443. package/dist/components/biz/business/profile/profile-main/shell.mjs +275 -1
  444. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +747 -1
  445. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs +13 -1
  446. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/video-waterfall.mjs +176 -1
  447. package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +263 -1
  448. package/dist/components/biz/business/profile/profile-main/tabs/history-tab/server.mjs +13 -1
  449. package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +262 -1
  450. package/dist/components/biz/business/profile/profile-main/tabs/like-tab/server.mjs +13 -1
  451. package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.mjs +149 -1
  452. package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/server.mjs +13 -1
  453. package/dist/components/biz/business/profile/profile-main/utils.mjs +266 -1
  454. package/dist/components/biz/business/profile/profile-main/variants.mjs +40 -1
  455. package/dist/components/biz/business/profile/tracking.mjs +19 -1
  456. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/defaults/default-props.mjs +15 -1
  457. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/index.mjs +9 -1
  458. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/runtime/client.mjs +168 -1
  459. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/runtime/recommended-users-skeleton.mjs +119 -1
  460. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/component.mjs +14 -1
  461. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/data.schema.mjs +9 -1
  462. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/event.schema.mjs +17 -1
  463. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/index.mjs +17 -1
  464. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/props.schema.mjs +54 -1
  465. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/style.schema.mjs +7 -1
  466. package/dist/components/biz/business/search-bar/variants/basic-search-bar/defaults/default-props.mjs +15 -1
  467. package/dist/components/biz/business/search-bar/variants/basic-search-bar/index.mjs +9 -1
  468. package/dist/components/biz/business/search-bar/variants/basic-search-bar/runtime/client.mjs +54 -1
  469. package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/component.mjs +14 -1
  470. package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/data.schema.mjs +9 -1
  471. package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/event.schema.mjs +5 -1
  472. package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/index.mjs +17 -1
  473. package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/props.schema.mjs +117 -1
  474. package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/style.schema.mjs +7 -1
  475. package/dist/components/biz/business/search-bar/variants/detail-search-bar/defaults/default-props.mjs +22 -1
  476. package/dist/components/biz/business/search-bar/variants/detail-search-bar/index.mjs +9 -1
  477. package/dist/components/biz/business/search-bar/variants/detail-search-bar/runtime/client.mjs +53 -1
  478. package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/component.mjs +14 -1
  479. package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/data.schema.mjs +9 -1
  480. package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/event.schema.mjs +5 -1
  481. package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/index.mjs +17 -1
  482. package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/props.schema.mjs +117 -1
  483. package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/style.schema.mjs +7 -1
  484. package/dist/components/biz/business/search-bar/variants/filter-search-bar/defaults/default-props.mjs +15 -1
  485. package/dist/components/biz/business/search-bar/variants/filter-search-bar/index.mjs +9 -1
  486. package/dist/components/biz/business/search-bar/variants/filter-search-bar/runtime/client.mjs +52 -1
  487. package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/component.mjs +14 -1
  488. package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/data.schema.mjs +9 -1
  489. package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/event.schema.mjs +25 -1
  490. package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/index.mjs +17 -1
  491. package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/props.schema.mjs +128 -1
  492. package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/style.schema.mjs +7 -1
  493. package/dist/components/biz/business/search-bar/variants/tag-search-bar/defaults/default-props.mjs +15 -1
  494. package/dist/components/biz/business/search-bar/variants/tag-search-bar/index.mjs +12 -1
  495. package/dist/components/biz/business/search-bar/variants/tag-search-bar/runtime/client.mjs +58 -1
  496. package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/component.mjs +14 -1
  497. package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/data.schema.mjs +9 -1
  498. package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/event.schema.mjs +38 -1
  499. package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/index.mjs +17 -1
  500. package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/props.schema.mjs +144 -1
  501. package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/style.schema.mjs +7 -1
  502. package/dist/components/biz/business/search-history/client.mjs +182 -1
  503. package/dist/components/biz/business/search-history/material.mjs +18 -1
  504. package/dist/components/biz/business/search-history/schema.mjs +16 -1
  505. package/dist/components/biz/business/search-history/server.mjs +17 -1
  506. package/dist/components/biz/business/search-input/client.mjs +115 -1
  507. package/dist/components/biz/business/search-input/material.mjs +18 -1
  508. package/dist/components/biz/business/search-input/schema.mjs +11 -1
  509. package/dist/components/biz/business/search-input/server.mjs +17 -1
  510. package/dist/components/biz/business/shortcut-grid/client.mjs +86 -1
  511. package/dist/components/biz/business/shortcut-grid/material.mjs +18 -1
  512. package/dist/components/biz/business/shortcut-grid/schema.mjs +65 -1
  513. package/dist/components/biz/business/shortcut-grid/server.mjs +17 -1
  514. package/dist/components/biz/business/tab-bar/client.mjs +131 -1
  515. package/dist/components/biz/business/tab-bar/material.mjs +21 -1
  516. package/dist/components/biz/business/tab-bar/schema.mjs +11 -1
  517. package/dist/components/biz/business/tab-bar/server.mjs +17 -1
  518. package/dist/components/biz/business/text-recommend/client.mjs +104 -1
  519. package/dist/components/biz/business/text-recommend/material.mjs +18 -1
  520. package/dist/components/biz/business/text-recommend/schema.mjs +25 -1
  521. package/dist/components/biz/business/text-recommend/server.mjs +18 -1
  522. package/dist/components/biz/example/button/client.mjs +43 -1
  523. package/dist/components/biz/example/button/material.mjs +18 -1
  524. package/dist/components/biz/example/button/schema.mjs +44 -1
  525. package/dist/components/biz/example/button/server.mjs +32 -1
  526. package/dist/components/biz/example/button/variants.mjs +22 -1
  527. package/dist/components/biz/renderer/renderer.mjs +73 -1
  528. package/dist/components/biz/utils/constants/card-spec.mjs +48 -1
  529. package/dist/components/biz/utils/helpers/get-channel-list.mjs +14 -1
  530. package/dist/components/biz/utils/helpers/url.mjs +16 -1
  531. package/dist/components/biz/utils/schema/data.mjs +22 -1
  532. package/dist/components/biz/utils/styles/helpers.mjs +84 -1
  533. package/dist/components/biz/utils/styles/schema.mjs +306 -1
  534. package/dist/components/biz/utils/transformers/card-grid.mjs +71 -1
  535. package/dist/components/biz/utils/transformers/data.mjs +171 -1
  536. package/dist/components/common/analytics-init/analytics-init.mjs +75 -1
  537. package/dist/components/common/analytics-init/sensor-init.mjs +126 -1
  538. package/dist/components/common/at-element/index.mjs +47 -1
  539. package/dist/components/common/background-preview-modal/background-preview-modal.mjs +73 -1
  540. package/dist/components/common/blocked-dialog/blocked-dialog.mjs +54 -1
  541. package/dist/components/common/cards/mini-three-card.mjs +55 -1
  542. package/dist/components/common/cards/style.module.mjs +12 -24
  543. package/dist/components/common/collection-popup/create-collection-sheet.mjs +271 -1
  544. package/dist/components/common/collection-popup/index.mjs +293 -1
  545. package/dist/components/common/debug-locale-switcher/index.mjs +59 -1
  546. package/dist/components/common/delete-confirm-dialog/delete-confirm-dialog.mjs +66 -1
  547. package/dist/components/common/empty/index.mjs +51 -1
  548. package/dist/components/common/follow-button/index.mjs +133 -1
  549. package/dist/components/common/follow-button/unfollow-confirm-dialog.mjs +23 -1
  550. package/dist/components/common/funhub-provider/funhub-provider.mjs +50 -1
  551. package/dist/components/common/header-nav/client.mjs +51 -1
  552. package/dist/components/common/icons/add.mjs +21 -1
  553. package/dist/components/common/icons/comment.mjs +30 -1
  554. package/dist/components/common/icons/delete.mjs +32 -1
  555. package/dist/components/common/icons/left-arrow.mjs +15 -1
  556. package/dist/components/common/icons/more.mjs +30 -1
  557. package/dist/components/common/icons/right-arrow.mjs +19 -1
  558. package/dist/components/common/icons/setting.mjs +27 -1
  559. package/dist/components/common/icons/share.mjs +20 -1
  560. package/dist/components/common/icons/video.mjs +22 -1
  561. package/dist/components/common/image-crop-modal/image-crop-modal.mjs +128 -2
  562. package/dist/components/common/info-card/card-header.mjs +71 -1
  563. package/dist/components/common/info-card/card-text.mjs +49 -1
  564. package/dist/components/common/interaction-animations.module.mjs +14 -84
  565. package/dist/components/common/intl-provider/intl-provider.mjs +21 -1
  566. package/dist/components/common/keep-scroll-position/index.mjs +39 -1
  567. package/dist/components/common/list/collection-list/collection-list-item.mjs +139 -1
  568. package/dist/components/common/list/collection-list/collection-list.mjs +27 -1
  569. package/dist/components/common/list/collection-list/collection-select-icon.mjs +53 -1
  570. package/dist/components/common/list/post-list/post-list-item.mjs +54 -1
  571. package/dist/components/common/list/post-list/post-list.mjs +143 -1
  572. package/dist/components/common/list/user-activity-list/user-activity-list-actions.mjs +269 -1
  573. package/dist/components/common/list/user-activity-list/user-activity-list-item.mjs +469 -1
  574. package/dist/components/common/list/user-activity-list/user-activity-list.mjs +143 -1
  575. package/dist/components/common/list/video-list/video-list-item.mjs +104 -1
  576. package/dist/components/common/list/video-list/video-list.mjs +152 -1
  577. package/dist/components/common/list/waterfall-recommend/recommend-badge-style.mjs +18 -1
  578. package/dist/components/common/list/waterfall-recommend/waterfall-recommend-display.mjs +26 -1
  579. package/dist/components/common/list/waterfall-recommend/waterfall-recommend.mjs +183 -1
  580. package/dist/components/common/locale-sync/locale-sync.mjs +62 -1
  581. package/dist/components/common/login-dialog/login-dialog.mjs +46 -1
  582. package/dist/components/common/media-preview/index.mjs +162 -1
  583. package/dist/components/common/media-preview/video-play.mjs +237 -1
  584. package/dist/components/common/page-loading/index.mjs +20 -1
  585. package/dist/components/common/page-skeleton/page-skeleton.mjs +7 -1
  586. package/dist/components/common/photo-grid/common-photo-grid.mjs +321 -1
  587. package/dist/components/common/photo-grid/index.mjs +226 -1
  588. package/dist/components/common/photo-preview/common-photo-preview.mjs +97 -1
  589. package/dist/components/common/photo-preview/decrypt-loading.mjs +66 -2
  590. package/dist/components/common/photo-preview/index.mjs +64 -1
  591. package/dist/components/common/photo-preview/style.mjs +7 -19
  592. package/dist/components/common/picker/gender-picker/gender-picker.mjs +66 -1
  593. package/dist/components/common/picker/picker-drawer/picker-drawer.mjs +78 -1
  594. package/dist/components/common/popup-video/index.mjs +76 -1
  595. package/dist/components/common/popup-video/popup-video.module.mjs +7 -16
  596. package/dist/components/common/series-episodes/index.mjs +826 -1
  597. package/dist/components/common/share-popup/share-content.mjs +155 -1
  598. package/dist/components/common/share-popup/share-drawer.mjs +100 -1
  599. package/dist/components/common/share-popup/share-popup.mjs +326 -1
  600. package/dist/components/common/skeleton/post-list-item-skeleton.mjs +99 -1
  601. package/dist/components/common/skeleton/user-activity-list-item-skeleton.mjs +146 -1
  602. package/dist/components/common/skeleton/video-list-item-skeleton.mjs +110 -1
  603. package/dist/components/common/tab-bar/index.mjs +139 -1
  604. package/dist/components/common/theme-sync/index.mjs +22 -1
  605. package/dist/components/common/top-nav-bar/client.mjs +70 -1
  606. package/dist/components/common/top-nav-bar/fullscreen.mjs +27 -1
  607. package/dist/components/common/top-nav-bar/index.mjs +29 -1
  608. package/dist/components/common/top-nav-bar/normal.mjs +20 -1
  609. package/dist/components/common/user-info-initializer/index.mjs +37 -1
  610. package/dist/components/common/video-player/create-video.mjs +27 -2
  611. package/dist/components/common/video-player/index.mjs +700 -5
  612. package/dist/components/common/video-player/playing-videos.mjs +73 -1
  613. package/dist/components/common/video-player/preroll-skip-button-content.mjs +20 -1
  614. package/dist/components/common/video-player/process-m3u8-cache.mjs +281 -1
  615. package/dist/components/common/video-player/style.module.mjs +7 -256
  616. package/dist/components/common/video-player/video-blind-ad-overlay.mjs +144 -1
  617. package/dist/components/common/video-player/video-player-ref-context.mjs +18 -1
  618. package/dist/components/common/video-player/video-preroll-ad-overlay.mjs +163 -1
  619. package/dist/components/common/video-player/video-preroll-ad.mjs +187 -1
  620. package/dist/components/common/wait-loading.mjs +119 -1
  621. package/dist/components/pages/(follow)/_components/follow-button/index.mjs +80 -1
  622. package/dist/components/pages/(follow)/_components/header-nav/index.mjs +15 -1
  623. package/dist/components/pages/(follow)/_components/interaction-tabs/index.mjs +44 -1
  624. package/dist/components/pages/(follow)/_components/user-list/index.mjs +139 -1
  625. package/dist/components/pages/(follow)/_components/user-list/user-list-item.mjs +46 -1
  626. package/dist/components/pages/(follow)/fans/index.mjs +10 -1
  627. package/dist/components/pages/(follow)/fans/page.mjs +95 -1
  628. package/dist/components/pages/(follow)/followed/index.mjs +10 -1
  629. package/dist/components/pages/(follow)/followed/page.mjs +95 -1
  630. package/dist/components/pages/collection-add/index.mjs +10 -1
  631. package/dist/components/pages/collection-add/page.mjs +166 -1
  632. package/dist/components/pages/collection-create/form.mjs +166 -1
  633. package/dist/components/pages/collection-create/index.mjs +10 -1
  634. package/dist/components/pages/collection-create/page.mjs +28 -1
  635. package/dist/components/pages/collection-detail/_components/collection-detail-card.mjs +183 -1
  636. package/dist/components/pages/collection-detail/_components/collection-detail-video-card.mjs +137 -1
  637. package/dist/components/pages/collection-detail/detail.mjs +521 -1
  638. package/dist/components/pages/collection-detail/index.mjs +10 -1
  639. package/dist/components/pages/collection-detail/page.mjs +18 -1
  640. package/dist/components/pages/edit/index.mjs +10 -1
  641. package/dist/components/pages/edit/page.mjs +687 -1
  642. package/dist/components/pages/feed-series/feed-series-client.mjs +385 -1
  643. package/dist/components/pages/feed-series/page.mjs +97 -1
  644. package/dist/components/pages/feedback/_components/feedback-form.mjs +273 -1
  645. package/dist/components/pages/feedback/index.mjs +10 -1
  646. package/dist/components/pages/feedback/page.mjs +10 -1
  647. package/dist/components/pages/fullscreen-feed/index.mjs +10 -1
  648. package/dist/components/pages/fullscreen-feed/page.mjs +107 -1
  649. package/dist/components/pages/home/channel-matcher.mjs +30 -1
  650. package/dist/components/pages/home/client.mjs +158 -1
  651. package/dist/components/pages/home/index.mjs +59 -1
  652. package/dist/components/pages/login/agreement-dialog.mjs +104 -1
  653. package/dist/components/pages/login/auth-guard.mjs +37 -1
  654. package/dist/components/pages/login/auth-page-styles.mjs +17 -2
  655. package/dist/components/pages/login/forgot.mjs +136 -1
  656. package/dist/components/pages/login/index.mjs +109 -1
  657. package/dist/components/pages/login/login-client.mjs +233 -1
  658. package/dist/components/pages/login/password.mjs +186 -1
  659. package/dist/components/pages/login/register.mjs +204 -1
  660. package/dist/components/pages/login/reset-password.mjs +193 -1
  661. package/dist/components/pages/login/tracking.mjs +32 -1
  662. package/dist/components/pages/login/verify.mjs +243 -1
  663. package/dist/components/pages/post-detail/page.mjs +28 -1
  664. package/dist/components/pages/post-detail/post-detail-client.mjs +518 -1
  665. package/dist/components/pages/profile/index.mjs +10 -1
  666. package/dist/components/pages/profile/page.mjs +28 -1
  667. package/dist/components/pages/publish/components/collection-card.mjs +49 -1
  668. package/dist/components/pages/publish/components/collection-popup.mjs +81 -1
  669. package/dist/components/pages/publish/components/collection.mjs +97 -1
  670. package/dist/components/pages/publish/components/cover-item.mjs +46 -1
  671. package/dist/components/pages/publish/components/editor.mjs +208 -1
  672. package/dist/components/pages/publish/components/header.mjs +31 -1
  673. package/dist/components/pages/publish/components/material-grid.mjs +52 -1
  674. package/dist/components/pages/publish/components/material-item.mjs +68 -1
  675. package/dist/components/pages/publish/components/toolbar.mjs +39 -1
  676. package/dist/components/pages/publish/components/upload-progress.mjs +53 -1
  677. package/dist/components/pages/publish/components/video-item.mjs +36 -1
  678. package/dist/components/pages/publish/constants.mjs +8 -1
  679. package/dist/components/pages/publish/hooks/use-file-upload.mjs +162 -1
  680. package/dist/components/pages/publish/page-client.mjs +347 -1
  681. package/dist/components/pages/publish/page.mjs +11 -1
  682. package/dist/components/pages/publish/utils/file-upload.mjs +155 -1
  683. package/dist/components/pages/publish/utils/publish-utils.mjs +11 -1
  684. package/dist/components/pages/search/hot-recommend.mjs +192 -1
  685. package/dist/components/pages/search/hot-search.mjs +70 -1
  686. package/dist/components/pages/search/index.mjs +17 -1
  687. package/dist/components/pages/search/page-client.mjs +213 -1
  688. package/dist/components/pages/search/search-result/index.mjs +31 -1
  689. package/dist/components/pages/search/search-result/search-all.mjs +167 -1
  690. package/dist/components/pages/search/search-result/search-user.mjs +306 -1
  691. package/dist/components/pages/search/search-result/search-video-info.mjs +134 -1
  692. package/dist/components/pages/search/search-result/shared.mjs +117 -1
  693. package/dist/components/pages/search/style.module.mjs +12 -85
  694. package/dist/components/pages/search/top-header.mjs +131 -1
  695. package/dist/components/pages/search/tracking.mjs +51 -1
  696. package/dist/components/pages/search-result/page-client.mjs +132 -1
  697. package/dist/components/pages/search-result/search-all.mjs +180 -1
  698. package/dist/components/pages/search-result/search-empty.mjs +52 -1
  699. package/dist/components/pages/search-result/search-tab.mjs +95 -1
  700. package/dist/components/pages/search-result/search-user.mjs +315 -1
  701. package/dist/components/pages/search-result/search-video-info.mjs +196 -1
  702. package/dist/components/pages/search-result/shared.mjs +46 -1
  703. package/dist/components/pages/search-result/top-header.mjs +105 -1
  704. package/dist/components/pages/search-result/tracking.mjs +39 -1
  705. package/dist/components/pages/settings/_components/reset-password-drawer.mjs +381 -1
  706. package/dist/components/pages/settings/_components/settings.mjs +194 -1
  707. package/dist/components/pages/settings/index.mjs +10 -1
  708. package/dist/components/pages/settings/page.mjs +13 -1
  709. package/dist/components/pages/user-follow/_components/follow-no-login.mjs +34 -1
  710. package/dist/components/pages/user-follow/_components/follow-top-header.mjs +25 -1
  711. package/dist/components/pages/user-follow/_components/post-tab.mjs +98 -1
  712. package/dist/components/pages/user-follow/index.mjs +10 -1
  713. package/dist/components/pages/user-follow/page.mjs +106 -1
  714. package/dist/components/pages/user-follow/skeleton.mjs +62 -1
  715. package/dist/components/pages/video-detail/page.mjs +47 -1
  716. package/dist/components/pages/video-detail/video-detail-client.mjs +390 -1
  717. package/dist/components/pages/video-list/index.mjs +61 -1
  718. package/dist/components/pages/video-list/types.mjs +16 -1
  719. package/dist/components/pages/video-list/video-list-client.mjs +146 -1
  720. package/dist/components/pages/video-list/video-list-recommend-item.mjs +110 -1
  721. package/dist/components/pages/video-list/video-list-skeleton.mjs +117 -1
  722. package/dist/components/ui/accordion.mjs +62 -1
  723. package/dist/components/ui/alert-dialog.mjs +114 -1
  724. package/dist/components/ui/alert.mjs +50 -1
  725. package/dist/components/ui/aspect-ratio.mjs +17 -1
  726. package/dist/components/ui/avatar.mjs +107 -1
  727. package/dist/components/ui/badge.d.mts +1 -1
  728. package/dist/components/ui/badge.mjs +38 -1
  729. package/dist/components/ui/box.mjs +17 -1
  730. package/dist/components/ui/breadcrumb.mjs +84 -1
  731. package/dist/components/ui/button-group.mjs +49 -1
  732. package/dist/components/ui/button.d.mts +2 -2
  733. package/dist/components/ui/button.mjs +50 -1
  734. package/dist/components/ui/card.mjs +65 -1
  735. package/dist/components/ui/carousel.mjs +142 -1
  736. package/dist/components/ui/checkbox.mjs +25 -1
  737. package/dist/components/ui/collapsible.mjs +31 -1
  738. package/dist/components/ui/combobox.mjs +185 -1
  739. package/dist/components/ui/context-menu.mjs +150 -1
  740. package/dist/components/ui/dialog.mjs +109 -1
  741. package/dist/components/ui/drawer.mjs +91 -1
  742. package/dist/components/ui/dropdown-menu.mjs +154 -1
  743. package/dist/components/ui/empty-icons.mjs +96 -7
  744. package/dist/components/ui/empty.d.mts +1 -1
  745. package/dist/components/ui/empty.mjs +95 -1
  746. package/dist/components/ui/field.mjs +131 -1
  747. package/dist/components/ui/hover-card.mjs +43 -1
  748. package/dist/components/ui/image.mjs +257 -1
  749. package/dist/components/ui/infinite-scroll.mjs +168 -1
  750. package/dist/components/ui/input-group.mjs +90 -1
  751. package/dist/components/ui/input.mjs +19 -1
  752. package/dist/components/ui/item.d.mts +1 -1
  753. package/dist/components/ui/item.mjs +137 -1
  754. package/dist/components/ui/kbd.mjs +24 -1
  755. package/dist/components/ui/label.mjs +18 -1
  756. package/dist/components/ui/legacy/badge.mjs +80 -1
  757. package/dist/components/ui/legacy/button.mjs +55 -1
  758. package/dist/components/ui/legacy/input.mjs +22 -1
  759. package/dist/components/ui/legacy/popover.mjs +69 -1
  760. package/dist/components/ui/link.mjs +52 -1
  761. package/dist/components/ui/list.mjs +221 -5
  762. package/dist/components/ui/loading.mjs +44 -1
  763. package/dist/components/ui/mask.mjs +17 -1
  764. package/dist/components/ui/menubar.mjs +154 -1
  765. package/dist/components/ui/native-select.mjs +43 -1
  766. package/dist/components/ui/pagination.mjs +90 -1
  767. package/dist/components/ui/popover.mjs +73 -1
  768. package/dist/components/ui/popup.mjs +44 -1
  769. package/dist/components/ui/progress.mjs +53 -1
  770. package/dist/components/ui/radio-group.mjs +34 -1
  771. package/dist/components/ui/rate.mjs +69 -1
  772. package/dist/components/ui/scroll-area.mjs +43 -1
  773. package/dist/components/ui/select.mjs +113 -1
  774. package/dist/components/ui/separator.mjs +20 -1
  775. package/dist/components/ui/sheet.mjs +109 -1
  776. package/dist/components/ui/skeleton.mjs +16 -1
  777. package/dist/components/ui/slider.mjs +46 -1
  778. package/dist/components/ui/sonner.mjs +34 -1
  779. package/dist/components/ui/spinner.mjs +18 -1
  780. package/dist/components/ui/switch.mjs +65 -1
  781. package/dist/components/ui/table.mjs +78 -1
  782. package/dist/components/ui/tabs.mjs +54 -1
  783. package/dist/components/ui/text.mjs +20 -1
  784. package/dist/components/ui/textarea.mjs +16 -1
  785. package/dist/components/ui/time.mjs +91 -1
  786. package/dist/components/ui/toggle-group.mjs +59 -1
  787. package/dist/components/ui/toggle.mjs +41 -1
  788. package/dist/components/ui/tooltip.mjs +49 -1
  789. package/dist/components/ui/wheel-picker.mjs +28 -1
  790. package/dist/constants/event-key.mjs +18 -1
  791. package/dist/constants/query-key.mjs +32 -1
  792. package/dist/constants/revalidate.mjs +9 -1
  793. package/dist/constants/site.mjs +11 -1
  794. package/dist/constants/url-prefix.mjs +11 -1
  795. package/dist/hooks/image-text-recommend.mjs +71 -1
  796. package/dist/hooks/query/hydration-boundary.mjs +34 -1
  797. package/dist/hooks/query/use-query.mjs +114 -1
  798. package/dist/hooks/use-auth.mjs +198 -1
  799. package/dist/hooks/use-browse-report.d.mts +13 -0
  800. package/dist/hooks/use-browse-report.mjs +489 -1
  801. package/dist/hooks/use-card-decoration.mjs +96 -1
  802. package/dist/hooks/use-content-operate.mjs +526 -1
  803. package/dist/hooks/use-first-row-height.mjs +105 -1
  804. package/dist/hooks/use-follow.mjs +69 -1
  805. package/dist/hooks/use-fullscreen-gestures.mjs +144 -1
  806. package/dist/hooks/use-interaction-animation.mjs +26 -1
  807. package/dist/hooks/use-is-client.mjs +20 -1
  808. package/dist/hooks/use-keyboard-open.mjs +56 -1
  809. package/dist/hooks/use-like-dislike.mjs +40 -1
  810. package/dist/hooks/use-min-duration-loading.mjs +63 -1
  811. package/dist/hooks/use-search-history.mjs +53 -1
  812. package/dist/hooks/use-sticky.mjs +50 -1
  813. package/dist/hooks.mjs +17 -1
  814. package/dist/i18n/locales/en.mjs +835 -3
  815. package/dist/i18n/locales/zh-CN.mjs +835 -3
  816. package/dist/i18n/messages.mjs +20 -1
  817. package/dist/i18n/translator.mjs +38 -1
  818. package/dist/i18n.mjs +165 -1
  819. package/dist/materials.mjs +75 -1
  820. package/dist/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +17 -1
  821. package/dist/pages.mjs +23 -1
  822. package/dist/seo/build-metadata.mjs +163 -1
  823. package/dist/seo/config/index.mjs +22 -1
  824. package/dist/seo/config/page.mjs +301 -6
  825. package/dist/seo/config/site.mjs +25 -1
  826. package/dist/seo/constants.mjs +31 -1
  827. package/dist/seo/helpers.mjs +120 -1
  828. package/dist/seo/resource-hints.mjs +60 -1
  829. package/dist/seo/robots.mjs +36 -1
  830. package/dist/seo/sitemap.mjs +44 -1
  831. package/dist/seo/structured-data/article.mjs +51 -1
  832. package/dist/seo/structured-data/common.mjs +60 -1
  833. package/dist/seo/structured-data/video.mjs +41 -1
  834. package/dist/seo/viewport.mjs +31 -1
  835. package/dist/seo.mjs +15 -1
  836. package/dist/service/advertisement.mjs +87 -1
  837. package/dist/service/generated/client.mjs +1281 -1
  838. package/dist/service/generated/tanstack.mjs +1179 -1
  839. package/dist/service/register-by-verify-email-code.mjs +17 -1
  840. package/dist/service.mjs +6 -1
  841. package/dist/store/create-store.mjs +25 -1
  842. package/dist/store/modules/app-config-store.mjs +28 -1
  843. package/dist/store/modules/blind-spot-ad-store.mjs +95 -1
  844. package/dist/store/modules/blocked-modal-store.mjs +30 -1
  845. package/dist/store/modules/follow-ids-store.mjs +12 -1
  846. package/dist/store/modules/login-modal-store.mjs +155 -1
  847. package/dist/store/modules/media-preview-store.mjs +54 -1
  848. package/dist/store/modules/publish-store.mjs +31 -1
  849. package/dist/store/modules/use-demo-store.mjs +17 -1
  850. package/dist/store/modules/user-store.mjs +133 -1
  851. package/dist/store/modules/video-player-ref-store.mjs +13 -1
  852. package/dist/store.mjs +12 -1
  853. package/dist/theme-tokens.mjs +82 -1
  854. package/dist/types/safe-at-user.mjs +15 -1
  855. package/dist/types/safe-comment.mjs +30 -1
  856. package/dist/types/safe-grid.mjs +36 -1
  857. package/dist/types/safe-replay.mjs +43 -1
  858. package/dist/types/share.mjs +16 -1
  859. package/dist/ui.mjs +58 -1
  860. package/dist/utils/api-collect.mjs +14 -1
  861. package/dist/utils/browser-fingerprint.mjs +53 -1
  862. package/dist/utils/channel-storage.mjs +57 -1
  863. package/dist/utils/cn.mjs +15 -1
  864. package/dist/utils/common.mjs +296 -1
  865. package/dist/utils/db.mjs +80 -1
  866. package/dist/utils/decrypt-image-client.mjs +325 -1
  867. package/dist/utils/decrypt.worker.mjs +20 -2
  868. package/dist/utils/device-id.mjs +20 -1
  869. package/dist/utils/email-validator.mjs +108 -1
  870. package/dist/utils/event-bus.mjs +33 -1
  871. package/dist/utils/follow-service.mjs +87 -1
  872. package/dist/utils/get-res-url.mjs +94 -1
  873. package/dist/utils/helper.mjs +33 -1
  874. package/dist/utils/http.mjs +204 -1
  875. package/dist/utils/image-compression.mjs +59 -1
  876. package/dist/utils/image-crop.mjs +63 -1
  877. package/dist/utils/loaders.mjs +51 -1
  878. package/dist/utils/login-modal-bridge.mjs +65 -1
  879. package/dist/utils/media.mjs +128 -1
  880. package/dist/utils/password-validator.mjs +86 -1
  881. package/dist/utils/request-user-id.mjs +16 -1
  882. package/dist/utils/s3-uploader.mjs +40 -1
  883. package/dist/utils/schema/inspector.d.mts +2 -2
  884. package/dist/utils/schema/material.mjs +24 -1
  885. package/dist/utils/schema/schema.mjs +207 -1
  886. package/dist/utils/schema/utils.mjs +27 -1
  887. package/dist/utils/share-manager.mjs +183 -1
  888. package/dist/utils/tools.mjs +92 -1
  889. package/dist/utils/tracking.mjs +222 -1
  890. package/dist/utils/uint8.mjs +46 -1
  891. package/dist/utils/upload-file.mjs +429 -1
  892. package/dist/utils/use-compatible-router.mjs +84 -1
  893. package/dist/utils.mjs +27 -1
  894. package/package.json +1 -1
@@ -1,2 +1,979 @@
1
1
 
2
- "use client";import{cn as e}from"../../../../utils/cn.mjs";import{debounceFun as t,getCurrentSecondTime as n,parseTextAtUserIds as r,replaceAtUserElement as i}from"../../../../utils/common.mjs";import{useFollowIdsState as a}from"../../../../store/modules/follow-ids-store.mjs";import{useUserStore as o}from"../../../../store/modules/user-store.mjs";import{gCommunityGetComments as s,pCommunityCreateComment as c,pCommunityDislikeComment as l,pCommunityLikeComment as u,pInteractionFollow as d,pInteractionUnfollow as f}from"../../../../service/generated/client.mjs";import{checkFollowStatus as p}from"../../../../utils/follow-service.mjs";import{useRouter as m}from"../../../../utils/use-compatible-router.mjs";import{Image as h}from"../../../ui/image.mjs";import{Dialog as g,DialogContent as _}from"../../../ui/dialog.mjs";import{InfiniteScroll as v}from"../../../ui/infinite-scroll.mjs";import{useLikeDislike as y}from"../../../../hooks/use-like-dislike.mjs";import{useKeepAliveState as b}from"../../../common/keep-scroll-position/index.mjs";import x from"../../../../assets/icons/close.mjs";import S from"../../../../assets/icons/common/follow_sel.mjs";import C from"../../../../assets/icons/common/follow_user.mjs";import{UnfollowConfirmDialog as w}from"../../../common/follow-button/unfollow-confirm-dialog.mjs";import T from"../../../../assets/icons/detail/give_like.mjs";import E from"../../../../assets/icons/detail/give_like_sel.mjs";import D from"./comment-input.mjs";import O from"../../../../assets/icons/detail/un_like.mjs";import k from"../../../../assets/icons/detail/un_like_sel.mjs";import{CommentMedia as A}from"./comment-media.mjs";import{CommentRichText as j}from"./comment-rich-text.mjs";import{TimeDisplay as M}from"./time-display.mjs";import{CommentItem as N}from"./comment-item.mjs";import{mapApiReplayToReplay as P}from"../../../../types/safe-replay.mjs";import{memo as F,useCallback as I,useEffect as L,useMemo as R,useRef as z,useState as B}from"react";import{Fragment as V,jsx as H,jsxs as U}from"react/jsx-runtime";import{toast as W}from"sonner";import{useTranslations as G}from"next-intl";function K(e){if(e==null)return 0;let t=typeof e==`number`?e:Number(e);if(!Number.isNaN(t)&&t>0)return t>0xe8d4a51000?Math.floor(t/1e3):Math.floor(t);let n=Date.parse(String(e));return Number.isNaN(n)?0:Math.floor(n/1e3)}function q(e,t,n){let r=[];return Array.isArray(n)&&n.length>0?(n.forEach(e=>{let t=!!e?.is_video,n=String(e?.media_url||``),i=String(e?.cover_image||``);!n&&!i||r.push({cover_image:i,cover_image_thumbnail:i,cover_image_radio:1,cover_image_resolution:String(e?.cover_image_resolution||``),image_url:t?``:n,image_thumbnail:t?``:n,image_radio:1,image_resolution:String(e?.image_resolution||``),is_video:t,resolution:String(e?.video_resolution||``),video_duration:Number(e?.video_duration||0),video_url:t?n:``,video_size:Number(e?.video_size||0),video_codec_info:{hls_info:[],video_codec_deal:!1}})}),r):(e?.length&&e.forEach(e=>{r.push({cover_image:``,cover_image_thumbnail:``,cover_image_radio:1,cover_image_resolution:``,image_url:e,image_thumbnail:e,image_radio:1,image_resolution:``,is_video:!1,resolution:``,video_duration:0,video_url:``,video_size:0,video_codec_info:{hls_info:[],video_codec_deal:!1}})}),t?.length&&t.forEach(e=>{r.push({cover_image:``,cover_image_thumbnail:``,cover_image_radio:1,cover_image_resolution:``,image_url:``,image_thumbnail:``,image_radio:1,image_resolution:``,is_video:!0,resolution:``,video_duration:0,video_url:e,video_size:0,video_codec_info:{hls_info:[],video_codec_deal:!1}})}),r)}function J(e){let t=X(e.mentioned_users),n=t.length>0?t:Z(e.content||``);return{id:String(e.comment_id??e.id??``),user_name:e.user?.nickname||e.user?.username||``,text:e.content||``,type:`4`,files:[],at_users:n,cover_image:``,nine_grid_content_info:q(e?.images,e?.videos,e?.medias)}}function Y(e,t){let n=e.is_liked?`1`:e.is_dislike?`2`:`0`,r=X(e.mentioned_users),i=r.length>0?r:Z(e.content||``),a=String(e.comment_id??e.id??``),o=typeof e.like_count==`number`?e.like_count:0,s=P({id:a,like_cnt:(e.is_liked&&o===0?1:o).toString(),dislike_cnt:(e.dislike_count||0).toString(),created_at:K(e.create_time),text:e.content||``,type:`4`,like_flag:n,user_id:e.user_id||``,user_name:e.user?.nickname||e.user?.username||``,avatar:e.user?.avatar_url||``,reply_cnt:(e.reply_count||0).toString(),nine_grid_content_info:q(e?.images,e?.videos,e?.medias),at_users:i,parent_reply:void 0});return t&&(s.parent_reply=J(t)),s}function X(e){return Array.isArray(e)?e.map(e=>({user_id:e.user_id||``,name:e.nickname||e.username||``,avatar:e.avatar_url||``,birthday:``,signature:e.signature||``})):[]}function Z(e){if(!e)return[];let t=new Map,n=/<span[^>]*class=['"]mention['"][^>]*data-id=['"]([^'"]+)['"][^>]*>@([^<]*)<\/span>/g,r;for(;(r=n.exec(e))!==null;){let e=r[1]?String(r[1]):``,n=(r[2]?String(r[2]):``).replace(/^@/,``)||e;!e||t.has(e)||t.set(e,{user_id:e,name:n,avatar:``,birthday:``,signature:``})}if(t.size>0)return Array.from(t.values());let i=/<@_user>(\w+)<\/@_user>/g;for(;(r=i.exec(e))!==null;){let e=r[1]?String(r[1]):``;!e||t.has(e)||t.set(e,{user_id:e,name:e,avatar:``,birthday:``,signature:``})}return Array.from(t.values())}function ee(e){return!Array.isArray(e)||e.length===0?[]:e.map(e=>{let t=!!e.is_video,n=t?String(e.video_url||``):String(e.image_url||e.cover_image||``),r=String(e.cover_image||e.image_url||``);return{media_url:n,is_video:t,image_resolution:String(e.image_resolution||``),cover_image:r,cover_image_resolution:String(e.cover_image_resolution||``),video_resolution:String(e.resolution||``),video_duration:Number(e.video_duration||0),video_size:Number(e.video_size||0)}}).filter(e=>!!e.media_url)}function Q(e,t){let n=[];return e.forEach(e=>{n.push(Y(e,t)),e.sub_comments?.length&&n.push(...Q(e.sub_comments,e))}),n}function $(e){let t=Number(e)||0;return t>=1e4?`${(t/1e4).toFixed(1)}w`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}const te=t((e,t,n)=>{try{if(!e?.id)return;u({comment_id:e.id,is_like:e.like_flag!==`1`},{revalidate:!1})}catch(e){console.error(`点赞回复失败:`,e)}},200),ne=t((e,t,n)=>{try{if(!e?.id)return;l({comment_id:e.id,is_dislike:e.like_flag!==`2`},{revalidate:!1})}catch(e){console.error(`点踩回复失败:`,e)}},200),re=F(({comment:e,updateFollow:t,onRequireLogin:n})=>{let{userInfo:r,userId:i,isLogin:a}=o(),s=r?.userId||r?.user_id||i||``;return H(`div`,{className:`w-full bg-bg1`,children:H(N,{comment:e,variant:`light`,isLogin:a,onRequireLogin:n,rightSlot:R(()=>!!s&&String(s)===String(e.user_id||``),[e.user_id,s])?H(V,{}):H(ie,{userId:e.user_id,hasFollow:e.is_follow,onChange:t,onRequireLogin:n}),showReplyButton:!1})})});function ie({userId:t,hasFollow:n=!1,onChange:r,onRequireLogin:i}){let s=G(`components.biz.business.comment`),{isLogin:c,userInfo:l,userId:u}=o(),{followIds:p}=a(),[m,h]=B(n),[g,_]=B(!1),v=l?.userId||l?.user_id||u||``,y=R(()=>!!v&&String(v)===String(t||``),[t,v]),b=R(()=>n||p.includes(t),[p,n,t]);L(()=>{h(b)},[b]);let x=I(async()=>{try{if(!v||!t||t===`0`){W.error(s(`replyDetail.loginRequired`));return}if(m){let e=await f({follower_id:String(v),followee_id:t});if(e.code!==0){W.error(e.message||s(`replyDetail.unfollowFailed`));return}}else{let e=await d({follower_id:String(v),followee_id:t});if(e.code!==0){W.error(e.message||s(`replyDetail.followFailed`));return}}window.sensors?.track(`detail_follow_click`,{object_id:``,action:m?`取消关注`:`关注`,author_id:t}),sessionStorage.setItem(`user_page_refresh`,`1`)}catch(e){console.error(`关注或取消关注失败:`,e),W.error(s(m?`replyDetail.unfollowFailed`:`replyDetail.followFailed`));return}let e=!m;r?.(e),h(e);let{followIds:n,setFollowIds:i}=a.getState(),o=new Set(n);e?o.add(t):o.delete(t),i(Array.from(o))},[t,m,r,v,s]),T=I(()=>{if(!c){i?.();return}if(m){_(!0);return}x()},[x,m,c,i]);function E(){_(!1),x()}function D(){_(!1)}return y||!t||t===`0`?null:U(V,{children:[H(`div`,{className:e(`h-[28px] rounded-[14px] px-[8px] border border-solid cursor-pointer flex items-center justify-center`,m?`border-text3`:`border-theme5`),onClick:T,children:m?U(V,{children:[H(S,{className:`w-[12px] h-[12px] text-text3 shrink-0`}),H(`span`,{className:`text-text3 text-[12px] leading-[18px] ml-[4px] shrink-0`,children:s(`replyDetail.followed`)})]}):U(V,{children:[H(C,{className:`block w-[12px] h-[12px] text-theme5 shrink-0`}),H(`span`,{className:`block text-theme5 text-[12px] leading-[18px] ml-[4px] shrink-0`,children:s(`replyDetail.follow`)})]})}),H(w,{open:g,onOpenChange:_,onCancel:D,onConfirm:E})]})}const ae=t(e=>{e()},0);function oe(e,t,n,r){let i=z(!1);L(()=>{i.current=!1},[r]),L(()=>{let r=e.current;if(!r)return;!i.current&&t>0&&(r.scrollTop=t,i.current=!0);let a=()=>{i.current=!0,n(r.scrollTop)};return r.addEventListener(`scroll`,a,{passive:!0}),()=>r.removeEventListener(`scroll`,a)},[e,n,t,r])}const se=F(({commentId:e,informationId:t,handleReplyComment:n,onReplyListUpdate:r})=>{let i=G(`components.biz.business.comment`),[a,o]=b(`replay-detail-list-${e}`,[]),[c,l]=b(`replay-detail-has-more-${e}`,!0),[u,d]=b(`replay-detail-page-${e}`,1),{getLikedListData:f,getDislikedListData:p}=y(),m=z(!1),h=I(async()=>{if(!(!e||!t)&&!m.current){m.current=!0;try{let n=await s({content_id:t,parent_id:e,page:u,page_size:20,sort_by:`latest`});if(n.code!==0)throw Error(n.message||i(`replyDetail.fetchRepliesFailed`));let r=n.data?.data?.comments??[],a=Q(r);((n.data?.data?.has_more??!1)===!1||r.length<20)&&l(!1),o(e=>{let t=new Set(e.map(e=>e.id)),n=a.filter(e=>!t.has(e.id));return[...e,...n]}),a.length>0&&d(u+1)}catch(e){console.error(`获取回复列表失败:`,e),l(!1)}finally{m.current=!1}}},[e,t,u,o,l,d,i]),g=I(e=>{o(t=>[e,...t])},[o]);L(()=>{r(g)},[r,g]),L(()=>{e&&t&&(o(e=>e.length===0?e:[]),l(e=>e===!0?e:!0),d(e=>e===1?e:1))},[e,t,o,l,d]);let _=I(n=>{o(e=>f(e,n.id)),te(n,t,e)},[e,f,t,o]),x=I(n=>{n.like_flag!==`2`&&W.message(i(`replyDetail.dislikeHint`)),o(e=>p(e,n.id)),ne(n,t,e)},[e,p,t,o,i]),[S,C]=b(`replay-detail-scroll-top-${e}`,0),w=z(null);oe(w,S,C,e),L(()=>{!e||!t||a.length===0&&c&&h()},[e,t,h,a.length,c]);let T=I(async()=>{await h()},[h]);return U(`div`,{ref:w,className:`w-full pb-[66px]`,children:[a.map((e,t)=>H(ce,{replyItem:e,replyComment:n,onLikeReply:_,onDislikeReply:x},`${e.id}-${t}`)),H(v,{loadMore:T,hasMore:c})]})});function ce({replyItem:e,replyComment:t,onLikeReply:n,onDislikeReply:r}){let i=G(`components.biz.business.comment`),a=m(),o=e.status===`0`;function s(){n?.(e)}function c(){r?.(e)}function l(){t(e)}return U(`div`,{className:`p-[16px] flex flex-col`,children:[U(`div`,{className:`flex flex-row justify-between`,children:[U(`button`,{type:`button`,className:`flex flex-row items-center text-left`,onClick:()=>{a.push(`/profile/${e.user_id}`)},children:[H(`div`,{className:`w-[38px] h-[38px] rounded-full overflow-hidden relative bg-bg2`,children:e.avatar&&H(h,{src:e.avatar,fill:!0,objectFit:`cover`,alt:`avatar`})}),U(`div`,{className:`ml-[12px] flex flex-col`,children:[H(`span`,{className:`text-text2 text-[14px] leading-[14px] max-w-[180px] text-ellipsis overflow-hidden whitespace-nowrap`,children:e.user_name}),H(`span`,{className:`mt-[8px] text-text3 text-[12px] leading-[12px]`,children:H(M,{timestamp:e.created_at})})]})]}),o?H(`div`,{className:`px-[8px] py-[4px] bg-text3/10 rounded-[12px]`,children:H(`span`,{className:`text-text3 text-[12px] leading-[12px]`,children:i(`replyDetail.underReview`)})}):U(`div`,{className:`flex flex-row items-center`,children:[U(`div`,{className:`px-[4px] flex flex-col items-center`,onClick:s,children:[e.like_flag===`1`?H(E,{className:`w-[14px] h-[14px]`}):H(T,{className:`w-[14px] h-[14px] text-text3`}),H(`span`,{className:`mt-[4px] text-text3 text-[12px] leading-[12px]`,children:e.like_cnt===`0`?i(`replyDetail.like`):$(e.like_cnt)})]}),U(`div`,{className:`ml-[12px] px-[4px] flex flex-col items-center`,onClick:c,children:[e.like_flag===`2`?H(k,{className:`w-[14px] h-[14px]`}):H(O,{className:`w-[14px] h-[14px] text-text3`}),H(`span`,{className:`mt-[4px] text-text3 text-[12px] leading-[12px]`,children:e.dislike_cnt===`0`?i(`replyDetail.dislike`):$(e.dislike_cnt)})]})]})]}),U(`div`,{className:`mt-[4px] pl-[50px] flex flex-col`,children:[e.text&&H(j,{className:`text-text1 text-[14px] leading-[22px] break-all`,text:e.text,atUsers:e.at_users}),H(A,{list:e.nine_grid_content_info,disabled:o,hasText:!!e.text,playerId:e.id}),e.parent_reply&&e.parent_reply.text&&U(V,{children:[U(`div`,{className:`mt-[4px] flex flex-row items-center text-[14px] leading-[22px] relative pl-[8px]`,children:[H(`div`,{className:`w-[2px] h-full bg-line1 mr-[8px] absolute left-0 top-0 bottom-0 m-auto`}),U(`span`,{className:`text-theme1`,children:[e.parent_reply.user_name,`:`,e.parent_reply.text&&H(`span`,{className:`text-text1`,children:H(j,{text:e.parent_reply.text,atUsers:e.parent_reply.at_users})})]})]}),H(`div`,{className:`mt-1`,children:H(A,{list:e.parent_reply.nine_grid_content_info,disabled:o,hasText:!!e.parent_reply.text,playerId:e.parent_reply.id})})]}),H(`div`,{className:`mt-[4px] w-[fit-content] h-[30px] px-[12px] text-text1 text-[14px] leading-[22px] flex flex-row items-center bg-bg1 rounded-[15px]`,onClick:l,children:H(`span`,{children:i(`replyDetail.reply`)})})]})]})}function le({comment:e,information:t,contentType:s,visible:l,onClose:u,onReplyComment:d,onReplyAdded:f,onRequireLogin:m}){let h=G(`components.biz.business.comment`),v=z(null),[y,b]=B(()=>P({})),[S,C]=B(!1),{userInfo:w,userId:T}=o(),{followIds:E,setFollowIds:O}=a(),k=w?.userId||w?.user_id||T||``,A=w?.name||w?.nick_name||w?.nickname||w?.user_name||``,j=w?.avatar||w?.avatar_url||``,M=z({commentId:``,userId:``});function N(e){if(!e)return``;if(Array.isArray(e))return String(e[0]||``);if(typeof e==`object`){if(Object.prototype.hasOwnProperty.call(e,`comment_id`))return String(e.comment_id??``);if(Array.isArray(e.data))return String(e.data[0]||``)}return``}L(()=>{l&&(!k||!e.user_id||e.user_id!==`0`&&String(k)!==String(e.user_id)&&(M.current.commentId===e.id&&M.current.userId===k||(M.current={commentId:e.id,userId:k},(async()=>{let t=await p({app_id:0,follower_id:k,followee_ids:[e.user_id]});if(!t.success||!t.data?.is_following_map)return;let n=!!t.data.is_following_map[e.user_id];e.is_follow=n;let r=new Set(E);n?r.add(e.user_id):r.delete(e.user_id),O(Array.from(r))})())))},[e,E,k,O,l]);let F=I(e=>{b(e),setTimeout(()=>{C(!0),v.current?.focus()},10)},[]);function R(){ae(()=>{C(!1)})}async function V({text:e,imageVideoInfoList:t}){let n=e=>e.success?e:(W.error(e.message||h(`replyDetail.publishReplyFailed`)),{...e,toastHandled:!0});if(S){let r=await q({text:e,imageVideoInfoList:t});return C(!1),n(r)}else{let r=await K({text:e,imageVideoInfoList:t});return C(!1),n(r)}}async function K({text:e,imageVideoInfoList:t}){return await d?.({text:e,imageVideoInfoList:t,callback:r=>{let i=Z(e);if(!r||r===`0`)return;let a=P({id:r,user_id:k,user_name:A,avatar:j,text:e,created_at:n(),type:`4`,nine_grid_content_info:t,at_users:i});J?.(a)}})??{success:!0}}async function q({text:e,imageVideoInfoList:a}){if(!y?.id||y.id===`0`)return{success:!1,message:h(`replyDetail.invalidReplyTarget`)};let o=ee(a),l=r(e),u=s===`video`?1:2;try{let r=await c({content_id:t.id,content:i(e),medias:o,mentioned_users:l,parent_id:y.id,source_type:u},{revalidate:!1});if(r.code!==0)return{success:!1,message:r.message||h(`replyDetail.publishReplyFailed`)};let s=N(r.data);if(!s||s===`0`)return{success:!1,message:h(`replyDetail.publishReplyFailed`)};let d=P({id:s,user_id:k,user_name:A,avatar:j,text:e,created_at:n(),type:`4`,nine_grid_content_info:a,at_users:Z(e)});return d.parent_reply=y,J?.(d),f?.(),{success:!0}}catch(e){return console.error(`发布回复回复失败:`,e),{success:!1,message:h(`replyDetail.publishReplyFailed`)}}}let[J,Y]=B(null),X=I(e=>{Y(()=>e)},[]),Q=S?`回复@${y.user_name}`:``;function $(e){e||u()}return H(g,{open:l,onOpenChange:$,children:U(_,{showCloseButton:!1,className:`fixed left-0 right-0 bottom-0 top-[84px] z-[1000] h-auto w-full max-w-none translate-x-0 translate-y-0 rounded-none bg-bg2 p-0 text-text1 !flex !flex-col !gap-0`,children:[U(`div`,{className:`w-full h-[60px] bg-bg1 flex items-center justify-center relative`,children:[H(`button`,{type:`button`,className:`w-[48px] focus-within:outline-none focus-within:border-none focus-within:ring-0 h-full flex items-center justify-center absolute left-0 top-0`,onClick:u,children:H(x,{className:`w-[16px] h-[16px] text-text1`})}),H(`span`,{className:`text-[18px] font-bold`,children:h(`replyDetail.commentDetail`)})]}),U(`div`,{className:`flex-1 min-h-0 w-full overflow-y-auto bg-bg2`,children:[H(re,{comment:e,updateFollow:t=>{e.is_follow=t},onRequireLogin:m}),H(se,{commentId:e.id,informationId:t.id,handleReplyComment:F,onReplyListUpdate:X}),H(D,{placeholder:Q,onInputBlur:R,onPublish:V,onRequireLogin:m,ref:v})]})]})})}export{le as default};
2
+ 'use client';
3
+
4
+ import { cn } from "../../../../utils/cn.mjs";
5
+ import { debounceFun, getCurrentSecondTime, parseTextAtUserIds, replaceAtUserElement } from "../../../../utils/common.mjs";
6
+ import { useFollowIdsState } from "../../../../store/modules/follow-ids-store.mjs";
7
+ import { useUserStore } from "../../../../store/modules/user-store.mjs";
8
+ import { gCommunityGetComments, pCommunityCreateComment, pCommunityDislikeComment, pCommunityLikeComment, pInteractionFollow, pInteractionUnfollow } from "../../../../service/generated/client.mjs";
9
+ import { checkFollowStatus } from "../../../../utils/follow-service.mjs";
10
+ import { useRouter } from "../../../../utils/use-compatible-router.mjs";
11
+ import { Image } from "../../../ui/image.mjs";
12
+ import { Dialog, DialogContent } from "../../../ui/dialog.mjs";
13
+ import { InfiniteScroll } from "../../../ui/infinite-scroll.mjs";
14
+ import { useLikeDislike } from "../../../../hooks/use-like-dislike.mjs";
15
+ import { useKeepAliveState } from "../../../common/keep-scroll-position/index.mjs";
16
+ import SvgClose from "../../../../assets/icons/close.mjs";
17
+ import SvgFollowSel from "../../../../assets/icons/common/follow_sel.mjs";
18
+ import SvgFollowUser from "../../../../assets/icons/common/follow_user.mjs";
19
+ import { UnfollowConfirmDialog } from "../../../common/follow-button/unfollow-confirm-dialog.mjs";
20
+ import SvgGiveLike from "../../../../assets/icons/detail/give_like.mjs";
21
+ import SvgGiveLikeSel from "../../../../assets/icons/detail/give_like_sel.mjs";
22
+ import CommentInput from "./comment-input.mjs";
23
+ import SvgUnLike from "../../../../assets/icons/detail/un_like.mjs";
24
+ import SvgUnLikeSel from "../../../../assets/icons/detail/un_like_sel.mjs";
25
+ import { CommentMedia } from "./comment-media.mjs";
26
+ import { CommentRichText } from "./comment-rich-text.mjs";
27
+ import { TimeDisplay } from "./time-display.mjs";
28
+ import { CommentItem } from "./comment-item.mjs";
29
+ import { mapApiReplayToReplay } from "../../../../types/safe-replay.mjs";
30
+ import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
31
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
32
+ import { toast } from "sonner";
33
+ import { useTranslations } from "next-intl";
34
+
35
+ //#region components/biz/business/comment/reply-detail.tsx
36
+ /**
37
+ * 将接口时间字段转换为秒级时间戳,兼容秒/毫秒/ISO 字符串。
38
+ */
39
+ function parseToSecondTimestamp(value) {
40
+ if (value === void 0 || value === null) return 0;
41
+ const numericValue = typeof value === "number" ? value : Number(value);
42
+ if (!Number.isNaN(numericValue) && numericValue > 0) {
43
+ if (numericValue > 0xe8d4a51000) return Math.floor(numericValue / 1e3);
44
+ return Math.floor(numericValue);
45
+ }
46
+ const parsed = Date.parse(String(value));
47
+ if (Number.isNaN(parsed)) return 0;
48
+ return Math.floor(parsed / 1e3);
49
+ }
50
+ /**
51
+ * 将评论媒体转换为 SafeNineGridInfoType 数组(优先 medias)。
52
+ */
53
+ function convertMediaArrayToNineGridInfo(images, videos, medias) {
54
+ const result = [];
55
+ if (Array.isArray(medias) && medias.length > 0) {
56
+ medias.forEach((media) => {
57
+ const isVideo = Boolean(media?.is_video);
58
+ const mediaUrl = String(media?.media_url || "");
59
+ const coverImage = String(media?.cover_image || "");
60
+ if (!mediaUrl && !coverImage) return;
61
+ result.push({
62
+ cover_image: coverImage,
63
+ cover_image_thumbnail: coverImage,
64
+ cover_image_radio: 1,
65
+ cover_image_resolution: String(media?.cover_image_resolution || ""),
66
+ image_url: isVideo ? "" : mediaUrl,
67
+ image_thumbnail: isVideo ? "" : mediaUrl,
68
+ image_radio: 1,
69
+ image_resolution: String(media?.image_resolution || ""),
70
+ is_video: isVideo,
71
+ resolution: String(media?.video_resolution || ""),
72
+ video_duration: Number(media?.video_duration || 0),
73
+ video_url: isVideo ? mediaUrl : "",
74
+ video_size: Number(media?.video_size || 0),
75
+ video_codec_info: {
76
+ hls_info: [],
77
+ video_codec_deal: false
78
+ }
79
+ });
80
+ });
81
+ return result;
82
+ }
83
+ if (images?.length) images.forEach((imageUrl) => {
84
+ result.push({
85
+ cover_image: "",
86
+ cover_image_thumbnail: "",
87
+ cover_image_radio: 1,
88
+ cover_image_resolution: "",
89
+ image_url: imageUrl,
90
+ image_thumbnail: imageUrl,
91
+ image_radio: 1,
92
+ image_resolution: "",
93
+ is_video: false,
94
+ resolution: "",
95
+ video_duration: 0,
96
+ video_url: "",
97
+ video_size: 0,
98
+ video_codec_info: {
99
+ hls_info: [],
100
+ video_codec_deal: false
101
+ }
102
+ });
103
+ });
104
+ if (videos?.length) videos.forEach((videoUrl) => {
105
+ result.push({
106
+ cover_image: "",
107
+ cover_image_thumbnail: "",
108
+ cover_image_radio: 1,
109
+ cover_image_resolution: "",
110
+ image_url: "",
111
+ image_thumbnail: "",
112
+ image_radio: 1,
113
+ image_resolution: "",
114
+ is_video: true,
115
+ resolution: "",
116
+ video_duration: 0,
117
+ video_url: videoUrl,
118
+ video_size: 0,
119
+ video_codec_info: {
120
+ hls_info: [],
121
+ video_codec_deal: false
122
+ }
123
+ });
124
+ });
125
+ return result;
126
+ }
127
+ /**
128
+ * 将 Community 评论结构映射到 SafeParentReplayType。
129
+ */
130
+ function mapCommunityCommentToParentReply(comment) {
131
+ const mentionedUsers = mapCommunityMentionedUsers(comment.mentioned_users);
132
+ const resolvedAtUsers = mentionedUsers.length > 0 ? mentionedUsers : parseAtUsersFromHtml(comment.content || "");
133
+ return {
134
+ id: String(comment.comment_id ?? comment.id ?? ""),
135
+ user_name: comment.user?.nickname || comment.user?.username || "",
136
+ text: comment.content || "",
137
+ type: "4",
138
+ files: [],
139
+ at_users: resolvedAtUsers,
140
+ cover_image: "",
141
+ nine_grid_content_info: convertMediaArrayToNineGridInfo(comment?.images, comment?.videos, comment?.medias)
142
+ };
143
+ }
144
+ /**
145
+ * 将 Community 评论结构映射到 SafeReplayType
146
+ */
147
+ function mapCommunityCommentToSafeReply(comment, parentComment) {
148
+ const likeFlag = comment.is_liked ? "1" : comment.is_dislike ? "2" : "0";
149
+ const mentionedUsers = mapCommunityMentionedUsers(comment.mentioned_users);
150
+ const resolvedAtUsers = mentionedUsers.length > 0 ? mentionedUsers : parseAtUsersFromHtml(comment.content || "");
151
+ const resolvedId = String(comment.comment_id ?? comment.id ?? "");
152
+ const rawLikeCnt = typeof comment.like_count === "number" ? comment.like_count : 0;
153
+ const reply = mapApiReplayToReplay({
154
+ id: resolvedId,
155
+ like_cnt: (comment.is_liked && rawLikeCnt === 0 ? 1 : rawLikeCnt).toString(),
156
+ dislike_cnt: (comment.dislike_count || 0).toString(),
157
+ created_at: parseToSecondTimestamp(comment.create_time),
158
+ text: comment.content || "",
159
+ type: "4",
160
+ like_flag: likeFlag,
161
+ user_id: comment.user_id || "",
162
+ user_name: comment.user?.nickname || comment.user?.username || "",
163
+ avatar: comment.user?.avatar_url || "",
164
+ reply_cnt: (comment.reply_count || 0).toString(),
165
+ nine_grid_content_info: convertMediaArrayToNineGridInfo(comment?.images, comment?.videos, comment?.medias),
166
+ at_users: resolvedAtUsers,
167
+ parent_reply: void 0
168
+ });
169
+ if (parentComment) reply.parent_reply = mapCommunityCommentToParentReply(parentComment);
170
+ return reply;
171
+ }
172
+ /**
173
+ * 将评论里的 @ 用户信息转换为 SafeAtUserType。
174
+ */
175
+ function mapCommunityMentionedUsers(mentionedUsers) {
176
+ if (!Array.isArray(mentionedUsers)) return [];
177
+ return mentionedUsers.map((user) => ({
178
+ user_id: user.user_id || "",
179
+ name: user.nickname || user.username || "",
180
+ avatar: user.avatar_url || "",
181
+ birthday: "",
182
+ signature: user.signature || ""
183
+ }));
184
+ }
185
+ /**
186
+ * 从富文本中解析 @mention 信息,用于本地新增回复的高亮展示。
187
+ */
188
+ function parseAtUsersFromHtml(text) {
189
+ if (!text) return [];
190
+ const result = /* @__PURE__ */ new Map();
191
+ const mentionRegex = /<span[^>]*class=['"]mention['"][^>]*data-id=['"]([^'"]+)['"][^>]*>@([^<]*)<\/span>/g;
192
+ let match;
193
+ while ((match = mentionRegex.exec(text)) !== null) {
194
+ const id = match[1] ? String(match[1]) : "";
195
+ const name = (match[2] ? String(match[2]) : "").replace(/^@/, "") || id;
196
+ if (!id || result.has(id)) continue;
197
+ result.set(id, {
198
+ user_id: id,
199
+ name,
200
+ avatar: "",
201
+ birthday: "",
202
+ signature: ""
203
+ });
204
+ }
205
+ if (result.size > 0) return Array.from(result.values());
206
+ const placeholderRegex = /<@_user>(\w+)<\/@_user>/g;
207
+ while ((match = placeholderRegex.exec(text)) !== null) {
208
+ const id = match[1] ? String(match[1]) : "";
209
+ if (!id || result.has(id)) continue;
210
+ result.set(id, {
211
+ user_id: id,
212
+ name: id,
213
+ avatar: "",
214
+ birthday: "",
215
+ signature: ""
216
+ });
217
+ }
218
+ return Array.from(result.values());
219
+ }
220
+ /**
221
+ * 将评论附件转换为 createComment 的 medias 结构。
222
+ */
223
+ function buildCommentMedias(list) {
224
+ if (!Array.isArray(list) || list.length === 0) return [];
225
+ return list.map((item) => {
226
+ const isVideo = Boolean(item.is_video);
227
+ const mediaUrl = isVideo ? String(item.video_url || "") : String(item.image_url || item.cover_image || "");
228
+ const coverImage = String(item.cover_image || item.image_url || "");
229
+ return {
230
+ media_url: mediaUrl,
231
+ is_video: isVideo,
232
+ image_resolution: String(item.image_resolution || ""),
233
+ cover_image: coverImage,
234
+ cover_image_resolution: String(item.cover_image_resolution || ""),
235
+ video_resolution: String(item.resolution || ""),
236
+ video_duration: Number(item.video_duration || 0),
237
+ video_size: Number(item.video_size || 0)
238
+ };
239
+ }).filter((media) => Boolean(media.media_url));
240
+ }
241
+ /**
242
+ * 将 Community 评论列表扁平化,包含 sub_comments。
243
+ */
244
+ function flattenCommunityCommentReplies(comments, parentComment) {
245
+ const result = [];
246
+ comments.forEach((item) => {
247
+ result.push(mapCommunityCommentToSafeReply(item, parentComment));
248
+ if (item.sub_comments?.length) result.push(...flattenCommunityCommentReplies(item.sub_comments, item));
249
+ });
250
+ return result;
251
+ }
252
+ /**
253
+ * 将数量转换为紧凑格式展示。
254
+ */
255
+ function formatCount(value) {
256
+ const num = Number(value) || 0;
257
+ if (num >= 1e4) return `${(num / 1e4).toFixed(1)}w`;
258
+ if (num >= 1e3) return `${(num / 1e3).toFixed(1)}k`;
259
+ return String(num);
260
+ }
261
+ /**
262
+ * 回复详情点赞节流。
263
+ */
264
+ const replyDetailLikeDebounce = debounceFun((reply, _informationId, _commentId) => {
265
+ try {
266
+ if (!reply?.id) return;
267
+ pCommunityLikeComment({
268
+ comment_id: reply.id,
269
+ is_like: reply.like_flag !== "1"
270
+ }, { revalidate: false });
271
+ } catch (error) {
272
+ console.error("点赞回复失败:", error);
273
+ }
274
+ }, 200);
275
+ /**
276
+ * 回复详情点踩节流。
277
+ */
278
+ const replyDetailDislikeDebounce = debounceFun((reply, _informationId, _commentId) => {
279
+ try {
280
+ if (!reply?.id) return;
281
+ pCommunityDislikeComment({
282
+ comment_id: reply.id,
283
+ is_dislike: reply.like_flag !== "2"
284
+ }, { revalidate: false });
285
+ } catch (error) {
286
+ console.error("点踩回复失败:", error);
287
+ }
288
+ }, 200);
289
+ /**
290
+ * 回复详情顶部评论区。
291
+ */
292
+ const ReplyDetailHeader = memo(({ comment, updateFollow, onRequireLogin }) => {
293
+ const { userInfo, userId, isLogin } = useUserStore();
294
+ const resolvedUserId = userInfo?.userId || userInfo?.user_id || userId || "";
295
+ return /* @__PURE__ */ jsx("div", {
296
+ className: "w-full bg-bg1",
297
+ children: /* @__PURE__ */ jsx(CommentItem, {
298
+ comment,
299
+ variant: "light",
300
+ isLogin,
301
+ onRequireLogin,
302
+ rightSlot: useMemo(() => Boolean(resolvedUserId) && String(resolvedUserId) === String(comment.user_id || ""), [comment.user_id, resolvedUserId]) ? /* @__PURE__ */ jsx(Fragment$1, {}) : /* @__PURE__ */ jsx(ReplyFollowButton, {
303
+ userId: comment.user_id,
304
+ hasFollow: comment.is_follow,
305
+ onChange: updateFollow,
306
+ onRequireLogin
307
+ }),
308
+ showReplyButton: false
309
+ })
310
+ });
311
+ });
312
+ /**
313
+ * 回复详情关注按钮。
314
+ */
315
+ function ReplyFollowButton({ userId: followUserId, hasFollow = false, onChange, onRequireLogin }) {
316
+ const t = useTranslations("components.biz.business.comment");
317
+ const { isLogin, userInfo, userId } = useUserStore();
318
+ const { followIds } = useFollowIdsState();
319
+ const [isFollow, setIsFollow] = useState(hasFollow);
320
+ const [confirmOpen, setConfirmOpen] = useState(false);
321
+ const resolvedUserId = userInfo?.userId || userInfo?.user_id || userId || "";
322
+ const isSelf = useMemo(() => Boolean(resolvedUserId) && String(resolvedUserId) === String(followUserId || ""), [followUserId, resolvedUserId]);
323
+ const isHasFollowedStatus = useMemo(() => hasFollow || followIds.includes(followUserId), [
324
+ followIds,
325
+ hasFollow,
326
+ followUserId
327
+ ]);
328
+ useEffect(() => {
329
+ setIsFollow(isHasFollowedStatus);
330
+ }, [isHasFollowedStatus]);
331
+ /**
332
+ * 改变关注状态。
333
+ */
334
+ const changeFollowStatus = useCallback(async () => {
335
+ try {
336
+ if (!resolvedUserId || !followUserId || followUserId === "0") {
337
+ toast.error(t("replyDetail.loginRequired"));
338
+ return;
339
+ }
340
+ if (isFollow) {
341
+ const res = await pInteractionUnfollow({
342
+ follower_id: String(resolvedUserId),
343
+ followee_id: followUserId
344
+ });
345
+ if (res.code !== 0) {
346
+ toast.error(res.message || t("replyDetail.unfollowFailed"));
347
+ return;
348
+ }
349
+ } else {
350
+ const res = await pInteractionFollow({
351
+ follower_id: String(resolvedUserId),
352
+ followee_id: followUserId
353
+ });
354
+ if (res.code !== 0) {
355
+ toast.error(res.message || t("replyDetail.followFailed"));
356
+ return;
357
+ }
358
+ }
359
+ window.sensors?.track("detail_follow_click", {
360
+ object_id: "",
361
+ action: isFollow ? "取消关注" : "关注",
362
+ author_id: followUserId
363
+ });
364
+ sessionStorage.setItem("user_page_refresh", "1");
365
+ } catch (error) {
366
+ console.error("关注或取消关注失败:", error);
367
+ toast.error(isFollow ? t("replyDetail.unfollowFailed") : t("replyDetail.followFailed"));
368
+ return;
369
+ }
370
+ const nextFollow = !isFollow;
371
+ onChange?.(nextFollow);
372
+ setIsFollow(nextFollow);
373
+ const { followIds: prevIds, setFollowIds } = useFollowIdsState.getState();
374
+ const next = new Set(prevIds);
375
+ if (nextFollow) next.add(followUserId);
376
+ else next.delete(followUserId);
377
+ setFollowIds(Array.from(next));
378
+ }, [
379
+ followUserId,
380
+ isFollow,
381
+ onChange,
382
+ resolvedUserId,
383
+ t
384
+ ]);
385
+ /**
386
+ * 点击关注按钮。
387
+ */
388
+ const followHandler = useCallback(() => {
389
+ if (!isLogin) {
390
+ onRequireLogin?.();
391
+ return;
392
+ }
393
+ if (isFollow) {
394
+ setConfirmOpen(true);
395
+ return;
396
+ }
397
+ changeFollowStatus();
398
+ }, [
399
+ changeFollowStatus,
400
+ isFollow,
401
+ isLogin,
402
+ onRequireLogin
403
+ ]);
404
+ function handleConfirmUnfollow() {
405
+ setConfirmOpen(false);
406
+ changeFollowStatus();
407
+ }
408
+ function handleCancelUnfollow() {
409
+ setConfirmOpen(false);
410
+ }
411
+ if (isSelf || !followUserId || followUserId === "0") return null;
412
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
413
+ className: cn("h-[28px] rounded-[14px] px-[8px] border border-solid cursor-pointer flex items-center justify-center", !isFollow ? "border-theme5" : "border-text3"),
414
+ onClick: followHandler,
415
+ children: !isFollow ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SvgFollowUser, { className: "block w-[12px] h-[12px] text-theme5 shrink-0" }), /* @__PURE__ */ jsx("span", {
416
+ className: "block text-theme5 text-[12px] leading-[18px] ml-[4px] shrink-0",
417
+ children: t("replyDetail.follow")
418
+ })] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SvgFollowSel, { className: "w-[12px] h-[12px] text-text3 shrink-0" }), /* @__PURE__ */ jsx("span", {
419
+ className: "text-text3 text-[12px] leading-[18px] ml-[4px] shrink-0",
420
+ children: t("replyDetail.followed")
421
+ })] })
422
+ }), /* @__PURE__ */ jsx(UnfollowConfirmDialog, {
423
+ open: confirmOpen,
424
+ onOpenChange: setConfirmOpen,
425
+ onCancel: handleCancelUnfollow,
426
+ onConfirm: handleConfirmUnfollow
427
+ })] });
428
+ }
429
+ /**
430
+ * 0ms 节流:用于输入框失焦时先重置状态。
431
+ */
432
+ const replyDetailDebounce0 = debounceFun((callback) => {
433
+ callback();
434
+ }, 0);
435
+ /**
436
+ * 跟随列表滚动位置变化,自动保存/恢复滚动位置。
437
+ */
438
+ function useScrollPositionEffect(containerRef, scrollTop, onScrollTopChange, key) {
439
+ const restoredRef = useRef(false);
440
+ useEffect(() => {
441
+ restoredRef.current = false;
442
+ }, [key]);
443
+ useEffect(() => {
444
+ const container = containerRef.current;
445
+ if (!container) return;
446
+ if (!restoredRef.current && scrollTop > 0) {
447
+ container.scrollTop = scrollTop;
448
+ restoredRef.current = true;
449
+ }
450
+ const handleScroll = () => {
451
+ restoredRef.current = true;
452
+ onScrollTopChange(container.scrollTop);
453
+ };
454
+ container.addEventListener("scroll", handleScroll, { passive: true });
455
+ return () => container.removeEventListener("scroll", handleScroll);
456
+ }, [
457
+ containerRef,
458
+ onScrollTopChange,
459
+ scrollTop,
460
+ key
461
+ ]);
462
+ }
463
+ /**
464
+ * 回复列表。
465
+ */
466
+ const ReplyList = memo(({ commentId, informationId, handleReplyComment, onReplyListUpdate }) => {
467
+ const t = useTranslations("components.biz.business.comment");
468
+ const [replyList, setReplyList] = useKeepAliveState(`replay-detail-list-${commentId}`, []);
469
+ const [hasMore, setHasMore] = useKeepAliveState(`replay-detail-has-more-${commentId}`, true);
470
+ const [page, setPage] = useKeepAliveState(`replay-detail-page-${commentId}`, 1);
471
+ const { getLikedListData, getDislikedListData } = useLikeDislike();
472
+ const fetchInProgressRef = useRef(false);
473
+ /**
474
+ * 获取回复列表。
475
+ */
476
+ const fetchReplyList = useCallback(async () => {
477
+ if (!commentId || !informationId) return;
478
+ if (fetchInProgressRef.current) return;
479
+ fetchInProgressRef.current = true;
480
+ try {
481
+ const result = await gCommunityGetComments({
482
+ content_id: informationId,
483
+ parent_id: commentId,
484
+ page,
485
+ page_size: 20,
486
+ sort_by: "latest"
487
+ });
488
+ if (result.code !== 0) throw new Error(result.message || t("replyDetail.fetchRepliesFailed"));
489
+ const list = result.data?.data?.comments ?? [];
490
+ const data = flattenCommunityCommentReplies(list);
491
+ if ((result.data?.data?.has_more ?? false) === false || list.length < 20) setHasMore(false);
492
+ setReplyList((prevList) => {
493
+ const existingIds = new Set(prevList.map((item) => item.id));
494
+ const filteredData = data.filter((item) => !existingIds.has(item.id));
495
+ return [...prevList, ...filteredData];
496
+ });
497
+ if (data.length > 0) setPage(page + 1);
498
+ } catch (error) {
499
+ console.error("获取回复列表失败:", error);
500
+ setHasMore(false);
501
+ } finally {
502
+ fetchInProgressRef.current = false;
503
+ }
504
+ }, [
505
+ commentId,
506
+ informationId,
507
+ page,
508
+ setReplyList,
509
+ setHasMore,
510
+ setPage,
511
+ t
512
+ ]);
513
+ /**
514
+ * 更新回复列表。
515
+ */
516
+ const updateReplyList = useCallback((newReply) => {
517
+ setReplyList((prevList) => [newReply, ...prevList]);
518
+ }, [setReplyList]);
519
+ useEffect(() => {
520
+ onReplyListUpdate(updateReplyList);
521
+ }, [onReplyListUpdate, updateReplyList]);
522
+ /**
523
+ * 当评论ID改变时,重置状态并加载第一页数据。
524
+ */
525
+ useEffect(() => {
526
+ if (commentId && informationId) {
527
+ setReplyList((prev) => prev.length === 0 ? prev : []);
528
+ setHasMore((prev) => prev === true ? prev : true);
529
+ setPage((prev) => prev === 1 ? prev : 1);
530
+ }
531
+ }, [
532
+ commentId,
533
+ informationId,
534
+ setReplyList,
535
+ setHasMore,
536
+ setPage
537
+ ]);
538
+ /**
539
+ * 点赞回复。
540
+ */
541
+ const handleLikeReply = useCallback((reply) => {
542
+ setReplyList((prevList) => getLikedListData(prevList, reply.id));
543
+ replyDetailLikeDebounce(reply, informationId, commentId);
544
+ }, [
545
+ commentId,
546
+ getLikedListData,
547
+ informationId,
548
+ setReplyList
549
+ ]);
550
+ /**
551
+ * 点踩回复。
552
+ */
553
+ const handleDislikeReply = useCallback((reply) => {
554
+ if (reply.like_flag !== "2") toast.message(t("replyDetail.dislikeHint"));
555
+ setReplyList((prevList) => getDislikedListData(prevList, reply.id));
556
+ replyDetailDislikeDebounce(reply, informationId, commentId);
557
+ }, [
558
+ commentId,
559
+ getDislikedListData,
560
+ informationId,
561
+ setReplyList,
562
+ t
563
+ ]);
564
+ const [scrollTop, setScrollTop] = useKeepAliveState(`replay-detail-scroll-top-${commentId}`, 0);
565
+ const containerRef = useRef(null);
566
+ useScrollPositionEffect(containerRef, scrollTop, setScrollTop, commentId);
567
+ useEffect(() => {
568
+ if (!commentId || !informationId) return;
569
+ if (replyList.length === 0 && hasMore) fetchReplyList();
570
+ }, [
571
+ commentId,
572
+ informationId,
573
+ fetchReplyList,
574
+ replyList.length,
575
+ hasMore
576
+ ]);
577
+ /**
578
+ * 加载更多。
579
+ */
580
+ const handleLoadMore = useCallback(async () => {
581
+ await fetchReplyList();
582
+ }, [fetchReplyList]);
583
+ return /* @__PURE__ */ jsxs("div", {
584
+ ref: containerRef,
585
+ className: "w-full pb-[66px]",
586
+ children: [replyList.map((item, index) => /* @__PURE__ */ jsx(ReplyCommentItem, {
587
+ replyItem: item,
588
+ replyComment: handleReplyComment,
589
+ onLikeReply: handleLikeReply,
590
+ onDislikeReply: handleDislikeReply
591
+ }, `${item.id}-${index}`)), /* @__PURE__ */ jsx(InfiniteScroll, {
592
+ loadMore: handleLoadMore,
593
+ hasMore
594
+ })]
595
+ });
596
+ });
597
+ /**
598
+ * 回复列表项。
599
+ */
600
+ function ReplyCommentItem({ replyItem, replyComment, onLikeReply, onDislikeReply }) {
601
+ const t = useTranslations("components.biz.business.comment");
602
+ const router = useRouter();
603
+ const isUnderReview = replyItem.status === "0";
604
+ /**
605
+ * 点赞回复。
606
+ */
607
+ function handleLikeClick() {
608
+ onLikeReply?.(replyItem);
609
+ }
610
+ /**
611
+ * 点踩回复。
612
+ */
613
+ function handleDislikeClick() {
614
+ onDislikeReply?.(replyItem);
615
+ }
616
+ /**
617
+ * 回复该回复。
618
+ */
619
+ function handleReplyClick() {
620
+ replyComment(replyItem);
621
+ }
622
+ return /* @__PURE__ */ jsxs("div", {
623
+ className: "p-[16px] flex flex-col",
624
+ children: [/* @__PURE__ */ jsxs("div", {
625
+ className: "flex flex-row justify-between",
626
+ children: [/* @__PURE__ */ jsxs("button", {
627
+ type: "button",
628
+ className: "flex flex-row items-center text-left",
629
+ onClick: () => {
630
+ router.push(`/profile/${replyItem.user_id}`);
631
+ },
632
+ children: [/* @__PURE__ */ jsx("div", {
633
+ className: "w-[38px] h-[38px] rounded-full overflow-hidden relative bg-bg2",
634
+ children: replyItem.avatar && /* @__PURE__ */ jsx(Image, {
635
+ src: replyItem.avatar,
636
+ fill: true,
637
+ objectFit: "cover",
638
+ alt: "avatar"
639
+ })
640
+ }), /* @__PURE__ */ jsxs("div", {
641
+ className: "ml-[12px] flex flex-col",
642
+ children: [/* @__PURE__ */ jsx("span", {
643
+ className: "text-text2 text-[14px] leading-[14px] max-w-[180px] text-ellipsis overflow-hidden whitespace-nowrap",
644
+ children: replyItem.user_name
645
+ }), /* @__PURE__ */ jsx("span", {
646
+ className: "mt-[8px] text-text3 text-[12px] leading-[12px]",
647
+ children: /* @__PURE__ */ jsx(TimeDisplay, { timestamp: replyItem.created_at })
648
+ })]
649
+ })]
650
+ }), isUnderReview ? /* @__PURE__ */ jsx("div", {
651
+ className: "px-[8px] py-[4px] bg-text3/10 rounded-[12px]",
652
+ children: /* @__PURE__ */ jsx("span", {
653
+ className: "text-text3 text-[12px] leading-[12px]",
654
+ children: t("replyDetail.underReview")
655
+ })
656
+ }) : /* @__PURE__ */ jsxs("div", {
657
+ className: "flex flex-row items-center",
658
+ children: [/* @__PURE__ */ jsxs("div", {
659
+ className: "px-[4px] flex flex-col items-center",
660
+ onClick: handleLikeClick,
661
+ children: [replyItem.like_flag === "1" ? /* @__PURE__ */ jsx(SvgGiveLikeSel, { className: "w-[14px] h-[14px]" }) : /* @__PURE__ */ jsx(SvgGiveLike, { className: "w-[14px] h-[14px] text-text3" }), /* @__PURE__ */ jsx("span", {
662
+ className: "mt-[4px] text-text3 text-[12px] leading-[12px]",
663
+ children: replyItem.like_cnt === "0" ? t("replyDetail.like") : formatCount(replyItem.like_cnt)
664
+ })]
665
+ }), /* @__PURE__ */ jsxs("div", {
666
+ className: "ml-[12px] px-[4px] flex flex-col items-center",
667
+ onClick: handleDislikeClick,
668
+ children: [replyItem.like_flag === "2" ? /* @__PURE__ */ jsx(SvgUnLikeSel, { className: "w-[14px] h-[14px]" }) : /* @__PURE__ */ jsx(SvgUnLike, { className: "w-[14px] h-[14px] text-text3" }), /* @__PURE__ */ jsx("span", {
669
+ className: "mt-[4px] text-text3 text-[12px] leading-[12px]",
670
+ children: replyItem.dislike_cnt === "0" ? t("replyDetail.dislike") : formatCount(replyItem.dislike_cnt)
671
+ })]
672
+ })]
673
+ })]
674
+ }), /* @__PURE__ */ jsxs("div", {
675
+ className: "mt-[4px] pl-[50px] flex flex-col",
676
+ children: [
677
+ replyItem.text && /* @__PURE__ */ jsx(CommentRichText, {
678
+ className: "text-text1 text-[14px] leading-[22px] break-all",
679
+ text: replyItem.text,
680
+ atUsers: replyItem.at_users
681
+ }),
682
+ /* @__PURE__ */ jsx(CommentMedia, {
683
+ list: replyItem.nine_grid_content_info,
684
+ disabled: isUnderReview,
685
+ hasText: Boolean(replyItem.text),
686
+ playerId: replyItem.id
687
+ }),
688
+ replyItem.parent_reply && replyItem.parent_reply.text && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
689
+ className: "mt-[4px] flex flex-row items-center text-[14px] leading-[22px] relative pl-[8px]",
690
+ children: [/* @__PURE__ */ jsx("div", { className: "w-[2px] h-full bg-line1 mr-[8px] absolute left-0 top-0 bottom-0 m-auto" }), /* @__PURE__ */ jsxs("span", {
691
+ className: "text-theme1",
692
+ children: [
693
+ replyItem.parent_reply.user_name,
694
+ ":",
695
+ replyItem.parent_reply.text && /* @__PURE__ */ jsx("span", {
696
+ className: "text-text1",
697
+ children: /* @__PURE__ */ jsx(CommentRichText, {
698
+ text: replyItem.parent_reply.text,
699
+ atUsers: replyItem.parent_reply.at_users
700
+ })
701
+ })
702
+ ]
703
+ })]
704
+ }), /* @__PURE__ */ jsx("div", {
705
+ className: "mt-1",
706
+ children: /* @__PURE__ */ jsx(CommentMedia, {
707
+ list: replyItem.parent_reply.nine_grid_content_info,
708
+ disabled: isUnderReview,
709
+ hasText: Boolean(replyItem.parent_reply.text),
710
+ playerId: replyItem.parent_reply.id
711
+ })
712
+ })] }),
713
+ /* @__PURE__ */ jsx("div", {
714
+ className: "mt-[4px] w-[fit-content] h-[30px] px-[12px] text-text1 text-[14px] leading-[22px] flex flex-row items-center bg-bg1 rounded-[15px]",
715
+ onClick: handleReplyClick,
716
+ children: /* @__PURE__ */ jsx("span", { children: t("replyDetail.reply") })
717
+ })
718
+ ]
719
+ })]
720
+ });
721
+ }
722
+ /**
723
+ * 回复详情弹层。
724
+ */
725
+ function ReplyDetail({ comment, information, contentType, visible, onClose, onReplyComment, onReplyAdded, onRequireLogin }) {
726
+ const t = useTranslations("components.biz.business.comment");
727
+ const commentRef = useRef(null);
728
+ const [replyComment, setReplyComment] = useState(() => mapApiReplayToReplay({}));
729
+ const [isClickReplyButton, setIsClickReplyButton] = useState(false);
730
+ const { userInfo, userId: storeUserId } = useUserStore();
731
+ const { followIds, setFollowIds } = useFollowIdsState();
732
+ const resolvedUserId = userInfo?.userId || userInfo?.user_id || storeUserId || "";
733
+ const resolvedUserName = userInfo?.name || userInfo?.nick_name || userInfo?.nickname || userInfo?.user_name || "";
734
+ const resolvedUserAvatar = userInfo?.avatar || userInfo?.avatar_url || "";
735
+ const followCheckRef = useRef({
736
+ commentId: "",
737
+ userId: ""
738
+ });
739
+ /**
740
+ * CreateComment 接口 data 字段在不同端/版本里可能是:
741
+ * - { comment_id: '123' }
742
+ * - ['123']
743
+ * - { data: ['123'] }
744
+ * 统一兜底解析,避免拿不到 comment_id 后本地用时间戳/0 作为 id,进一步把 parent_id 传错(深层回复会放大这个问题)。
745
+ */
746
+ function resolveCreatedCommentId(data) {
747
+ if (!data) return "";
748
+ if (Array.isArray(data)) return String(data[0] || "");
749
+ if (typeof data === "object") {
750
+ if (Object.prototype.hasOwnProperty.call(data, "comment_id")) return String(data.comment_id ?? "");
751
+ if (Array.isArray(data.data)) return String(data.data[0] || "");
752
+ }
753
+ return "";
754
+ }
755
+ /**
756
+ * 弹窗打开时刷新关注状态(同步 followIds/评论头部按钮)。
757
+ */
758
+ useEffect(() => {
759
+ if (!visible) return;
760
+ if (!resolvedUserId || !comment.user_id) return;
761
+ if (comment.user_id === "0") return;
762
+ if (String(resolvedUserId) === String(comment.user_id)) return;
763
+ if (followCheckRef.current.commentId === comment.id && followCheckRef.current.userId === resolvedUserId) return;
764
+ followCheckRef.current = {
765
+ commentId: comment.id,
766
+ userId: resolvedUserId
767
+ };
768
+ (async () => {
769
+ const result = await checkFollowStatus({
770
+ app_id: 0,
771
+ follower_id: resolvedUserId,
772
+ followee_ids: [comment.user_id]
773
+ });
774
+ if (!result.success || !result.data?.is_following_map) return;
775
+ const isFollowed = Boolean(result.data.is_following_map[comment.user_id]);
776
+ comment.is_follow = isFollowed;
777
+ const next = new Set(followIds);
778
+ if (isFollowed) next.add(comment.user_id);
779
+ else next.delete(comment.user_id);
780
+ setFollowIds(Array.from(next));
781
+ })();
782
+ }, [
783
+ comment,
784
+ followIds,
785
+ resolvedUserId,
786
+ setFollowIds,
787
+ visible
788
+ ]);
789
+ /**
790
+ * 回复回复:定位到输入框。
791
+ */
792
+ const handleReplyComment = useCallback((reply) => {
793
+ setReplyComment(reply);
794
+ setTimeout(() => {
795
+ setIsClickReplyButton(true);
796
+ commentRef.current?.focus();
797
+ }, 10);
798
+ }, []);
799
+ /**
800
+ * 输入框失焦:重置回复态。
801
+ */
802
+ function handleInputBlur() {
803
+ replyDetailDebounce0(() => {
804
+ setIsClickReplyButton(false);
805
+ });
806
+ }
807
+ /**
808
+ * 回复评论(统一入口)。
809
+ */
810
+ async function handlePublishComment({ text, imageVideoInfoList }) {
811
+ /**
812
+ * 统一处理发布失败提示。
813
+ */
814
+ const handlePublishFailure = (result) => {
815
+ if (result.success) return result;
816
+ toast.error(result.message || t("replyDetail.publishReplyFailed"));
817
+ return {
818
+ ...result,
819
+ toastHandled: true
820
+ };
821
+ };
822
+ if (isClickReplyButton) {
823
+ const result = await publishReplyReply({
824
+ text,
825
+ imageVideoInfoList
826
+ });
827
+ setIsClickReplyButton(false);
828
+ return handlePublishFailure(result);
829
+ } else {
830
+ const result = await publishReplyComment({
831
+ text,
832
+ imageVideoInfoList
833
+ });
834
+ setIsClickReplyButton(false);
835
+ return handlePublishFailure(result);
836
+ }
837
+ }
838
+ /**
839
+ * 发布回复评论(直接回复评论)。
840
+ */
841
+ async function publishReplyComment({ text, imageVideoInfoList }) {
842
+ return await onReplyComment?.({
843
+ text,
844
+ imageVideoInfoList,
845
+ callback: (replyId) => {
846
+ const localAtUsers = parseAtUsersFromHtml(text);
847
+ if (!replyId || replyId === "0") return;
848
+ const newReply = mapApiReplayToReplay({
849
+ id: replyId,
850
+ user_id: resolvedUserId,
851
+ user_name: resolvedUserName,
852
+ avatar: resolvedUserAvatar,
853
+ text,
854
+ created_at: getCurrentSecondTime(),
855
+ type: "4",
856
+ nine_grid_content_info: imageVideoInfoList,
857
+ at_users: localAtUsers
858
+ });
859
+ updateReplyListFn?.(newReply);
860
+ }
861
+ }) ?? { success: true };
862
+ }
863
+ /**
864
+ * 发布回复回复(回复某条回复)。
865
+ */
866
+ async function publishReplyReply({ text, imageVideoInfoList }) {
867
+ if (!replyComment?.id || replyComment.id === "0") return {
868
+ success: false,
869
+ message: t("replyDetail.invalidReplyTarget")
870
+ };
871
+ const medias = buildCommentMedias(imageVideoInfoList);
872
+ const mentionedUserIds = parseTextAtUserIds(text);
873
+ const resolvedSourceType = contentType === "video" ? 1 : 2;
874
+ try {
875
+ const result = await pCommunityCreateComment({
876
+ content_id: information.id,
877
+ content: replaceAtUserElement(text),
878
+ medias,
879
+ mentioned_users: mentionedUserIds,
880
+ parent_id: replyComment.id,
881
+ source_type: resolvedSourceType
882
+ }, { revalidate: false });
883
+ if (result.code !== 0) return {
884
+ success: false,
885
+ message: result.message || t("replyDetail.publishReplyFailed")
886
+ };
887
+ const replyId = resolveCreatedCommentId(result.data);
888
+ if (!replyId || replyId === "0") return {
889
+ success: false,
890
+ message: t("replyDetail.publishReplyFailed")
891
+ };
892
+ const newReply = mapApiReplayToReplay({
893
+ id: replyId,
894
+ user_id: resolvedUserId,
895
+ user_name: resolvedUserName,
896
+ avatar: resolvedUserAvatar,
897
+ text,
898
+ created_at: getCurrentSecondTime(),
899
+ type: "4",
900
+ nine_grid_content_info: imageVideoInfoList,
901
+ at_users: parseAtUsersFromHtml(text)
902
+ });
903
+ newReply.parent_reply = replyComment;
904
+ updateReplyListFn?.(newReply);
905
+ onReplyAdded?.();
906
+ return { success: true };
907
+ } catch (error) {
908
+ console.error("发布回复回复失败:", error);
909
+ return {
910
+ success: false,
911
+ message: t("replyDetail.publishReplyFailed")
912
+ };
913
+ }
914
+ }
915
+ const [updateReplyListFn, setUpdateReplyListFn] = useState(null);
916
+ /**
917
+ * 处理更新回复列表的函数。
918
+ */
919
+ const handleReplyListUpdate = useCallback((updateFn) => {
920
+ setUpdateReplyListFn(() => updateFn);
921
+ }, []);
922
+ /**
923
+ * 评论输入框占位符。
924
+ */
925
+ const inputPlaceholder = isClickReplyButton ? `回复@${replyComment.user_name}` : "";
926
+ /**
927
+ * 弹窗开关回调。
928
+ */
929
+ function handleDialogOpenChange(next) {
930
+ if (!next) onClose();
931
+ }
932
+ return /* @__PURE__ */ jsx(Dialog, {
933
+ open: visible,
934
+ onOpenChange: handleDialogOpenChange,
935
+ children: /* @__PURE__ */ jsxs(DialogContent, {
936
+ showCloseButton: false,
937
+ className: "fixed left-0 right-0 bottom-0 top-[84px] z-[1000] h-auto w-full max-w-none translate-x-0 translate-y-0 rounded-none bg-bg2 p-0 text-text1 !flex !flex-col !gap-0",
938
+ children: [/* @__PURE__ */ jsxs("div", {
939
+ className: "w-full h-[60px] bg-bg1 flex items-center justify-center relative",
940
+ children: [/* @__PURE__ */ jsx("button", {
941
+ type: "button",
942
+ className: "w-[48px] focus-within:outline-none focus-within:border-none focus-within:ring-0 h-full flex items-center justify-center absolute left-0 top-0",
943
+ onClick: onClose,
944
+ children: /* @__PURE__ */ jsx(SvgClose, { className: "w-[16px] h-[16px] text-text1" })
945
+ }), /* @__PURE__ */ jsx("span", {
946
+ className: "text-[18px] font-bold",
947
+ children: t("replyDetail.commentDetail")
948
+ })]
949
+ }), /* @__PURE__ */ jsxs("div", {
950
+ className: "flex-1 min-h-0 w-full overflow-y-auto bg-bg2",
951
+ children: [
952
+ /* @__PURE__ */ jsx(ReplyDetailHeader, {
953
+ comment,
954
+ updateFollow: (hasFollow) => {
955
+ comment.is_follow = hasFollow;
956
+ },
957
+ onRequireLogin
958
+ }),
959
+ /* @__PURE__ */ jsx(ReplyList, {
960
+ commentId: comment.id,
961
+ informationId: information.id,
962
+ handleReplyComment,
963
+ onReplyListUpdate: handleReplyListUpdate
964
+ }),
965
+ /* @__PURE__ */ jsx(CommentInput, {
966
+ placeholder: inputPlaceholder,
967
+ onInputBlur: handleInputBlur,
968
+ onPublish: handlePublishComment,
969
+ onRequireLogin,
970
+ ref: commentRef
971
+ })
972
+ ]
973
+ })]
974
+ })
975
+ });
976
+ }
977
+
978
+ //#endregion
979
+ export { ReplyDetail as default };