pcm-agents 1.0.18 → 1.0.19

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 (214) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/app-globals-BIO4q6tX.js.map +1 -1
  3. package/dist/cjs/components-chat-message_33.cjs.entry.js +54 -2317
  4. package/dist/cjs/components-chat-message_33.cjs.entry.js.map +1 -1
  5. package/dist/cjs/components-oem-virtual-chat-modal.cjs.entry.js +2 -2
  6. package/dist/cjs/{conversation-utils-BmxHPKOt.js → conversation-utils-CKlwCDRf.js} +4 -4
  7. package/dist/cjs/{conversation-utils-BmxHPKOt.js.map → conversation-utils-CKlwCDRf.js.map} +1 -1
  8. package/dist/cjs/{index-BivNZVuE.js → index-DLbq5wiz.js} +3 -3
  9. package/dist/cjs/{index-BivNZVuE.js.map → index-DLbq5wiz.js.map} +1 -1
  10. package/dist/cjs/index.cjs.js +1 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/markdown-C0QWZi9Q.js +2674 -0
  13. package/dist/cjs/{markdown-D3_atg0b.js.map → markdown-C0QWZi9Q.js.map} +1 -1
  14. package/dist/cjs/oem-cast-modal.cjs.entry.js +1 -1
  15. package/dist/cjs/oem-htws-modal.cjs.entry.js +1 -1
  16. package/dist/cjs/oem-jd-modal.cjs.entry.js +2 -2
  17. package/dist/cjs/oem-jlpp-modal.cjs.entry.js +1 -1
  18. package/dist/cjs/oem-jlzz-modal.cjs.entry.js +1 -1
  19. package/dist/cjs/oem-mnct-modal.cjs.entry.js +1 -1
  20. package/dist/cjs/oem-mnms-modal.cjs.entry.js +1 -1
  21. package/dist/cjs/oem-qgqjl-modal.cjs.entry.js +3 -3
  22. package/dist/cjs/pcm-agents.cjs.js +1 -1
  23. package/dist/cjs/pcm-hr-chat-modal.cjs.entry.js +2 -2
  24. package/dist/cjs/pcm-jlsx-modal.cjs.entry.js +3 -3
  25. package/dist/cjs/{sentry-reporter-Ck3EoJAs.js → sentry-reporter-BmrqhSKs.js} +3 -3
  26. package/dist/cjs/{sentry-reporter-Ck3EoJAs.js.map → sentry-reporter-BmrqhSKs.js.map} +1 -1
  27. package/dist/collection/components/components-upload/components-upload.js +1 -1
  28. package/dist/collection/components/components-voice-input-btn/components-voice-input-btn.css +67 -67
  29. package/dist/collection/components/components-voice-input-btn/components-voice-input-btn.js +2 -2
  30. package/dist/collection/components/components-voice-input-btn/components-voice-input-btn.js.map +1 -1
  31. package/dist/collection/components/oem-cast-modal/oem-cast-modal.js +1 -1
  32. package/dist/collection/components/oem-zygh-modal/oem-zygh-modal.js +1 -1
  33. package/dist/collection/components/pcm-htws-modal/pcm-htws-modal.js +26 -1
  34. package/dist/collection/components/pcm-htws-modal/pcm-htws-modal.js.map +1 -1
  35. package/dist/collection/components/pcm-hyzj-modal/pcm-hyzj-modal.js +26 -1
  36. package/dist/collection/components/pcm-hyzj-modal/pcm-hyzj-modal.js.map +1 -1
  37. package/dist/collection/components/pcm-jd-modal/pcm-jd-modal.js +26 -1
  38. package/dist/collection/components/pcm-jd-modal/pcm-jd-modal.js.map +1 -1
  39. package/dist/collection/components/pcm-mnct-modal/pcm-mnct-modal.js +26 -1
  40. package/dist/collection/components/pcm-mnct-modal/pcm-mnct-modal.js.map +1 -1
  41. package/dist/collection/components/pcm-msbg-modal/pcm-msbg-modal.js +26 -1
  42. package/dist/collection/components/pcm-msbg-modal/pcm-msbg-modal.js.map +1 -1
  43. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js +26 -1
  44. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js.map +1 -1
  45. package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.js +27 -2
  46. package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.js.map +1 -1
  47. package/dist/collection/components/pcm-zygh-v2-modal/pcm-zygh-v2-modal.js +27 -2
  48. package/dist/collection/components/pcm-zygh-v2-modal/pcm-zygh-v2-modal.js.map +1 -1
  49. package/dist/components/components-chat-message.js +1 -1
  50. package/dist/components/components-digital-human.js +1 -1
  51. package/dist/components/components-export-records-modal.js +1 -1
  52. package/dist/components/components-mobile-input-btn.js +1 -1
  53. package/dist/components/components-mobile-upload-btn.js +1 -1
  54. package/dist/components/components-oem-virtual-chat-modal.js +1 -1
  55. package/dist/components/components-position-selector.js +1 -1
  56. package/dist/components/components-thousand-resume-wrapper.js +1 -1
  57. package/dist/components/components-upload.js +1 -1
  58. package/dist/components/components-voice-input-btn.js +1 -1
  59. package/dist/components/index.js +1 -1
  60. package/dist/components/index.js.map +1 -1
  61. package/dist/components/oem-cast-modal.js +1 -1
  62. package/dist/components/oem-htws-modal.js +5 -5
  63. package/dist/components/oem-jd-modal.js +5 -5
  64. package/dist/components/oem-jlpp-modal.js +7 -7
  65. package/dist/components/oem-jlsx-modal.js +6 -6
  66. package/dist/components/oem-jlzz-modal.js +5 -5
  67. package/dist/components/oem-mnct-modal.js +7 -7
  68. package/dist/components/oem-mnms-modal.js +8 -8
  69. package/dist/components/oem-qgqjl-modal.js +9 -9
  70. package/dist/components/oem-zygh-modal.js +5 -5
  71. package/dist/components/{p-BYD6-WNq.js → p-BFBILVHb.js} +3 -3
  72. package/dist/components/{p-BYD6-WNq.js.map → p-BFBILVHb.js.map} +1 -1
  73. package/dist/components/{p-CyUWH4Mj.js → p-BM8LfA-I.js} +4 -4
  74. package/dist/components/{p-CyUWH4Mj.js.map → p-BM8LfA-I.js.map} +1 -1
  75. package/dist/components/{p-ssn_a1iK.js → p-BMyYj4Nh.js} +3 -3
  76. package/dist/components/{p-ssn_a1iK.js.map → p-BMyYj4Nh.js.map} +1 -1
  77. package/dist/components/{p-BWUzAm4p.js → p-BbgkkZ8z.js} +3 -3
  78. package/dist/components/{p-BWUzAm4p.js.map → p-BbgkkZ8z.js.map} +1 -1
  79. package/dist/components/{p-BG6NTTpT.js → p-BsVthfPT.js} +4 -4
  80. package/dist/components/{p-BG6NTTpT.js.map → p-BsVthfPT.js.map} +1 -1
  81. package/dist/components/{p-A3F6YFmx.js → p-C5cxtSmw.js} +3 -3
  82. package/dist/components/{p-A3F6YFmx.js.map → p-C5cxtSmw.js.map} +1 -1
  83. package/dist/components/{p-Bry80jQE.js → p-CRuYvhDS.js} +3 -3
  84. package/dist/components/{p-Bry80jQE.js.map → p-CRuYvhDS.js.map} +1 -1
  85. package/dist/components/{p-CXalGxO1.js → p-CUgq8UDs.js} +4 -4
  86. package/dist/components/p-CUgq8UDs.js.map +1 -0
  87. package/dist/components/{p-CNf8b_lT.js → p-ChHHPVqa.js} +6 -6
  88. package/dist/components/{p-CNf8b_lT.js.map → p-ChHHPVqa.js.map} +1 -1
  89. package/dist/components/p-CnhOGURu.js +2671 -0
  90. package/dist/components/p-CnhOGURu.js.map +1 -0
  91. package/dist/components/{p-nhuWyXIB.js → p-DMxCytIw.js} +3 -3
  92. package/dist/components/{p-nhuWyXIB.js.map → p-DMxCytIw.js.map} +1 -1
  93. package/dist/components/{p-DLLeEB9s.js → p-DW7If7Qd.js} +4 -5
  94. package/dist/components/p-DW7If7Qd.js.map +1 -0
  95. package/dist/components/{p-0BR5lZiC.js → p-OFgPkEGL.js} +4 -4
  96. package/dist/components/{p-0BR5lZiC.js.map → p-OFgPkEGL.js.map} +1 -1
  97. package/dist/components/{p-CdHCR-Rr.js → p-aK_x2dmu.js} +3 -3
  98. package/dist/components/{p-CdHCR-Rr.js.map → p-aK_x2dmu.js.map} +1 -1
  99. package/dist/components/{p-C-x5thNz.js → p-sXNEbeK0.js} +3 -3
  100. package/dist/components/{p-C-x5thNz.js.map → p-sXNEbeK0.js.map} +1 -1
  101. package/dist/components/pcm-1zhanshi-mnms-modal.js +5 -5
  102. package/dist/components/pcm-app-chat-modal.js +1 -1
  103. package/dist/components/pcm-ats-mnms-modal.js +5 -5
  104. package/dist/components/pcm-card.js +1 -1
  105. package/dist/components/pcm-hr-chat-modal.js +2 -2
  106. package/dist/components/pcm-htws-modal.js +15 -9
  107. package/dist/components/pcm-htws-modal.js.map +1 -1
  108. package/dist/components/pcm-hyzj-modal.js +12 -6
  109. package/dist/components/pcm-hyzj-modal.js.map +1 -1
  110. package/dist/components/pcm-jd-modal.js +13 -7
  111. package/dist/components/pcm-jd-modal.js.map +1 -1
  112. package/dist/components/pcm-jlpp-modal.js +8 -8
  113. package/dist/components/pcm-jlsx-modal.js +6 -6
  114. package/dist/components/pcm-jlzz-modal.js +6 -6
  115. package/dist/components/pcm-mnct-modal.js +14 -8
  116. package/dist/components/pcm-mnct-modal.js.map +1 -1
  117. package/dist/components/pcm-mnms-modal.js +8 -8
  118. package/dist/components/pcm-mnms-zp-modal.js +8 -8
  119. package/dist/components/pcm-msbg-modal.js +12 -6
  120. package/dist/components/pcm-msbg-modal.js.map +1 -1
  121. package/dist/components/pcm-qgqjl-modal.js +16 -10
  122. package/dist/components/pcm-qgqjl-modal.js.map +1 -1
  123. package/dist/components/pcm-virtual-chat-modal.js +1 -1
  124. package/dist/components/pcm-zsk-chat-modal.js +3 -3
  125. package/dist/components/pcm-zygh-modal.js +14 -8
  126. package/dist/components/pcm-zygh-modal.js.map +1 -1
  127. package/dist/components/pcm-zygh-v2-modal.js +14 -8
  128. package/dist/components/pcm-zygh-v2-modal.js.map +1 -1
  129. package/dist/esm/app-globals-Chti62re.js.map +1 -1
  130. package/dist/esm/components-chat-message_33.entry.js +54 -2317
  131. package/dist/esm/components-chat-message_33.entry.js.map +1 -1
  132. package/dist/esm/components-oem-virtual-chat-modal.entry.js +2 -2
  133. package/dist/esm/{conversation-utils-fCK0sgM1.js → conversation-utils-BGcxaSyr.js} +4 -4
  134. package/dist/esm/{conversation-utils-fCK0sgM1.js.map → conversation-utils-BGcxaSyr.js.map} +1 -1
  135. package/dist/esm/{index-D7qB8ZCs.js → index-BaYctFVD.js} +3 -3
  136. package/dist/esm/{index-D7qB8ZCs.js.map → index-BaYctFVD.js.map} +1 -1
  137. package/dist/esm/index.js +1 -1
  138. package/dist/esm/loader.js +1 -1
  139. package/dist/esm/markdown-CnhOGURu.js +2671 -0
  140. package/dist/esm/{markdown-DcmYnk0q.js.map → markdown-CnhOGURu.js.map} +1 -1
  141. package/dist/esm/oem-cast-modal.entry.js +1 -1
  142. package/dist/esm/oem-htws-modal.entry.js +1 -1
  143. package/dist/esm/oem-jd-modal.entry.js +2 -2
  144. package/dist/esm/oem-jlpp-modal.entry.js +1 -1
  145. package/dist/esm/oem-jlzz-modal.entry.js +1 -1
  146. package/dist/esm/oem-mnct-modal.entry.js +1 -1
  147. package/dist/esm/oem-mnms-modal.entry.js +1 -1
  148. package/dist/esm/oem-qgqjl-modal.entry.js +3 -3
  149. package/dist/esm/pcm-agents.js +1 -1
  150. package/dist/esm/pcm-hr-chat-modal.entry.js +2 -2
  151. package/dist/esm/pcm-jlsx-modal.entry.js +3 -3
  152. package/dist/esm/{sentry-reporter-CAPKrssw.js → sentry-reporter-CQ8bX8AM.js} +3 -3
  153. package/dist/esm/{sentry-reporter-CAPKrssw.js.map → sentry-reporter-CQ8bX8AM.js.map} +1 -1
  154. package/dist/pcm-agents/index.esm.js +1 -1
  155. package/dist/pcm-agents/{p-ae9f3219.entry.js → p-07d0bfa5.entry.js} +2 -2
  156. package/dist/pcm-agents/{p-e908843d.entry.js → p-415d021b.entry.js} +2 -2
  157. package/dist/pcm-agents/{p-4a3091a0.entry.js → p-52b8396f.entry.js} +2 -2
  158. package/dist/pcm-agents/{p-713ee0b3.entry.js → p-85b37d21.entry.js} +2 -2
  159. package/dist/pcm-agents/{p-2acf8d44.entry.js → p-86c15766.entry.js} +2 -2
  160. package/dist/pcm-agents/{p-b45645c2.entry.js → p-900ade9f.entry.js} +2 -2
  161. package/dist/pcm-agents/{p-C1T6GEE8.js → p-BUe4kiCQ.js} +2 -2
  162. package/dist/pcm-agents/{p-C1T6GEE8.js.map → p-BUe4kiCQ.js.map} +1 -1
  163. package/dist/pcm-agents/p-CeRTfvY9.js.map +1 -1
  164. package/dist/pcm-agents/p-CnhOGURu.js +2 -0
  165. package/dist/pcm-agents/{p-DcmYnk0q.js.map → p-CnhOGURu.js.map} +1 -1
  166. package/dist/pcm-agents/{p-Cgydfo3f.js → p-DpK1mBu7.js} +2 -2
  167. package/dist/pcm-agents/{p-Cgydfo3f.js.map → p-DpK1mBu7.js.map} +1 -1
  168. package/dist/pcm-agents/{p-MWaXn7-C.js → p-DzZpAxqF.js} +2 -2
  169. package/dist/pcm-agents/{p-MWaXn7-C.js.map → p-DzZpAxqF.js.map} +1 -1
  170. package/dist/pcm-agents/{p-e18cbbc1.entry.js → p-a33ebff7.entry.js} +2 -2
  171. package/dist/pcm-agents/{p-081b9fcf.entry.js → p-be640465.entry.js} +2 -2
  172. package/dist/pcm-agents/{p-19e22dee.entry.js → p-c95e6896.entry.js} +2 -2
  173. package/dist/pcm-agents/{p-50af907f.entry.js → p-cd2844d8.entry.js} +2 -2
  174. package/dist/pcm-agents/{p-08b41c0c.entry.js → p-d25b1c70.entry.js} +2 -2
  175. package/dist/pcm-agents/p-f2445cbd.entry.js +8 -0
  176. package/dist/pcm-agents/p-f2445cbd.entry.js.map +1 -0
  177. package/dist/pcm-agents/pcm-agents.esm.js +1 -1
  178. package/dist/types/components/pcm-htws-modal/pcm-htws-modal.d.ts +5 -0
  179. package/dist/types/components/pcm-hyzj-modal/pcm-hyzj-modal.d.ts +5 -0
  180. package/dist/types/components/pcm-jd-modal/pcm-jd-modal.d.ts +5 -0
  181. package/dist/types/components/pcm-mnct-modal/pcm-mnct-modal.d.ts +5 -0
  182. package/dist/types/components/pcm-msbg-modal/pcm-msbg-modal.d.ts +5 -0
  183. package/dist/types/components/pcm-qgqjl-modal/pcm-qgqjl-modal.d.ts +5 -0
  184. package/dist/types/components/pcm-zygh-modal/pcm-zygh-modal.d.ts +5 -0
  185. package/dist/types/components/pcm-zygh-v2-modal/pcm-zygh-v2-modal.d.ts +5 -0
  186. package/dist/types/components.d.ts +64 -0
  187. package/package.json +1 -1
  188. package/readme.md +307 -307
  189. package/dist/cjs/markdown-D3_atg0b.js +0 -2564
  190. package/dist/components/p-B85MJLTf.js +0 -8
  191. package/dist/components/p-B85MJLTf.js.map +0 -1
  192. package/dist/components/p-CXalGxO1.js.map +0 -1
  193. package/dist/components/p-D483moFs.js +0 -2310
  194. package/dist/components/p-D483moFs.js.map +0 -1
  195. package/dist/components/p-DLLeEB9s.js.map +0 -1
  196. package/dist/components/p-DuXrU5Qi.js +0 -2559
  197. package/dist/components/p-DuXrU5Qi.js.map +0 -1
  198. package/dist/esm/markdown-DcmYnk0q.js +0 -2561
  199. package/dist/pcm-agents/p-4c6e5c43.entry.js +0 -8
  200. package/dist/pcm-agents/p-4c6e5c43.entry.js.map +0 -1
  201. package/dist/pcm-agents/p-DcmYnk0q.js +0 -2
  202. /package/dist/pcm-agents/{p-ae9f3219.entry.js.map → p-07d0bfa5.entry.js.map} +0 -0
  203. /package/dist/pcm-agents/{p-e908843d.entry.js.map → p-415d021b.entry.js.map} +0 -0
  204. /package/dist/pcm-agents/{p-4a3091a0.entry.js.map → p-52b8396f.entry.js.map} +0 -0
  205. /package/dist/pcm-agents/{p-713ee0b3.entry.js.map → p-85b37d21.entry.js.map} +0 -0
  206. /package/dist/pcm-agents/{p-2acf8d44.entry.js.map → p-86c15766.entry.js.map} +0 -0
  207. /package/dist/pcm-agents/{p-b45645c2.entry.js.map → p-900ade9f.entry.js.map} +0 -0
  208. /package/dist/pcm-agents/{p-e18cbbc1.entry.js.map → p-a33ebff7.entry.js.map} +0 -0
  209. /package/dist/pcm-agents/{p-081b9fcf.entry.js.map → p-be640465.entry.js.map} +0 -0
  210. /package/dist/pcm-agents/{p-19e22dee.entry.js.map → p-c95e6896.entry.js.map} +0 -0
  211. /package/dist/pcm-agents/{p-50af907f.entry.js.map → p-cd2844d8.entry.js.map} +0 -0
  212. /package/dist/pcm-agents/{p-08b41c0c.entry.js.map → p-d25b1c70.entry.js.map} +0 -0
  213. /package/dist/types/code/{agents-sdk → sdk}/packages/pcm-agents/.stencil/store/auth.store.d.ts +0 -0
  214. /package/dist/types/code/{agents-sdk → sdk}/packages/pcm-agents/.stencil/store/config.store.d.ts +0 -0
@@ -0,0 +1,8 @@
1
+ import{r as e,c as t,g as o,h as i}from"./p-Bq0K-WqZ.js";import{g as n,r}from"./p-CnhOGURu.js";import{s as a,k as s,i as l,c as d,P as c,l as p,a as h,v as f,b as u,F as g,u as m,m as b,n as x,e as w,j as y,h as v,f as k,g as z}from"./p-DpK1mBu7.js";import{E as C}from"./p-C0FYX2-Z.js";import{S as I}from"./p-BUe4kiCQ.js";import{M as j}from"./p-D39f_W8k.js";import S from"qrcode-generator";import{s as _}from"./p-DnoxSHNP.js";import{f as T}from"./p-DzZpAxqF.js";import"./p-Bs-zO1WZ.js";var F={exports:{}};
2
+ /*!
3
+ * clipboard.js v2.0.11
4
+ * https://clipboardjs.com/
5
+ *
6
+ * Licensed MIT © Zeno Rocha
7
+ */var E=F.exports;var M;function D(){if(M)return F.exports;M=1;(function(e,t){(function t(o,i){e.exports=i()})(E,(function(){return function(){var e={686:function(e,t,o){o.d(t,{default:function(){return M}});var i=o(279);var n=o.n(i);var r=o(370);var a=o.n(r);var s=o(817);var l=o.n(s);function d(e){try{return document.execCommand(e)}catch(e){return false}}var c=function e(t){var o=l()(t);d("cut");return o};var p=c;function h(e){var t=document.documentElement.getAttribute("dir")==="rtl";var o=document.createElement("textarea");o.style.fontSize="12pt";o.style.border="0";o.style.padding="0";o.style.margin="0";o.style.position="absolute";o.style[t?"right":"left"]="-9999px";var i=window.pageYOffset||document.documentElement.scrollTop;o.style.top="".concat(i,"px");o.setAttribute("readonly","");o.value=e;return o}var f=function e(t,o){var i=h(t);o.container.appendChild(i);var n=l()(i);d("copy");i.remove();return n};var u=function e(t){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{container:document.body};var i="";if(typeof t==="string"){i=f(t,o)}else if(t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(t===null||t===void 0?void 0:t.type)){i=f(t.value,o)}else{i=l()(t);d("copy")}return i};var g=u;function m(e){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){m=function e(t){return typeof t}}else{m=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return m(e)}var b=function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var o=t.action,i=o===void 0?"copy":o,n=t.container,r=t.target,a=t.text;if(i!=="copy"&&i!=="cut"){throw new Error('Invalid "action" value, use either "copy" or "cut"')}if(r!==undefined){if(r&&m(r)==="object"&&r.nodeType===1){if(i==="copy"&&r.hasAttribute("disabled")){throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute')}if(i==="cut"&&(r.hasAttribute("readonly")||r.hasAttribute("disabled"))){throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}}else{throw new Error('Invalid "target" value, use a valid Element')}}if(a){return g(a,{container:n})}if(r){return i==="cut"?p(r):g(r,{container:n})}};var x=b;function w(e){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){w=function e(t){return typeof t}}else{w=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return w(e)}function y(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function v(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}function k(e,t,o){if(t)v(e.prototype,t);if(o)v(e,o);return e}function z(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}});if(t)C(e,t)}function C(e,t){C=Object.setPrototypeOf||function e(t,o){t.__proto__=o;return t};return C(e,t)}function I(e){var t=_();return function o(){var i=T(e),n;if(t){var r=T(this).constructor;n=Reflect.construct(i,arguments,r)}else{n=i.apply(this,arguments)}return j(this,n)}}function j(e,t){if(t&&(w(t)==="object"||typeof t==="function")){return t}return S(e)}function S(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function _(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return true}catch(e){return false}}function T(e){T=Object.setPrototypeOf?Object.getPrototypeOf:function e(t){return t.__proto__||Object.getPrototypeOf(t)};return T(e)}function F(e,t){var o="data-clipboard-".concat(e);if(!t.hasAttribute(o)){return}return t.getAttribute(o)}var E=function(e){z(o,e);var t=I(o);function o(e,i){var n;y(this,o);n=t.call(this);n.resolveOptions(i);n.listenClick(e);return n}k(o,[{key:"resolveOptions",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.action=typeof t.action==="function"?t.action:this.defaultAction;this.target=typeof t.target==="function"?t.target:this.defaultTarget;this.text=typeof t.text==="function"?t.text:this.defaultText;this.container=w(t.container)==="object"?t.container:document.body}},{key:"listenClick",value:function e(t){var o=this;this.listener=a()(t,"click",(function(e){return o.onClick(e)}))}},{key:"onClick",value:function e(t){var o=t.delegateTarget||t.currentTarget;var i=this.action(o)||"copy";var n=x({action:i,container:this.container,target:this.target(o),text:this.text(o)});this.emit(n?"success":"error",{action:i,text:n,trigger:o,clearSelection:function e(){if(o){o.focus()}window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function e(t){return F("action",t)}},{key:"defaultTarget",value:function e(t){var o=F("target",t);if(o){return document.querySelector(o)}}},{key:"defaultText",value:function e(t){return F("text",t)}},{key:"destroy",value:function e(){this.listener.destroy()}}],[{key:"copy",value:function e(t){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{container:document.body};return g(t,o)}},{key:"cut",value:function e(t){return p(t)}},{key:"isSupported",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:["copy","cut"];var o=typeof t==="string"?[t]:t;var i=!!document.queryCommandSupported;o.forEach((function(e){i=i&&!!document.queryCommandSupported(e)}));return i}}]);return o}(n());var M=E},828:function(e){var t=9;if(typeof Element!=="undefined"&&!Element.prototype.matches){var o=Element.prototype;o.matches=o.matchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||o.webkitMatchesSelector}function i(e,o){while(e&&e.nodeType!==t){if(typeof e.matches==="function"&&e.matches(o)){return e}e=e.parentNode}}e.exports=i},438:function(e,t,o){var i=o(828);function n(e,t,o,i,n){var r=a.apply(this,arguments);e.addEventListener(o,r,n);return{destroy:function(){e.removeEventListener(o,r,n)}}}function r(e,t,o,i,r){if(typeof e.addEventListener==="function"){return n.apply(null,arguments)}if(typeof o==="function"){return n.bind(null,document).apply(null,arguments)}if(typeof e==="string"){e=document.querySelectorAll(e)}return Array.prototype.map.call(e,(function(e){return n(e,t,o,i,r)}))}function a(e,t,o,n){return function(o){o.delegateTarget=i(o.target,t);if(o.delegateTarget){n.call(e,o)}}}e.exports=r},879:function(e,t){t.node=function(e){return e!==undefined&&e instanceof HTMLElement&&e.nodeType===1};t.nodeList=function(e){var o=Object.prototype.toString.call(e);return e!==undefined&&(o==="[object NodeList]"||o==="[object HTMLCollection]")&&"length"in e&&(e.length===0||t.node(e[0]))};t.string=function(e){return typeof e==="string"||e instanceof String};t.fn=function(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"}},370:function(e,t,o){var i=o(879);var n=o(438);function r(e,t,o){if(!e&&!t&&!o){throw new Error("Missing required arguments")}if(!i.string(t)){throw new TypeError("Second argument must be a String")}if(!i.fn(o)){throw new TypeError("Third argument must be a Function")}if(i.node(e)){return a(e,t,o)}else if(i.nodeList(e)){return s(e,t,o)}else if(i.string(e)){return l(e,t,o)}else{throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}}function a(e,t,o){e.addEventListener(t,o);return{destroy:function(){e.removeEventListener(t,o)}}}function s(e,t,o){Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,o)}));return{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,o)}))}}}function l(e,t,o){return n(document.body,e,t,o)}e.exports=r},817:function(e){function t(e){var t;if(e.nodeName==="SELECT"){e.focus();t=e.value}else if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){var o=e.hasAttribute("readonly");if(!o){e.setAttribute("readonly","")}e.select();e.setSelectionRange(0,e.value.length);if(!o){e.removeAttribute("readonly")}t=e.value}else{if(e.hasAttribute("contenteditable")){e.focus()}var i=window.getSelection();var n=document.createRange();n.selectNodeContents(e);i.removeAllRanges();i.addRange(n);t=i.toString()}return t}e.exports=t},279:function(e){function t(){}t.prototype={on:function(e,t,o){var i=this.e||(this.e={});(i[e]||(i[e]=[])).push({fn:t,ctx:o});return this},once:function(e,t,o){var i=this;function n(){i.off(e,n);t.apply(o,arguments)}n._=t;return this.on(e,n,o)},emit:function(e){var t=[].slice.call(arguments,1);var o=((this.e||(this.e={}))[e]||[]).slice();var i=0;var n=o.length;for(i;i<n;i++){o[i].fn.apply(o[i].ctx,t)}return this},off:function(e,t){var o=this.e||(this.e={});var i=o[e];var n=[];if(i&&t){for(var r=0,a=i.length;r<a;r++){if(i[r].fn!==t&&i[r].fn._!==t)n.push(i[r])}}n.length?o[e]=n:delete o[e];return this}};e.exports=t;e.exports.TinyEmitter=t}};var t={};function o(i){if(t[i]){return t[i].exports}var n=t[i]={exports:{}};e[i](n,n.exports,o);return n.exports}!function(){o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};o.d(t,{a:t});return t}}();!function(){o.d=function(e,t){for(var i in t){if(o.o(t,i)&&!o.o(e,i)){Object.defineProperty(e,i,{enumerable:true,get:t[i]})}}}}();!function(){o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}();return o(686)}().default}))})(F);return F.exports}var B=D();var R=n(B);const O="复制";const H="重试";const A="保存到职位库";const L="内容已复制到剪贴板";const P="保存成功";const q="保存失败";const $="解析JSON失败";const U="正在加载视频...";const N="请稍等...";const V="处理中...";const W="赞";const J="踩";const Q="附件信息";const Y="您的浏览器不支持视频播放。";const G="职位信息";const X="评估规则";var K={copy:O,retry:H,saveToJobLibrary:A,copySuccess:L,saveSuccess:P,saveFailed:q,parseJsonFailed:$,loadingVideo:U,pleaseWait:N,processing:V,like:W,dislike:J,attachmentInfo:Q,browserNotSupportVideo:Y,jobInfo:G,evaluationRule:X};const Z="Copy";const ee="Retry";const te="Save to Job Library";const oe="Content copied to clipboard";const ie="Saved successfully";const ne="Save failed";const re="Failed to parse JSON";const ae="Loading video...";const se="Please wait...";const le="Processing...";const de="Like";const ce="Dislike";const pe="Attachment Info";const he="Your browser does not support video playback.";const fe="Job Information";const ue="Evaluation Rule";var ge={copy:Z,retry:ee,saveToJobLibrary:te,copySuccess:oe,saveSuccess:ie,saveFailed:ne,parseJsonFailed:re,loadingVideo:ae,pleaseWait:se,processing:le,like:de,dislike:ce,attachmentInfo:pe,browserNotSupportVideo:he,jobInfo:fe,evaluationRule:ue};const me='.markdown-body{--base-size-4:4px;--base-size-8:8px;--base-size-16:16px;--base-size-24:24px;--base-size-40:40px;--base-text-weight-normal:400;--base-text-weight-medium:500;--base-text-weight-semibold:600;--fontStack-monospace:ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;--fgColor-accent:Highlight}@media (prefers-color-scheme: dark){.markdown-body,[data-theme="dark"]{color-scheme:dark;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}@media (prefers-color-scheme: light){.markdown-body,[data-theme="light"]{color-scheme:light;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:\' \';display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none !important}.markdown-body a{background-color:transparent;color:var(--fgColor-accent);text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body mark{background-color:var(--bgColor-attention-muted);color:var(--fgColor-default)}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-0.25em}.markdown-body sup{top:-0.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em var(--base-size-40)}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid var(--borderColor-muted);height:.25em;padding:0;margin:var(--base-size-24) 0;background-color:var(--borderColor-default);border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:var(--fgColor-muted);opacity:1}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:var(--base-size-4);font:11px var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);line-height:10px;color:var(--fgColor-default);vertical-align:middle;background-color:var(--bgColor-muted);border:solid 1px var(--borderColor-neutral-muted);border-bottom-color:var(--borderColor-neutral-muted);border-radius:6px;box-shadow:inset 0 -1px 0 var(--borderColor-neutral-muted)}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:var(--base-size-24);margin-bottom:var(--base-size-16);font-weight:var(--base-text-weight-semibold, 600);line-height:1.25}.markdown-body h2{font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.2em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body h3{font-weight:var(--base-text-weight-semibold, 600);font-size:1.05em}.markdown-body h4{font-weight:var(--base-text-weight-semibold, 600);font-size:0.875em}.markdown-body h5{font-weight:var(--base-text-weight-semibold, 600);font-size:.85em}.markdown-body h6{font-weight:var(--base-text-weight-semibold, 600);font-size:.80em;color:var(--fgColor-muted)}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:var(--fgColor-muted);border-left:.25em solid var(--borderColor-default)}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible !important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;appearance:none}.markdown-body .mr-2{margin-right:var(--base-size-8, 8px) !important}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0 !important}.markdown-body>*:last-child{margin-bottom:0 !important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:var(--fgColor-danger)}.markdown-body .anchor{float:left;padding-right:var(--base-size-4);margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:var(--base-size-16);font-size:16px;font-weight:400}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:var(--fgColor-default);vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:var(--base-size-16)}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:var(--base-size-16);font-size:1em;font-style:italic;font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dl dd{padding:0 var(--base-size-16);margin-bottom:var(--base-size-16)}.markdown-body table th{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid var(--borderColor-default)}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:var(--bgColor-default);border-top:1px solid var(--borderColor-muted)}.markdown-body table tr:nth-child(2n){background-color:var(--bgColor-muted)}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid var(--borderColor-default)}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:var(--fgColor-default)}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:var(--bgColor-neutral-muted);border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:var(--base-size-16)}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:var(--base-size-16);overflow:auto;font-size:85%;line-height:1.45;color:var(--fgColor-default);background-color:var(--bgColor-muted);border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px var(--base-size-8) 9px;text-align:right;background:var(--bgColor-default);border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:var(--base-text-weight-semibold, 600);background:var(--bgColor-muted);border-top:0}.markdown-body [data-footnote-ref]::before{content:"["}.markdown-body [data-footnote-ref]::after{content:"]"}.markdown-body .footnotes{font-size:12px;color:var(--fgColor-muted);border-top:1px solid var(--borderColor-default)}.markdown-body .footnotes ol{padding-left:var(--base-size-16)}.markdown-body .footnotes ol ul{display:inline-block;padding-left:var(--base-size-16);margin-top:var(--base-size-16)}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target::before{position:absolute;top:calc(var(--base-size-8)*-1);right:calc(var(--base-size-8)*-1);bottom:calc(var(--base-size-8)*-1);left:calc(var(--base-size-24)*-1);pointer-events:none;content:"";border:2px solid var(--borderColor-accent-emphasis);border-radius:6px}.markdown-body .footnotes li:target{color:var(--fgColor-default)}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body body:has(:modal){padding-right:var(--dialog-scrollgutter) !important}.markdown-body .pl-c{color:var(--color-prettylights-syntax-comment)}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:var(--color-prettylights-syntax-constant)}.markdown-body .pl-e,.markdown-body .pl-en{color:var(--color-prettylights-syntax-entity)}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:var(--color-prettylights-syntax-storage-modifier-import)}.markdown-body .pl-ent{color:var(--color-prettylights-syntax-entity-tag)}.markdown-body .pl-k{color:var(--color-prettylights-syntax-keyword)}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:var(--color-prettylights-syntax-string)}.markdown-body .pl-v,.markdown-body .pl-smw{color:var(--color-prettylights-syntax-variable)}.markdown-body .pl-bu{color:var(--color-prettylights-syntax-brackethighlighter-unmatched)}.markdown-body .pl-ii{color:var(--color-prettylights-syntax-invalid-illegal-text);background-color:var(--color-prettylights-syntax-invalid-illegal-bg)}.markdown-body .pl-c2{color:var(--color-prettylights-syntax-carriage-return-text);background-color:var(--color-prettylights-syntax-carriage-return-bg)}.markdown-body .pl-sr .pl-cce{font-weight:bold;color:var(--color-prettylights-syntax-string-regexp)}.markdown-body .pl-ml{color:var(--color-prettylights-syntax-markup-list)}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:bold;color:var(--color-prettylights-syntax-markup-heading)}.markdown-body .pl-mi{font-style:italic;color:var(--color-prettylights-syntax-markup-italic)}.markdown-body .pl-mb{font-weight:bold;color:var(--color-prettylights-syntax-markup-bold)}.markdown-body .pl-md{color:var(--color-prettylights-syntax-markup-deleted-text);background-color:var(--color-prettylights-syntax-markup-deleted-bg)}.markdown-body .pl-mi1{color:var(--color-prettylights-syntax-markup-inserted-text);background-color:var(--color-prettylights-syntax-markup-inserted-bg)}.markdown-body .pl-mc{color:var(--color-prettylights-syntax-markup-changed-text);background-color:var(--color-prettylights-syntax-markup-changed-bg)}.markdown-body .pl-mi2{color:var(--color-prettylights-syntax-markup-ignored-text);background-color:var(--color-prettylights-syntax-markup-ignored-bg)}.markdown-body .pl-mdr{font-weight:bold;color:var(--color-prettylights-syntax-meta-diff-range)}.markdown-body .pl-ba{color:var(--color-prettylights-syntax-brackethighlighter-angle)}.markdown-body .pl-sg{color:var(--color-prettylights-syntax-sublimelinter-gutter-mark)}.markdown-body .pl-corl{text-decoration:underline;color:var(--color-prettylights-syntax-constant-other-reference-link)}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),.markdown-body button:focus:not(:focus-visible),.markdown-body summary:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible){outline:none;box-shadow:none}.markdown-body [tabindex="0"]:focus:not(:focus-visible),.markdown-body details-dialog:focus:not(:focus-visible){outline:none}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1em;font-style:normal !important;font-weight:var(--base-text-weight-normal, 400);line-height:1;vertical-align:-0.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:var(--base-text-weight-normal, 400)}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:var(--base-size-4)}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:var(--base-size-8) var(--base-size-16);margin-bottom:var(--base-size-16);color:inherit;border-left:.25em solid var(--borderColor-default)}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:var(--base-text-weight-medium, 500);align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:var(--borderColor-accent-emphasis)}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--fgColor-accent)}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:var(--borderColor-done-emphasis)}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--fgColor-done)}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:var(--borderColor-attention-emphasis)}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--fgColor-attention)}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:var(--borderColor-success-emphasis)}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--fgColor-success)}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:var(--borderColor-danger-emphasis)}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--fgColor-danger)}.markdown-body>*:first-child>.heading-element:first-child{margin-top:0 !important}.markdown-body .highlight pre:has(+.zeroclipboard-container){min-height:52px}.markdown-body .md-table-wrap table{margin-top:0;margin-bottom:0}.markdown-body .md-table-wrap{margin-top:0;margin-bottom:var(--base-size-16)}.markdown-body>.md-table-wrap:first-child{margin-top:0}.markdown-body>.md-table-wrap:last-child{margin-bottom:0}@media (max-width: 767px){.markdown-body .md-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.markdown-body .md-table-wrap table{min-width:max-content}}';const be=":host{display:block;width:100%}.message-round{margin-bottom:16px;width:100%}.user-message-container{display:flex;flex-direction:row-reverse;align-items:flex-start;margin-bottom:15px;position:relative}.assistant-message-container{display:flex;flex-direction:row;align-items:flex-start;margin-bottom:15px;position:relative}.message-bubble{max-width:85%;position:relative}.user-message{padding:5px 10px;background:#f5f7ff;font-size:14px;color:#1F2328;border-radius:6px;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.1)}.assistant-message{padding:15px 10px;background-color:#fff;border-radius:6px;font-size:14px;color:#1F2328;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05)}.message-time{font-size:12px;color:#999;margin-top:4px}.user-message-container .message-time{color:rgba(255, 255, 255, 0.7)}.loading-dots{display:flex;align-items:center;padding:12px 16px;background-color:#f0f0f0;border-radius:18px;border-top-left-radius:4px}.loading-dots span{width:8px;height:8px;margin:0 3px;background-color:#999;border-radius:50%;display:inline-block;animation:dot-pulse 1.5s infinite ease-in-out}.loading-dots span:nth-child(2){animation-delay:0.2s}.loading-dots span:nth-child(3){animation-delay:0.4s}@keyframes dot-pulse{0%,80%,100%{transform:scale(0.8);opacity:0.5}40%{transform:scale(1.2);opacity:1}}.file-view{margin-top:8px;padding:12px;background-color:#f8f9fa;border:1px solid #e9ecef;border-radius:6px;font-size:14px;word-break:break-all;color:#2c3e50;line-height:1.5;box-shadow:0 1px 2px rgba(0, 0, 0, 0.05)}.input-view{margin-top:8px;margin-bottom:10px;padding-bottom:10px;border:1px solid #e9ecef;border-radius:6px;overflow:hidden;background-color:#ffffff;box-shadow:0 1px 2px rgba(0, 0, 0, 0.05)}.input-label-container{display:flex;align-items:center;margin-bottom:4px;background-color:#f8f9fa;border-bottom:1px solid #e9ecef;padding:8px 12px}.copy-input-button{background:transparent;border:none;cursor:pointer;padding:2px;display:flex;align-items:center;justify-content:center;color:#8c8c8c;opacity:0.7;transition:opacity 0.2s ease;margin-left:5px}.copy-input-button:hover{opacity:1;color:#1677ff}.input-label{font-size:13px;font-weight:600;color:#495057}.input-value{padding:12px 12px 0px;font-size:14px;line-height:1.5;color:#2c3e50;background-color:#ffffff;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.input-metadata{font-size:13px;margin-top:8px}.message-actions{display:flex;align-items:center;gap:8px;transition:opacity 0.2s ease;margin-top:15px}.action-button{display:inline-flex;align-items:center;justify-content:center;border:1px solid #d9d9d9;border-radius:6px;padding:4px 15px;font-size:14px;height:32px;background-color:white;cursor:pointer;color:rgba(0, 0, 0, 0.88);transition:all 0.2s}.action-button:hover{color:#1677ff;border-color:#1677ff}.action-button.primary{color:#1677ff;border-color:#1677ff}.action-button.primary:hover{color:#4096ff;border-color:#4096ff}.action-button.icon-only{padding:4px 8px;margin-right:9px}.button-icon{margin-right:8px;display:flex;align-items:center;justify-content:center}.icon-only .button-icon{margin-right:0}.file-list{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}.file-item{display:flex;flex-direction:column;align-items:center;width:80px;cursor:pointer;padding:8px;border-radius:4px;transition:background-color 0.3s;margin:5px 10px}.file-item:hover{background-color:rgba(0, 0, 0, 0.04)}.file-icon{margin-bottom:4px}.file-name{font-size:12px;text-align:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8B4513}.action-button.active{color:#1677ff;background-color:rgba(22, 119, 255, 0.1)}.action-button.active .button-icon svg{stroke:#1677ff}.inputs-container{margin-top:8px;display:flex;flex-direction:column;gap:8px}.file-list{display:flex;flex-direction:column;gap:8px}.file-item{display:flex;align-items:center;padding:8px 12px;background-color:#f5f5f5;border-radius:6px;cursor:pointer;transition:background-color 0.2s}.file-item:hover{background-color:#e8e8e8}.file-icon{margin-right:8px}.file-name{font-size:14px;color:#333;word-break:break-word}.input-view{background-color:#f9f9f9;border-radius:8px;padding:12px;border:1px solid #e8e8e8}.input-label-container{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.input-label{font-weight:500;color:#333}.input-value{color:#666;line-height:1.5;word-break:break-word;max-height:200px;overflow-y:auto}.copy-input-button{background:none;border:none;cursor:pointer;color:#1677ff;padding:4px;border-radius:4px;display:flex;align-items:center;justify-content:center}.copy-input-button:hover{background-color:rgba(22, 119, 255, 0.1)}.input-metadata{font-size:14px;color:#666;padding:4px 0}.file-card{display:flex;align-items:center;padding:12px;background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 200px 100px no-repeat, #fff;border-radius:8px;cursor:pointer;transition:background-color 0.2s;border:1px solid #e8e8e8;margin-top:8px}.file-card:hover{background-color:#f0f0f0}.file-card-icon{margin-right:12px;flex-shrink:0;border-radius:12px;background:#0d75fb;width:48px;height:48px;display:flex;align-items:center;justify-content:center}.file-card-icon img{width:40px;height:40px}.file-card-content{display:flex;flex-direction:column;flex:1;min-width:0}.file-card-type{font-size:14px;color:#8c8c8c;margin-bottom:4px}.file-card-name{font-size:16px;font-weight:500;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.copy-card-button{background:none;border:none;cursor:pointer;color:#8c8c8c;padding:8px;border-radius:4px;display:flex;align-items:center;justify-content:center;margin-left:8px;transition:color 0.2s}.copy-card-button:hover{color:#1677ff}.avatar{width:32px;height:32px;border-radius:50%;overflow:hidden;flex-shrink:0}.avatar img{width:100%;height:100%;object-fit:cover}.user-avatar{margin-left:8px}.assistant-avatar{margin-right:8px}.retry-button{background-color:#ff6b35 !important;color:white !important;border:none !important}.retry-button:hover{background-color:#e55a2b !important}.retry-button .button-icon{margin-right:4px}.video-inputs-container{display:flex;flex-direction:column;align-items:end}.video-container{margin-top:0px;border-radius:8px;overflow:hidden;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1);background-color:#000;width:250px;height:auto;max-height:250px;transition:transform 0.2s ease, box-shadow 0.2s ease}.video-container:hover{transform:translateY(-2px);box-shadow:0 4px 16px rgba(0, 0, 0, 0.15)}.video-container video{display:block;width:100%;max-width:500px;height:auto;border-radius:8px}.video-container video:focus{outline:none}.video-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;background-color:#f8f9fa;border-radius:8px;color:#666;font-size:14px}.loading-spinner{width:24px;height:24px;border:2px solid #e9ecef;border-top:2px solid #1677ff;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:12px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@media (max-width: 768px){.video-container{width:100%;max-width:300px}}";const xe=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const we=class{constructor(o){e(this,o);this.saveJd=t(this,"saveJd");this.filePreviewRequest=t(this,"filePreviewRequest");this.retryRequest=t(this,"retryRequest")}message;showFeedbackButtons=true;botId;locale;get hostElement(){return o(this)}strings;feedbackStatus=null;clipboard=null;videoUrls={};userAvatar;assistantAvatar;showCopyButton=true;filePreviewMode="drawer";showAssistantMessage=true;showSaveJdButton=false;saveJdButtonText="保存职位";saveJd;filePreviewRequest;retryRequest;async componentWillLoad(){this.strings=this.locale==="en"?ge:K;if(this.message&&this.message.feedback){this.feedbackStatus=this.message.feedback.rating}}componentDidRender(){this.initClipboard()}disconnectedCallback(){if(this.clipboard){this.clipboard.destroy();this.clipboard=null}}initClipboard(){const e=this.hostElement.shadowRoot?.querySelector(".copy-button");if(!e){return}if(this.clipboard){return}this.clipboard=new R(e,{container:this.hostElement.shadowRoot});this.clipboard.on("success",(e=>{j.success(this.strings.copySuccess);e.clearSelection()}));this.clipboard.on("error",(e=>{console.error("复制失败:",e);C.emitError({error:e,message:"复制内容失败"})}))}saveJdLoading=false;async handleSaveJd(e){this.saveJdLoading=true;const t="78798567376007168";const o=await a({url:"/sdk/v1/chat/workflow/block-run",method:"POST",data:{bot_id:t,inputs:{job_info:e}}});if(o.success&&o.data?.data?.outputs?.json_data){try{let e=o.data.data.outputs.json_data.trim();const t=e.match(/```json\s*([\s\S]*?)\s*```/);if(t){e=t[1].trim()}const i=JSON.parse(e);this.saveJd.emit({isOk:true,message:this.strings.saveSuccess,data:i})}catch(e){console.error("解析JSON失败:",e);this.saveJd.emit({isOk:false,message:this.strings.parseJsonFailed})}}else{this.saveJd.emit({isOk:false,message:this.strings.saveFailed})}this.saveJdLoading=false}renderUserMessage(){if(!this.message?.query?.trim())return null;const e=this.message.query?r(this.message.query):"";return i("div",{class:{"user-message-container":true}},this.userAvatar&&i("div",{class:"avatar user-avatar"},i("img",{src:this.userAvatar})),i("div",{class:"message-bubble user-message"},i("div",{innerHTML:e}),this.renderInputs()))}renderAssistantMessage(){if(!this.message.answer&&!this.message.isStreaming)return null;if(!this.showAssistantMessage){return i("div",{class:{"assistant-message-container":true}},this.assistantAvatar&&i("div",{class:"avatar assistant-avatar"},i("img",{src:this.assistantAvatar})),i("div",{class:"message-bubble"},i("div",{class:"assistant-message"},this.strings.pleaseWait)))}const e=this.message.isStreaming&&!this.message.answer;const t=this.message.answer?r(this.message.answer):"";const o=this.showSaveJdButton&&this.botId=="3022316191018873";return i("div",{class:{"assistant-message-container":true}},this.assistantAvatar&&i("div",{class:"avatar assistant-avatar"},i("img",{src:this.assistantAvatar})),i("div",{class:"message-bubble "},i("div",{class:"assistant-message"},i("div",{class:"markdown-content markdown-body",innerHTML:e?this.strings.pleaseWait:t})),!e&&this.message.answer&&!this.message.isStreaming&&i("div",{class:"message-actions"},this.message.showRetryButton&&i("button",{class:"action-button retry-button",onClick:()=>this.handleRetry(),title:this.strings.retry},i("span",{class:"button-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("polyline",{points:"23 4 23 10 17 10"}),i("polyline",{points:"1 20 1 14 7 14"}),i("path",{d:"M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"}))),this.strings.retry),this.showCopyButton&&i("button",{class:"action-button copy-button",title:this.strings.copy,"data-clipboard-text":this.message.answer||""},i("span",{class:"button-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),i("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}))),this.strings.copy),o&&i("button",{class:"action-button",onClick:()=>this.handleSaveJd(this.message.answer),title:this.saveJdButtonText,disabled:this.saveJdLoading},this.saveJdLoading?this.strings.processing:this.saveJdButtonText),this.showFeedbackButtons&&i(i.Fragment,null,i("button",{class:`action-button icon-only ${this.feedbackStatus==="like"?"active":""}`,title:this.strings.like,onClick:()=>this.handleLike()},i("span",{class:"button-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("path",{d:"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"})))),i("button",{class:`action-button icon-only ${this.feedbackStatus==="dislike"?"active":""}`,title:this.strings.dislike,onClick:()=>this.handleDislike()},i("span",{class:"button-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("path",{d:"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"}))))))))}getFileName(e){const t=e.split("/");return t[t.length-1]}handleContentClick(e,t,o="text"){this.filePreviewRequest.emit({fileName:e,content:t,contentType:o})}async loadVideoUrl(e){if(this.videoUrls[e]){return}const t=await s(e);if(t){this.videoUrls={...this.videoUrls,[e]:t}}}async handleFileClick(e,t){const o=/^https?:\/\//i.test(e);if(o){if(this.filePreviewMode==="drawer"){this.filePreviewRequest.emit({url:e,fileName:t,contentType:"file"})}else{window.open(e,"_blank")}return}const i=/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/i.test(t);const n=i?await s(e):await l(e);if(n){if(this.filePreviewMode==="drawer"){this.filePreviewRequest.emit({url:n,fileName:t,contentType:"file"})}else{window.open(n,"_blank")}}else{console.error("无法获取预览URL");I.captureError("无法获取预览URL",{action:"handleFileClick",component:"components-chat-message",title:"无法获取预览URL"});C.emitError({error:"无法获取预览URL",message:"无法获取预览URL"})}}renderFileItem(e,t,o){return i("div",{key:o,class:"file-card",onClick:()=>this.handleFileClick(t,e)},i("div",{class:"file-card-icon",style:{background:"linear-gradient(45deg, #ff5600, #ff8344)"}},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_file.png"})),i("div",{class:"file-card-content"},i("div",{class:"file-card-type"},"[",this.strings.attachmentInfo,"]"),i("div",{class:"file-card-name"},e)))}renderInputs(){if(!this.message.inputs)return null;const e=Object.keys(this.message.inputs).some((e=>{const t=this.message.inputs[e];return t!==null&&t!==undefined&&t!==""&&!e.startsWith("hide_")&&e!=="answer"}));if(!e)return null;return i("div",{class:"inputs-container"},Object.keys(this.message.inputs).map(((e,t)=>{const o=this.message.inputs[e];if(o&&!e.startsWith("hide_")&&e!=="answer"){if(e==="video_url"){const e=o;const n=this.videoUrls[e];if(!n){this.loadVideoUrl(e)}return i("div",{class:"video-inputs-container"},i("div",{key:t,class:"video-container"},n?i("video",{key:e,controls:true,preload:"metadata",onLoadedMetaData:e=>{const t=e.target;t.currentTime=.01},controlsList:"nodownload",style:{width:"250px",height:"auto",maxHeight:"250px",borderRadius:"8px",marginTop:"8px"}},i("source",{src:n,type:"video/webm"}),i("source",{src:n,type:"video/mp4"}),i("source",{src:n,type:"video/ogg"}),this.strings.browserNotSupportVideo):i("div",{class:"video-loading"},i("div",{class:"loading-spinner"}),i("span",null,this.strings.loadingVideo))))}else if(e==="file_url"){if((o?.split?.(",")?.length||0)>1){const e=o.split(",");const n=this.message.inputs?.file_name?.split?.(",")||[];return i("div",{key:t},e.map(((e,t)=>{const o=n[t]||this.getFileName(e);return this.renderFileItem(o,e,t)})))}else{const e=this.message.inputs.file_name||this.getFileName(o);return this.renderFileItem(e,o,t)}}else if(e==="file_urls"){const e=typeof o==="string"?o.split(","):[o.toString()];const n=this.message.inputs.file_names?typeof this.message.inputs.file_names==="string"?this.message.inputs.file_names.split(","):[this.message.inputs.file_names.toString()]:[];return i("div",{key:t},e.map(((e,t)=>{const o=n[t]||this.getFileName(e);return this.renderFileItem(o,e,t)})))}else if(e==="job_info"||e==="rule"){const n=e==="job_info"?this.strings.jobInfo:this.strings.evaluationRule;const r=typeof o==="string"?o:JSON.stringify(o,null,2);return i("div",{key:t,class:"file-card",onClick:()=>this.handleContentClick(n,r)},i("div",{class:"file-card-icon",style:{background:"#0d75fb"}},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_position.png"})),i("div",{class:"file-card-content"},i("div",{class:"file-card-type"},"[",n,"]"),i("div",{class:"file-card-name"},r.length>50?r.substring(0,50)+"...":r)))}else if(e==="input"){return i("div",{key:t,class:"input-metadata"},`${o}`)}}return null})))}async handleLike(){const e=this.feedbackStatus==="like"?null:"like";await this.submitFeedback(e)}async handleDislike(){const e=this.feedbackStatus==="dislike"?null:"dislike";await this.submitFeedback(e)}async submitFeedback(e){if(!this.message.id){console.error("消息ID不存在,无法提交反馈");I.captureError("消息ID不存在,无法提交反馈",{action:"submitFeedback",component:"components-chat-message",title:"无法提交反馈"});C.emitError({error:"消息ID不存在,无法提交反馈",message:"消息ID不存在,无法提交反馈"});return}try{const t=await a({url:`/sdk/v1/chat/messages/${this.message.id}/feedbacks`,method:"POST",data:{rating:e,bot_id:this.botId,content:""}});if(t.success){this.feedbackStatus=e;if(this.message&&this.message.feedback){this.message={...this.message,feedback:{...this.message.feedback,rating:e}}}}else{console.error("反馈提交失败:",t.message)}}catch(e){console.error("提交反馈时发生错误:",e);I.captureError(e,{action:"submitFeedback",component:"components-chat-message",title:"提交反馈失败"})}}handleRetry(){if(this.message.id){this.retryRequest.emit(this.message.id)}}render(){return i("div",{key:"1d8a2d0e91b29d46c6f4e097874bf097f6bb76a6",class:"message-round"},this.renderUserMessage(),this.renderAssistantMessage())}};we.style=me+(be+xe);const ye=":host{display:block}.confirm-modal-container{position:fixed;top:0;left:0;width:0;height:0;overflow:visible}.confirm-modal-mask{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.45);opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.mask-visible{opacity:1;visibility:visible}.confirm-modal-content{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;padding:20px;opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.confirm-modal-content.centered{align-items:center}.modal-content-visible{opacity:1;visibility:visible}.modal-wrapper{background:white;border-radius:8px;width:100%;max-width:400px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;transform:scale(0.9) translateY(-20px);transition:transform 0.3s cubic-bezier(0.23, 1, 0.32, 1)}.modal-content-visible .modal-wrapper{transform:scale(1) translateY(0)}.modal-header{padding:16px 24px;border-bottom:1px solid #f0f0f0;background:#fff}.modal-title{font-size:16px;font-weight:500;color:rgba(0, 0, 0, 0.85);margin:0;line-height:1.5}.modal-body{padding:24px;font-size:14px;line-height:1.5;color:rgba(0, 0, 0, 0.65)}.modal-footer{padding:10px 16px;text-align:right;background:transparent;border-top:1px solid #f0f0f0;border-radius:0 0 8px 8px}.modal-button{line-height:1.5;position:relative;display:inline-block;font-weight:400;white-space:nowrap;text-align:center;border:1px solid transparent;cursor:pointer;transition:all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);user-select:none;touch-action:manipulation;height:32px;padding:4px 15px;font-size:14px;border-radius:6px;outline:0;margin-left:8px}.cancel-button{color:rgba(0, 0, 0, 0.65);border-color:#d9d9d9;background:#fff}.cancel-button:hover{color:#40a9ff;border-color:#40a9ff}.cancel-button:active{color:#096dd9;border-color:#096dd9}.ok-button{color:#fff;background:#1890ff;border-color:#1890ff}.ok-button:hover{background:#40a9ff;border-color:#40a9ff}.ok-button:active{background:#096dd9;border-color:#096dd9}.ok-primary{background:#1890ff;border-color:#1890ff}.ok-primary:hover{background:#40a9ff;border-color:#40a9ff}.ok-primary:active{background:#096dd9;border-color:#096dd9}.ok-danger{background:#ff4d4f;border-color:#ff4d4f}.ok-danger:hover{background:#ff7875;border-color:#ff7875}.ok-danger:active{background:#d9363e;border-color:#d9363e}.ok-default{color:rgba(0, 0, 0, 0.65);background:#fff;border-color:#d9d9d9}.ok-default:hover{color:#40a9ff;border-color:#40a9ff}.ok-default:active{color:#096dd9;border-color:#096dd9}@media screen and (max-width: 768px){.confirm-modal-content{padding:16px}.confirm-modal-content.centered{padding:16px}.modal-wrapper{max-width:none;margin:0 auto}.modal-header{padding:12px 16px}.modal-title{font-size:16px}.modal-body{padding:16px}.modal-footer{padding:8px 12px 12px}.modal-button{height:36px;font-size:16px;margin-left:8px;margin-top:8px}}@media (prefers-reduced-motion: reduce){.confirm-modal-mask,.confirm-modal-content,.modal-wrapper,.modal-button{transition:none}}";const ve=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const ke=class{constructor(o){e(this,o);this.ok=t(this,"ok");this.cancel=t(this,"cancel");this.closed=t(this,"closed");this.afterOpen=t(this,"afterOpen");this.afterClose=t(this,"afterClose")}isOpen=false;modalTitle="确认";okText="确认";cancelText="取消";okType="primary";maskClosable=true;mask=true;centered=true;ok;cancel;closed;afterOpen;afterClose;get hostElement(){return o(this)}zIndex=2e3;bodyOverflowBeforeOpen="";transitionEndHandler;async open(){this.isOpen=true}async close(){this.isOpen=false}visibleChanged(e){if(e){this.bodyOverflowBeforeOpen=document.body.style.overflow;document.body.style.overflow="hidden";const e=this.hostElement.shadowRoot.querySelector(".modal-wrapper");if(e){this.transitionEndHandler=()=>{this.afterOpen.emit()};e.addEventListener("transitionend",this.transitionEndHandler,{once:true})}}else{document.body.style.overflow=this.bodyOverflowBeforeOpen;const e=this.hostElement.shadowRoot.querySelector(".modal-wrapper");if(e){this.transitionEndHandler=()=>{this.afterClose.emit()};e.addEventListener("transitionend",this.transitionEndHandler,{once:true})}}}componentWillLoad(){const e=d.getItem("modal-zIndex");if(e){this.zIndex=e+1e3}}disconnectedCallback(){if(this.isOpen){document.body.style.overflow=this.bodyOverflowBeforeOpen}const e=this.hostElement.shadowRoot?.querySelector(".modal-wrapper");if(e&&this.transitionEndHandler){e.removeEventListener("transitionend",this.transitionEndHandler)}}handleMaskClick=()=>{if(this.maskClosable){this.handleCancel()}};handleOk=()=>{this.ok.emit()};handleCancel=()=>{this.cancel.emit();this.isOpen=false;this.closed.emit()};render(){const e={zIndex:`${this.zIndex+1}`};const t={zIndex:`${this.zIndex}`};const o={"confirm-modal-container":true,"modal-open":this.isOpen};const n={"confirm-modal-content":true,"modal-content-visible":this.isOpen,centered:this.centered};const r={"modal-button":true,"ok-button":true,[`ok-${this.okType}`]:true};return i("div",{key:"d8d67beeb7cdd19c6984983d922f601bc65772cb",class:o},this.mask&&i("div",{key:"cb1002966597f7b6d185625f905e96b895b6076e",class:{"confirm-modal-mask":true,"mask-visible":this.isOpen},style:t,onClick:this.handleMaskClick}),i("div",{key:"48b97599d6534a7ba53971273eb8759cd7c85ca3",class:n,style:e},i("div",{key:"675558f32607ef6ca72013e40d4d39da6987864e",class:"modal-wrapper"},i("div",{key:"40fd4918144768ade365e1937009af33a8f86b54",class:"modal-header"},i("div",{key:"d5030a4af07bf5bf7ef604dd0d55f4ed2eda98e0",class:"modal-title"},this.modalTitle)),i("div",{key:"1d4de0b387998078b0ac71746f3da0c4dfd41110",class:"modal-body"},i("slot",{key:"1ade6a10276f96df5ca8730098bd7e3cc0225d3f"})),i("div",{key:"079194be9894d264e1d2facbfb55dfdd05086245",class:"modal-footer"},i("button",{key:"5b94b6e1f0e84542e5afccb79a18fe08cee78a78",class:"modal-button cancel-button",onClick:this.handleCancel},this.cancelText),i("button",{key:"c82555a1f359a415a8a0f29188959726f695f216",class:r,onClick:this.handleOk},this.okText)))))}static get watchers(){return{isOpen:["visibleChanged"]}}};ke.style=ye+ve;const ze=".digital-human-container{position:relative;border-radius:8px;overflow:hidden;transition:box-shadow 0.3s;width:100%;height:100%;background:transparent;display:flex;align-items:center;justify-content:center}.digital-human-container video{width:100%;height:100%;display:block;object-fit:cover;background:transparent;border-radius:8px}.generating-indicator{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0, 0, 0, 0.7);border-radius:50%;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.loading-spinner{width:16px;height:16px;border:2px solid #ffffff;border-top-color:transparent;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@media screen and (max-width: 768px){.digital-human-container{border-radius:6px}.digital-human-container video{border-radius:6px}}";const Ce=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Ie=class{constructor(o){e(this,o);this.videoEnded=t(this,"videoEnded");this.videoGenerated=t(this,"videoGenerated");this.avatarDetailLoaded=t(this,"avatarDetailLoaded")}digitalId;speechText="";isStreaming=false;playbackRate=1;generatedVideoUrl="";currentVideoUrl="";isPlayingGenerated=false;dynamicDefaultVideoUrl="";dynamicVirtualmanKey="";videoElement;lastCompletedText="";videoEnded;videoGenerated;avatarDetailLoaded;async componentWillLoad(){if(this.digitalId){await this.fetchAvatarDetail()}this.currentVideoUrl=this.dynamicDefaultVideoUrl||""}componentDidLoad(){if(this.videoElement&&this.currentVideoUrl){this.videoElement.src=this.currentVideoUrl;this.videoElement.playbackRate=1}}handleStreamingChange(e,t){if(t===true&&e===false&&this.speechText&&this.speechText!==this.lastCompletedText){this.generateDigitalHumanVideo(this.speechText);this.lastCompletedText=this.speechText}}async fetchAvatarDetail(){if(!this.digitalId)return;try{const e=await a({url:"/sdk/v1/virtual-human/avatar-detail",method:"POST",data:{avatar_id:this.digitalId}});if(!e.success){throw new Error(`获取数字人详情失败: ${e.message}`)}const{placeholder_video_url:t,virtualman_key:o}=e.data;if(t){this.dynamicDefaultVideoUrl=t}if(o){this.dynamicVirtualmanKey=o}this.avatarDetailLoaded.emit({defaultVideoUrl:this.dynamicDefaultVideoUrl,virtualmanKey:this.dynamicVirtualmanKey})}catch(e){console.error("获取数字人详情失败:",e)}}async generateDigitalHumanVideo(e){if(!e.trim())return;if(!this.dynamicVirtualmanKey){console.error("缺少VirtualmanKey,无法生成数字人视频");return}const t=this.dynamicVirtualmanKey;try{const o=await a({url:"/sdk/v1/virtual-human/create-video",method:"POST",data:{VirtualmanKey:t,InputSsml:e,SpeechParam:{Speed:1},VideoParam:{Format:"TransparentWebm"},DriverType:"Text"}});if(!o.success){throw new Error(`创建视频任务失败: ${o.message}`)}const i=o.data.Payload.TaskId;const n=await this.pollVideoProgress(i);if(n){this.generatedVideoUrl=n;this.playGeneratedVideo(n)}}catch(e){console.error("数字人视频生成失败:",e)}}async pollVideoProgress(e){const t=45;const o=2e3;for(let i=0;i<t;i++){try{const t=await a({url:"/sdk/v1/virtual-human/query-progress",method:"POST",data:{TaskId:e}});if(!t.success){throw new Error(`查询进度失败: ${t.message}`)}const i=t.data.Payload;if(i.Status==="SUCCESS"&&i.Progress===100){return i.MediaUrl}else if(i.Status==="FAILED"){throw new Error(`视频生成失败: ${i.FailMessage}`)}await new Promise((e=>setTimeout(e,o)))}catch(e){console.error("轮询视频进度失败:",e);break}}throw new Error("视频生成超时")}async preloadVideo(e){return new Promise(((t,o)=>{const i=document.createElement("video");i.preload="auto";i.src=e;const n=()=>{i.removeEventListener("canplaythrough",n);i.removeEventListener("error",r);t()};const r=()=>{console.error("视频预加载失败:",e);i.removeEventListener("canplaythrough",n);i.removeEventListener("error",r);o(new Error("视频预加载失败"))};i.addEventListener("canplaythrough",n);i.addEventListener("error",r);i.load()}))}async playGeneratedVideo(e){try{await this.preloadVideo(e);this.currentVideoUrl=e;this.isPlayingGenerated=true;this.videoGenerated.emit({videoUrl:e});requestAnimationFrame((()=>{if(this.videoElement){this.videoElement.pause();this.videoElement.src=e;this.videoElement.loop=false;this.videoElement.playbackRate=this.playbackRate;this.videoElement.play().catch((e=>{console.error("播放生成视频失败:",e)}))}}))}catch(t){console.error("预加载视频失败,直接切换:",t);this.currentVideoUrl=e;this.isPlayingGenerated=true;this.videoGenerated.emit({videoUrl:e});requestAnimationFrame((()=>{if(this.videoElement){this.videoElement.pause();this.videoElement.src=e;this.videoElement.loop=false;this.videoElement.playbackRate=this.playbackRate;this.videoElement.play().catch((e=>{console.error("播放生成视频失败:",e)}))}}))}}handleVideoEnded=()=>{if(this.isPlayingGenerated){this.videoEnded.emit({videoUrl:this.currentVideoUrl});const e=this.dynamicDefaultVideoUrl;this.currentVideoUrl=e;this.isPlayingGenerated=false;requestAnimationFrame((()=>{if(this.videoElement){this.videoElement.pause();this.videoElement.src=e;this.videoElement.loop=true;this.videoElement.playbackRate=1;this.videoElement.play().catch((e=>{console.error("播放默认视频失败:",e)}))}}))}};render(){return i("div",{key:"9673d244bf67aa041eccaf3377a7195f50dc5ef9",class:"digital-human-container"},i("video",{key:"a18a2ee9e9e5f2d991048aeab54563f7a6350408",autoplay:true,playsinline:true,loop:true,onEnded:this.handleVideoEnded,ref:e=>this.videoElement=e}))}static get watchers(){return{isStreaming:["handleStreamingChange"]}}};Ie.style=ze+Ce;const je=":host{display:block}.drawer-container{position:fixed;top:0;left:0;width:0;height:0;overflow:visible}.drawer-mask{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.45);opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.mask-visible{opacity:1;visibility:visible}.drawer-content{position:fixed;top:0;right:0;bottom:0;display:flex;flex-direction:column;background-color:#fff;box-shadow:-2px 0 8px rgba(0, 0, 0, 0.15);transform:translateX(100%);transition:transform 0.3s cubic-bezier(0.23, 1, 0.32, 1)}.drawer-content-visible{transform:translateX(0)}.drawer-header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;color:rgba(0, 0, 0, 0.85);border-bottom:1px solid #f0f0f0}.drawer-title{flex:1;min-width:0;margin:0;font-size:16px;line-height:22px;font-weight:500;color:rgba(0, 0, 0, 0.85);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.drawer-header-actions{display:flex;align-items:center;flex:0 0 auto}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.drawer-body{flex:1;padding:24px;overflow:auto}@media (max-width: 768px){.drawer-content{width:100% !important}.drawer-header{padding:12px 16px}.drawer-body{padding:16px}}";const Se=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const _e=class{constructor(o){e(this,o);this.closed=t(this,"closed");this.afterOpen=t(this,"afterOpen");this.afterClose=t(this,"afterClose")}isOpen=false;drawerTitle="";width="378px";height="378px";closable=true;maskClosable=true;closed;afterOpen;afterClose;get hostElement(){return o(this)}zIndex=1500;bodyOverflowBeforeOpen="";transitionEndHandler;async open(){this.isOpen=true}async close(){this.isOpen=false}visibleChanged(e){if(e){this.bodyOverflowBeforeOpen=document.body.style.overflow;document.body.style.overflow="hidden";const e=this.hostElement.shadowRoot.querySelector(".drawer-content");if(e){this.transitionEndHandler=()=>{this.afterOpen.emit()};e.addEventListener("transitionend",this.transitionEndHandler,{once:true})}}else{document.body.style.overflow=this.bodyOverflowBeforeOpen;const e=this.hostElement.shadowRoot.querySelector(".drawer-content");if(e){this.transitionEndHandler=()=>{this.afterClose.emit()};e.addEventListener("transitionend",this.transitionEndHandler,{once:true})}}}componentWillLoad(){const e=d.getItem("modal-zIndex");if(e){this.zIndex=e+500}}disconnectedCallback(){if(this.isOpen){document.body.style.overflow=this.bodyOverflowBeforeOpen}const e=this.hostElement.shadowRoot?.querySelector(".drawer-content");if(e&&this.transitionEndHandler){e.removeEventListener("transitionend",this.transitionEndHandler)}}handleMaskClick=()=>{if(this.maskClosable){this.handleClose()}};handleClose=()=>{this.isOpen=false;this.closed.emit()};render(){const e={width:this.width,zIndex:`${this.zIndex+1}`};const t={zIndex:`${this.zIndex}`};return i("div",{key:"b286ab010c409f20383055c1933fb24d5bb88319",class:{"drawer-container":true,"drawer-open":this.isOpen}},i("div",{key:"fdf4345eb9f364b7f29d506aa8f5c9633353427c",class:{"drawer-mask":true,"mask-visible":this.isOpen},style:t,onClick:this.handleMaskClick}),i("div",{key:"275e38dad372c9d4c5cc348af7a743e1b3bddcdb",class:{"drawer-content":true,"drawer-content-visible":this.isOpen},style:e},i("div",{key:"e0db8aafb3b220f4b43a7a1f2277258704feb7d4",class:"drawer-header"},this.drawerTitle&&i("div",{key:"f2434f5eb2989b459a261ec1f51f50f90bd8a6fb",class:"drawer-title"},this.drawerTitle),i("div",{key:"94d2388781754ce2fdd159686388fc87cc9f9880",class:"drawer-header-actions"},i("slot",{key:"d792c926125a5f1b6cac5d417296819b88676adb",name:"header-actions"})),this.closable&&i("button",{key:"b864d9a7d489e7693b8dce1edabc681ea6a084ea",class:"close-button",onClick:this.handleClose},i("span",{key:"4296280f505c7d11ef1e15d0e75853e433eb32e2"},"×"))),i("div",{key:"1a502cddb4ac7f6865508a7dac1e040d519a4b13",class:"drawer-body"},i("slot",{key:"595b505b439dac20058c6f9c9366f076dd063014"}))))}static get watchers(){return{isOpen:["visibleChanged"]}}};_e.style=je+Se;const Te=".modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.45);display:flex;align-items:flex-start;justify-content:center;z-index:1000;backdrop-filter:blur(4px)}.modal-container{background:white;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);max-width:min(1000px, calc(100vw - 40px));max-height:calc(100vh - 40px);width:100%;display:flex;flex-direction:column;overflow:hidden}.modal-header{padding:16px 24px;border-bottom:1px solid #f0f0f0;display:flex;align-items:center;justify-content:space-between;background:#fafafa}.modal-title{display:flex;align-items:center;gap:16px;font-size:16px;font-weight:600;color:#262626}.modal-close{background:none;border:none;font-size:18px;color:#8c8c8c;cursor:pointer;padding:4px;border-radius:4px;transition:all 0.2s}.modal-close:hover{background-color:#f5f5f5;color:#262626}.modal-body{padding:24px;flex:1;overflow:auto}.btn{border:none;border-radius:6px;cursor:pointer;font-size:14px;font-weight:400;transition:all 0.2s;display:inline-flex;align-items:center;justify-content:center;gap:4px}.btn-small{padding:4px 8px;font-size:12px}.btn-medium{padding:8px 16px}.btn-primary{background-color:#1890ff;color:white;border:1px solid #1890ff}.btn-primary:hover{background-color:#40a9ff;border-color:#40a9ff}.btn-default{background-color:white;color:#595959;border:1px solid #d9d9d9}.btn-default:hover{background-color:#f5f5f5;border-color:#40a9ff;color:#40a9ff}.btn-danger{background-color:#f5222d;color:white;border:1px solid #f5222d}.btn-danger:hover{background-color:#cf1322;border-color:#cf1322}.table-container{border:1px solid #f0f0f0;border-radius:6px;overflow:hidden;margin-bottom:16px}.table{width:100%;border-collapse:collapse;background:white}.table th{background-color:#fafafa;padding:12px 16px;font-weight:600;color:#262626;border-bottom:1px solid #f0f0f0;font-size:14px}.table td{padding:12px 16px;border-bottom:1px solid #f0f0f0;color:#595959;font-size:14px}.table tbody tr:hover{background-color:#f5f5f5}.table tbody tr:last-child td{border-bottom:none}.tag{display:inline-block;padding:2px 8px;border-radius:4px;font-size:12px;font-weight:400;color:white;text-align:center;min-width:60px}.action-buttons{display:flex;gap:8px}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#8c8c8c}.loading-spinner{width:32px;height:32px;border:3px solid #f0f0f0;border-top:3px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:16px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.empty-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#8c8c8c}.empty-icon{font-size:48px;margin-bottom:16px;opacity:0.6}.empty-text{font-size:14px;color:#8c8c8c}.pagination-container{display:flex;align-items:center;justify-content:space-between;padding:16px 0;border-top:1px solid #f0f0f0}.pagination-info{color:#8c8c8c;font-size:14px}.pagination-controls{display:flex;align-items:center;gap:12px}.pagination-btn{padding:6px 12px;border:1px solid #d9d9d9;background:white;color:#595959;border-radius:4px;cursor:pointer;font-size:14px;transition:all 0.2s}.pagination-btn:hover:not(:disabled){border-color:#40a9ff;color:#40a9ff}.pagination-btn:disabled{background-color:#f5f5f5;color:#bfbfbf;cursor:not-allowed;border-color:#f0f0f0}.pagination-current{color:#262626;font-size:14px;font-weight:500;padding:0 8px}.pagination-size-select{padding:6px 8px;border:1px solid #d9d9d9;border-radius:4px;background:white;color:#595959;font-size:14px;cursor:pointer;transition:all 0.2s}.pagination-size-select:hover{border-color:#40a9ff}.pagination-size-select:focus{outline:none;border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.message{position:fixed;top:24px;left:50%;transform:translateX(-50%);padding:12px 24px;border-radius:6px;font-size:14px;font-weight:500;z-index:1100;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);animation:messageSlideIn 0.3s ease-out}.message-success{background-color:#f6ffed;color:#52c41a;border:1px solid #b7eb8f}.message-error{background-color:#fff2f0;color:#ff4d4f;border:1px solid #ffccc7}@keyframes messageSlideIn{from{opacity:0;transform:translateX(-50%) translateY(-20px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}@media (max-width: 768px){.modal-container{margin:20px;max-width:calc(100vw - 40px)}.modal-header{padding:12px 16px}.modal-body{padding:16px}.table th,.table td{padding:8px 12px;font-size:13px}.pagination-container{flex-direction:column;gap:12px;align-items:stretch}.pagination-controls{justify-content:center}.modal-title{font-size:14px;gap:8px}}@media (max-width: 480px){.table-container{overflow-x:auto}.table{min-width:600px}.action-buttons{flex-direction:column;gap:4px}}";const Fe={page:1,size:10};const Ee={0:{text:"处理中",color:"#1890ff"},1:{text:"已完成",color:"#52c41a"},"-1":{text:"失败",color:"#ff4d4f"}};const Me=class{constructor(o){e(this,o);this.cancel=t(this,"cancel")}botId;sourceId;open=false;cancel;loading=true;pagination=Fe;data=[];showMessage=false;messageText="";messageType="success";watchOpen(e){if(e){this.fetchData(this.pagination)}}async fetchData(e){this.loading=true;try{const t=await a({url:"/sdk/v1/export_batch/page",method:"GET",params:{page:e.page,size:e.size,bot_id:this.botId,source_id:this.sourceId}});if(t.success&&t.data){const o=t?.data?.records??[];this.data=o;this.pagination={...e,total:t?.data?.total??0}}}catch(e){console.error("Failed to fetch data:",e)}finally{this.loading=false}}async handleDownload(e){try{const t=await s(e.cos_key);const o=e.file_name;if(t){const e=document.createElement("a");e.href=t;e.setAttribute("download",o);document.body.appendChild(e);e.click();e.remove();this.showMessageToast("下载成功","success")}else{this.showMessageToast("获取下载链接失败","error")}}catch(e){this.showMessageToast("下载失败","error")}}async handleDelete(e){try{const t=await a({url:`/sdk/v1/export_batch/delete/${e.id}`,method:"DELETE"});if(t?.success){this.showMessageToast("删除成功","success");setTimeout((()=>{this.fetchData(this.pagination)}),100)}}catch(e){this.showMessageToast(`删除失败: ${e.message}`,"error")}}showMessageToast(e,t){this.messageText=e;this.messageType=t;this.showMessage=true;setTimeout((()=>{this.showMessage=false}),3e3)}handleRefresh=()=>{this.fetchData(this.pagination)};handlePageChange=(e,t)=>{const o={...this.pagination,page:e,size:t};this.fetchData(o)};formatDate(e){const t=new Date(e);return t.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}renderEmpty(){return i("div",{class:"empty-container"},i("div",{class:"empty-icon"},"📄"),i("div",{class:"empty-text"},"暂无任务"))}renderTag(e){const t=Ee[e.toString()]||{text:"未知",color:"#d9d9d9"};return i("span",{class:"tag",style:{backgroundColor:t.color}},t.text)}renderButton(e,t,o="default",n="medium"){return i("button",{class:`btn btn-${o} btn-${n}`,onClick:t},e)}renderTable(){if(this.loading){return i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("div",null,"加载中..."))}if(!this.data||this.data.length===0){return this.renderEmpty()}return i("div",{class:"table-container"},i("table",{class:"table"},i("thead",null,i("tr",null,i("th",{style:{width:"300px",textAlign:"center"}},"文件名"),i("th",{style:{width:"100px",textAlign:"center"}},"状态"),i("th",{style:{width:"180px",textAlign:"center"}},"创建时间"),i("th",{style:{width:"100px",textAlign:"left"}},"操作"))),i("tbody",null,this.data.map((e=>i("tr",{key:e.id},i("td",{style:{textAlign:"center"}},e.file_name),i("td",{style:{textAlign:"center"}},this.renderTag(e.status)),i("td",{style:{textAlign:"center"}},this.formatDate(e.created_at)),i("td",{style:{textAlign:"left"}},i("div",{class:"action-buttons"},e.status!==0&&this.renderButton("删除",(()=>this.handleDelete(e)),"danger","small"),e.cos_key&&this.renderButton("下载",(()=>this.handleDownload(e)),"primary","small")))))))))}renderPagination(){if(!this.pagination.total||this.pagination.total===0){return null}const e=Math.ceil(this.pagination.total/this.pagination.size);const t=this.pagination.page;return i("div",{class:"pagination-container"},i("div",{class:"pagination-info"},"共",this.pagination.total,"条"),i("div",{class:"pagination-controls"},i("button",{class:"pagination-btn",disabled:t<=1,onClick:()=>this.handlePageChange(t-1,this.pagination.size)},"上一页"),i("span",{class:"pagination-current"},t," / ",e),i("button",{class:"pagination-btn",disabled:t>=e,onClick:()=>this.handlePageChange(t+1,this.pagination.size)},"下一页"),i("select",{class:"pagination-size-select",onChange:e=>this.handlePageChange(1,parseInt(e.target.value))},i("option",{value:"10",selected:this.pagination.size===10},"10条/页"),i("option",{value:"20",selected:this.pagination.size===20},"20条/页"),i("option",{value:"50",selected:this.pagination.size===50},"50条/页"))))}renderMessage(){if(!this.showMessage)return null;return i("div",{class:`message message-${this.messageType}`},this.messageText)}render(){if(!this.open){return null}return i("div",{class:"modal-overlay",onClick:()=>this.cancel.emit()},i("div",{class:"modal-container",onClick:e=>e.stopPropagation()},i("div",{class:"modal-header"},i("div",{class:"modal-title"},i("span",null,"导出任务列表"),this.renderButton("🔄 刷新",this.handleRefresh,"default","small")),i("button",{class:"modal-close",onClick:()=>this.cancel.emit()},"✕")),i("div",{class:"modal-body"},this.renderTable(),this.renderPagination()),this.renderMessage()))}static get watchers(){return{open:["watchOpen"]}}};Me.style=Te;const De=".pcm-message{position:fixed;top:20px;left:50%;transform:translateX(-50%) translateY(-100%);background-color:#fff;padding:10px 16px;border-radius:4px;box-shadow:0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);pointer-events:all;z-index:1010;opacity:0;transition:all 0.3s}.pcm-message-visible{transform:translateX(-50%) translateY(0);opacity:1}.pcm-message-content{display:flex;align-items:center}.pcm-message-icon{margin-right:8px;font-size:16px;line-height:1}.pcm-message-success .pcm-message-icon{color:#52c41a}.pcm-message-error .pcm-message-icon{color:#ff4d4f}.pcm-message-warning .pcm-message-icon{color:#faad14}.pcm-message-info .pcm-message-icon{color:#1890ff}.pcm-message-text{font-size:14px;line-height:1.5}.pcm-message-container{position:fixed;top:20px;left:0;width:100%;display:flex;flex-direction:column;align-items:center;pointer-events:none;z-index:1010}";const Be=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Re=class{constructor(t){e(this,t)}get el(){return o(this)}content="";type="info";duration=3e3;visible=false;timer;componentWillLoad(){if(this.content){this.visible=true}}componentDidLoad(){if(this.visible&&this.duration>0){this.timer=window.setTimeout((()=>{this.close()}),this.duration)}}disconnectedCallback(){if(this.timer){clearTimeout(this.timer)}}async show(){this.visible=true;if(this.duration>0){this.timer=window.setTimeout((()=>{this.close()}),this.duration)}}async close(){this.visible=false;setTimeout((()=>{if(this.el&&this.el.parentNode){this.el.parentNode.removeChild(this.el)}}),300)}render(){return i("div",{key:"57fa15e1b08ec7918eb4ed1431c8715c926a8017",class:{"pcm-message":true,"pcm-message-visible":this.visible,[`pcm-message-${this.type}`]:true}},i("div",{key:"f8b6e081018ddbbac35ffa98d895d6212093c4fd",class:"pcm-message-content"},i("span",{key:"9c5e709f8e682ed9bfa96d18b683bc6db2ddc2ac",class:"pcm-message-icon"},this.renderIcon()),i("span",{key:"9293ee930786b8b3d346459f1c57b8452332ba7e",class:"pcm-message-text"},this.content)))}renderIcon(){switch(this.type){case"success":return i("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}));case"error":return i("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}));case"warning":return i("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}));default:return i("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 664c-30.9 0-56-25.1-56-56 0-30.9 25.1-56 56-56s56 25.1 56 56c0 30.9-25.1 56-56 56zm32-296c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V248c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184z"}))}}};Re.style=De+Be;const Oe={number:"",isWorking:false,close:async function(e){const{onOk:t,onError:o}=e??{};const{number:i}=this;if(i){const e=await a({url:`/sdk/v1/update_id/${i}`,method:"delete"});if(e.success){this.number="";t?.()}else{o?.()}}}};const He=".mobile-upload{display:flex;justify-content:flex-end;margin-bottom:4px}.btn{position:relative;padding:4px 8px;border-radius:4px;cursor:pointer;overflow:hidden;display:flex;justify-content:center;align-items:center;white-space:nowrap}.btn::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%}.btn:hover::after{background-color:rgba(0,0,0,0.04)}.btn-link{color:#0D75FB}.btn-default{background-color:#ffffff;color:#0D75FB;border:1px solid #0D75FB}.btn-primary{background-color:#0D75FB;color:#ffffff}.loading{font-size:12px;color:#999999}.mask{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);display:flex;justify-content:center;align-items:center;z-index:10000}.mask .upload-wrapper{width:540px;max-width:80%;max-height:80%;background-color:#ffffff;padding:32px 24px;border-radius:16px;overflow-y:auto}.mask .upload-wrapper .upload-box{display:flex;flex-direction:column;align-items:center}.time-expire{margin:8px 0;text-align:center;font-size:12px;color:#555555}.time-count-down{margin-left:8px;color:#0D75FB}.alert-tip{margin-top:8px;text-align:center;font-size:12px;color:#999999}.qrcode-wrapper{width:160px;height:160px;display:flex;justify-content:center;align-items:center;border:1px solid #e5e5e5;border-radius:4px;padding:1px}.qrcode-wrapper .qrcode{width:100%;height:100%}.modal-footer{margin-top:32px;display:flex;justify-content:center;align-items:center;gap:8px}.modal-footer .btn{min-width:100px}.qrcode-textarea{width:calc(100% - 16px);min-height:120px;border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}";const Ae='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Le=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Pe=class{constructor(o){e(this,o);this.ok=t(this,"ok")}name="";rows=8;maxLength=undefined;uploadHeaders;uploadParams;QR_CODE_VALID_TIME=0;open=false;mobileUrl="";setStartMobileUpload=false;startMobileUploadLoading=false;qrcodeStatus="loading";value="";expireTime="";ok;setStartMobileUploadWrapper=e=>{Oe.isWorking=e;this.setStartMobileUpload=e};qrcodeUrl="";setMobileUrlWrapper=e=>{this.mobileUrl=e;if(e){const t=S(0,"M");t.addData(e);t.make();this.qrcodeUrl=t.createDataURL(4,0)}else{this.qrcodeUrl=""}};pollingQueryNumberInfo=async e=>{const t=await a({url:`/sdk/v1/update_id/${e}/status`,method:"get"});if(t?.success){const e=t.data??{};const{custom_data:o}=e;this.value=o??""}if(Oe.isWorking){setTimeout((()=>{this.pollingQueryNumberInfo(e)}),3e3)}};handleStartMobileUpload=async()=>{const e=this;this.qrcodeStatus="loading";this.startMobileUploadLoading=true;const t=this.uploadParams??{};const o={cfg:{fromUserName:"",fromUserId:"",upload:e.uploadParams,name:e.name,rows:e.rows,maxLength:e.maxLength,params:t}};const i=await a({url:`/sdk/v1/update_id`,method:"post",data:o});if(i?.success){const e=i.data??{};Oe.number=e.update_id;const t=new Date(Date.now()+3600*1e3);this.expireTime=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`;const o=`${c}/agents/inputByCode?num=${Oe.number}`;this.setMobileUrlWrapper(o);this.setStartMobileUploadWrapper(true);this.qrcodeStatus="active";this.pollingQueryNumberInfo(Oe.number)}this.startMobileUploadLoading=false};cancelLoading=false;cancelMobileUpload=async()=>{this.cancelLoading=true;await Oe.close({onError(){j.info("取消失败")}});this.cancelLoading=false;this.QR_CODE_VALID_TIME=0;this.expireTime="";this.setStartMobileUploadWrapper(false);this.setMobileUrlWrapper("");this.qrcodeStatus="expired";this.value="";this.open=false};render(){return i("div",{key:"a65e7eda77d4230d9907746b0b6fe94cf123680a"},i("div",{key:"dc1742230c33e30387a5f79e56a2d93ef2e0444c",class:"mobile-upload"},i("div",{key:"29ee9a45bdf306358c7d8036ac3c176f42a6a847",class:"btn btn-link",onClick:()=>{this.open=true;this.handleStartMobileUpload()}},"扫码填写")),this.open&&i("div",{key:"b8a52436f31ec644d6fac2be02ff09731cd0b7a2",class:"mask"},i("div",{key:"e1f2af3bf4e1c113a20c9d9b5d3b6af2d3942046",class:"upload-wrapper"},this.setStartMobileUpload?i("div",{class:"upload-box"},i("div",{class:"qrcode-wrapper"},this.qrcodeStatus==="active"&&i("img",{class:"qrcode",src:this.qrcodeUrl}),this.qrcodeStatus==="loading"&&i("span",{class:"loading"},"加载中..."),this.qrcodeStatus==="expired"&&i("div",{class:"btn btn-link",onClick:this.handleStartMobileUpload},"重新获取")),i("div",{class:"time-expire"},"二维码有效期至 ",this.expireTime),i("div",{class:"alert-tip"},"填写过程中请不要关闭此弹窗"),this.qrcodeStatus==="active"&&i("div",{style:{marginTop:"12px",fontSize:"12px"},class:"btn btn-link",onClick:()=>{navigator.clipboard.writeText(this.mobileUrl).then((()=>{j.success("已复制到剪贴板")})).catch((()=>{j.error("复制失败")}))}},"复制二维码地址")):this.startMobileUploadLoading&&i("span",{class:"loading"},"加载中..."),i("div",{key:"c46909a409adc63f2fde94c38c1825ed425d239f",style:{marginTop:"12px"}},!!this.value?.length&&i("textarea",{key:"99b48023a915da9c327d12862fff121ed4db9e0e",readOnly:true,class:"qrcode-textarea",value:this.value,onChange:e=>{this.value=e.target.value}})),i("div",{key:"840b059d15a2d0c232c947b4044d14be266617ae",class:"modal-footer"},i("div",{key:"aab1cb6469eb8f6594cff574b2af96121ee90090",class:"btn btn-default",onClick:this.cancelMobileUpload},"取消"),i("div",{key:"671aab6272aabcede1b92e1d946ef6aac0d0616c",class:"btn btn-primary",onClick:()=>{if(!this.value){j.info(`请输入内容`);return}if(this.value.length>this.maxLength){j.info(`输入内容不能超过${this.maxLength}个字符`);return}this.ok.emit(this.value);this.cancelMobileUpload()}},"完成")))))}};Pe.style=He+(Ae+Le);const qe={number:"",isWorking:false,close:async function(e){const{onOk:t,onError:o}=e??{};const{number:i}=this;if(i){const e=await a({url:`/sdk/v1/update_id/${i}`,method:"delete"});if(e.success){this.number="";t?.()}else{o?.()}}}};const $e=".upload-area{max-height:300px;overflow-y:auto}.upload-actions{display:flex;gap:12px;margin-top:12px;width:100%}.upload-placeholder{width:100%;cursor:pointer}.upload-placeholder img{display:block;margin:0 auto}.upload-placeholder p{text-align:center}.upload-text{margin:8px 0}.upload-hint{font-size:12px;color:#999999}.file-item{display:flex;align-items:center;justify-content:space-between;padding:8px 0}.file-item-content{display:flex;align-items:center;min-width:0}.file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.remove-file{border:0;background:transparent;cursor:pointer;font-size:18px}.mobile-upload{display:flex;justify-content:flex-end;margin-bottom:4px}.btn{position:relative;padding:4px 8px;border-radius:4px;cursor:pointer;overflow:hidden;display:flex;justify-content:center;align-items:center;white-space:nowrap}.btn::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%}.btn:hover::after{background-color:rgba(0,0,0,0.04)}.btn-link{color:#0D75FB}.btn-default{background-color:#ffffff;color:#0D75FB;border:1px solid #0D75FB}.btn-primary{background-color:#0D75FB;color:#ffffff}.loading{font-size:12px;color:#999999}.mask{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);display:flex;justify-content:center;align-items:center;z-index:10000}.mask .upload-wrapper{width:540px;max-width:80%;max-height:80%;background-color:#ffffff;padding:32px 24px;border-radius:16px;overflow-y:auto}.mask .upload-wrapper .upload-box{display:flex;flex-direction:column;align-items:center}.time-expire{margin:8px 0;text-align:center;font-size:12px;color:#555555}.time-count-down{margin-left:8px;color:#0D75FB}.alert-tip{margin-top:8px;text-align:center;font-size:12px;color:#999999}.qrcode-wrapper{width:160px;height:160px;display:flex;justify-content:center;align-items:center;border:1px solid #e5e5e5;border-radius:4px;padding:1px}.qrcode-wrapper .qrcode{width:100%;height:100%}.modal-footer{margin-top:32px;display:flex;justify-content:center;align-items:center;gap:8px}.modal-footer .btn{min-width:100px}";const Ue='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Ne=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Ve=class{constructor(o){e(this,o);this.ok=t(this,"ok")}multiple=false;acceptFileSuffixList=[];maxFileCount=Infinity;maxFileSize=Infinity;uploadHeaders;uploadParams;uploadAreaMode=false;disabled=false;defaultFileList=[];uploadText="点击上传简历";QR_CODE_VALID_TIME=0;open=false;mobileUrl="";setStartMobileUpload=false;startMobileUploadLoading=false;qrcodeStatus="loading";value=[];mobileUploadFiles=[];expireTime="";ok;componentWillLoad(){this.value=[...this.defaultFileList]}async getIsUploading(){return this.startMobileUploadLoading}async clearSelectedFiles(){this.value=[]}setStartMobileUploadWrapper=e=>{qe.isWorking=e;this.setStartMobileUpload=e};qrcodeUrl="";setMobileUrlWrapper=e=>{this.mobileUrl=e;if(e){const t=S(0,"M");t.addData(e);t.make();this.qrcodeUrl=t.createDataURL(4,0)}else{this.qrcodeUrl=""}};pollingQueryNumberInfo=async e=>{const t=await a({url:`/sdk/v1/update_id/${e}/status`,method:"get"});if(t?.success){const e=t.data??{};const{file_list:o}=e;this.mobileUploadFiles=o??[]}if(qe.isWorking){setTimeout((()=>{this.pollingQueryNumberInfo(e)}),3e3)}};handleStartMobileUpload=async()=>{const e=this;this.qrcodeStatus="loading";this.startMobileUploadLoading=true;const t=this.uploadParams??{};const o=Array.isArray(t.tags)?t.tags:undefined;const i={is_knowledge_doc:false,tags:o,cfg:{maxSize:e.maxFileSize,maxCount:e.multiple?e.maxFileCount:1,fromUserName:"",fromUserId:"",customAccept:e.acceptFileSuffixList.join(","),upload:e.uploadParams}};const n=await a({url:`/sdk/v1/update_id`,method:"post",data:i});if(n?.success){const e=n.data??{};qe.number=e.update_id;const t=new Date(Date.now()+3600*1e3);this.expireTime=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`;const o=`${c}/agents/uploadFileByCode?num=${qe.number}`;this.setMobileUrlWrapper(o);this.setStartMobileUploadWrapper(true);this.qrcodeStatus="active";this.pollingQueryNumberInfo(qe.number)}this.startMobileUploadLoading=false};cancelLoading=false;cancelMobileUpload=async(e=true)=>{this.cancelLoading=true;await qe.close({onError(){j.info("取消失败")}});this.cancelLoading=false;this.QR_CODE_VALID_TIME=0;this.expireTime="";this.setStartMobileUploadWrapper(false);this.setMobileUrlWrapper("");this.qrcodeStatus="expired";if(e){this.mobileUploadFiles=[]}this.open=false};handleDelete=async e=>{const t=await a({url:`/sdk/v1/update_id/${qe.number}/file`,method:"delete",params:{update_id:qe.number,cos_key:e}});if(t?.success){this.mobileUploadFiles=this.mobileUploadFiles.filter((t=>t.cos_key!==e));this.value=this.value.filter((t=>t.cos_key!==e));this.ok.emit(this.value)}};handleOpenUpload=()=>{if(this.disabled)return;if(this.maxFileCount<=this.value.length){j.info("文件数量已达到上限!");return}this.mobileUploadFiles=[];this.open=true;this.handleStartMobileUpload()};render(){return i("div",{key:"a27ea277ebcbcff58e694aef5b9b19dc7e46ce4e"},this.uploadAreaMode?i("div",{class:"upload-area-mode"},i("div",{class:"upload-area"},this.value.map(((e,t)=>i("div",{class:"file-item",key:e.cos_key||t},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name"},e.file_name)),!this.disabled&&i("button",{class:"remove-file",onClick:t=>{t.stopPropagation();this.handleDelete(e.cos_key)}},"×"))))),!this.disabled&&this.value.length<this.maxFileCount&&i("div",{class:"upload-actions"},i("div",{class:"upload-placeholder",onClick:this.handleOpenUpload},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),i("p",{class:"upload-text"},this.uploadText),!!this.acceptFileSuffixList.length&&i("p",{class:"upload-hint"},"支持 ",this.acceptFileSuffixList.join("、")," 格式。")))):i("div",{class:"mobile-upload"},i("div",{class:"btn btn-link",onClick:this.handleOpenUpload},"扫码上传")),this.open&&i("div",{key:"a8af8a828ada96d2da206c9a029483da1488c831",class:"mask"},i("div",{key:"1720c68cee252f62c38711a08c20c6dfc67fb2af",class:"upload-wrapper"},this.setStartMobileUpload?i("div",{class:"upload-box"},i("div",{class:"qrcode-wrapper"},this.qrcodeStatus==="active"&&i("img",{class:"qrcode",src:this.qrcodeUrl}),this.qrcodeStatus==="loading"&&i("span",{class:"loading"},"加载中..."),this.qrcodeStatus==="expired"&&i("div",{class:"btn btn-link",onClick:this.handleStartMobileUpload},"重新获取")),i("div",{class:"time-expire"},"二维码有效期至 ",this.expireTime),i("div",{class:"alert-tip"},"上传过程中请不要关闭此弹窗"),this.qrcodeStatus==="active"&&i("div",{style:{marginTop:"12px",fontSize:"12px"},class:"btn btn-link",onClick:()=>{navigator.clipboard.writeText(this.mobileUrl).then((()=>{j.success("已复制到剪贴板")})).catch((()=>{j.error("复制失败")}))}},"复制二维码地址")):this.startMobileUploadLoading&&i("span",{class:"loading"},"加载中..."),i("div",{key:"99dd01fd22a23ddbbf01c65280a786eee09613b4",style:{marginTop:"12px"}},this.mobileUploadFiles.map(((e,t)=>i("div",{class:"file-item",key:t},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name"},e?.file_name)),i("button",{class:"remove-file",onClick:t=>{t.stopPropagation();this.handleDelete(e.cos_key)}},"×"))))),i("div",{key:"aa63da076534b68e4f85173683c41976a15adc46",class:"modal-footer"},i("div",{key:"400878dd4a2e12d8aa21f39e33c50cc6d633d917",class:"btn btn-default",onClick:()=>this.cancelMobileUpload()},"取消"),i("div",{key:"43db85335f6731246003f8f6f92c0a3e2c9f3e88",class:"btn btn-primary",onClick:()=>{if(this.value.length+this.mobileUploadFiles.length>this.maxFileCount){j.info(`最多只能选择${this.maxFileCount}个文件,请删除多余文件!`);return}this.value=this.multiple?[...this.value,...this.mobileUploadFiles]:this.mobileUploadFiles.slice(0,1);this.ok.emit(this.value);this.cancelMobileUpload(false)}},"完成")))))}};Ve.style=$e+(Ue+Ne);const We=":host{display:block;width:100%;height:100%}.position-selector-container{display:flex;flex-direction:column;width:100%;height:100%;background:#fff}.search-bar{display:flex;align-items:center;gap:12px;padding:16px;border-bottom:1px solid #f0f0f0;flex-shrink:0}.search-input-wrapper{position:relative;display:flex;align-items:center;flex:1;min-width:200px;max-width:500px}.search-icon{position:absolute;left:12px;color:#bfbfbf;pointer-events:none}.search-input{width:100%;height:36px;padding:4px 36px 4px 36px;font-size:14px;line-height:1.5;color:rgba(0, 0, 0, 0.85);background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:6px;transition:all 0.3s;outline:none}.search-input:hover{border-color:#40a9ff}.search-input:focus{border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.search-input::placeholder{color:#bfbfbf}.clear-button{position:absolute;right:12px;background:none;border:none;padding:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#bfbfbf;transition:color 0.3s}.clear-button:hover{color:#8c8c8c}.search-button{padding:4px 15px;height:36px;font-size:14px;line-height:1.5;border-radius:6px;color:#fff;background-color:#1890ff;border:1px solid #1890ff;cursor:pointer;transition:all 0.3s;outline:none;white-space:nowrap;flex-shrink:0}.search-button:hover{background-color:#40a9ff;border-color:#40a9ff}.search-button:active{background-color:#096dd9;border-color:#096dd9}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;gap:16px;color:#8c8c8c}.loading-spinner{width:32px;height:32px;border:3px solid #f0f0f0;border-top-color:#1890ff;border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.empty-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;gap:16px}.empty-icon{opacity:0.5}.empty-text{margin:0;color:#8c8c8c;font-size:14px}.position-list{flex:1;overflow-y:auto;min-height:0}.table-container{width:100%;overflow-x:auto}.position-table{width:100%;border-collapse:collapse;font-size:14px}.position-table thead{background-color:#fafafa;position:sticky;top:0;z-index:1}.position-table th{padding:12px 16px;text-align:left;font-weight:500;color:rgba(0, 0, 0, 0.85);border-bottom:1px solid #f0f0f0;white-space:nowrap}.position-table td{padding:12px 16px;border-bottom:1px solid #f0f0f0;color:rgba(0, 0, 0, 0.65)}.position-table tbody tr{transition:background-color 0.3s}.position-table tbody tr:hover{background-color:#fafafa}.position-table tbody tr.selected-row{background-color:#e6f7ff}.checkbox-column{width:50px;text-align:center}.title-column{min-width:150px;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.company-column{min-width:120px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.location-column{min-width:100px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.requirements-column{min-width:200px;max-width:300px}.requirements-text{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;word-break:break-word;line-height:1.5}.salary-column{min-width:100px;white-space:nowrap}.action-column{width:100px;text-align:center}.position-checkbox{width:16px;height:16px;cursor:pointer;accent-color:#1890ff}.select-button{padding:4px 15px;height:28px;font-size:14px;line-height:1.5;border-radius:6px;color:#fff;background-color:#1890ff;border:1px solid #1890ff;cursor:pointer;transition:all 0.3s;outline:none}.select-button:hover{background-color:#40a9ff;border-color:#40a9ff}.select-button:active{background-color:#096dd9;border-color:#096dd9}@media screen and (max-width: 768px){.search-bar{padding:12px;gap:8px}.search-input-wrapper{min-width:auto;max-width:none}.search-input{height:40px;font-size:16px}.search-button{height:40px;padding:4px 12px}.table-container{overflow-x:auto;-webkit-overflow-scrolling:touch}.position-table{font-size:12px}.position-table th,.position-table td{padding:8px 12px}.title-column,.company-column,.location-column{min-width:100px}.select-button{padding:4px 12px;height:32px;font-size:14px}}.pagination-container{display:flex;align-items:center;justify-content:center;gap:16px;padding:16px;border-top:1px solid #f0f0f0;flex-shrink:0}.pagination-button{padding:4px 15px;height:32px;font-size:14px;line-height:1.5;border-radius:6px;color:rgba(0, 0, 0, 0.85);background-color:#fff;border:1px solid #d9d9d9;cursor:pointer;transition:all 0.3s;outline:none}.pagination-button:hover:not(:disabled){color:#40a9ff;border-color:#40a9ff}.pagination-button:active:not(:disabled){color:#096dd9;border-color:#096dd9}.pagination-button:disabled{color:rgba(0, 0, 0, 0.25);background-color:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.pagination-info{font-size:14px;color:rgba(0, 0, 0, 0.65)}.position-list::-webkit-scrollbar{width:8px;height:8px}.position-list::-webkit-scrollbar-track{background:#f1f1f1}.position-list::-webkit-scrollbar-thumb{background:#888;border-radius:4px}.position-list::-webkit-scrollbar-thumb:hover{background:#555}";const Je='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Qe=class{constructor(o){e(this,o);this.positionSelected=t(this,"positionSelected");this.positionSelectionChange=t(this,"positionSelectionChange");this.search=t(this,"search");this.sort=t(this,"sort")}oemId;multiple=false;selectedIds=[];pageSize=10;positionSelected;positionSelectionChange;search;sort;searchKeyword="";currentSelectedIds=[];currentPage=1;totalCount=0;positionsList=[];loading=false;handleSelectedIdsChange(e){this.currentSelectedIds=[...e]}async handleOemIdChange(e){if(e){await this.loadPositions()}}async componentWillLoad(){this.currentSelectedIds=[...this.selectedIds];if(this.oemId){await this.loadPositions()}}async loadPositions(){this.loading=true;try{const e=await p({oemId:this.oemId,page:this.currentPage,pageSize:this.pageSize,keyword:this.searchKeyword||undefined});if(e.success&&e.data){this.positionsList=e.data.items||[];this.totalCount=e.data.total||0}else{j.error(e.message||"获取职位列表失败");this.positionsList=[];this.totalCount=0}}catch(e){console.error("获取职位列表失败:",e);j.error("获取职位列表失败");this.positionsList=[];this.totalCount=0}finally{this.loading=false}}handleSearchInput=e=>{const t=e.target;this.searchKeyword=t.value};handleSearchKeyPress=async e=>{if(e.key==="Enter"){this.currentPage=1;await this.loadPositions()}};handleSearchClick=async()=>{this.currentPage=1;await this.loadPositions()};handleSearchClear=async()=>{this.searchKeyword="";this.currentPage=1;await this.loadPositions()};handlePageChange=async e=>{this.currentPage=e;await this.loadPositions()};getTotalPages=()=>Math.ceil(this.totalCount/this.pageSize);getDisplayPositions=()=>this.positionsList;formatPositionText=e=>{const t=[];if(e.title)t.push(`职位名称:${e.title}`);if(e.company_name)t.push(`公司名称:${e.company_name}`);if(e.department)t.push(`部门:${e.department}`);if(e.employment_type)t.push(`招聘类型:${e.employment_type}`);if(e.salary_range)t.push(`薪资范围:${e.salary_range}`);if(e.salary_min||e.salary_max){const o=`薪资:${e.salary_min||""}${e.salary_min&&e.salary_max?"-":""}${e.salary_max||""}`;if(o!=="薪资:")t.push(o)}if(e.location)t.push(`工作地点:${e.location}`);if(e.province)t.push(`省份:${e.province}`);if(e.city)t.push(`城市:${e.city}`);if(e.district)t.push(`区域:${e.district}`);if(e.address)t.push(`详细地址:${e.address}`);if(e.education_required)t.push(`学历要求:${e.education_required}`);if(e.experience_required)t.push(`经验要求:${e.experience_required}`);if(e.work_experience)t.push(`工作经验:${e.work_experience}`);if(e.recruiting_number)t.push(`招聘人数:${e.recruiting_number}`);if(e.job_description)t.push(`职位描述:${e.job_description}`);if(e.job_responsibilities)t.push(`工作职责:${e.job_responsibilities}`);if(e.job_requirements)t.push(`任职要求:${e.job_requirements}`);if(e.skills_required)t.push(`技能要求:${e.skills_required}`);if(e.benefits)t.push(`福利待遇:${e.benefits}`);if(e.job_type)t.push(`职位类型:${e.job_type}`);if(e.work_industry)t.push(`所属行业:${e.work_industry}`);if(e.recruitment_channel)t.push(`招聘渠道:${e.recruitment_channel}`);if(e.deadline)t.push(`截止日期:${e.deadline}`);return t.join("\n")};handleSelect=e=>{if(!this.multiple){const t={...e,formatted_text:this.formatPositionText(e)};this.positionSelected.emit(t)}};handleCheckboxChange=(e,t)=>{if(!this.multiple)return;if(t){if(!this.currentSelectedIds.includes(e.id)){this.currentSelectedIds=[...this.currentSelectedIds,e.id];this.positionSelectionChange.emit({action:"add",positions:[e]})}}else{this.currentSelectedIds=this.currentSelectedIds.filter((t=>t!==e.id));this.positionSelectionChange.emit({action:"remove",positions:[e]})}};isSelected=e=>this.currentSelectedIds.includes(e);render(){const e=this.getDisplayPositions();const t=this.getTotalPages();const o=t>1;return i("div",{key:"532d310ea67e381c1719ce61faa28475303a16c4",class:"position-selector-container"},i("div",{key:"94b42f213a21db72ab97f9c057340655a6de57b2",class:"search-bar"},i("div",{key:"78f53ea5fbc5cfeb53948e5348e0ff52c257ce1b",class:"search-input-wrapper"},i("svg",{key:"a03e144f45fac99d33def6ec4f3ce05ef95e7aa4",class:"search-icon",viewBox:"0 0 1024 1024",width:"16",height:"16"},i("path",{key:"da3ac4ccc5a1ca63a9035f603285d42bf444452c",d:"M945.066667 898.133333l-189.866667-189.866666c55.466667-64 87.466667-149.333333 87.466667-241.066667 0-204.8-168.533333-373.333333-373.333334-373.333333S96 264.533333 96 469.333333 264.533333 842.666667 469.333333 842.666667c91.733333 0 174.933333-34.133333 241.066667-87.466667l189.866667 189.866667c6.4 6.4 14.933333 8.533333 23.466666 8.533333s17.066667-2.133333 23.466667-8.533333c8.533333-12.8 8.533333-34.133333-2.133333-46.933334zM469.333333 778.666667C298.666667 778.666667 160 640 160 469.333333S298.666667 160 469.333333 160 778.666667 298.666667 778.666667 469.333333 640 778.666667 469.333333 778.666667z",fill:"currentColor"})),i("input",{key:"42fe509d7e446a44db173ea083fe649722b52e7c",type:"text",class:"search-input",placeholder:"搜索职位名称",value:this.searchKeyword,onInput:this.handleSearchInput,onKeyPress:this.handleSearchKeyPress}),this.searchKeyword&&i("button",{key:"523cf135d47edd8abae82b677164e9112a6544cf",class:"clear-button",onClick:this.handleSearchClear},i("svg",{key:"5474bbbbd1420cacabbba05ab5e97be33bfeb0a7",viewBox:"0 0 1024 1024",width:"14",height:"14"},i("path",{key:"06c1b5c93c16fac2bae3b656848a4b5a35df91e5",d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-0.3L512 563.4l-99.3 118.4-66.1 0.3c-4.4 0-8-3.5-8-8 0-1.9 0.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1 0.3L512 464.6l99.3-118.4 66-0.3c4.4 0 8 3.5 8 8 0 1.9-0.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z",fill:"currentColor"})))),i("button",{key:"cc5bc3c6e3bdd66e96a41378ede00d724f294f73",class:"search-button",onClick:this.handleSearchClick},"搜索")),this.loading&&i("div",{key:"19851301827555ed620d450a051a0e39483ecbff",class:"loading-container"},i("div",{key:"0b84a95088dc6e818f8a9a83e06bbe844f91d6ea",class:"loading-spinner"}),i("p",{key:"0136d7292088f5a029a513d99356cec226dd189e"},"加载中...")),!this.loading&&i("div",{key:"838cbcb50280fa1c27eb4f5ccd8c985ff5644063",class:"position-list"},e.length===0?i("div",{class:"empty-container"},i("svg",{class:"empty-icon",viewBox:"0 0 1024 1024",width:"64",height:"64"},i("path",{d:"M512 128C300.8 128 128 300.8 128 512s172.8 384 384 384 384-172.8 384-384S723.2 128 512 128z m0 704c-176 0-320-144-320-320s144-320 320-320 320 144 320 320-144 320-320 320z",fill:"#d9d9d9"}),i("path",{d:"M512 320c-17.6 0-32 14.4-32 32v256c0 17.6 14.4 32 32 32s32-14.4 32-32V352c0-17.6-14.4-32-32-32z m0 384c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z",fill:"#d9d9d9"})),i("p",{class:"empty-text"},"暂无职位")):i("div",{class:"table-container"},i("table",{class:"position-table"},i("thead",null,i("tr",null,this.multiple&&i("th",{class:"checkbox-column"}),i("th",{class:"title-column"},"职位名称"),i("th",{class:"company-column"},"公司名称"),i("th",{class:"location-column"},"工作地点"),i("th",{class:"requirements-column"},"职位要求"),!this.multiple&&i("th",{class:"action-column"},"操作"))),i("tbody",null,e.map((e=>i("tr",{key:e.id,class:{"selected-row":this.multiple&&this.isSelected(e.id)}},this.multiple&&i("td",{class:"checkbox-column"},i("input",{type:"checkbox",class:"position-checkbox",checked:this.isSelected(e.id),onChange:t=>this.handleCheckboxChange(e,t.target.checked)})),i("td",{class:"title-column",title:e.title},e.title),i("td",{class:"company-column",title:e.company_name},e.company_name||"-"),i("td",{class:"location-column",title:e.location},e.location||"-"),i("td",{class:"requirements-column"},i("div",{class:"requirements-text",title:e.job_requirements||e.job_responsibilities||"-"},e.job_requirements||e.job_responsibilities||"-")),!this.multiple&&i("td",{class:"action-column"},i("button",{class:"select-button",onClick:()=>this.handleSelect(e)},"选择"))))))))),o&&i("div",{key:"9750306eefda60760cdb17cf5c5d21e0310e9f39",class:"pagination-container"},i("button",{key:"da61683ee4f038b0d578834bd50319e541fa9404",class:"pagination-button",disabled:this.currentPage===1,onClick:()=>this.handlePageChange(this.currentPage-1)},"上一页"),i("span",{key:"c2423bbcc6b8d9b06bdd59698065ea501006f5f0",class:"pagination-info"},"第 ",this.currentPage," / ",t," 页,共 ",this.totalCount," 条"),i("button",{key:"1c845de610a44ea0881dbac4f5b0f07420d9bec2",class:"pagination-button",disabled:this.currentPage>=t,onClick:()=>this.handlePageChange(this.currentPage+1)},"下一页")))}static get watchers(){return{selectedIds:["handleSelectedIdsChange"],oemId:["handleOemIdChange"]}}};Qe.style=We+Je;const Ye=".loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:80px 20px;background:#fff}.loading-spinner{width:48px;height:48px;border:4px solid #e8e8e8;border-top-color:#0D75FB;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.loading-text{font-size:18px;font-weight:500;color:#333;margin-top:24px;margin-bottom:8px}.loading-subtext{font-size:14px;color:#666;margin-bottom:16px}.loading-dots{display:flex;gap:8px}.dot{width:8px;height:8px;border-radius:50%;background-color:#0D75FB;animation:pulse 1.5s ease-in-out infinite}.dot.delay-1{animation-delay:0.2s}.dot.delay-2{animation-delay:0.4s}@keyframes pulse{0%,100%{opacity:0.4;transform:scale(0.8)}50%{opacity:1;transform:scale(1)}}.error-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:80px 20px;background:#fff}.error-icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background-color:#fee2e2;color:#ef4444;font-size:24px;font-weight:bold}.error-text{font-size:16px;font-weight:500;color:#666;margin-top:16px;margin-bottom:16px}.retry-button{padding:10px 24px;background-color:#0D75FB;color:#fff;border:none;border-radius:6px;font-size:14px;cursor:pointer;transition:background-color 0.2s}.retry-button:hover{background-color:#0a5fd9}.analysis-container{display:flex;flex-direction:column;height:100%;padding:20px;background:#fff}.analysis-header{flex-shrink:0;padding-bottom:16px}.analysis-title{font-size:20px;font-weight:600;color:#333;margin-bottom:8px}.analysis-desc{font-size:14px;color:#666;margin-bottom:16px}.tab-container{display:flex;gap:8px;padding:4px;background-color:#f5f5f5;border-radius:8px}.tab-button{padding:8px 16px;background:transparent;border:none;border-radius:6px;font-size:14px;color:#666;cursor:pointer;transition:all 0.2s}.tab-button:hover{color:#333}.tab-button.active{background-color:#0D75FB;color:#fff}.iframe-container{flex:1;width:100%;min-height:400px;height:85vh;overflow:hidden;padding:20px}.iframe-container iframe{width:100%;height:100%;border:none}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:flex-start}.fullscreen-overlay{background:rgba(0, 0, 0, 0.8)}.modal-container{background:#fff;border-radius:12px;width:90%;max-width:1200px;height:90vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 4px 24px rgba(0, 0, 0, 0.15)}.fullscreen{width:100%;height:100%;max-width:100%;border-radius:0}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:12px}.header-icon{width:32px;height:32px;object-fit:contain}.close-button{background:transparent;border:none;font-size:24px;color:#666;cursor:pointer;padding:4px 8px;line-height:1}.close-button:hover{color:#333}@media screen and (max-width: 768px){.modal-container{width:100%;height:100%;max-width:100%;border-radius:0}.analysis-title{font-size:18px}.tab-container{flex-wrap:wrap}.tab-button{padding:6px 12px;font-size:12px}}";const Ge='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Xe=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Ke=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.conversationStart=t(this,"conversationStart");this.streamComplete=t(this,"streamComplete");this.interviewComplete=t(this,"interviewComplete");this.someErrorEvent=t(this,"someErrorEvent");this.tokenInvalid=t(this,"tokenInvalid")}token;isOpen=false;conversationId;botId="45444431062634496";optimizationType=1;customInputs={};defaultQuery="生成简历格式数据";modalTitle="千岗千简历";icon;fullscreen=false;zIndex=1e3;isShowHeader=true;isNeedClose=true;modalClosed;conversationStart;streamComplete;interviewComplete;someErrorEvent;tokenInvalid;isLoading=true;internalConversationId;error="";currentNodeTitle="";activeTab="analysis";get hostElement(){return o(this)}tokenInvalidListener;removeErrorListener;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){this.isLoading=true;this.internalConversationId=undefined;this.error="";this.currentNodeTitle="";this.activeTab="analysis"}else{await f(this.token);if(this.conversationId){this.internalConversationId=this.conversationId;this.isLoading=false}else{await this.startChatStream()}}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}componentDidLoad(){if(this.isOpen){this.handleIsOpenChange(true)}}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};startChatStream=async()=>{this.isLoading=true;this.error="";this.currentNodeTitle="";let e=false;const t={bot_id:this.botId,response_mode:"streaming",conversation_id:this.conversationId,query:this.defaultQuery,inputs:{...this.customInputs,optimization_type:this.optimizationType}};let o;await u({url:"/sdk/v1/chat/chat-messages",method:"POST",data:t,onMessage:t=>{if(t.conversation_id&&!o){o=t.conversation_id;this.internalConversationId=t.conversation_id;this.conversationStart.emit({conversation_id:t.conversation_id,event:t.event,message_id:t.message_id,id:t.id})}if((t.event==="message"||t.event==="agent_message")&&t.answer){e=true;this.currentNodeTitle=""}if(!e&&(t.event==="node_started"||t.event==="node_finished")){const e=t.data?.title;if(typeof e==="string"&&e.startsWith("progress:")){this.currentNodeTitle=e.slice("progress:".length).trim()}}if(t.event==="node_finished"&&t.data?.title?.includes("聘才猫任务结束")){this.isLoading=false;this.currentNodeTitle="";this.interviewComplete.emit({conversation_id:this.internalConversationId})}if(t.event==="message_end"){this.currentNodeTitle="";this.streamComplete.emit({conversation_id:t.conversation_id||"",event:t.event,message_id:t.message_id,id:t.id})}if(t.event==="error"){this.isLoading=false;this.currentNodeTitle="";this.error=t.data?.message||t.message||"请求失败";C.emitError({error:t.data,message:this.error})}},onError:e=>{console.error("SSE 请求错误:",e);this.isLoading=false;this.currentNodeTitle="";this.error="请求失败,请重试";C.emitError({error:e,message:this.error})},onComplete:()=>{this.isLoading=false;this.currentNodeTitle=""}})};handleRetry=()=>{this.startChatStream()};handleTabChange=e=>{this.activeTab=e};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=[{key:"analysis",label:"深度分析"},{key:"suggestions",label:"改进建议"},{key:"resume",label:"优化版本"}];const r=this.optimizationType===1?`${c}/reportNode/thousandResume?conversationId=${this.internalConversationId}&referrer=sdk&reportType=suggestions&showHeader=1&token=${this.token}`:`${c}/reportNode/thousandResume?conversationId=${this.internalConversationId}&referrer=sdk&reportType=${this.activeTab}&token=${this.token}`;return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.isLoading&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"AI 正在分析您的简历"),this.currentNodeTitle?i("div",{class:"resume-node-status",role:"status","aria-live":"polite","aria-atomic":"true"},i("span",{class:"resume-node-status-spinner","aria-hidden":"true"}),i("span",null,this.currentNodeTitle)):i("p",{class:"loading-subtext"},"请耐心等待..."),i("div",{class:"loading-dots"},i("span",{class:"dot"}),i("span",{class:"dot delay-1"}),i("span",{class:"dot delay-2"}))),!this.isLoading&&this.error&&i("div",{class:"error-container"},i("span",{class:"error-icon"},"!"),i("p",{class:"error-text"},this.error),i("button",{class:"retry-button",onClick:this.handleRetry},"重新分析")),!this.isLoading&&!this.error&&this.optimizationType===1&&this.internalConversationId&&i("div",{class:"iframe-container"},i("iframe",{src:r,frameborder:"0"})),!this.isLoading&&!this.error&&this.optimizationType===2&&this.internalConversationId&&i("div",{class:"analysis-container"},i("div",{class:"analysis-header"},i("h1",{class:"analysis-title"},"深度分析报告"),i("p",{class:"analysis-desc"},"全面诊断 + 改进建议 + 优化版本"),i("div",{class:"tab-container"},n.map((e=>i("button",{class:{"tab-button":true,active:this.activeTab===e.key},onClick:()=>this.handleTabChange(e.key)},e.label))))),i("div",{class:"iframe-container"},i("iframe",{src:r,frameborder:"0"})))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Ke.style=Ye+(Ge+Xe);const Ze=".upload-area{max-height:300px;overflow-y:auto}.upload-actions{display:flex;gap:12px;margin-top:12px;width:100%}";const et='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const tt=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const ot=class{constructor(o){e(this,o);this.uploadFailed=t(this,"uploadFailed");this.uploadChange=t(this,"uploadChange")}multiple=false;mobileUploadAble=false;acceptFileSuffixList=[];maxFileCount=Infinity;maxFileSize=Infinity;uploadHeaders;uploadParams;uploadText="点击上传简历";defaultFileList;disabled=false;uploadFailed;uploadChange;get hostElement(){return o(this)}selectedFiles=null;componentWillLoad(){if(this.defaultFileList&&this.defaultFileList.length>0){this.selectedFiles=this.defaultFileList.map((e=>({...e,state:g.Success})))}}async getIsUploading(){return!!this.selectedFiles?.some((e=>e.state===g.Uploading))}async clearSelectedFiles(){this.selectedFiles=null;this.clearSelectedFile()}handleUploadClick=()=>{if(this.disabled)return;const e=this.hostElement.shadowRoot?.querySelector(".file-input");e?.click()};clearSelectedFile=()=>{const e=this.hostElement.shadowRoot?.querySelector(".file-input");if(e){e.value=""}};async uploadFile(e){try{const t=await m(e,this.uploadHeaders||{},this.uploadParams||{});return{...t,file:e,file_name:e.name,file_size:e.size,state:g.Success}}catch(t){this.clearSelectedFile();I.captureError(t,{action:"uploadFile",component:"pcm-mnms-modal",title:"文件上传失败"});this.uploadFailed.emit({error:t,message:"文件上传失败,请重试"});return{file:e,error:t,state:g.Failed}}}handleFileChange=async e=>{const t=e.target;if(this.multiple){const e=Array.from(t.files||[]);if(e.length===0)return;const o=this.selectedFiles?.length||0;const i=this.maxFileCount-o;if(e.length>i){j.info(`最多只能上传 ${this.maxFileCount} 个文件,当前已选择 ${o} 个`);return}const n=[];const r=[];e.forEach((e=>{if(this.acceptFileSuffixList?.length){const t="."+e.name.split(".").pop()?.toLowerCase();if(!this.acceptFileSuffixList.includes(t)){r.push(`${e.name}(格式不支持)`);return}}if(this.maxFileSize<e.size){r.push(`${e.name}(文件过大)`);return}n.push(e)}));if(r.length>0){const e=this.acceptFileSuffixList?.length?this.acceptFileSuffixList.join("、"):"";const t=this.maxFileSize!==Infinity?b(this.maxFileSize):"";j.info(`以下文件无法上传:${r.join("、")}。${e?`支持格式:${e}。`:""}${t?`最大文件大小:${t}。`:""}`)}if(n.length===0){this.clearSelectedFile();return}const a=n.map((e=>({file:e,file_name:e.name,file_size:e.size,state:g.Uploading,cos_key:"",error:undefined})));this.selectedFiles=[...this.selectedFiles||[],...a];for(let e=0;e<n.length;e++){const t=n[e];const o=await this.uploadFile(t);if(this.selectedFiles){const t=this.selectedFiles.length;const i=t-n.length+e;if(i>=0&&i<this.selectedFiles.length){this.selectedFiles[i]=o;this.selectedFiles=[...this.selectedFiles]}}}this.clearSelectedFile();this.emitUploadChange()}else{const e=t.files?.[0];if(!e)return;if(this.acceptFileSuffixList?.length){const t="."+e.name.split(".").pop()?.toLowerCase();if(!this.acceptFileSuffixList.includes(t)){j.info(`请上传 ${this.acceptFileSuffixList.join("、")} 格式的文件`);return}}if(this.maxFileSize<e.size){j.info(`文件大小不能超过 ${b(this.maxFileSize)??"-"}`);return}this.selectedFiles=[{file:e,file_name:e.name,file_size:e.size,state:g.Uploading,cos_key:"",error:undefined}];const o=await this.uploadFile(e);this.selectedFiles=[o];this.clearSelectedFile();this.emitUploadChange()}};emitUploadChange=()=>{this.uploadChange.emit(this.selectedFiles?.filter((e=>e.state===g.Success)).map?.((e=>({cos_key:e.cos_key,file_name:e.file_name,file_size:e.file_size,ext:e.ext}))))};uploadBtn(){return i("div",{style:{width:"100%"}},!!this.mobileUploadAble&&i("components-mobile-upload-btn",{multiple:this.multiple,acceptFileSuffixList:this.acceptFileSuffixList,maxFileCount:this.maxFileCount,maxFileSize:this.maxFileSize,uploadHeaders:this.uploadHeaders,uploadParams:this.uploadParams,onOk:e=>{this.selectedFiles=[...this.selectedFiles??[],...(e.detail??[]).map((e=>({...e,state:g.Success})))];this.emitUploadChange()}}),i("div",{class:"upload-placeholder",onClick:this.handleUploadClick},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),i("p",{class:"upload-text"},this.uploadText),!!this.acceptFileSuffixList?.length&&i("p",{class:"upload-hint"},"支持 ",this.acceptFileSuffixList.join("、")," 格式。"),!!this.maxFileSize&&this.maxFileSize!==Infinity&&i("p",{class:"upload-hint"},"文件大小不能超过 ",b(this.maxFileSize)??"","。"),!!this.maxFileCount&&this.maxFileCount!==Infinity&&i("p",{class:"upload-hint"},"最多上传 ",this.maxFileCount," 个文件。")))}render(){return i("div",{key:"ebde31f58ddc1edb5b85d9f82de44284787a76d6"},i("div",{key:"ed33af9b6256c53ee2d5eaf7ab1fa32789856619",class:"resume-upload-section"},i("div",{key:"a36333a031f59d94b68677fc341d43b2a256ae7d",class:"upload-area"},i("div",{key:"50de7a083643b8e2c4087a1eb735e3d7624d1db7"},this.selectedFiles?.map?.(((e,t)=>i("div",{class:"file-item"},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name",style:e.state===g.Failed?{color:"red",textDecoration:"line-through"}:undefined},e?.file_name),e.state===g.Failed&&i("span",{style:{color:"red",marginLeft:"4px"}},"(",e.error?.message??"上传失败",")")),!this.disabled&&i("button",{class:"remove-file",onClick:e=>{e.stopPropagation();this.selectedFiles=this.selectedFiles?.filter(((e,o)=>t!==o));this.emitUploadChange()}},"×")))))),!this.disabled&&(this.multiple?i("div",{class:"upload-actions"},(this.selectedFiles?.length??0)<this.maxFileCount&&this.uploadBtn()):i("div",{class:"upload-actions"},!this.selectedFiles?.length&&this.uploadBtn()))),i("input",{key:"9248d915245239dd130c887f7d9da33707347598",type:"file",class:"file-input",multiple:this.multiple,onChange:this.handleFileChange}))}};ot.style=Ze+(et+tt);const it=":host{display:inline-flex}.voice-input-button{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;padding:0;margin:0;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#666;cursor:pointer;transition:background-color 0.2s, color 0.2s, border-color 0.2s}.voice-input-button:hover:not(:disabled){background-color:#f0f0f0;border-color:#bfbfbf}.voice-input-button:focus-visible{outline:2px solid rgba(46, 110, 223, 0.35);outline-offset:2px}.voice-input-button:disabled{cursor:not-allowed;opacity:0.55}.voice-input-button.recording{background-color:rgba(255, 0, 0, 0.1);border-color:rgba(255, 59, 48, 0.45);color:#ff3b30;animation:pulse 1.5s infinite}.voice-input-button.converting{background-color:rgba(0, 122, 255, 0.1);border-color:rgba(0, 122, 255, 0.35);color:#007aff}.converting-icon{animation:spin 1.5s linear infinite}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.65}}@keyframes spin{to{transform:rotate(360deg)}}";const nt=class{constructor(o){e(this,o);this.voiceRecognized=t(this,"voiceRecognized");this.voiceStatusChange=t(this,"voiceStatusChange");this.someErrorEvent=t(this,"someErrorEvent")}disabled=false;maxRecordingTime=60;locale="zh";voiceRecognized;voiceStatusChange;someErrorEvent;_status="idle";_recordingTimeLeft=60;_audioRecorder=null;_audioStream=null;_audioChunks=[];_audioMimeType="";_recordingStartTime=0;_recordingTimer=null;disconnectedCallback(){this._releaseRecordingResources()}_getText(e,t){return this.locale==="en"?t:e}_setStatus(e){this._status=e;this.voiceStatusChange.emit(e)}_emitError(e,t){console.error(t,e);this.someErrorEvent.emit({error:e,message:t})}_handleClick=()=>{if(this.disabled||this._status==="converting"){return}if(this._status==="recording"){this._stopRecording();return}if(!navigator.mediaDevices?.getUserMedia||!window.MediaRecorder){this._emitError(new Error("MediaRecorder API is unavailable"),this._getText("当前浏览器不支持语音输入","Voice input is not supported by this browser"));return}navigator.mediaDevices.getUserMedia({audio:true}).then((e=>this._startRecording(e))).catch((e=>{this._emitError(e,this._getText("无法访问麦克风,请检查麦克风权限","Unable to access the microphone. Please check microphone permissions"))}))};_startRecording(e){this._audioStream=e;try{const t=x();this._audioRecorder=t?new MediaRecorder(e,{mimeType:t}):new MediaRecorder(e);this._audioMimeType=this._audioRecorder.mimeType||t||"audio/webm"}catch(e){this._releaseRecordingResources();this._emitError(e,this._getText("无法启动录音,请检查麦克风设备","Unable to start recording. Please check the microphone"));return}this._audioChunks=[];this._recordingStartTime=Date.now();this._recordingTimeLeft=this.maxRecordingTime;this._audioRecorder.ondataavailable=e=>{if(e.data.size>0){this._audioChunks.push(e.data)}};this._audioRecorder.onerror=e=>{this._emitError(e,this._getText("录音失败,请重试","Recording failed. Please try again"));this._releaseRecordingResources();this._setStatus("idle")};this._audioRecorder.onstop=()=>{this._stopMediaStream();void this._processAudioRecording()};try{this._audioRecorder.start(100);this._setStatus("recording");this._recordingTimer=setInterval((()=>{const e=Math.floor((Date.now()-this._recordingStartTime)/1e3);this._recordingTimeLeft=Math.max(0,this.maxRecordingTime-e);if(this._recordingTimeLeft<=0){this._stopRecording()}}),1e3)}catch(e){this._releaseRecordingResources();this._setStatus("idle");this._emitError(e,this._getText("开始录音失败,请重试","Failed to start recording. Please try again"))}}_stopRecording(){if(!this._audioRecorder||this._audioRecorder.state==="inactive"){return}this._clearRecordingTimer();this._audioRecorder.stop()}async _processAudioRecording(){if(this._audioChunks.length===0){this._setStatus("idle");this._emitError(new Error("Recorded audio is empty"),this._getText("未录制到语音内容,请重试","No audio was recorded. Please try again"));return}this._setStatus("converting");try{const e=new Blob(this._audioChunks,{type:this._audioMimeType});if(e.size===0){throw new Error("Recorded audio is empty")}const t=this._getFileExtension(this._audioMimeType);const o=new File([e],`audio_input.${t}`,{type:this._audioMimeType});const i=await m(o,{},{tags:["audio"]});const n=await w(i.cos_key);if(!n){throw new Error("No transcription text returned")}this.voiceRecognized.emit(n)}catch(e){this._emitError(e,this._getText("语音识别失败,请重试","Speech recognition failed. Please try again"))}finally{this._audioChunks=[];this._audioRecorder=null;this._setStatus("idle")}}_getFileExtension(e){if(e.includes("mp4"))return"m4a";if(e.includes("ogg"))return"ogg";return"webm"}_clearRecordingTimer(){if(this._recordingTimer){clearInterval(this._recordingTimer);this._recordingTimer=null}}_stopMediaStream(){this._audioStream?.getTracks().forEach((e=>e.stop()));this._audioStream=null}_releaseRecordingResources(){this._clearRecordingTimer();if(this._audioRecorder){this._audioRecorder.ondataavailable=null;this._audioRecorder.onerror=null;this._audioRecorder.onstop=null;if(this._audioRecorder.state!=="inactive"){this._audioRecorder.stop()}}this._stopMediaStream();this._audioRecorder=null;this._audioChunks=[]}render(){const e=this._status==="recording";const t=this._status==="converting";const o=e?this._getText(`点击停止录音(剩余${this._recordingTimeLeft}秒)`,`Stop recording (${this._recordingTimeLeft}s remaining)`):t?this._getText("正在识别语音...","Recognizing speech..."):this._getText("语音输入","Voice input");return i("button",{key:"dc6874de2dfc7b9f5a5b65bc001fe8f580738231",type:"button",class:{"voice-input-button":true,recording:e,converting:t},title:o,"aria-label":o,"aria-pressed":e?"true":"false",disabled:this.disabled||t,onClick:this._handleClick},t?i("svg",{class:"converting-icon",viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor","aria-hidden":"true"},i("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})):i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor","aria-hidden":"true"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}),e&&i("circle",{cx:"12",cy:"11",r:"4",fill:"red"})))}};nt.style=it;const rt='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const at=".pc-layout{max-width:none}.task-layout{width:90%;max-width:1200px;min-width:800px}@media screen and (max-width: 1024px){.task-layout{width:95%;min-width:320px}}.task-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);overflow-y:auto;gap:20px}.upload-area{max-height:300px;overflow-y:auto}.step-header{text-align:center;margin-bottom:24px}.step-header h3{margin:0 0 8px 0;font-size:20px;color:#333}.step-description{margin:0;color:#666;font-size:14px}.step-indicator{background:#e6f7ff;color:#1890ff;padding:4px 8px;border-radius:4px;font-size:12px;margin-left:8px}.criteria-input-section{margin-bottom:20px}.criteria-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.task-info-section{flex-shrink:0}.info-cards{display:grid;grid-template-columns:1fr 1fr;gap:16px}@media screen and (max-width: 768px){.info-cards{grid-template-columns:1fr}}.info-card{border:1px solid #e8e8e8;border-radius:8px;overflow:hidden;background:#fff}.card-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#fafafa;cursor:pointer;transition:background-color 0.2s}.card-header:hover{background:#f0f0f0}.card-title{font-weight:500;color:#333}.toggle-btn{background:transparent;border:none;color:#1890ff;cursor:pointer;font-size:12px;padding:4px 8px;border-radius:4px;transition:background-color 0.2s}.toggle-btn:hover{background:rgba(24, 144, 255, 0.1)}.card-content{padding:16px;border-top:1px solid #e8e8e8;max-height:120px;overflow-y:auto}.card-content p{margin:0;line-height:1.6;color:#666;font-size:14px}.card-preview{padding:12px 16px;border-top:1px solid #e8e8e8}.preview-text{margin:0;line-height:1.5;color:#666;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer-text-content{line-height:1.6;color:#333;font-size:14px;white-space:pre-wrap;word-wrap:break-word}.upload-section{flex-shrink:0}.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;flex-shrink:0}.section-header-side{display:flex;align-items:center;gap:12px}.refresh-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background:white;border:1px solid #d9d9d9;border-radius:6px;cursor:pointer;transition:all 0.3s ease}.refresh-btn:hover:not(:disabled){border-color:#40a9ff;color:#40a9ff;background:#f6f8ff}.refresh-btn:disabled{background:#f5f5f5;border-color:#d9d9d9;color:#bfbfbf;cursor:not-allowed}.refresh-btn svg{transition:transform 0.3s ease}.refresh-btn svg.rotating{animation:rotate 1s linear infinite}@keyframes rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.export-actions{height:32px;display:flex;border-radius:6px;background-color:white;border:1px solid #1890ff;overflow:hidden;margin-right:16px;color:#1890ff;font-size:14px;font-weight:bold}.export-btn{width:128px;height:100%;display:flex;align-items:center;justify-content:center}.export-btn:hover{background-color:#f5f5f5;cursor:pointer}.export-divide{width:1px;height:100%;background-color:#1890ff}.section-header h4{margin:0;font-size:16px;color:#333}.count-badge{background:#1890ff;color:white;padding:2px 8px;border-radius:12px;font-size:12px;font-weight:500}.analyze-btn{padding:8px 16px;background:#52c41a;color:white;border:none;border-radius:4px;cursor:pointer;transition:background-color 0.2s;font-size:14px}.analyze-btn:hover{background:#73d13d}.analyze-btn:disabled{background:#d9d9d9;cursor:not-allowed}.resume-table-section{flex:1;display:flex;flex-direction:column;min-height:0}.table-container{flex:1;border:1px solid #e8e8e8;border-radius:8px;background:white;overflow-x:auto;min-height:400px}.resume-table{width:100%;border-collapse:collapse;font-size:14px}.resume-table th{background:#fafafa;padding:12px 16px;text-align:left;font-weight:500;color:#333;border-bottom:1px solid #e8e8e8}.resume-table td{padding:12px 16px;vertical-align:middle;height:60px}.resume-table tr{border-bottom:1px solid #f0f0f0;height:60px}.resume-table tr:hover{background:#f9f9f9}.filename-cell{max-width:200px;height:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filename-cell span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.talent-info-cell{max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.score-badge{display:inline-block;padding:4px 8px;border-radius:4px;font-weight:500;font-size:12px}.score-badge.excellent{background:#f6ffed;color:#52c41a;border:1px solid #b7eb8f}.score-badge.good{background:#e6f7ff;color:#1890ff;border:1px solid #91d5ff}.score-badge.average{background:#fff7e6;color:#fa8c16;border:1px solid #ffd591}.score-badge.below-average{background:#fff1f0;color:#f5222d;border:1px solid #ffa39e}.score-badge.poor{background:#f5f5f5;color:#8c8c8c;border:1px solid #d9d9d9}.status-badge{display:inline-block;padding:4px 8px;border-radius:4px;font-weight:500;font-size:12px}.status-badge.status-pending{background:#f0f0f0;color:#8c8c8c;border:1px solid #d9d9d9}.status-badge.status-analyzing{background:#e6f7ff;color:#1890ff;border:1px solid #91d5ff}.status-badge.status-completed{background:#f6ffed;color:#52c41a;border:1px solid #b7eb8f}.status-badge.status-failed{background:#fff1f0;color:#f5222d;border:1px solid #ffa39e}.detail-cell{max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.detail-content{cursor:pointer;transition:color 0.2s}.detail-content:hover{color:#40a9ff}.action-cell{display:flex;gap:8px;position:relative;align-items:center;justify-content:center;height:100%}.action-dropdown{position:relative;display:inline-block}.dropdown-trigger{display:flex;align-items:center;gap:4px;padding:6px 12px;background:#f0f0f0;border:1px solid #d9d9d9;border-radius:4px;cursor:pointer;font-size:12px;color:#595959;transition:all 0.2s;min-width:60px;justify-content:center}.dropdown-trigger:hover{background:#e6e6e6;border-color:#bfbfbf;color:#333}.dropdown-trigger svg{transition:transform 0.2s;margin-left:4px}.dropdown-menu{position:absolute;top:100%;right:0;z-index:9999;min-width:120px;background:white;border:1px solid #e8e8e8;border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;margin-top:4px}.dropdown-item{display:flex;align-items:center;gap:8px;padding:10px 12px;font-size:14px;color:#333;cursor:pointer;transition:background-color 0.2s;border-bottom:1px solid #f5f5f5;white-space:nowrap}.dropdown-item:last-child{border-bottom:none}.dropdown-item:hover{background:#f5f5f5}.dropdown-item.danger{color:#f5222d}.dropdown-item.danger:hover{background:#fff1f0;color:#cf1322}.dropdown-item svg{flex-shrink:0}.view-btn{background:#e6f7ff;color:#1890ff}.view-btn:hover{background:#bae7ff}.delete-btn{background:#fff1f0;color:#f5222d}.delete-btn:hover{background:#ffccc7}.empty-row{text-align:center;padding:40px 20px !important;border-bottom:none !important}.empty-state{display:flex;flex-direction:column;align-items:center;gap:8px;color:#999}.empty-state p{margin:0}.empty-hint{font-size:12px}@media screen and (max-width: 768px){.task-container{padding:16px;gap:16px}.resume-table{font-size:12px}.resume-table th,.resume-table td{padding:8px 12px}.filename-cell,.talent-info-cell,.detail-cell{max-width:120px}.action-cell{flex-direction:column;gap:4px;align-items:center;justify-content:center;min-width:80px;height:100%}.dropdown-trigger{min-width:50px;padding:4px 8px;font-size:11px}}.criteria-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.criteria-header label{margin:0;font-weight:500;color:#333}.criteria-actions{display:flex;align-items:center;gap:12px}.total-weight{font-size:14px;color:#52c41a;font-weight:500}.total-weight.invalid{color:#f5222d}.add-criteria-btn-wrapper{width:100%;display:flex;justify-content:end}.add-criteria-btn{padding:6px 12px;background:#1890ff;color:white;border:none;border-radius:4px;cursor:pointer;font-size:12px;transition:background-color 0.2s}.add-criteria-btn:hover{background:#40a9ff}.criteria-table-container{border:1px solid #e8e8e8;border-radius:6px;overflow:hidden;background:white;margin-bottom:12px}.criteria-table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px}.criteria-table th{background:#fafafa;padding:12px 16px;text-align:left;font-weight:500;color:#333;border-bottom:1px solid #e8e8e8;border-right:1px solid #e8e8e8;font-size:13px;vertical-align:middle}.criteria-table th:last-child{border-right:none}.criteria-table td{padding:12px 16px;border-bottom:1px solid #f0f0f0;border-right:1px solid #f0f0f0;vertical-align:middle}.criteria-table td:last-child{border-right:none}.criteria-table tr:last-child td{border-bottom:none}.criteria-name-input{width:100%;padding:8px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;outline:none;transition:border-color 0.2s;box-sizing:border-box}.criteria-name-input:focus{border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.criteria-value-input{width:100%;padding:8px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;outline:none;transition:border-color 0.2s;text-align:center;box-sizing:border-box}.criteria-value-input:focus{border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.criteria-description-input{width:100%;padding:8px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;outline:none;resize:vertical;min-height:80px;line-height:1.5;transition:border-color 0.2s;box-sizing:border-box}.criteria-description-input:focus{border-color:#40a9ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.remove-criteria-btn{width:28px;height:28px;background:#fff1f0;color:#f5222d;border:1px solid #ffa39e;border-radius:4px;cursor:pointer;font-size:16px;font-weight:bold;display:flex;align-items:center;justify-content:center;transition:all 0.2s;margin:0 auto}.remove-criteria-btn:hover:not(:disabled){background:#ffccc7;border-color:#ff7875}.remove-criteria-btn:disabled{background:#f5f5f5;color:#bfbfbf;border-color:#d9d9d9;cursor:not-allowed}.criteria-warning{color:#fa8c16;font-size:13px;margin:8px 0 0 0;padding:8px 12px;background:#fff7e6;border:1px solid #ffd591;border-radius:4px;display:flex;align-items:center;gap:6px}@media screen and (max-width: 768px){.criteria-header{flex-direction:column;align-items:flex-start;gap:8px}.criteria-actions{width:100%;justify-content:space-between}.criteria-table th,.criteria-table td{padding:10px 8px;font-size:12px;vertical-align:middle}.criteria-table th:nth-child(1){width:20%}.criteria-table th:nth-child(2){width:15%}.criteria-table th:nth-child(3){width:55%}.criteria-table th:nth-child(4){width:10%}.criteria-name-input,.criteria-value-input,.criteria-description-input{font-size:12px;padding:6px 8px}.criteria-description-input{min-height:60px}.remove-criteria-btn{width:24px;height:24px;font-size:14px}}.sortable-header{cursor:pointer !important;user-select:none;transition:background-color 0.2s}.sortable-header:hover{background:#f0f0f0 !important}.sortable-header.active{background:#e6f7ff !important;color:#1890ff}.header-content{display:flex;align-items:center;justify-content:space-between;width:100%}.sort-icons{display:flex;flex-direction:column;gap:1px;margin-left:8px;opacity:0.6}.sortable-header:hover .sort-icons{opacity:1}.sort-icon{transition:color 0.2s;color:#bfbfbf}.sort-icon.active{color:#1890ff}.pagination{display:flex;justify-content:center;align-items:center;gap:16px;padding:20px 0;margin-top:16px;border-top:1px solid #f0f0f0}.page-btn{padding:8px 16px;background:#fff;border:1px solid #d9d9d9;border-radius:6px;cursor:pointer;font-size:14px;color:#333;transition:all 0.2s;min-width:80px;display:flex;align-items:center;justify-content:center;height:36px}.page-btn:hover:not(:disabled){border-color:#40a9ff;color:#40a9ff;background:#f6f8ff}.page-btn:disabled{background:#f5f5f5;border-color:#d9d9d9;color:#bfbfbf;cursor:not-allowed}.page-info{font-size:14px;color:#666;padding:0 16px;display:flex;align-items:center;height:36px;white-space:nowrap}@media screen and (max-width: 768px){.pagination{gap:12px;padding:16px 0;flex-wrap:wrap}.page-btn{min-width:70px;padding:6px 12px;font-size:13px;height:32px}.page-info{font-size:13px;padding:0 8px;height:32px;order:3;width:100%;justify-content:center;margin-top:8px}}.step-indicator.clickable{cursor:pointer;transition:all 0.2s ease}.step-indicator.clickable:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.task-history-drawer-content{display:flex;flex-direction:column;height:100%}.task-list{flex:1;overflow-y:auto;padding:16px 0}.loading-tasks,.empty-tasks{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#666}.loading-spinner-small{width:24px;height:24px;border:2px solid #f0f0f0;border-top:2px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:12px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.task-item{display:flex;align-items:center;justify-content:space-between;padding:16px;margin-bottom:8px;border:1px solid #e8e8e8;border-radius:8px;cursor:pointer;transition:all 0.2s ease;background:#fff}.task-item:hover{border-color:#1890ff;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1)}.task-item.active{border-color:#1890ff;background:#f6ffed;box-shadow:0 2px 8px rgba(24, 144, 255, 0.15)}.task-info{flex:1;min-width:0}.task-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.task-id{font-weight:600;color:#333;font-size:14px}.task-time{font-size:12px;color:#666}.task-job-info{font-size:14px;color:#333;margin-bottom:8px;line-height:1.4;word-break:break-word}.task-meta{display:flex;align-items:center;gap:12px}.resume-count{font-size:12px;color:#666;background:#f5f5f5;padding:2px 6px;border-radius:4px}.current-task-indicator{flex-shrink:0;margin-left:12px;color:#52c41a}.current-task-indicator svg{width:16px;height:16px}@media screen and (max-width: 768px){.task-item{padding:12px}.task-header{flex-direction:column;align-items:flex-start;gap:4px}.task-job-info{font-size:13px;margin-bottom:6px}}.label-with-button{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.button-group{display:flex;gap:8px;align-items:center}.position-selector-button{padding:4px 12px;background:#1890ff;color:white;border:none;border-radius:4px;font-size:13px;cursor:pointer;transition:all 0.3s ease;white-space:nowrap;height:28px;line-height:20px}.position-selector-button:hover{background:#40a9ff}.position-selector-button:active{background:#096dd9}.position-selector-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:3000;padding:20px}.position-selector-modal{background:white;border-radius:8px;width:90%;max-width:900px;height:80vh;max-height:600px;display:flex;flex-direction:column;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);animation:modalFadeIn 0.3s ease}@keyframes modalFadeIn{from{opacity:0;transform:scale(0.95) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}.position-selector-modal-header{display:flex;justify-content:space-between;align-items:center;padding:16px 24px;border-bottom:1px solid #f0f0f0;flex-shrink:0}.position-selector-modal-header h3{margin:0;font-size:16px;font-weight:500;color:rgba(0, 0, 0, 0.85)}.position-selector-close-btn{background:none;border:none;font-size:24px;line-height:1;cursor:pointer;color:rgba(0, 0, 0, 0.45);padding:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all 0.3s}.position-selector-close-btn:hover{background-color:rgba(0, 0, 0, 0.06);color:rgba(0, 0, 0, 0.85)}.position-selector-modal-body{flex:1;overflow:hidden;display:flex;flex-direction:column}@media screen and (max-width: 768px){.position-selector-modal{width:100%;height:90vh;max-height:none;border-radius:8px 8px 0 0;margin-top:auto}.position-selector-modal-overlay{padding:0;align-items:flex-end}}.upload-disabled-wrapper{position:relative;cursor:not-allowed}.upload-disabled-wrapper::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;background-color:rgba(255, 255, 255, 0.7);z-index:0;cursor:not-allowed}.task-history-drawer-content{display:flex;flex-direction:column;height:100%}.task-list{flex:1;overflow-y:auto;padding:16px 0}.loading-tasks,.empty-tasks{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#666}.task-item{display:flex;align-items:center;justify-content:space-between;padding:16px;margin-bottom:8px;border:1px solid #e8e8e8;border-radius:8px;cursor:pointer;transition:all 0.2s ease;background:#fff}.task-item:hover{border-color:#1890ff;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1)}.task-item.active{border-color:#1890ff;background:#f6ffed;box-shadow:0 2px 8px rgba(24, 144, 255, 0.15)}.task-info{flex:1;min-width:0}.task-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.task-id{font-weight:600;color:#333;font-size:14px}.task-time{font-size:12px;color:#666}.current-task-indicator{flex-shrink:0;margin-left:12px;color:#52c41a}.current-task-indicator svg{width:16px;height:16px}@media screen and (max-width: 768px){.task-item{padding:12px}.task-header{flex-direction:column;align-items:flex-start;gap:4px}}";const st='.markdown-body{--base-size-4:4px;--base-size-8:8px;--base-size-16:16px;--base-size-24:24px;--base-size-40:40px;--base-text-weight-normal:400;--base-text-weight-medium:500;--base-text-weight-semibold:600;--fontStack-monospace:ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;--fgColor-accent:Highlight}@media (prefers-color-scheme: dark){.markdown-body,[data-theme="dark"]{color-scheme:dark;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}@media (prefers-color-scheme: light){.markdown-body,[data-theme="light"]{color-scheme:light;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:\' \';display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none !important}.markdown-body a{background-color:transparent;color:var(--fgColor-accent);text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body mark{background-color:var(--bgColor-attention-muted);color:var(--fgColor-default)}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-0.25em}.markdown-body sup{top:-0.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em var(--base-size-40)}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid var(--borderColor-muted);height:.25em;padding:0;margin:var(--base-size-24) 0;background-color:var(--borderColor-default);border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:var(--fgColor-muted);opacity:1}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:var(--base-size-4);font:11px var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);line-height:10px;color:var(--fgColor-default);vertical-align:middle;background-color:var(--bgColor-muted);border:solid 1px var(--borderColor-neutral-muted);border-bottom-color:var(--borderColor-neutral-muted);border-radius:6px;box-shadow:inset 0 -1px 0 var(--borderColor-neutral-muted)}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:var(--base-size-24);margin-bottom:var(--base-size-16);font-weight:var(--base-text-weight-semibold, 600);line-height:1.25}.markdown-body h2{font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.2em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body h3{font-weight:var(--base-text-weight-semibold, 600);font-size:1.05em}.markdown-body h4{font-weight:var(--base-text-weight-semibold, 600);font-size:0.875em}.markdown-body h5{font-weight:var(--base-text-weight-semibold, 600);font-size:.85em}.markdown-body h6{font-weight:var(--base-text-weight-semibold, 600);font-size:.80em;color:var(--fgColor-muted)}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:var(--fgColor-muted);border-left:.25em solid var(--borderColor-default)}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible !important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;appearance:none}.markdown-body .mr-2{margin-right:var(--base-size-8, 8px) !important}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0 !important}.markdown-body>*:last-child{margin-bottom:0 !important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:var(--fgColor-danger)}.markdown-body .anchor{float:left;padding-right:var(--base-size-4);margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:var(--base-size-16);font-size:16px;font-weight:400}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:var(--fgColor-default);vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:var(--base-size-16)}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:var(--base-size-16);font-size:1em;font-style:italic;font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dl dd{padding:0 var(--base-size-16);margin-bottom:var(--base-size-16)}.markdown-body table th{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid var(--borderColor-default)}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:var(--bgColor-default);border-top:1px solid var(--borderColor-muted)}.markdown-body table tr:nth-child(2n){background-color:var(--bgColor-muted)}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid var(--borderColor-default)}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:var(--fgColor-default)}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:var(--bgColor-neutral-muted);border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:var(--base-size-16)}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:var(--base-size-16);overflow:auto;font-size:85%;line-height:1.45;color:var(--fgColor-default);background-color:var(--bgColor-muted);border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px var(--base-size-8) 9px;text-align:right;background:var(--bgColor-default);border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:var(--base-text-weight-semibold, 600);background:var(--bgColor-muted);border-top:0}.markdown-body [data-footnote-ref]::before{content:"["}.markdown-body [data-footnote-ref]::after{content:"]"}.markdown-body .footnotes{font-size:12px;color:var(--fgColor-muted);border-top:1px solid var(--borderColor-default)}.markdown-body .footnotes ol{padding-left:var(--base-size-16)}.markdown-body .footnotes ol ul{display:inline-block;padding-left:var(--base-size-16);margin-top:var(--base-size-16)}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target::before{position:absolute;top:calc(var(--base-size-8)*-1);right:calc(var(--base-size-8)*-1);bottom:calc(var(--base-size-8)*-1);left:calc(var(--base-size-24)*-1);pointer-events:none;content:"";border:2px solid var(--borderColor-accent-emphasis);border-radius:6px}.markdown-body .footnotes li:target{color:var(--fgColor-default)}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body body:has(:modal){padding-right:var(--dialog-scrollgutter) !important}.markdown-body .pl-c{color:var(--color-prettylights-syntax-comment)}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:var(--color-prettylights-syntax-constant)}.markdown-body .pl-e,.markdown-body .pl-en{color:var(--color-prettylights-syntax-entity)}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:var(--color-prettylights-syntax-storage-modifier-import)}.markdown-body .pl-ent{color:var(--color-prettylights-syntax-entity-tag)}.markdown-body .pl-k{color:var(--color-prettylights-syntax-keyword)}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:var(--color-prettylights-syntax-string)}.markdown-body .pl-v,.markdown-body .pl-smw{color:var(--color-prettylights-syntax-variable)}.markdown-body .pl-bu{color:var(--color-prettylights-syntax-brackethighlighter-unmatched)}.markdown-body .pl-ii{color:var(--color-prettylights-syntax-invalid-illegal-text);background-color:var(--color-prettylights-syntax-invalid-illegal-bg)}.markdown-body .pl-c2{color:var(--color-prettylights-syntax-carriage-return-text);background-color:var(--color-prettylights-syntax-carriage-return-bg)}.markdown-body .pl-sr .pl-cce{font-weight:bold;color:var(--color-prettylights-syntax-string-regexp)}.markdown-body .pl-ml{color:var(--color-prettylights-syntax-markup-list)}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:bold;color:var(--color-prettylights-syntax-markup-heading)}.markdown-body .pl-mi{font-style:italic;color:var(--color-prettylights-syntax-markup-italic)}.markdown-body .pl-mb{font-weight:bold;color:var(--color-prettylights-syntax-markup-bold)}.markdown-body .pl-md{color:var(--color-prettylights-syntax-markup-deleted-text);background-color:var(--color-prettylights-syntax-markup-deleted-bg)}.markdown-body .pl-mi1{color:var(--color-prettylights-syntax-markup-inserted-text);background-color:var(--color-prettylights-syntax-markup-inserted-bg)}.markdown-body .pl-mc{color:var(--color-prettylights-syntax-markup-changed-text);background-color:var(--color-prettylights-syntax-markup-changed-bg)}.markdown-body .pl-mi2{color:var(--color-prettylights-syntax-markup-ignored-text);background-color:var(--color-prettylights-syntax-markup-ignored-bg)}.markdown-body .pl-mdr{font-weight:bold;color:var(--color-prettylights-syntax-meta-diff-range)}.markdown-body .pl-ba{color:var(--color-prettylights-syntax-brackethighlighter-angle)}.markdown-body .pl-sg{color:var(--color-prettylights-syntax-sublimelinter-gutter-mark)}.markdown-body .pl-corl{text-decoration:underline;color:var(--color-prettylights-syntax-constant-other-reference-link)}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),.markdown-body button:focus:not(:focus-visible),.markdown-body summary:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible){outline:none;box-shadow:none}.markdown-body [tabindex="0"]:focus:not(:focus-visible),.markdown-body details-dialog:focus:not(:focus-visible){outline:none}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1em;font-style:normal !important;font-weight:var(--base-text-weight-normal, 400);line-height:1;vertical-align:-0.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:var(--base-text-weight-normal, 400)}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:var(--base-size-4)}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:var(--base-size-8) var(--base-size-16);margin-bottom:var(--base-size-16);color:inherit;border-left:.25em solid var(--borderColor-default)}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:var(--base-text-weight-medium, 500);align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:var(--borderColor-accent-emphasis)}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--fgColor-accent)}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:var(--borderColor-done-emphasis)}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--fgColor-done)}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:var(--borderColor-attention-emphasis)}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--fgColor-attention)}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:var(--borderColor-success-emphasis)}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--fgColor-success)}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:var(--borderColor-danger-emphasis)}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--fgColor-danger)}.markdown-body>*:first-child>.heading-element:first-child{margin-top:0 !important}.markdown-body .highlight pre:has(+.zeroclipboard-container){min-height:52px}.markdown-body .md-table-wrap table{margin-top:0;margin-bottom:0}.markdown-body .md-table-wrap{margin-top:0;margin-bottom:var(--base-size-16)}.markdown-body>.md-table-wrap:first-child{margin-top:0}.markdown-body>.md-table-wrap:last-child{margin-bottom:0}@media (max-width: 767px){.markdown-body .md-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.markdown-body .md-table-wrap table{min-width:max-content}}';const lt=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const dt=class{modalTitle="简历筛选精灵";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;fullscreen=false;customInputs={};showInputHistory=false;showWorkspaceHistory=false;showBatchExport=false;taskId;oemId;uploadSuccess;tokenInvalid;someErrorEvent;taskCreated;resumeAnalysisStart;resumeAnalysisComplete;taskSwitch;resumeDeleted;conversationStart;currentStep="input";jobDescription="";jobTitle="";evaluationCriteria=[{name:"基础信息",value:10,description:"评估简历中姓名、联系方式、性别、年龄等基础信息是否完整且准确。完整准确的基础信息有助于招聘方快速识别和联系求职者,是简历的基本要素。若基础信息缺失或有误,可能影响后续沟通与评估流程。"},{name:"教育背景",value:20,description:"主要考察毕业院校、专业、入学及毕业时间、学历层次等内容。毕业院校的知名度与专业的匹配度,一定程度上反映求职者在知识储备基础和专业素养。学历层次及相关课程成绩,能辅助判断求职者在专业领域的学习深度与能力水平。"},{name:"职业履历",value:30,description:"重点评估过往工作经历的连贯性、职位晋升轨迹、工作内容与目标岗位的相关性。丰富且相关的职业履历,展现出求职者在实际工作场景中的实践经验与解决问题能力,连贯的工作经历能体现其稳定性与忠诚度。"},{name:"专业技能",value:20,description:"评估求职者所掌握的专业技能,包括软件操作能力、语言能力、专业资质证书等。这些技能直接反映求职者在特定领域的专业程度,是能否胜任目标岗位的关键因素之一,与目标岗位匹配的专业技能越多、水平越高,竞争力越强。"},{name:"项目成果",value:15,description:"考量求职者参与项目的数量、在项目中承担的角色及取得的成果。通过项目成果可了解其在团队协作、项目管理、创新思维等方面的能力,突出的项目成果能直观展示求职者在实际工作中的价值创造能力。"},{name:"求职动机",value:5,description:"判断求职者对目标岗位的兴趣和热情,以及其职业规划与公司及岗位的契合度。清晰合理的求职动机表明求职者对自身职业发展有明确认知,且对目标岗位做了充分了解,入职后更有可能长期稳定发展并积极投入工作。"}];isSubmitting=false;isUploading=false;uploadedResumeRecords=[];filteredResumeRecords=[];selectedFiles=[];showJdDrawer=false;showCriteriaDrawer=false;currentTask=null;currentPage=1;pageSize=10;totalRecords=0;isAnalyzing=false;currentNodeTitle="";hasProgressAnswer=false;handleAnalysisProgressReset(){this.currentNodeTitle="";this.hasProgressAnswer=false}handleNodeProgress(e){if(e.event==="error"||e.event==="message_end"){this.currentNodeTitle="";this.hasProgressAnswer=true;return}if((e.event==="message"||e.event==="agent_message")&&e.answer){this.hasProgressAnswer=true;this.currentNodeTitle=""}if(!this.hasProgressAnswer&&(e.event==="node_started"||e.event==="node_finished")){const t=e.data?.title;if(typeof t==="string"&&t.startsWith("progress:")){this.currentNodeTitle=t.slice("progress:".length).trim()}}}showPreviewDrawer=false;previewContent="";previewTitle="";previewType="markdown";previewUrl="";activeDropdownId=null;deletingRecordId=null;sortOrder="none";isTaskHistoryDrawerOpen=false;historyTasks=[];isLoadingHistoryTasks=false;taskHistoryCurrentPage=1;taskHistoryPageSize=10;taskHistoryTotal=0;taskHistoryDrawerSource="input";isLoadingResumeList=false;isExportRecordsModalOpen=false;_uploadEnabled=true;showPositionSelector=false;get hostElement(){return o(this)}tokenInvalidListener;removeErrorListener;botId="3022316191018874";pcmUploadRef;internalConversationId=null;get resumeRecords(){return[...this.uploadedResumeRecords,...this.filteredResumeRecords]}constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.taskCreated=t(this,"taskCreated");this.resumeAnalysisStart=t(this,"resumeAnalysisStart");this.resumeAnalysisComplete=t(this,"resumeAnalysisComplete");this.taskSwitch=t(this,"taskSwitch");this.resumeDeleted=t(this,"resumeDeleted");this.conversationStart=t(this,"conversationStart");document.addEventListener("click",this.handleDocumentClick)}handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async setUploadEnabled(e){this._uploadEnabled=e}async handleIsOpenChange(e){if(!e){this.resetStates()}else{await f(this.token);if(this.taskId){await this.handleSwitchTask(this.taskId)}}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}document.removeEventListener("click",this.handleDocumentClick)}resetStates=()=>{this.currentStep="input";this.jobDescription="";this.evaluationCriteria=[{name:"基础信息",value:10,description:"评估简历中姓名、联系方式、性别、年龄等基础信息是否完整且准确。完整准确的基础信息有助于招聘方快速识别和联系求职者,是简历的基本要素。若基础信息缺失或有误,可能影响后续沟通与评估流程。"},{name:"教育背景",value:20,description:"主要考察毕业院校、专业、入学及毕业时间、学历层次等内容。毕业院校的知名度与专业的匹配度,一定程度上反映求职者在知识储备基础和专业素养。学历层次及相关课程成绩,能辅助判断求职者在专业领域的学习深度与能力水平。"},{name:"职业履历",value:30,description:"重点评估过往工作经历的连贯性、职位晋升轨迹、工作内容与目标岗位的相关性。丰富且相关的职业履历,展现出求职者在实际工作场景中的实践经验与解决问题能力,连贯的工作经历能体现其稳定性与忠诚度。"},{name:"专业技能",value:20,description:"评估求职者所掌握的专业技能,包括软件操作能力、语言能力、专业资质证书等。这些技能直接反映求职者在特定领域的专业程度,是能否胜任目标岗位的关键因素之一,与目标岗位匹配的专业技能越多、水平越高,竞争力越强。"},{name:"项目成果",value:15,description:"考量求职者参与项目的数量、在项目中承担的角色及取得的成果。通过项目成果可了解其在团队协作、项目管理、创新思维等方面的能力,突出的项目成果能直观展示求职者在实际工作中的价值创造能力。"},{name:"求职动机",value:5,description:"判断求职者对目标岗位的兴趣和热情,以及其职业规划与公司及岗位的契合度。清晰合理的求职动机表明求职者对自身职业发展有明确认知,且对目标岗位做了充分了解,入职后更有可能长期稳定发展并积极投入工作。"}];this.isSubmitting=false;this.isUploading=false;this.uploadedResumeRecords=[];this.filteredResumeRecords=[];this.selectedFiles=[];this.showJdDrawer=false;this.showCriteriaDrawer=false;this.currentTask=null;this.currentPage=1;this.pageSize=10;this.totalRecords=0;this.isAnalyzing=false;this.showPreviewDrawer=false;this.previewContent="";this.previewTitle="";this.previewType="markdown";this.previewUrl="";this.activeDropdownId=null;this.deletingRecordId=null;this.sortOrder="none";this.isTaskHistoryDrawerOpen=false;this.historyTasks=[];this.isLoadingHistoryTasks=false;this.taskHistoryCurrentPage=1;this.taskHistoryPageSize=10;this.taskHistoryTotal=0;this.taskHistoryDrawerSource="input";this.isLoadingResumeList=false;this.isExportRecordsModalOpen=false;this.internalConversationId=null};handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleCreateTask=async()=>{const e=this.customInputs?.job_info||this.jobDescription.trim();if(!e){_("请输入职位描述","warning");return}if(this.evaluationCriteria.length===0){_("请输入评分标准","warning");return}this.isSubmitting=true;try{const t=await a({url:"/sdk/v1/agent/app_filter_task/create",method:"POST",data:{job_info:e,extra:JSON.stringify(this.evaluationCriteria)}});if(t.success&&t.data){this.currentTask=t.data;this.jobDescription=e;this.currentStep="task";this.taskCreated.emit({task_id:t.data.id,job_description:e,evaluation_criteria:this.evaluationCriteria,create_time:(new Date).toISOString()});if(this.customInputs?.file_urls){await this.startAnalysisWithCustomFileUrls()}}else{throw new Error(t.message||"创建任务失败")}}catch(e){console.error("创建任务时出错:",e);I.captureError(e,{action:"handleCreateTask",component:"oem-jlsx-modal",title:"创建任务时出错"});this.someErrorEvent.emit({error:e,message:"创建任务时出错,请重试"})}finally{this.isSubmitting=false}};toggleJdDetail=()=>{this.showJdDrawer=true};toggleCriteriaDetail=()=>{this.showCriteriaDrawer=true};closeJdDrawer=()=>{this.showJdDrawer=false};closeCriteriaDrawer=()=>{this.showCriteriaDrawer=false};showPreview=(e,t,o="markdown",i)=>{this.previewTitle=e;this.previewContent=t||"";this.previewType=o;this.previewUrl=i||"";this.showPreviewDrawer=true;this.activeDropdownId=null};closePreviewDrawer=()=>{this.showPreviewDrawer=false;this.previewContent="";this.previewTitle="";this.previewType="markdown";this.previewUrl=""};toggleDropdown=e=>{const t=this.activeDropdownId===e?null:e;this.activeDropdownId=t};handleViewEvaluate=e=>{const t=`${c}/exportFile?id=${e.id}&title=${this.jobTitle||""}&token=${h.getToken()}&referrer=sdk`;this.showPreview(`${e.fileName} - 评估详情`,"","file",t)};exportAllPdfLoading=false;exportAllPDF=async()=>{this.exportAllPdfLoading=true;const e=await a({url:`/sdk/v1/agent/app_filter_task/export_all`,method:"GET",params:{task_id:this.currentTask?.id}});this.exportAllPdfLoading=false;if(e.success){_("导出任务已创建!","success");this.handleExportRecordsClick()}};handleViewResume=async e=>{if(e.file_url||e.resume_file_url){const t=e.file_url||e.resume_file_url;try{const o=await l(t);if(o){this.showPreview(`${e.fileName} - 简历详情`,"","file",o)}else{_("无法获取简历预览,请稍后重试","error")}}catch(e){console.error("获取简历预览失败:",e);I.captureError(e,{action:"handleViewResume",component:"oem-jlsx-modal",title:"获取简历预览失败"});this.someErrorEvent.emit({error:e,message:"获取简历预览失败,请稍后重试"})}}else{_("简历文件不存在","error")}};handleDeleteRecord=async e=>{this.activeDropdownId=null;const t=this.filteredResumeRecords.find((t=>t.id===e));if(t){this.deletingRecordId=e;try{const o=await a({url:`/sdk/v1/agent/app_filter_resume/delete/${e}`,method:"DELETE"});if(o.success){this.filteredResumeRecords=this.filteredResumeRecords.filter((t=>t.id!==e));_("删除成功","success");this.resumeDeleted.emit({task_id:this.currentTask.id,resume_id:e,resume_name:t.fileName,delete_time:(new Date).toISOString()});await this.loadResumeList()}else{throw new Error(o.message||"删除失败")}}catch(t){console.error("删除记录失败:",t);I.captureError(t,{action:"handleDeleteRecord",component:"oem-jlsx-modal",title:"删除记录失败",recordId:e});_("删除失败,请重试","error")}finally{this.deletingRecordId=null}}else{this.uploadedResumeRecords=this.uploadedResumeRecords.filter((t=>t.id!==e));_("删除成功","success")}};handleEvaluationCriteriaNameChange=(e,t)=>{const o=[...this.evaluationCriteria];o[e].name=t;this.evaluationCriteria=o};handleEvaluationCriteriaValueChange=(e,t)=>{const o=[...this.evaluationCriteria];const i=parseInt(t)||0;o[e].value=Math.max(0,Math.min(100,i));this.evaluationCriteria=o};handleEvaluationCriteriaDescriptionChange=(e,t)=>{const o=[...this.evaluationCriteria];o[e].description=t;this.evaluationCriteria=o};addEvaluationCriteria=()=>{const e=[...this.evaluationCriteria];e.push({name:"",value:0,description:""});this.evaluationCriteria=e};removeEvaluationCriteria=e=>{if(this.evaluationCriteria.length<=1){_("至少需要保留一个评分标准","warning");return}const t=this.evaluationCriteria.filter(((t,o)=>o!==e));this.evaluationCriteria=t};getTotalWeight=()=>this.evaluationCriteria.reduce(((e,t)=>e+t.value),0);getHistoryEntryLabel=()=>this.currentStep==="input"?"历史任务":"任务管理";getHistoryEntryTitle=()=>this.currentStep==="input"?"点击查看历史任务":"点击查看任务管理";shouldShowHistoryEntry=()=>this.currentStep==="input"?this.showInputHistory:this.showWorkspaceHistory;getTaskHistoryDrawerTitle=()=>this.taskHistoryDrawerSource==="input"?"历史任务":"任务管理";renderInputStep(){const e=Boolean(this.customInputs&&this.customInputs.job_info);return i("div",{class:"input-container"},i("div",{class:"step-header"},i("h3",null,"创建简历筛选任务"),i("p",{class:"step-description"},"请输入职位描述和评分标准")),i("div",{class:"jd-input-section"},i("div",{class:"label-with-button"},i("label",{htmlFor:"job-description"},"职位描述 (JD)"),!e&&i("div",{class:"button-group"},this.oemId&&i("button",{class:"position-selector-button",onClick:this.handleOpenPositionSelector,type:"button"},"选择职位"),i("components-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}))),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.customInputs?.job_info||this.jobDescription,onInput:this.handleJobDescriptionChange,disabled:e})),i("div",{class:"criteria-input-section"},i("div",{class:"criteria-header"},i("label",{htmlFor:"evaluation-criteria"},"评分标准"),i("div",{class:"criteria-actions"},i("span",{class:`total-weight ${this.getTotalWeight()!==100?"invalid":""}`},"总权重: ",this.getTotalWeight(),"%"),i("span",null))),i("div",{class:"criteria-table-container"},i("table",{class:"criteria-table"},i("thead",null,i("tr",null,i("th",{style:{width:"25%"}},"标准名称"),i("th",{style:{width:"15%"}},"权重(%)"),i("th",{style:{width:"50%"}},"描述"),i("th",{style:{width:"10%"}},"操作"))),i("tbody",null,this.evaluationCriteria.map(((e,t)=>i("tr",{key:t},i("td",null,i("input",{type:"text",class:"criteria-name-input",placeholder:"请输入标准名称",value:e.name,onInput:e=>this.handleEvaluationCriteriaNameChange(t,e.target.value)})),i("td",null,i("input",{type:"number",class:"criteria-value-input",placeholder:"0",min:"0",max:"100",value:e.value,onInput:e=>this.handleEvaluationCriteriaValueChange(t,e.target.value)})),i("td",null,i("textarea",{class:"criteria-description-input",placeholder:"请输入评分标准描述",rows:2,value:e.description,onInput:e=>this.handleEvaluationCriteriaDescriptionChange(t,e.target.value)})),i("td",null,i("button",{type:"button",class:"remove-criteria-btn",disabled:this.evaluationCriteria.length<=1,onClick:()=>this.removeEvaluationCriteria(t),title:this.evaluationCriteria.length<=1?"至少需要保留一个评分标准":"删除此标准"},"×")))))))),i("div",{class:"add-criteria-btn-wrapper"},i("button",{type:"button",class:"add-criteria-btn",onClick:this.addEvaluationCriteria},"+ 添加标准")),this.getTotalWeight()!==100&&i("p",{class:"criteria-warning"},"⚠️ 权重总和应为100%,当前为",this.getTotalWeight(),"%")),i("button",{class:"submit-button",disabled:!(this.customInputs?.job_info||this.jobDescription.trim())||this.evaluationCriteria.length===0||this.getTotalWeight()!==100||this.isSubmitting,onClick:this.handleCreateTask},this.isSubmitting?"创建中...":"创建任务"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("span",null,"Hunan-PinCaiMao-202412310003"))))}renderTaskStep(){return i("div",{class:"task-container"},i("div",{class:"task-info-section"},i("div",{class:"info-cards"},i("div",{class:"info-card"},i("div",{class:"card-header",onClick:this.toggleJdDetail},i("span",{class:"card-title"},"职位描述"),i("button",{class:"toggle-btn"},"查看")),i("div",{class:"card-preview"},i("p",{class:"preview-text"},this.jobDescription))),i("div",{class:"info-card"},i("div",{class:"card-header",onClick:this.toggleCriteriaDetail},i("span",{class:"card-title"},"评分标准"),i("button",{class:"toggle-btn"},"查看")),i("div",{class:"card-preview"},i("p",{class:"preview-text"},this.getEvaluationCriteriaText()))))),i("div",{class:"upload-section"},i("div",{class:"section-header"},i("h4",null,"上传简历")),i("div",{class:this.customInputs?.file_urls?"upload-disabled-wrapper":"",onClick:e=>{if(this.customInputs?.file_urls){e.stopPropagation();e.preventDefault();_("不允许上传简历,请联系管理员","warning")}}},i("components-mobile-upload-btn",{multiple:true,maxFileSize:15*1024*1024,uploadAreaMode:true,disabled:!!this.customInputs?.file_urls,acceptFileSuffixList:[".pdf",".doc",".docx",".txt",".md",".ppt",".pptx",".jpg",".jpeg",".png"],uploadParams:{tags:["resume"]},onOk:this.handleUploadChange})),i("div",{class:"upload-actions"},this.uploadedResumeRecords.some((e=>e.evaluate_status!==1&&e.evaluate_status!==0))&&i("button",{class:"analyze-btn",onClick:this.handleStartAnalysis},`开始分析 (${this.uploadedResumeRecords.filter((e=>e.evaluate_status!==1&&e.evaluate_status!==0)).length} 个待分析)`))),i("div",{class:"resume-table-section"},i("div",{class:"section-header"},i("h4",null,"简历列表"),i("div",{class:"section-header-side"},this.showBatchExport&&!!this.resumeRecords?.find((e=>e.evaluate_status==1))&&i("div",{class:"export-actions"},i("div",{class:"export-btn",onClick:this.exportAllPDF},i("span",null,"批量导出报告")),i("div",{class:"export-divide"}),i("div",{class:"export-btn",onClick:this.handleExportRecordsClick},"导出记录")),i("button",{class:"refresh-btn",onClick:this.handleRefreshTable,disabled:this.isLoadingResumeList,title:"刷新表格"},i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",class:this.isLoadingResumeList?"rotating":""},i("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}))),i("span",{class:"record-count"},"已筛选 ",this.totalRecords," 条记录"))),i("div",{class:"resume-analysis-region","aria-busy":this.isAnalyzing?"true":"false"},i("div",{class:"table-container",ref:e=>{e?.toggleAttribute("inert",this.isAnalyzing)}},i("table",{class:"resume-table"},i("thead",null,i("tr",null,i("th",null,"简历文件名"),i("th",null,"人才信息"),i("th",{class:`sortable-header ${this.sortOrder!=="none"?"active":""}`,onClick:this.handleSortByScore},i("span",{class:"header-content"},"评估分数",i("span",{class:"sort-icons"},i("svg",{class:`sort-icon ${this.sortOrder==="asc"?"active":""}`,width:"12",height:"12",viewBox:"0 0 12 12"},i("path",{d:"M6 3l4 4H2z",fill:"currentColor"})),i("svg",{class:`sort-icon ${this.sortOrder==="desc"?"active":""}`,width:"12",height:"12",viewBox:"0 0 12 12"},i("path",{d:"M6 9L2 5h8z",fill:"currentColor"}))))),i("th",null,"评估详情"),i("th",null,"状态"),i("th",null,"操作"))),i("tbody",null,this.isLoadingResumeList?i("tr",null,i("td",{colSpan:6,class:"empty-row"},i("div",{class:"empty-state"},i("div",{class:"loading-spinner-small"}),i("p",null,"正在加载简历数据...")))):this.resumeRecords.length===0?i("tr",null,i("td",{colSpan:6,class:"empty-row"},i("div",{class:"empty-state"},i("p",null,"暂无简历数据"),i("p",{class:"empty-hint"},"请上传简历开始筛选")))):this.resumeRecords.map((e=>i("tr",{key:e.id},i("td",{class:"filename-cell"},i("span",{class:"file-icon"},"📝"),i("span",{title:e.fileName},e.fileName)),i("td",{class:"talent-info-cell",title:e.talentInfo},e.talentInfo),i("td",{class:"score-cell"},i("span",{class:`score-badge ${this.getScoreClass(e.score)}`},typeof e.score==="number"?e.score:"--")),i("td",{class:"detail-cell",title:e.scoreDetail},i("span",{class:"detail-content",onClick:()=>this.handleViewEvaluate(e)},e.scoreDetail)),i("td",{class:"status-cell"},i("span",{class:`status-badge status-${this.getEvaluateStatusClass(e.evaluate_status)}`},this.getEvaluateStatusText(e.evaluate_status))),i("td",{class:"action-cell"},i("div",{class:"action-dropdown"},i("button",{class:"action-btn dropdown-trigger",onClick:t=>{t.stopPropagation();this.toggleDropdown(e.id)}},"操作",i("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor"},i("path",{d:"M7 10l5 5 5-5z"}))),this.activeDropdownId===e.id&&i("div",{class:"dropdown-menu"},i("div",{class:"dropdown-item",onClick:t=>{t.stopPropagation();this.handleViewEvaluate(e)}},i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},i("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2a1 1 0 0 0-2 0v2H8V2a1 1 0 0 0-2 0v2H5a3 3 0 0 0-3 3v11a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3zM4 18V9h16v9a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1z"})),"评估详情"),i("div",{class:"dropdown-item",onClick:t=>{t.stopPropagation();this.handleViewResume(e)}},i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},i("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"})),"简历详情"),i("div",{class:`dropdown-item danger ${this.deletingRecordId===e.id?"disabled":""}`,onClick:t=>{t.stopPropagation();if(this.deletingRecordId!==e.id){this.handleDeleteRecord(e.id)}}},this.deletingRecordId===e.id?i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",class:"loading-spinner"},i("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16z",opacity:"0.25"}),i("path",{d:"M12 2C17.523 2 22 6.477 22 12h-2a8 8 0 0 0-8-8V2z"})):i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},i("path",{d:"M19 7l-.867 12.142A2 2 0 0 1 16.138 21H7.862a2 2 0 0 1-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v3M4 7h16"})),this.deletingRecordId===e.id?"删除中...":"删除")))))))))),this.isAnalyzing&&i("div",{class:"resume-analysis-overlay",role:"status","aria-live":"polite","aria-atomic":"true"},i("div",{class:"loading-spinner-small","aria-hidden":"true"}),i("p",null,this.currentNodeTitle||"正在筛选简历,请稍候..."))),this.totalRecords>this.pageSize&&i("div",{class:"pagination"},i("button",{class:"page-btn",disabled:this.isAnalyzing||this.currentPage===1,onClick:()=>this.changePage(this.currentPage-1)},"上一页"),i("span",{class:"page-info"},"第 ",this.currentPage," 页,共 ",Math.ceil(this.totalRecords/this.pageSize)," 页"),i("button",{class:"page-btn",disabled:this.isAnalyzing||this.currentPage>=Math.ceil(this.totalRecords/this.pageSize),onClick:()=>this.changePage(this.currentPage+1)},"下一页")),i("div",{style:{height:"100px",width:"100%"}})))}getScoreClass(e){if(e>=90)return"excellent";if(e>=80)return"good";if(e>=70)return"average";if(e>=60)return"below-average";return"poor"}getEvaluationCriteriaText(){return this.evaluationCriteria.map((e=>`${e.name}(${e.value}%):${e.description}`)).join("\n\n")}getEvaluateStatusText(e){const t={0:"筛选中",1:"筛选完成",[-1]:"筛选失败"};return t[e]||"待分析"}getEvaluateStatusClass(e){const t={0:"analyzing",1:"completed",[-1]:"failed"};return t[e]||"pending"}changePage=async e=>{this.currentPage=e;await this.loadResumeList()};handleSortByScore=()=>{if(this.sortOrder==="none"){this.sortOrder="desc"}else if(this.sortOrder==="desc"){this.sortOrder="asc"}else{this.sortOrder="none"}this.currentPage=1;this.loadResumeList()};handleRefreshTable=async()=>{await this.loadResumeList();_("刷新成功","success")};async loadResumeList(){if(!this.currentTask)return;this.isLoadingResumeList=true;this.filteredResumeRecords=[];this.uploadedResumeRecords=this.uploadedResumeRecords.filter((e=>e.evaluate_status===undefined));try{const e={task_id:this.currentTask.id,page:this.currentPage,size:this.pageSize};if(this.sortOrder==="desc"){e.order_by="score_desc"}else if(this.sortOrder==="asc"){e.order_by="score_asc"}const t=await a({url:"/sdk/v1/agent/app_filter_resume/page",method:"GET",data:e});if(t.success&&t.data){const e=t.data.records.map((e=>{let t="等待分析...";if(e.resume_data){try{const o=JSON.parse(e.resume_data);const i=o.result;if(i){const e=i.phone||i.email||"未知";const o=i.degree||"未知";const n=i.college||"未知";const r=i.work_year||"0";const a=i.work_position||"未知职位";t=`${e} | ${o} | ${n} | ${r}年经验 | ${a}`}}catch(e){console.warn("解析简历数据失败:",e)}}return{...e,id:e.id?.toString()||"",fileName:e.resume_file_name||"未知文件",talentInfo:t,scoreDetail:e.evaluate||"等待分析...",uploadTime:e.create_at?new Date(e.create_at):new Date,file_url:e.resume_file_url}}));this.filteredResumeRecords=e;this.totalRecords=t.data.total||0}}catch(e){console.error("加载简历列表失败:",e)}finally{this.isLoadingResumeList=false}}async startAnalysisWithCustomFileUrls(){if(!this.currentTask){_("任务信息不存在","error");return}const e=this.customInputs?.file_urls;if(!e){return}const t=e.split(",").map((e=>e.trim())).filter((e=>e));if(t.length===0){_("没有有效的简历文件URL","warning");return}this.isAnalyzing=true;this.isLoadingResumeList=true;try{const e=[];for(const o of t){if(o.startsWith("http://")||o.startsWith("https://")){try{const t=o.split("/").pop()||"resume.pdf";const i=await y({url:o,file_name:t});if(i.success&&i.data?.cos_key){e.push(i.data.cos_key)}else{console.error(`上传文件失败: ${o}`,i.message);_(`上传文件 ${t} 失败: ${i.message||"未知错误"}`,"error")}}catch(e){console.error(`上传文件出错: ${o}`,e);_(`上传文件出错: ${e instanceof Error?e.message:"未知错误"}`,"error")}}else{e.push(o)}}if(e.length===0){_("没有有效的简历文件可以分析","error");return}if(e.length<t.length){_(`部分文件上传失败,将继续分析 ${e.length}/${t.length} 个文件`,"warning")}const o=await a({url:"/sdk/v1/agent/app_filter_resume/clear_repeated_resumes",method:"POST",data:{task_id:this.currentTask.id,resume_file_urls:e}});if(!o.success){throw new Error(o.message||"简历校验失败")}const i=o.data||[];if(i.length===0){_("已清除重复上传的简历,没有新的简历需要分析","info");return}const n=this.evaluationCriteria.map((e=>`- ${e.name}(占比${e.value}%):${e.description}`)).join(" \n");this.resumeAnalysisStart.emit({task_id:this.currentTask.id,resume_count:i.length,resume_files:i.map((e=>({file_name:e.split("/").pop()||"未知文件",file_url:e})))});await u({url:"/sdk/v1/chat/chat-messages",method:"POST",data:{bot_id:"3022316191018874",response_mode:"blocking",query:"简历筛选",inputs:{job_info:this.jobDescription,jd_id:this.currentTask.jd_id,task_id:this.currentTask.id,file_urls:i.join(","),rule:n}},onMessage:e=>{this.handleNodeProgress(e);if(e.event==="error"){const t=e.data?.message||e.message||"分析失败";this.someErrorEvent.emit({error:e.data,message:t});this.internalConversationId=null;return}if(e&&!this.internalConversationId&&(e.message_id||e.conversation_id||e.id)){this.internalConversationId=e.conversation_id;this.conversationStart.emit({conversation_id:e.conversation_id,event:e.event||"message",message_id:e.message_id,id:String(this.currentTask.id)})}},onComplete:async()=>{this.currentNodeTitle="";await this.loadResumeList();this.emitAnalysisCompleteEvent();this.internalConversationId=null},onError:e=>{this.currentNodeTitle="";console.error("简历分析失败:",e);I.captureError(e,{action:"startAnalysisWithCustomFileUrls",component:"oem-jlsx-modal",title:"简历分析失败"});this.someErrorEvent.emit({error:e,message:"简历分析失败,请重试"});this.internalConversationId=null}})}catch(e){console.error("开始分析失败:",e);I.captureError(e,{action:"startAnalysisWithCustomFileUrls",component:"oem-jlsx-modal",title:"开始分析失败"});this.someErrorEvent.emit({error:e,message:"开始分析失败,请重试"})}finally{this.isAnalyzing=false;this.isLoadingResumeList=false}}startAnalysis=async()=>{if(!this.currentTask){_("任务信息不存在","error");return}const e=this.uploadedResumeRecords.filter((e=>e.evaluate_status!==1&&e.evaluate_status!==0));if(e.length===0){_("没有需要分析的简历","warning");return}this.isAnalyzing=true;try{e.forEach((e=>{e.evaluate_status=0}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];const t=e.map((e=>e.file_url||e.fileInfo?.cos_key)).filter((e=>e));if(t.length===0){_("简历文件URL获取失败","error");return}const o=await a({url:"/sdk/v1/agent/app_filter_resume/clear_repeated_resumes",method:"POST",data:{task_id:this.currentTask.id,resume_file_urls:t}});if(!o.success){throw new Error(o.message||"简历校验失败")}const i=o.data||[];if(i.length===0){_("已清除重复上传的简历,没有新的简历需要分析","info");this.uploadedResumeRecords=[];return}else{this.uploadedResumeRecords=this.uploadedResumeRecords.filter((e=>{const t=e.file_url||e.fileInfo?.cos_key;return i.includes(t)||e.evaluate_status===0}))}const n=this.evaluationCriteria.map((e=>`- ${e.name}(占比${e.value}%):${e.description}`)).join(" \n");this.resumeAnalysisStart.emit({task_id:this.currentTask.id,resume_count:i.length,resume_files:e.map((e=>({file_name:e.fileName,file_url:e.file_url||e.fileInfo?.cos_key||""}))).filter((e=>i.includes(e.file_url)))});if(this.pcmUploadRef?.clearSelectedFiles){this.pcmUploadRef.clearSelectedFiles()}await u({url:"/sdk/v1/chat/chat-messages",method:"POST",data:{bot_id:"3022316191018874",response_mode:"blocking",query:"简历筛选",inputs:{job_info:this.jobDescription,jd_id:this.currentTask.jd_id,task_id:this.currentTask.id,file_urls:i.join(","),rule:n}},onMessage:t=>{this.handleNodeProgress(t);if(t.event==="error"){const o=t.data?.message||t.message||"分析失败";e.forEach((e=>{e.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];this.someErrorEvent.emit({error:t.data,message:o});this.internalConversationId=null;return}if(t&&!this.internalConversationId&&(t.message_id||t.conversation_id||t.id)){this.internalConversationId=t.conversation_id;this.conversationStart.emit({conversation_id:t.conversation_id,event:t.event||"message",message_id:t.message_id,id:String(this.currentTask.id)})}},onComplete:async()=>{this.currentNodeTitle="";this.uploadedResumeRecords=this.uploadedResumeRecords.filter((e=>e.evaluate_status!==0));await this.loadResumeList();this.emitAnalysisCompleteEvent();this.internalConversationId=null},onError:t=>{this.currentNodeTitle="";console.error("简历分析失败:",t);e.forEach((e=>{e.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];I.captureError(t,{action:"startAnalysis",component:"oem-jlsx-modal",title:"开始分析失败"});this.someErrorEvent.emit({error:t,message:"开始分析失败,请重试"});this.internalConversationId=null}})}catch(t){console.error("开始分析失败:",t);e.forEach((e=>{e.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];I.captureError(t,{action:"startAnalysis",component:"oem-jlsx-modal",title:"开始分析失败"});this.someErrorEvent.emit({error:t,message:"开始分析失败,请重试"})}finally{this.isAnalyzing=false}};handleTaskHistoryClick=e=>{this.taskHistoryDrawerSource=e;this.isTaskHistoryDrawerOpen=true;this.loadHistoryTasks()};async loadHistoryTasks(){this.isLoadingHistoryTasks=true;try{const e=await a({url:"/sdk/v1/agent/app_filter_task/page",method:"GET",data:{page:this.taskHistoryCurrentPage,size:this.taskHistoryPageSize}});if(e.success&&e.data){this.historyTasks=e.data.records.map((e=>{let t="未知时间";try{const o=new Date(e.create_at);if(isNaN(o.getTime())){return{...e,timeDisplay:t}}const i=new Date;const n=i.getTime()-o.getTime();const r=Math.floor(n/(1e3*60*60*24));if(r===0){t=`今天 ${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}`}else if(r===1){t=`昨天 ${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}`}else if(r>0&&r<7){const e=["周日","周一","周二","周三","周四","周五","周六"];t=`${e[o.getDay()]} ${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}`}else{t=`${(o.getMonth()+1).toString().padStart(2,"0")}-${o.getDate().toString().padStart(2,"0")} ${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}`}}catch(t){console.error("时间格式化错误:",t,e.create_at)}return{...e,timeDisplay:t}}));this.taskHistoryTotal=e.data.total||0}}catch(e){console.error("获取历史任务失败:",e);I.captureError(e,{action:"loadHistoryTasks",component:"oem-jlsx-modal",title:"获取历史任务失败"});this.someErrorEvent.emit({error:e,message:"获取历史任务失败"})}finally{this.isLoadingHistoryTasks=false}}handleOpenPositionSelector=()=>{if(!this.oemId){j.info("未配置OEM ID,无法选择职位");return}this.showPositionSelector=true};handleClosePositionSelector=()=>{this.showPositionSelector=false};handlePositionSelected=e=>{const t=e.detail;this.jobDescription=t.formatted_text||"";this.showPositionSelector=false;j.success("职位信息已填充")};handleSwitchTask=async e=>{if(e===this.currentTask?.id){this.isTaskHistoryDrawerOpen=false;return}const t=this.currentTask?.id;try{const o=await a({url:`/sdk/v1/agent/app_filter_task/query/${e}`,method:"GET"});if(!o.success||!o.data){throw new Error(o.message||"获取任务详情失败")}const i=o.data;let n=[];if(i.extra){try{const e=typeof i.extra==="string"?JSON.parse(i.extra):i.extra;if(Array.isArray(e)){n=e}else if(Array.isArray(e?.criteria)){n=e.criteria.map((e=>({name:e.name,description:e.description,value:e.weight??e.value??0})))}}catch(e){console.warn("解析评分标准失败:",e)}}this.currentTask={id:i.id,jd_id:i.jd_id,user_id:i.user_id,extra:i.extra,create_at:i.create_at,update_at:i.update_at};this.jobDescription=i.jd_info?.description||"";this.jobTitle=i.jd_info?.title||"";this.evaluationCriteria=n.length>0?n:this.evaluationCriteria;this.currentStep="task";this.uploadedResumeRecords=[];this.filteredResumeRecords=[];this.currentPage=1;this.totalRecords=0;this.isTaskHistoryDrawerOpen=false;await this.loadResumeList();this.taskSwitch.emit({previous_task_id:t,current_task_id:i.id,task_title:`任务 #${i.id}`,switch_time:(new Date).toISOString()});_("切换任务成功","success")}catch(e){console.error("切换任务失败:",e);I.captureError(e,{action:"handleSwitchTask",component:"oem-jlsx-modal",title:"切换任务失败"});this.someErrorEvent.emit({error:e,message:"切换任务失败"})}};handleTaskHistoryPageChange=async e=>{this.taskHistoryCurrentPage=e;await this.loadHistoryTasks()};handleExportRecordsClick=()=>{this.isExportRecordsModalOpen=true};handleExportRecordsModalClose=()=>{this.isExportRecordsModalOpen=false};handleDocumentClick=e=>{const t=e.target;const o=t.closest(".action-dropdown");if(!o&&this.activeDropdownId){this.activeDropdownId=null}};emitAnalysisCompleteEvent=()=>{if(!this.currentTask)return;const e=this.resumeRecords;const t=e.filter((e=>e.evaluate_status===1&&typeof e.score==="number"));const o=e.filter((e=>e.evaluate_status===-1));const i=t.map((e=>e.score)).filter((e=>typeof e==="number"));const n=i.length>0?i.reduce(((e,t)=>e+t),0)/i.length:0;const r=i.length>0?Math.max(...i):0;this.resumeAnalysisComplete.emit({task_id:this.currentTask.id,total_resumes:e.length,analyzed_resumes:t.length,failed_resumes:o.length,average_score:Math.round(n*100)/100,highest_score:r})};handleUploadChange=e=>{if(!this._uploadEnabled){if(this.pcmUploadRef?.clearSelectedFiles){this.pcmUploadRef.clearSelectedFiles()}this.someErrorEvent.emit({error:new Error("上传功能已被禁用"),message:"上传功能已被禁用,请联系管理员"});return}if(!this.currentTask){_("请先创建任务","warning");return}const t=e.detail||[];const o=this.uploadedResumeRecords.map((e=>e.file_url||e.fileInfo?.cos_key)).filter((e=>e));const i=t.filter((e=>!o.includes(e.cos_key)));const n=t.map((e=>e.cos_key));const r=o.filter((e=>!n.includes(e)));if(i.length>0){const e=i.map((e=>{const t={id:Date.now()+Math.random().toString(),fileName:e.file_name||"未知文件",talentInfo:"等待分析...",score:undefined,scoreDetail:"等待分析...",uploadTime:new Date,fileInfo:e,task_id:this.currentTask.id,file_url:e.cos_key,evaluate_status:undefined};return t}));this.uploadedResumeRecords=[...this.uploadedResumeRecords,...e];e.forEach((e=>{this.uploadSuccess.emit(e.fileInfo)}));_(`成功上传 ${e.length} 个简历文件!`,"success")}if(r.length>0){this.uploadedResumeRecords=this.uploadedResumeRecords.filter((e=>{const t=e.file_url||e.fileInfo?.cos_key;return!r.includes(t)}))}};handleStartAnalysis=async()=>{if(await(this.pcmUploadRef?.getIsUploading?.())){_("文件上传中,请稍后","info");return}await this.startAnalysis()};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":this.currentStep==="input","task-layout":this.currentStep==="task"};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.shouldShowHistoryEntry()&&i("button",{type:"button",class:"header-history-entry",onClick:()=>this.handleTaskHistoryClick(this.currentStep==="input"?"input":"workspace"),title:this.getHistoryEntryTitle()},this.getHistoryEntryLabel())),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.currentStep==="input"?this.renderInputStep():this.renderTaskStep()),i("components-drawer",{isOpen:this.showJdDrawer,drawerTitle:"职位描述",width:"500px",onClosed:this.closeJdDrawer},i("div",{class:"drawer-content"},i("div",{class:"drawer-text-content"},this.jobDescription))),i("components-drawer",{isOpen:this.showCriteriaDrawer,drawerTitle:"评分标准",width:"500px",onClosed:this.closeCriteriaDrawer},i("div",{class:"drawer-content"},i("div",{class:"drawer-text-content"},this.getEvaluationCriteriaText()))),i("components-drawer",{isOpen:this.showPreviewDrawer,drawerTitle:this.previewTitle,width:"600px",onClosed:this.closePreviewDrawer},i("div",{class:"drawer-content"},this.previewType==="markdown"?i("div",{class:"markdown-content markdown-body",innerHTML:r(this.previewContent)}):i("div",{class:"file-preview"},i("iframe",{src:this.previewUrl,frameborder:"0",width:"100%",height:"100%",style:{border:"none",height:"calc(100vh - 120px)"}})))),i("components-drawer",{isOpen:this.isTaskHistoryDrawerOpen,drawerTitle:this.getTaskHistoryDrawerTitle(),width:"500px",onClosed:()=>{this.isTaskHistoryDrawerOpen=false}},i("div",{class:"task-history-drawer-content"},i("div",{class:"task-list"},this.isLoadingHistoryTasks?i("div",{class:"loading-tasks"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyTasks.length===0?i("div",{class:"empty-tasks"},i("p",null,"暂无历史任务")):this.historyTasks.map((e=>i("div",{key:e.id,class:{"task-item":true,active:e.id===this.currentTask?.id},onClick:()=>this.handleSwitchTask(e.id)},i("div",{class:"task-info"},i("div",{class:"task-header"},i("div",{class:"task-id"},e.title||`任务 #${e.id}`),i("div",{class:"task-time"},e.timeDisplay))),e.id===this.currentTask?.id&&i("div",{class:"current-task-indicator"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))))))),this.taskHistoryTotal>this.taskHistoryPageSize&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.taskHistoryCurrentPage===1,onClick:()=>this.handleTaskHistoryPageChange(this.taskHistoryCurrentPage-1)},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.taskHistoryCurrentPage," 页,共 ",Math.ceil(this.taskHistoryTotal/this.taskHistoryPageSize)," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:this.taskHistoryCurrentPage>=Math.ceil(this.taskHistoryTotal/this.taskHistoryPageSize),onClick:()=>this.handleTaskHistoryPageChange(this.taskHistoryCurrentPage+1)},"下一页")))),i("components-export-records-modal",{open:this.isExportRecordsModalOpen,botId:this.botId,sourceId:this.currentTask?.id?.toString(),onCancel:this.handleExportRecordsModalClose}),this.showPositionSelector&&i("div",{class:"position-selector-modal-overlay"},i("div",{class:"position-selector-modal"},i("div",{class:"position-selector-modal-header"},i("h3",null,"选择职位"),i("button",{class:"position-selector-close-btn",onClick:this.handleClosePositionSelector},"×")),i("div",{class:"position-selector-modal-body"},i("components-position-selector",{oemId:this.oemId,multiple:false,onPositionSelected:this.handlePositionSelected})))))}static get watchers(){return{isAnalyzing:["handleAnalysisProgressReset"],token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};dt.style=rt+(at+(st+lt));const ct='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const pt=".plan-type-section{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.plan-type-section label{font-weight:600;color:#333;margin-bottom:8px}.plan-type-options{display:flex;border:1px solid #d9d9d9;border-radius:6px;overflow:hidden}.plan-type-option{flex:1;border:none;border-right:1px solid #d9d9d9;padding:7px 8px;cursor:pointer;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:5px;transition:background-color 0.2s, color 0.2s;background-color:#fff}.plan-type-option:last-child{border-right:none}.plan-type-option:hover{background-color:#f0f7ff}.plan-type-option.selected{background-color:#1890ff}.plan-type-option.selected .option-icon,.plan-type-option.selected .option-label{color:#fff}.option-icon{display:flex;align-items:center;justify-content:center}.option-icon img{height:18px;width:auto}.option-label{font-size:13px;font-weight:500;color:#555;white-space:nowrap}.resume-upload-section{display:flex;flex-direction:column;gap:8px}.resume-upload-section label{font-weight:600;color:#333;margin-bottom:8px}.dynamic-form-section{margin-top:20px;margin-bottom:20px}.form-fields{display:flex;flex-direction:column;gap:16px}.form-field{display:flex;flex-direction:column;gap:8px}.form-field label{font-weight:600;color:#333;font-size:14px}.form-input{padding:10px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;transition:all 0.3s;outline:none}.form-input:hover{border-color:#40a9ff}.form-input:focus{border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.1)}.form-input::placeholder{color:#bfbfbf}.form-hint{font-size:12px;color:#8c8c8c;line-height:1.5;margin-top:-8px;padding:8px 12px;background-color:#f5f5f5;border-radius:4px;border-left:3px solid #1890ff}.report-section{display:flex;flex-direction:column;gap:16px;margin-bottom:20px;color:#333}.report-title{font-size:16px;font-weight:600}.report-field{display:flex;flex-direction:column;gap:8px}.report-field label{font-size:14px;font-weight:400}.report-input-wrapper{display:flex;align-items:center;gap:10px;box-sizing:border-box;height:42px;padding:0 12px;border:1px solid #ddd;border-radius:6px;background:#fff}.report-input-wrapper:focus-within{border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.report-input-wrapper .report-input{flex:1;min-width:0;width:100%;height:100%;padding:0;border:none;outline:none;background:transparent;font-family:inherit;font-size:14px;color:#333}.report-email-icon{flex-shrink:0;width:18px;height:18px;color:#999}.report-phone-prefix{flex-shrink:0;font-size:14px}.report-hint{display:flex;align-items:flex-start;gap:6px;padding:10px 12px;border-radius:6px;background:#fffbe6;color:#8c6d1f;font-size:12px;line-height:1.5}.report-hint svg{flex-shrink:0;width:16px;height:18px}.verification-code-container{display:flex;gap:8px;align-items:center}.verification-code-input{flex:1;padding:8px;border:1px solid #ddd;border-radius:4px;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s}.verification-code-input:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.send-code-button{padding:8px 16px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:14px;cursor:pointer;transition:all 0.3s ease;white-space:nowrap;min-width:100px}.send-code-button:hover:not(:disabled){background-color:#40a9ff}.send-code-button:disabled{background-color:rgba(0, 0, 0, 0.04);color:rgba(0, 0, 0, 0.25);cursor:not-allowed}";const ht=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const ft=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.planningComplete=t(this,"planningComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.sendSmsCodeRequest=t(this,"sendSmsCodeRequest")}modalTitle="职业规划助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始规划";fullscreen=false;customInputs={};showWorkspaceHistory=false;showEmail=true;showPhone=true;oemId;uploadSuccess;streamComplete;conversationStart;planningComplete;tokenInvalid;someErrorEvent;sendSmsCodeRequest;filePreviewMode="drawer";isUploading=false;uploadedFileInfo=null;showChatModal=false;isSubmitting=false;selectedPlanType="初入职场";targetPosition="";industryName="";jobPosition="";timePeriod="";email="";phoneNumber="";verificationCode="";isSendingCode=false;countdown=0;isVerifyingCode=false;get hostElement(){return o(this)}tokenInvalidListener;removeErrorListener;pcmUploadRef;countdownTimer=null;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.isSubmitting=false;this.uploadedFileInfo=null;this.email="";this.phoneNumber="";this.verificationCode="";this.isSendingCode=false;this.isVerifyingCode=false;this.countdown=0;if(this.countdownTimer){clearInterval(this.countdownTimer);this.countdownTimer=null}}else{if(this.customInputs&&this.customInputs.type){const e=this.customInputs.type;if(e==="转型建议"||e==="晋升路径"||e==="初入职场"){this.selectedPlanType=e}}await f(this.token);if(this.conversationId){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}if(this.countdownTimer){clearInterval(this.countdownTimer);this.countdownTimer=null}}handleClose=()=>{this.modalClosed.emit()};handlePlanTypeChange=e=>{this.selectedPlanType=e;this.targetPosition="";this.industryName="";this.jobPosition="";this.timePeriod=""};handleEmailChange=e=>{const t=e.target;this.email=t.value};handlePhoneNumberChange=e=>{const t=e.target;this.phoneNumber=t.value};handleVerificationCodeChange=e=>{const t=e.target;this.verificationCode=t.value};startCountdown=()=>{this.countdown=60;if(this.countdownTimer){clearInterval(this.countdownTimer)}this.countdownTimer=setInterval((()=>{this.countdown--;if(this.countdown<=0){if(this.countdownTimer){clearInterval(this.countdownTimer);this.countdownTimer=null}}}),1e3)};handleSendCode=()=>{if(!this.phoneNumber.trim()){j.error("请输入手机号");return}const e=/^1[3-9]\d{9}$/;if(!e.test(this.phoneNumber.trim())){j.error("请输入正确的手机号");return}this.isSendingCode=true;this.sendSmsCodeRequest.emit({mobile:this.phoneNumber.trim(),codeType:8});this.startCountdown();this.isSendingCode=false};handleStartPlanning=async()=>{if(!this.customInputs?.file_url&&!this.uploadedFileInfo){j.info("请上传简历");return}if(this.showEmail&&this.email.trim()&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(this.email.trim())){j.error("请输入正确的邮箱");return}if(this.showPhone&&this.phoneNumber.trim()){const e=/^1[3-9]\d{9}$/;if(!e.test(this.phoneNumber.trim())){j.error("请输入正确的手机号");return}if(!this.verificationCode.trim()){j.error("请输入验证码");return}this.isVerifyingCode=true;try{const e=await v(this.phoneNumber.trim(),this.verificationCode.trim(),0,this.oemId);if(!e.success){j.error(e.message||"验证码错误");this.isVerifyingCode=false;return}}catch(e){j.error("验证码校验失败");this.isVerifyingCode=false;return}this.isVerifyingCode=false}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};handlePlanningComplete=e=>{this.planningComplete.emit({...e.detail,type:this.selectedPlanType})};getPlanTypeIcon=e=>{const t=this.selectedPlanType===e;const o="https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/";const i={初入职场:"i_entry_level",晋升路径:"i_promotion",转型建议:"i_transition"};return`${o}${i[e]}${t?"_actived":""}.png`};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.file_url);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&i("div",{class:"input-container"},i("div",{class:"plan-type-section"},i("label",null,"选择建议类型"),i("div",{class:"plan-type-options"},i("div",{class:`plan-type-option ${this.selectedPlanType==="初入职场"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("初入职场")},i("div",{class:"option-icon"},i("img",{src:this.getPlanTypeIcon("初入职场"),alt:"初入职场"})),i("div",{class:"option-label"},"初入职场")),i("div",{class:`plan-type-option ${this.selectedPlanType==="晋升路径"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("晋升路径")},i("div",{class:"option-icon"},i("img",{src:this.getPlanTypeIcon("晋升路径"),alt:"晋升路径"})),i("div",{class:"option-label"},"晋升路径")),i("div",{class:`plan-type-option ${this.selectedPlanType==="转型建议"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("转型建议")},i("div",{class:"option-icon"},i("img",{src:this.getPlanTypeIcon("转型建议"),alt:"转型建议"})),i("div",{class:"option-label"},"转型建议")))),i("div",{class:"dynamic-form-section"},this.selectedPlanType==="初入职场"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"感兴趣的行业"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的行业",value:this.industryName,onInput:e=>this.industryName=e.target.value})),i("div",{class:"form-field"},i("label",null,"感兴趣的职位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的职位",value:this.jobPosition,onInput:e=>this.jobPosition=e.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,推荐您至少填写其中一项")),this.selectedPlanType==="转型建议"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"感兴趣的行业"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的行业",value:this.industryName,onInput:e=>this.industryName=e.target.value})),i("div",{class:"form-field"},i("label",null,"感兴趣的职位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的职位",value:this.jobPosition,onInput:e=>this.jobPosition=e.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,推荐您至少填写其中一项"),i("div",{class:"form-field"},i("label",null,"期望转型时间"),i("input",{type:"text",class:"form-input",placeholder:"请输入您期望的转型时间",value:this.timePeriod,onInput:e=>this.timePeriod=e.target.value}))),this.selectedPlanType==="晋升路径"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"晋升目标岗位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您的晋升目标岗位",value:this.targetPosition,onInput:e=>this.targetPosition=e.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,建议您填写晋升目标岗位名称"))),i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("components-mobile-upload-btn",{maxFileSize:15*1024*1024,multiple:false,uploadAreaMode:true,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},defaultFileList:this.customInputs?.file_url?[{cos_key:this.customInputs.file_url,file_name:this.customInputs?.file_name||"预设简历",file_size:0,ext:""}]:undefined,disabled:r,onOk:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),(this.showEmail||this.showPhone)&&i("div",{class:"report-section"},i("div",{class:"report-title"},"接收报告(选填)"),this.showEmail&&i("div",{class:"report-field"},i("label",{htmlFor:"report-email"},"邮箱"),i("div",{class:"report-input-wrapper"},i("svg",{class:"report-email-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","aria-hidden":"true"},i("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),i("path",{d:"m3 6 9 7 9-7"})),i("input",{id:"report-email",type:"email",class:"report-input",placeholder:"请输入邮箱,如 name@qq.com",value:this.email,onInput:this.handleEmailChange}))),this.showPhone&&i("div",{class:"report-field"},i("label",{htmlFor:"report-phone"},"手机短信"),i("div",{class:"report-input-wrapper"},i("span",{class:"report-phone-prefix"},"+86"),i("input",{id:"report-phone",type:"tel",class:"report-input",placeholder:"请输入手机号",maxLength:11,value:this.phoneNumber,onInput:this.handlePhoneNumberChange}))),this.showPhone&&this.phoneNumber.trim().length===11&&i("div",{class:"jd-input-section"},i("label",null,"验证码"),i("div",{class:"verification-code-container"},i("input",{type:"text",class:"verification-code-input",placeholder:"请输入验证码",maxLength:6,value:this.verificationCode,onInput:this.handleVerificationCodeChange}),i("button",{class:"send-code-button",disabled:this.isSendingCode||this.countdown>0||!this.phoneNumber.trim(),onClick:this.handleSendCode},this.isSendingCode?"发送中...":this.countdown>0?`${this.countdown}秒`:"发送验证码"))),this.showPhone&&i("div",{class:"report-hint"},i("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","aria-hidden":"true"},i("path",{d:"m12 3 10 18H2L12 3Z"}),i("path",{d:"M12 9v5m0 3v1"})),i("span",null,this.showEmail?"注:部分号码可能收不到短信,推荐使用邮箱接收报告。":"注:部分号码可能收不到短信。"))),i("button",{class:"submit-button",disabled:!r&&!this.uploadedFileInfo||this.isUploading||this.isSubmitting||this.isVerifyingCode,onClick:this.handleStartPlanning},this.isUploading?"上传中...":this.isVerifyingCode?"验证中...":this.isSubmitting?"处理中...":"开始规划"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("span",null,"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,showWorkspaceHistory:this.showWorkspaceHistory,botId:"121182005294690304",fullscreen:this.fullscreen,conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,type:this.selectedPlanType,email:this.showEmail?this.email.trim()||this.customInputs?.email||undefined:undefined,phone:this.showPhone?this.phoneNumber.trim()||undefined:undefined,...this.industryName?{industry_name:this.industryName}:{},...this.targetPosition||this.jobPosition?{target_position:this.targetPosition||this.jobPosition}:{},...this.timePeriod?{time_period:this.timePeriod}:{}},interviewMode:"text",onInterviewComplete:this.handlePlanningComplete}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};ft.style=ct+(pt+ht);const ut="";const gt='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const mt=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const bt=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.recordingError=t(this,"recordingError")}modalTitle="模拟面试";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始模拟面试";maxRecordingTime=120;waitingTime=10;fullscreen=false;customInputs={};digitalId;openingIndex=0;enableVirtualHuman=false;showEndInterviewButton=false;playbackRate=1;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;recordingError;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return o(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{await f(this.token);this.showChatModal=true}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}resetState(){this.showChatModal=false;this.jobDescription="";this.isSubmitting=false;this.selectedFile=null;this.isUploading=false;this.uploadedFileInfo=null}handleClose=()=>{this.modalClosed.emit()};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.enableVirtualHuman&&this.digitalId?i("pcm-virtual-chat-modal",{ref:e=>this.virtualChatModalRef=e,isOpen:true,fullscreen:this.fullscreen,botId:"3022316191018903",digitalId:this.digitalId,openingIndex:this.openingIndex,conversationId:this.conversationId,defaultQuery:this.defaultQuery,showEndInterviewButton:this.showEndInterviewButton,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,playbackRate:this.playbackRate,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,ai_interview_type:this.digitalId}}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,fullscreen:this.fullscreen,botId:"3022316191018903",digitalId:this.digitalId,showEndInterviewButton:this.showEndInterviewButton,conversationId:this.conversationId,defaultQuery:this.defaultQuery,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,playbackRate:this.playbackRate,customInputs:{...this.customInputs,file_url:this.uploadedFileInfo?.cos_key,file_name:this.uploadedFileInfo?.file_name,ai_interview_type:this.digitalId||2},interviewMode:"video"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};bt.style=ut+(gt+mt);const xt="在线客服";const wt="内容由AI生成,仅供参考";const yt="保存职位";const vt="简历制作";const kt="发消息";const zt="会话已结束";const Ct="语音输入";const It="点击停止录音";const jt="正在识别语音...";const St="结束面试";const _t="正在结束...";const Tt="正在结束面试...";const Ft="历史会话";const Et="确认完成";const Mt="继续录制";const Dt="确认结束";const Bt="取消";const Rt="点击确认完成将结束本题回答";const Ot="确认要结束面试吗?";const Ht="新会话";const At="未知时间";const Lt="时间解析失败";const Pt="内容预览";const qt={sunday:"周日",monday:"周一",tuesday:"周二",wednesday:"周三",thursday:"周四",friday:"周五",saturday:"周六"};const $t={recordingErrorText:"录制过程中发生错误",emptyVideo:"录制的视频为空",processVideoError:"处理录制视频时出错",deviceAccessFailed:"设备访问失败",permissionDenied:"请允许访问摄像头和麦克风权限",deviceNotFound:"未检测到摄像头或麦克风设备",unsupportedConfiguration:"摄像头不支持指定的配置",videoElementNotFound:"未找到视频元素或媒体流无效",noAudioData:"没有录制到音频数据",emptyAudio:"录制的音频为空",speechRecognitionFailed:"未能识别语音内容",sendMessageCheckNetwork:"消息发送失败,请检查网络。",browserNotSupportVideoRecording:"您的浏览器不支持视频录制,请切换到微信或Chrome、Edge使用",cameraOrMicAccessFailed:"无法访问摄像头或麦克风,请检查设备连接"};const Ut={pleaseStart:"请开始",nextQuestion:"下一题",generateResume:"生成简历",endInterviewMessage:"请结束面试"};const Nt={userConfirmEnd:"用户确认结束面试",userCancelEnd:"用户取消结束面试"};const Vt={interviewCompleted:"面试已完成,感谢您的参与!",aiReviewing:"AI正在查看面试信息...",playingQuestion:"正在播放问题,请听完后准备回答...",uploadingVideo:"正在上传视频,请稍候...",waitingForQuestion:"请等待题目...",prepareToRecord:"请准备好,{time}秒后将开始录制您的回答...",preparing:"准备中..."};const Wt={completeAnswer:"完成本题回答",completeAnswerShort:"完成回答",endChatGenerateResume:"结束对话生成简历"};const Jt={loadingHistory:"加载历史消息中..."};const Qt={greeting:"你好,我是聘才猫,一个AI助手,很高兴认识你..."};const Yt={recordingInProgress:"录制中",autoCompleteWarning:"即将自动完成",currentRecordingTime:"当前录制时长:",recordingStillInProgress:"注意:录制仍在进行中"};const Gt={loading:"加载中...",noHistory:"暂无历史会话"};const Xt={trySolutions:"请尝试以下解决方案:",solution1:"更换有摄像头和麦克风的设备",solution2:"确保已允许浏览器访问摄像头和麦克风",solution3:"关闭其他正在使用摄像头/麦克风的应用"};const Kt={noReminderThisInterview:"本次面试不再提醒",currentQuestion:"当前第 {count} 题",fewQuestionsWarning:"警告:",fewQuestionsWarningText:"当前已回答题数小于 3 题,结束面试可能无法正常完成面试流程,建议继续完成更多题目后再结束面试。",endInterviewConfirm:"确认要结束面试吗?结束后将生成面试报告。"};var Zt={modalTitle:xt,aiDisclaimer:wt,saveJdButtonText:yt,resumeCreation:vt,sendMessage:kt,conversationEnded:zt,voiceInput:Ct,clickToStopRecording:It,recognizingSpeech:jt,endInterview:St,ending:_t,endingInterview:Tt,historyConversations:Ft,confirmComplete:Et,continueRecording:Mt,confirmEnd:Dt,cancel:Bt,clickConfirmCompleteToEnd:Rt,confirmEndInterviewPrompt:Ot,newConversation:Ht,unknownTime:At,timeParseError:Lt,contentPreview:Pt,weekdays:qt,errors:$t,messages:Ut,logs:Nt,placeholderStatus:Vt,buttons:Wt,loading:Jt,welcome:Qt,recording:Yt,history:Gt,deviceError:Xt,confirm:Kt};const eo="Online Customer Service";const to="AI-generated content, for reference only";const oo="Save Job";const io="Resume Creation";const no="Send Message";const ro="Conversation Ended";const ao="Voice Input";const so="Click to Stop Recording";const lo="Recognizing Speech...";const co="End Interview";const po="Ending...";const ho="Ending Interview...";const fo="History Conversations";const uo="Confirm Complete";const go="Continue Recording";const mo="Confirm End";const bo="Cancel";const xo='Click "Confirm Complete" to end this question';const wo="Are you sure you want to end the interview?";const yo="New Conversation";const vo="Unknown Time";const ko="Time Parse Error";const zo="Content Preview";const Co={sunday:"Sun",monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat"};const Io={recordingErrorText:"Recording Error Occurred",emptyVideo:"Recorded Video is Empty",processVideoError:"Error Processing Recorded Video",deviceAccessFailed:"Device Access Failed",permissionDenied:"Please Allow Access to Camera and Microphone",deviceNotFound:"Camera or Microphone Not Detected",unsupportedConfiguration:"Camera Does Not Support Specified Configuration",videoElementNotFound:"Video Element Not Found or Media Stream Invalid",noAudioData:"No Audio Data Recorded",emptyAudio:"Recorded Audio is Empty",speechRecognitionFailed:"Failed to Recognize Speech Content",sendMessageCheckNetwork:"Failed to send message, please check your network.",browserNotSupportVideoRecording:"Your browser does not support video recording, please switch to WeChat, Chrome, or Edge",cameraOrMicAccessFailed:"Unable to access camera or microphone, please check device connection"};const jo={pleaseStart:"Please Start",nextQuestion:"Next Question",generateResume:"Generate Resume",endInterviewMessage:"Please End Interview"};const So={userConfirmEnd:"User Confirmed End Interview",userCancelEnd:"User Cancelled End Interview"};const _o={interviewCompleted:"Interview completed, thank you for your participation!",aiReviewing:"AI is reviewing interview information...",playingQuestion:"Playing question, please listen and prepare to answer...",uploadingVideo:"Uploading video, please wait...",waitingForQuestion:"Please wait for the question...",prepareToRecord:"Get ready, recording will start in {time} seconds...",preparing:"Preparing..."};const To={completeAnswer:"Complete This Answer",completeAnswerShort:"Complete Answer",endChatGenerateResume:"End Chat and Generate Resume"};const Fo={loadingHistory:"Loading history messages..."};const Eo={greeting:"Hello, I'm PinCaiMao, an AI assistant, nice to meet you..."};const Mo={recordingInProgress:"Recording",autoCompleteWarning:"Auto-complete soon",currentRecordingTime:"Current recording time: ",recordingStillInProgress:"Note: Recording still in progress"};const Do={loading:"Loading...",noHistory:"No history conversations"};const Bo={trySolutions:"Please try the following solutions:",solution1:"Switch to a device with camera and microphone",solution2:"Ensure browser access to camera and microphone is allowed",solution3:"Close other applications using camera/microphone"};const Ro={noReminderThisInterview:"Don't remind me again for this interview",currentQuestion:"Current question {count}",fewQuestionsWarning:"Warning:",fewQuestionsWarningText:"You have answered fewer than 3 questions. Ending the interview now may prevent proper completion of the interview process. It is recommended to complete more questions before ending.",endInterviewConfirm:"Are you sure you want to end the interview? An interview report will be generated after ending."};var Oo={modalTitle:eo,aiDisclaimer:to,saveJdButtonText:oo,resumeCreation:io,sendMessage:no,conversationEnded:ro,voiceInput:ao,clickToStopRecording:so,recognizingSpeech:lo,endInterview:co,ending:po,endingInterview:ho,historyConversations:fo,confirmComplete:uo,continueRecording:go,confirmEnd:mo,cancel:bo,clickConfirmCompleteToEnd:xo,confirmEndInterviewPrompt:wo,newConversation:yo,unknownTime:vo,timeParseError:ko,contentPreview:zo,weekdays:Co,errors:Io,messages:jo,logs:So,placeholderStatus:_o,buttons:To,loading:Fo,welcome:Eo,recording:Mo,history:Do,deviceError:Bo,confirm:Ro};const Ho=":host{display:block;font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;overflow-y:auto;z-index:1000}.fullscreen-overlay{padding:0;position:absolute;width:100%;height:100%}.modal-container{background:white;border-radius:8px;width:100%;max-width:900px;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.modal-container.fullscreen>div:not(.modal-header):not(.initial-upload){display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.pc-layout{width:80%;max-width:800px;min-width:320px;min-height:400px}.video-preview.placeholder{display:flex;justify-content:center;align-items:center;background:#eaeaea}.placeholder-status{color:#00000066}.placeholder-status p{font-size:16px}.waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-container{width:100%;display:flex;flex-direction:column;align-items:center}.video-container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;margin-bottom:20px}.video-area{width:100%;display:flex;flex-direction:column;align-items:center}.stop-recording-button{width:100%;height:100%;font-size:16px;background:#f44336;border-radius:6px;color:white;border:none;cursor:pointer}.stop-recording-button:hover{background:#d32f2f}.play-audio-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;min-height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0;}.header-left{display:flex;align-items:center;gap:8px}.header-left>div{font-size:16px}.header-title-group{display:flex;flex-direction:column;gap:2px}.header-title-group>div:first-child{font-size:16px}.header-disclaimer{font-size:11px;color:#999;line-height:1}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.chat-container{background-image:url(https://pub.pincaimao.com/static/web/images/login/bg_login_m.png);background-size:100%;height:100%;border-radius:0px 0px 8px 8px}.chat-history{position:relative;flex:1;overflow-y:auto;padding:20px;scroll-behavior:smooth;height:60vh;min-height:400px;max-height:900px}.node-status{display:flex;align-items:flex-start;gap:8px;margin:8px 0 16px;padding:4px 0;color:#8c8c8c;font-size:13px;line-height:20px}.node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:chat-node-status-spin 1.2s linear infinite}.node-status-text{min-width:0;white-space:pre-line;overflow-wrap:anywhere}@keyframes chat-node-status-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.fullscreen .chat-history{height:auto;flex:1 1 auto}.message-input{padding:16px;border-top:1px solid #eee;display:flex;gap:8px;align-items:center}.message-input input{flex:1;padding:8px 12px;border:1px solid #ddd;border-radius:4px;outline:none;transition:border-color 0.2s ease}.message-input input:focus{border-color:#bbb}.message{margin-bottom:16px;opacity:1;transition:opacity 0.3s ease}.message-content{max-width:70%;padding:8px 12px;border-radius:8px;word-break:break-word}.message-content p{margin:0;word-break:break-word}.user-message{display:flex;justify-content:flex-end}.agent-message{display:flex;justify-content:flex-start}.user-message .message-content{background-color:#007bff;color:white}.agent-message .message-content{background-color:#f1f1f1}.message-time{font-size:12px;color:#999;margin-top:4px;display:block}.cancel-button{width:150px;height:38px;background:#0d75fb;color:#fff;border:none;margin-bottom:10px;cursor:pointer;border-radius:6px}.cancel-button.disabled{background:#d9d9d9;cursor:not-allowed}.send-button{width:38px;height:38px;border-radius:16px;background:#0d75fb;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color 0.2s ease}.send-button img{width:24px;height:24px}.send-button:hover{background:#0a62d6}.send-button.disabled{background:#d9d9d9;cursor:not-allowed}.empty-state{display:flex;justify-content:center;align-items:center;height:100%;color:#999;text-align:center}.loading-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:rgba(255, 255, 255, 0.98);z-index:1;opacity:1;transition:opacity 0.3s ease}.loading-container p{margin-top:16px;color:#666;font-size:14px}.loading-spinner{width:40px;height:40px;border:3px solid #f3f3f3;border-top:3px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.messages-wrapper{width:100%;min-height:100%;display:flex;flex-direction:column;justify-content:flex-end}.messages-wrapper.has-overflow{justify-content:flex-start}.suggested-questions{display:flex;flex-direction:column;gap:8px;padding:16px}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#f3f4f6;border-radius:4px;cursor:pointer;font-size:14px;color:#374151;transition:background-color 0.2s}.suggested-question:hover{background-color:#e5e7eb}.arrow-right{margin-left:8px}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#6b7280;border-radius:50%;animation:spin 0.8s linear infinite}.upload-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;color:#666;border-radius:4px;transition:background-color 0.2s}.upload-button:hover{background-color:rgba(0, 0, 0, 0.04)}.upload-button svg{width:20px;height:20px}.file-input{display:none}.selected-file{font-size:12px;color:#666;margin-left:8px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{flex:1;display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;padding:0 4px;background:white}.input-wrapper input{border:none;flex:1;padding:8px;outline:none}.input-wrapper:focus-within{border-color:#bbb}.file-preview{padding:8px 16px;border-top:1px solid #eee;background-color:#f9f9f9}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding:10px 20px 0px 20px;border-radius:14px 14px 0 0;flex:0 0 auto}.chat-readonly-hint{display:flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;width:100%;padding:4px 0 14px;color:#666;font-size:12px;line-height:1.6}.chat-readonly-hint svg{flex-shrink:0}.recording-section .video-preview{width:100%;height:200px;max-width:400px;position:relative;margin-bottom:10px;border:1px solid #ddd;border-radius:12px;overflow:hidden}.recording-section video{width:100%;height:100%;object-fit:cover}.recording-status{position:absolute;top:10px;left:10px;background-color:rgba(0, 0, 0, 0.6);color:white;padding:4px 8px;border-radius:4px;display:flex;align-items:center;gap:5px;font-size:14px;z-index:0}.recording-status .recording-dot{display:inline-block;width:10px;height:10px;background-color:red;border-radius:50%;margin-right:5px;animation:blink 1s infinite}.recording-status.warning{color:#ff4d4f;animation:blink 1s infinite}@keyframes blink{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}.recording-section .stop-recording-button{background-color:#f44336;color:white;border:none;cursor:pointer;font-weight:bold}.recording-section .stop-recording-button:hover{background-color:#d32f2f}.fullscreen{width:100vw;border-radius:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.recording-controls{margin-top:10px;height:53px;width:100%;max-width:400px;display:flex;justify-content:center}.recording-controls .waiting-message{text-align:center;color:white;font-size:16px;background-color:#0d75fb;border-radius:6px;width:95%;display:flex;justify-content:center;align-items:center;cursor:pointer}.recording-controls .waiting-message.loading{background:#faad14}.recording-controls .waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-controls .stop-recording-button{background-color:#dc3545;color:white;border:none;cursor:pointer;font-size:16px}.recording-controls .stop-recording-button:hover{background-color:#c82333}.recording-controls .stop-recording-button.disabled{background:#ccc;cursor:not-allowed}.recording-controls .stop-recording-button.disabled:hover{background:#ccc}.progress-container{display:flex;justify-content:space-between;align-items:center;width:100%;max-width:400px;margin-top:10px;padding:0 5px}.progress-bar-container{height:4px;background-color:#e5e5e5;border-radius:2px;overflow:hidden;margin-right:10px;width:75px}.progress-bar{height:100%;background-image:linear-gradient(111deg, #4a9fff 0%, #1058ff 100%);border-radius:2px;transition:width 0.3s ease}.progress-text{font-size:14px;color:#666;white-space:nowrap}.text-input-area{display:flex;flex-direction:column;width:100%;height:100%;padding:0px 16px 16px 16px;border-radius:8px;border:none;}.text-answer-input{flex:1;min-height:80px;padding:12px 12px 0px 12px;border:1px solid #ddd;border-radius:8px 8px 0 0;resize:none;font-size:16px;background-color:#fff;border-bottom:none;outline:none;}.input-toolbar{display:flex;justify-content:flex-end;align-items:center;padding:8px 12px;background-color:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 8px 8px}.text-answer-input:focus{border-color:rgb(74, 144, 226);border-bottom:none}.text-answer-input:focus+.input-toolbar{border-color:rgb(74, 144, 226);border-top:none}.toolbar-actions{width:32px;height:32px;display:flex;justify-content:center;align-items:center;margin-right:10px;border:1px solid #d9d9d9;border-radius:6px}.toolbar-actions:hover{background-color:#f0f0f0}.toolbar-button{background:transparent;border:none;color:#666;cursor:pointer;padding:0;margin:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.toolbar-button>div,.toolbar-button>svg{display:flex;justify-content:center;align-items:center}.submit-text-button{padding:6px 16px;background-color:#4a90e2;color:white;border:none;border-radius:4px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color 0.2s}.submit-text-button:hover:not(.disabled){background-color:#3a7bc8}.submit-text-button.disabled{background-color:#b3b3b3;cursor:not-allowed}.toolbar-button.recording{background-color:rgba(255, 0, 0, 0.1);color:#ff3b30;animation:pulse 1.5s infinite}.toolbar-button.converting{background-color:rgba(0, 122, 255, 0.1);color:#007aff}.toolbar-button .recording-time{font-size:12px;margin-left:4px}.converting-indicator{display:flex;justify-content:center;align-items:center}.converting-indicator svg{animation:spin 1.5s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0.4)}70%{box-shadow:0 0 0 6px rgba(255, 0, 0, 0)}100%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0)}}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:0}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.workspace-section{width:100%;padding:0px 16px 16px}.workspace-toolbar{display:flex;justify-content:space-between;align-items:end;gap:12px;position:relative}.workspace-button{display:flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #d9d9d9;border-radius:6px;background:white;color:#666;font-size:14px;cursor:pointer;transition:all 0.2s ease;box-shadow:0 1px 2px rgba(0, 0, 0, 0.05)}.workspace-button:hover{border-color:#4096ff;color:#4096ff;box-shadow:0 2px 4px rgba(64, 150, 255, 0.1)}.workspace-button svg{flex-shrink:0}.workspace-button.end-interview-button{background:#ff4d4f;color:white;border-color:#ff4d4f}.workspace-button.end-interview-button:hover:not(:disabled){background:#ff7875;border-color:#ff7875;color:white;box-shadow:0 2px 4px rgba(255, 77, 79, 0.2)}.workspace-button.end-interview-button:disabled{background:#d9d9d9;border-color:#d9d9d9;color:#999;cursor:not-allowed;box-shadow:none}.digital-human-wrapper{display:flex;align-items:center;justify-content:center;width:120px;height:80px;border:1px solid #d9d9d9;border-radius:8px;background:#fafafa;overflow:hidden;position:absolute;right:0px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-item.active{background:#e6f7ff;border-color:#1890ff}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.current-indicator{flex-shrink:0;color:#1890ff;margin-left:8px}";const Ao='.markdown-body{--base-size-4:4px;--base-size-8:8px;--base-size-16:16px;--base-size-24:24px;--base-size-40:40px;--base-text-weight-normal:400;--base-text-weight-medium:500;--base-text-weight-semibold:600;--fontStack-monospace:ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;--fgColor-accent:Highlight}@media (prefers-color-scheme: dark){.markdown-body,[data-theme="dark"]{color-scheme:dark;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}@media (prefers-color-scheme: light){.markdown-body,[data-theme="light"]{color-scheme:light;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#59636e;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#ffffff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#818b981f;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d1d9e0;--borderColor-muted:#d1d9e0b3;--borderColor-neutral-muted:#d1d9e0b3;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#9a6700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#59636e;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#1f2328;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#59636e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#1f2328;--color-prettylights-syntax-markup-bold:#1f2328;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#d1d9e0;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#818b98}}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:\' \';display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' version=\'1.1\' aria-hidden=\'true\'><path fill-rule=\'evenodd\' d=\'M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none !important}.markdown-body a{background-color:transparent;color:var(--fgColor-accent);text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body mark{background-color:var(--bgColor-attention-muted);color:var(--fgColor-default)}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-0.25em}.markdown-body sup{top:-0.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em var(--base-size-40)}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid var(--borderColor-muted);height:.25em;padding:0;margin:var(--base-size-24) 0;background-color:var(--borderColor-default);border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:var(--fgColor-muted);opacity:1}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:var(--base-size-4);font:11px var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);line-height:10px;color:var(--fgColor-default);vertical-align:middle;background-color:var(--bgColor-muted);border:solid 1px var(--borderColor-neutral-muted);border-bottom-color:var(--borderColor-neutral-muted);border-radius:6px;box-shadow:inset 0 -1px 0 var(--borderColor-neutral-muted)}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:var(--base-size-24);margin-bottom:var(--base-size-16);font-weight:var(--base-text-weight-semibold, 600);line-height:1.25}.markdown-body h2{font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.2em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body h3{font-weight:var(--base-text-weight-semibold, 600);font-size:1.05em}.markdown-body h4{font-weight:var(--base-text-weight-semibold, 600);font-size:0.875em}.markdown-body h5{font-weight:var(--base-text-weight-semibold, 600);font-size:.85em}.markdown-body h6{font-weight:var(--base-text-weight-semibold, 600);font-size:.80em;color:var(--fgColor-muted)}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:var(--fgColor-muted);border-left:.25em solid var(--borderColor-default)}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible !important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;appearance:none}.markdown-body .mr-2{margin-right:var(--base-size-8, 8px) !important}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0 !important}.markdown-body>*:last-child{margin-bottom:0 !important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:var(--fgColor-danger)}.markdown-body .anchor{float:left;padding-right:var(--base-size-4);margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:var(--base-size-16);font-size:16px;font-weight:400}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:var(--fgColor-default);vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:var(--base-size-16)}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:var(--base-size-16);font-size:1em;font-style:italic;font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dl dd{padding:0 var(--base-size-16);margin-bottom:var(--base-size-16)}.markdown-body table th{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid var(--borderColor-default)}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:var(--bgColor-default);border-top:1px solid var(--borderColor-muted)}.markdown-body table tr:nth-child(2n){background-color:var(--bgColor-muted)}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid var(--borderColor-default)}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:var(--fgColor-default)}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:var(--bgColor-neutral-muted);border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:var(--base-size-16)}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:var(--base-size-16);overflow:auto;font-size:85%;line-height:1.45;color:var(--fgColor-default);background-color:var(--bgColor-muted);border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px var(--base-size-8) 9px;text-align:right;background:var(--bgColor-default);border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:var(--base-text-weight-semibold, 600);background:var(--bgColor-muted);border-top:0}.markdown-body [data-footnote-ref]::before{content:"["}.markdown-body [data-footnote-ref]::after{content:"]"}.markdown-body .footnotes{font-size:12px;color:var(--fgColor-muted);border-top:1px solid var(--borderColor-default)}.markdown-body .footnotes ol{padding-left:var(--base-size-16)}.markdown-body .footnotes ol ul{display:inline-block;padding-left:var(--base-size-16);margin-top:var(--base-size-16)}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target::before{position:absolute;top:calc(var(--base-size-8)*-1);right:calc(var(--base-size-8)*-1);bottom:calc(var(--base-size-8)*-1);left:calc(var(--base-size-24)*-1);pointer-events:none;content:"";border:2px solid var(--borderColor-accent-emphasis);border-radius:6px}.markdown-body .footnotes li:target{color:var(--fgColor-default)}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body body:has(:modal){padding-right:var(--dialog-scrollgutter) !important}.markdown-body .pl-c{color:var(--color-prettylights-syntax-comment)}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:var(--color-prettylights-syntax-constant)}.markdown-body .pl-e,.markdown-body .pl-en{color:var(--color-prettylights-syntax-entity)}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:var(--color-prettylights-syntax-storage-modifier-import)}.markdown-body .pl-ent{color:var(--color-prettylights-syntax-entity-tag)}.markdown-body .pl-k{color:var(--color-prettylights-syntax-keyword)}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:var(--color-prettylights-syntax-string)}.markdown-body .pl-v,.markdown-body .pl-smw{color:var(--color-prettylights-syntax-variable)}.markdown-body .pl-bu{color:var(--color-prettylights-syntax-brackethighlighter-unmatched)}.markdown-body .pl-ii{color:var(--color-prettylights-syntax-invalid-illegal-text);background-color:var(--color-prettylights-syntax-invalid-illegal-bg)}.markdown-body .pl-c2{color:var(--color-prettylights-syntax-carriage-return-text);background-color:var(--color-prettylights-syntax-carriage-return-bg)}.markdown-body .pl-sr .pl-cce{font-weight:bold;color:var(--color-prettylights-syntax-string-regexp)}.markdown-body .pl-ml{color:var(--color-prettylights-syntax-markup-list)}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:bold;color:var(--color-prettylights-syntax-markup-heading)}.markdown-body .pl-mi{font-style:italic;color:var(--color-prettylights-syntax-markup-italic)}.markdown-body .pl-mb{font-weight:bold;color:var(--color-prettylights-syntax-markup-bold)}.markdown-body .pl-md{color:var(--color-prettylights-syntax-markup-deleted-text);background-color:var(--color-prettylights-syntax-markup-deleted-bg)}.markdown-body .pl-mi1{color:var(--color-prettylights-syntax-markup-inserted-text);background-color:var(--color-prettylights-syntax-markup-inserted-bg)}.markdown-body .pl-mc{color:var(--color-prettylights-syntax-markup-changed-text);background-color:var(--color-prettylights-syntax-markup-changed-bg)}.markdown-body .pl-mi2{color:var(--color-prettylights-syntax-markup-ignored-text);background-color:var(--color-prettylights-syntax-markup-ignored-bg)}.markdown-body .pl-mdr{font-weight:bold;color:var(--color-prettylights-syntax-meta-diff-range)}.markdown-body .pl-ba{color:var(--color-prettylights-syntax-brackethighlighter-angle)}.markdown-body .pl-sg{color:var(--color-prettylights-syntax-sublimelinter-gutter-mark)}.markdown-body .pl-corl{text-decoration:underline;color:var(--color-prettylights-syntax-constant-other-reference-link)}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),.markdown-body button:focus:not(:focus-visible),.markdown-body summary:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible){outline:none;box-shadow:none}.markdown-body [tabindex="0"]:focus:not(:focus-visible),.markdown-body details-dialog:focus:not(:focus-visible){outline:none}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1em;font-style:normal !important;font-weight:var(--base-text-weight-normal, 400);line-height:1;vertical-align:-0.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:var(--base-text-weight-normal, 400)}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:var(--base-size-4)}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:var(--base-size-8) var(--base-size-16);margin-bottom:var(--base-size-16);color:inherit;border-left:.25em solid var(--borderColor-default)}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:var(--base-text-weight-medium, 500);align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:var(--borderColor-accent-emphasis)}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--fgColor-accent)}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:var(--borderColor-done-emphasis)}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--fgColor-done)}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:var(--borderColor-attention-emphasis)}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--fgColor-attention)}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:var(--borderColor-success-emphasis)}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--fgColor-success)}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:var(--borderColor-danger-emphasis)}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--fgColor-danger)}.markdown-body>*:first-child>.heading-element:first-child{margin-top:0 !important}.markdown-body .highlight pre:has(+.zeroclipboard-container){min-height:52px}.markdown-body .md-table-wrap table{margin-top:0;margin-bottom:0}.markdown-body .md-table-wrap{margin-top:0;margin-bottom:var(--base-size-16)}.markdown-body>.md-table-wrap:first-child{margin-top:0}.markdown-body>.md-table-wrap:last-child{margin-bottom:0}@media (max-width: 767px){.markdown-body .md-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.markdown-body .md-table-wrap table{min-width:max-content}}';const Lo=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Po=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.recordingError=t(this,"recordingError");this.recordingStatusChange=t(this,"recordingStatusChange");this.tokenInvalid=t(this,"tokenInvalid");this.historyConversationSelect=t(this,"historyConversationSelect");this.nodeStatusChange=t(this,"node-status-change")}locale;strings;modalTitle="在线客服";token;isOpen=false;messages=[];modalClosed;icon;zIndex;isShowHeader=true;isNeedClose=true;conversationId;showSaveJdButton=false;saveJdButtonText="保存职位";isLoading=false;currentStreamingMessage=null;shouldAutoScroll=true;isLoadingHistory=false;get hostElement(){return o(this)}streamComplete;conversationStart;defaultQuery="你好!聘才猫";maxRecordingTime=120;countdownWarningTime=30;waitingTime=10;closeResume;isRecording=false;recordingStream=null;recordedBlob=null;mediaRecorder=null;recordingTimeLeft=0;showRecordingUI=false;recordingTimer=null;recordingStartTime=0;waitingToRecord=false;waitingTimer=null;waitingTimeLeft=0;videoRef=null;currentQuestionNumber=0;interviewComplete;showCountdownWarning=false;fullscreen=false;isUploadingVideo=false;isPlayingAudio=false;recordingError;recordingStatusChange;tokenInvalid;historyConversationSelect;interviewMode="text";textAnswer="";isSubmittingText=false;customInputs={};botId;isRecordingAudio=false;audioRecorder=null;audioChunks=[];isConvertingAudio=false;audioRecordingTimeLeft=60;audioRecordingTimer=null;audioRecordingStartTime=0;maxAudioRecordingTime=60;userAvatar="https://pub.pincaimao.com/static/common/i_pcm_logo.png";assistantAvatar;agentLogo="";isTaskCompleted=false;virtualmanKey="";tokenInvalidListener;showCopyButton=true;showFeedbackButtons=true;filePreviewMode="drawer";showWorkspaceHistory=false;showChatInput=true;showNodeStatus=true;currentNodeTitle="";nodeStatusChange;handleNodeTitleChange(e){this.nodeStatusScrollPending=true;this.nodeStatusChange.emit(e)}nodeStatusScrollPending=false;componentDidRender(){if(this.nodeStatusScrollPending){this.nodeStatusScrollPending=false;this.scrollToBottom()}}isDrawerOpen=false;previewUrl="";previewFileName="";previewContentType="file";previewContent="";isUserScrolling=false;deviceError=null;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;showConfirmModal=false;skipConfirmThisInterview=false;showEndInterviewConfirmModal=false;isEndingInterview=false;lastCompletedAnswer="";waitingForDigitalHuman=false;digitalHumanVideoReady=false;digitalId;showEndInterviewButton=false;playbackRate=1;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async componentWillLoad(){this.strings=this.locale==="en"?Oo:Zt;if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}else{const e=d.getItem("modal-zIndex");if(e){this.zIndex=e}else{this.zIndex=1e3;d.setItem("modal-zIndex",1e3)}}if(this.token){h.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};document.addEventListener("pcm-token-invalid",this.tokenInvalidListener);if(!this.customInputs){this.customInputs={}}if(!this.assistantAvatar&&this.botId){this.fetchAgentLogo()}if(this.isOpen){if(this.conversationId){setTimeout((()=>this.loadHistoryMessages()),0)}else{setTimeout((()=>{this.sendMessageToAPI(this.defaultQuery)}),0)}}}handleClose=()=>{this.stopRecording();this.modalClosed.emit()};async fetchAgentLogo(){if(!this.botId)return;try{const e=await k(this.botId);if(e&&e.logo){this.agentLogo=e.logo}}catch(e){I.captureError(e,{action:"fetchAgentLogo",component:"pcm-app-chat-modal",title:"获取智能体信息失败"});C.emitError({error:e,message:"获取智能体信息失败"})}}async sendMessageToAPI(e,t){if(this.isTaskCompleted&&!this.isEndingInterview){return}this.waitingForDigitalHuman=false;this.digitalHumanVideoReady=false;this.isLoading=true;this.currentNodeTitle="";let o="";let i="";const n=new Date;const r=`${n.getHours()}:${n.getMinutes().toString().padStart(2,"0")}`;const a=e.trim()||this.strings?.messages?.pleaseStart;if(t){this.customInputs={...this.customInputs,video_url:t}}const s={id:`temp-${Date.now()}`,conversation_id:this.conversationId,inputs:this.customInputs||{},query:a,answer:"",message_files:[],feedback:{},retriever_resources:[],created_at:Math.floor(Date.now()/1e3).toString(),agent_thoughts:[],status:"normal",error:null,time:r,isStreaming:true};this.currentStreamingMessage=s;setTimeout((()=>{this.shouldAutoScroll=true;this.scrollToBottom()}),200);const l={response_mode:"streaming",conversation_id:this.conversationId,query:a,bot_id:this.botId};l.inputs={...this.customInputs};await u({url:"/sdk/v1/chat/chat-messages",method:"POST",data:l,onMessage:e=>{if(e.conversation_id&&!this.conversationId){this.conversationId=e.conversation_id;this.conversationStart.emit({conversation_id:e.conversation_id,event:e.event,message_id:e.message_id,id:e.id})}if(this.showNodeStatus&&!o&&(e.event==="node_started"||e.event==="node_finished")){const t=e.data?.title;if(typeof t==="string"&&t.startsWith("progress:")){this.currentNodeTitle=t.slice("progress:".length).trim()}}if(e.event==="node_finished"&&e.data.inputs&&e.data.inputs.LLMText){i=e.data.inputs.LLMText}if(e.event==="node_finished"&&e.data.title&&e.data.title.includes("聘才猫任务结束")){this.isTaskCompleted=true;const e=i||o||this.currentStreamingMessage?.answer||"";this.interviewComplete.emit({conversation_id:this.conversationId,current_question_number:this.currentQuestionNumber,ai_response:e})}if(e.event==="node_finished"&&e.data.title&&e.data.title.includes("聘才猫数字人题目")){const t=JSON.parse(e.data.process_data.digital_human_list);this.precreateDigitalHumanVideos(t)}if(e.event==="message"||e.event==="agent_message"){if(e.event==="agent_message"||e.event==="message"){if(e.answer){o+=e.answer;this.currentNodeTitle="";const t={...this.currentStreamingMessage,answer:o,id:e.message_id||this.currentStreamingMessage.id,isStreaming:true,retriever_resources:e.retriever_resources||this.currentStreamingMessage.retriever_resources,agent_thoughts:e.agent_thoughts||this.currentStreamingMessage.agent_thoughts};this.currentStreamingMessage=t;this.scrollToBottom()}}}if(e.event==="error"){const t=e.data?.message||e.message||"请求失败";this.messages=[...this.messages,{...s,answer:t,error:e.data,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false;this.currentNodeTitle="";C.emitError({error:e.data,message:t});return}if(e.event==="message_end"){this.currentNodeTitle="";this.streamComplete.emit({conversation_id:e.conversation_id||"",event:e.event,message_id:e.message_id,id:e.id})}},onError:e=>{console.error("发生错误:",e);C.emitError({error:e,message:"消息发送失败,请稍后再试"});I.captureError(e,{action:"sendMessageToAPI",component:"pcm-app-chat-modal",title:"消息发送失败"});this.messages=[...this.messages,{...s,answer:this.strings?.errors?.sendMessageCheckNetwork,error:e,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false;this.currentNodeTitle=""},onComplete:async()=>{this.isLoading=false;this.currentNodeTitle="";setTimeout((()=>{if(this.customInputs){delete this.customInputs.job_info;delete this.customInputs.file_url;delete this.customInputs.file_name}}),1e3);const e={...this.currentStreamingMessage,isStreaming:false};if(e&&e.answer){this.lastCompletedAnswer=e.answer}this.messages=[...this.messages,e];this.currentStreamingMessage=null;this.currentQuestionNumber++;if(this.isTaskCompleted||this.isEndingInterview){return}if(this.interviewMode==="video"){if(this.digitalId){this.waitingForDigitalHuman=true}else{this.startWaitingToRecord()}}}})}handleScroll=()=>{if(this.isUserScrolling){const e=this.hostElement.shadowRoot?.querySelector(".chat-history");if(!e)return;const{scrollTop:t,scrollHeight:o,clientHeight:i}=e;const n=o-t-i;this.shouldAutoScroll=n<=20}};handleTouchStart=()=>{this.isUserScrolling=true};handleTouchEnd=()=>{setTimeout((()=>{this.isUserScrolling=false}),100)};_wheelTimer=null;handleWheel=()=>{this.isUserScrolling=true;if(this._wheelTimer){clearTimeout(this._wheelTimer)}this._wheelTimer=setTimeout((()=>{this.isUserScrolling=false}),150)};scrollToBottom(){if(!this.shouldAutoScroll)return;const e=this.hostElement.shadowRoot?.querySelector(".chat-history");if(e&&this.isOpen){e.scrollTop=e.scrollHeight}}async loadHistoryMessages(){if(!this.conversationId)return;this.isLoadingHistory=true;let e=false;this.digitalHumanVideoReady=true;try{const t=await a({url:`/sdk/v1/chat/conversation`,method:"GET",data:{conversation_id:this.conversationId}});if(t.success&&t.data&&t.data.run_status=="结束"){e=true}const o=await a({url:"/sdk/v1/chat/messages",method:"GET",data:{conversation_id:this.conversationId,bot_id:this.botId,limit:20}});if(o.success&&o.data){const e=o.data.data||[];const t=e.map((e=>{const t=new Date(parseInt(e.created_at)*1e3);const o=t.getHours().toString().padStart(2,"0");const i=t.getMinutes().toString().padStart(2,"0");const n=`${o}:${i}`;return{id:e.id,conversation_id:e.conversation_id,inputs:e.inputs||{},query:e.query||"",answer:e.answer||"",message_files:e.message_files||[],feedback:e.feedback||{},retriever_resources:e.retriever_resources||[],created_at:e.created_at,agent_thoughts:e.agent_thoughts||[],status:e.status||"normal",error:e.error,time:n,isStreaming:false}}));this.messages=t;this.currentQuestionNumber=t.length||0}}catch(e){console.error("加载历史消息或会话状态失败:",e);I.captureError(e,{action:"loadHistoryMessages",component:"pcm-app-chat-modal",title:"加载历史消息失败"});C.emitError({error:e,message:"加载历史消息失败"})}finally{this.isLoadingHistory=false;setTimeout((async()=>{this.shouldAutoScroll=true;this.scrollToBottom();if(this.conversationId&&this.messages.length>0&&!e&&!this.isTaskCompleted&&!this.isEndingInterview){if(this.interviewMode==="video"){this.startWaitingToRecord()}}else if(e){this.isTaskCompleted=true}}),200)}}startWaitingToRecord(){if(this.interviewMode!=="video"){return}if(this.isTaskCompleted||this.isEndingInterview){return}if(this.waitingTimer){clearInterval(this.waitingTimer)}if(this.recordingTimer){clearInterval(this.recordingTimer)}this.waitingToRecord=true;this.waitingTimeLeft=this.waitingTime;this.waitingTimer=setInterval((()=>{this.waitingTimeLeft--;if(this.waitingTimeLeft<=0){clearInterval(this.waitingTimer);this.waitingTimer=null;this.waitingToRecord=false;this.startRecording()}}),1e3)}async startRecording(){if(this.isTaskCompleted||this.isEndingInterview){return}try{const e=await navigator.mediaDevices.getUserMedia({audio:true,video:{width:{ideal:1280},height:{ideal:720},frameRate:{ideal:30}}});this.deviceError=null;this.recordingStream=e;this.showRecordingUI=true;this.showCountdownWarning=false;this.videoRef=null;this.setupVideoPreview(e);const t=z();let o;try{o=new MediaRecorder(e,{mimeType:t,videoBitsPerSecond:8e5,audioBitsPerSecond:64e3})}catch(t){console.warn("指定的MIME类型不受支持,使用默认设置:",t);try{o=new MediaRecorder(e,{videoBitsPerSecond:8e5,audioBitsPerSecond:64e3})}catch(t){try{o=new MediaRecorder(e)}catch(e){this.recordingError.emit({type:"recorder_creation_failed",message:"无法创建媒体录制器,您的浏览器可能不支持此功能",details:e});this.showRecordingUI=false;return}}}this.mediaRecorder=o;const i=[];o.ondataavailable=e=>{if(e.data.size>0){i.push(e.data)}};o.onerror=e=>{this.recordingError.emit({type:"recording_error",message:this.strings?.errors?.recordingErrorText,details:e});this.stopRecording()};o.onstop=()=>{try{const e=t||"video/mp4";const o=new Blob(i,{type:e});if(o.size===0){this.recordingError.emit({type:"empty_recording",message:this.strings?.errors?.emptyVideo});this.showRecordingUI=false;return}this.recordedBlob=o;this.recordingStatusChange.emit({status:"stopped",details:{duration:Math.floor((Date.now()-this.recordingStartTime)/1e3),size:o.size,type:o.type}});this.uploadRecordedVideo()}catch(e){this.recordingError.emit({type:"processing_error",message:this.strings?.errors?.processVideoError,details:e});this.showRecordingUI=false;I.captureError(e,{action:"uploadRecordedVideo",component:"pcm-hr-chat-modal",title:"处理录制视频时出错"})}};try{o.start();this.isRecording=true;this.recordingStartTime=Date.now();this.recordingTimeLeft=this.maxRecordingTime;this.recordingStatusChange.emit({status:"started",details:{maxDuration:this.maxRecordingTime,mimeType:o.mimeType}})}catch(e){this.recordingError.emit({type:"start_failed",message:"开始录制失败,请检查您的设备权限",details:e});this.showRecordingUI=false;I.captureError(e,{action:"startRecording",component:"pcm-hr-chat-modal",title:"开始录制失败"});return}this.recordingTimer=setInterval((()=>{const e=Math.floor((Date.now()-this.recordingStartTime)/1e3);this.recordingTimeLeft=Math.max(0,this.maxRecordingTime-e);if(this.recordingTimeLeft<=this.countdownWarningTime&&!this.showCountdownWarning){this.showCountdownWarning=true}if(this.recordingTimeLeft<=0){this.stopRecording()}}),1e3)}catch(e){console.error("无法访问摄像头或麦克风:",e);let t=this.strings?.errors?.deviceAccessFailed;if(e.name==="NotAllowedError"){t=this.strings.errors.permissionDenied}else if(e.name==="NotFoundError"){t=this.strings.errors.deviceNotFound}else if(e.name==="NotReadableError"){t=this.strings.errors.browserNotSupportVideoRecording}else if(e.name==="OverconstrainedError"){t=this.strings.errors.unsupportedConfiguration}else{t=this.strings.errors.cameraOrMicAccessFailed}this.deviceError=t;this.showRecordingUI=false;C.emitError({error:e,message:t});I.captureError(e,{action:"startRecording",component:"pcm-app-chat-modal",title:t})}}setupVideoPreview(e){setTimeout((()=>{const t=this.hostElement.shadowRoot?.querySelector("video");if(t&&e){try{t.srcObject=e;t.play().catch((e=>{console.error("视频播放失败:",e);I.captureError(e,{action:"setupVideoPreview",component:"pcm-app-chat-modal",title:"视频播放失败"});C.emitError({error:e,message:"视频播放失败"})}))}catch(o){console.warn("设置srcObject失败,尝试替代方法:",o);try{const o=URL.createObjectURL(e);t.src=o;t.onended=()=>{URL.revokeObjectURL(o)}}catch(e){console.error("创建对象URL失败:",e);I.captureError(e,{action:"setupVideoPreview",component:"pcm-app-chat-modal",title:"创建对象URL失败"});C.emitError({error:e,message:"创建对象URL失败"})}}}else{console.warn("未找到视频元素或媒体流无效")}}),100)}stopRecording(){if(this.mediaRecorder&&this.isRecording){this.mediaRecorder.stop();this.isRecording=false;if(this.recordingTimer){clearInterval(this.recordingTimer);this.recordingTimer=null}if(this.recordingStream){this.recordingStream.getTracks().forEach((e=>e.stop()));this.recordingStream=null}this.videoRef=null}}handleStopRecording=()=>{if(this.skipConfirmThisInterview){this.stopRecording();return}this.showConfirmModal=true};handleSkipConfirmChange=e=>{const t=e.target;this.skipConfirmThisInterview=t.checked};handleConfirmModalCancel=()=>{this.showConfirmModal=false};handleConfirmModalOk=()=>{this.showConfirmModal=false;this.stopRecording()};handleConfirmModalCancelEvent=()=>{this.showConfirmModal=false};async uploadRecordedVideo(){if(!this.recordedBlob)return;try{this.isUploadingVideo=true;this.showRecordingUI=false;const e=this.recordedBlob.type.includes("webm")?"webm":"mp4";const t=`answer.${e}`;const o=new File([this.recordedBlob],t,{type:this.recordedBlob.type});const i=await m(o,{},{tags:["other"]});const n=await w(i.cos_key);if(this.isEndingInterview){await this.sendEndInterviewMessage()}else{this.sendMessageToAPI(n||this.strings?.messages?.nextQuestion,i.cos_key)}}catch(e){console.error("视频上传或处理错误:",e);this.isEndingInterview=false;I.captureError(e,{action:"uploadRecordedVideo",component:"pcm-app-chat-modal",title:"视频上传或处理失败"});C.emitError({error:e,message:"视频上传或处理失败"})}finally{this.isUploadingVideo=false;this.showRecordingUI=false;this.recordedBlob=null}}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.waitingTimer){clearInterval(this.waitingTimer);this.waitingTimer=null}if(this.recordingTimer){clearInterval(this.recordingTimer);this.recordingTimer=null}if(this.audioRecordingTimer){clearInterval(this.audioRecordingTimer);this.audioRecordingTimer=null}this.stopRecording();this.stopAudioRecording()}handleTextInputChange=e=>{const t=e.target;this.textAnswer=t.value};handleKeyDown=e=>{if(e.key==="Enter"){if(e.isComposing){return}if(e.ctrlKey){const t=e.target;const o=t.selectionStart;const i=this.textAnswer.substring(0,o);const n=this.textAnswer.substring(o);this.textAnswer=i+"\n"+n;e.preventDefault();setTimeout((()=>{const e=o+1;t.setSelectionRange(e,e)}),0);return}else{e.preventDefault();if(this.textAnswer.trim()&&!this.isSubmittingText&&!this.isLoading&&!this.currentStreamingMessage&&!this.waitingToRecord){this.submitTextAnswer()}}}};submitTextAnswer=async()=>{if(!this.textAnswer.trim()||this.isSubmittingText){return}this.isSubmittingText=true;try{const e=this.textAnswer;this.textAnswer="";await this.sendMessageToAPI(e)}catch(e){console.error("提交文本回答失败:",e);I.captureError(e,{action:"submitTextAnswer",component:"pcm-app-chat-modal",title:"提交文本回答失败"});C.emitError({error:e,message:"提交文本回答失败"})}finally{this.isSubmittingText=false}};closeResumeChat=async()=>{const e={query:this.strings?.messages?.generateResume,inputs:{mode_type:1,generate_resume:1}};this.isSubmittingText=true;try{this.customInputs=e.inputs;this.closeResume?.();await this.sendMessageToAPI(e.query)}catch(e){console.error("提交文本回答失败:",e);I.captureError(e,{action:"submitTextAnswer",component:"pcm-app-chat-modal",title:"提交文本回答失败"});C.emitError({error:e,message:"提交文本回答失败"})}finally{this.isSubmittingText=false;this.customInputs={}}};handleVoiceInputClick=()=>{if(this.isRecordingAudio){this.stopAudioRecording()}else{navigator.mediaDevices.getUserMedia({audio:true}).then((e=>{this.startRecordingWithStream(e)})).catch((e=>{console.error("麦克风权限请求失败:",e);I.captureError(e,{action:"handleVoiceInputClick",component:"pcm-app-chat-modal",title:"麦克风权限请求失败"});C.emitError({error:e,message:"麦克风权限请求失败"})}))}};startRecordingWithStream(e){try{const t=x();let o;try{o=new MediaRecorder(e,{mimeType:t})}catch(t){console.warn("指定的音频MIME类型不受支持,使用默认设置:",t);try{o=new MediaRecorder(e)}catch(t){e.getTracks().forEach((e=>e.stop()));console.error("无法创建音频录制器:",t);I.captureError(t,{action:"startRecordingWithStream",component:"pcm-app-chat-modal",title:"无法创建音频录制器"});C.emitError({error:t,message:"无法创建音频录制器"});return}}this.audioRecorder=o;this.audioChunks=[];this.isRecordingAudio=true;this.audioRecordingStartTime=Date.now();this.audioRecordingTimeLeft=this.maxAudioRecordingTime;o.ondataavailable=e=>{if(e.data.size>0){this.audioChunks.push(e.data)}};o.onstop=()=>{e.getTracks().forEach((e=>e.stop()));this.processAudioRecording()};o.start(100);this.audioRecordingTimer=setInterval((()=>{const e=Math.floor((Date.now()-this.audioRecordingStartTime)/1e3);this.audioRecordingTimeLeft=Math.max(0,this.maxAudioRecordingTime-e);if(this.audioRecordingTimeLeft<=0){this.stopAudioRecording()}}),1e3)}catch(t){e.getTracks().forEach((e=>e.stop()));console.error("开始录音失败:",t);I.captureError(t,{action:"startRecordingWithStream",component:"pcm-app-chat-modal",title:"开始录音失败"});C.emitError({error:t,message:"开始录音失败,请确保麦克风设备正常工作"})}}async processAudioRecording(){if(this.audioChunks.length===0){console.warn("没有录制到音频数据");return}try{this.isConvertingAudio=true;const e=x()||"audio/webm";const t=new Blob(this.audioChunks,{type:e});if(t.size===0){console.warn("录制的音频为空");this.isConvertingAudio=false;return}const o=e.includes("webm")?"webm":"mp3";const i=`audio_input.${o}`;const n=new File([t],i,{type:e});const r=await m(n,{},{tags:["audio"]});const a=await w(r.cos_key);if(a){const e=this.hostElement.shadowRoot?.querySelector(".text-answer-input");const t=e?.selectionStart||this.textAnswer.length;const o=this.textAnswer.substring(0,t);const i=this.textAnswer.substring(t);const n=o.length>0&&!o.endsWith(" ")?" ":"";this.textAnswer=o+n+a+i;setTimeout((()=>{if(e){const o=t+n.length+a.length;e.focus();e.setSelectionRange(o,o)}}),0)}else{console.warn("未能识别语音内容");alert("未能识别语音内容,请重试或直接输入文字")}}catch(e){console.error("处理音频录制失败:",e);I.captureError(e,{action:"processAudioRecording",component:"pcm-app-chat-modal",title:"处理音频录制失败"});C.emitError({error:e,message:"语音识别失败,请重试"})}finally{this.isConvertingAudio=false;this.audioChunks=[]}}stopAudioRecording(){if(this.audioRecorder&&this.isRecordingAudio){this.audioRecorder.stop();this.isRecordingAudio=false;if(this.audioRecordingTimer){clearInterval(this.audioRecordingTimer);this.audioRecordingTimer=null}}}handleHistoryClick=()=>{this.isHistoryDrawerOpen=true;this.loadHistoryConversations()};async loadHistoryConversations(){if(!this.botId){console.warn("没有提供botId,无法获取历史会话");return}this.isLoadingConversations=true;try{const e=await a({url:"/sdk/v1/chat/conversations",method:"GET",data:{bot_id:this.botId,limit:50,page:1}});if(e.success&&e.data){const t=e.data.data||[];this.historyConversations=t.map((e=>{let t;let o=this.strings?.unknownTime;try{const i=typeof e.created_at==="string"?parseInt(e.created_at):e.created_at;if(isNaN(i)||i<=0){console.warn("无效的时间戳:",e.created_at);t=new Date}else{t=new Date(i*1e3)}if(isNaN(t.getTime())){console.warn("无效的日期对象:",e.created_at);t=new Date}const n=new Date;const r=n.getTime()-t.getTime();const a=Math.floor(r/(1e3*60*60*24));if(a===0){o=`今天 ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(a===1){o=`昨天 ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(a>0&&a<7){const e=[this.strings?.weekdays?.sunday,this.strings?.weekdays?.monday,this.strings?.weekdays?.tuesday,this.strings?.weekdays?.wednesday,this.strings?.weekdays?.thursday,this.strings?.weekdays?.friday,this.strings?.weekdays?.saturday];o=`${e[t.getDay()]} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(a<0){o=`${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else{o=`${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}}catch(t){console.error("时间格式化错误:",t,e.created_at);o=this.strings?.timeParseError}return{id:e.id,name:e.name||this.strings?.newConversation,created_at:e.created_at,updated_at:e.updated_at,status:e.status,message_count:e.message_count||0,timeDisplay:o,inputs:e.inputs}}))}}catch(e){console.error("获取历史会话失败:",e);I.captureError(e,{action:"loadHistoryConversations",component:"pcm-app-chat-modal",title:"获取历史会话失败"});C.emitError({error:e,message:"获取历史会话失败"})}finally{this.isLoadingConversations=false}}handleSwitchConversation=e=>{const t=this.historyConversationSelect.emit(e);if(t.defaultPrevented){return}if(e.id===this.conversationId){this.isHistoryDrawerOpen=false;return}this.conversationId=e.id;this.messages=[];this.currentStreamingMessage=null;this.isTaskCompleted=false;this.currentQuestionNumber=0;this.isHistoryDrawerOpen=false;this.loadHistoryMessages()};handleFilePreviewRequest=e=>{const{url:t,fileName:o,content:i,contentType:n}=e.detail;this.previewFileName=o||this.strings?.contentPreview;this.previewContentType=n;this.previewUrl=t;this.previewContent=i||"";this.isDrawerOpen=true};isLastMessage(e){if(this.currentStreamingMessage){return false}if(this.messages.length===0){return false}const t=this.messages[this.messages.length-1];return e.id===t.id}handleDigitalHumanVideoGenerated=e=>{const{videoUrl:t}=e.detail;console.log("数字人视频生成成功:",{videoUrl:t,conversationId:this.conversationId,currentQuestionNumber:this.currentQuestionNumber});this.digitalHumanVideoReady=true};handleDigitalHumanVideoEnded=()=>{if(this.waitingForDigitalHuman&&this.interviewMode==="video"&&!this.isTaskCompleted&&!this.isEndingInterview){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}};async precreateDigitalHumanVideos(e){if(!this.virtualmanKey){console.warn("VirtualmanKey尚未加载,无法预创建视频。");return}for(const t of e){if(!t||!t.trim())continue;try{await a({url:"/sdk/v1/virtual-human/create-video",method:"POST",data:{VirtualmanKey:this.virtualmanKey,InputSsml:t,SpeechParam:{Speed:1},VideoParam:{Format:"TransparentWebm"},DriverType:"Text"}})}catch(e){console.error(`为文本 "${t}" 创建视频任务失败:`,e);I.captureError(e,{action:"precreateDigitalHumanVideos",component:"pcm-app-chat-modal",title:`为文本 "${t}" 创建视频任务失败`})}}}handleAvatarDetailLoaded=e=>{if(e.detail.virtualmanKey){this.virtualmanKey=e.detail.virtualmanKey}};handleInterviewEnd=()=>{if(this.isEndingInterview||this.isTaskCompleted){return}this.showEndInterviewConfirmModal=true};handleConfirmEndInterview=async()=>{try{this.showEndInterviewConfirmModal=false;this.isEndingInterview=true;if(this.waitingTimer){clearInterval(this.waitingTimer);this.waitingTimer=null}this.waitingToRecord=false;this.waitingForDigitalHuman=false;if(this.isRecording){this.stopRecording()}else{await this.sendEndInterviewMessage()}}catch(e){console.error("点击结束发送消息失败:",e);this.isEndingInterview=false;I.captureError(e,{action:"handleConfirmEndInterview",component:"pcm-app-chat-modal",title:"点击结束发送消息失败"});C.emitError({error:e,message:"点击结束发送消息失败"})}};sendEndInterviewMessage=async()=>{try{const e=this.strings?.messages?.endInterviewMessage;await this.sendMessageToAPI(e);this.isEndingInterview=false}catch(e){console.error("发送结束面试消息失败:",e);this.isEndingInterview=false;throw e}};handleCancelEndInterview=()=>{this.showEndInterviewConfirmModal=false};getAnsweredQuestionCount=()=>this.messages.filter((e=>e.answer&&e.answer.trim())).length;render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=()=>i("div",{class:"video-preview"},i("video",{autoPlay:true,playsInline:true,muted:true,style:{transform:"scaleX(-1)"},ref:e=>{if(e&&this.recordingStream&&!this.videoRef){this.videoRef=e}}}),i("div",{class:{"recording-status":true,warning:this.showCountdownWarning}},i("span",{class:"recording-dot"}),i("span",null,this.strings.recording.recordingInProgress," ",Math.floor(this.recordingTimeLeft/60),":",(this.recordingTimeLeft%60).toString().padStart(2,"0"),this.showCountdownWarning&&` (${this.strings.recording.autoCompleteWarning})`)));const a=()=>{if(this.deviceError){return i("div",{class:"placeholder-status error-status"},i("p",null,this.deviceError),i("div",{class:"error-suggestions"},i("p",null,this.strings.deviceError.trySolutions),i("ul",null,i("li",null,this.strings.deviceError.solution1),i("li",null,this.strings.deviceError.solution2),i("li",null,this.strings.deviceError.solution3))))}if(this.isTaskCompleted){return i("div",{class:"placeholder-status"},i("p",null,this.strings.placeholderStatus.interviewCompleted))}if(this.waitingForDigitalHuman&&this.digitalId){return i("div",{class:"placeholder-status"},i("p",null,this.strings?.placeholderStatus?.aiReviewing))}if(this.isPlayingAudio){return i("div",{class:"placeholder-status"},i("p",null,this.strings?.placeholderStatus?.playingQuestion))}if(this.isUploadingVideo){return i("div",{class:"placeholder-status"},i("p",null,this.strings?.placeholderStatus?.uploadingVideo))}if(this.isLoading||this.currentStreamingMessage){return i("div",{class:"placeholder-status"},i("p",null,this.strings?.placeholderStatus?.waitingForQuestion))}if(this.waitingToRecord){return i("div",{class:"placeholder-status"},i("p",null,(this.strings?.placeholderStatus?.prepareToRecord).replace("{time}",this.waitingTimeLeft.toString())))}return i("div",{class:"placeholder-status default-status"},i("p",null,this.strings?.placeholderStatus?.preparing))};const s=()=>i("div",{class:"text-input-area"},this.botId==="39284520284983296"&&i("button",{class:{"cancel-button":true,disabled:this.messages.length<=3},disabled:this.messages.length<=3,onClick:this.closeResumeChat},this.strings?.buttons?.endChatGenerateResume),this.botId==="45444431062634496"&&i("button",{class:{"cancel-button":true,disabled:this.isLoading},disabled:this.isLoading,onClick:()=>this.closeResume?.(),title:this.strings?.resumeCreation},this.strings?.resumeCreation),i("textarea",{class:"text-answer-input",placeholder:this.isTaskCompleted?this.strings.conversationEnded:this.strings.sendMessage,value:this.textAnswer,onInput:this.handleTextInputChange,onKeyDown:this.handleKeyDown,disabled:this.isTaskCompleted||this.isRecordingAudio||this.isConvertingAudio}),i("div",{class:"input-toolbar"},i("div",{class:"toolbar-actions"},i("button",{class:{"toolbar-button":true,recording:this.isRecordingAudio,converting:this.isConvertingAudio},title:this.isRecordingAudio?this.strings.clickToStopRecording:this.isConvertingAudio?this.strings.recognizingSpeech:this.strings.voiceInput,onClick:this.handleVoiceInputClick,disabled:this.isTaskCompleted||this.isConvertingAudio||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.waitingToRecord||this.isPlayingAudio},this.isRecordingAudio?i("div",null,i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}),i("circle",{cx:"12",cy:"11",r:"4",fill:"red"}))):this.isConvertingAudio?i("div",{class:"converting-indicator"},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}))):i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"})))),i("div",{class:{"send-button":true,disabled:this.isTaskCompleted||!this.textAnswer.trim()||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.waitingToRecord||this.isPlayingAudio||this.isRecordingAudio||this.isConvertingAudio},onClick:()=>{if(this.isTaskCompleted||!this.textAnswer.trim()||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.waitingToRecord||this.isPlayingAudio||this.isRecordingAudio||this.isConvertingAudio){return}this.submitTextAnswer()}},i("img",{src:"https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/i_send.png"}))));const l=this.assistantAvatar||this.agentLogo;return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon"}),i("div",{class:"header-title-group"},i("div",null,this.modalTitle),i("div",{class:"header-disclaimer"},this.strings?.aiDisclaimer))),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),i("div",{class:"chat-container"},i("div",{class:"chat-history",onScroll:this.handleScroll,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onWheel:this.handleWheel},this.isLoadingHistory?i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",null,this.strings?.loading?.loadingHistory)):i("div",null,[...this.messages,...this.currentStreamingMessage?[this.currentStreamingMessage]:[]].map((e=>i("div",{id:`message_${e.id}`,key:e.id},i("components-chat-message",{locale:this.locale,botId:this.botId,message:e,showAssistantMessage:!this.digitalId||!this.isLastMessage(e)||this.digitalHumanVideoReady||this.isTaskCompleted,userAvatar:this.userAvatar,assistantAvatar:l,showCopyButton:this.showCopyButton,showFeedbackButtons:this.showFeedbackButtons,filePreviewMode:this.filePreviewMode,onFilePreviewRequest:this.handleFilePreviewRequest,showSaveJdButton:this.showSaveJdButton,saveJdButtonText:this.saveJdButtonText})))),this.showNodeStatus&&this.isLoading&&this.currentStreamingMessage&&!this.currentStreamingMessage.answer&&this.currentNodeTitle&&i("div",{class:"node-status",role:"status","aria-live":"polite","aria-atomic":"true"},i("span",{class:"node-status-spinner","aria-hidden":"true"}),i("span",{class:"node-status-text"},this.currentNodeTitle)),this.messages.length===0&&!this.currentStreamingMessage&&i("div",{class:"empty-state"},i("p",null,this.strings?.welcome?.greeting)))),i("div",{class:"recording-section"},i("div",{class:"recording-container"},(this.showWorkspaceHistory||this.digitalId||this.showEndInterviewButton&&!this.isTaskCompleted&&this.conversationId)&&i("div",{class:"workspace-section"},i("div",{class:"workspace-toolbar"},i("div",{style:{display:"flex",gap:"8px"}},!this.isTaskCompleted&&this.conversationId&&this.showEndInterviewButton&&i("button",{class:"workspace-button end-interview-button",onClick:this.handleInterviewEnd,disabled:this.isLoading||this.isEndingInterview,title:this.isEndingInterview?this.strings?.endingInterview:this.strings?.endInterview},i("span",null,this.isEndingInterview?this.strings?.ending:this.strings?.endInterview)),this.showWorkspaceHistory&&i("button",{class:"workspace-button history-button",onClick:()=>this.handleHistoryClick()},i("span",null,this.strings?.historyConversations))),this.digitalId&&!this.isTaskCompleted&&i("div",{class:"digital-human-wrapper"},i("components-digital-human",{digitalId:this.digitalId,speechText:this.lastCompletedAnswer,isStreaming:!!this.currentStreamingMessage,playbackRate:this.playbackRate,onVideoGenerated:this.handleDigitalHumanVideoGenerated,onVideoEnded:this.handleDigitalHumanVideoEnded,onAvatarDetailLoaded:this.handleAvatarDetailLoaded})))),this.interviewMode==="text"&&(this.showChatInput?s():i("div",{class:"chat-readonly-hint",role:"status"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"1.5","aria-hidden":"true"},i("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z"}),i("path",{d:"M14 2v6h6M8 13h8M8 17h6"})),i("span",null,"当前为只读模式,可继续查看对话内容"))),this.interviewMode==="video"&&i("div",{class:"video-container"},i("div",{class:"video-area"},this.showRecordingUI?n():i("div",{class:"video-preview placeholder"},a())),i("div",{class:"recording-controls"},this.showRecordingUI?i("button",{class:"stop-recording-button",onClick:()=>this.handleStopRecording()},this.strings?.buttons?.completeAnswer):i("div",{class:"waiting-message"},i("button",{class:"stop-recording-button disabled",disabled:true},this.strings?.buttons?.completeAnswerShort))))))),i("components-drawer",{isOpen:this.isDrawerOpen,drawerTitle:this.previewFileName,width:"80%",onClosed:()=>{this.isDrawerOpen=false;this.previewUrl="";this.previewContent=""}},this.previewContentType==="file"&&this.previewUrl&&i("div",{class:"file-preview-container"},i("iframe",{src:this.previewUrl,frameborder:"0",width:"100%",height:"100%",style:{border:"none",height:"calc(100vh - 120px)"}})),this.previewContentType==="markdown"&&this.previewContent&&i("div",{class:"markdown-preview-container markdown-body",innerHTML:r(this.previewContent)}),this.previewContentType==="text"&&this.previewContent&&i("div",{class:"text-preview-container"},i("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word"}},this.previewContent))),i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:this.strings?.historyConversations,width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,this.strings.history.loading)):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,this.strings.history.noHistory)):this.historyConversations.map((e=>i("div",{key:e.id,class:{"conversation-item":true,active:e.id===this.conversationId},onClick:()=>this.handleSwitchConversation(e)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},e.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&i("span",{class:"message-count"},e.message_count,"条消息"),e.status&&i("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))),e.id===this.conversationId&&i("div",{class:"current-indicator"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))))))))),i("components-confirm-modal",{isOpen:this.showConfirmModal,modalTitle:this.strings?.confirmComplete,okText:this.strings?.confirmComplete,cancelText:this.strings?.continueRecording,okType:"danger",onOk:this.handleConfirmModalOk,onCancel:this.handleConfirmModalCancelEvent,onClosed:this.handleConfirmModalCancel},i("div",{style:{marginBottom:"16px"}},i("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},this.strings.recording.currentRecordingTime,(()=>{const e=this.recordingStartTime>0?Math.floor((Date.now()-this.recordingStartTime)/1e3):0;const t=Math.floor(e/60);const o=e%60;return`${t.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`})()),i("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 16px",background:"#fff7e6",border:"1px solid #ffec99",borderRadius:"6px",color:"#d46b08",fontSize:"14px",marginBottom:"16px"}},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,this.strings.recording.recordingStillInProgress)),i("div",{style:{fontSize:"16px",color:"#595959",lineHeight:"1.5",marginBottom:"16px"}},this.strings.clickConfirmCompleteToEnd),i("label",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",padding:"8px 0",userSelect:"none"}},i("input",{type:"checkbox",style:{width:"16px",height:"16px",accentColor:"#1890ff",cursor:"pointer",margin:"0"},checked:this.skipConfirmThisInterview,onChange:this.handleSkipConfirmChange}),i("span",{style:{fontSize:"14px",color:"#595959",cursor:"pointer",lineHeight:"1.4"}},this.strings.confirm.noReminderThisInterview)))),i("components-confirm-modal",{isOpen:this.showEndInterviewConfirmModal,modalTitle:this.strings?.confirmEnd,okText:this.strings?.confirmEnd,cancelText:this.strings?.cancel,okType:"danger",onOk:this.handleConfirmEndInterview,onCancel:this.handleCancelEndInterview,onClosed:this.handleCancelEndInterview},i("div",{style:{marginBottom:"16px"}},(()=>{const e=this.getAnsweredQuestionCount();return i("div",null,i("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},this.strings.confirm.currentQuestion.replace("{count}",e.toString())),e<3&&i("div",{style:{display:"flex",alignItems:"flex-start",gap:"8px",padding:"12px 16px",background:"#fff2e8",border:"1px solid #ffbb96",borderRadius:"6px",color:"#d4380d",fontSize:"14px",marginBottom:"16px"}},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",style:{flexShrink:"0",marginTop:"2px"}},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,i("strong",null,this.strings.confirm.fewQuestionsWarning),this.strings.confirm.fewQuestionsWarningText)),i("div",{style:{fontSize:"14px",color:"#595959",lineHeight:"1.6",textAlign:"center"}},this.strings.confirm.endInterviewConfirm))})()))))}static get watchers(){return{currentNodeTitle:["handleNodeTitleChange"],token:["handleTokenChange"]}}};Po.style=Ho+(Ao+Lo);const qo="";const $o='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Uo=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const No=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.recordingError=t(this,"recordingError")}modalTitle="模拟面试";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始模拟面试";maxRecordingTime=120;waitingTime=10;fullscreen=false;customInputs={};digitalId;openingIndex=0;enableVirtualHuman=false;showEndInterviewButton=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;recordingError;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return o(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{await f(this.token);this.showChatModal=true}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}resetState(){this.showChatModal=false;this.jobDescription="";this.isSubmitting=false;this.selectedFile=null;this.isUploading=false;this.uploadedFileInfo=null}handleClose=()=>{this.modalClosed.emit()};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.enableVirtualHuman&&this.digitalId?i("pcm-virtual-chat-modal",{ref:e=>this.virtualChatModalRef=e,isOpen:true,fullscreen:this.fullscreen,botId:"137635156700770304",digitalId:this.digitalId,openingIndex:this.openingIndex,conversationId:this.conversationId,defaultQuery:this.defaultQuery,showEndInterviewButton:this.showEndInterviewButton,waitingTime:this.waitingTime,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,interview_type:"1"}}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,botId:"137635156700770304",digitalId:this.digitalId,showEndInterviewButton:this.showEndInterviewButton,conversationId:this.conversationId,defaultQuery:this.defaultQuery,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,customInputs:{...this.customInputs,file_url:this.uploadedFileInfo?.cos_key,file_name:this.uploadedFileInfo?.file_name},interviewMode:"video"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};No.style=qo+($o+Uo);const Vo=":host{display:inline-block}.pcm-button{display:inline-flex;align-items:center;justify-content:center;font-weight:400;white-space:nowrap;text-align:center;background-image:none;border:1px solid transparent;cursor:pointer;transition:all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);user-select:none;touch-action:manipulation;height:32px;padding:0 15px;font-size:14px;border-radius:4px;color:rgba(0, 0, 0, 0.85);background-color:white;border-color:#d9d9d9;outline:none}.pcm-button:hover{border-color:#40a9ff;color:#40a9ff}.pcm-button:active{border-color:#096dd9;color:#096dd9}.pcm-button-default{background-color:white;border-color:#d9d9d9;color:rgba(0, 0, 0, 0.85)}.pcm-button-primary{background-color:#1677FF;border-color:#1677FF;color:white}.pcm-button-primary:hover{background-color:#40a9ff;border-color:#40a9ff;color:white}.pcm-button-primary:active{background-color:#096dd9;border-color:#096dd9;color:white}.pcm-button-dashed{background-color:white;border-color:#d9d9d9;border-style:dashed}.pcm-button-text{background-color:transparent;border-color:transparent;color:rgba(0, 0, 0, 0.85);box-shadow:none}.pcm-button-text:hover{background-color:rgba(0, 0, 0, 0.05);border-color:transparent;color:rgba(0, 0, 0, 0.85)}.pcm-button-link{background-color:transparent;border-color:transparent;color:#1677FF;box-shadow:none}.pcm-button-link:hover{color:#40a9ff;background-color:transparent;border-color:transparent}.pcm-button-large{height:40px;padding:0 20px;font-size:16px}.pcm-button-small{height:24px;padding:0 7px;font-size:12px}.pcm-button-circle{min-width:32px;padding:0;border-radius:50%}.pcm-button-large.pcm-button-circle{min-width:40px}.pcm-button-small.pcm-button-circle{min-width:24px}.pcm-button-round{border-radius:40px}.pcm-button-loading{opacity:0.65;cursor:default}.loading-icon{width:14px;height:14px;margin-right:8px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:loading-spin 1s infinite linear;display:inline-block}@keyframes loading-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.pcm-button-disabled{cursor:not-allowed;opacity:0.65}.pcm-button-disabled:hover,.pcm-button-disabled:active{color:rgba(0, 0, 0, 0.25);background-color:#f5f5f5;border-color:#d9d9d9}.pcm-button-primary.pcm-button-disabled:hover,.pcm-button-primary.pcm-button-disabled:active{background-color:#1677FF;border-color:#1677FF;color:white}.button-icon{margin-right:8px;display:inline-flex;align-items:center}.button-icon img{width:16px;height:16px}.pcm-button-small .button-icon img{width:12px;height:12px}.pcm-button-large .button-icon img{width:18px;height:18px}.pcm-button-block{width:100%;display:flex}";const Wo=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Jo=class{constructor(t){e(this,t)}type="default";size="middle";loading=false;disabled=false;icon="https://pub.pincaimao.com/static/common/i_pcm_logo.png";shape="default";backgroundColor="";textColor="";borderColor="";borderRadius=null;width="";block=false;borderStyle="solid";render(){const e={"pcm-button":true,[`pcm-button-${this.type}`]:true,[`pcm-button-${this.size}`]:true,[`pcm-button-${this.shape}`]:true,"pcm-button-loading":this.loading,"pcm-button-disabled":this.disabled,"pcm-button-block":this.block};const t={};if(this.backgroundColor){t["backgroundColor"]=this.backgroundColor}if(this.textColor){t["color"]=this.textColor}if(this.borderColor){t["borderColor"]=this.borderColor}if(this.borderRadius!==null){t["borderRadius"]=`${this.borderRadius}px`}if(this.width){t["width"]=this.width}if(this.borderStyle){t["borderStyle"]=this.borderStyle}return i("button",{key:"0472468b868ca662e5a746caca553b1a98ea7ad2",class:Object.keys(e).filter((t=>e[t])).join(" "),style:t,disabled:this.disabled,type:"button"},this.loading&&i("span",{key:"592b93e881b07ea98399f3a342faebb0816e5133",class:"loading-icon"}),this.icon&&!this.loading&&i("span",{key:"123c3262837c197f57e9609e5d65018c4ab5fb2d",class:"button-icon"},i("img",{key:"db9222099784d828fc61b526a5341732d1857217",src:this.icon,alt:""})),i("slot",{key:"2a6b3f204af9a359fbda1b729bfee68f0eb45406"}))}};Jo.style=Vo+Wo;const Qo=":host{display:block}.loading-container,.error-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;width:100%;color:#86909C;font-size:14px;text-align:center}.loading-spinner{width:32px;height:32px;border:3px solid #f3f3f3;border-top:3px solid #1677FF;border-radius:50%;margin-bottom:12px;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.error-icon{width:32px;height:32px;background-color:#FFF0F0;color:#F53F3F;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:bold;margin-bottom:12px}.error-message{color:#86909C;max-width:80%}.card-container{border-radius:8px;padding:16px;cursor:pointer;transition:all 0.2s ease;display:flex;flex-direction:column;background-color:#ffffff;border:1px solid #E5E6EB;position:relative;height:100%;min-width:300px}.card-container:hover{transform:translateY(-2px);box-shadow:0 4px 16px rgba(0, 21, 41, 0.08)}.card-header{display:flex;width:100%;padding-bottom:16px;gap:12px}.card-icon{width:64px;height:64px;margin-right:12px;flex-shrink:0;overflow:hidden;border-radius:2px;background-color:#f8f9fa}.card-icon img{width:100%;height:100%;object-fit:contain}.card-info{flex:1;display:flex;flex-direction:column;overflow:hidden}.title-row{display:flex;align-items:center}.title-wrapper{flex:1;margin-right:8px;overflow:hidden}.card-title{font-size:18px;font-weight:700;color:#1D2129;line-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%}.chat-tag{display:flex;align-items:center;justify-content:center;height:24px;padding:0 8px;background-color:#F2F7E8;color:#56961F;font-size:12px;border-radius:4px;font-weight:500;flex-shrink:0}.author-row{display:flex;align-items:center;margin-top:8px}.author-avatar{width:16px;height:16px;border-radius:50%;margin-right:4px;background-color:#f8f9fa;overflow:hidden}.author-name{font-size:12px;color:#86909C}.card-description{font-size:12px;color:#86909C;margin-top:8px;line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:pre-line;word-break:break-word}.card-footer{padding-top:16px;display:flex;justify-content:space-between;align-items:center;border-top:1px solid #E5E6EB}.stats-container{display:flex;align-items:center;flex:1}.stat-item{display:flex;align-items:center;margin-right:8px;color:#86909C}.stat-icon{width:16px;height:16px;margin-right:4px;background-repeat:no-repeat;background-position:center;background-size:contain}.user-icon{background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' focusable='false' aria-hidden='true'%3E%3Cpath d='M12 14c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6Zm0-10C9.8 4 8 5.8 8 8s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4Z' fill='currentColor'%3E%3C/path%3E%3Cpath d='M21.9 20.6c-.1-.2-2.3-5.6-9.9-5.6-7.6 0-9.8 5.4-9.9 5.6-.2.5 0 1.1.6 1.3.5.2 1.1 0 1.3-.5 0-.2 1.8-4.4 8-4.4s8 4.2 8.1 4.4c.2.5.8.8 1.3.5.5-.2.7-.8.5-1.3Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.star-icon{background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' focusable='false' aria-hidden='true'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 5.03 9.57 9.1c-.17.3-.46.5-.8.55l-4.3.79 3 3.46c.22.26.32.6.28.93l-.62 4.46 4.41-1.9c.3-.12.63-.12.92 0l4.4 1.9-.6-4.46c-.05-.34.05-.67.27-.93l3-3.46-4.3-.79a1.17 1.17 0 0 1-.8-.55L12 5.03Zm-1-2.46a1.16 1.16 0 0 1 2 0l3.03 5.07 5.51 1c.89.17 1.26 1.24.68 1.92l-3.8 4.4.77 5.71c.13.9-.78 1.6-1.61 1.23L12 19.5l-5.58 2.4a1.17 1.17 0 0 1-1.61-1.23l.78-5.7-3.8-4.4a1.17 1.17 0 0 1 .67-1.92l5.51-1L11 2.56Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.video-icon{background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' focusable='false' aria-hidden='true'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 2a2 2 0 0 0-2 2v16c0 1.1.9 2 2 2h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4Zm0 2h16v16H4V4Zm5.5 3.13A1 1 0 0 0 8 8v8a1 1 0 0 0 1.5.87l7-4a1 1 0 0 0 0-1.74l-7-4ZM13.98 12 10 14.28V9.72L13.98 12Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.stat-value{font-size:12px}.use-button{font-size:12px;color:#86909C;cursor:pointer;white-space:nowrap}.use-button:hover{color:#1677FF}@media screen and (max-width: 768px){.card-container{padding:12px}.card-header{gap:8px;padding-bottom:12px}.card-icon{width:48px;height:48px}.card-title{font-size:16px;line-height:20px}.card-description{font-size:12px;line-height:16px;height:48px}}";const Yo=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Go=class{constructor(o){e(this,o);this.tokenInvalid=t(this,"tokenInvalid")}token;cardTitle="";description="";iconUrl="";author="";authorAvatarUrl="";showChatTag=false;customChatTag="";useButtonText="立即使用";botId="";botData=null;loading=false;error="";tokenInvalid;tokenInvalidListener;watchBotIdHandler(e){if(e){this.fetchBotData()}}handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}componentWillLoad(){if(this.token){h.setToken(this.token)}if(this.botId){this.fetchBotData()}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener)}async fetchBotData(){if(!this.botId)return;this.loading=true;this.error="";try{const e=await a({url:`/sdk/v1/agent/${this.botId}/info`,method:"GET"});if(e.success&&e.data){this.botData=e.data}else{throw new Error(e.message||"获取智能体信息失败")}}catch(e){this.error=e.message||"获取智能体信息失败";console.error("获取智能体信息失败:",e)}finally{this.loading=false}}render(){const e=this.cardTitle||(this.botData?.title||"");const t=this.description||(this.botData?.description||"");const o=this.botData?.icon||this.botData?.iconUrl||this.botData?.logo||"";const n=this.iconUrl||o;const r=this.author||(this.botData?.author_name||"");const a=this.authorAvatarUrl||(this.botData?.author_avatar||"");const s=this.customChatTag||(this.botData?.flag||"");const l=this.botData?.use_count||0;const d=this.botData?.follow_count||0;const c=this.botData?.view_count||0;console.log("渲染数据:",{title:e,icon:n,iconFromBot:o,userIconUrl:this.iconUrl,botData:this.botData,authorName:r,authorAvatar:a});return i("div",{key:"147282e742cb8b47127e426f40c4f1fb99288ed6",class:"card-container"},this.loading?i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("div",null,"加载中...")):this.error?i("div",{class:"error-container"},i("div",{class:"error-icon"},"!"),i("div",{class:"error-message"},this.error)):i("div",null,i("div",{class:"card-header"},n&&i("div",{class:"card-icon"},i("img",{src:n,alt:e})),i("div",{class:"card-info"},i("div",{class:"title-row"},i("div",{class:"title-wrapper"},i("div",{class:"card-title"},e)),this.showChatTag&&s&&i("div",{class:"chat-tag"},s)),r&&i("div",{class:"author-row"},a&&i("img",{class:"author-avatar",src:a,alt:r}),i("div",{class:"author-name"},r)),t&&i("div",{class:"card-description"},t))),i("div",{class:"card-footer"},i("div",{class:"stats-container"},i("div",{class:"stat-item"},i("span",{class:"stat-icon user-icon"}),i("div",{class:"stat-value"},l)),i("div",{class:"stat-item"},i("span",{class:"stat-icon star-icon"}),i("div",{class:"stat-value"},d)),i("div",{class:"stat-item"},i("span",{class:"stat-icon video-icon"}),i("div",{class:"stat-value"},c))),i("div",{class:"use-button"},this.useButtonText||"立即使用"))))}static get watchers(){return{botId:["watchBotIdHandler"],token:["handleTokenChange"]}}};Go.style=Qo+Yo;const Xo=".input-mode-toggle{display:flex;align-items:center;margin-bottom:16px}.input-mode-toggle span{color:#333;margin-right:12px}.toggle-button{display:flex;align-items:center;background:none;border:none;color:#2E6EDF;cursor:pointer;font-size:14px;padding:4px 8px}.toggle-button svg{margin-right:4px}.free-input{width:100%}.textarea-container{margin-bottom:16px}.textarea-container label{display:block;margin-bottom:8px;font-weight:500;color:#333}.textarea-container textarea{border:1px solid #ddd;border-radius:4px;font-size:14px;resize:vertical;background-color:#f9f9f9;min-height:150px;width:100%;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.textarea-container textarea:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.required{color:#f56c6c}.input-guide{background-color:#f5f7fa;border-radius:4px;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.guide-title{font-weight:500;color:#333;margin-bottom:8px}.guide-content{color:#666;font-size:13px;max-width:100%;word-wrap:break-word}.guide-content div{margin-bottom:4px}";const Ko='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Zo=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const ei=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="劳动合同卫士";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始分析";fullscreen=false;customInputs={};showWorkspaceHistory=false;showChatInput=true;showNodeStatus=true;showInputHistory=false;mobileUploadAble=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";isUploading=false;uploadedFileInfo=null;showChatModal=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return o(this)}isSubmitting=false;inputMode="upload";freeInputText="";tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;pcmUploadRef;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(e,t)=>{this.isLoadingConversations=true;const o=await T("3022316191018882","pcm-htws-modal",e,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,t+1);if(o.hasMore&&o.nextCursor){i[t+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=t;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async e=>{if(e==="prev"){if(this.historyConversationPageIndex===0){return}const e=this.historyConversationPageIndex-1;const t=this.historyConversationCursorStack[e]||"";await this.loadHistoryConversations(t,e);return}if(!this.hasMoreHistoryConversations){return}const t=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[t];if(!o){return}await this.loadHistoryConversations(o,t)};handleSelectConversation=e=>{this.conversationId=e;this.isHistoryDrawerOpen=false;this.showChatModal=true};handleToggleInput=()=>{this.inputMode=this.inputMode==="upload"?"free":"upload"};handleFreeInputChange=e=>{const t=e.target;this.freeInputText=t.value};handleStartInterview=async()=>{if(this.inputMode==="upload"&&!this.uploadedFileInfo?.length){j.info("请上传合同文件");return}if(this.inputMode==="free"&&!this.freeInputText.trim()){j.info("请输入合同内容");return}if(this.inputMode==="upload"&&await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.freeInputText="";this.inputMode="upload"}else{if(this.customInputs&&this.customInputs.input){this.inputMode="free";this.freeInputText=this.customInputs.input}await f(this.token);if(this.conversationId){this.showChatModal=true}}}render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((e=>i("div",{key:e.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(e.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},e.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&i("span",{class:"message-count"},e.message_count,"条消息"),e.status&&i("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&i("div",{class:"input-container"},i("div",{class:"input-mode-toggle"},i("span",null,"合同内容"),i("button",{class:"toggle-button",onClick:this.handleToggleInput},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})),"切换输入")),this.inputMode==="upload"&&i("div",{class:"resume-upload-section"},i("components-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:25*1024*1024,multiple:true,maxFileCount:5,mobileUploadAble:this.mobileUploadAble,uploadText:"点击上传合同",acceptFileSuffixList:[".pdf",".doc",".docx",".jpg",".jpeg",".png"],uploadParams:{tags:["other"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t;this.uploadSuccess.emit(this.uploadedFileInfo)}})),this.inputMode==="free"&&i("div",{class:"free-input"},!!this.mobileUploadAble&&i("components-mobile-input-btn",{name:"合同内容",onOk:e=>{this.freeInputText=e.detail}}),i("div",{class:"textarea-container"},i("textarea",{id:"free-input-text",placeholder:"请输入合同内容",rows:8,value:this.freeInputText,onInput:this.handleFreeInputChange})),i("div",{class:"input-guide"},i("div",{class:"guide-title"},"输入提示:"),i("div",{class:"guide-content"},i("div",null,"• 请输入完整的劳动合同内容"),i("div",null,"• 包括甲方(公司)、乙方(员工)信息"),i("div",null,"• 合同期限、工作内容、工作地点"),i("div",null,"• 工作时间、休息休假、劳动报酬"),i("div",null,"• 社会保险、劳动保护、劳动条件"),i("div",null,"• 合同变更、解除和终止条件等")))),i("button",{class:"submit-button",disabled:this.inputMode==="upload"&&!this.uploadedFileInfo?.length||this.inputMode==="free"&&!this.freeInputText.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,showChatInput:this.showChatInput,showNodeStatus:this.showNodeStatus,botId:"3022316191018882",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.inputMode==="upload"?this.uploadedFileInfo?.map?.((e=>e.cos_key))?.join(","):undefined,file_name:this.uploadedFileInfo?.map?.((e=>e.file_name))?.join(","),input:this.inputMode==="free"?this.freeInputText:undefined},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};ei.style=Xo+(Ko+Zo);const ti="";const oi='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const ii=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const ni=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="会议总结助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始总结";fullscreen=false;customInputs={};showWorkspaceHistory=false;showChatInput=true;showInputHistory=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return o(this)}isSubmitting=false;tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){this.clearSelectedFile();this.showChatModal=false}else{await f(this.token);if(this.conversationId||this.customInputs?.file_url){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(e,t)=>{this.isLoadingConversations=true;const o=await T("3022316191018885","pcm-hyzj-modal",e,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,t+1);if(o.hasMore&&o.nextCursor){i[t+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=t;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async e=>{if(e==="prev"){if(this.historyConversationPageIndex===0){return}const e=this.historyConversationPageIndex-1;const t=this.historyConversationCursorStack[e]||"";await this.loadHistoryConversations(t,e);return}if(!this.hasMoreHistoryConversations){return}const t=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[t];if(!o){return}await this.loadHistoryConversations(o,t)};handleSelectConversation=e=>{this.conversationId=e;this.isHistoryDrawerOpen=false;this.showChatModal=true};handleFileChange=e=>{const t=e.target;if(t.files&&t.files.length>0){this.selectedFile=t.files[0]}};handleUploadClick=()=>{const e=this.hostElement.shadowRoot?.querySelector(".file-input");e?.click()};clearSelectedFile=()=>{this.selectedFile=null;this.uploadedFileInfo=null;const e=this.hostElement.shadowRoot?.querySelector(".file-input");if(e){e.value=""}};async uploadFile(){if(!this.selectedFile)return;this.isUploading=true;try{const e=await m(this.selectedFile,{},{tags:["other"]});this.uploadedFileInfo=e;this.uploadSuccess.emit(e)}catch(e){console.error("文件上传错误:",e);this.clearSelectedFile();I.captureError(e,{action:"uploadFile",component:"pcm-hyzj-modal",title:"文件上传失败"});this.someErrorEvent.emit({error:e,message:"文件上传失败,请重试"})}finally{this.isUploading=false}}handleStartInterview=async()=>{if(!this.selectedFile){alert("请上传面试内容");return}this.isSubmitting=true;try{if(!this.uploadedFileInfo){await this.uploadFile();if(!this.uploadedFileInfo){this.isSubmitting=false;return}}this.showChatModal=true}catch(e){console.error("开始面试时出错:",e);I.captureError(e,{action:"handleStartInterview",component:"pcm-hyzj-modal",title:"开始面试时出错"});this.someErrorEvent.emit({error:e,message:"开始面试时出错,请重试"})}finally{this.isSubmitting=false}};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.file_url);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((e=>i("div",{key:e.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(e.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},e.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&i("span",{class:"message-count"},e.message_count,"条消息"),e.status&&i("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&!r&&i("div",{class:"input-container"},i("div",{class:"resume-upload-section"},i("label",null,"上传会议纪要"),i("div",{class:"upload-area",onClick:this.handleUploadClick},this.selectedFile?i("div",{class:"file-item"},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name"},this.selectedFile.name)),i("button",{class:"remove-file",onClick:e=>{e.stopPropagation();this.clearSelectedFile()}},"×")):i("div",{class:"upload-placeholder"},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),i("p",{class:"upload-text"},"点击上传会议纪要"),i("p",{class:"upload-hint"},"支持 mp3、markdown、pdf、docx、doc、md 格式")))),i("button",{class:"submit-button",disabled:!this.selectedFile||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003"))),i("input",{type:"file",class:"file-input",onChange:this.handleFileChange})),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,showChatInput:this.showChatInput,botId:"3022316191018885",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};ni.style=ti+(oi+ii);const ri="职位生成";const ai="职位需求信息";const si="切换输入";const li="职位名称";const di="请输入职位名称";const ci="*";const pi="下一步";const hi="上一步";const fi="生成JD";const ui="处理中...";const gi="AI 正在分析职位信息";const mi="请稍候...";const bi="AI 推荐标签";const xi="月薪范围";const wi="福利待遇";const yi="学历要求";const vi="JD信息";const ki="请按照下方提示格式输入职位需求信息";const zi="输入格式参考:";const Ci={jobTitle:"• 职位名称 - 明确定义职位的名称",salary:"• 薪资范围 - 明确该岗位的月薪或年薪",benefits:"• 福利待遇 - 该职位的福利待遇,如:五险一金、年休假、下午茶等",responsibilities:"• 工作职责 - 描述工作内容",qualifications:"• 任职资格 - 包括学历、经验和技术要求",location:"• 工作地点与性质 - 全职/兼职、远程/办公室"};const Ii="所有内容均由AI生成仅供参考";const ji="中央网信办生成式人工智能服务备案号";const Si="Hunan-PinCaiMao-202412310003";const _i="正在加载对话...";const Ti={"3k_5k":"3k-5k","5k_8k":"5k-8k","8k_12k":"8k-12k","12k_15k":"12k-15k","15k_20k":"15k-20k",above_20k:"20k以上"};const Fi={insurance:"五险一金",bonus:"年终奖",paidLeave:"带薪年假",overtimePay:"加班补贴",mealAllowance:"餐补",transportAllowance:"交通补贴",holidayBenefits:"节日福利",teamBuilding:"团队建设"};const Ei={college:"大专",bachelor:"本科",master:"硕士",doctor:"博士",noLimit:"学历不限"};const Mi="历史会话";const Di={loading:"加载中...",noHistory:"暂无历史会话"};const Bi={enterJobName:"请输入职位名称",enterJobInfo:"请输入职位需求信息"};const Ri={jobName:"职位名称",salaryRange:"薪资范围",benefits:"福利待遇",education:"学历要求"};var Oi={modalTitle:ri,jobRequirementInfo:ai,toggleInput:si,jobName:li,jobNamePlaceholder:di,required:ci,nextStep:pi,prevStep:hi,generateJD:fi,processing:ui,aiAnalyzing:gi,pleaseWait:mi,aiRecommendedTags:bi,salaryRange:xi,benefits:wi,education:yi,jdInfo:vi,jdInfoPlaceholder:ki,inputGuideTitle:zi,inputGuide:Ci,aiDisclaimer:Ii,beianLabel:ji,beianNumber:Si,loadingConversation:_i,salaryRanges:Ti,benefitsList:Fi,educationList:Ei,historyConversations:Mi,history:Di,alerts:Bi,jobInfoFields:Ri};const Hi="Job Description Generator";const Ai="Job Requirement Information";const Li="Toggle Input";const Pi="Job Title";const qi="Please enter job title";const $i="*";const Ui="Next Step";const Ni="Previous Step";const Vi="Generate JD";const Wi="Processing...";const Ji="AI is analyzing job information";const Qi="Please wait...";const Yi="AI Recommended Tags";const Gi="Monthly Salary Range";const Xi="Benefits";const Ki="Education Requirements";const Zi="JD Information";const en="Please enter job requirement information according to the format below";const tn="Input Format Reference:";const on={jobTitle:"• Job Title - Clearly define the position name",salary:"• Salary Range - Specify monthly or annual salary for this position",benefits:"• Benefits - Benefits for this position, such as: five insurances and one fund, annual leave, afternoon tea, etc.",responsibilities:"• Job Responsibilities - Describe the work content",qualifications:"• Qualifications - Including education, experience and technical requirements",location:"• Location & Nature - Full-time/Part-time, Remote/Office"};const nn="All content is AI-generated and for reference only";const rn="Cyberspace Administration of China Generative AI Service Registration Number";const an="Hunan-PinCaiMao-202412310003";const sn="Loading conversation...";const ln={"3k_5k":"3k-5k","5k_8k":"5k-8k","8k_12k":"8k-12k","12k_15k":"12k-15k","15k_20k":"15k-20k",above_20k:"20k+"};const dn={insurance:"Five insurances and one fund",bonus:"Year-end bonus",paidLeave:"Paid annual leave",overtimePay:"Overtime allowance",mealAllowance:"Meal allowance",transportAllowance:"Transport allowance",holidayBenefits:"Holiday benefits",teamBuilding:"Team building"};const cn={college:"College",bachelor:"Bachelor",master:"Master",doctor:"Doctor",noLimit:"No limit"};const pn="History";const hn={loading:"Loading...",noHistory:"No history conversations"};const fn={enterJobName:"Please enter job title",enterJobInfo:"Please enter job requirement information"};const un={jobName:"Job Title",salaryRange:"Salary Range",benefits:"Benefits",education:"Education Requirements"};var gn={modalTitle:Hi,jobRequirementInfo:Ai,toggleInput:Li,jobName:Pi,jobNamePlaceholder:qi,required:$i,nextStep:Ui,prevStep:Ni,generateJD:Vi,processing:Wi,aiAnalyzing:Ji,pleaseWait:Qi,aiRecommendedTags:Yi,salaryRange:Gi,benefits:Xi,education:Ki,jdInfo:Zi,jdInfoPlaceholder:en,inputGuideTitle:tn,inputGuide:on,aiDisclaimer:nn,beianLabel:rn,beianNumber:an,loadingConversation:sn,salaryRanges:ln,benefitsList:dn,educationList:cn,historyConversations:pn,history:hn,alerts:fn,jobInfoFields:un};const mn=".input-mode-toggle{display:flex;align-items:center;margin-bottom:16px}.input-mode-toggle span{color:#333;margin-right:12px}.toggle-button{display:flex;align-items:center;background:none;border:none;color:#2E6EDF;cursor:pointer;font-size:14px;padding:4px 8px}.toggle-button svg{margin-right:4px}.toggle-button:disabled{opacity:0.5;cursor:not-allowed}.structured-input{width:100%}.job-name-input{margin-bottom:20px}.job-name-input label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-name-input input{width:95%;padding:10px 12px;border:1px solid #ddd;border-radius:4px;font-size:14px;background-color:#f9f9f9}.job-name-input input:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.required{color:#f56c6c}.button-container{display:flex;justify-content:center;margin-top:24px;gap:12px;max-width:100%;box-sizing:border-box;flex-wrap:wrap}.next-button{background-color:#2E6EDF;color:white}.next-button:hover{background-color:#2457b8}.next-button:disabled{background-color:#a0c0e8;cursor:not-allowed}.prev-button{background-color:#f0f0f0 !important;color:#333 !important}.prev-button:hover{background-color:#e0e0e0}.tag-selection{width:100%}.tag-selection-content{width:100%}.section-title{font-weight:600;color:#333;margin-bottom:12px;font-size:16px}.ai-tags-section,.basic-tags-section{margin-bottom:24px}.tag-group{margin-bottom:16px}.tag-title{color:#555;margin-bottom:8px;font-weight:500}.tag-container{display:flex;flex-wrap:wrap;gap:8px;max-width:100%;box-sizing:border-box}.tag{display:inline-flex;align-items:center;padding:6px 12px;border-radius:4px;background-color:#f5f5f5;border:1px solid #e0e0e0;color:#333;font-size:13px;cursor:pointer;transition:all 0.2s;max-width:100%;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tag:hover{background-color:#e8e8e8}.tag-selected{background-color:#e6f0ff;border-color:#2E6EDF;color:#2E6EDF}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 0;background-color:#f9f9f9;border-radius:8px;margin:20px 0;max-width:100%;box-sizing:border-box}.loading-spinner{width:40px;height:40px;border:3px solid rgba(46, 110, 223, 0.2);border-radius:50%;border-top-color:#2E6EDF;animation:spin 1s linear infinite;margin-bottom:16px}@keyframes spin{to{transform:rotate(360deg)}}.loading-text{text-align:center;color:#333;font-weight:500}.loading-subtext{color:#888;font-size:14px;margin-top:4px}.free-input{width:100%}.textarea-container{margin-bottom:16px}.textarea-container label{display:block;margin-bottom:8px;font-weight:500;color:#333}.textarea-container textarea{border:1px solid #ddd;border-radius:4px;font-size:14px;resize:vertical;background-color:#f9f9f9;min-height:150px;width:100%;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.textarea-container textarea:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.voice-textarea-wrapper{position:relative}.voice-textarea-wrapper textarea{padding-bottom:52px}.voice-input-entry{position:absolute;right:12px;bottom:32px;z-index:1}.input-guide{background-color:#f5f7fa;border-radius:4px;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.guide-title{font-weight:500;color:#333;margin-bottom:8px}.guide-content{color:#666;font-size:13px;max-width:100%;word-wrap:break-word}.guide-content div{margin-bottom:4px}@media (max-width: 768px){.tag-container{gap:7px}.tag{padding:4px 8px;font-size:12px}}@media (max-width: 480px){.button-container{flex-direction:column;align-items:center}.next-button,.prev-button,.submit-button{width:100%;margin-bottom:8px}.tag{max-width:calc(50% - 8px)}}.tag-selection,.tag-selection-content,.ai-tags-section,.basic-tags-section,.structured-input,.free-input{max-width:100%;box-sizing:border-box}";const bn='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const xn=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const wn=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="职位生成";locale="zh";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请帮我生成职位信息";fullscreen=false;customInputs={};showWorkspaceHistory=false;showChatInput=true;showInputHistory=false;showSaveJdButton=false;saveJdButtonText="保存职位";streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";showChatModal=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return o(this)}strings;inputMode="structured";step="input";jobName="";freeInputText="";isLoading=false;isSubmitting=false;isVoiceInputActive=false;tagGroups=[];shuffledTagGroups=[];selectedAITags={};selectedTags={salary:"",benefits:[],education:""};tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async componentWillLoad(){this.strings=this.locale==="en"?gn:Oi;if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}getSalaryRanges(){return[{text:this.strings.salaryRanges["3k_5k"],value:"3k_5k"},{text:this.strings.salaryRanges["5k_8k"],value:"5k_8k"},{text:this.strings.salaryRanges["8k_12k"],value:"8k_12k"},{text:this.strings.salaryRanges["12k_15k"],value:"12k_15k"},{text:this.strings.salaryRanges["15k_20k"],value:"15k_20k"},{text:this.strings.salaryRanges.above_20k,value:"above_20k"}]}getBenefits(){return[{text:this.strings.benefitsList.insurance,value:"五险一金"},{text:this.strings.benefitsList.bonus,value:"年终奖"},{text:this.strings.benefitsList.paidLeave,value:"带薪年假"},{text:this.strings.benefitsList.overtimePay,value:"加班补贴"},{text:this.strings.benefitsList.mealAllowance,value:"餐补"},{text:this.strings.benefitsList.transportAllowance,value:"交通补贴"},{text:this.strings.benefitsList.holidayBenefits,value:"节日福利"},{text:this.strings.benefitsList.teamBuilding,value:"团队建设"}]}getEducationRequirements(){return[{text:this.strings.educationList.college,value:"大专"},{text:this.strings.educationList.bachelor,value:"本科"},{text:this.strings.educationList.master,value:"硕士"},{text:this.strings.educationList.doctor,value:"博士"},{text:this.strings.educationList.noLimit,value:"学历不限"}]}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(e,t)=>{this.isLoadingConversations=true;const o=await T(this.getBotId(),"pcm-jd-modal",e,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,t+1);if(o.hasMore&&o.nextCursor){i[t+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=t;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async e=>{if(e==="prev"){if(this.historyConversationPageIndex===0){return}const e=this.historyConversationPageIndex-1;const t=this.historyConversationCursorStack[e]||"";await this.loadHistoryConversations(t,e);return}if(!this.hasMoreHistoryConversations){return}const t=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[t];if(!o){return}await this.loadHistoryConversations(o,t)};handleSelectConversation=e=>{this.conversationId=e;this.isHistoryDrawerOpen=false;this.showChatModal=true};handleToggleInput=()=>{if(this.isVoiceInputActive)return;this.inputMode=this.inputMode==="structured"?"free":"structured"};handleJobNameChange=e=>{const t=e.target;this.jobName=t.value};handleFreeInputChange=e=>{const t=e.target;this.freeInputText=t.value};handleVoiceRecognized=e=>{const t=this.hostElement.shadowRoot?.querySelector("#free-input-text");const o=t?.selectionStart??this.freeInputText.length;const i=this.freeInputText.substring(0,o);const n=this.freeInputText.substring(o);const r=i.length>0&&!/\s$/.test(i)?" ":"";this.freeInputText=`${i}${r}${e.detail}${n}`;requestAnimationFrame((()=>{if(!t)return;const i=o+r.length+e.detail.length;t.focus();t.setSelectionRange(i,i)}))};handleVoiceStatusChange=e=>{this.isVoiceInputActive=e.detail!=="idle"};handleVoiceInputError=e=>{this.someErrorEvent.emit(e.detail)};handleNextStep=async()=>{if(!this.jobName.trim()){alert(this.strings.alerts.enterJobName);return}this.step="review";await this.handlePositionAnalysis(this.jobName)};handlePrevStep=()=>{this.step="input"};async handlePositionAnalysis(e){if(!e.trim())return;this.isLoading=true;try{const t=await a({url:"/sdk/v1/chat/workflow/block-run",method:"POST",data:{inputs:{input_info:e,locale:this.locale},bot_id:"59322522667307008",workflow_code:"generate_jd_tags"}});if(t.success&&t.data?.data.outputs?.text){try{let e=t.data.data.outputs.text.trim();const o=e.match(/```json\s*([\s\S]*?)\s*```/);if(o){e=o[1].trim()}const i=JSON.parse(e);this.tagGroups=i.tagGroup||[];const n={};const r=(i.tagGroup||[]).map((e=>{const t=[...e.defaultTags||[],...e.optionalTags||[]];for(let e=t.length-1;e>0;e--){const o=Math.floor(Math.random()*(e+1));[t[e],t[o]]=[t[o],t[e]]}if(e.defaultTags&&e.defaultTags.length>0){n[e.dimensionName]=[...e.defaultTags]}return{dimensionName:e.dimensionName,tags:t}}));this.shuffledTagGroups=r;this.selectedAITags=n}catch(e){I.captureError(e,{action:"handlePositionAnalysis",component:"pcm-jd-modal",title:"解析前置标签时错误"});this.someErrorEvent.emit({error:e,message:"解析前置标签时错误"})}}}catch(e){console.error("工作流运行错误:",e)}finally{this.isLoading=false}}handleTagClick=(e,t)=>{if(e==="benefits"){const e=[...this.selectedTags.benefits];const o=e.includes(t)?e.filter((e=>e!==t)):[...e,t];this.selectedTags={...this.selectedTags,benefits:o}}else{this.selectedTags={...this.selectedTags,[e]:this.selectedTags[e]===t?"":t}}};handleAITagClick=(e,t)=>{const o=this.selectedAITags[e]||[];const i=o.includes(t)?o.filter((e=>e!==t)):[...o,t];this.selectedAITags={...this.selectedAITags,[e]:i}};handleSubmitStructured=async()=>{this.isSubmitting=true;try{let e="";if(this.selectedTags.salary){const t=this.getSalaryRanges().find((e=>e.value===this.selectedTags.salary));if(t){e=t.text}}const t=this.selectedTags.benefits.join("、");let o="";if(this.selectedTags.education){const e=this.getEducationRequirements().find((e=>e.value===this.selectedTags.education));if(e){o=e.text}}let i=`${this.strings.jobInfoFields.jobName}:${this.jobName}\n`;if(e){i+=`${this.strings.jobInfoFields.salaryRange}:${e}\n`}if(t){i+=`${this.strings.jobInfoFields.benefits}:${t}\n`}if(o){i+=`${this.strings.jobInfoFields.education}:${o}\n`}Object.entries(this.selectedAITags).forEach((([e,t])=>{if(t.length>0){i+=`${e}:${t.join("、")}\n`}}));this.showChatModal=true;this.jobDescription=i}catch(e){console.error("提交结构化数据时出错:",e);I.captureError(e,{action:"handleSubmitStructured",component:"pcm-jd-modal",title:"提交数据时出错"});this.someErrorEvent.emit({error:e,message:"提交数据时出错,请重试"})}finally{this.isSubmitting=false}};handleSubmitFree=async()=>{if(!this.freeInputText.trim()){alert(this.strings.alerts.enterJobInfo);return}this.isSubmitting=true;try{this.jobDescription=this.freeInputText;this.showChatModal=true}catch(e){console.error("提交自由输入数据时出错:",e);I.captureError(e,{action:"handleSubmitFree",component:"pcm-jd-modal",title:"提交数据时出错"});this.someErrorEvent.emit({error:e,message:"提交数据时出错,请重试"})}finally{this.isSubmitting=false}};jobDescription="";getBotId(){const e=this.locale||this.hostElement?.lang||"zh";const t={zh:"3022316191018873",en:"8164748078835713"};return t[e]||t["zh"]}async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.jobDescription="";this.jobName="";this.freeInputText="";this.isVoiceInputActive=false;this.step="input";this.inputMode="structured";this.tagGroups=[];this.shuffledTagGroups=[];this.selectedAITags={};this.selectedTags={salary:"",benefits:[],education:""}}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info;this.inputMode="free";this.freeInputText=this.customInputs.job_info}await f(this.token);if(this.conversationId){this.showChatModal=true}}}renderTagGroup(e,t,o){return i("div",{class:"tag-group"},i("div",{class:"tag-title"},e),i("div",{class:"tag-container"},t.map((e=>{const t=o==="benefits"?this.selectedTags.benefits.includes(e.value):this.selectedTags[o]===e.value;return i("div",{class:{tag:true,"tag-selected":t},onClick:()=>this.handleTagClick(o,e.value)},e.text)}))))}renderAITagGroups(){return i("div",{class:"ai-tag-groups"},this.shuffledTagGroups.map((e=>i("div",{class:"tag-group"},i("div",{class:"tag-title"},e.dimensionName),i("div",{class:"tag-container"},e.tags.map((t=>{const o=(this.selectedAITags[e.dimensionName]||[]).includes(t);return i("div",{class:{tag:true,"tag-selected":o},onClick:()=>this.handleAITagClick(e.dimensionName,t)},t)})))))))}renderLoadingState(){return i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("div",{class:"loading-text"},i("div",null,this.strings.aiAnalyzing),i("div",{class:"loading-subtext"},this.strings.pleaseWait)))}render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:this.strings?.historyConversations},this.strings?.historyConversations)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:this.strings?.historyConversations,width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,this.strings?.history?.loading)):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,this.strings?.history?.noHistory)):this.historyConversations.map((e=>i("div",{key:e.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(e.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},e.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&i("span",{class:"message-count"},e.message_count,"条消息"),e.status&&i("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&true&&i("div",{class:"input-container"},i("div",{class:"input-mode-toggle"},i("span",null,this.strings.jobRequirementInfo),i("button",{class:"toggle-button",onClick:this.handleToggleInput,disabled:this.isLoading||this.isVoiceInputActive},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})),this.strings.toggleInput)),this.inputMode==="structured"&&i("div",{class:"structured-input"},this.step==="input"&&i("div",{class:"job-name-input"},i("label",{htmlFor:"job-name"},this.strings.jobName," ",i("span",{class:"required"},this.strings.required)),i("input",{id:"job-name",type:"text",placeholder:this.strings.jobNamePlaceholder,value:this.jobName,onInput:this.handleJobNameChange,disabled:this.isLoading}),i("div",{class:"button-container"},i("button",{class:"submit-button next-button",onClick:this.handleNextStep,disabled:!this.jobName.trim()||this.isLoading},this.strings.nextStep))),this.step==="review"&&i("div",{class:"tag-selection"},this.isLoading?this.renderLoadingState():i("div",{class:"tag-selection-content"},this.tagGroups.length>0&&i("div",{class:"ai-tags-section"},i("div",{class:"section-title"},this.strings.aiRecommendedTags),this.renderAITagGroups()),this.tagGroups.length>0&&i("div",{class:"basic-tags-section"},this.renderTagGroup(this.strings.salaryRange,this.getSalaryRanges(),"salary"),this.renderTagGroup(this.strings.benefits,this.getBenefits(),"benefits"),this.renderTagGroup(this.strings.education,this.getEducationRequirements(),"education")),i("div",{class:"button-container"},i("button",{class:"submit-button prev-button",onClick:this.handlePrevStep},this.strings.prevStep),i("button",{class:"submit-button",onClick:this.handleSubmitStructured,disabled:this.isSubmitting},this.isSubmitting?this.strings.processing:this.strings.generateJD))))),this.inputMode==="free"&&i("div",{class:"free-input"},i("div",{class:"textarea-container"},i("label",{htmlFor:"free-input-text"},this.strings.jdInfo," ",i("span",{class:"required"},this.strings.required)),i("div",{class:"voice-textarea-wrapper"},i("textarea",{id:"free-input-text",placeholder:this.strings.jdInfoPlaceholder,rows:8,value:this.freeInputText,onInput:this.handleFreeInputChange,disabled:this.isVoiceInputActive}),i("div",{class:"voice-input-entry"},i("components-voice-input-btn",{locale:this.locale==="en"?"en":"zh",disabled:this.isSubmitting,onVoiceRecognized:this.handleVoiceRecognized,onVoiceStatusChange:this.handleVoiceStatusChange,onSomeErrorEvent:this.handleVoiceInputError})))),i("div",{class:"input-guide"},i("div",{class:"guide-title"},this.strings.inputGuideTitle),i("div",{class:"guide-content"},i("div",null,this.strings.inputGuide.jobTitle),i("div",null,this.strings.inputGuide.salary),i("div",null,this.strings.inputGuide.benefits),i("div",null,this.strings.inputGuide.responsibilities),i("div",null,this.strings.inputGuide.qualifications),i("div",null,this.strings.inputGuide.location))),i("div",{class:"button-container"},i("button",{class:"submit-button",onClick:this.handleSubmitFree,disabled:!this.freeInputText.trim()||this.isSubmitting||this.isVoiceInputActive},this.isSubmitting?this.strings.processing:this.strings.generateJD))),i("div",{class:"ai-disclaimer"},i("p",null,this.strings.aiDisclaimer),i("p",{class:"beian-info"},i("span",null,this.strings.beianLabel),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},this.strings.beianNumber)))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},this.strings.loadingConversation)),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{locale:this.locale,isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,showChatInput:this.showChatInput,botId:this.getBotId(),conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,job_info:this.customInputs?.job_info||this.jobDescription},interviewMode:"text",showSaveJdButton:this.showSaveJdButton,saveJdButtonText:this.saveJdButtonText}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};wn.style=mn+(bn+xn);const yn="";const vn='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const kn=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const zn=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="简历剖析助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始分析";fullscreen=false;customInputs={};showWorkspaceHistory=false;showChatInput=true;showInputHistory=false;mobileUploadAble=false;mobileJdInputAble=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";isUploading=false;uploadedFileInfo=null;showChatModal=false;jobDescription="";isSubmitting=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return o(this)}tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;pcmUploadRef;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.jobDescription=""}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await f(this.token);if(this.conversationId||(this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(e,t)=>{this.isLoadingConversations=true;const o=await T("3022316191018881","pcm-jlpp-modal",e,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,t+1);if(o.hasMore&&o.nextCursor){i[t+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=t;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async e=>{if(e==="prev"){if(this.historyConversationPageIndex===0){return}const e=this.historyConversationPageIndex-1;const t=this.historyConversationCursorStack[e]||"";await this.loadHistoryConversations(t,e);return}if(!this.hasMoreHistoryConversations){return}const t=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[t];if(!o){return}await this.loadHistoryConversations(o,t)};handleSelectConversation=e=>{this.conversationId=e;this.isHistoryDrawerOpen=false;this.showChatModal=true};handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleStartAnalysis=async()=>{if(!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo){j.info("请上传简历");return}if(!this.customInputs?.job_info&&!this.jobDescription.trim()){j.info("请输入职位描述");return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const s=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((e=>i("div",{key:e.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(e.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},e.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&i("span",{class:"message-count"},e.message_count,"条消息"),e.status&&i("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&i("components-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("components-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!a&&!this.uploadedFileInfo||!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartAnalysis},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,showWorkspaceHistory:this.showWorkspaceHistory,showChatInput:this.showChatInput,botId:"3022316191018881",customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};zn.style=yn+(vn+kn);const Cn=".resume-type-container{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-evenly;gap:0;margin-bottom:16px;border-bottom:2px solid #f0f0f0;padding-left:0;overflow-x:auto;overflow-y:hidden}.resume-type-item{cursor:pointer;font-size:16px;color:#333;padding:0 0 8px 0;position:relative;background:none;border:none;outline:none;font-weight:400;white-space:nowrap;flex-shrink:0;transition:color 0.2s}.resume-type-item.selected{color:#2563eb;font-weight:600}.resume-type-item.selected::after{content:'';display:block;position:absolute;left:0;bottom:-2px;width:100%;height:2px;background:#2563eb;border-radius:2px}.chat-content{background-color:#f7f9fc;border:1px solid #e0e6f1;border-radius:8px;padding:16px;display:flex;align-items:center;gap:16px}.chat-content-icon{font-size:24px;flex-shrink:0}.chat-content-text{font-size:14px;color:#595959;line-height:1.6}.resume-type-item:not(.selected):hover{color:#2563eb}.iframe-container{width:100%;height:85vh}.iframe-container iframe{width:100%;height:100%}.optimizing-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.35);z-index:2000;display:flex;align-items:center;justify-content:center}.optimizing-modal-content{background:#fff;border-radius:8px;padding:32px 40px;box-shadow:0 4px 24px rgba(0, 0, 0, 0.12);display:flex;flex-direction:column;align-items:center}.optimizing-modal-content .loading-spinner{width:40px;height:40px;border:4px solid #e0e0e0;border-top:4px solid #2563eb;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:16px}.converstation-list{height:600px;overflow:auto}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-item.active{background:#e6f7ff;border-color:#1890ff}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.optimizing-modal-content .loading-text{font-size:18px;color:#222;font-weight:500;margin:0}";const In='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const jn=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Sn=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.getResumeData=t(this,"getResumeData");this.resumeDownloadRequested=t(this,"resumeDownloadRequested")}modalTitle="简历制作";token;isOpen=false;isSuccess=false;hideExportButton=false;exportButtonText="导出简历json数据";modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="根据对话生成简历";fullscreen=false;customInputs={};uploadSuccess;streamComplete;conversationStart;tokenInvalid;someErrorEvent;getResumeData;resumeDownloadRequested;filePreviewMode="drawer";mobileUploadAble=false;initialResumeText;type;introduction_prompt;showHistory=true;isUploading=false;uploadedFileInfo=null;showChatModal=false;currentNodeTitle="";resumeType="chat";resumeText="";get hostElement(){return o(this)}isSubmitting=false;showIframe=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;tokenInvalidListener;removeErrorListener;pcmUploadRef;_iframeEl;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.currentNodeTitle="";this.showIframe=false;this.isSuccess=false;this.conversationId=undefined;this.resumeType="chat";this.resumeText=""}else{await f(this.token);if(this.type==="chat"){this.resumeType="chat";setTimeout((()=>{this.handleStartInterview()}),100)}else if(this.type==="file"||this.type==="upload"){this.resumeType="upload"}else if(this.type==="paste"){this.resumeType="paste"}if(this.initialResumeText&&this.initialResumeText.trim()){this.resumeType="paste";this.resumeText=this.initialResumeText;setTimeout((()=>{this.handleStartInterview()}),100)}}}handleIsSuccessChange(e){if(e&&this.resumeType!=="chat"){this.showIframe=true}}handleStreamComplete=e=>{this.conversationId=e.detail.conversation_id;if(this.resumeType!=="chat"){this.showIframe=true;this.isSuccess=true}};componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}componentDidLoad(){window.addEventListener("message",this.handleIframeMessage)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}window.removeEventListener("message",this.handleIframeMessage)}handleIframeLoad=()=>{};handleIframeMessage=e=>{const t=["http://localhost:3000",c];if(!t.includes(e.origin))return;if(e.source!==this._iframeEl?.contentWindow)return;const{type:o,value:i}=e.data||{};if(o==="callParentMethod"){this.exampleMethodFromIframe(i)}if(o==="resumeDownloadRequested"){if(!i?.url||!i?.fileName)return;this.resumeDownloadRequested.emit({url:i.url,fileName:i.fileName})}if(o==="iframeReady"&&this._iframeEl?.contentWindow){const e=new URL(this._iframeEl.src).origin;this._iframeEl.contentWindow.postMessage({type:"parentReady",origin:window.location.origin},e);this._iframeEl.contentWindow.postMessage({type:"setToken",token:this.token},e);this._iframeEl.contentWindow.postMessage({type:"buttonConfig",config:{hideExportButton:this.hideExportButton,exportButtonText:this.exportButtonText}},e)}};exampleMethodFromIframe(e){this.getResumeData.emit(JSON.parse(e))}handleClose=()=>{this.modalClosed.emit()};changeType=e=>{this.resumeType=e};handleResumeTextChange=e=>{const t=e.target;this.resumeText=t.value};async loadHistoryConversations(){this.isLoadingConversations=true;try{const e=await a({url:"/sdk/v1/chat/conversations",method:"GET",data:{bot_id:"39284520284983296",limit:50,page:1}});if(e.success&&e.data){const t=e.data.data||[];this.historyConversations=t.map((e=>{let t;let o="未知时间";try{const i=typeof e.created_at==="string"?parseInt(e.created_at):e.created_at;if(isNaN(i)||i<=0){console.warn("无效的时间戳:",e.created_at);t=new Date}else{t=new Date(i*1e3)}if(isNaN(t.getTime())){console.warn("无效的日期对象:",e.created_at);t=new Date}const n=new Date;const r=n.getTime()-t.getTime();const a=Math.floor(r/(1e3*60*60*24));if(a===0){o=`今天 ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(a===1){o=`昨天 ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(a>0&&a<7){const e=["周日","周一","周二","周三","周四","周五","周六"];o=`${e[t.getDay()]} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(a<0){o=`${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else{o=`${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}}catch(t){console.error("时间格式化错误:",t,e.created_at);o="时间解析失败"}return{id:e.id,name:e.name||"新会话",created_at:e.created_at,updated_at:e.updated_at,status:e.status,message_count:e.message_count||0,timeDisplay:o}}))}}catch(e){console.error("获取历史会话失败:",e);I.captureError(e,{action:"loadHistoryConversations",component:"pcm-app-chat-modal",title:"获取历史会话失败"});this.someErrorEvent.emit({error:e,message:"获取历史会话失败"})}finally{this.isLoadingConversations=false}}handleStartInterview=async()=>{if(this.resumeType==="upload"&&!this.uploadedFileInfo){j.info("请上传简历");return}if(this.resumeType==="paste"&&!this.resumeText.trim()){j.info("请粘贴简历文本");return}if(this.resumeType==="upload"&&await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};closeResumeChat=()=>{this.isSuccess=false;this.resumeType="upload"};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":!this.isSuccess};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=Boolean(this.customInputs&&this.customInputs.file_url);const r=Boolean(this.customInputs?.file_url&&this.customInputs?.job_info);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&!this.showChatModal&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!r&&!this.showIframe&&i("div",{class:"input-container"},i("div",{class:"resume-type-container"},i("div",{class:{"resume-type-item":true,selected:this.resumeType==="chat"},onClick:()=>this.changeType("chat")},"直接开始"),i("div",{class:{"resume-type-item":true,selected:this.resumeType==="upload"},onClick:()=>this.changeType("upload")},"上传简历"),i("div",{class:{"resume-type-item":true,selected:this.resumeType==="paste"},onClick:()=>this.changeType("paste")},"粘贴简历"),this.showHistory&&i("div",{class:{"resume-type-item":true,selected:this.resumeType==="history"},onClick:()=>{this.changeType("history");this.loadHistoryConversations()}},"历史对话")),!n&&this.resumeType==="upload"&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("components-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),this.resumeType==="paste"&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请粘贴简历文本"),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请粘贴简历文本...",rows:6,value:this.resumeText,onInput:this.handleResumeTextChange})),this.resumeType==="chat"&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"从头开始创建"),i("div",{class:"chat-content"},i("div",{class:"chat-content-text"},"🤖无需复杂操作,只需回答AI的几个简单问题,系统会根据你的回答自动生成内容完整、格式专业的个人简历"))),this.resumeType==="history"?i("div",{class:"converstation-list"},this.historyConversations.map((e=>i("div",{key:e.id,class:{"conversation-item":true,active:e.id===this.conversationId},onClick:()=>{this.conversationId=e.id;this.isSuccess=true;this.showChatModal=true;this.showIframe=true}},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},e.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&i("span",{class:"message-count"},e.message_count,"条消息"),e.status&&i("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))),e.id===this.conversationId&&i("div",{class:"current-indicator"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))))))):i("button",{class:"submit-button",disabled:this.resumeType==="upload"&&!n&&!this.uploadedFileInfo||this.resumeType==="paste"&&!this.resumeText.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":["upload","paste"].includes(this.resumeType)?"开始制作":"开始对话"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),this.showChatModal&&i(i.Fragment,null,i("div",{style:{display:this.resumeType==="chat"?"block":"none"}},i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:false,botId:"39284520284983296",conversationId:this.conversationId,defaultQuery:this.resumeType==="paste"?this.resumeText:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.resumeType==="upload"?this.customInputs.file_url||this.uploadedFileInfo?.cos_key:"",mode_type:this.resumeType==="chat"?1:0,introduction_prompt:this.introduction_prompt},interviewMode:"text",closeResume:this.closeResumeChat,onStreamComplete:this.handleStreamComplete,"onNode-status-change":e=>{this.currentNodeTitle=e.detail}})),this.resumeType!=="chat"&&!this.showIframe&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"AI正在优化您的简历..."),this.currentNodeTitle&&i("div",{class:"resume-node-status",role:"status","aria-live":"polite","aria-atomic":"true"},i("span",{class:"resume-node-status-spinner","aria-hidden":"true"}),i("span",null,this.currentNodeTitle))),this.showIframe&&i(i.Fragment,null,i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),i("div",{class:"iframe-container"},i("iframe",{ref:e=>this._iframeEl=e,src:`${c}/myresume?conversation_id=${this.conversationId}&isSdk=true`,frameborder:"0",onLoad:this.handleIframeLoad}))))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"],isSuccess:["handleIsSuccessChange"]}}};Sn.style=Cn+(In+jn);const _n="面试出题大师";const Tn="请输入职位描述 (JD)";const Fn="请输入职位描述,包括职责、要求等信息...";const En="上传简历";const Mn="点击上传简历";const Dn="支持 txt、markdown、pdf、docx、doc、md 格式";const Bn="面试题数量:";const Rn="题";const On="是否需要参考答案:";const Hn="开启";const An="关闭";const Ln="开始分析";const Pn="上传中...";const qn="处理中...";const $n="所有内容均由AI生成仅供参考";const Un="中央网信办生成式人工智能服务备案号";const Nn="Hunan-PinCaiMao-202412310003";const Vn="正在加载对话...";const Wn="历史会话";const Jn={loading:"加载中...",noHistory:"暂无历史会话"};const Qn={uploadResume:"请上传简历",enterJobDescription:"请输入职位描述"};const Yn={uploadFailed:"文件上传失败,请重试",startInterviewFailed:"开始面试时出错,请重试"};var Gn={modalTitle:_n,jobDescriptionLabel:Tn,jobDescriptionPlaceholder:Fn,resumeUploadLabel:En,uploadPlaceholder:Mn,uploadHint:Dn,questionNumberLabel:Bn,questionUnit:Rn,analysisToggleLabel:On,toggleOn:Hn,toggleOff:An,startAnalysis:Ln,uploading:Pn,processing:qn,aiDisclaimer:$n,beianLabel:Un,beianNumber:Nn,loadingConversation:Vn,historyConversations:Wn,history:Jn,alerts:Qn,errors:Yn};const Xn="Interview Question Master";const Kn="Please enter job description (JD)";const Zn="Please enter job description, including responsibilities, requirements, etc...";const er="Upload Resume";const tr="Click to upload resume";const or="Supports txt, markdown, pdf, docx, doc, md formats";const ir="Number of Interview Questions:";const nr="questions";const rr="Reference answers required:";const ar="On";const sr="Off";const lr="Start Analysis";const dr="Uploading...";const cr="Processing...";const pr="All content is AI-generated and for reference only";const hr="Cyberspace Administration of China Generative AI Service Registration Number";const fr="Hunan-PinCaiMao-202412310003";const ur="Loading conversation...";const gr="History";const mr={loading:"Loading...",noHistory:"No history conversations"};const br={uploadResume:"Please upload resume",enterJobDescription:"Please enter job description"};const xr={uploadFailed:"File upload failed, please try again",startInterviewFailed:"Failed to start interview, please try again"};var wr={modalTitle:Xn,jobDescriptionLabel:Kn,jobDescriptionPlaceholder:Zn,resumeUploadLabel:er,uploadPlaceholder:tr,uploadHint:or,questionNumberLabel:ir,questionUnit:nr,analysisToggleLabel:rr,toggleOn:ar,toggleOff:sr,startAnalysis:lr,uploading:dr,processing:cr,aiDisclaimer:pr,beianLabel:hr,beianNumber:fr,loadingConversation:ur,historyConversations:gr,history:mr,alerts:br,errors:xr};const yr="";const vr='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const kr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const zr=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="面试出题大师";locale="zh";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始出题";fullscreen=false;customInputs={};showWorkspaceHistory=false;showChatInput=true;showInputHistory=false;questionNumber=6;canOutputAnalysis=true;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";isUploading=false;uploadedFileInfo=null;showChatModal=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return o(this)}strings;jobDescription="";isSubmitting=false;pcmUploadRef;getBotId(){const e=this.locale||this.hostElement?.lang||"zh";const t={zh:"3022316191018876",en:"8164755731671041"};return t[e]||t["zh"]}tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){this.uploadedFileInfo=null;this.showChatModal=false;this.jobDescription=""}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await f(this.token);if(this.conversationId||(this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info){this.showChatModal=true}}}async componentWillLoad(){this.strings=this.locale==="en"?wr:Gn;if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleQuestionNumberChange=e=>{const t=e.target;const o=parseInt(t.value);this.questionNumber=o>=3&&o<=20?o:6};handleAnalysisToggle=e=>{const t=e.target;this.canOutputAnalysis=t.checked};loadHistoryConversations=async(e,t)=>{this.isLoadingConversations=true;const o=await T(this.getBotId(),"pcm-mnct-modal",e,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,t+1);if(o.hasMore&&o.nextCursor){i[t+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=t;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async e=>{if(e==="prev"){if(this.historyConversationPageIndex===0){return}const e=this.historyConversationPageIndex-1;const t=this.historyConversationCursorStack[e]||"";await this.loadHistoryConversations(t,e);return}if(!this.hasMoreHistoryConversations){return}const t=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[t];if(!o){return}await this.loadHistoryConversations(o,t)};handleSelectConversation=e=>{this.conversationId=e;this.isHistoryDrawerOpen=false;this.showChatModal=true};handleStartInterview=async()=>{if(!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo){j.info(this.strings.alerts.uploadResume);return}if(!this.customInputs?.job_info&&!this.jobDescription.trim()){j.info(this.strings.alerts.enterJobDescription);return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const s=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:this.strings?.historyConversations},this.strings?.historyConversations)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},this.strings.jobDescriptionLabel),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:this.strings.jobDescriptionPlaceholder,rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"resume-upload-section"},i("label",null,this.strings.resumeUploadLabel),i("components-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("div",{class:"interview-settings-section"},i("div",{class:"settings-row"},i("div",{class:"question-number-section"},i("label",{class:"settings-label"},this.strings.questionNumberLabel),i("div",{class:"slider-container"},i("input",{type:"range",min:"3",max:"20",value:this.questionNumber,class:"question-slider",onInput:this.handleQuestionNumberChange}),i("div",{class:"slider-value"},this.questionNumber,this.strings.questionUnit)))),i("div",{class:"settings-row"},i("div",{class:"analysis-toggle-section"},i("label",{class:"settings-label"},this.strings.analysisToggleLabel),i("div",{class:"toggle-container"},i("label",{class:"toggle-switch"},i("input",{type:"checkbox",checked:this.canOutputAnalysis,onChange:this.handleAnalysisToggle}),i("span",{class:"toggle-slider"})),i("span",{class:"toggle-text"},this.canOutputAnalysis?this.strings.toggleOn:this.strings.toggleOff))))),i("button",{class:"submit-button",disabled:!a&&!this.uploadedFileInfo||!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isSubmitting?this.strings.processing:this.strings.startAnalysis),i("div",{class:"ai-disclaimer"},i("p",null,this.strings.aiDisclaimer),i("p",{class:"beian-info"},i("span",null,this.strings.beianLabel),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},this.strings.beianNumber)))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:this.strings?.historyConversations,width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,this.strings?.history?.loading)):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,this.strings?.history?.noHistory)):this.historyConversations.map((e=>i("div",{key:e.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(e.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},e.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&i("span",{class:"message-count"},e.message_count,"条消息"),e.status&&i("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},this.strings.loadingConversation)),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{locale:this.locale,isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,showChatInput:this.showChatInput,botId:this.getBotId(),conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.questionNumber,can_outputAnalysis:this.canOutputAnalysis?"true":"false"},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};zr.style=yr+(vr+kr);const Cr="";const Ir='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const jr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Sr=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.recordingError=t(this,"recordingError")}modalTitle="模拟面试";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始模拟面试";maxRecordingTime=120;waitingTime=10;fullscreen=false;customInputs={};showWorkspaceHistory=false;mobileJdInputAble=false;mobileUploadAble=false;digitalId;openingIndex=0;enableVirtualHuman=false;showEndInterviewButton=false;playbackRate=1;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;interviewMode="text";skipResumeUpload=false;recordingError;showCopyButton=true;showFeedbackButtons=true;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return o(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await f(this.token);if((this.customInputs?.file_url||this.customInputs?.resume_content||this.skipResumeUpload)&&this.customInputs?.job_info||this.conversationId){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}resetState(){this.showChatModal=false;this.jobDescription="";this.isSubmitting=false;this.selectedFile=null;this.isUploading=false;this.uploadedFileInfo=null}handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleStartInterview=async()=>{if(!this.customInputs?.job_info&&!this.jobDescription.trim()){alert("请输入职位描述");return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true};pcmUploadRef;render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content))||!!this.skipResumeUpload;const s=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&i("components-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"jd-input-section"},i("label",null,"上传简历(选填)"),i("components-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始面试"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.enableVirtualHuman&&this.digitalId?i("pcm-virtual-chat-modal",{ref:e=>this.virtualChatModalRef=e,isOpen:true,fullscreen:this.fullscreen,botId:"3022316191018884",digitalId:this.digitalId,openingIndex:this.openingIndex,conversationId:this.conversationId,defaultQuery:this.defaultQuery,waitingTime:this.waitingTime,playbackRate:this.playbackRate,showEndInterviewButton:this.showEndInterviewButton,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.customInputs?.question_number||5,ai_interview_type:this.digitalId}}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018884",digitalId:this.digitalId,conversationId:this.conversationId,defaultQuery:this.defaultQuery,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,playbackRate:this.playbackRate,showCopyButton:this.showCopyButton,showFeedbackButtons:this.showFeedbackButtons,showEndInterviewButton:this.showEndInterviewButton,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.customInputs?.question_number||5,ai_interview_type:this.digitalId||(this.interviewMode==="video"?"2":"1")},interviewMode:this.interviewMode}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Sr.style=Cr+(Ir+jr);const _r="";const Tr='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Fr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Er=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.recordingError=t(this,"recordingError")}modalTitle="模拟面试";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始模拟面试";maxRecordingTime=120;waitingTime=10;fullscreen=false;customInputs={};showWorkspaceHistory=false;mobileJdInputAble=false;mobileUploadAble=false;digitalId;openingIndex=0;enableVirtualHuman=false;showEndInterviewButton=false;playbackRate=1;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;interviewMode="text";recordingError;showCopyButton=true;showFeedbackButtons=true;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return o(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await f(this.token);if((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info||this.conversationId){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}resetState(){this.showChatModal=false;this.jobDescription="";this.isSubmitting=false;this.selectedFile=null;this.isUploading=false;this.uploadedFileInfo=null}handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleStartInterview=async()=>{if(!this.customInputs?.job_info&&!this.jobDescription.trim()){alert("请输入职位描述");return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true};pcmUploadRef;render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const s=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&i("components-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"jd-input-section"},i("label",null,"上传简历(选填)"),i("components-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始面试"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.enableVirtualHuman&&this.digitalId?i("pcm-virtual-chat-modal",{ref:e=>this.virtualChatModalRef=e,isOpen:true,fullscreen:this.fullscreen,botId:"3022316191018907",digitalId:this.digitalId,openingIndex:this.openingIndex,conversationId:this.conversationId,defaultQuery:this.defaultQuery,waitingTime:this.waitingTime,playbackRate:this.playbackRate,showEndInterviewButton:this.showEndInterviewButton,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.customInputs?.question_number||5,ai_interview_type:this.digitalId}}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,botId:"3022316191018907",digitalId:this.digitalId,conversationId:this.conversationId,defaultQuery:this.defaultQuery,maxRecordingTime:this.maxRecordingTime,waitingTime:this.waitingTime,playbackRate:this.playbackRate,showCopyButton:this.showCopyButton,showFeedbackButtons:this.showFeedbackButtons,showEndInterviewButton:this.showEndInterviewButton,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription,question_number:this.customInputs?.question_number||5,ai_interview_type:this.digitalId||(this.interviewMode==="video"?"2":"1")},interviewMode:this.interviewMode}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Er.style=_r+(Tr+Fr);const Mr="";const Dr='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Br=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Rr=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="面试报告";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始分析";fullscreen=false;customInputs={};showWorkspaceHistory=false;showChatInput=true;showInputHistory=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return o(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){this.clearSelectedFile();this.showChatModal=false;this.jobDescription=""}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await f(this.token);if(this.conversationId||this.customInputs?.file_urls&&this.customInputs?.job_info){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(e,t)=>{this.isLoadingConversations=true;const o=await T("3022316191018877","pcm-msbg-modal",e,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,t+1);if(o.hasMore&&o.nextCursor){i[t+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=t;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async e=>{if(e==="prev"){if(this.historyConversationPageIndex===0){return}const e=this.historyConversationPageIndex-1;const t=this.historyConversationCursorStack[e]||"";await this.loadHistoryConversations(t,e);return}if(!this.hasMoreHistoryConversations){return}const t=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[t];if(!o){return}await this.loadHistoryConversations(o,t)};handleSelectConversation=e=>{this.conversationId=e;this.isHistoryDrawerOpen=false;this.showChatModal=true};handleFileChange=e=>{const t=e.target;if(t.files&&t.files.length>0){this.selectedFile=t.files[0]}};handleUploadClick=()=>{const e=this.hostElement.shadowRoot?.querySelector(".file-input");e?.click()};clearSelectedFile=()=>{this.selectedFile=null;this.uploadedFileInfo=null;const e=this.hostElement.shadowRoot?.querySelector(".file-input");if(e){e.value=""}};async uploadFile(){if(!this.selectedFile)return;this.isUploading=true;try{const e=await m(this.selectedFile,{},{tags:["other"]});this.uploadedFileInfo=e;this.uploadSuccess.emit(e)}catch(e){console.error("文件上传错误:",e);this.clearSelectedFile();I.captureError(e,{action:"uploadFile",component:"pcm-msbg-modal",title:"文件上传失败"});this.someErrorEvent.emit({error:e,message:"文件上传失败,请重试"})}finally{this.isUploading=false}}handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleStartInterview=async()=>{if(!this.selectedFile){alert("请上传面试内容");return}if(!this.customInputs?.job_info&&!this.jobDescription.trim()){alert("请输入职位描述");return}this.isSubmitting=true;try{if(!this.uploadedFileInfo){await this.uploadFile();if(!this.uploadedFileInfo){this.isSubmitting=false;return}}this.showChatModal=true}catch(e){console.error("开始面试时出错:",e);I.captureError(e,{action:"handleStartInterview",component:"pcm-msbg-modal",title:"开始面试时出错"});this.someErrorEvent.emit({error:e,message:"开始面试时出错,请重试"})}finally{this.isSubmitting=false}};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&this.customInputs.file_urls);const s=Boolean(this.customInputs?.file_urls&&this.customInputs?.job_info);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((e=>i("div",{key:e.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(e.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},e.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&i("span",{class:"message-count"},e.message_count,"条消息"),e.status&&i("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&!s&&i("div",{class:"input-container"},!r&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&i("div",{class:"resume-upload-section"},i("label",null,"上传面试内容"),i("div",{class:"upload-area",onClick:this.handleUploadClick},this.selectedFile?i("div",{class:"file-item"},i("div",{class:"file-item-content"},i("span",{class:"file-icon"},"📝"),i("span",{class:"file-name"},this.selectedFile.name)),i("button",{class:"remove-file",onClick:e=>{e.stopPropagation();this.clearSelectedFile()}},"×")):i("div",{class:"upload-placeholder"},i("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),i("p",{class:"upload-text"},"点击上传面试内容"),i("p",{class:"upload-hint"},"支持 mp3、markdown、pdf、docx、doc、md 格式")))),i("button",{class:"submit-button",disabled:!a&&!this.selectedFile||!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003"))),i("input",{type:"file",class:"file-input",onChange:this.handleFileChange})),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,showChatInput:this.showChatInput,botId:"3022316191018877",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_urls:this.customInputs?.file_urls||this.uploadedFileInfo?.cos_key,file_names:this.customInputs?.file_names||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||this.jobDescription},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Rr.style=Mr+(Dr+Br);const Or=".iframe-container{width:100%;height:85vh}.iframe-container iframe{width:100%;height:100%}.step-section{margin-bottom:20px}.step-title{font-size:14px;font-weight:600;color:#333;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid #e8e8e8}.mode-options{display:grid;grid-template-columns:repeat(2, 1fr);gap:8px}.mode-option{padding:16px;border:2px solid #e2e8f0;border-radius:8px;cursor:pointer;transition:all 0.2s ease}.mode-option:hover{border-color:#94a3b8}.mode-option.selected{border-color:#0D75FB;background-color:#f0f7ff}.option-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.option-title{font-weight:600;color:#333}.check-icon{color:#0D75FB;font-size:16px}.option-desc{font-size:14px;color:#666}.option-suitable{font-size:12px;color:#999}.output-options{display:flex;flex-direction:column;gap:12px}.output-option{padding:12px 16px;border:2px solid #e2e8f0;border-radius:8px;cursor:pointer;transition:all 0.2s ease}.output-option:hover{border-color:#94a3b8}.output-option.selected{border-color:#0D75FB;background-color:#f0f7ff}.option-time{font-size:12px;color:#999}.jd-hint{padding:12px;background-color:#f6f8fa;border-radius:8px;text-align:center}.jd-hint p{font-size:14px;color:#666;margin:0}.form-hint{font-size:12px;color:#fa8c16;text-align:center;margin-top:8px}.form-hint.warning{color:#fa8c16}@media screen and (max-width: 768px){.mode-options{grid-template-columns:1fr}}";const Hr='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Ar=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Lr=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.getResumeData=t(this,"getResumeData");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="千岗千简历";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请帮我优化简历";getResumeData;hideExportButton=false;exportButtonText="导出简历json数据";fullscreen=false;customInputs={};showWorkspaceHistory=false;showChatInput=true;showInputHistory=false;mobileUploadAble=false;mobileJdInputAble=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";autoStart;isUploading=false;uploadedFileInfo=null;showChatModal=false;showIframe=false;isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;_internalConversationId;selectedOptimizationMode="";selectedOutputType=null;get hostElement(){return o(this)}jobDescription="";isSubmitting=false;_iframeEl;tokenInvalidListener;removeErrorListener;_historyConversationPageSize=10;pcmUploadRef;optimizationModes=[{id:"targeted",title:"针对性优化",desc:"基于具体职位描述进行优化",suitable:"有明确目标职位"},{id:"general",title:"通用优化",desc:"提升简历整体质量和专业度",suitable:"广撒网投递"}];outputTypes=[{id:0,title:"直接改写",desc:"给我优化后的完整简历",time:"2-3分钟"},{id:1,title:"改进建议",desc:"告诉我哪里需要改,怎么改",time:"1-2分钟"},{id:2,title:"深度分析",desc:"全面诊断+建议+改写",time:"3-5分钟"}];handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.showIframe=false;this.jobDescription="";this.uploadedFileInfo=null;this.isUploading=false;this.isSubmitting=false;this._internalConversationId=undefined;this.selectedOptimizationMode="";this.conversationId=undefined;this.selectedOutputType=null}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}if(this.customInputs){if(this.customInputs.optimization_type!==undefined&&this.customInputs.optimization_type!==""){this.selectedOutputType=Number(this.customInputs.optimization_type)}if(!!this.customInputs.job_info){this.selectedOptimizationMode="targeted"}}await f(this.token);if(this.currentConversationId||this.getShouldAutoStart()){this.showChatModal=true;this.showIframe=false}}}get currentConversationId(){return this.conversationId||this._internalConversationId}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}handleStreamComplete=e=>{this._internalConversationId=e.detail.conversation_id};componentDidLoad(){window.addEventListener("message",this.handleIframeMessage)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}window.removeEventListener("message",this.handleIframeMessage)}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(e,t)=>{this.isLoadingConversations=true;const o=await T("45444431062634496","pcm-qgqjl-modal",e,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,t+1);if(o.hasMore&&o.nextCursor){i[t+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=t;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async e=>{if(e==="prev"){if(this.historyConversationPageIndex===0){return}const e=this.historyConversationPageIndex-1;const t=this.historyConversationCursorStack[e]||"";await this.loadHistoryConversations(t,e);return}if(!this.hasMoreHistoryConversations){return}const t=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[t];if(!o){return}await this.loadHistoryConversations(o,t)};handleSelectConversation=e=>{this.conversationId=e.id;this.selectedOutputType=e.inputs?.optimization_type??0;this.isHistoryDrawerOpen=false;this.showChatModal=true;this.showIframe=false};closeResumeChat=()=>{this.showIframe=true;this.showChatModal=false};handleIframeLoad=()=>{};handleIframeMessage=e=>{const t=["http://localhost:3000",c];if(!t.includes(e.origin))return;const{type:o,value:i}=e.data||{};if(o==="callParentMethod"){this.exampleMethodFromIframe(i)}if(o==="iframeReady"&&this._iframeEl?.contentWindow){const e=new URL(this._iframeEl.src).origin;this._iframeEl.contentWindow.postMessage({type:"parentReady",origin:window.location.origin},e);this._iframeEl.contentWindow.postMessage({type:"setToken",token:this.token},e);this._iframeEl.contentWindow.postMessage({type:"buttonConfig",config:{hideExportButton:this.hideExportButton,exportButtonText:this.exportButtonText}},e)}};exampleMethodFromIframe(e){this.getResumeData.emit(JSON.parse(e))}handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleOptimizationModeChange=e=>{this.selectedOptimizationMode=e};handleOutputTypeChange=e=>{this.selectedOutputType=e};getShouldAutoStart=()=>{const e=Boolean(this.customInputs?.file_url||this.customInputs?.resume_content);const t=Boolean(this.customInputs?.job_info);const o=this.customInputs?.optimization_type!==undefined;if(this.autoStart!==undefined){if(this.autoStart===true){return e}else{return e&&t&&o}}return e&&t};isFormValid=()=>{if(this.customInputs?.optimization_type!==undefined){const e=this.customInputs?.file_url||this.customInputs?.resume_content||this.uploadedFileInfo;return Boolean(e)}const e=this.customInputs?.file_url||this.customInputs?.resume_content||this.uploadedFileInfo;const t=e&&this.selectedOptimizationMode&&this.selectedOutputType!==null;if(this.selectedOptimizationMode==="targeted"){return t&&Boolean(this.customInputs?.job_info||this.jobDescription.trim())}return t};handleStartInterview=async()=>{if(!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo){j.info("请上传简历");return}if(!this.customInputs?.optimization_type){if(!this.selectedOptimizationMode){j.info("请选择优化模式");return}if(this.selectedOutputType===null){j.info("请选择输出方式");return}}if(this.selectedOptimizationMode==="targeted"&&!this.customInputs?.job_info&&!this.jobDescription.trim()){j.info("针对性优化需要提供职位描述");return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};getEffectiveOptimizationType=()=>{const e=this.customInputs?.optimization_type??(this.selectedOutputType??0);return typeof e==="string"?Number(e):e};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":!this.showIframe};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.currentConversationId&&!this.showChatModal;const r=Boolean(this.customInputs?.job_info);const a=Boolean(this.customInputs?.optimization_type);const s=Boolean(this.selectedOptimizationMode);const l=!s||this.selectedOptimizationMode==="general"&&Boolean(this.customInputs?.file_url||this.customInputs?.resume_content)||this.selectedOptimizationMode==="targeted"&&Boolean(this.customInputs?.job_info)&&Boolean(this.customInputs?.file_url||this.customInputs?.resume_content);const d=Boolean(this.customInputs&&this.customInputs.job_info);const p=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const h=this.getShouldAutoStart();return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((e=>i("div",{key:e.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(e)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},e.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&i("span",{class:"message-count"},e.message_count,"条消息"),e.status&&i("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.currentConversationId&&!h&&i("div",{class:"input-container"},!r&&i("div",{class:"step-section"},i("div",{class:"step-title"},"第一步:选择优化模式"),i("div",{class:"mode-options"},this.optimizationModes.map((e=>i("div",{class:{"mode-option":true,selected:this.selectedOptimizationMode===e.id},onClick:()=>this.handleOptimizationModeChange(e.id)},i("div",{class:"option-header"},i("span",{class:"option-title"},e.title),this.selectedOptimizationMode===e.id&&i("span",{class:"check-icon"},"✓")),i("div",{class:"option-desc"},e.desc),i("span",{class:"option-suitable"},"适合:",e.suitable)))))),!a&&this.selectedOptimizationMode&&i("div",{class:"step-section"},i("div",{class:"step-title"},"第二步:你希望得到什么?"),i("div",{class:"output-options"},this.outputTypes.map((e=>i("div",{class:{"output-option":true,selected:this.selectedOutputType===e.id},onClick:()=>this.handleOutputTypeChange(e.id)},i("div",{class:"option-header"},i("span",{class:"option-title"},e.title),this.selectedOutputType===e.id&&i("span",{class:"check-icon"},"✓")),i("div",{class:"option-desc"},e.desc),i("span",{class:"option-time"},"预计 ",e.time)))))),!l&&i("div",{class:"step-section"},i("div",{class:"step-title"},"第三步:提供材料"),!p&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("components-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),!d&&this.selectedOptimizationMode==="targeted"&&i("div",{class:"jd-input-section"},i("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&i("components-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}),i("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange}))),i("button",{class:"submit-button",disabled:!this.isFormValid()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),!a&&!this.selectedOptimizationMode&&i("div",{class:"form-hint"},"请先选择优化模式和输出方式"),!a&&this.selectedOptimizationMode&&this.selectedOutputType===null&&i("div",{class:"form-hint"},"请选择输出方式"),s&&!p&&!this.uploadedFileInfo&&i("div",{class:"form-hint warning"},"请上传简历文件"),this.selectedOptimizationMode==="targeted"&&!d&&!this.jobDescription.trim()&&s&&i("div",{class:"form-hint warning"},"针对性优化需要提供职位描述"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&!this.showIframe&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,this.getEffectiveOptimizationType()===1||this.getEffectiveOptimizationType()===2?i("components-thousand-resume-wrapper",{isOpen:true,token:this.token,conversationId:this.currentConversationId,botId:"45444431062634496",optimizationType:this.getEffectiveOptimizationType(),customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||(this.selectedOptimizationMode==="targeted"?this.jobDescription:""),job_title:this.customInputs?.job_title||"",optimization_type:this.getEffectiveOptimizationType()},defaultQuery:this.defaultQuery,modalTitle:this.modalTitle,icon:this.icon,fullscreen:this.fullscreen,zIndex:this.zIndex,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,onModalClosed:this.handleClose,onConversationStart:e=>this.handleStreamComplete(e),onStreamComplete:e=>this.handleStreamComplete(e),onInterviewComplete:e=>this.handleStreamComplete(e)}):i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,fullscreen:this.fullscreen,showWorkspaceHistory:this.showWorkspaceHistory,showChatInput:this.showChatInput,botId:"45444431062634496",conversationId:this.currentConversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,closeResume:this.closeResumeChat,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,job_info:this.customInputs?.job_info||(this.selectedOptimizationMode==="targeted"?this.jobDescription:""),job_title:this.customInputs?.job_title||"",optimization_type:this.getEffectiveOptimizationType()},interviewMode:"text",onStreamComplete:this.handleStreamComplete,onHistoryConversationSelect:e=>{if(e.detail?.inputs?.optimization_type==1||e.detail?.inputs?.optimization_type==2){e.preventDefault();this.handleSelectConversation(e.detail)}}})),this.showIframe&&i(i.Fragment,null,i("div",{class:"iframe-container"},i("iframe",{ref:e=>this._iframeEl=e,src:`${c}/myresume?conversation_id=${this.currentConversationId}&isSdk=true`,frameborder:"0",onLoad:this.handleIframeLoad})))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Lr.style=Or+(Hr+Ar);const Pr=":host{display:block;font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;overflow:hidden;padding:0;z-index:1000}.fullscreen-overlay{padding:0;position:absolute;width:100%;height:100%}.modal-container{background:#fff;border-radius:0;width:100%;height:100%;display:flex;flex-direction:column;position:relative;margin:0;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.digital-human-background{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;overflow:hidden;display:flex;justify-content:center}.digital-human-background-video{width:100%;height:100%;object-fit:cover;object-position:center;max-width:1200px}.modal-container:not(.digital-human-mode){background:white;border-radius:8px;width:100%;max-width:900px;height:90vh;max-height:800px}.modal-content-layer{position:relative;z-index:10;height:100%;display:flex;flex-direction:column;background:linear-gradient(\r\n 180deg,\r\n rgba(0, 0, 0, 0.3) 0%,\r\n rgba(0, 0, 0, 0.1) 20%,\r\n rgba(0, 0, 0, 0.1) 80%,\r\n rgba(0, 0, 0, 0.4) 100%\r\n )}.main-content{display:flex;flex-direction:column;align-items:center;overflow:hidden;padding:24px 24px 40px 24px;position:absolute;bottom:0px;width:-webkit-fill-available}.chat-history-section{width:100%;max-width:800px;text-align:center;color:white}.ai-message-item{padding:12px 20px;border-radius:12px;margin-bottom:12px;animation:fadeIn 0.5s ease-in-out}.recording-preview-top-right{position:absolute;top:20px;right:20px;width:180px;height:120px;border-radius:12px;overflow:hidden;border:2px solid rgba(255, 255, 255, 0.5);box-shadow:0 4px 12px rgba(0, 0, 0, 0.3);background-color:#000;z-index:10}.user-video-preview{width:100%;height:100%;object-fit:cover}.recording-status-bar{display:flex;align-items:center;justify-content:space-between;background-color:white;padding:8px 12px;border-radius:999px;margin-top:4px;width:100%;max-width:400px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1);animation:slideInUp 0.5s ease-out;line-height:40px}.audio-waveform{display:flex;align-items:center;height:24px}.waveform-bar{width:4px;margin:0 2px;background-color:#16a34a;border-radius:2px;height:6px;animation:waveform-animation 1.2s infinite ease-in-out}.waveform-bar:nth-child(1){animation-delay:0.1s}.waveform-bar:nth-child(2){animation-delay:0.3s}.waveform-bar:nth-child(3){animation-delay:0.5s}.waveform-bar:nth-child(4){animation-delay:0.2s}.waveform-bar:nth-child(5){animation-delay:0.4s}.waveform-bar:nth-child(6){animation-delay:0.1s}.waveform-bar:nth-child(7){animation-delay:0.3s}.waveform-bar:nth-child(8){animation-delay:0.5s}@keyframes waveform-animation{0%,100%{height:6px}50%{height:35px}}.recording-timer{font-size:14px;color:#595959;font-family:'Courier New', Courier, monospace}.finish-recording-btn{background-color:#16a34a;border:none;border-radius:50%;width:32px;height:32px;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);transition:background-color 0.3s,\r\n transform 0.2s}.finish-recording-btn:hover{background-color:#148a3f}.finish-recording-btn:active{transform:scale(0.95)}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideInUp{from{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}.status-indicator-text{display:flex;align-items:center;gap:8px;font-size:14px;color:#595959;width:100%;justify-content:center}.status-indicator-text.loading .loading-spinner-small{width:16px;height:16px;border:2px solid rgba(0, 0, 0, 0.1);border-top-color:#595959;border-radius:50%;animation:spin 0.8s linear infinite}.status-indicator-text.error{color:#ff4d4f}.status-indicator-text.ready{color:#16a34a}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.loading-spinner-small{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#6b7280;border-radius:50%;animation:spin 0.8s linear infinite}.upload-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;color:#666;border-radius:4px;transition:background-color 0.2s}.upload-button:hover{background-color:rgba(0, 0, 0, 0.04)}.upload-button svg{width:20px;height:20px}.file-input{display:none}.selected-file{font-size:12px;color:#666;margin-left:8px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{flex:1;display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;padding:0 4px;background:white}.input-wrapper input{border:none;flex:1;padding:8px;outline:none}.input-wrapper:focus-within{border-color:#bbb}.file-preview{padding:8px 16px;border-top:1px solid #eee;background-color:#f9f9f9}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding:10px 20px 0px 20px;border-radius:14px 14px 0 0;flex:0 0 auto}.recording-section .video-preview{width:100%;height:200px;max-width:400px;position:relative;margin-bottom:10px;border:1px solid #ddd;border-radius:12px;overflow:hidden}.recording-section video{width:100%;height:100%;object-fit:cover}.recording-status{position:absolute;top:10px;left:10px;background-color:rgba(0, 0, 0, 0.6);color:white;padding:4px 8px;border-radius:4px;display:flex;align-items:center;gap:5px;font-size:14px;z-index:0}.recording-status .recording-dot{display:inline-block;width:10px;height:10px;background-color:red;border-radius:50%;margin-right:5px;animation:blink 1s infinite}.recording-status.warning{color:#ff4d4f;animation:blink 1s infinite}@keyframes blink{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}.recording-section .stop-recording-button{background-color:#f44336;color:white;border:none;cursor:pointer;font-weight:bold}.recording-section .stop-recording-button:hover{background-color:#d32f2f}.fullscreen{width:100vw;border-radius:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.recording-controls{margin-top:10px;height:53px;width:100%;max-width:400px;display:flex;justify-content:center}.recording-controls .waiting-message{text-align:center;color:white;font-size:16px;background-color:#0d75fb;border-radius:6px;width:95%;display:flex;justify-content:center;align-items:center;cursor:pointer}.recording-controls .waiting-message.loading{background:#faad14}.recording-controls .waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-controls .stop-recording-button{background-color:#dc3545;color:white;border:none;cursor:pointer;font-size:16px}.recording-controls .stop-recording-button:hover{background-color:#c82333}.recording-controls .stop-recording-button.disabled{background:#ccc;cursor:not-allowed}.recording-controls .stop-recording-button.disabled:hover{background:#ccc}.progress-container{display:flex;justify-content:space-between;align-items:center;width:100%;max-width:400px;margin-top:10px;padding:0 5px}.progress-bar-container{height:4px;background-color:#e5e5e5;border-radius:2px;overflow:hidden;margin-right:10px;width:75px}.progress-bar{height:100%;background-image:linear-gradient(111deg, #4a9fff 0%, #1058ff 100%);border-radius:2px;transition:width 0.3s ease}.progress-text{font-size:14px;color:#666;white-space:nowrap}.text-input-area{display:flex;flex-direction:column;width:100%;height:100%;padding:0px 16px 16px 16px;border-radius:8px;border:none;}.text-answer-input{flex:1;min-height:80px;padding:12px 12px 0px 12px;border:1px solid #ddd;border-radius:8px 8px 0 0;resize:none;font-size:16px;background-color:#fff;border-bottom:none;outline:none;}.input-toolbar{display:flex;justify-content:flex-end;align-items:center;padding:8px 12px;background-color:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 8px 8px}.text-answer-input:focus{border-color:rgb(74, 144, 226);border-bottom:none}.text-answer-input:focus+.input-toolbar{border-color:rgb(74, 144, 226);border-top:none}.toolbar-actions{width:32px;height:32px;display:flex;justify-content:center;align-items:center;margin-right:10px;border:1px solid #d9d9d9;border-radius:6px}.toolbar-actions:hover{background-color:#f0f0f0}.toolbar-button{background:transparent;border:none;color:#666;cursor:pointer;padding:0;margin:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.toolbar-button>div,.toolbar-button>svg{display:flex;justify-content:center;align-items:center}.submit-text-button{padding:6px 16px;background-color:#4a90e2;color:white;border:none;border-radius:4px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color 0.2s}.submit-text-button:hover:not(.disabled){background-color:#3a7bc8}.submit-text-button.disabled{background-color:#b3b3b3;cursor:not-allowed}.toolbar-button.recording{background-color:rgba(255, 0, 0, 0.1);color:#ff3b30;animation:pulse 1.5s infinite}.toolbar-button.converting{background-color:rgba(0, 122, 255, 0.1);color:#007aff}.toolbar-button .recording-time{font-size:12px;margin-left:4px}.converting-indicator{display:flex;justify-content:center;align-items:center}.converting-indicator svg{animation:spin 1.5s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0.4)}70%{box-shadow:0 0 0 6px rgba(255, 0, 0, 0)}100%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0)}}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:0}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.workspace-section{width:100%;padding:0px 16px 16px}.workspace-toolbar{display:flex;justify-content:space-between;align-items:end;gap:12px;position:relative}.workspace-button{display:flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #d9d9d9;border-radius:6px;background:white;color:#666;font-size:14px;cursor:pointer;transition:all 0.2s ease;box-shadow:0 1px 2px rgba(0, 0, 0, 0.05)}.workspace-button:hover{border-color:#4096ff;color:#4096ff;box-shadow:0 2px 4px rgba(64, 150, 255, 0.1)}.workspace-button svg{flex-shrink:0}.digital-human-wrapper{display:flex;align-items:center;justify-content:center;width:120px;height:80px;border:1px solid #d9d9d9;border-radius:8px;background:#fafafa;overflow:hidden;position:absolute;right:0px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-item.active{background:#e6f7ff;border-color:#1890ff}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.current-indicator{flex-shrink:0;color:#1890ff;margin-left:8px}.ai-message-item{margin-bottom:0;animation:messageSlideIn 0.3s ease-out;width:100%;padding:20px}.ai-message-item.streaming{position:relative}@keyframes messageSlideIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.ai-message-content{color:#fff;padding:20px 24px;border-radius:16px;font-size:16px;line-height:1.6;word-wrap:break-word;backdrop-filter:blur(100px);border:1px solid rgba(255, 255, 255, 0.2);box-shadow:0 4px 20px rgba(0, 0, 0, 0.2);margin-bottom:8px;max-width:100%;text-align:left}.typing-indicator{display:flex;align-items:center;gap:4px;padding:8px 24px;margin-top:-8px}.typing-indicator span{width:8px;height:8px;border-radius:50%;background:#4facfe;animation:typingPulse 1.4s ease-in-out infinite;opacity:0.6}.typing-indicator span:nth-child(1){animation-delay:0s}.typing-indicator span:nth-child(2){animation-delay:0.2s}.typing-indicator span:nth-child(3){animation-delay:0.4s}@keyframes typingPulse{0%,60%,100%{transform:scale(1);opacity:0.4}30%{transform:scale(1.3);opacity:1}}@media screen and (max-width: 768px){.ai-message-content{padding:14px 18px;font-size:15px}}@media screen and (max-width: 480px){.ai-message-content{padding:12px 16px;font-size:14px;line-height:1.4}.typing-indicator{padding:6px 16px}.typing-indicator span{width:6px;height:6px}}@media screen and (max-width: 768px){.ai-message-item{padding:15px}.ai-message-content{padding:16px 20px;font-size:15px}.typing-indicator{padding:6px 20px}}@media screen and (max-width: 480px){.ai-message-item{padding:0px}.ai-message-content{padding:14px 18px;font-size:14px;line-height:1.5}.typing-indicator{padding:5px 18px}.typing-indicator span{width:6px;height:6px}}.waveform-bar{width:3px;background:#4facfe;border-radius:2px;min-height:2px;animation:waveformAnimation 1.2s ease-in-out infinite alternate;transform-origin:bottom}@keyframes waveformAnimation{0%{transform:scaleY(0.2)}100%{transform:scaleY(1)}}.recording-timer{font-size:14px;color:#666;white-space:nowrap}.close-button{position:absolute;top:16px;left:16px;z-index:20;background:rgba(255, 255, 255, 0.9);backdrop-filter:blur(4px);border:1px solid rgba(0, 0, 0, 0.1);border-radius:8px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.2s ease;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1)}.close-button:hover{background:rgba(255, 255, 255, 1);border-color:rgba(0, 0, 0, 0.15);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);transform:translateY(-1px)}.close-button:active{transform:translateY(0);box-shadow:0 2px 6px rgba(0, 0, 0, 0.1)}.close-button svg{color:#666;transition:color 0.2s ease}.close-button:hover svg{color:#333}.end-interview-button-container{display:flex;align-items:center;justify-content:flex-start;width:100%;max-width:400px;margin-bottom:4px;padding-left:0}.end-interview-button{padding:5px 10px;background-color:#ff4d4f;color:white;border:none;border-radius:20px;font-size:14px;font-weight:500;cursor:pointer;transition:all 0.3s ease;box-shadow:0 2px 8px rgba(255, 77, 79, 0.3);white-space:nowrap}.end-interview-button:hover{background-color:#ff7875;box-shadow:0 4px 12px rgba(255, 77, 79, 0.4);transform:translateY(-1px)}.end-interview-button:active{transform:translateY(0);box-shadow:0 2px 8px rgba(255, 77, 79, 0.3)}.end-interview-button:disabled{background-color:#f0f0f0;color:#bfbfbf;cursor:not-allowed;box-shadow:none;transform:none}";const qr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const $r=class{constructor(o){e(this,o);this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.interviewComplete=t(this,"interviewComplete");this.recordingError=t(this,"recordingError");this.recordingStatusChange=t(this,"recordingStatusChange");this.tokenInvalid=t(this,"tokenInvalid");this.modalClosed=t(this,"modalClosed")}token;isOpen=false;messages=[];zIndex;conversationId;isLoading=false;currentStreamingMessage=null;isLoadingHistory=false;get hostElement(){return o(this)}streamComplete;conversationStart;defaultQuery="你好!聘才猫";maxRecordingTime=120;countdownWarningTime=30;isRecording=false;recordingStream=null;recordedBlob=null;mediaRecorder=null;recordingTimeLeft=0;showRecordingUI=false;recordingTimer=null;recordingStartTime=0;waitingToRecord=false;waitingTimer=null;_visibilityChangeHandler=null;waitingTimeLeft=10;videoRef=null;currentQuestionNumber=0;interviewComplete;showCountdownWarning=false;fullscreen=false;isUploadingVideo=false;digitalHumanVideoUrl="";digitalHumanDefaultVideoUrl="";virtualmanKey="";isPlayingDigitalHumanVideo=false;digitalHumanVideoReady=false;digitalHumanOpeningContents=[];isPlayingWelcomeVideo=false;isGeneratingDigitalHumanVideo=false;pendingGeneratedVideoUrl="";preloadedVideos=new Set;preloadingVideos=new Map;waitingForDigitalHuman=false;digitalId;openingIndex=0;waitingTime=10;playbackRate=1;showEndInterviewButton=false;recordingError;recordingStatusChange;tokenInvalid;modalClosed;customInputs={};botId;agentLogo="";isTaskCompleted=false;tokenInvalidListener;deviceError=null;showConfirmModal=false;skipConfirmThisInterview=false;showCloseConfirmModal=false;showEndInterviewConfirmModal=false;isEndingInterview=false;isComponentActive=true;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async setComponentActive(e){this.isComponentActive=e}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}else{const e=d.getItem("modal-zIndex");if(e){this.zIndex=e}else{this.zIndex=1e3;d.setItem("modal-zIndex",1e3)}}if(this.token){h.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};document.addEventListener("pcm-token-invalid",this.tokenInvalidListener);this._visibilityChangeHandler=()=>{if(document.visibilityState==="visible"){this.handlePageResume()}};document.addEventListener("visibilitychange",this._visibilityChangeHandler);if(!this.customInputs){this.customInputs={}}if(this.botId){this.fetchAgentLogo()}console.log("componentWillLoad - 数字人相关状态:",{digitalId:this.digitalId,isOpen:this.isOpen,conversationId:this.conversationId,virtualmanKey:this.virtualmanKey});if(this.isOpen){if(this.conversationId){setTimeout((()=>this.loadHistoryMessages()),0)}else{if(this.digitalId){this.initializeDigitalHuman()}setTimeout((()=>{this.sendMessageToAPI(this.defaultQuery)}),0)}}}async fetchAgentLogo(){if(!this.botId)return;try{const e=await k(this.botId);if(e&&e.logo){this.agentLogo=e.logo}}catch(e){I.captureError(e,{action:"fetchAgentLogo",component:"pcm-virtual-chat-modal",title:"获取智能体信息失败"});C.emitError({error:e,message:"获取智能体信息失败"})}}async sendMessageToAPI(e,t){if(this.isTaskCompleted&&!this.isEndingInterview){return}this.waitingForDigitalHuman=false;this.digitalHumanVideoReady=false;this.isLoading=true;let o="";let i="";const n=new Date;const r=`${n.getHours()}:${n.getMinutes().toString().padStart(2,"0")}`;const a=e.trim()||"请开始";if(t){this.customInputs={...this.customInputs,video_url:t}}if(!this.customInputs.url_callback){this.customInputs={...this.customInputs,url_callback:"https://tagents.ylzhaopin.com/agents/api/test/callback"}}const s={id:`temp-${Date.now()}`,conversation_id:this.conversationId,inputs:this.customInputs||{},query:a,answer:"",message_files:[],feedback:{},retriever_resources:[],created_at:Math.floor(Date.now()/1e3).toString(),agent_thoughts:[],status:"normal",error:null,time:r,isStreaming:true};this.currentStreamingMessage=s;const l={response_mode:"streaming",conversation_id:this.conversationId,query:a,bot_id:this.botId};l.inputs={...this.customInputs};await u({url:"/sdk/v1/chat/chat-messages",method:"POST",data:l,onMessage:e=>{if(e.conversation_id&&!this.conversationId){this.conversationId=e.conversation_id;this.conversationStart.emit({conversation_id:e.conversation_id,event:e.event,message_id:e.message_id,id:e.id})}if(e.event==="node_finished"&&e.data.inputs&&e.data.inputs.LLMText){i=e.data.inputs.LLMText}if(e.event==="node_finished"&&e.data.title&&e.data.title.includes("聘才猫任务结束")){this.isTaskCompleted=true;const e=i||o||this.currentStreamingMessage?.answer||"";this.interviewComplete.emit({conversation_id:this.conversationId,current_question_number:this.currentQuestionNumber,ai_response:e})}if(e.event==="node_finished"&&e.data.title&&e.data.title.includes("聘才猫数字人题目")){const t=JSON.parse(e.data.process_data.digital_human_list);this.precreateDigitalHumanVideos(t)}if(e.event==="error"){const t=e.data?.message||e.message||"请求失败";this.messages=[...this.messages,{...s,answer:t,error:e.data,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false;C.emitError({error:e.data,message:t});return}if(e.event==="message"){if(e.event==="agent_message"||e.event==="message"){if(e.answer){o+=e.answer;const t={...this.currentStreamingMessage,answer:o,id:e.message_id||this.currentStreamingMessage.id,isStreaming:true,retriever_resources:e.retriever_resources||this.currentStreamingMessage.retriever_resources,agent_thoughts:e.agent_thoughts||this.currentStreamingMessage.agent_thoughts};this.currentStreamingMessage=t}}}if(e.event==="message_end"){this.streamComplete.emit({conversation_id:e.conversation_id||"",event:e.event,message_id:e.message_id,id:e.id})}},onError:e=>{console.error("发生错误:",e);C.emitError({error:e,message:"消息发送失败,请稍后再试"});I.captureError(e,{action:"sendMessageToAPI",component:"pcm-virtual-chat-modal",title:"消息发送失败"});this.messages=[...this.messages,{...s,answer:"消息发送失败,请检查网络。",error:e,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false},onComplete:async()=>{this.isLoading=false;if(this.currentQuestionNumber===0){setTimeout((()=>{if(this.customInputs){delete this.customInputs.job_info;delete this.customInputs.file_url;delete this.customInputs.file_name}}),1e3)}const e=this.currentStreamingMessage;e.isStreaming=false;if(this.digitalId&&e&&e.answer){this.generateDigitalHumanVideo(e.answer)}this.currentStreamingMessage=null;this.messages=[...this.messages,e];this.currentQuestionNumber++;if(this.isTaskCompleted||this.isEndingInterview){return}if(this.digitalId){this.waitingForDigitalHuman=true}}})}async loadHistoryMessages(){if(!this.conversationId)return;this.isLoadingHistory=true;let e=false;this.digitalHumanVideoReady=true;try{const t=await a({url:`/sdk/v1/chat/conversation`,method:"GET",data:{conversation_id:this.conversationId}});if(t.success&&t.data&&t.data.run_status=="结束"){e=true}const o=await a({url:"/sdk/v1/chat/messages",method:"GET",data:{conversation_id:this.conversationId,bot_id:this.botId,limit:20}});if(o.success&&o.data){const e=o.data.data||[];const t=e.map((e=>{const t=new Date(parseInt(e.created_at)*1e3);const o=t.getHours().toString().padStart(2,"0");const i=t.getMinutes().toString().padStart(2,"0");const n=`${o}:${i}`;return{id:e.id,conversation_id:e.conversation_id,inputs:e.inputs||{},query:e.query||"",answer:e.answer||"",message_files:e.message_files||[],feedback:e.feedback||{},retriever_resources:e.retriever_resources||[],created_at:e.created_at,agent_thoughts:e.agent_thoughts||[],status:e.status||"normal",error:e.error,time:n,isStreaming:false}}));this.messages=t;this.currentQuestionNumber=t.length||0}}catch(e){console.error("加载历史消息或会话状态失败:",e);I.captureError(e,{action:"loadHistoryMessages",component:"pcm-virtual-chat-modal",title:"加载历史消息失败"});C.emitError({error:e,message:"加载历史消息失败,请刷新重试"})}finally{this.isLoadingHistory=false;if(this.conversationId&&this.messages.length>0&&!e&&!this.isEndingInterview){this.isPlayingDigitalHumanVideo=false;this.isPlayingWelcomeVideo=false;this.digitalHumanVideoReady=true;this.initializeDigitalHuman().then((()=>{if(this.digitalHumanDefaultVideoUrl){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl}}));setTimeout((()=>{this.startWaitingToRecord()}),200)}else if(e){this.isTaskCompleted=true;if(this.digitalId){this.isPlayingDigitalHumanVideo=false;this.isPlayingWelcomeVideo=false;this.digitalHumanVideoReady=true;this.initializeDigitalHuman().then((()=>{if(this.digitalHumanDefaultVideoUrl){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl}}))}}}}startWaitingToRecord(){if(this.isTaskCompleted||this.isEndingInterview){return}if(this.waitingTimer){clearInterval(this.waitingTimer)}if(this.recordingTimer){clearInterval(this.recordingTimer)}this.waitingToRecord=true;this.waitingTimeLeft=this.waitingTime;this.waitingTimer=setInterval((()=>{this.waitingTimeLeft--;if(this.waitingTimeLeft<=0){clearInterval(this.waitingTimer);this.waitingTimer=null;this.waitingToRecord=false;this.startRecording()}}),1e3)}async startRecording(){if(this.isTaskCompleted||this.isEndingInterview){return}try{const e=await navigator.mediaDevices.getUserMedia({audio:true,video:{width:{ideal:1280},height:{ideal:720},frameRate:{ideal:30}}});this.deviceError=null;this.recordingStream=e;this.showRecordingUI=true;this.showCountdownWarning=false;this.videoRef=null;this.setupVideoPreview(e);const t=z();let o;try{o=new MediaRecorder(e,{mimeType:t,videoBitsPerSecond:8e5,audioBitsPerSecond:64e3})}catch(t){console.warn("指定的MIME类型不受支持,使用默认设置:",t);try{o=new MediaRecorder(e,{videoBitsPerSecond:8e5,audioBitsPerSecond:64e3})}catch(t){try{o=new MediaRecorder(e)}catch(e){this.recordingError.emit({type:"recorder_creation_failed",message:"无法创建媒体录制器,您的浏览器可能不支持此功能",details:e});this.showRecordingUI=false;return}}}this.mediaRecorder=o;const i=[];o.ondataavailable=e=>{if(e.data.size>0){i.push(e.data)}};o.onerror=e=>{this.recordingError.emit({type:"recording_error",message:"录制过程中发生错误",details:e});this.stopRecording()};o.onstop=()=>{try{const e=t||"video/mp4";const o=new Blob(i,{type:e});if(o.size===0){this.recordingError.emit({type:"empty_recording",message:"录制的视频为空"});this.showRecordingUI=false;return}this.recordedBlob=o;this.recordingStatusChange.emit({status:"stopped",details:{duration:Math.floor((Date.now()-this.recordingStartTime)/1e3),size:o.size,type:o.type}});this.uploadRecordedVideo()}catch(e){this.recordingError.emit({type:"processing_error",message:"处理录制视频时出错",details:e});this.showRecordingUI=false;I.captureError(e,{action:"uploadRecordedVideo",component:"pcm-hr-chat-modal",title:"处理录制视频时出错"})}};try{o.start();this.isRecording=true;this.recordingStartTime=Date.now();this.recordingTimeLeft=this.maxRecordingTime;this.recordingStatusChange.emit({status:"started",details:{maxDuration:this.maxRecordingTime,mimeType:o.mimeType}})}catch(e){this.recordingError.emit({type:"start_failed",message:"开始录制失败,请检查您的设备权限",details:e});this.showRecordingUI=false;I.captureError(e,{action:"startRecording",component:"pcm-hr-chat-modal",title:"开始录制失败"});return}this.recordingTimer=setInterval((()=>{const e=Math.floor((Date.now()-this.recordingStartTime)/1e3);this.recordingTimeLeft=Math.max(0,this.maxRecordingTime-e);if(this.recordingTimeLeft<=this.countdownWarningTime&&!this.showCountdownWarning){this.showCountdownWarning=true}if(this.recordingTimeLeft<=0){this.stopRecording()}}),1e3)}catch(e){console.error("无法访问摄像头或麦克风:",e);let t="设备访问失败";if(e.name==="NotAllowedError"){t="请允许访问摄像头和麦克风权限"}else if(e.name==="NotFoundError"){t="未检测到摄像头或麦克风设备"}else if(e.name==="NotReadableError"){t="您的浏览器不支持视频录制,请切换到微信或Chrome、Edge使用"}else if(e.name==="OverconstrainedError"){t="摄像头不支持指定的配置"}else{t="无法访问摄像头或麦克风,请检查设备连接"}this.deviceError=t;this.showRecordingUI=false;C.emitError({error:e,message:t});I.captureError(e,{action:"startRecording",component:"pcm-virtual-chat-modal",title:t})}}setupVideoPreview(e){setTimeout((()=>{const t=this.hostElement.shadowRoot?.querySelector(".user-video-preview");if(t&&e){try{t.srcObject=e;t.play().catch((e=>{console.error("视频播放失败:",e);I.captureError(e,{action:"setupVideoPreview",component:"pcm-virtual-chat-modal",title:"视频播放失败"});C.emitError({error:e,message:"视频播放失败"})}))}catch(o){console.warn("设置srcObject失败,尝试替代方法:",o);try{const o=URL.createObjectURL(e);t.src=o;t.onended=()=>{URL.revokeObjectURL(o)}}catch(e){console.error("创建对象URL失败:",e);I.captureError(e,{action:"setupVideoPreview",component:"pcm-virtual-chat-modal",title:"创建对象URL失败"});C.emitError({error:e,message:"创建对象URL失败"})}}}else{console.warn("未找到视频元素或媒体流无效")}}),100)}stopRecording(){if(this.mediaRecorder&&this.isRecording){this.mediaRecorder.stop();this.isRecording=false;if(this.recordingTimer){clearInterval(this.recordingTimer);this.recordingTimer=null}if(this.recordingStream){this.recordingStream.getTracks().forEach((e=>e.stop()));this.recordingStream=null}this.videoRef=null}this.pendingGeneratedVideoUrl=""}handleStopRecording=()=>{if(this.skipConfirmThisInterview){this.stopRecording();return}this.showConfirmModal=true};handleSkipConfirmChange=e=>{const t=e.target;this.skipConfirmThisInterview=t.checked};handleConfirmModalCancel=()=>{this.showConfirmModal=false};handleConfirmModalOk=()=>{this.showConfirmModal=false;this.stopRecording()};handleConfirmModalCancelEvent=()=>{this.showConfirmModal=false};async uploadRecordedVideo(){if(!this.recordedBlob)return;try{this.isUploadingVideo=true;this.showRecordingUI=false;const e=this.recordedBlob.type.includes("webm")?"webm":"mp4";const t=`answer.${e}`;const o=new File([this.recordedBlob],t,{type:this.recordedBlob.type});const i=await m(o,{},{tags:["other"]});const n=await w(i.cos_key);if(this.isEndingInterview){await this.sendEndInterviewMessage()}else{this.sendMessageToAPI(n||"下一题",i.cos_key)}}catch(e){console.error("视频上传或处理错误:",e);this.isEndingInterview=false;I.captureError(e,{action:"uploadRecordedVideo",component:"pcm-virtual-chat-modal",title:"视频上传或处理失败"});C.emitError({error:e,message:"视频上传或处理失败"})}finally{this.isUploadingVideo=false;this.showRecordingUI=false;this.recordedBlob=null}}handleCloseClick=()=>{this.showCloseConfirmModal=true};handleCloseConfirmOk=()=>{this.showCloseConfirmModal=false;this.stopRecording();this.modalClosed.emit()};handleCloseConfirmCancel=()=>{this.showCloseConfirmModal=false};disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this._visibilityChangeHandler){document.removeEventListener("visibilitychange",this._visibilityChangeHandler);this._visibilityChangeHandler=null}if(this.waitingTimer){clearInterval(this.waitingTimer);this.waitingTimer=null}if(this.recordingTimer){clearInterval(this.recordingTimer);this.recordingTimer=null}this.stopRecording();this.preloadedVideos.clear();this.preloadingVideos.clear();this.pendingGeneratedVideoUrl=""}async precreateDigitalHumanVideos(e){if(!this.virtualmanKey){console.warn("VirtualmanKey尚未加载,无法预创建视频。");return}for(const t of e){if(!t||!t.trim())continue;try{await a({url:"/sdk/v1/virtual-human/create-video",method:"POST",data:{VirtualmanKey:this.virtualmanKey,InputSsml:t,SpeechParam:{Speed:1},VideoParam:{Format:"TransparentWebm"},DriverType:"Text"}})}catch(e){console.error(`为文本 "${t}" 创建视频任务失败:`,e);I.captureError(e,{action:"precreateDigitalHumanVideos",component:"pcm-virtual-chat-modal",title:`为文本 "${t}" 创建视频任务失败`})}}}async initializeDigitalHuman(){if(!this.digitalId)return;try{const e=await a({url:"/sdk/v1/virtual-human/avatar-detail",method:"POST",data:{avatar_id:this.digitalId}});if(e.success){const{placeholder_video_url:t,virtualman_key:o,opening_contents:i}=e.data;if(t){this.digitalHumanDefaultVideoUrl=t;this.digitalHumanVideoUrl=t}if(o){this.virtualmanKey=o}if(i&&Array.isArray(i)&&i.length>0){this.digitalHumanOpeningContents=i;const e=Math.max(0,Math.min(2,this.openingIndex||0));const o=this.digitalHumanOpeningContents[e]||this.digitalHumanOpeningContents[0];const n=[];if(o.video_url){n.push(o.video_url)}if(t&&t!==o.video_url){n.push(t)}this.handleVideoUrlReceivedSequential(n,"数字人初始化(顺序)");if(o.video_url&&!this.digitalHumanVideoReady){this.playDigitalHumanVideo(o.video_url,true)}}else{if(t){this.handleVideoUrlReceivedSequential([t],"数字人初始化(仅默认视频)")}}}}catch(e){console.error("初始化数字人失败:",e);I.captureError(e,{action:"initializeDigitalHuman",component:"pcm-virtual-chat-modal",title:"数字人初始化失败"})}}async generateDigitalHumanVideo(e){if(!this.isComponentActive){console.warn("组件已停用,跳过数字人视频生成");return}if(!e.trim()||!this.virtualmanKey){if(this.waitingForDigitalHuman&&!this.isTaskCompleted){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}return}this.isGeneratingDigitalHumanVideo=true;try{const t=await a({url:"/sdk/v1/virtual-human/create-video",method:"POST",data:{VirtualmanKey:this.virtualmanKey,InputSsml:e,SpeechParam:{Speed:1},VideoParam:{Format:"TransparentWebm"},DriverType:"Text"}});if(!t.success){_(t.message,"error");throw new Error(`创建视频任务失败: ${t.message}`)}const o=t.data.Payload.TaskId;const i=await this.pollVideoProgress(o);if(!this.isComponentActive){console.warn("组件已停用,跳过视频播放");return}if(i){await this.preloadVideo(i);if(!this.isComponentActive){console.warn("组件已停用,跳过视频播放");return}if(this.isPlayingWelcomeVideo){this.pendingGeneratedVideoUrl=i}else{await this.playDigitalHumanVideo(i)}}else{throw new Error("未能获取到数字人视频URL")}}catch(e){console.error("数字人视频生成失败:",e);I.captureError(e,{action:"generateDigitalHumanVideo",component:"pcm-virtual-chat-modal",title:"数字人视频生成失败"});if(this.waitingForDigitalHuman&&!this.isTaskCompleted){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}}finally{this.isGeneratingDigitalHumanVideo=false}}async pollVideoProgress(e){const t=45;const o=2e3;for(let i=0;i<t;i++){try{const t=await a({url:"/sdk/v1/virtual-human/query-progress",method:"POST",data:{TaskId:e}});if(!t.success){throw new Error(`查询进度失败: ${t.message}`)}const i=t.data.Payload;if(i.Status==="SUCCESS"&&i.Progress===100){return i.MediaUrl}else if(i.Status==="FAILED"){throw new Error(`视频生成失败: ${i.FailMessage}`)}await new Promise((e=>setTimeout(e,o)))}catch(e){console.error("轮询视频进度失败:",e);break}}throw new Error("视频生成超时")}async playDigitalHumanVideo(e,t=false){try{await this.preloadVideo(e);this.digitalHumanVideoUrl=e;this.isPlayingDigitalHumanVideo=true;this.digitalHumanVideoReady=true;this.isPlayingWelcomeVideo=t}catch(e){console.error("播放数字人视频失败:",e);if(this.waitingForDigitalHuman&&!this.isTaskCompleted){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}}}async preloadVideo(e){if(!e||!e.trim()){return Promise.resolve()}const t=e.trim();const o=t.split("/").pop()||t;if(this.preloadedVideos.has(t)){return Promise.resolve()}if(this.preloadingVideos.has(t)){return this.preloadingVideos.get(t)}const i=this.executeVideoPreload(t);this.preloadingVideos.set(t,i);try{await i;this.preloadedVideos.add(t)}catch(e){console.error(`💥 视频预加载失败: ${o.substring(0,30)}${o.length>30?"...":""}`,e)}finally{this.preloadingVideos.delete(t)}}async executeVideoPreload(e){return new Promise(((t,o)=>{const i=document.createElement("video");i.preload="auto";i.src=e;i.muted=true;i.crossOrigin="anonymous";let n=false;const r=()=>{if(n)return;n=true;s();t()};const a=t=>{if(n)return;n=true;s();console.error("视频预加载失败:",e,t);o(new Error("视频预加载失败"))};const s=()=>{i.removeEventListener("canplaythrough",r);i.removeEventListener("loadeddata",r);i.removeEventListener("error",a);i.removeEventListener("abort",a);i.src=""};i.addEventListener("canplaythrough",r);i.addEventListener("loadeddata",r);i.addEventListener("error",a);i.addEventListener("abort",a);setTimeout((()=>{if(!n){console.warn("视频预加载超时:",e);a("timeout")}}),15e3);i.load()}))}async sequentialPreloadVideos(e){if(!e||e.length===0){return}const t=e.filter((e=>e&&e.trim()));if(t.length===0){return}t.forEach(((e,t)=>{e.split("/").pop()||e}));for(let e=0;e<t.length;e++){const o=t[e];const i=o.split("/").pop()||o;try{await this.preloadVideo(o)}catch(o){console.warn(`❌ [${e+1}/${t.length}] 预加载失败: ${i.substring(0,50)}${i.length>50?"...":""}`,o)}}}handleVideoUrlReceivedSequential(e,t=""){if(!e||e.length===0)return;const o=e.filter((e=>e&&e.trim()));if(o.length===0)return;this.sequentialPreloadVideos(o).catch((e=>{console.warn(`⚠️ 顺序预加载视频失败 (${t}):`,e)}))}handlePageResume(){if(this.isTaskCompleted||!this.isOpen||this.isEndingInterview){return}console.log("页面恢复可见,检查流程状态:",{waitingForDigitalHuman:this.waitingForDigitalHuman,isPlayingDigitalHumanVideo:this.isPlayingDigitalHumanVideo,waitingToRecord:this.waitingToRecord,isRecording:this.isRecording,showRecordingUI:this.showRecordingUI});if(this.isPlayingDigitalHumanVideo){const e=this.hostElement.shadowRoot?.querySelector(".digital-human-background-video");if(e){const t=e.play();if(t){t.catch((()=>{console.warn("恢复数字人视频播放失败,跳过视频");this.skipDigitalHumanVideo()}))}setTimeout((()=>{if(this.isPlayingDigitalHumanVideo){console.warn("数字人视频恢复后3秒仍未结束,强制跳过");this.skipDigitalHumanVideo()}}),3e3)}else{this.skipDigitalHumanVideo()}return}if(this.waitingForDigitalHuman&&!this.isPlayingDigitalHumanVideo){console.warn("检测到waitingForDigitalHuman卡住(视频未在播放),直接开始录制流程");this.waitingForDigitalHuman=false;this.startWaitingToRecord();return}if(this.isRecording&&this.recordingStream){const e=this.recordingStream.getTracks();const t=e.length>0&&e.every((e=>e.readyState==="ended"));if(t){console.warn("检测到录制的MediaStream已被系统回收,停止录制");this.deviceError="设备被系统中断,请重新录制";this.stopRecording()}}}skipDigitalHumanVideo(){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl;this.isPlayingDigitalHumanVideo=false;this.isPlayingWelcomeVideo=false;if(this.waitingForDigitalHuman&&!this.isTaskCompleted&&!this.isEndingInterview){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}}handleVideoElementEnded=async()=>{if(this.isPlayingDigitalHumanVideo){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl;this.isPlayingDigitalHumanVideo=false;const e=this.isPlayingWelcomeVideo;this.isPlayingWelcomeVideo=false;if(e&&this.pendingGeneratedVideoUrl){const e=this.pendingGeneratedVideoUrl;this.pendingGeneratedVideoUrl="";await this.playDigitalHumanVideo(e);return}if(this.waitingForDigitalHuman&&!this.isTaskCompleted&&!this.isEndingInterview&&!e){this.waitingForDigitalHuman=false;this.startWaitingToRecord()}}};handleInterviewEnd=()=>{if(this.isEndingInterview||this.isTaskCompleted){return}this.showEndInterviewConfirmModal=true};handleConfirmEndInterview=async()=>{try{this.showEndInterviewConfirmModal=false;this.isEndingInterview=true;if(this.waitingTimer){clearInterval(this.waitingTimer);this.waitingTimer=null}this.waitingToRecord=false;this.waitingForDigitalHuman=false;if(this.isRecording){this.stopRecording()}else{await this.sendEndInterviewMessage()}}catch(e){console.error("点击结束发送消息失败:",e);this.isEndingInterview=false;I.captureError(e,{action:"handleConfirmEndInterview",component:"pcm-virtual-chat-modal",title:"点击结束发送消息失败"});C.emitError({error:e,message:"点击结束发送消息失败"})}};sendEndInterviewMessage=async()=>{try{const e="请结束面试";console.log("面试结束消息已发送:",{conversation_id:this.conversationId,message:e});await this.sendMessageToAPI(e);this.isEndingInterview=false}catch(e){console.error("发送结束面试消息失败:",e);this.isEndingInterview=false;throw e}};handleCancelEndInterview=()=>{this.showEndInterviewConfirmModal=false};getAnsweredQuestionCount=()=>this.messages.filter((e=>e.answer&&e.answer.trim())).length;renderChatHistory(){if(this.isPlayingWelcomeVideo){const e=Math.max(0,Math.min(2,this.openingIndex||0));const t=this.digitalHumanOpeningContents[e]||this.digitalHumanOpeningContents[0];const o=t.text;return i("div",{class:"ai-message-item"},i("div",{class:"ai-message-content"},o))}if(this.isGeneratingDigitalHumanVideo||this.isLoading){return i("div",{class:"ai-message-item"},i("div",{class:"ai-message-content"},"请稍等,我查看一下本次面试的信息..."))}if(this.currentStreamingMessage&&this.currentStreamingMessage.answer){return i("div",{class:"ai-message-item streaming"},i("div",{class:"ai-message-content",innerHTML:this.currentStreamingMessage.answer}),this.currentStreamingMessage.isStreaming&&i("div",{class:"typing-indicator"},i("span",null),i("span",null),i("span",null)))}const e=[...this.messages].reverse().find((e=>e.answer&&e.answer.trim()));if(e){return i("div",{class:"ai-message-item"},i("div",{class:"ai-message-content",innerHTML:e.answer}))}return i("div",{class:"ai-message-item"},i("div",{class:"ai-message-content"},"请稍等,我查看一下本次面试的信息..."))}render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"digital-human-mode":!!this.digitalId};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};return i("div",{class:o,style:e},i("div",{class:t},i("button",{class:"close-button",onClick:this.handleCloseClick},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}))),this.digitalId&&this.digitalHumanVideoUrl&&i("div",{class:"digital-human-background"},i("video",{autoplay:true,playsinline:true,loop:!this.isPlayingDigitalHumanVideo,muted:!this.isPlayingDigitalHumanVideo,src:this.digitalHumanVideoUrl,class:"digital-human-background-video",onEnded:this.handleVideoElementEnded,onPlay:e=>{const t=e.target;const o=this.digitalHumanVideoUrl===this.digitalHumanDefaultVideoUrl;t.playbackRate=o?1:this.playbackRate},ref:e=>{if(e){const t=this.digitalHumanVideoUrl===this.digitalHumanDefaultVideoUrl;e.playbackRate=t?1:this.playbackRate;if(e.src&&e.readyState===0){e.load()}}}})),this.renderVideoPreview(),i("div",{class:"modal-content-layer"},i("div",{class:"main-content"},i("div",{class:"chat-history-section"},this.renderChatHistory()),this.showEndInterviewButton&&!this.isTaskCompleted&&this.conversationId&&i("div",{class:"end-interview-button-container"},i("button",{class:"end-interview-button",onClick:this.handleInterviewEnd,disabled:this.isEndingInterview||!this.isRecording,title:this.isEndingInterview?"正在结束面试...":!this.isRecording?"请在录制时点击":"结束面试"},this.isEndingInterview?"正在结束...":"结束面试")),this.renderRecordingStatusBar())),i("div",{style:{position:"relative",zIndex:"100"}},i("components-confirm-modal",{isOpen:this.showConfirmModal,modalTitle:"确认完成回答?",okText:"确认完成",cancelText:"继续录制",okType:"danger",onOk:this.handleConfirmModalOk,onCancel:this.handleConfirmModalCancelEvent,onClosed:this.handleConfirmModalCancel},i("div",{style:{marginBottom:"16px"}},i("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},"当前录制时长:",(()=>{const e=this.recordingStartTime>0?Math.floor((Date.now()-this.recordingStartTime)/1e3):0;const t=Math.floor(e/60);const o=e%60;return`${t.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`})()),i("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 16px",background:"#fff7e6",border:"1px solid #ffec99",borderRadius:"6px",color:"#d46b08",fontSize:"14px",marginBottom:"16px"}},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,"注意:录制仍在进行中")),i("div",{style:{fontSize:"16px",color:"#595959",lineHeight:"1.5",marginBottom:"16px"}},'点击"确认完成"将结束本题回答'),i("label",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",padding:"8px 0",userSelect:"none"}},i("input",{type:"checkbox",style:{width:"16px",height:"16px",accentColor:"#1890ff",cursor:"pointer",margin:"0"},checked:this.skipConfirmThisInterview,onChange:this.handleSkipConfirmChange}),i("span",{style:{fontSize:"14px",color:"#595959",cursor:"pointer",lineHeight:"1.4"}},"本次面试不再提醒"))))),i("div",{style:{position:"relative",zIndex:"100"}},i("components-confirm-modal",{isOpen:this.showCloseConfirmModal,modalTitle:"确认关闭?",okText:"确认关闭",cancelText:"取消",okType:"danger",onOk:this.handleCloseConfirmOk,onCancel:this.handleCloseConfirmCancel,onClosed:this.handleCloseConfirmCancel},i("div",{style:{marginBottom:"16px"}},i("div",{style:{fontSize:"16px",color:"#595959",lineHeight:"1.5",marginBottom:"16px"}},this.isTaskCompleted?"面试已结束,确认要关闭吗?":"您的面试未完成,确认要关闭吗?")))),i("div",{style:{position:"relative",zIndex:"100"}},i("components-confirm-modal",{isOpen:this.showEndInterviewConfirmModal,modalTitle:"确认结束面试?",okText:"确认结束",cancelText:"取消",okType:"danger",onOk:this.handleConfirmEndInterview,onCancel:this.handleCancelEndInterview,onClosed:this.handleCancelEndInterview},i("div",{style:{marginBottom:"16px"}},(()=>{const e=this.getAnsweredQuestionCount();return i("div",null,i("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},"当前第 ",e," 题"),e<3&&i("div",{style:{display:"flex",alignItems:"flex-start",gap:"8px",padding:"12px 16px",background:"#fff2e8",border:"1px solid #ffbb96",borderRadius:"6px",color:"#d4380d",fontSize:"14px",marginBottom:"16px"}},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",style:{flexShrink:"0",marginTop:"2px"}},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,i("strong",null,"警告:"),"当前已回答题数小于 3 题,结束面试可能无法正常完成面试流程,建议继续完成更多题目后再结束面试。")),i("div",{style:{fontSize:"14px",color:"#595959",lineHeight:"1.6",textAlign:"center"}},"确认要结束面试吗?结束后将生成面试报告。"))})())))))}renderVideoPreview(){if(!this.showRecordingUI){return null}return i("div",{class:"recording-preview-top-right"},i("video",{class:"user-video-preview",autoPlay:true,playsInline:true,muted:true,style:{transform:"scaleX(-1)"},ref:e=>{if(e&&this.recordingStream&&!this.videoRef){this.videoRef=e}}}))}renderRecordingStatusBar(){if(this.showRecordingUI){const e=Math.floor(this.recordingTimeLeft/60).toString().padStart(2,"0");const t=(this.recordingTimeLeft%60).toString().padStart(2,"0");return i("div",{class:"recording-status-bar"},i("div",{class:"audio-waveform"},i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"}),i("div",{class:"waveform-bar"})),i("span",{class:"recording-timer"},e,":",t),i("button",{class:"finish-recording-btn",onClick:()=>this.handleStopRecording()},i("img",{src:"https://pcm-resource-1312611446.cos.ap-guangzhou.myqcloud.com/sdk/icon/gou.png",width:"16",height:"16",alt:"完成",style:{filter:"brightness(0) invert(1)"}})))}return i("div",{class:"recording-status-bar"},this.renderStatusIndicator())}renderStatusIndicator(){if(this.deviceError){return i("div",{class:"status-indicator-text error"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),i("span",null,this.deviceError))}if(this.isTaskCompleted){return i("div",{class:"status-indicator-text"},i("span",null,"面试已完成"))}if(this.waitingForDigitalHuman&&this.digitalId){return i("div",{class:"status-indicator-text loading"},i("div",{class:"loading-spinner-small"}),i("span",null,"面试官思考中..."))}if(this.isUploadingVideo){return i("div",{class:"status-indicator-text loading"},i("div",{class:"loading-spinner-small"}),i("span",null,"正在提交回答..."))}if(this.isLoading||this.currentStreamingMessage){return i("div",{class:"status-indicator-text loading"},i("div",{class:"loading-spinner-small"}),i("span",null,"题目生成中..."))}if(this.waitingToRecord){return i("div",{class:"status-indicator-text"},i("span",null,this.waitingTimeLeft," 秒后开始您的回答"))}return i("div",{class:"status-indicator-text ready"},i("img",{src:"https://pcm-resource-1312611446.cos.ap-guangzhou.myqcloud.com/sdk/icon/gou.png",width:"16",height:"16",alt:"准备就绪"}),i("span",null,"准备就绪"))}static get watchers(){return{token:["handleTokenChange"]}}};$r.style=Pr+qr;const Ur=":host{display:block;font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto;-webkit-overflow-scrolling:touch;}.fullscreen-overlay{padding:0;position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background:white;border-radius:8px;width:100%;max-width:900px;display:flex;flex-direction:column;position:relative;margin:5vh auto auto auto}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.modal-container.fullscreen>div:not(.modal-header):not(.initial-upload){display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.pc-layout{width:80%;max-width:800px;min-width:320px;min-height:400px}.video-preview.placeholder{display:flex;justify-content:center;align-items:center;background:#EAEAEA}.placeholder-status{color:#00000066}.waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-container{width:100%;display:flex;flex-direction:column;align-items:center}.video-area{width:100%;display:flex;flex-direction:column;align-items:center}.stop-recording-button{width:100%;height:100%;font-size:16px;background:#f44336;border-radius:6px;color:white;border:none;cursor:pointer}.stop-recording-button:hover{background:#d32f2f}.play-audio-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0;}.header-left{display:flex;align-items:center;gap:8px}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.chat-container{background-image:url(https://pub.pincaimao.com/static/web/images/login/bg_login_m.png);background-size:100%;height:100%;border-radius:0px 0px 8px 8px}.chat-history{position:relative;flex:1;overflow-y:auto;padding:20px;scroll-behavior:smooth;height:60vh;min-height:400px;max-height:900px}.fullscreen .chat-history{height:auto;flex:1 1 auto}.message-input{padding:16px;border-top:1px solid #eee;display:flex;gap:8px;align-items:center}.message-input input{flex:1;padding:8px 12px;border:1px solid #ddd;border-radius:4px;outline:none;transition:border-color 0.2s ease}.message-input input:focus{border-color:#bbb}.message{margin-bottom:16px;opacity:1;transition:opacity 0.3s ease}.message-content{max-width:70%;padding:8px 12px;border-radius:8px;word-break:break-word}.message-content p{margin:0;word-break:break-word}.user-message{display:flex;justify-content:flex-end}.agent-message{display:flex;justify-content:flex-start}.user-message .message-content{background-color:#007bff;color:white}.agent-message .message-content{background-color:#f1f1f1}.message-time{font-size:12px;color:#999;margin-top:4px;display:block}.send-button{width:38px;height:38px;border-radius:16px;background:#0d75fb;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color 0.2s ease}.send-button img{width:24px;height:24px}.send-button:hover{background:#0a62d6}.send-button.disabled{background:#d9d9d9;cursor:not-allowed}.empty-state{display:flex;justify-content:center;align-items:center;height:100%;color:#999;text-align:center}.loading-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:rgba(255, 255, 255, 0.98);z-index:1;opacity:1;transition:opacity 0.3s ease}.loading-container p{margin-top:16px;color:#666;font-size:14px}.loading-spinner{width:40px;height:40px;border:3px solid #f3f3f3;border-top:3px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.messages-wrapper{width:100%;min-height:100%;display:flex;flex-direction:column;justify-content:flex-end}.messages-wrapper.has-overflow{justify-content:flex-start}.suggested-questions{display:flex;flex-direction:column;gap:8px;padding:16px}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#f3f4f6;border-radius:4px;cursor:pointer;font-size:14px;color:#374151;transition:background-color 0.2s}.suggested-question:hover{background-color:#e5e7eb}.arrow-right{margin-left:8px}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#6b7280;border-radius:50%;animation:spin 1s linear infinite}.upload-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;color:#666;border-radius:4px;transition:background-color 0.2s}.upload-button:hover{background-color:rgba(0, 0, 0, 0.04)}.upload-button svg{width:20px;height:20px}.file-input{display:none}.selected-file{font-size:12px;color:#666;margin-left:8px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{flex:1;display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;padding:0 4px;background:white}.input-wrapper input{border:none;flex:1;padding:8px;outline:none}.input-wrapper:focus-within{border-color:#bbb}.file-preview{padding:8px 16px;border-top:1px solid #eee;background-color:#f9f9f9}.document-download-actions{display:flex;align-items:center;gap:8px;margin-right:8px}.document-download-button{padding:4px 8px;color:#1890ff;font-size:14px;line-height:20px;background:transparent;border:none;border-radius:4px;cursor:pointer}.document-download-button:hover{background-color:#e6f7ff}.document-download-button:focus-visible{outline:2px solid #1890ff;outline-offset:2px}.document-download-qr-code{display:flex;flex-direction:column;align-items:center;padding:8px 0}.document-download-qr-code img{width:200px;height:200px}.document-download-qr-code p{margin:16px 0 0;color:#666;font-size:14px}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding:10px 20px 0px 20px;border-radius:14px 14px 0 0;flex:0 0 auto}.recording-section .video-preview{width:100%;height:200px;max-width:400px;position:relative;margin-bottom:10px;border:1px solid #ddd;border-radius:12px;overflow:hidden}.recording-section video{width:100%;height:100%;object-fit:cover}.recording-status{position:absolute;top:10px;left:10px;background-color:rgba(0, 0, 0, 0.6);color:white;padding:4px 8px;border-radius:4px;display:flex;align-items:center;gap:5px;font-size:14px;z-index:2}.recording-status .recording-dot{display:inline-block;width:10px;height:10px;background-color:red;border-radius:50%;margin-right:5px;animation:blink 1s infinite}.recording-status.warning{color:#ff4d4f;animation:blink 1s infinite}@keyframes blink{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}.recording-section .stop-recording-button{background-color:#f44336;color:white;border:none;cursor:pointer;font-weight:bold}.recording-section .stop-recording-button:hover{background-color:#d32f2f}.fullscreen{width:100vw;border-radius:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.recording-controls{margin-top:10px;height:53px;width:100%;max-width:400px;display:flex;justify-content:center}.recording-controls .waiting-message{text-align:center;color:white;font-size:16px;background-image:linear-gradient(100deg, #4A9FFF 0%, #1058FF 100%);border-radius:6px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.15);width:95%;display:flex;justify-content:center;align-items:center;cursor:pointer}.recording-controls .waiting-message.loading{background:#faad14}.recording-controls .waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-controls .stop-recording-button{background-color:#dc3545;color:white;border:none;cursor:pointer;font-size:16px}.recording-controls .stop-recording-button:hover{background-color:#c82333}.recording-controls .stop-recording-button.disabled{background:#ccc;cursor:not-allowed}.recording-controls .stop-recording-button.disabled:hover{background:#ccc}.progress-container{display:flex;justify-content:space-between;align-items:center;width:100%;max-width:400px;margin-top:10px;padding:0 5px}.progress-bar-container{height:4px;background-color:#E5E5E5;border-radius:2px;overflow:hidden;margin-right:10px;width:75px}.progress-bar{height:100%;background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);border-radius:2px;transition:width 0.3s ease}.progress-text{font-size:14px;color:#666;white-space:nowrap}.text-input-area{display:flex;flex-direction:column;width:100%;height:100%;padding:0px 16px 16px 16px;border-radius:8px;border:none;}.text-answer-input{flex:1;min-height:80px;padding:12px 12px 0px 12px;border:1px solid #ddd;border-radius:8px 8px 0 0;resize:none;font-size:16px;background-color:#fff;border-bottom:none;outline:none;}.input-toolbar{display:flex;justify-content:flex-end;align-items:center;padding:8px 12px;background-color:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 8px 8px}.text-answer-input:focus{border-color:rgb(74, 144, 226);border-bottom:none}.text-answer-input:focus+.input-toolbar{border-color:rgb(74, 144, 226);border-top:none}.toolbar-actions{width:32px;height:32px;display:flex;justify-content:center;align-items:center;margin-right:10px;border:1px solid #d9d9d9;border-radius:6px}.toolbar-actions:hover{background-color:#f0f0f0}.toolbar-button{background:transparent;border:none;color:#666;cursor:pointer;padding:0;margin:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.toolbar-button>div,.toolbar-button>svg{display:flex;justify-content:center;align-items:center}.toolbar-button img{width:16px;height:16px}.submit-text-button{padding:6px 16px;background-color:#4a90e2;color:white;border:none;border-radius:4px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color 0.2s}.submit-text-button:hover:not(.disabled){background-color:#3a7bc8}.submit-text-button.disabled{background-color:#b3b3b3;cursor:not-allowed}.toolbar-button.recording{background-color:rgba(255, 0, 0, 0.1);color:#ff3b30;animation:pulse 1.5s infinite}.toolbar-button.converting{background-color:rgba(0, 122, 255, 0.1);color:#007aff}.toolbar-button .recording-time{font-size:12px;margin-left:4px}.converting-indicator{display:flex;justify-content:center;align-items:center}.converting-indicator svg{animation:spin 1.5s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0.4)}70%{box-shadow:0 0 0 6px rgba(255, 0, 0, 0)}100%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0)}}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.references-section{margin-top:30px;padding:12px;background-color:#f9f9f9;border-radius:8px;border:1px solid #e8e8e8}.references-title{font-size:14px;color:#666;margin:0 0 8px 0;font-weight:500}.references-list{display:flex;flex-direction:column;gap:8px}.reference-item{background-color:#fff;border:1px solid #e8e8e8;border-radius:6px;padding:10px;cursor:pointer;transition:background-color 0.2s, box-shadow 0.2s}.reference-item:hover{background-color:#f5f5f5;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1)}.reference-header{display:flex;align-items:center;gap:6px;position:relative}.reference-icon{color:#1890ff;display:flex;align-items:center}.reference-name{font-size:13px;font-weight:500;color:#333;flex:1}.download-icon{color:#1890ff;display:flex;align-items:center}.reference-content{display:none}.suggested-questions{margin-top:20px;padding:12px;background-color:#f0f7ff;border-radius:8px;border:1px solid #d6e8ff}.suggested-title{font-size:14px;color:#1890ff;margin:0 0 8px 0;font-weight:500}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#fff;border:1px solid #e6f7ff;border-radius:6px;cursor:pointer;font-size:14px;color:#1890ff;transition:all 0.3s;margin-bottom:8px}.suggested-question:last-child{margin-bottom:0}.suggested-question:hover{background-color:#e6f7ff;border-color:#91d5ff}.arrow-right{color:#1890ff;display:flex;align-items:center}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e6f7ff;border-top-color:#1890ff;border-radius:50%;animation:spin 1s linear infinite}";const Nr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Vr=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent");this.clearConversation=t(this,"clearConversation")}modalTitle;token;isOpen=false;messages=[];modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;currentAssistantMessage="";isLoading=false;currentStreamingMessage=null;shouldAutoScroll=true;isLoadingHistory=false;get hostElement(){return o(this)}streamComplete;conversationStart;tokenInvalid;someErrorEvent;SCROLL_THRESHOLD=20;fullscreen=false;textAnswer="";isSubmittingText=false;customInputs={show_suggested_questions:"false"};suggestedQuestions=[];suggestedQuestionsLoading=false;currentRefs=[];showReferences=false;employeeId;isRecordingAudio=false;audioRecorder=null;audioChunks=[];isConvertingAudio=false;audioRecordingTimeLeft=60;audioRecordingTimer=null;audioRecordingStartTime=0;maxAudioRecordingTime=60;employeeDetails=null;isLoadingEmployeeDetails=false;quickQuestions=[];tokenInvalidListener;clearConversation;shouldHideReferences=false;isUserScrolling=false;filePreviewMode="drawer";isDrawerOpen=false;previewUrl="";previewFileName="";downloadUrl="";isDownloadQrCodeOpen=false;downloadQrCodeUrl="";handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(e){if(!this.employeeId){console.error("未提供数字员工ID (employeeId)");setTimeout((()=>alert("请提供有效的数字员工ID")),0);return}await f(this.token);await this.fetchEmployeeDetails()}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.audioRecordingTimer){clearInterval(this.audioRecordingTimer);this.audioRecordingTimer=null}this.stopAudioRecording()}handleClose=()=>{this.modalClosed.emit()};async sendMessageToAPI(e){if(!this.employeeId){alert("请提供有效的数字员工ID");return}this.isLoading=true;let t="";const o=new Date;const i=`${o.getHours()}:${o.getMinutes().toString().padStart(2,"0")}`;const n=e.trim()||"请开始";this.suggestedQuestions=[];this.currentRefs=[];this.shouldHideReferences=false;const r={id:`temp-${Date.now()}`,conversation_id:this.conversationId,inputs:this.customInputs||{},query:n,answer:"",message_files:[],feedback:{},retriever_resources:[],created_at:Math.floor(Date.now()/1e3).toString(),agent_thoughts:[],status:"normal",error:null,time:i,isStreaming:true};this.currentStreamingMessage=r;this.shouldAutoScroll=true;this.scrollToBottom();const a={response_mode:"streaming",conversation_id:this.conversationId,query:n,employee_id:this.employeeId};a.inputs={...this.customInputs};await u({url:`/sdk/v1/knowledge/chat/chat-messages`,method:"POST",data:a,onMessage:e=>{if(e.conversation_id&&!this.conversationId){this.conversationId=e.conversation_id;this.conversationStart.emit({conversation_id:e.conversation_id,event:e.event,message_id:e.message_id,id:e.id})}if(e.event==="node_started"&&e.data.title.includes("聘才猫推荐开始")){this.suggestedQuestionsLoading=true}if(e.event==="node_started"&&e.data.title.includes("不显示引用")){this.shouldHideReferences=true}if(e.event==="node_finished"&&e.data.title.includes("聘才猫推荐结束")){let t=[];try{let o=e.data.outputs.text;if(typeof o==="string"){o=o.replace(/```json\n/,"").replace(/```/,"").trim();const e=JSON.parse(o);if(e.status==="success"&&Array.isArray(e.items)){t=e.items.map((e=>e.question))}}else{const e=o;if(e.status==="success"&&Array.isArray(e.items)){t=e.items.map((e=>e.question))}}}catch(e){console.warn("解析问题建议失败:",e)}this.suggestedQuestions=t;this.suggestedQuestionsLoading=false}if(e.event==="node_finished"&&e.data?.inputs?.documents){const t=[];e.data.inputs.documents.forEach((e=>{if(e.result_list&&Array.isArray(e.result_list)){e.result_list.forEach((e=>{if(e.doc_info&&e.content){t.push({doc_info:{doc_name:e.doc_info.doc_name,doc_id:e.doc_info.doc_id},content:e.content})}}))}}));const o=new Map;t.forEach((e=>{if(e.doc_info&&e.doc_info.doc_id){o.set(e.doc_info.doc_id,e)}}));this.currentRefs=Array.from(o.values())}if(e.event==="message"){if(e.event==="agent_message"||e.event==="message"){if(e.answer){t+=e.answer;const o={...this.currentStreamingMessage,answer:t,id:e.message_id||this.currentStreamingMessage.id,isStreaming:true,retriever_resources:e.retriever_resources||this.currentStreamingMessage.retriever_resources,agent_thoughts:e.agent_thoughts||this.currentStreamingMessage.agent_thoughts};this.currentStreamingMessage=o;this.scrollToBottom()}}}if(e.event==="error"){const t=e.data?.message||e.message||"请求失败";this.messages=[...this.messages,{...r,answer:t,error:e.data,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false;this.someErrorEvent.emit({error:e.data,message:t});return}if(e.event==="message_end"){this.streamComplete.emit({conversation_id:e.conversation_id||"",event:e.event,message_id:e.message_id,id:e.id})}},onError:e=>{console.error("发生错误:",e);alert(e instanceof Error?e.message:"消息发送失败,请稍后再试");this.messages=[...this.messages,{...r,answer:"消息发送失败,请检查网络。",error:e,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false},onComplete:async()=>{this.isLoading=false;const e=this.currentStreamingMessage;e.isStreaming=false;this.messages=[...this.messages,e];this.currentStreamingMessage=null}})}handleScroll=()=>{if(this.isUserScrolling){const e=this.hostElement.shadowRoot?.querySelector(".chat-history");if(!e)return;const{scrollTop:t,scrollHeight:o,clientHeight:i}=e;const n=o-t-i;this.shouldAutoScroll=n<=this.SCROLL_THRESHOLD}};handleTouchStart=()=>{this.isUserScrolling=true};handleTouchEnd=()=>{setTimeout((()=>{this.isUserScrolling=false}),100)};_wheelTimer=null;handleWheel=()=>{this.isUserScrolling=true;if(this._wheelTimer){clearTimeout(this._wheelTimer)}this._wheelTimer=setTimeout((()=>{this.isUserScrolling=false}),150)};scrollToBottom(){if(!this.shouldAutoScroll)return;const e=this.hostElement.shadowRoot?.querySelector(".chat-history");if(e&&this.isOpen){e.scrollTop=e.scrollHeight}}componentDidRender(){if(this.isLoadingHistory||this.shouldAutoScroll&&this.isOpen){const e=this.hostElement.shadowRoot?.querySelector(".chat-history");if(e){e.scrollTop=e.scrollHeight}}}async loadHistoryMessages(e){if(!this.conversationId&&!e)return;const t=e||this.conversationId;if(this.currentStreamingMessage||this.isLoading)return;this.isLoadingHistory=true;try{const e=await a({url:"/sdk/v1/knowledge/chat/conversation-history",method:"GET",data:{conversation_id:t}});if(e.success&&e.data){const t=e.data.data||[];const o=t.map((e=>{const t=new Date(parseInt(e.created_at)*1e3);const o=t.getHours().toString().padStart(2,"0");const i=t.getMinutes().toString().padStart(2,"0");const n=`${o}:${i}`;return{id:e.id,conversation_id:e.conversation_id,inputs:e.inputs||{},query:e.query||"",answer:e.answer||"",message_files:e.message_files||[],feedback:e.feedback||{},retriever_resources:e.retriever_resources||[],created_at:e.created_at,agent_thoughts:e.agent_thoughts||[],status:e.status||"normal",error:e.error,time:n,isStreaming:false}}));this.messages=o}}catch(e){console.error("加载历史消息失败:",e);alert(e instanceof Error?e.message:"加载历史消息失败,请刷新重试")}finally{this.isLoadingHistory=false;setTimeout((()=>{this.shouldAutoScroll=true;this.scrollToBottom()}),200)}}async convertAudioToText(e){try{const t=await a({url:"/sdk/v1/tts/audio_to_text",method:"POST",data:{cos_key:e}});if(t.success&&t.data&&t.data.text){return t.data.text}else{console.warn("音频转文字返回结果格式不正确");return null}}catch(e){console.error("音频转文字错误:",e);return null}}async fetchEmployeeDetails(){if(!this.employeeId||!this.token)return;this.isLoadingEmployeeDetails=true;try{const e=await a({url:`/sdk/v1/knowledge/chat/employee/${this.employeeId}`,method:"GET"});if(e.success&&e.data){this.employeeDetails=e.data;if(this.employeeDetails.show_quote_doc!==undefined){this.showReferences=this.employeeDetails.show_quote_doc}if(this.employeeDetails.quick_questions){this.quickQuestions=this.employeeDetails.quick_questions.split(",").map((e=>e.trim())).filter((e=>e))}if(this.conversationId){await this.loadHistoryMessages()}}else{alert("获取智能体详情失败,请检查token和employeeId是否正确")}}catch(e){console.error("获取智能体详情失败:",e)}finally{this.isLoadingEmployeeDetails=false}}handleTextInputChange=e=>{const t=e.target;this.textAnswer=t.value};handleKeyDown=e=>{if(e.isComposing){return}if(e.key==="Enter"){if(e.ctrlKey){return}else{e.preventDefault();if(this.textAnswer.trim()&&!this.isSubmittingText&&!this.isLoading&&!this.currentStreamingMessage){this.submitTextAnswer()}}}};submitTextAnswer=async()=>{if(!this.textAnswer.trim()||this.isSubmittingText){return}this.isSubmittingText=true;try{const e=this.textAnswer;this.textAnswer="";await this.sendMessageToAPI(e)}catch(e){console.error("提交文本回答失败:",e);alert("提交回答失败,请重试")}finally{this.isSubmittingText=false}};handleVoiceInputClick=()=>{if(this.isRecordingAudio){this.stopAudioRecording()}else{navigator.mediaDevices.getUserMedia({audio:true}).then((e=>{this.startRecordingWithStream(e)})).catch((e=>{console.error("麦克风权限请求失败:",e);if(e.name==="NotAllowedError"||e.name==="PermissionDeniedError"){alert("麦克风访问被拒绝。\n\n在Mac上,请前往系统偏好设置 > 安全性与隐私 > 隐私 > 麦克风,确保您的浏览器已被允许访问麦克风。")}else{alert("无法访问麦克风,请确保已授予权限并且麦克风设备正常工作。")}}))}};startRecordingWithStream(e){try{const t=x();let o;try{o=new MediaRecorder(e,{mimeType:t})}catch(t){console.warn("指定的音频MIME类型不受支持,使用默认设置:",t);try{o=new MediaRecorder(e)}catch(t){e.getTracks().forEach((e=>e.stop()));console.error("无法创建音频录制器:",t);alert("您的浏览器不支持音频录制功能");return}}this.audioRecorder=o;this.audioChunks=[];this.isRecordingAudio=true;this.audioRecordingStartTime=Date.now();this.audioRecordingTimeLeft=this.maxAudioRecordingTime;o.ondataavailable=e=>{if(e.data.size>0){this.audioChunks.push(e.data)}};o.onstop=()=>{e.getTracks().forEach((e=>e.stop()));this.processAudioRecording()};o.start(100);this.audioRecordingTimer=setInterval((()=>{const e=Math.floor((Date.now()-this.audioRecordingStartTime)/1e3);this.audioRecordingTimeLeft=Math.max(0,this.maxAudioRecordingTime-e);if(this.audioRecordingTimeLeft<=0){this.stopAudioRecording()}}),1e3)}catch(t){e.getTracks().forEach((e=>e.stop()));console.error("开始录音失败:",t);alert("开始录音失败,请确保麦克风设备正常工作")}}async processAudioRecording(){if(this.audioChunks.length===0){console.warn("没有录制到音频数据");return}try{this.isConvertingAudio=true;const e=x()||"audio/webm";const t=new Blob(this.audioChunks,{type:e});if(t.size===0){console.warn("录制的音频为空");this.isConvertingAudio=false;return}const o=e.includes("webm")?"webm":"mp3";const i=`audio_input.${o}`;const n=new File([t],i,{type:e});const r=await m(n,{},{tags:["audio"]});const a=await this.convertAudioToText(r.cos_key);if(a){const e=this.hostElement.shadowRoot?.querySelector(".text-answer-input");const t=e?.selectionStart||this.textAnswer.length;const o=this.textAnswer.substring(0,t);const i=this.textAnswer.substring(t);const n=o.length>0&&!o.endsWith(" ")?" ":"";this.textAnswer=o+n+a+i;setTimeout((()=>{if(e){const o=t+n.length+a.length;e.focus();e.setSelectionRange(o,o)}}),0)}else{console.warn("未能识别语音内容");alert("未能识别语音内容,请重试或直接输入文字")}}catch(e){console.error("处理音频录制失败:",e);alert("语音识别失败,请重试")}finally{this.isConvertingAudio=false;this.audioChunks=[]}}stopAudioRecording(){if(this.audioRecorder&&this.isRecordingAudio){this.audioRecorder.stop();this.isRecordingAudio=false;if(this.audioRecordingTimer){clearInterval(this.audioRecordingTimer);this.audioRecordingTimer=null}}}handleSuggestedQuestionClick=e=>{if(this.isLoading||this.currentStreamingMessage)return;this.textAnswer=e;this.submitTextAnswer()};async handleDocumentPreview(e){try{const t=e.doc_info.doc_id.match(/docID_(\d+)/);if(!t||!t[1]){alert("无法解析文档ID");return}const o=t[1];const i=await a({url:`/sdk/v1/files/${o}/info`,method:"GET"});if(i.success&&i.data?.file_url){const t=i.data.file_url;const o=`${t}${t.includes("?")?"&":"?"}ci-process=doc-preview&copyable=1&dstType=html`;if(this.filePreviewMode==="drawer"){this.previewUrl=o;this.previewFileName=e.doc_info.doc_name;this.downloadUrl=t;this.isDrawerOpen=true}else{window.open(o,"_blank")}}else{alert("获取文档链接失败")}}catch(e){console.error("打开文档预览失败:",e);alert("打开文档预览失败,请稍后再试")}}handleDocumentLocalDownload=async()=>{if(!this.downloadUrl)return;try{const e=await fetch(this.downloadUrl);if(!e.ok){throw new Error(`下载文档失败,状态码:${e.status}`)}const t=await e.blob();const o=URL.createObjectURL(t);const i=document.createElement("a");i.href=o;i.download=this.previewFileName;document.body.appendChild(i);i.click();i.remove();URL.revokeObjectURL(o)}catch(e){console.error("本地下载文档失败:",e);alert("本地下载文档失败,请稍后再试")}};handleDocumentQrCodeDownload=()=>{if(!this.downloadUrl)return;const e=S(0,"M");e.addData(this.downloadUrl);e.make();this.downloadQrCodeUrl=e.createDataURL(4,0);this.isDownloadQrCodeOpen=true};handleClearConversation=()=>{if(this.isLoading||this.currentStreamingMessage)return;this.clearConversation.emit(this.conversationId);this.messages=[];this.currentStreamingMessage=null;this.conversationId=undefined;this.currentRefs=[];this.suggestedQuestions=[]};async resetEmployee(e,t){this.messages=[];this.currentStreamingMessage=null;this.conversationId=undefined;this.currentRefs=[];this.suggestedQuestions=[];this.quickQuestions=[];this.employeeDetails=null;this.shouldHideReferences=false;this.showReferences=false;if(e){this.employeeId=e}await this.fetchEmployeeDetails();if(t){this.conversationId=t;await this.loadHistoryMessages(t)}return true}render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.icon||(this.employeeDetails?.avatar||"");const r=this.modalTitle||(this.employeeDetails?.name||"在线客服");const a=()=>{if(!this.showReferences||this.currentRefs.length===0||this.currentStreamingMessage||this.shouldHideReferences)return null;return i("div",{class:"references-section"},i("h3",{class:"references-title"},"引用文档"),i("div",{class:"references-list"},this.currentRefs.map(((e,t)=>i("div",{class:"reference-item",key:`ref-${t}`,onClick:()=>this.handleDocumentPreview(e)},i("div",{class:"reference-header"},i("span",{class:"reference-icon"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))),i("span",{class:"reference-name"},e.doc_info.doc_name),i("span",{class:"download-icon"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})))))))))};const s=()=>{if(!this.customInputs.show_suggested_questions&&!this.currentStreamingMessage){return null}if(this.suggestedQuestionsLoading){return i("div",{class:"loading-suggestions"},i("div",{class:"loading-spinner-small"}))}if(this.suggestedQuestions.length===0)return null;return i("div",{class:"suggested-questions"},i("h3",{class:"suggested-title"},"推荐问题"),this.suggestedQuestions.map(((e,t)=>i("div",{class:"suggested-question",key:`question-${t}`,onClick:()=>this.handleSuggestedQuestionClick(e)},i("span",null,e),i("span",{class:"arrow-right"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})))))))};const l=()=>{if(this.conversationId||this.quickQuestions.length===0||this.currentStreamingMessage)return null;return i("div",{class:"suggested-questions"},i("h3",{class:"suggested-title"},"常见问题"),this.quickQuestions.map(((e,t)=>i("div",{class:"suggested-question",key:`preset-question-${t}`,onClick:()=>this.handleSuggestedQuestionClick(e)},i("span",null,e),i("span",{class:"arrow-right"},i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},i("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})))))))};const d=()=>i("div",{class:"text-input-area"},i("textarea",{class:"text-answer-input",placeholder:"发消息",value:this.textAnswer,onInput:this.handleTextInputChange,onKeyDown:this.handleKeyDown,disabled:this.isRecordingAudio||this.isConvertingAudio}),i("div",{class:"input-toolbar"},i("div",{class:"toolbar-actions"},i("button",{class:"toolbar-button",title:"清除对话记录",onClick:this.handleClearConversation,disabled:this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.messages.length===0},i("img",{src:"https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/brush-alt-svgrepo-com.png",alt:"清除对话记录"}))),i("div",{class:"toolbar-actions"},i("button",{class:{"toolbar-button":true,recording:this.isRecordingAudio,converting:this.isConvertingAudio},title:this.isRecordingAudio?"点击停止录音":this.isConvertingAudio?"正在识别语音...":"语音输入",onClick:this.handleVoiceInputClick,disabled:this.isConvertingAudio||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage},this.isRecordingAudio?i("div",null,i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}),i("circle",{cx:"12",cy:"11",r:"4",fill:"red"}))):this.isConvertingAudio?i("div",{class:"converting-indicator"},i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}))):i("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"})))),i("div",{class:{"send-button":true,disabled:!this.textAnswer.trim()||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.isRecordingAudio||this.isConvertingAudio},onClick:()=>{if(!this.textAnswer.trim()||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.isRecordingAudio||this.isConvertingAudio){return}this.submitTextAnswer()}},i("img",{src:"https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/i_send.png",alt:"发送"}))));return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},n&&i("img",{src:n,class:"header-icon",alt:"应用图标"}),i("div",null,r)),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),i("div",{class:"chat-container"},i("div",{class:"chat-history",onScroll:this.handleScroll,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onWheel:this.handleWheel},this.isLoadingHistory?i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",null,"加载历史消息中...")):i("div",null,this.messages.map((e=>i("div",{id:`message_${e.id}`,key:e.id},i("components-chat-message",{message:e,showFeedbackButtons:false})))),this.currentStreamingMessage&&i("div",{id:`message_${this.currentStreamingMessage.id}`},i("components-chat-message",{message:this.currentStreamingMessage,showFeedbackButtons:false})),this.messages.length===0&&!this.currentStreamingMessage&&i("div",{class:"empty-state"},this.isLoadingEmployeeDetails?i("p",null,"加载中..."):this.employeeDetails?.default_greeting?i("p",null,this.employeeDetails.default_greeting):i("p",null,"请输入...")),a(),s(),l())),i("div",{class:"recording-section"},i("div",{class:"recording-container"},d()))),i("components-drawer",{isOpen:this.isDrawerOpen,drawerTitle:this.previewFileName,width:"80%",onClosed:()=>{this.isDrawerOpen=false;this.previewUrl="";this.previewFileName="";this.downloadUrl="";this.isDownloadQrCodeOpen=false;this.downloadQrCodeUrl=""}},this.employeeDetails?.allow_download_quote_doc===true&&this.downloadUrl&&i("div",{slot:"header-actions",class:"document-download-actions"},i("button",{class:"document-download-button",type:"button",onClick:this.handleDocumentLocalDownload,"aria-label":"本地下载文档"},"本地下载"),i("button",{class:"document-download-button",type:"button",onClick:this.handleDocumentQrCodeDownload,"aria-label":"扫码下载文档"},"扫码下载")),this.previewUrl&&i("div",{class:"file-preview-container"},i("iframe",{src:this.previewUrl,frameborder:"0",width:"100%",style:{border:"none",height:"calc(100vh - 120px)"}}))),i("components-confirm-modal",{isOpen:this.isDownloadQrCodeOpen,modalTitle:"扫码下载",okText:"关闭",cancelText:"取消",onOk:()=>{this.isDownloadQrCodeOpen=false},onCancel:()=>{this.isDownloadQrCodeOpen=false},onClosed:()=>{this.isDownloadQrCodeOpen=false;this.downloadQrCodeUrl=""}},i("div",{class:"document-download-qr-code"},this.downloadQrCodeUrl&&i("img",{src:this.downloadQrCodeUrl,alt:`${this.previewFileName} 下载二维码`}),i("p",null,"请使用手机扫描二维码下载文档")))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Vr.style=Ur+Nr;const Wr='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Jr=".plan-type-section{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.plan-type-section label{font-weight:600;color:#333;margin-bottom:8px}.plan-type-options{display:flex;gap:15px;flex-wrap:wrap}.plan-type-option{flex:1;min-width:120px;border:1px solid #e8e8e8;border-radius:8px;padding:15px;cursor:pointer;display:flex;flex-direction:column;align-items:center;transition:all 0.3s}.plan-type-option:hover{border-color:#1890ff;background-color:#f0f7ff}.plan-type-option.selected{border-color:#1890ff;background-color:#e6f7ff;box-shadow:0 2px 8px rgba(24, 144, 255, 0.2)}.option-icon{font-size:24px;margin-bottom:8px}.option-label{font-size:14px;font-weight:500;color:#333}.resume-upload-section{display:flex;flex-direction:column;gap:8px}.resume-upload-section label{font-weight:600;color:#333;margin-bottom:8px}";const Qr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Yr=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.planningComplete=t(this,"planningComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="职业规划助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始规划";fullscreen=false;customInputs={};showWorkspaceHistory=false;showChatInput=true;showInputHistory=false;mobileUploadAble=false;uploadSuccess;streamComplete;conversationStart;planningComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";isUploading=false;uploadedFileInfo=null;showChatModal=false;isSubmitting=false;selectedPlanType="长期规划";isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;get hostElement(){return o(this)}tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;pcmUploadRef;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false}else{if(this.customInputs&&this.customInputs.type){const e=this.customInputs.type;if(e==="长期规划"||e==="转行建议"||e==="晋升路径"){this.selectedPlanType=e}}await f(this.token);if(this.conversationId||(this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.type){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(e,t)=>{this.isLoadingConversations=true;const o=await T("3022316191018898","pcm-zygh-modal",e,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,t+1);if(o.hasMore&&o.nextCursor){i[t+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=t;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async e=>{if(e==="prev"){if(this.historyConversationPageIndex===0){return}const e=this.historyConversationPageIndex-1;const t=this.historyConversationCursorStack[e]||"";await this.loadHistoryConversations(t,e);return}if(!this.hasMoreHistoryConversations){return}const t=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[t];if(!o){return}await this.loadHistoryConversations(o,t)};handleSelectConversation=e=>{this.conversationId=e;this.isHistoryDrawerOpen=false;this.showChatModal=true};handlePlanTypeChange=e=>{this.selectedPlanType=e};handleStartPlanning=async()=>{if(!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo){j.info("请上传简历");return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};handlePlanningComplete=e=>{this.planningComplete.emit({...e.detail,type:this.selectedPlanType})};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const a=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.type);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((e=>i("div",{key:e.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(e.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},e.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&i("span",{class:"message-count"},e.message_count,"条消息"),e.status&&i("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&!a&&i("div",{class:"input-container"},i("div",{class:"plan-type-section"},i("label",null,"选择规划类型"),i("div",{class:"plan-type-options"},i("div",{class:`plan-type-option ${this.selectedPlanType==="长期规划"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("长期规划")},i("div",{class:"option-icon"},"📈"),i("div",{class:"option-label"},"长期规划")),i("div",{class:`plan-type-option ${this.selectedPlanType==="转行建议"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("转行建议")},i("div",{class:"option-icon"},"🔄"),i("div",{class:"option-label"},"转行建议")),i("div",{class:`plan-type-option ${this.selectedPlanType==="晋升路径"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("晋升路径")},i("div",{class:"option-icon"},"🚀"),i("div",{class:"option-label"},"晋升路径")))),!r&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("components-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo||this.isUploading||this.isSubmitting,onClick:this.handleStartPlanning},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始规划"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,showWorkspaceHistory:this.showWorkspaceHistory,showChatInput:this.showChatInput,botId:"3022316191018898",fullscreen:this.fullscreen,conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,type:this.selectedPlanType},interviewMode:"text",onInterviewComplete:this.handlePlanningComplete}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Yr.style=Wr+(Jr+Qr);const Gr='.resume-node-status{display:flex;align-items:flex-start;gap:8px;max-width:100%;box-sizing:border-box;padding:4px 20px;color:#8c8c8c;font-size:13px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}.resume-node-status>span:last-child{min-width:0}.resume-node-status-spinner{flex:0 0 12px;width:12px;height:12px;box-sizing:border-box;margin-top:4px;border:1.5px dotted #a3a3a3;border-right-color:transparent;border-radius:50%;animation:resume-node-spin 1.2s linear infinite}@keyframes resume-node-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.resume-node-status-spinner{animation:none}}.resume-analysis-region{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:400px}.resume-analysis-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:8px;background:rgba(255, 255, 255, 0.94);color:#666;text-align:center;white-space:pre-line;overflow-wrap:anywhere}.resume-analysis-overlay p{margin:0;max-width:100%}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;z-index:1000;overflow-y:auto}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:auto}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:3vh auto auto auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px;cursor:pointer}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center;white-space:normal;word-wrap:break-word;word-break:break-all;line-height:1.4}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.interview-settings-section{margin-bottom:24px;padding:20px;background-color:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.settings-row{margin-bottom:20px}.settings-row:last-child{margin-bottom:0}.settings-label{display:block;font-weight:500;color:#333;margin-bottom:12px;font-size:14px}.question-number-section{width:100%}.slider-container{display:flex;align-items:center;gap:12px}.question-slider{flex:1;height:6px;background:#ddd;outline:none;border-radius:3px;-webkit-appearance:none;appearance:none}.question-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.question-slider::-moz-range-thumb{width:20px;height:20px;background:#0D75FB;cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}.slider-value{font-weight:600;color:#0D75FB;font-size:14px;min-width:30px;text-align:center}.analysis-toggle-section{width:100%}.toggle-container{display:flex;align-items:center;gap:12px}.toggle-switch{position:relative;display:inline-block;width:44px;height:24px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:0.3s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:0.3s;border-radius:50%;box-shadow:0 2px 4px rgba(0, 0, 0, 0.2)}input:checked+.toggle-slider{background-color:#0D75FB}input:checked+.toggle-slider:before{transform:translateX(20px)}.toggle-text{font-size:14px;color:#666;font-weight:500}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.header-history-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#bbb;cursor:pointer;font-size:13px;font-family:inherit;line-height:1;transition:all 0.2s ease;flex-shrink:0;white-space:nowrap}.header-history-button svg{width:16px;height:16px;display:block;flex-shrink:0}.header-history-button:hover{background-color:rgba(0, 0, 0, 0.04);color:#666}.header-history-button:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-drawer-content{height:100%;display:flex;flex-direction:column}.conversation-list{flex:1;overflow-y:auto;padding:8px 0}.loading-conversations,.empty-conversations{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#999}.loading-conversations .loading-spinner-small{margin-bottom:12px}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:0 8px 4px 8px;border-radius:8px;cursor:pointer;transition:all 0.2s ease;border:1px solid transparent}.conversation-item:hover{background:#f5f5f5}.conversation-info{flex:1;min-width:0}.conversation-title{font-size:14px;font-weight:500;color:#262626;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c8c8c}.conversation-time{flex-shrink:0}.message-count{flex-shrink:0}.conversation-status{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.conversation-status.completed{background:#f6ffed;color:#52c41a}.conversation-status.running{background:#fff7e6;color:#fa8c16}.header-history-entry{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:4px 8px;border:none;border-radius:4px;background:#e6f7ff;color:#1890ff;cursor:pointer;font-size:12px;font-family:inherit;line-height:1;white-space:nowrap;transition:all 0.2s ease}.header-history-entry:hover{background:#bae7ff;color:#0958d9;transform:translateY(-1px)}.header-history-entry:focus-visible{outline:2px solid rgba(13, 117, 251, 0.35);outline-offset:2px}.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 16px;border-top:1px solid #f0f0f0}.history-pagination-button{min-width:72px;padding:6px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#595959;cursor:pointer;font-size:12px;transition:all 0.2s ease}.history-pagination-button:hover:not(:disabled){border-color:#1890ff;color:#1890ff;background:#e6f7ff}.history-pagination-button:disabled{border-color:#f0f0f0;color:#bfbfbf;background:#fafafa;cursor:not-allowed}.history-pagination-info{flex:1;text-align:center;color:#8c8c8c;font-size:12px}';const Xr=".plan-type-section{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.plan-type-section label{font-weight:600;color:#333;margin-bottom:8px}.plan-type-options{display:flex;border:1px solid #d9d9d9;border-radius:6px;overflow:hidden}.plan-type-option{flex:1;border:none;border-right:1px solid #d9d9d9;padding:7px 8px;cursor:pointer;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:5px;transition:background-color 0.2s,\r\n color 0.2s;background-color:#fff}.plan-type-option:last-child{border-right:none}.plan-type-option:hover{background-color:#f0f7ff}.plan-type-option.selected{background-color:#1890ff}.plan-type-option.selected .option-icon,.plan-type-option.selected .option-label{color:#fff}.option-icon{display:flex;align-items:center;justify-content:center}.option-icon img{height:18px;width:auto}.option-label{font-size:13px;font-weight:500;color:#555;white-space:nowrap}.resume-upload-section{display:flex;flex-direction:column;gap:8px}.resume-upload-section label{font-weight:600;color:#333;margin-bottom:8px}.dynamic-form-section{margin-top:20px;margin-bottom:20px}.form-fields{display:flex;flex-direction:column;gap:16px}.form-field{display:flex;flex-direction:column;gap:8px}.form-field label{font-weight:600;color:#333;font-size:14px}.form-input{padding:10px 12px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px;transition:all 0.3s;outline:none}.form-input:hover{border-color:#40a9ff}.form-input:focus{border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.1)}.form-input::placeholder{color:#bfbfbf}.form-hint{font-size:12px;color:#8c8c8c;line-height:1.5;margin-top:-8px;padding:8px 12px;background-color:#f5f5f5;border-radius:4px;border-left:3px solid #1890ff}";const Kr=":host{font-size:16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;font-weight:normal;font-style:normal;font-variant:normal;line-height:1.5;letter-spacing:normal;word-spacing:normal;color:#333;text-align:left;text-indent:0;text-transform:none;white-space:normal;word-wrap:normal;word-break:normal;visibility:visible;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;border-collapse:separate;border-spacing:0;caption-side:top;empty-cells:show;table-layout:auto;quotes:auto;cursor:auto;direction:ltr;orphans:2;widows:2;page-break-inside:auto;text-decoration:none;text-shadow:none;box-sizing:border-box;writing-mode:horizontal-tb;text-orientation:mixed}";const Zr=class{constructor(o){e(this,o);this.modalClosed=t(this,"modalClosed");this.uploadSuccess=t(this,"uploadSuccess");this.streamComplete=t(this,"streamComplete");this.conversationStart=t(this,"conversationStart");this.planningComplete=t(this,"planningComplete");this.tokenInvalid=t(this,"tokenInvalid");this.someErrorEvent=t(this,"someErrorEvent")}modalTitle="职业规划助手";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请开始规划";fullscreen=false;customInputs={};showWorkspaceHistory=false;showChatInput=true;showInputHistory=false;mobileUploadAble=false;uploadSuccess;streamComplete;conversationStart;planningComplete;tokenInvalid;someErrorEvent;filePreviewMode="drawer";isUploading=false;uploadedFileInfo=null;showChatModal=false;isSubmitting=false;selectedPlanType="初入职场";isHistoryDrawerOpen=false;historyConversations=[];isLoadingConversations=false;historyConversationCursorStack=[""];historyConversationPageIndex=0;hasMoreHistoryConversations=false;targetPosition="";industryName="";jobPosition="";timePeriod="";get hostElement(){return o(this)}tokenInvalidListener;removeErrorListener;_historyConversationPageSize=20;pcmUploadRef;handleTokenChange(e){if(e&&e!==h.getToken()){h.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false}else{if(this.customInputs&&this.customInputs.type){const e=this.customInputs.type;if(e==="转型建议"||e==="晋升路径"||e==="初入职场"){this.selectedPlanType=e}}await f(this.token);if(this.conversationId||(this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.type){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){d.setItem("modal-zIndex",this.zIndex)}if(this.token){h.setToken(this.token)}f(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=C.addErrorListener((e=>{this.someErrorEvent.emit(e)}));document.addEventListener("pcm-token-invalid",this.tokenInvalidListener)}disconnectedCallback(){document.removeEventListener("pcm-token-invalid",this.tokenInvalidListener);if(this.removeErrorListener){this.removeErrorListener()}}handleClose=()=>{this.modalClosed.emit()};loadHistoryConversations=async(e,t)=>{this.isLoadingConversations=true;const o=await T("121182005294690304","pcm-zygh-v2-modal",e,this._historyConversationPageSize);const i=this.historyConversationCursorStack.slice(0,t+1);if(o.hasMore&&o.nextCursor){i[t+1]=o.nextCursor}this.historyConversationCursorStack=i;this.historyConversationPageIndex=t;this.historyConversations=o.items;this.hasMoreHistoryConversations=o.hasMore;this.isLoadingConversations=false};handleInputHistoryClick=async()=>{this.isHistoryDrawerOpen=true;this.historyConversationCursorStack=[""];await this.loadHistoryConversations("",0)};handleHistoryConversationPageChange=async e=>{if(e==="prev"){if(this.historyConversationPageIndex===0){return}const e=this.historyConversationPageIndex-1;const t=this.historyConversationCursorStack[e]||"";await this.loadHistoryConversations(t,e);return}if(!this.hasMoreHistoryConversations){return}const t=this.historyConversationPageIndex+1;const o=this.historyConversationCursorStack[t];if(!o){return}await this.loadHistoryConversations(o,t)};handleSelectConversation=e=>{this.conversationId=e;this.isHistoryDrawerOpen=false;this.showChatModal=true};handlePlanTypeChange=e=>{this.selectedPlanType=e;this.targetPosition="";this.industryName="";this.jobPosition="";this.timePeriod=""};handleStartPlanning=async()=>{if(!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo){j.info("请上传简历");return}if(await(this.pcmUploadRef?.getIsUploading?.())){j.info("文件上传中,请稍后");return}this.isSubmitting=true;this.showChatModal=true;this.isSubmitting=false};handlePlanningComplete=e=>{this.planningComplete.emit({...e.detail,type:this.selectedPlanType})};getPlanTypeIcon=e=>{const t=this.selectedPlanType===e;const o="https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/";const i={初入职场:"i_entry_level",晋升路径:"i_promotion",转型建议:"i_transition"};return`${o}${i[e]}${t?"_actived":""}.png`};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const o={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&(this.customInputs.file_url||this.customInputs.resume_content));const a=Boolean((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.type);return i("div",{class:o,style:e},i("div",{class:t},this.isShowHeader&&i("div",{class:"modal-header"},i("div",{class:"header-left"},this.icon&&i("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),i("div",null,this.modalTitle),this.showInputHistory&&i("button",{type:"button",class:"header-history-entry",onClick:this.handleInputHistoryClick,title:"历史会话"},"历史会话")),this.isNeedClose&&i("button",{class:"close-button",onClick:this.handleClose},i("span",null,"×"))),this.showInputHistory&&i("components-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},i("div",{class:"history-drawer-content"},i("div",{class:"conversation-list"},this.isLoadingConversations?i("div",{class:"loading-conversations"},i("div",{class:"loading-spinner-small"}),i("p",null,"加载中...")):this.historyConversations.length===0?i("div",{class:"empty-conversations"},i("p",null,"暂无历史会话")):this.historyConversations.map((e=>i("div",{key:e.id,class:"conversation-item",onClick:()=>this.handleSelectConversation(e.id)},i("div",{class:"conversation-info"},i("div",{class:"conversation-title"},e.name),i("div",{class:"conversation-meta"},i("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&i("span",{class:"message-count"},e.message_count,"条消息"),e.status&&i("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))))))),!this.isLoadingConversations&&(this.historyConversationPageIndex>0||this.hasMoreHistoryConversations)&&i("div",{class:"history-pagination"},i("button",{type:"button",class:"history-pagination-button",disabled:this.historyConversationPageIndex===0,onClick:()=>this.handleHistoryConversationPageChange("prev")},"上一页"),i("span",{class:"history-pagination-info"},"第 ",this.historyConversationPageIndex+1," 页"),i("button",{type:"button",class:"history-pagination-button",disabled:!this.hasMoreHistoryConversations,onClick:()=>this.handleHistoryConversationPageChange("next")},"下一页")))),!this.showChatModal&&!this.conversationId&&!a&&i("div",{class:"input-container"},i("div",{class:"plan-type-section"},i("label",null,"选择建议类型"),i("div",{class:"plan-type-options"},i("div",{class:`plan-type-option ${this.selectedPlanType==="初入职场"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("初入职场")},i("div",{class:"option-icon"},i("img",{src:this.getPlanTypeIcon("初入职场"),alt:"初入职场"})),i("div",{class:"option-label"},"初入职场")),i("div",{class:`plan-type-option ${this.selectedPlanType==="晋升路径"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("晋升路径")},i("div",{class:"option-icon"},i("img",{src:this.getPlanTypeIcon("晋升路径"),alt:"晋升路径"})),i("div",{class:"option-label"},"晋升路径")),i("div",{class:`plan-type-option ${this.selectedPlanType==="转型建议"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("转型建议")},i("div",{class:"option-icon"},i("img",{src:this.getPlanTypeIcon("转型建议"),alt:"转型建议"})),i("div",{class:"option-label"},"转型建议")))),i("div",{class:"dynamic-form-section"},this.selectedPlanType==="初入职场"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"感兴趣的行业"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的行业",value:this.industryName,onInput:e=>this.industryName=e.target.value})),i("div",{class:"form-field"},i("label",null,"感兴趣的职位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的职位",value:this.jobPosition,onInput:e=>this.jobPosition=e.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,推荐您至少填写其中一项")),this.selectedPlanType==="转型建议"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"感兴趣的行业"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的行业",value:this.industryName,onInput:e=>this.industryName=e.target.value})),i("div",{class:"form-field"},i("label",null,"感兴趣的职位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您感兴趣的职位",value:this.jobPosition,onInput:e=>this.jobPosition=e.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,推荐您至少填写其中一项"),i("div",{class:"form-field"},i("label",null,"期望转型时间"),i("input",{type:"text",class:"form-input",placeholder:"请输入您期望的转型时间",value:this.timePeriod,onInput:e=>this.timePeriod=e.target.value}))),this.selectedPlanType==="晋升路径"&&i("div",{class:"form-fields"},i("div",{class:"form-field"},i("label",null,"晋升目标岗位"),i("input",{type:"text",class:"form-input",placeholder:"请输入您的晋升目标岗位",value:this.targetPosition,onInput:e=>this.targetPosition=e.target.value})),i("div",{class:"form-hint"},"为确保职业规划报告的准确性,建议您填写晋升目标岗位名称"))),!r&&i("div",{class:"resume-upload-section"},i("label",null,"上传简历"),i("components-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["resume"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),i("button",{class:"submit-button",disabled:!this.customInputs?.file_url&&!this.customInputs?.resume_content&&!this.uploadedFileInfo||this.isUploading||this.isSubmitting,onClick:this.handleStartPlanning},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始规划"),i("div",{class:"ai-disclaimer"},i("p",null,"所有内容均由AI生成仅供参考"),i("p",{class:"beian-info"},i("span",null,"中央网信办生成式人工智能服务备案号"),":",i("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&i("div",{class:"loading-container"},i("div",{class:"loading-spinner"}),i("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&i("div",null,i("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isNeedClose,showWorkspaceHistory:this.showWorkspaceHistory,showChatInput:this.showChatInput,botId:"121182005294690304",fullscreen:this.fullscreen,conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.customInputs?.file_url||this.uploadedFileInfo?.cos_key,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,type:this.selectedPlanType,...this.industryName?{industry_name:this.industryName}:{},...this.targetPosition||this.jobPosition?{target_position:this.targetPosition||this.jobPosition}:{},...this.timePeriod?{time_period:this.timePeriod}:{}},interviewMode:"text",onInterviewComplete:this.handlePlanningComplete}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Zr.style=Gr+(Xr+Kr);export{we as components_chat_message,ke as components_confirm_modal,Ie as components_digital_human,_e as components_drawer,Me as components_export_records_modal,Re as components_message,Pe as components_mobile_input_btn,Ve as components_mobile_upload_btn,Qe as components_position_selector,Ke as components_thousand_resume_wrapper,ot as components_upload,nt as components_voice_input_btn,dt as oem_jlsx_modal,ft as oem_zygh_modal,bt as pcm_1zhanshi_mnms_modal,Po as pcm_app_chat_modal,No as pcm_ats_mnms_modal,Jo as pcm_button,Go as pcm_card,ei as pcm_htws_modal,ni as pcm_hyzj_modal,wn as pcm_jd_modal,zn as pcm_jlpp_modal,Sn as pcm_jlzz_modal,zr as pcm_mnct_modal,Sr as pcm_mnms_modal,Er as pcm_mnms_zp_modal,Rr as pcm_msbg_modal,Lr as pcm_qgqjl_modal,$r as pcm_virtual_chat_modal,Vr as pcm_zsk_chat_modal,Yr as pcm_zygh_modal,Zr as pcm_zygh_v2_modal};
8
+ //# sourceMappingURL=p-f2445cbd.entry.js.map