pcm-agents 0.6.11 → 0.6.13

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 (292) hide show
  1. package/dist/cjs/error-event-J_ZWIqWF.js +33 -0
  2. package/dist/cjs/error-event-J_ZWIqWF.js.map +1 -0
  3. package/dist/cjs/{index-CvEfNyEj.js → index-CRlt8Nv6.js} +53 -3
  4. package/dist/cjs/index-CRlt8Nv6.js.map +1 -0
  5. package/dist/cjs/index-WNdOTXnX.js +11068 -0
  6. package/dist/cjs/index-WNdOTXnX.js.map +1 -0
  7. package/dist/cjs/index.cjs.js +2 -2
  8. package/dist/cjs/loader.cjs.js +3 -5
  9. package/dist/cjs/loader.cjs.js.map +1 -1
  10. package/dist/cjs/message.service-DGUsA-FY.js +135 -0
  11. package/dist/cjs/message.service-DGUsA-FY.js.map +1 -0
  12. package/dist/cjs/{pcm-1zhanshi-mnms-modal_17.cjs.entry.js → pcm-1zhanshi-mnms-modal_21.cjs.entry.js} +3276 -216
  13. package/dist/cjs/pcm-1zhanshi-mnms-modal_21.cjs.entry.js.map +1 -0
  14. package/dist/cjs/pcm-agents.cjs.js +4 -6
  15. package/dist/cjs/pcm-agents.cjs.js.map +1 -1
  16. package/dist/cjs/pcm-message.cjs.entry.js +3 -3
  17. package/dist/cjs/pcm-message.cjs.entry.js.map +1 -1
  18. package/dist/cjs/pcm-message.entry.cjs.js.map +1 -1
  19. package/dist/cjs/pcm-mnms-video-modal.cjs.entry.js +8 -8
  20. package/dist/cjs/pcm-mnms-video-modal.cjs.entry.js.map +1 -1
  21. package/dist/cjs/pcm-mnms-video-modal.entry.cjs.js.map +1 -1
  22. package/dist/cjs/pcm-mnms-zp-modal.cjs.entry.js +29 -86
  23. package/dist/cjs/pcm-mnms-zp-modal.cjs.entry.js.map +1 -1
  24. package/dist/cjs/pcm-mnms-zp-modal.entry.cjs.js.map +1 -1
  25. package/dist/cjs/{sentry-reporter-BWFtw_aT.js → sentry-reporter-tpI4WdkE.js} +12 -40
  26. package/dist/cjs/sentry-reporter-tpI4WdkE.js.map +1 -0
  27. package/dist/collection/collection-manifest.json +5 -1
  28. package/dist/collection/components/pcm-1zhanshi-mnms-modal/pcm-1zhanshi-mnms-modal.js.map +1 -1
  29. package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.css +986 -986
  30. package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.js +7 -9
  31. package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.js.map +1 -1
  32. package/dist/collection/components/pcm-button/pcm-button.css +199 -199
  33. package/dist/collection/components/pcm-button/pcm-button.js +6 -6
  34. package/dist/collection/components/pcm-button/pcm-button.js.map +1 -1
  35. package/dist/collection/components/pcm-card/pcm-card.css +259 -259
  36. package/dist/collection/components/pcm-card/pcm-card.js +1 -1
  37. package/dist/collection/components/pcm-card/pcm-card.js.map +1 -1
  38. package/dist/collection/components/pcm-chat-message/pcm-chat-message.css +554 -554
  39. package/dist/collection/components/pcm-chat-message/pcm-chat-message.js +3 -3
  40. package/dist/collection/components/pcm-chat-message/pcm-chat-message.js.map +1 -1
  41. package/dist/collection/components/pcm-drawer/pcm-drawer.css +102 -102
  42. package/dist/collection/components/pcm-drawer/pcm-drawer.js +1 -1
  43. package/dist/collection/components/pcm-drawer/pcm-drawer.js.map +1 -1
  44. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.css +854 -854
  45. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js +5 -7
  46. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js.map +1 -1
  47. package/dist/collection/components/pcm-htws-modal/pcm-htws-modal.css +95 -95
  48. package/dist/collection/components/pcm-htws-modal/pcm-htws-modal.js +1 -1
  49. package/dist/collection/components/pcm-htws-modal/pcm-htws-modal.js.map +1 -1
  50. package/dist/collection/components/pcm-hyzj-modal/pcm-hyzj-modal.js +2 -2
  51. package/dist/collection/components/pcm-hyzj-modal/pcm-hyzj-modal.js.map +1 -1
  52. package/dist/collection/components/pcm-jd-modal/pcm-jd-modal.css +312 -312
  53. package/dist/collection/components/pcm-jd-modal/pcm-jd-modal.js +1 -1
  54. package/dist/collection/components/pcm-jd-modal/pcm-jd-modal.js.map +1 -1
  55. package/dist/collection/components/pcm-jlpp-modal/pcm-jlpp-modal.js +2 -2
  56. package/dist/collection/components/pcm-jlpp-modal/pcm-jlpp-modal.js.map +1 -1
  57. package/dist/collection/components/pcm-message/pcm-message.css +64 -64
  58. package/dist/collection/components/pcm-message/pcm-message.js +2 -2
  59. package/dist/collection/components/pcm-message/pcm-message.js.map +1 -1
  60. package/dist/collection/components/pcm-mnct-modal/pcm-mnct-modal.css +1 -1
  61. package/dist/collection/components/pcm-mnct-modal/pcm-mnct-modal.js +2 -2
  62. package/dist/collection/components/pcm-mnct-modal/pcm-mnct-modal.js.map +1 -1
  63. package/dist/collection/components/pcm-mnms-modal/pcm-mnms-modal.js +67 -84
  64. package/dist/collection/components/pcm-mnms-modal/pcm-mnms-modal.js.map +1 -1
  65. package/dist/collection/components/pcm-mnms-video-modal/pcm-mnms-video-modal.js +2 -2
  66. package/dist/collection/components/pcm-mnms-video-modal/pcm-mnms-video-modal.js.map +1 -1
  67. package/dist/collection/components/pcm-mnms-zp-modal/pcm-mnms-zp-modal.js +67 -84
  68. package/dist/collection/components/pcm-mnms-zp-modal/pcm-mnms-zp-modal.js.map +1 -1
  69. package/dist/collection/components/pcm-mobile-input-btn/pcm-mobile-input-btn.css +140 -0
  70. package/dist/collection/components/pcm-mobile-input-btn/pcm-mobile-input-btn.js +307 -0
  71. package/dist/collection/components/pcm-mobile-input-btn/pcm-mobile-input-btn.js.map +1 -0
  72. package/dist/collection/components/pcm-mobile-input-btn/uploadNumberSDK.js +25 -0
  73. package/dist/collection/components/pcm-mobile-input-btn/uploadNumberSDK.js.map +1 -0
  74. package/dist/collection/components/pcm-mobile-upload-btn/pcm-mobile-upload-btn.css +127 -0
  75. package/dist/collection/components/pcm-mobile-upload-btn/pcm-mobile-upload-btn.js +350 -0
  76. package/dist/collection/components/pcm-mobile-upload-btn/pcm-mobile-upload-btn.js.map +1 -0
  77. package/dist/collection/components/pcm-mobile-upload-btn/uploadNumberSDK.js +25 -0
  78. package/dist/collection/components/pcm-mobile-upload-btn/uploadNumberSDK.js.map +1 -0
  79. package/dist/collection/components/pcm-msbg-modal/pcm-msbg-modal.js +2 -2
  80. package/dist/collection/components/pcm-msbg-modal/pcm-msbg-modal.js.map +1 -1
  81. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.css +1 -1
  82. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js +2 -2
  83. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js.map +1 -1
  84. package/dist/collection/components/pcm-time-count-down/pcm-time-count-down.css +0 -0
  85. package/dist/collection/components/pcm-time-count-down/pcm-time-count-down.js +106 -0
  86. package/dist/collection/components/pcm-time-count-down/pcm-time-count-down.js.map +1 -0
  87. package/dist/collection/components/pcm-upload/pcm-upload.css +0 -0
  88. package/dist/collection/components/pcm-upload/pcm-upload.js +408 -0
  89. package/dist/collection/components/pcm-upload/pcm-upload.js.map +1 -0
  90. package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.css +969 -969
  91. package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.js +3 -5
  92. package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.js.map +1 -1
  93. package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.css +68 -68
  94. package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.js +4 -4
  95. package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.js.map +1 -1
  96. package/dist/collection/global/global.css +401 -398
  97. package/dist/collection/global/markdown.css +1233 -1233
  98. package/dist/collection/global/message.js.map +1 -1
  99. package/dist/collection/index.js.map +1 -1
  100. package/dist/collection/interfaces/chat.js.map +1 -1
  101. package/dist/collection/interfaces/events.js.map +1 -1
  102. package/dist/collection/services/message.service.js.map +1 -1
  103. package/dist/collection/utils/env.js +3 -0
  104. package/dist/collection/utils/env.js.map +1 -1
  105. package/dist/collection/utils/error-event.js.map +1 -1
  106. package/dist/collection/utils/init.js.map +1 -1
  107. package/dist/collection/utils/sentry-reporter.js.map +1 -1
  108. package/dist/collection/utils/utils.js +48 -24
  109. package/dist/collection/utils/utils.js.map +1 -1
  110. package/dist/components/index.js +3 -5482
  111. package/dist/components/index.js.map +1 -1
  112. package/dist/components/{p-AYWZDCn8.js → p-B0WOTw9J.js} +51 -4
  113. package/dist/components/p-B0WOTw9J.js.map +1 -0
  114. package/dist/components/{p-DUQ46MUh.js → p-BGXbWUJg.js} +3 -3
  115. package/dist/components/{p-DUQ46MUh.js.map → p-BGXbWUJg.js.map} +1 -1
  116. package/dist/{esm/sentry-reporter-BFBS363a.js → components/p-BW3r6Lrf.js} +5 -32
  117. package/dist/components/p-BW3r6Lrf.js.map +1 -0
  118. package/dist/{esm/app-globals-Chti62re.js → components/p-BdiUKin5.js} +9619 -4296
  119. package/dist/components/p-BdiUKin5.js.map +1 -0
  120. package/dist/components/{p-FjtoYPVY.js → p-BywzltXy.js} +10 -9
  121. package/dist/components/p-BywzltXy.js.map +1 -0
  122. package/dist/components/p-C2OsjtRx.js +208 -0
  123. package/dist/components/p-C2OsjtRx.js.map +1 -0
  124. package/dist/components/{p-D2Z8casl.js → p-CuIvbaWY.js} +5 -5
  125. package/dist/components/p-CuIvbaWY.js.map +1 -0
  126. package/dist/components/p-D0ZMoyH8.js +251 -0
  127. package/dist/components/p-D0ZMoyH8.js.map +1 -0
  128. package/dist/components/{p-CjbFHLT7.js → p-De3VHEUn.js} +7 -71
  129. package/dist/components/p-De3VHEUn.js.map +1 -0
  130. package/dist/components/p-Dv8qvK0w.js +2646 -0
  131. package/dist/components/p-Dv8qvK0w.js.map +1 -0
  132. package/dist/components/p-RD3mwuBX.js +226 -0
  133. package/dist/components/p-RD3mwuBX.js.map +1 -0
  134. package/dist/components/p-njngFX_n.js +80 -0
  135. package/dist/components/p-njngFX_n.js.map +1 -0
  136. package/dist/components/pcm-1zhanshi-mnms-modal.js +7 -7
  137. package/dist/components/pcm-1zhanshi-mnms-modal.js.map +1 -1
  138. package/dist/components/pcm-app-chat-modal.js +1 -1
  139. package/dist/components/pcm-button.js +2 -2
  140. package/dist/components/pcm-button.js.map +1 -1
  141. package/dist/components/pcm-card.js +3 -3
  142. package/dist/components/pcm-card.js.map +1 -1
  143. package/dist/components/pcm-chat-message.js +1 -1
  144. package/dist/components/pcm-drawer.js +1 -1
  145. package/dist/components/pcm-hr-chat-modal.js +5 -4
  146. package/dist/components/pcm-hr-chat-modal.js.map +1 -1
  147. package/dist/components/pcm-htws-modal.js +8 -7
  148. package/dist/components/pcm-htws-modal.js.map +1 -1
  149. package/dist/components/pcm-hyzj-modal.js +8 -7
  150. package/dist/components/pcm-hyzj-modal.js.map +1 -1
  151. package/dist/components/pcm-jd-modal.js +8 -7
  152. package/dist/components/pcm-jd-modal.js.map +1 -1
  153. package/dist/components/pcm-jlpp-modal.js +8 -7
  154. package/dist/components/pcm-jlpp-modal.js.map +1 -1
  155. package/dist/components/pcm-message.js +3 -3
  156. package/dist/components/pcm-message.js.map +1 -1
  157. package/dist/components/pcm-mnct-modal.js +8 -7
  158. package/dist/components/pcm-mnct-modal.js.map +1 -1
  159. package/dist/components/pcm-mnms-modal.js +60 -90
  160. package/dist/components/pcm-mnms-modal.js.map +1 -1
  161. package/dist/components/pcm-mnms-video-modal.js +8 -7
  162. package/dist/components/pcm-mnms-video-modal.js.map +1 -1
  163. package/dist/components/pcm-mnms-zp-modal.js +60 -90
  164. package/dist/components/pcm-mnms-zp-modal.js.map +1 -1
  165. package/dist/components/pcm-mobile-input-btn.d.ts +11 -0
  166. package/dist/components/pcm-mobile-input-btn.js +9 -0
  167. package/dist/components/pcm-mobile-input-btn.js.map +1 -0
  168. package/dist/components/pcm-mobile-upload-btn.d.ts +11 -0
  169. package/dist/components/pcm-mobile-upload-btn.js +9 -0
  170. package/dist/components/pcm-mobile-upload-btn.js.map +1 -0
  171. package/dist/components/pcm-msbg-modal.js +8 -7
  172. package/dist/components/pcm-msbg-modal.js.map +1 -1
  173. package/dist/components/pcm-qgqjl-modal.js +8 -7
  174. package/dist/components/pcm-qgqjl-modal.js.map +1 -1
  175. package/dist/components/pcm-time-count-down.d.ts +11 -0
  176. package/dist/components/pcm-time-count-down.js +9 -0
  177. package/dist/components/pcm-time-count-down.js.map +1 -0
  178. package/dist/components/pcm-upload.d.ts +11 -0
  179. package/dist/components/pcm-upload.js +9 -0
  180. package/dist/components/pcm-upload.js.map +1 -0
  181. package/dist/components/pcm-zsk-chat-modal.js +4 -4
  182. package/dist/components/pcm-zsk-chat-modal.js.map +1 -1
  183. package/dist/components/pcm-zygh-modal.js +8 -7
  184. package/dist/components/pcm-zygh-modal.js.map +1 -1
  185. package/dist/esm/error-event-C0FYX2-Z.js +31 -0
  186. package/dist/esm/error-event-C0FYX2-Z.js.map +1 -0
  187. package/dist/esm/{index-GyOE8SlD.js → index-BnNqOUZf.js} +51 -4
  188. package/dist/esm/index-BnNqOUZf.js.map +1 -0
  189. package/dist/esm/index-BuVfV0zo.js +11035 -0
  190. package/dist/esm/index-BuVfV0zo.js.map +1 -0
  191. package/dist/esm/index.js +2 -2
  192. package/dist/esm/loader.js +3 -5
  193. package/dist/esm/loader.js.map +1 -1
  194. package/dist/esm/message.service-DXVhHj6-.js +133 -0
  195. package/dist/esm/message.service-DXVhHj6-.js.map +1 -0
  196. package/dist/esm/{pcm-1zhanshi-mnms-modal_17.entry.js → pcm-1zhanshi-mnms-modal_21.entry.js} +3225 -169
  197. package/dist/esm/pcm-1zhanshi-mnms-modal_21.entry.js.map +1 -0
  198. package/dist/esm/pcm-agents.js +4 -6
  199. package/dist/esm/pcm-agents.js.map +1 -1
  200. package/dist/esm/pcm-message.entry.js +3 -3
  201. package/dist/esm/pcm-message.entry.js.map +1 -1
  202. package/dist/esm/pcm-mnms-video-modal.entry.js +5 -5
  203. package/dist/esm/pcm-mnms-video-modal.entry.js.map +1 -1
  204. package/dist/esm/pcm-mnms-zp-modal.entry.js +28 -85
  205. package/dist/esm/pcm-mnms-zp-modal.entry.js.map +1 -1
  206. package/dist/esm/sentry-reporter-CYzy4_8O.js +70 -0
  207. package/dist/esm/sentry-reporter-CYzy4_8O.js.map +1 -0
  208. package/dist/pcm-agents/index.esm.js +1 -1
  209. package/dist/pcm-agents/loader.esm.js.map +1 -1
  210. package/dist/pcm-agents/p-18a06873.entry.js +2 -0
  211. package/dist/pcm-agents/p-18a06873.entry.js.map +1 -0
  212. package/dist/pcm-agents/p-47e2e1d0.entry.js +2 -0
  213. package/dist/pcm-agents/p-47e2e1d0.entry.js.map +1 -0
  214. package/dist/pcm-agents/{p-3608c0c6.entry.js → p-7a582f00.entry.js} +2 -2
  215. package/dist/pcm-agents/p-7a582f00.entry.js.map +1 -0
  216. package/dist/pcm-agents/p-BhFnI70g.js +2 -0
  217. package/dist/pcm-agents/p-BhFnI70g.js.map +1 -0
  218. package/dist/pcm-agents/p-BuVfV0zo.js +3 -0
  219. package/dist/pcm-agents/p-BuVfV0zo.js.map +1 -0
  220. package/dist/pcm-agents/p-C0FYX2-Z.js +2 -0
  221. package/dist/pcm-agents/p-C0FYX2-Z.js.map +1 -0
  222. package/dist/pcm-agents/p-DXVhHj6-.js +2 -0
  223. package/dist/pcm-agents/p-DXVhHj6-.js.map +1 -0
  224. package/dist/pcm-agents/p-DkeaAFic.js +2 -0
  225. package/dist/pcm-agents/p-DkeaAFic.js.map +1 -0
  226. package/dist/pcm-agents/p-f5f96853.entry.js +245 -0
  227. package/dist/pcm-agents/p-f5f96853.entry.js.map +1 -0
  228. package/dist/pcm-agents/pcm-agents.esm.js +1 -1
  229. package/dist/pcm-agents/pcm-agents.esm.js.map +1 -1
  230. package/dist/pcm-agents/pcm-message.entry.esm.js.map +1 -1
  231. package/dist/pcm-agents/pcm-mnms-video-modal.entry.esm.js.map +1 -1
  232. package/dist/pcm-agents/pcm-mnms-zp-modal.entry.esm.js.map +1 -1
  233. package/dist/store/auth.store.js.map +1 -1
  234. package/dist/store/config.store.js.map +1 -1
  235. package/dist/types/components/pcm-mnms-modal/pcm-mnms-modal.d.ts +9 -4
  236. package/dist/types/components/pcm-mnms-zp-modal/pcm-mnms-zp-modal.d.ts +9 -4
  237. package/dist/types/components/pcm-mobile-input-btn/pcm-mobile-input-btn.d.ts +36 -0
  238. package/dist/types/components/pcm-mobile-input-btn/uploadNumberSDK.d.ts +9 -0
  239. package/dist/types/components/pcm-mobile-upload-btn/pcm-mobile-upload-btn.d.ts +44 -0
  240. package/dist/types/components/pcm-mobile-upload-btn/uploadNumberSDK.d.ts +9 -0
  241. package/dist/types/components/pcm-time-count-down/pcm-time-count-down.d.ts +15 -0
  242. package/dist/types/components/pcm-upload/pcm-upload.d.ts +54 -0
  243. package/dist/types/components/pcm-upload/type.d.ts +4 -0
  244. package/dist/types/components.d.ts +798 -30
  245. package/dist/types/stencil-public-runtime.d.ts +1 -1
  246. package/dist/types/utils/env.d.ts +2 -0
  247. package/dist/types/utils/utils.d.ts +30 -12
  248. package/package.json +70 -69
  249. package/dist/cjs/app-globals-BIO4q6tX.js +0 -5487
  250. package/dist/cjs/app-globals-BIO4q6tX.js.map +0 -1
  251. package/dist/cjs/exports-Dc-pQh4A.js +0 -4087
  252. package/dist/cjs/exports-Dc-pQh4A.js.map +0 -1
  253. package/dist/cjs/index-C_qhED9Z.js +0 -1538
  254. package/dist/cjs/index-C_qhED9Z.js.map +0 -1
  255. package/dist/cjs/index-CvEfNyEj.js.map +0 -1
  256. package/dist/cjs/pcm-1zhanshi-mnms-modal_17.cjs.entry.js.map +0 -1
  257. package/dist/cjs/sentry-reporter-BWFtw_aT.js.map +0 -1
  258. package/dist/components/p-75J0r72D.js +0 -4017
  259. package/dist/components/p-75J0r72D.js.map +0 -1
  260. package/dist/components/p-AYWZDCn8.js.map +0 -1
  261. package/dist/components/p-CR7WLzmM.js +0 -1303
  262. package/dist/components/p-CR7WLzmM.js.map +0 -1
  263. package/dist/components/p-CjbFHLT7.js.map +0 -1
  264. package/dist/components/p-D2Z8casl.js.map +0 -1
  265. package/dist/components/p-FjtoYPVY.js.map +0 -1
  266. package/dist/esm/app-globals-Chti62re.js.map +0 -1
  267. package/dist/esm/exports-Bs-zO1WZ.js +0 -4017
  268. package/dist/esm/exports-Bs-zO1WZ.js.map +0 -1
  269. package/dist/esm/index-Bq0K-WqZ.js +0 -1528
  270. package/dist/esm/index-Bq0K-WqZ.js.map +0 -1
  271. package/dist/esm/index-GyOE8SlD.js.map +0 -1
  272. package/dist/esm/pcm-1zhanshi-mnms-modal_17.entry.js.map +0 -1
  273. package/dist/esm/sentry-reporter-BFBS363a.js.map +0 -1
  274. package/dist/pcm-agents/p-2Gpw8rvH.js +0 -2
  275. package/dist/pcm-agents/p-2Gpw8rvH.js.map +0 -1
  276. package/dist/pcm-agents/p-3608c0c6.entry.js.map +0 -1
  277. package/dist/pcm-agents/p-60d7a0b0.entry.js +0 -2
  278. package/dist/pcm-agents/p-60d7a0b0.entry.js.map +0 -1
  279. package/dist/pcm-agents/p-9e6efc2d.entry.js +0 -2
  280. package/dist/pcm-agents/p-9e6efc2d.entry.js.map +0 -1
  281. package/dist/pcm-agents/p-BUV0S8Cc.js +0 -2
  282. package/dist/pcm-agents/p-BUV0S8Cc.js.map +0 -1
  283. package/dist/pcm-agents/p-Bq0K-WqZ.js +0 -3
  284. package/dist/pcm-agents/p-Bq0K-WqZ.js.map +0 -1
  285. package/dist/pcm-agents/p-Bs-zO1WZ.js +0 -2
  286. package/dist/pcm-agents/p-Bs-zO1WZ.js.map +0 -1
  287. package/dist/pcm-agents/p-CeRTfvY9.js +0 -2
  288. package/dist/pcm-agents/p-CeRTfvY9.js.map +0 -1
  289. package/dist/pcm-agents/p-e6c87a78.entry.js +0 -2
  290. package/dist/pcm-agents/p-e6c87a78.entry.js.map +0 -1
  291. /package/dist/types/{code/agents-sdk → Users/debugksir/Documents/pcm/sdk}/packages/pcm-agents/.stencil/store/auth.store.d.ts +0 -0
  292. /package/dist/types/{code/agents-sdk → Users/debugksir/Documents/pcm/sdk}/packages/pcm-agents/.stencil/store/config.store.d.ts +0 -0
@@ -1,8 +1,9 @@
1
- import { a as createStore, c as configStore } from './p-DUQ46MUh.js';
1
+ import { a as createStore, c as configStore } from './p-BGXbWUJg.js';
2
2
 
3
3
  // 默认 API 域名
4
4
  // 从环境变量获取 API 域名,如果未设置则使用默认值
5
5
  const API_DOMAIN = "https://api.pincaimao.com/agents/platform";
6
+ const PCM_DOMAIN = "http://www.pincaimao.com";
6
7
 
7
8
  // src/store/auth.store.ts
8
9
  const { state: authState, onChange } = createStore({
@@ -318,6 +319,13 @@ const fetchAgentInfo = async (botId) => {
318
319
  throw error;
319
320
  }
320
321
  };
322
+ var FileUploadState;
323
+ (function (FileUploadState) {
324
+ FileUploadState["Init"] = "init";
325
+ FileUploadState["Uploading"] = "uploading";
326
+ FileUploadState["Success"] = "success";
327
+ FileUploadState["Failed"] = "failed";
328
+ })(FileUploadState || (FileUploadState = {}));
321
329
  /**
322
330
  * 计算文件的SHA256哈希值
323
331
  * @param file 要计算哈希值的文件
@@ -524,8 +532,47 @@ const getCosPreviewUrl = async (cosKey, headers) => {
524
532
  return null;
525
533
  }
526
534
  };
535
+ /**
536
+ * 格式化文件大小
537
+ * @param size 文件大小(单位B)
538
+ * @returns 格式化后的文件大小字符串,如 "12.3MB"
539
+ */
540
+ const formatFileSize = (size) => {
541
+ if (!size && size !== 0) {
542
+ return null;
543
+ }
544
+ const numSize = Number(size);
545
+ if (isNaN(numSize))
546
+ return null;
547
+ if (size < 1024) {
548
+ return size + "B";
549
+ }
550
+ if (size < 1024 * 1024) {
551
+ return (size / 1024).toFixed(1) + "KB";
552
+ }
553
+ return (size / 1024 / 1024).toFixed(1) + "MB";
554
+ };
555
+ /**
556
+ * 判断当前设备是PC还是移动端
557
+ * @returns {boolean} true表示是移动端,false表示是PC端
558
+ */
559
+ const isMobile = () => {
560
+ const userAgentInfo = navigator.userAgent;
561
+ const mobileAgents = ['Android', 'iPhone', 'iPad', 'iPod', 'Windows Phone', 'BlackBerry', 'SymbianOS', 'MicroMessenger'];
562
+ let isMobileFlag = false;
563
+ for (let i = 0; i < mobileAgents.length; i++) {
564
+ if (userAgentInfo.indexOf(mobileAgents[i]) > -1) {
565
+ isMobileFlag = true;
566
+ break;
567
+ }
568
+ }
569
+ if (!isMobileFlag) {
570
+ isMobileFlag = window.innerWidth < 768;
571
+ }
572
+ return isMobileFlag;
573
+ };
527
574
 
528
- export { authStore as a, sendSSERequest as b, synthesizeAudio as c, fetchAgentInfo as d, getCosPreviewUrl as e, format as f, getCosPresignedUrl as g, sendHttpRequest as s, uploadFileToBackend as u, verifyApiKey as v };
529
- //# sourceMappingURL=p-AYWZDCn8.js.map
575
+ export { FileUploadState as F, PCM_DOMAIN as P, authStore as a, sendSSERequest as b, synthesizeAudio as c, formatFileSize as d, fetchAgentInfo as e, format as f, getCosPresignedUrl as g, getCosPreviewUrl as h, isMobile as i, sendHttpRequest as s, uploadFileToBackend as u, verifyApiKey as v };
576
+ //# sourceMappingURL=p-B0WOTw9J.js.map
530
577
 
531
- //# sourceMappingURL=p-AYWZDCn8.js.map
578
+ //# sourceMappingURL=p-B0WOTw9J.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-B0WOTw9J.js","mappings":";;AAAA;AAKA;AACO,MAAM,UAAU,GAAG,2CAA4C;AACzD,MAAA,UAAU,GAAG;;ACP1B;AAGO,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC;IACxD,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI;AACtD,CAAA,CAAC;AAEF;AACa,MAAA,SAAS,GAAG;AACvB,IAAA,QAAQ,EAAE,MAAM,SAAS,CAAC,KAAK;AAC/B,IAAA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platform';\nconst DEFAULT_PCM_DOMAIN = 'http://www.pincaimao.com';\n\n\n// 从环境变量获取 API 域名,如果未设置则使用默认值\nexport const API_DOMAIN = process.env.API_DOMAIN || DEFAULT_API_DOMAIN;\nexport const PCM_DOMAIN = process.env.PCM_DOMAIN || DEFAULT_PCM_DOMAIN;\n\n// 导出其他环境变量\nexport const ENV = {\n API_DOMAIN,\n PCM_DOMAIN,\n // 可以添加其他环境变量\n}; ","// src/store/auth.store.ts\nimport { createStore } from '@stencil/store';\n\nexport const { state: authState, onChange } = createStore({\n token: localStorage.getItem('pcm-sdk-auth-token') || null\n});\n\n// 添加一些辅助方法\nexport const authStore = {\n getToken: () => authState.token,\n setToken: (token: string) => {\n authState.token = token;\n localStorage.setItem('pcm-sdk-auth-token', token);\n },\n clearToken: () => {\n authState.token = null;\n localStorage.removeItem('pcm-sdk-auth-token');\n }\n};\n\n// 自动保存到localStorage\nonChange('token', value => {\n if (value) {\n localStorage.setItem('pcm-sdk-auth-token', value);\n } else {\n localStorage.removeItem('pcm-sdk-auth-token');\n }\n});"],"version":3}
@@ -1,4 +1,4 @@
1
- import { d as getRenderingRef, f as forceUpdate } from './p-CR7WLzmM.js';
1
+ import { k as getRenderingRef, l as forceUpdate } from './p-BdiUKin5.js';
2
2
 
3
3
  const appendToMap = (map, propName, value) => {
4
4
  const items = map.get(propName);
@@ -254,6 +254,6 @@ onChange('data', value => {
254
254
  });
255
255
 
256
256
  export { createStore as a, configStore as c };
257
- //# sourceMappingURL=p-DUQ46MUh.js.map
257
+ //# sourceMappingURL=p-BGXbWUJg.js.map
258
258
 
259
- //# sourceMappingURL=p-DUQ46MUh.js.map
259
+ //# sourceMappingURL=p-BGXbWUJg.js.map
@@ -1 +1 @@
1
- {"file":"p-DUQ46MUh.js","mappings":";;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAA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js","store/config.store.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\r\n\r\n// 定义配置数据的类型\r\nexport interface ConfigData {\r\n [key: string]: any;\r\n}\r\n\r\n// 从localStorage获取初始配置\r\nconst getInitialConfig = (): ConfigData => {\r\n try {\r\n const storedConfig = localStorage.getItem('pcm-sdk-config-data');\r\n return storedConfig ? JSON.parse(storedConfig) : {};\r\n } catch (error) {\r\n console.error('Error parsing stored config:', error);\r\n return {};\r\n }\r\n};\r\n\r\n// 创建配置存储\r\nexport const { state: configState, onChange } = createStore<{\r\n data: ConfigData;\r\n}>({\r\n data: getInitialConfig()\r\n});\r\n\r\n// 配置存储的辅助方法\r\nexport const configStore = {\r\n // 获取整个配置对象\r\n getConfig: (): ConfigData => configState.data,\r\n \r\n // 获取特定配置项\r\n getItem: <T>(key: string, defaultValue?: T): T => {\r\n return configState.data[key] !== undefined ? configState.data[key] : defaultValue;\r\n },\r\n \r\n // 设置特定配置项\r\n setItem: <T>(key: string, value: T): void => {\r\n configState.data = {\r\n ...configState.data,\r\n [key]: value\r\n };\r\n },\r\n \r\n // 移除特定配置项\r\n removeItem: (key: string): void => {\r\n const newConfig = { ...configState.data };\r\n delete newConfig[key];\r\n configState.data = newConfig;\r\n },\r\n \r\n // 清除所有配置\r\n clear: (): void => {\r\n configState.data = {};\r\n },\r\n \r\n // 批量更新配置\r\n updateConfig: (newConfig: Partial<ConfigData>): void => {\r\n configState.data = {\r\n ...configState.data,\r\n ...newConfig\r\n };\r\n }\r\n};\r\n\r\n// 自动保存到localStorage\r\nonChange('data', value => {\r\n try {\r\n if (Object.keys(value).length > 0) {\r\n localStorage.setItem('pcm-sdk-config-data', JSON.stringify(value));\r\n } else {\r\n localStorage.removeItem('pcm-sdk-config-data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,YAAY,CAAC,UAAU,CAAC,qBAAqB,CAAC;;;IAEhD,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAK,CAAC;;AAEhE,CAAC,CAAC;;;;","names":[],"sources":["node_modules/.pnpm/@stencil+store@2.1.3_@stencil+core@4.35.1/node_modules/@stencil/store/dist/index.js","store/config.store.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\n\n// 定义配置数据的类型\nexport interface ConfigData {\n [key: string]: any;\n}\n\n// 从localStorage获取初始配置\nconst getInitialConfig = (): ConfigData => {\n try {\n const storedConfig = localStorage.getItem('pcm-sdk-config-data');\n return storedConfig ? JSON.parse(storedConfig) : {};\n } catch (error) {\n console.error('Error parsing stored config:', error);\n return {};\n }\n};\n\n// 创建配置存储\nexport const { state: configState, onChange } = createStore<{\n data: ConfigData;\n}>({\n data: getInitialConfig()\n});\n\n// 配置存储的辅助方法\nexport const configStore = {\n // 获取整个配置对象\n getConfig: (): ConfigData => configState.data,\n \n // 获取特定配置项\n getItem: <T>(key: string, defaultValue?: T): T => {\n return configState.data[key] !== undefined ? configState.data[key] : defaultValue;\n },\n \n // 设置特定配置项\n setItem: <T>(key: string, value: T): void => {\n configState.data = {\n ...configState.data,\n [key]: value\n };\n },\n \n // 移除特定配置项\n removeItem: (key: string): void => {\n const newConfig = { ...configState.data };\n delete newConfig[key];\n configState.data = newConfig;\n },\n \n // 清除所有配置\n clear: (): void => {\n configState.data = {};\n },\n \n // 批量更新配置\n updateConfig: (newConfig: Partial<ConfigData>): void => {\n configState.data = {\n ...configState.data,\n ...newConfig\n };\n }\n};\n\n// 自动保存到localStorage\nonChange('data', value => {\n try {\n if (Object.keys(value).length > 0) {\n localStorage.setItem('pcm-sdk-config-data', JSON.stringify(value));\n } else {\n localStorage.removeItem('pcm-sdk-config-data');\n }\n } catch (error) {\n console.error('Error saving config to localStorage:', error);\n }\n}); "],"version":3}
@@ -1,32 +1,5 @@
1
- import { c as configStore } from './index-GyOE8SlD.js';
2
- import { s as setUser, a as setContext, c as captureException, b as captureMessage } from './exports-Bs-zO1WZ.js';
3
-
4
- class ErrorEventBus {
5
- /**
6
- * 触发错误事件
7
- */
8
- static emitError(detail) {
9
- const event = new CustomEvent('pcm-error', {
10
- bubbles: true,
11
- composed: true,
12
- detail
13
- });
14
- document.dispatchEvent(event);
15
- }
16
- /**
17
- * 添加错误事件监听器
18
- */
19
- static addErrorListener(callback) {
20
- const handler = (event) => {
21
- callback(event.detail);
22
- };
23
- document.addEventListener('pcm-error', handler);
24
- // 返回移除监听器的函数
25
- return () => {
26
- document.removeEventListener('pcm-error', handler);
27
- };
28
- }
29
- }
1
+ import { c as configStore } from './p-BGXbWUJg.js';
2
+ import { e as setUser, f as setContext, i as captureException, j as captureMessage } from './p-BdiUKin5.js';
30
3
 
31
4
  /**
32
5
  * Sentry事件上报工具类
@@ -91,7 +64,7 @@ class SentryReporter {
91
64
  }
92
65
  }
93
66
 
94
- export { ErrorEventBus as E, SentryReporter as S };
95
- //# sourceMappingURL=sentry-reporter-BFBS363a.js.map
67
+ export { SentryReporter as S };
68
+ //# sourceMappingURL=p-BW3r6Lrf.js.map
96
69
 
97
- //# sourceMappingURL=sentry-reporter-BFBS363a.js.map
70
+ //# sourceMappingURL=p-BW3r6Lrf.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-BW3r6Lrf.js","mappings":";;;AAGA;;;AAGG;MACU,cAAc,CAAA;AAEzB;;;;AAIG;AACH,IAAA,OAAO,YAAY,CAAC,KAAU,EAAE,OAAkD,EAAA;AAChF,QAAA,IAAI;;YAEF,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC;YAClD,IAAI,KAAK,EAAE;AACT,gBAAAA,OAAc,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;;YAGvC,IAAI,UAAU,GAAG,KAAK;;AAGtB,YAAA,IAAI,OAAO,EAAE,KAAK,EAAE;gBAClB,UAAU,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AACrC,gBAAA,IAAI,KAAK,EAAE,KAAK,EAAE;AAChB,oBAAA,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK;;AAEhC,gBAAA,UAAU,CAAC,KAAK,GAAG,KAAK;;;YAI1B,IAAI,OAAO,EAAE;gBACX,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO;AAC1C,gBAAAC,UAAiB,CAAC,eAAe,EAAE,YAAY,CAAC;;;AAIlD,YAAAC,gBAAuB,CAAC,UAAU,CAAC;;QACnC,OAAO,CAAC,EAAE;AACV,YAAA,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;;;AAItC;;;;AAIG;AACH,IAAA,OAAO,cAAc,CAAC,OAAe,EAAE,OAA6B,EAAA;AAClE,QAAA,IAAI;;YAEF,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC;YAClD,IAAI,KAAK,EAAE;AACT,gBAAAF,OAAc,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;;;YAIvC,IAAI,OAAO,EAAE;AACX,gBAAAC,UAAiB,CAAC,iBAAiB,EAAE,OAAO,CAAC;;;AAI/C,YAAAE,cAAqB,CAAC,OAAO,CAAC;;QAC9B,OAAO,CAAC,EAAE;AACV,YAAA,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;;;AAIvC;;;;","names":["Sentry.setUser","Sentry.setContext","Sentry.captureException","Sentry.captureMessage"],"sources":["src/utils/sentry-reporter.ts"],"sourcesContent":["import * as Sentry from \"@sentry/browser\";\nimport { configStore } from \"../../store/config.store\";\n\n/**\n * Sentry事件上报工具类\n * 提供统一的错误上报接口,自动添加用户认证信息\n */\nexport class SentryReporter {\n\n /**\n * 捕获并上报错误\n * @param error 错误对象\n * @param context 错误上下文\n */\n static captureError(error: any, context?: Record<string, any> & { title?: string }): void {\n try {\n // 添加认证信息\n const CUser = configStore.getItem('pcm-sdk-CUser');\n if (CUser) {\n Sentry.setUser({ id: String(CUser) });\n }\n \n let finalError = error;\n \n // 如果提供了自定义标题,创建新的错误对象\n if (context?.title) {\n finalError = new Error(context.title);\n if (error?.stack) {\n finalError.stack = error.stack;\n }\n finalError.cause = error;\n }\n \n // 添加上下文\n if (context) {\n const { title, ...otherContext } = context;\n Sentry.setContext('error_context', otherContext);\n }\n \n // 上报错误\n Sentry.captureException(finalError);\n } catch (e) {\n console.error('Sentry 上报错误失败:', e);\n }\n }\n\n /**\n * 捕获并上报消息\n * @param message 消息内容\n * @param context 消息上下文\n */\n static captureMessage(message: string, context?: Record<string, any>): void {\n try {\n // 添加认证信息\n const CUser = configStore.getItem('pcm-sdk-CUser');\n if (CUser) {\n Sentry.setUser({ id: String(CUser) });\n }\n \n // 添加上下文\n if (context) {\n Sentry.setContext('message_context', context);\n }\n \n // 上报消息\n Sentry.captureMessage(message);\n } catch (e) {\n console.error('Sentry 上报消息失败:', e);\n }\n }\n\n}"],"version":3}