pcm-agents 0.6.61 → 0.6.63
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.
- package/dist/cjs/components-position-selector_28.cjs.entry.js +3671 -3515
- package/dist/cjs/components-position-selector_28.cjs.entry.js.map +1 -1
- package/dist/cjs/index-C_qhED9Z.js +4 -4
- package/dist/cjs/{index-C939KGz6.js → index-NR0bG-Uv.js} +3 -3
- package/dist/cjs/{index-C939KGz6.js.map → index-NR0bG-Uv.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/oem-htws-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-jd-modal.cjs.entry.js +2 -2
- package/dist/cjs/oem-jlpp-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-jlsx-modal.cjs.entry.js +2 -2
- package/dist/cjs/{pcm-jlzz-modal.cjs.entry.js → oem-jlzz-modal.cjs.entry.js} +13 -158
- package/dist/cjs/oem-jlzz-modal.cjs.entry.js.map +1 -0
- package/dist/{pcm-agents/pcm-jlzz-modal.entry.esm.js.map → cjs/oem-jlzz-modal.entry.cjs.js.map} +1 -1
- package/dist/cjs/oem-mnct-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-qgqjl-modal.cjs.entry.js +1 -1
- package/dist/cjs/oem-zygh-modal.cjs.entry.js +1 -1
- package/dist/cjs/pcm-agents.cjs.js +1 -1
- package/dist/cjs/pcm-hr-chat-modal.cjs.entry.js +2 -2
- package/dist/cjs/pcm-mnms-modal.cjs.entry.js +2 -3
- package/dist/cjs/pcm-mnms-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pcm-mnms-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pcm-zygh-v2-modal.cjs.entry.js +1 -1
- package/dist/cjs/{sentry-reporter-DXDpkMTS.js → sentry-reporter-BvQcVVQ_.js} +3 -3
- package/dist/cjs/{sentry-reporter-DXDpkMTS.js.map → sentry-reporter-BvQcVVQ_.js.map} +1 -1
- package/dist/collection/components/oem-mnms-modal/oem-mnms-modal.js +2 -3
- package/dist/collection/components/oem-mnms-modal/oem-mnms-modal.js.map +1 -1
- package/dist/collection/components/pcm-1zhanshi-mnms-modal/pcm-1zhanshi-mnms-modal.js +1 -1
- package/dist/collection/components/pcm-1zhanshi-mnms-modal/pcm-1zhanshi-mnms-modal.js.map +1 -1
- package/dist/collection/components/pcm-jlzz-modal/pcm-jlzz-modal.js +34 -0
- package/dist/collection/components/pcm-jlzz-modal/pcm-jlzz-modal.js.map +1 -1
- package/dist/collection/components/pcm-mnms-modal/pcm-mnms-modal.js +2 -3
- package/dist/collection/components/pcm-mnms-modal/pcm-mnms-modal.js.map +1 -1
- package/dist/collection/components/pcm-mnms-zp-modal/pcm-mnms-zp-modal.js +2 -3
- package/dist/collection/components/pcm-mnms-zp-modal/pcm-mnms-zp-modal.js.map +1 -1
- package/dist/components/components-position-selector.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/oem-htws-modal.js +6 -6
- package/dist/components/oem-jd-modal.js +4 -4
- package/dist/components/oem-jlpp-modal.js +8 -8
- package/dist/components/oem-jlsx-modal.js +6 -6
- package/dist/components/oem-jlzz-modal.js +6 -6
- package/dist/components/oem-mnct-modal.js +8 -8
- package/dist/components/oem-mnms-modal.js +10 -11
- package/dist/components/oem-mnms-modal.js.map +1 -1
- package/dist/components/oem-qgqjl-modal.js +8 -8
- package/dist/components/oem-zygh-modal.js +6 -6
- package/dist/components/{p-CfvqfIAT.js → p-B0in66n7.js} +3 -3
- package/dist/components/{p-CfvqfIAT.js.map → p-B0in66n7.js.map} +1 -1
- package/dist/components/{p-B_sMa6Wg.js → p-C3QG0kk0.js} +4 -4
- package/dist/components/{p-B_sMa6Wg.js.map → p-C3QG0kk0.js.map} +1 -1
- package/dist/components/{p-BvzZ1qpT.js → p-CNKZCbo_.js} +5 -5
- package/dist/components/{p-BvzZ1qpT.js.map → p-CNKZCbo_.js.map} +1 -1
- package/dist/components/{p-D88J-Sqf.js → p-CNx58GiW.js} +3 -3
- package/dist/components/{p-D88J-Sqf.js.map → p-CNx58GiW.js.map} +1 -1
- package/dist/components/{p-CLRf3Ghu.js → p-DY30qE8x.js} +3 -3
- package/dist/components/{p-CLRf3Ghu.js.map → p-DY30qE8x.js.map} +1 -1
- package/dist/components/{p-CzTEcT75.js → p-DeoeSzgS.js} +3 -3
- package/dist/components/{p-CzTEcT75.js.map → p-DeoeSzgS.js.map} +1 -1
- package/dist/components/{p-C-T9jPVd.js → p-Dl6ISIDE.js} +3 -3
- package/dist/components/{p-C-T9jPVd.js.map → p-Dl6ISIDE.js.map} +1 -1
- package/dist/components/{p-CDtnxtHn.js → p-_ysXxBbt.js} +3 -3
- package/dist/components/{p-CDtnxtHn.js.map → p-_ysXxBbt.js.map} +1 -1
- package/dist/components/{p-SkhfviAi.js → p-ebsIIpQh.js} +3 -3
- package/dist/components/{p-SkhfviAi.js.map → p-ebsIIpQh.js.map} +1 -1
- package/dist/components/{p-BnveSmhC.js → p-zNL5HFbN.js} +3 -3
- package/dist/components/{p-BnveSmhC.js.map → p-zNL5HFbN.js.map} +1 -1
- package/dist/components/pcm-1zhanshi-mnms-modal.js +6 -6
- package/dist/components/pcm-1zhanshi-mnms-modal.js.map +1 -1
- package/dist/components/pcm-app-chat-modal.js +1 -1
- package/dist/components/pcm-card.js +1 -1
- package/dist/components/pcm-chat-message.js +1 -1
- package/dist/components/pcm-digital-human.js +1 -1
- package/dist/components/pcm-export-records-modal.js +1 -1
- package/dist/components/pcm-hr-chat-modal.js +2 -2
- package/dist/components/pcm-htws-modal.js +7 -7
- package/dist/components/pcm-hyzj-modal.js +4 -4
- package/dist/components/pcm-jd-modal.js +4 -4
- package/dist/components/pcm-jlpp-modal.js +7 -7
- package/dist/components/pcm-jlsx-modal.js +5 -5
- package/dist/components/pcm-jlzz-modal.js +22 -6
- package/dist/components/pcm-jlzz-modal.js.map +1 -1
- package/dist/components/pcm-mnct-modal.js +4 -4
- package/dist/components/pcm-mnms-modal.js +9 -10
- package/dist/components/pcm-mnms-modal.js.map +1 -1
- package/dist/components/pcm-mnms-zp-modal.js +9 -10
- package/dist/components/pcm-mnms-zp-modal.js.map +1 -1
- package/dist/components/pcm-mobile-input-btn.js +1 -1
- package/dist/components/pcm-mobile-upload-btn.js +1 -1
- package/dist/components/pcm-msbg-modal.js +4 -4
- package/dist/components/pcm-qgqjl-modal.js +7 -7
- package/dist/components/pcm-upload.js +1 -1
- package/dist/components/pcm-virtual-chat-modal.js +1 -1
- package/dist/components/pcm-zsk-chat-modal.js +2 -2
- package/dist/components/pcm-zygh-modal.js +6 -6
- package/dist/components/pcm-zygh-v2-modal.js +6 -6
- package/dist/esm/components-position-selector_28.entry.js +3671 -3515
- package/dist/esm/components-position-selector_28.entry.js.map +1 -1
- package/dist/esm/index-Bq0K-WqZ.js +4 -4
- package/dist/esm/{index-CHvJS-H3.js → index-DcHaiJdv.js} +3 -3
- package/dist/esm/{index-CHvJS-H3.js.map → index-DcHaiJdv.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/oem-htws-modal.entry.js +1 -1
- package/dist/esm/oem-jd-modal.entry.js +2 -2
- package/dist/esm/oem-jlpp-modal.entry.js +1 -1
- package/dist/esm/oem-jlsx-modal.entry.js +2 -2
- package/dist/esm/{pcm-jlzz-modal.entry.js → oem-jlzz-modal.entry.js} +13 -158
- package/dist/esm/{pcm-jlzz-modal.entry.js.map → oem-jlzz-modal.entry.js.map} +1 -1
- package/dist/esm/oem-mnct-modal.entry.js +1 -1
- package/dist/esm/oem-qgqjl-modal.entry.js +1 -1
- package/dist/esm/oem-zygh-modal.entry.js +1 -1
- package/dist/esm/pcm-agents.js +1 -1
- package/dist/esm/pcm-hr-chat-modal.entry.js +2 -2
- package/dist/esm/pcm-mnms-modal.entry.js +2 -3
- package/dist/esm/pcm-mnms-modal.entry.js.map +1 -1
- package/dist/esm/pcm-zygh-v2-modal.entry.js +1 -1
- package/dist/esm/{sentry-reporter-B4QtDqo5.js → sentry-reporter-BZ6jaP_d.js} +3 -3
- package/dist/esm/{sentry-reporter-B4QtDqo5.js.map → sentry-reporter-BZ6jaP_d.js.map} +1 -1
- package/dist/pcm-agents/index.esm.js +1 -1
- package/dist/{cjs/pcm-jlzz-modal.entry.cjs.js.map → pcm-agents/oem-jlzz-modal.entry.esm.js.map} +1 -1
- package/dist/pcm-agents/{p-59317c49.entry.js → p-079c81fd.entry.js} +2 -2
- package/dist/pcm-agents/{p-8110e9ac.entry.js → p-178f3772.entry.js} +2 -2
- package/dist/pcm-agents/{p-1e7fce4d.entry.js → p-22e147d9.entry.js} +2 -2
- package/dist/pcm-agents/{p-8bd845ed.entry.js → p-26c3bb94.entry.js} +2 -2
- package/dist/pcm-agents/p-285a11db.entry.js +2 -0
- package/dist/pcm-agents/{p-ccbdd899.entry.js.map → p-285a11db.entry.js.map} +1 -1
- package/dist/pcm-agents/{p-0bf21647.entry.js → p-359d3474.entry.js} +2 -2
- package/dist/pcm-agents/{p-1b567acf.entry.js → p-4a91a26a.entry.js} +2 -2
- package/dist/pcm-agents/{p-9eafe75b.entry.js → p-6037c915.entry.js} +2 -2
- package/dist/pcm-agents/{p-406da9d5.entry.js → p-7a6267c2.entry.js} +2 -2
- package/dist/pcm-agents/p-CBQPOkZb.js +2 -0
- package/dist/pcm-agents/{p-UID-6O7M.js.map → p-CBQPOkZb.js.map} +1 -1
- package/dist/pcm-agents/{p-CaZKzVLc.js → p-WTSeW6oH.js} +2 -2
- package/dist/pcm-agents/{p-CaZKzVLc.js.map → p-WTSeW6oH.js.map} +1 -1
- package/dist/pcm-agents/p-ca2fb22a.entry.js +245 -0
- package/dist/pcm-agents/p-ca2fb22a.entry.js.map +1 -0
- package/dist/pcm-agents/{p-fefd9ac6.entry.js → p-da967a8c.entry.js} +2 -2
- package/dist/pcm-agents/{p-f89bb8a2.entry.js → p-df3f8c9a.entry.js} +2 -2
- package/dist/pcm-agents/{p-f89bb8a2.entry.js.map → p-df3f8c9a.entry.js.map} +1 -1
- package/dist/pcm-agents/pcm-agents.esm.js +1 -1
- package/dist/pcm-agents/pcm-mnms-modal.entry.esm.js.map +1 -1
- package/dist/types/components/oem-mnms-modal/oem-mnms-modal.d.ts +0 -1
- package/dist/types/components/pcm-jlzz-modal/pcm-jlzz-modal.d.ts +5 -0
- package/dist/types/components/pcm-mnms-modal/pcm-mnms-modal.d.ts +0 -1
- package/dist/types/components/pcm-mnms-zp-modal/pcm-mnms-zp-modal.d.ts +0 -1
- package/dist/types/components.d.ts +14 -6
- package/package.json +1 -1
- package/dist/cjs/pcm-jlzz-modal.cjs.entry.js.map +0 -1
- package/dist/pcm-agents/p-7a11e5b2.entry.js +0 -245
- package/dist/pcm-agents/p-7a11e5b2.entry.js.map +0 -1
- package/dist/pcm-agents/p-UID-6O7M.js +0 -2
- package/dist/pcm-agents/p-ccbdd899.entry.js +0 -2
- /package/dist/pcm-agents/{p-59317c49.entry.js.map → p-079c81fd.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-8110e9ac.entry.js.map → p-178f3772.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-1e7fce4d.entry.js.map → p-22e147d9.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-8bd845ed.entry.js.map → p-26c3bb94.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-0bf21647.entry.js.map → p-359d3474.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-1b567acf.entry.js.map → p-4a91a26a.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-9eafe75b.entry.js.map → p-6037c915.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-406da9d5.entry.js.map → p-7a6267c2.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-fefd9ac6.entry.js.map → p-da967a8c.entry.js.map} +0 -0
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as o,g as i}from"./p-Bq0K-WqZ.js";import{i as n,a as r,v as a,c as s,P as l,e as d,f as c,j as p,s as h,b as g,k as m,u,l as f,m as b,n as x,g as w,o as y,F as k,p as v}from"./p-CaZKzVLc.js";import{M as C}from"./p-DXVhHj6-.js";import{E as z}from"./p-C0FYX2-Z.js";import{m as I,e as S,s as j}from"./p-C39egyl9.js";import{S as _}from"./p-UID-6O7M.js";import"./p-Bs-zO1WZ.js";const F=":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 M='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const T=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 n({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{C.error(e.message||"获取职位列表失败");this.positionsList=[];this.totalCount=0}}catch(e){console.error("获取职位列表失败:",e);C.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 i=t>1;return o("div",{key:"b9a2a7a5fcf7f6babf545618c29c94767c9a7f15",class:"position-selector-container"},o("div",{key:"34b07a48a6407fb38232fa15bca9a1bc46a44977",class:"search-bar"},o("div",{key:"d9d6753b9c15deda249d712aab910b3bd3291ee6",class:"search-input-wrapper"},o("svg",{key:"0e3d4f496e946da810a951ec053b87742ea5d6a1",class:"search-icon",viewBox:"0 0 1024 1024",width:"16",height:"16"},o("path",{key:"81430360a9066757d05dec77db66d9ae2bf4f934",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"})),o("input",{key:"e7c7a2411ef25c92febcb8d954a5b39adf6f2ddb",type:"text",class:"search-input",placeholder:"搜索职位名称",value:this.searchKeyword,onInput:this.handleSearchInput,onKeyPress:this.handleSearchKeyPress}),this.searchKeyword&&o("button",{key:"a0ca6955d7f8cfd0e7a1f8cbf8917fd34f9ec0c6",class:"clear-button",onClick:this.handleSearchClear},o("svg",{key:"2deeeb04f3ec672fb6ddb6a94c28f02d054673b2",viewBox:"0 0 1024 1024",width:"14",height:"14"},o("path",{key:"ef7a34671fd551b10bd80207e8b5c95e9a181a51",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"})))),o("button",{key:"75463782a60e1a9cdd92ab50d5c958682606b5c2",class:"search-button",onClick:this.handleSearchClick},"搜索")),this.loading&&o("div",{key:"377bb0fefe3a0712a18d876de9728996a33537be",class:"loading-container"},o("div",{key:"8af27dad62ec9606e71433f37410a9392751e176",class:"loading-spinner"}),o("p",{key:"a8912f94c5a7b947f19166634653b6501fe0ebfe"},"加载中...")),!this.loading&&o("div",{key:"49a30136533f75beea03038bf99242a8165a6a71",class:"position-list"},e.length===0?o("div",{class:"empty-container"},o("svg",{class:"empty-icon",viewBox:"0 0 1024 1024",width:"64",height:"64"},o("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"}),o("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"})),o("p",{class:"empty-text"},"暂无职位")):o("div",{class:"table-container"},o("table",{class:"position-table"},o("thead",null,o("tr",null,this.multiple&&o("th",{class:"checkbox-column"}),o("th",{class:"title-column"},"职位名称"),o("th",{class:"company-column"},"公司名称"),o("th",{class:"location-column"},"工作地点"),o("th",{class:"requirements-column"},"职位要求"),!this.multiple&&o("th",{class:"action-column"},"操作"))),o("tbody",null,e.map((e=>o("tr",{key:e.id,class:{"selected-row":this.multiple&&this.isSelected(e.id)}},this.multiple&&o("td",{class:"checkbox-column"},o("input",{type:"checkbox",class:"position-checkbox",checked:this.isSelected(e.id),onChange:t=>this.handleCheckboxChange(e,t.target.checked)})),o("td",{class:"title-column",title:e.title},e.title),o("td",{class:"company-column",title:e.company_name},e.company_name||"-"),o("td",{class:"location-column",title:e.location},e.location||"-"),o("td",{class:"requirements-column"},o("div",{class:"requirements-text",title:e.job_requirements||e.job_responsibilities||"-"},e.job_requirements||e.job_responsibilities||"-")),!this.multiple&&o("td",{class:"action-column"},o("button",{class:"select-button",onClick:()=>this.handleSelect(e)},"选择"))))))))),i&&o("div",{key:"a120b2b9a11f140d3b4bb690bdded76c84953fbf",class:"pagination-container"},o("button",{key:"230a815e0715d1c43d2b28845488bd929d47e4ed",class:"pagination-button",disabled:this.currentPage===1,onClick:()=>this.handlePageChange(this.currentPage-1)},"上一页"),o("span",{key:"18932249cd20ec09990a1f63732d81073f9d49d3",class:"pagination-info"},"第 ",this.currentPage," / ",t," 页,共 ",this.totalCount," 条"),o("button",{key:"856b49851b722b4d267ba34f65a7793b864b0c18",class:"pagination-button",disabled:this.currentPage>=t,onClick:()=>this.handlePageChange(this.currentPage+1)},"下一页")))}static get watchers(){return{selectedIds:["handleSelectedIdsChange"],oemId:["handleOemIdChange"]}}};T.style=F+M;const B=".resume-type-container{display:flex;flex-direction:row;gap:32px;margin-bottom:16px;border-bottom:2px solid #f0f0f0;padding-left:4px}.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;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 E='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const D=":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 O=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")}modalTitle="简历制作";token;isOpen=false;isSuccess=false;exportButtonText="导出简历json数据";modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="根据对话生成简历";fullscreen=false;customInputs={};uploadSuccess;streamComplete;conversationStart;tokenInvalid;someErrorEvent;getResumeData;filePreviewMode="window";isUploading=false;uploadedFileInfo=null;showChatModal=false;resumeType="chat";get hostElement(){return i(this)}isSubmitting=false;showIframe=false;tokenInvalidListener;removeErrorListener;pcmUploadRef;_iframeEl;handleTokenChange(e){if(e&&e!==r.getToken()){r.setToken(e)}}async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.showIframe=false;this.isSuccess=false;this.conversationId=undefined;this.resumeType="chat"}else{await a(this.token)}}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){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.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",l];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:true,exportButtonText:this.exportButtonText}},e)}};exampleMethodFromIframe(e){this.getResumeData.emit(JSON.parse(e))}handleClose=()=>{this.modalClosed.emit()};changeType=e=>{this.resumeType=e};handleStartInterview=async()=>{if(this.resumeType==="upload"&&!this.uploadedFileInfo){C.info("请上传简历");return}if(this.resumeType==="upload"&&await(this.pcmUploadRef?.getIsUploading?.())){C.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 i={"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 o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&!this.showChatModal&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!r&&!this.showIframe&&o("div",{class:"input-container"},o("div",{class:"resume-type-container"},o("div",{class:{"resume-type-item":true,selected:this.resumeType==="chat"},onClick:()=>this.changeType("chat")},"直接开始"),o("div",{class:{"resume-type-item":true,selected:this.resumeType==="upload"},onClick:()=>this.changeType("upload")},"上传简历")),!n&&this.resumeType==="upload"&&o("div",{class:"resume-upload-section"},o("label",null,"上传简历"),o("pcm-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble:true,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==="chat"&&o("div",{class:"jd-input-section"},o("label",{htmlFor:"job-description"},"从头开始创建"),o("div",{class:"chat-content"},o("div",{class:"chat-content-text"},"🤖无需复杂操作,只需回答AI的几个简单问题,系统会根据你的回答自动生成内容完整、格式专业的个人简历"))),o("button",{class:"submit-button",disabled:this.resumeType==="upload"&&!n&&!this.uploadedFileInfo||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":this.resumeType==="upload"?"开始制作":"开始对话"),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),this.showChatModal&&o(o.Fragment,null,o("div",{style:{display:this.resumeType==="chat"?"block":"none"}},o("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,fullscreen:this.fullscreen,showWorkspaceHistory:false,botId:"39284520284983296",conversationId:this.conversationId,defaultQuery: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},interviewMode:"text",closeResume:this.closeResumeChat,onStreamComplete:this.handleStreamComplete})),this.resumeType!=="chat"&&!this.showIframe&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"AI正在优化您的简历...")),this.showIframe&&o(o.Fragment,null,o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),o("div",{class:"iframe-container"},o("iframe",{ref:e=>this._iframeEl=e,src:`${l}/myresume?conversation_id=${this.conversationId}&isSdk=true`,frameborder:"0",onLoad:this.handleIframeLoad}))))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"],isSuccess:["handleIsSuccessChange"]}}};O.style=B+(E+D);const A=".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}.phone-input{width:calc(100% - 16px);padding:8px;border:1px solid #ddd;border-radius:4px;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s}.phone-input:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.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}.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}}";const L='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const R=":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 $=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;oemId;digitalId;openingIndex=0;enableVirtualHuman=false;showEndInterviewButton=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;interviewMode="text";recordingError;showCopyButton=true;showFeedbackButtons=true;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;phoneNumber="";verificationCode="";isSendingCode=false;countdown=0;isVerifyingCode=false;showPositionSelector=false;get hostElement(){return i(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(e){if(e&&e!==r.getToken()){r.setToken(e)}}async handleIsOpenChange(e){if(!e){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{await a(this.token);if(this.conversationId){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.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}}resetState(){this.showChatModal=false;this.jobDescription="";this.isSubmitting=false;this.selectedFile=null;this.isUploading=false;this.uploadedFileInfo=null;this.phoneNumber="";this.verificationCode="";this.isSendingCode=false;this.isVerifyingCode=false;this.countdown=0;if(this.countdownTimer){clearInterval(this.countdownTimer);this.countdownTimer=null}}handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handlePhoneNumberChange=e=>{const t=e.target;this.phoneNumber=t.value};handleVerificationCodeChange=e=>{const t=e.target;this.verificationCode=t.value};countdownTimer=null;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=async()=>{if(!this.phoneNumber.trim()){C.error("请输入手机号");return}const e=/^1[3-9]\d{9}$/;if(!e.test(this.phoneNumber.trim())){C.error("请输入正确的手机号");return}this.isSendingCode=true;try{const e=await d(this.phoneNumber.trim(),0);if(e.success){C.success("验证码已发送");this.startCountdown()}else{C.error(e.message||"发送验证码失败")}}catch(e){C.error("发送验证码失败")}finally{this.isSendingCode=false}};handleOpenPositionSelector=()=>{if(!this.oemId){C.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;C.success("职位信息已填充")};handleStartInterview=async()=>{if(!this.customInputs?.job_info&&!this.jobDescription.trim()){C.error("请输入职位描述");return}if(this.phoneNumber.trim()){const e=/^1[3-9]\d{9}$/;if(!e.test(this.phoneNumber.trim())){C.error("请输入正确的手机号");return}if(!this.verificationCode.trim()){C.error("请输入验证码");return}this.isVerifyingCode=true;try{const e=await c(this.phoneNumber.trim(),this.verificationCode.trim(),0);if(!e.success){C.error(e.error.detail||"验证码错误");this.isVerifyingCode=false;return}}catch(e){C.error("验证码校验失败");this.isVerifyingCode=false;return}this.isVerifyingCode=false}if(await(this.pcmUploadRef?.getIsUploading?.())){C.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 i={"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));return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&o("div",{class:"input-container"},o("div",{class:"jd-input-section"},o("div",{class:"label-with-button"},o("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!r&&o("div",{class:"button-group"},this.oemId&&o("button",{class:"position-selector-button",onClick:this.handleOpenPositionSelector,type:"button"},"选择职位"),o("pcm-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}))),o("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.customInputs?.job_info||this.jobDescription,onInput:this.handleJobDescriptionChange,disabled:r})),o("div",{class:"jd-input-section"},o("label",null,"上传简历(选填)"),o("pcm-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:15*1024*1024,multiple:false,mobileUploadAble: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:a,onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),o("div",{class:"jd-input-section"},o("label",null,"手机号(选填,填写后报告结果将通过短信发送)"),o("input",{type:"tel",class:"phone-input",placeholder:"请输入手机号",maxLength:11,value:this.phoneNumber,onInput:this.handlePhoneNumberChange})),this.phoneNumber.trim().length===11&&o("div",{class:"jd-input-section"},o("label",null,"验证码"),o("div",{class:"verification-code-container"},o("input",{type:"text",class:"verification-code-input",placeholder:"请输入验证码",maxLength:6,value:this.verificationCode,onInput:this.handleVerificationCodeChange}),o("button",{class:"send-code-button",disabled:this.isSendingCode||this.countdown>0||!this.phoneNumber.trim(),onClick:this.handleSendCode},this.isSendingCode?"发送中...":this.countdown>0?`${this.countdown}秒`:"发送验证码"))),o("button",{class:"submit-button",disabled:!(this.customInputs?.job_info||this.jobDescription.trim())||this.isUploading||this.isSubmitting||this.isVerifyingCode,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isVerifyingCode?"验证中...":this.isSubmitting?"处理中...":"开始面试"),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&o("div",null,this.enableVirtualHuman&&this.digitalId?o("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,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,interview_type:"1",phone:this.phoneNumber.trim()||undefined}}):o("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,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,phone:this.phoneNumber.trim()||undefined},interviewMode:this.interviewMode}))),this.showPositionSelector&&o("div",{class:"position-selector-modal-overlay"},o("div",{class:"position-selector-modal"},o("div",{class:"position-selector-modal-header"},o("h3",null,"选择职位"),o("button",{class:"position-selector-close-btn",onClick:this.handleClosePositionSelector},"×")),o("div",{class:"position-selector-modal-body"},o("components-position-selector",{oemId:this.oemId,multiple:false,onPositionSelected:this.handlePositionSelected})))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};$.style=A+(L+R);const U="";const H='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const q=":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 P=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 i(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(e){if(e&&e!==r.getToken()){r.setToken(e)}}async handleIsOpenChange(e){if(!e){if(this.virtualChatModalRef){await this.virtualChatModalRef.setComponentActive(false)}this.resetState()}else{await a(this.token);this.showChatModal=true}}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.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 i={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),n&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&o("div",null,this.enableVirtualHuman?o("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,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"}}):o("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,fullscreen:this.fullscreen,botId:"3022316191018903",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"]}}};P.style=U+(H+q);const N=":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: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;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-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:400px}.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}.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: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 V='.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}';const W=":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 J=class{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 i(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;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;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;handleTokenChange(e){if(e&&e!==r.getToken()){r.setToken(e)}}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");I.setOptions({breaks:true,gfm:true})}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}else{const e=s.getItem("modal-zIndex");if(e){this.zIndex=e}else{this.zIndex=1e3;s.setItem("modal-zIndex",1e3)}}if(this.token){r.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 p(this.botId);if(e&&e.logo){this.agentLogo=e.logo}}catch(e){_.captureError(e,{action:"fetchAgentLogo",component:"pcm-app-chat-modal",title:"获取智能体信息失败"});z.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}}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 h({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==="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;this.scrollToBottom()}}}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);z.emitError({error:e,message:"消息发送失败,请稍后再试"});_.captureError(e,{action:"sendMessageToAPI",component:"pcm-app-chat-modal",title:"消息发送失败"});this.messages=[...this.messages,{...s,answer:"抱歉,发生了错误,请稍后再试。",error:e,isStreaming:false}];this.currentStreamingMessage=null;this.isLoading=false},onComplete:async()=>{this.isLoading=false;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(e&&e.answer){this.lastCompletedAnswer=e.answer}this.currentStreamingMessage=null;this.messages=[...this.messages,e];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 g({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 g({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);_.captureError(e,{action:"loadHistoryMessages",component:"pcm-app-chat-modal",title:"加载历史消息失败"});z.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=m();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;_.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;_.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="设备正在被其他应用程序使用"}else if(e.name==="OverconstrainedError"){t="摄像头不支持指定的配置"}else{t="无法访问摄像头或麦克风,请检查设备连接"}this.deviceError=t;this.showRecordingUI=false;z.emitError({error:e,message:t});_.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);_.captureError(e,{action:"setupVideoPreview",component:"pcm-app-chat-modal",title:"视频播放失败"});z.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);_.captureError(e,{action:"setupVideoPreview",component:"pcm-app-chat-modal",title:"创建对象URL失败"});z.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 u(o,{},{tags:["other"]});const n=await f(i.cos_key);if(this.isEndingInterview){await this.sendEndInterviewMessage()}else{this.sendMessageToAPI(n||"下一题",i.cos_key)}}catch(e){console.error("视频上传或处理错误:",e);this.isEndingInterview=false;_.captureError(e,{action:"uploadRecordedVideo",component:"pcm-app-chat-modal",title:"视频上传或处理失败"});z.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);_.captureError(e,{action:"submitTextAnswer",component:"pcm-app-chat-modal",title:"提交文本回答失败"});z.emitError({error:e,message:"提交文本回答失败"})}finally{this.isSubmittingText=false}};closeResumeChat=async()=>{const e={query:"生成简历",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);_.captureError(e,{action:"submitTextAnswer",component:"pcm-app-chat-modal",title:"提交文本回答失败"});z.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);_.captureError(e,{action:"handleVoiceInputClick",component:"pcm-app-chat-modal",title:"麦克风权限请求失败"});z.emitError({error:e,message:"麦克风权限请求失败"})}))}};startRecordingWithStream(e){try{const t=b();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);_.captureError(t,{action:"startRecordingWithStream",component:"pcm-app-chat-modal",title:"无法创建音频录制器"});z.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);_.captureError(t,{action:"startRecordingWithStream",component:"pcm-app-chat-modal",title:"开始录音失败"});z.emitError({error:t,message:"开始录音失败,请确保麦克风设备正常工作"})}}async processAudioRecording(){if(this.audioChunks.length===0){console.warn("没有录制到音频数据");return}try{this.isConvertingAudio=true;const e=b()||"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 u(n,{},{tags:["audio"]});const a=await f(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);_.captureError(e,{action:"processAudioRecording",component:"pcm-app-chat-modal",title:"处理音频录制失败"});z.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 g({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="未知时间";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);_.captureError(e,{action:"loadHistoryConversations",component:"pcm-app-chat-modal",title:"获取历史会话失败"});z.emitError({error:e,message:"获取历史会话失败"})}finally{this.isLoadingConversations=false}}handleSwitchConversation=e=>{if(e===this.conversationId){this.isHistoryDrawerOpen=false;return}this.conversationId=e;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.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=e=>{const t=e.detail;console.log("数字人生成视频播放完成:",{videoUrl:t,conversationId:this.conversationId,currentQuestionNumber:this.currentQuestionNumber});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 g({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);_.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;_.captureError(e,{action:"handleConfirmEndInterview",component:"pcm-app-chat-modal",title:"点击结束发送消息失败"});z.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;render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen};const i={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=()=>o("div",{class:"video-preview"},o("video",{autoPlay:true,playsInline:true,muted:true,style:{transform:"scaleX(-1)"},ref:e=>{if(e&&this.recordingStream&&!this.videoRef){this.videoRef=e}}}),o("div",{class:{"recording-status":true,warning:this.showCountdownWarning}},o("span",{class:"recording-dot"}),o("span",null,"录制中 ",Math.floor(this.recordingTimeLeft/60),":",(this.recordingTimeLeft%60).toString().padStart(2,"0"),this.showCountdownWarning&&` (即将自动完成)`)));const r=()=>{if(this.deviceError){return o("div",{class:"placeholder-status error-status"},o("p",null,this.deviceError),o("div",{class:"error-suggestions"},o("p",null,"请尝试以下解决方案:"),o("ul",null,o("li",null,"更换有摄像头和麦克风的设备"),o("li",null,"确保已允许浏览器访问摄像头和麦克风"),o("li",null,"关闭其他正在使用摄像头/麦克风的应用"))))}if(this.isTaskCompleted){return o("div",{class:"placeholder-status"},o("p",null,"面试已完成,感谢您的参与!"))}if(this.waitingForDigitalHuman&&this.digitalId){return o("div",{class:"placeholder-status"},o("p",null,"AI正在查看面试信息..."))}if(this.isPlayingAudio){return o("div",{class:"placeholder-status"},o("p",null,"正在播放问题,请听完后准备回答..."))}if(this.isUploadingVideo){return o("div",{class:"placeholder-status"},o("p",null,"正在上传视频,请稍候..."))}if(this.isLoading||this.currentStreamingMessage){return o("div",{class:"placeholder-status"},o("p",null,"请等待题目..."))}if(this.waitingToRecord){return o("div",{class:"placeholder-status"},o("p",null,"请准备好,",this.waitingTimeLeft,"秒后将开始录制您的回答..."))}return o("div",{class:"placeholder-status default-status"},o("p",null,"准备中..."))};const a=()=>o("div",{class:"text-input-area"},this.botId==="39284520284983296"&&o("button",{class:{"cancel-button":true,disabled:this.messages.length<=3},disabled:this.messages.length<=3,onClick:this.closeResumeChat},"结束对话生成简历"),this.botId==="45444431062634496"&&o("button",{class:{"cancel-button":true,disabled:this.isLoading},disabled:this.isLoading,onClick:()=>this.closeResume?.(),title:"简历制作"},"简历制作"),o("textarea",{class:"text-answer-input",placeholder:this.isTaskCompleted?"会话已结束":"发消息",value:this.textAnswer,onInput:this.handleTextInputChange,onKeyDown:this.handleKeyDown,disabled:this.isTaskCompleted||this.isRecordingAudio||this.isConvertingAudio}),o("div",{class:"input-toolbar"},o("div",{class:"toolbar-actions"},o("button",{class:{"toolbar-button":true,recording:this.isRecordingAudio,converting:this.isConvertingAudio},title:this.isRecordingAudio?"点击停止录音":this.isConvertingAudio?"正在识别语音...":"语音输入",onClick:this.handleVoiceInputClick,disabled:this.isTaskCompleted||this.isConvertingAudio||this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.waitingToRecord||this.isPlayingAudio},this.isRecordingAudio?o("div",null,o("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},o("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"}),o("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"}),o("circle",{cx:"12",cy:"11",r:"4",fill:"red"}))):this.isConvertingAudio?o("div",{class:"converting-indicator"},o("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},o("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"}))):o("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},o("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"}),o("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"})))),o("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()}},o("img",{src:"https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/i_send.png",alt:"发送"}))));const s=this.assistantAvatar||this.agentLogo;return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),o("div",{class:"chat-container"},o("div",{class:"chat-history",onScroll:this.handleScroll,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onWheel:this.handleWheel},this.isLoadingHistory?o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",null,"加载历史消息中...")):o("div",null,this.messages.map((e=>o("div",{id:`message_${e.id}`,key:e.id},o("pcm-chat-message",{botId:this.botId,message:e,showAssistantMessage:!this.digitalId||!this.isLastMessage(e)||this.digitalHumanVideoReady||this.isTaskCompleted,userAvatar:this.userAvatar,assistantAvatar:s,showCopyButton:this.showCopyButton,showFeedbackButtons:this.showFeedbackButtons,filePreviewMode:this.filePreviewMode,onFilePreviewRequest:this.handleFilePreviewRequest,showSaveJdButton:this.showSaveJdButton,saveJdButtonText:this.saveJdButtonText})))),this.currentStreamingMessage&&o("div",{id:`message_${this.currentStreamingMessage.id}`},o("pcm-chat-message",{botId:this.botId,message:this.currentStreamingMessage,showAssistantMessage:!this.digitalId||this.digitalHumanVideoReady||this.isTaskCompleted,userAvatar:this.userAvatar,assistantAvatar:s,showCopyButton:this.showCopyButton,showFeedbackButtons:this.showFeedbackButtons,filePreviewMode:this.filePreviewMode,onFilePreviewRequest:this.handleFilePreviewRequest,showSaveJdButton:this.showSaveJdButton,saveJdButtonText:this.saveJdButtonText})),this.messages.length===0&&!this.currentStreamingMessage&&o("div",{class:"empty-state"},o("p",null,"你好,我是聘才猫,一个AI助手,很高兴认识你...")))),o("div",{class:"recording-section"},o("div",{class:"recording-container"},(this.showWorkspaceHistory||this.digitalId||this.showEndInterviewButton&&!this.isTaskCompleted&&this.conversationId)&&o("div",{class:"workspace-section"},o("div",{class:"workspace-toolbar"},o("div",{style:{display:"flex",gap:"8px"}},!this.isTaskCompleted&&this.conversationId&&this.showEndInterviewButton&&o("button",{class:"workspace-button end-interview-button",onClick:this.handleInterviewEnd,disabled:this.isLoading||this.isEndingInterview,title:this.isEndingInterview?"正在结束面试...":"结束面试"},o("span",null,this.isEndingInterview?"正在结束...":"结束面试")),this.showWorkspaceHistory&&o("button",{class:"workspace-button history-button",onClick:()=>this.handleHistoryClick()},o("span",null,"历史会话"))),this.digitalId&&!this.isTaskCompleted&&o("div",{class:"digital-human-wrapper"},o("pcm-digital-human",{digitalId:this.digitalId,speechText:this.lastCompletedAnswer,isStreaming:!!this.currentStreamingMessage,onVideoGenerated:this.handleDigitalHumanVideoGenerated,onVideoEnded:this.handleDigitalHumanVideoEnded,onAvatarDetailLoaded:this.handleAvatarDetailLoaded})))),this.interviewMode==="text"&&a(),this.interviewMode==="video"&&o("div",{class:"video-container"},o("div",{class:"video-area"},this.showRecordingUI?n():o("div",{class:"video-preview placeholder"},r())),o("div",{class:"recording-controls"},this.showRecordingUI?o("button",{class:"stop-recording-button",onClick:()=>this.handleStopRecording()},"完成本题回答"):o("div",{class:"waiting-message"},o("button",{class:"stop-recording-button disabled",disabled:true},"完成回答"))))))),o("pcm-drawer",{isOpen:this.isDrawerOpen,drawerTitle:this.previewFileName,width:"80%",onClosed:()=>{this.isDrawerOpen=false;this.previewUrl="";this.previewContent=""}},this.previewContentType==="file"&&this.previewUrl&&o("div",{class:"file-preview-container"},o("iframe",{src:this.previewUrl,frameborder:"0",width:"100%",height:"100%",style:{border:"none",height:"calc(100vh - 120px)"}})),this.previewContentType==="markdown"&&this.previewContent&&o("div",{class:"markdown-preview-container markdown-body",innerHTML:I(this.previewContent)}),this.previewContentType==="text"&&this.previewContent&&o("div",{class:"text-preview-container"},o("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word"}},this.previewContent))),o("pcm-drawer",{isOpen:this.isHistoryDrawerOpen,drawerTitle:"历史会话",width:"400px",onClosed:()=>{this.isHistoryDrawerOpen=false}},o("div",{class:"history-drawer-content"},o("div",{class:"conversation-list"},this.isLoadingConversations?o("div",{class:"loading-conversations"},o("div",{class:"loading-spinner-small"}),o("p",null,"加载中...")):this.historyConversations.length===0?o("div",{class:"empty-conversations"},o("p",null,"暂无历史会话")):this.historyConversations.map((e=>o("div",{key:e.id,class:{"conversation-item":true,active:e.id===this.conversationId},onClick:()=>this.handleSwitchConversation(e.id)},o("div",{class:"conversation-info"},o("div",{class:"conversation-title"},e.name),o("div",{class:"conversation-meta"},o("span",{class:"conversation-time"},e.timeDisplay),e.message_count>0&&o("span",{class:"message-count"},e.message_count,"条消息"),e.status&&o("span",{class:{"conversation-status":true,completed:e.status==="结束",running:e.status==="进行中"}},e.status))),e.id===this.conversationId&&o("div",{class:"current-indicator"},o("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},o("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))))))))),o("pcm-confirm-modal",{isOpen:this.showConfirmModal,modalTitle:"确认完成回答?",okText:"确认完成",cancelText:"继续录制",okType:"danger",onOk:this.handleConfirmModalOk,onCancel:this.handleConfirmModalCancelEvent,onClosed:this.handleConfirmModalCancel},o("div",{style:{marginBottom:"16px"}},o("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")}`})()),o("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"}},o("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},o("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),o("span",null,"注意:录制仍在进行中")),o("div",{style:{fontSize:"16px",color:"#595959",lineHeight:"1.5",marginBottom:"16px"}},'点击"确认完成"将结束本题回答'),o("label",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",padding:"8px 0",userSelect:"none"}},o("input",{type:"checkbox",style:{width:"16px",height:"16px",accentColor:"#1890ff",cursor:"pointer",margin:"0"},checked:this.skipConfirmThisInterview,onChange:this.handleSkipConfirmChange}),o("span",{style:{fontSize:"14px",color:"#595959",cursor:"pointer",lineHeight:"1.4"}},"本次面试不再提醒")))),o("pcm-confirm-modal",{isOpen:this.showEndInterviewConfirmModal,modalTitle:"确认结束面试?",okText:"确认结束",cancelText:"取消",okType:"danger",onOk:this.handleConfirmEndInterview,onCancel:this.handleCancelEndInterview,onClosed:this.handleCancelEndInterview},o("div",{style:{marginBottom:"16px"}},(()=>{const e=this.getAnsweredQuestionCount();return o("div",null,o("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},"当前第 ",e," 题"),e<3&&o("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"}},o("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",style:{flexShrink:"0",marginTop:"2px"}},o("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),o("span",null,o("strong",null,"警告:"),"当前已回答题数小于 3 题,结束面试可能无法正常完成面试流程,建议继续完成更多题目后再结束面试。")),o("div",{style:{fontSize:"14px",color:"#595959",lineHeight:"1.6",textAlign:"center"}},"确认要结束面试吗?结束后将生成面试报告。"))})()))))}static get watchers(){return{token:["handleTokenChange"]}}};J.style=N+(V+W);const Q=":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 G=":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 X=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 o("button",{key:"2c355f8ea8c28589428e4fa820f52afabe653eff",class:Object.keys(e).filter((t=>e[t])).join(" "),style:t,disabled:this.disabled,type:"button"},this.loading&&o("span",{key:"8a92a6c6d098dd72d4d62eabf50f14cec1a32d67",class:"loading-icon"}),this.icon&&!this.loading&&o("span",{key:"2d44a40190b13b4a10adf6f4fc3171e0c7b23b3c",class:"button-icon"},o("img",{key:"8c8e17bf2168b964f556800f2572d2652a3f8c9b",src:this.icon,alt:""})),o("slot",{key:"e3b3712332323d3ab202d209ece9efd496cffbd4"}))}};X.style=Q+G;const K=":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 Y=":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 Z=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!==r.getToken()){r.setToken(e)}}componentWillLoad(){if(this.token){r.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 g({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 i=this.botData?.icon||this.botData?.iconUrl||this.botData?.logo||"";const n=this.iconUrl||i;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:i,userIconUrl:this.iconUrl,botData:this.botData,authorName:r,authorAvatar:a});return o("div",{key:"217e582f0716e6100138ec880c6b7c88e637e338",class:"card-container"},this.loading?o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("div",null,"加载中...")):this.error?o("div",{class:"error-container"},o("div",{class:"error-icon"},"!"),o("div",{class:"error-message"},this.error)):o("div",null,o("div",{class:"card-header"},n&&o("div",{class:"card-icon"},o("img",{src:n,alt:e})),o("div",{class:"card-info"},o("div",{class:"title-row"},o("div",{class:"title-wrapper"},o("div",{class:"card-title"},e)),this.showChatTag&&s&&o("div",{class:"chat-tag"},s)),r&&o("div",{class:"author-row"},a&&o("img",{class:"author-avatar",src:a,alt:r}),o("div",{class:"author-name"},r)),t&&o("div",{class:"card-description"},t))),o("div",{class:"card-footer"},o("div",{class:"stats-container"},o("div",{class:"stat-item"},o("span",{class:"stat-icon user-icon"}),o("div",{class:"stat-value"},l)),o("div",{class:"stat-item"},o("span",{class:"stat-icon star-icon"}),o("div",{class:"stat-value"},d)),o("div",{class:"stat-item"},o("span",{class:"stat-icon video-icon"}),o("div",{class:"stat-value"},c))),o("div",{class:"use-button"},this.useButtonText||"立即使用"))))}static get watchers(){return{botId:["watchBotIdHandler"],token:["handleTokenChange"]}}};Z.style=K+Y;const ee='.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}';const te=":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 oe=":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{message;showFeedbackButtons=true;botId;get hostElement(){return i(this)}feedbackStatus=null;videoUrls={};userAvatar;assistantAvatar;showCopyButton=true;filePreviewMode="window";showAssistantMessage=true;showSaveJdButton=false;saveJdButtonText="保存职位";saveJd;filePreviewRequest;retryRequest;constructor(o){e(this,o);this.saveJd=t(this,"saveJd");this.filePreviewRequest=t(this,"filePreviewRequest");this.retryRequest=t(this,"retryRequest");I.use(S);I.setOptions({breaks:true,gfm:true})}componentWillLoad(){if(this.message&&this.message.feedback){this.feedbackStatus=this.message.feedback.rating}}copyMessageContent(){if(this.message.answer){navigator.clipboard.writeText(this.message.answer).then((()=>{alert("内容已复制到剪贴板")})).catch((e=>{z.emitError({error:e,message:"复制内容失败"});console.error("复制失败:",e)}))}}saveJdLoading=false;async handleSaveJd(e){this.saveJdLoading=true;const t="78798567376007168";const o=await g({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:"保存成功",data:i})}catch(e){console.error("解析JSON失败:",e);this.saveJd.emit({isOk:false,message:"解析JSON失败"})}}else{this.saveJd.emit({isOk:false,message:"保存失败"})}this.saveJdLoading=false}renderUserMessage(){if(!this.message?.query?.trim())return null;const e=this.message.query?I(this.message.query):"";return o("div",{class:{"user-message-container":true}},this.userAvatar&&o("div",{class:"avatar user-avatar"},o("img",{src:this.userAvatar,alt:"用户头像"})),o("div",{class:"message-bubble user-message"},o("div",{innerHTML:e}),this.renderInputs()))}renderAssistantMessage(){if(!this.message.answer&&!this.message.isStreaming)return null;if(!this.showAssistantMessage){return o("div",{class:{"assistant-message-container":true}},this.assistantAvatar&&o("div",{class:"avatar assistant-avatar"},o("img",{src:this.assistantAvatar,alt:"助手头像"})),o("div",{class:"message-bubble"},o("div",{class:"assistant-message"},"请稍等...")))}const e=this.message.isStreaming&&!this.message.answer;const t=this.message.answer?I(this.message.answer):"";const i=this.showSaveJdButton&&this.botId=="3022316191018873";return o("div",{class:{"assistant-message-container":true}},this.assistantAvatar&&o("div",{class:"avatar assistant-avatar"},o("img",{src:this.assistantAvatar,alt:"助手头像"})),o("div",{class:"message-bubble "},o("div",{class:"assistant-message"},o("div",{class:"markdown-content markdown-body",innerHTML:e?`请稍等...`:t})),!e&&this.message.answer&&!this.message.isStreaming&&o("div",{class:"message-actions"},this.message.showRetryButton&&o("button",{class:"action-button retry-button",onClick:()=>this.handleRetry(),title:"重试"},o("span",{class:"button-icon"},o("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"},o("polyline",{points:"23 4 23 10 17 10"}),o("polyline",{points:"1 20 1 14 7 14"}),o("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.showCopyButton&&o("button",{class:"action-button",onClick:()=>this.copyMessageContent(),title:"复制内容"},o("span",{class:"button-icon"},o("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"},o("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),o("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}))),"复制"),i&&o("button",{class:"action-button",onClick:()=>this.handleSaveJd(this.message.answer),title:this.saveJdButtonText,disabled:this.saveJdLoading},this.saveJdLoading?"处理中...":this.saveJdButtonText),this.showFeedbackButtons&&o(o.Fragment,null,o("button",{class:`action-button icon-only ${this.feedbackStatus==="like"?"active":""}`,title:"赞",onClick:()=>this.handleLike()},o("span",{class:"button-icon"},o("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"},o("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"})))),o("button",{class:`action-button icon-only ${this.feedbackStatus==="dislike"?"active":""}`,title:"踩",onClick:()=>this.handleDislike()},o("span",{class:"button-icon"},o("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"},o("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 x(e);if(t){this.videoUrls={...this.videoUrls,[e]:t}}}async handleFileClick(e,t){const o=/^https?:\/\//i.test(e);if(o){window.open(e,"_blank");return}const i=/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/i.test(t);const n=i?await x(e):await w(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");_.captureError("无法获取预览URL",{action:"handleFileClick",component:"pcm-chat-message",title:"无法获取预览URL"});z.emitError({error:"无法获取预览URL",message:"无法获取预览URL"})}}renderFileItem(e,t,i){return o("div",{key:i,class:"file-card",onClick:()=>this.handleFileClick(t,e)},o("div",{class:"file-card-icon",style:{background:"linear-gradient(45deg, #ff5600, #ff8344)"}},o("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_file.png"})),o("div",{class:"file-card-content"},o("div",{class:"file-card-type"},"[附件信息]"),o("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 o("div",{class:"inputs-container"},Object.keys(this.message.inputs).map(((e,t)=>{const i=this.message.inputs[e];if(i&&!e.startsWith("hide_")&&e!=="answer"){if(e==="video_url"){const e=i;const n=this.videoUrls[e];if(!n){this.loadVideoUrl(e)}return o("div",{class:"video-inputs-container"},o("div",{key:t,class:"video-container"},n?o("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"}},o("source",{src:n,type:"video/webm"}),o("source",{src:n,type:"video/mp4"}),o("source",{src:n,type:"video/ogg"}),"您的浏览器不支持视频播放。"):o("div",{class:"video-loading"},o("div",{class:"loading-spinner"}),o("span",null,"正在加载视频..."))))}else if(e==="file_url"){const e=this.message.inputs.file_name||this.getFileName(i);return this.renderFileItem(e,i,t)}else if(e==="file_urls"){const e=typeof i==="string"?i.split(","):[i.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 o("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"?"职位信息":"评估规则";const r=typeof i==="string"?i:JSON.stringify(i,null,2);return o("div",{key:t,class:"file-card",onClick:()=>this.handleContentClick(n,r)},o("div",{class:"file-card-icon",style:{background:"#0d75fb"}},o("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_position.png"})),o("div",{class:"file-card-content"},o("div",{class:"file-card-type"},"[",n,"]"),o("div",{class:"file-card-name"},r.length>50?r.substring(0,50)+"...":r)))}else if(e==="input"){return o("div",{key:t,class:"input-metadata"},`${i}`)}}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不存在,无法提交反馈");_.captureError("消息ID不存在,无法提交反馈",{action:"submitFeedback",component:"pcm-chat-message",title:"无法提交反馈"});z.emitError({error:"消息ID不存在,无法提交反馈",message:"消息ID不存在,无法提交反馈"});return}try{const t=await g({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);_.captureError(e,{action:"submitFeedback",component:"pcm-chat-message",title:"提交反馈失败"})}}handleRetry(){if(this.message.id){this.retryRequest.emit(this.message.id)}}render(){return o("div",{key:"0136921c08146840b1d61e62ff144de60daceb62",class:"message-round"},this.renderUserMessage(),this.renderAssistantMessage())}};ie.style=ee+(te+oe);const ne=":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 re=":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 ae=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 i(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=s.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 i={"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 o("div",{key:"5f47e921e2309fc240ba4aaec6e40dea3c5a758b",class:i},this.mask&&o("div",{key:"e44f8540c2a3d0bb67800b9767b16797ce18df15",class:{"confirm-modal-mask":true,"mask-visible":this.isOpen},style:t,onClick:this.handleMaskClick}),o("div",{key:"64651713adc234eddd12d46b5ac1ba164d917db4",class:n,style:e},o("div",{key:"81786c948e7de6c1e6ac2bba7af880d0a9538c1d",class:"modal-wrapper"},o("div",{key:"8f4d18d71021e7f683414a7b5f38567d7af44e42",class:"modal-header"},o("div",{key:"74afdedecddea40ffa7e2366661ad05caa058c04",class:"modal-title"},this.modalTitle)),o("div",{key:"5b44bbd360065765673c7f07d3e75ccd5d7daa82",class:"modal-body"},o("slot",{key:"204feff27398e62a199a2fc6cf1d603e6433820c"})),o("div",{key:"0ac676d7565716aed2122c4ed90e3afa40797007",class:"modal-footer"},o("button",{key:"0aa9abd4fd10dcf5a04bebfeba8554867b6b8ef4",class:"modal-button cancel-button",onClick:this.handleCancel},this.cancelText),o("button",{key:"081301f3e32b68bd3076b369d812f584724eea09",class:r,onClick:this.handleOk},this.okText)))))}static get watchers(){return{isOpen:["visibleChanged"]}}};ae.style=ne+re;const se=".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 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 de=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;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}}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 g({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 g({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 g({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.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.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.play().catch((e=>{console.error("播放默认视频失败:",e)}))}}))}};render(){return o("div",{key:"29fac767e0eedf056b436f9689926616a3e0e894",class:"digital-human-container"},o("video",{key:"8822a30d88d72048372fa144c065c4300630ced6",autoplay:true,playsinline:true,loop:true,onEnded:this.handleVideoEnded,ref:e=>this.videoElement=e}))}static get watchers(){return{isStreaming:["handleStreamingChange"]}}};de.style=se+le;const ce=":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;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}.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 pe=":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 he=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 i(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=s.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 o("div",{key:"f38c91be7ea83c8d3a05d1147eb3bfc2f0005716",class:{"drawer-container":true,"drawer-open":this.isOpen}},o("div",{key:"a2fdccc60b8bf1e4321a65d1e153c21cce0e2e14",class:{"drawer-mask":true,"mask-visible":this.isOpen},style:t,onClick:this.handleMaskClick}),o("div",{key:"a45bd43b68ffc00e4e64f104b49cfb60f1af21f9",class:{"drawer-content":true,"drawer-content-visible":this.isOpen},style:e},o("div",{key:"425a77cff512ea47f19a72e0b1b292b6e14df36d",class:"drawer-header"},this.drawerTitle&&o("div",{key:"3062fab8935fa0ba878e4d82e1e2605aadee4052",class:"drawer-title"},this.drawerTitle),this.closable&&o("button",{key:"f8af566e6edacbce32e0c58d2cd99d36ef07e3c4",class:"close-button",onClick:this.handleClose},o("span",{key:"92f12937c3272369b95d9057c4c6c82f3c138cda"},"×"))),o("div",{key:"d371837bdfc53e4a43969a1658afe9d1f1444f3c",class:"drawer-body"},o("slot",{key:"639c27717fa1fddfe032c489947387a3abe8a133"}))))}static get watchers(){return{isOpen:["visibleChanged"]}}};he.style=ce+pe;const ge=".modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.45);display:flex;align-items:center;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 me={page:1,size:10};const ue={0:{text:"处理中",color:"#1890ff"},1:{text:"已完成",color:"#52c41a"},"-1":{text:"失败",color:"#ff4d4f"}};const fe=class{constructor(o){e(this,o);this.cancel=t(this,"cancel")}botId;sourceId;open=false;cancel;loading=true;pagination=me;data=[];showMessage=false;messageText="";messageType="success";watchOpen(e){if(e){this.fetchData(this.pagination)}}async fetchData(e){this.loading=true;try{const t=await g({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 x(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 g({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 o("div",{class:"empty-container"},o("div",{class:"empty-icon"},"📄"),o("div",{class:"empty-text"},"暂无任务"))}renderTag(e){const t=ue[e.toString()]||{text:"未知",color:"#d9d9d9"};return o("span",{class:"tag",style:{backgroundColor:t.color}},t.text)}renderButton(e,t,i="default",n="medium"){return o("button",{class:`btn btn-${i} btn-${n}`,onClick:t},e)}renderTable(){if(this.loading){return o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("div",null,"加载中..."))}if(!this.data||this.data.length===0){return this.renderEmpty()}return o("div",{class:"table-container"},o("table",{class:"table"},o("thead",null,o("tr",null,o("th",{style:{width:"300px",textAlign:"center"}},"文件名"),o("th",{style:{width:"100px",textAlign:"center"}},"状态"),o("th",{style:{width:"180px",textAlign:"center"}},"创建时间"),o("th",{style:{width:"100px",textAlign:"left"}},"操作"))),o("tbody",null,this.data.map((e=>o("tr",{key:e.id},o("td",{style:{textAlign:"center"}},e.file_name),o("td",{style:{textAlign:"center"}},this.renderTag(e.status)),o("td",{style:{textAlign:"center"}},this.formatDate(e.created_at)),o("td",{style:{textAlign:"left"}},o("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 o("div",{class:"pagination-container"},o("div",{class:"pagination-info"},"共",this.pagination.total,"条"),o("div",{class:"pagination-controls"},o("button",{class:"pagination-btn",disabled:t<=1,onClick:()=>this.handlePageChange(t-1,this.pagination.size)},"上一页"),o("span",{class:"pagination-current"},t," / ",e),o("button",{class:"pagination-btn",disabled:t>=e,onClick:()=>this.handlePageChange(t+1,this.pagination.size)},"下一页"),o("select",{class:"pagination-size-select",onChange:e=>this.handlePageChange(1,parseInt(e.target.value))},o("option",{value:"10",selected:this.pagination.size===10},"10条/页"),o("option",{value:"20",selected:this.pagination.size===20},"20条/页"),o("option",{value:"50",selected:this.pagination.size===50},"50条/页"))))}renderMessage(){if(!this.showMessage)return null;return o("div",{class:`message message-${this.messageType}`},this.messageText)}render(){if(!this.open){return null}return o("div",{class:"modal-overlay",onClick:()=>this.cancel.emit()},o("div",{class:"modal-container",onClick:e=>e.stopPropagation()},o("div",{class:"modal-header"},o("div",{class:"modal-title"},o("span",null,"导出任务列表"),this.renderButton("🔄 刷新",this.handleRefresh,"default","small")),o("button",{class:"modal-close",onClick:()=>this.cancel.emit()},"✕")),o("div",{class:"modal-body"},this.renderTable(),this.renderPagination()),this.renderMessage()))}static get watchers(){return{open:["watchOpen"]}}};fe.style=ge;const be=".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 xe='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const we=":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 ye=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;mobileUploadAble=false;mobileInputAble=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return i(this)}isSubmitting=false;inputMode="upload";freeInputText="";tokenInvalidListener;removeErrorListener;pcmUploadRef;handleTokenChange(e){if(e&&e!==r.getToken()){r.setToken(e)}}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.setToken(this.token)}a(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.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()};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){C.info("请上传合同文件");return}if(this.inputMode==="free"&&!this.freeInputText.trim()){C.info("请输入合同内容");return}if(this.inputMode==="upload"&&await(this.pcmUploadRef?.getIsUploading?.())){C.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 a(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 i={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&o("div",{class:"input-container"},o("div",{class:"input-mode-toggle"},o("span",null,"合同内容"),o("button",{class:"toggle-button",onClick:this.handleToggleInput},o("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})),"切换输入")),this.inputMode==="upload"&&o("div",{class:"resume-upload-section"},o("pcm-upload",{ref:e=>this.pcmUploadRef=e,maxFileSize:25*1024*1024,multiple:false,mobileUploadAble:this.mobileUploadAble,uploadText:"点击上传合同",acceptFileSuffixList:[".txt",".md",".pdf",".docx",".doc"],uploadParams:{tags:["other"]},onUploadChange:e=>{const t=e.detail??[];this.uploadedFileInfo=t[0];this.uploadSuccess.emit(this.uploadedFileInfo)}})),this.inputMode==="free"&&o("div",{class:"free-input"},!!this.mobileInputAble&&o("pcm-mobile-input-btn",{name:"合同内容",onOk:e=>{this.freeInputText=e.detail}}),o("div",{class:"textarea-container"},o("textarea",{id:"free-input-text",placeholder:"请输入合同内容",rows:8,value:this.freeInputText,onInput:this.handleFreeInputChange})),o("div",{class:"input-guide"},o("div",{class:"guide-title"},"输入提示:"),o("div",{class:"guide-content"},o("div",null,"• 请输入完整的劳动合同内容"),o("div",null,"• 包括甲方(公司)、乙方(员工)信息"),o("div",null,"• 合同期限、工作内容、工作地点"),o("div",null,"• 工作时间、休息休假、劳动报酬"),o("div",null,"• 社会保险、劳动保护、劳动条件"),o("div",null,"• 合同变更、解除和终止条件等")))),o("button",{class:"submit-button",disabled:this.inputMode==="upload"&&!this.uploadedFileInfo||this.inputMode==="free"&&!this.freeInputText.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&o("div",null,o("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:"3022316191018882",conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,customInputs:{...this.customInputs,file_url:this.inputMode==="upload"?this.uploadedFileInfo?.cos_key:undefined,file_name:this.customInputs?.file_name||this.uploadedFileInfo?.file_name,input:this.inputMode==="free"?this.freeInputText:undefined},interviewMode:"text"}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};ye.style=be+(xe+we);const ke="";const ve='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';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 ze=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;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return i(this)}isSubmitting=false;tokenInvalidListener;removeErrorListener;handleTokenChange(e){if(e&&e!==r.getToken()){r.setToken(e)}}async handleIsOpenChange(e){if(!e){this.clearSelectedFile();this.showChatModal=false}else{await a(this.token);if(this.conversationId||this.customInputs?.file_url){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.setToken(this.token)}a(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.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()};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 u(this.selectedFile,{},{tags:["other"]});this.uploadedFileInfo=e;this.uploadSuccess.emit(e)}catch(e){console.error("文件上传错误:",e);this.clearSelectedFile();_.captureError(e,{action:"uploadFile",component:"pcm-hyzj-modal",title:"文件上传失败"});z.emitError({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);_.captureError(e,{action:"handleStartInterview",component:"pcm-hyzj-modal",title:"开始面试时出错"});z.emitError({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 i={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.file_url);return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!r&&o("div",{class:"input-container"},o("div",{class:"resume-upload-section"},o("label",null,"上传会议纪要"),o("div",{class:"upload-area",onClick:this.handleUploadClick},this.selectedFile?o("div",{class:"file-item"},o("div",{class:"file-item-content"},o("span",{class:"file-icon"},"📝"),o("span",{class:"file-name"},this.selectedFile.name)),o("button",{class:"remove-file",onClick:e=>{e.stopPropagation();this.clearSelectedFile()}},"×")):o("div",{class:"upload-placeholder"},o("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),o("p",{class:"upload-text"},"点击上传会议纪要"),o("p",{class:"upload-hint"},"支持 mp3、markdown、pdf、docx、doc、md 格式")))),o("button",{class:"submit-button",disabled:!this.selectedFile||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003"))),o("input",{type:"file",class:"file-input",onChange:this.handleFileChange})),n&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&o("div",null,o("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:"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"]}}};ze.style=ke+(ve+Ce);const Ie=".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)}.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 Se='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const je=":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.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="职位生成";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;conversationId;defaultQuery="请帮我生成职位信息";fullscreen=false;customInputs={};showWorkspaceHistory=false;showSaveJdButton=false;saveJdButtonText="保存职位";streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";showChatModal=false;get hostElement(){return i(this)}inputMode="structured";step="input";jobName="";freeInputText="";isLoading=false;isSubmitting=false;tagGroups=[];shuffledTagGroups=[];selectedAITags={};selectedTags={salary:"",benefits:[],education:""};tokenInvalidListener;removeErrorListener;handleTokenChange(e){if(e&&e!==r.getToken()){r.setToken(e)}}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.setToken(this.token)}a(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.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()}}salaryRanges=[{text:"3k-5k",value:"3k_5k"},{text:"5k-8k",value:"5k_8k"},{text:"8k-12k",value:"8k_12k"},{text:"12k-15k",value:"12k_15k"},{text:"15k-20k",value:"15k_20k"},{text:"20k以上",value:"above_20k"}];benefits=[{text:"五险一金",value:"五险一金"},{text:"年终奖",value:"年终奖"},{text:"带薪年假",value:"带薪年假"},{text:"加班补贴",value:"加班补贴"},{text:"餐补",value:"餐补"},{text:"交通补贴",value:"交通补贴"},{text:"节日福利",value:"节日福利"},{text:"团队建设",value:"团队建设"}];educationRequirements=[{text:"大专",value:"大专"},{text:"本科",value:"本科"},{text:"硕士",value:"硕士"},{text:"博士",value:"博士"},{text:"学历不限",value:"学历不限"}];handleClose=()=>{this.modalClosed.emit()};handleToggleInput=()=>{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};handleNextStep=async()=>{if(!this.jobName.trim()){alert("请输入职位名称");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 g({url:"/sdk/v1/chat/workflow/block-run",method:"POST",data:{inputs:{input_info:e},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){_.captureError(e,{action:"handlePositionAnalysis",component:"pcm-jd-modal",title:"解析前置标签时错误"});z.emitError({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.salaryRanges.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.educationRequirements.find((e=>e.value===this.selectedTags.education));if(e){o=e.text}}let i=`职位名称:${this.jobName}\n`;if(e){i+=`薪资范围:${e}\n`}if(t){i+=`福利待遇:${t}\n`}if(o){i+=`学历要求:${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);_.captureError(e,{action:"handleSubmitStructured",component:"pcm-jd-modal",title:"提交数据时出错"});z.emitError({error:e,message:"提交数据时出错,请重试"})}finally{this.isSubmitting=false}};handleSubmitFree=async()=>{if(!this.freeInputText.trim()){alert("请输入职位需求信息");return}this.isSubmitting=true;try{this.jobDescription=this.freeInputText;this.showChatModal=true}catch(e){console.error("提交自由输入数据时出错:",e);_.captureError(e,{action:"handleSubmitFree",component:"pcm-jd-modal",title:"提交数据时出错"});z.emitError({error:e,message:"提交数据时出错,请重试"})}finally{this.isSubmitting=false}};jobDescription="";async handleIsOpenChange(e){if(!e){this.showChatModal=false;this.jobDescription="";this.jobName="";this.freeInputText="";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 a(this.token);if(this.conversationId){this.showChatModal=true}}}renderTagGroup(e,t,i){return o("div",{class:"tag-group"},o("div",{class:"tag-title"},e),o("div",{class:"tag-container"},t.map((e=>{const t=i==="benefits"?this.selectedTags.benefits.includes(e.value):this.selectedTags[i]===e.value;return o("div",{class:{tag:true,"tag-selected":t},onClick:()=>this.handleTagClick(i,e.value)},e.text)}))))}renderAITagGroups(){return o("div",{class:"ai-tag-groups"},this.shuffledTagGroups.map((e=>o("div",{class:"tag-group"},o("div",{class:"tag-title"},e.dimensionName),o("div",{class:"tag-container"},e.tags.map((t=>{const i=(this.selectedAITags[e.dimensionName]||[]).includes(t);return o("div",{class:{tag:true,"tag-selected":i},onClick:()=>this.handleAITagClick(e.dimensionName,t)},t)})))))))}renderLoadingState(){return o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("div",{class:"loading-text"},o("div",null,"AI 正在分析职位信息"),o("div",{class:"loading-subtext"},"请稍候...")))}render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen,"pc-layout":true};const i={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&true&&o("div",{class:"input-container"},o("div",{class:"input-mode-toggle"},o("span",null,"职位需求信息"),o("button",{class:"toggle-button",onClick:this.handleToggleInput,disabled:this.isLoading},o("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})),"切换输入")),this.inputMode==="structured"&&o("div",{class:"structured-input"},this.step==="input"&&o("div",{class:"job-name-input"},o("label",{htmlFor:"job-name"},"职位名称 ",o("span",{class:"required"},"*")),o("input",{id:"job-name",type:"text",placeholder:"请输入职位名称",value:this.jobName,onInput:this.handleJobNameChange,disabled:this.isLoading}),o("div",{class:"button-container"},o("button",{class:"submit-button next-button",onClick:this.handleNextStep,disabled:!this.jobName.trim()||this.isLoading},"下一步"))),this.step==="review"&&o("div",{class:"tag-selection"},this.isLoading?this.renderLoadingState():o("div",{class:"tag-selection-content"},this.tagGroups.length>0&&o("div",{class:"ai-tags-section"},o("div",{class:"section-title"},"AI 推荐标签"),this.renderAITagGroups()),this.tagGroups.length>0&&o("div",{class:"basic-tags-section"},this.renderTagGroup("月薪范围",this.salaryRanges,"salary"),this.renderTagGroup("福利待遇",this.benefits,"benefits"),this.renderTagGroup("学历要求",this.educationRequirements,"education")),o("div",{class:"button-container"},o("button",{class:"submit-button prev-button",onClick:this.handlePrevStep},"上一步"),o("button",{class:"submit-button",onClick:this.handleSubmitStructured,disabled:this.isSubmitting},this.isSubmitting?"处理中...":"生成JD"))))),this.inputMode==="free"&&o("div",{class:"free-input"},o("div",{class:"textarea-container"},o("label",{htmlFor:"free-input-text"},"JD信息 ",o("span",{class:"required"},"*")),o("textarea",{id:"free-input-text",placeholder:"请按照下方提示格式输入职位需求信息",rows:8,value:this.freeInputText,onInput:this.handleFreeInputChange})),o("div",{class:"input-guide"},o("div",{class:"guide-title"},"输入格式参考:"),o("div",{class:"guide-content"},o("div",null,"• 职位名称 - 明确定义职位的名称"),o("div",null,"• 薪资范围 - 明确该岗位的月薪或年薪"),o("div",null,"• 福利待遇 - 该职位的福利待遇,如:五险一金、年休假、下午茶等"),o("div",null,"• 工作职责 - 描述工作内容"),o("div",null,"• 任职资格 - 包括学历、经验和技术要求"),o("div",null,"• 工作地点与性质 - 全职/兼职、远程/办公室"))),o("div",{class:"button-container"},o("button",{class:"submit-button",onClick:this.handleSubmitFree,disabled:!this.freeInputText.trim()||this.isSubmitting},this.isSubmitting?"处理中...":"生成JD"))),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&o("div",null,o("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:"3022316191018873",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"]}}};_e.style=Ie+(Se+je);const Fe="";const Me='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const Te=":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 Be=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;mobileUploadAble=false;mobileJdInputAble=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";isUploading=false;uploadedFileInfo=null;showChatModal=false;jobDescription="";isSubmitting=false;get hostElement(){return i(this)}tokenInvalidListener;removeErrorListener;pcmUploadRef;handleTokenChange(e){if(e&&e!==r.getToken()){r.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 a(this.token);if(this.conversationId||this.customInputs?.file_url&&this.customInputs?.job_info){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.setToken(this.token)}a(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.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};handleStartAnalysis=async()=>{if(!this.customInputs?.file_url&&!this.uploadedFileInfo){C.info("请上传简历");return}if(!this.customInputs?.job_info&&!this.jobDescription.trim()){C.info("请输入职位描述");return}if(await(this.pcmUploadRef?.getIsUploading?.())){C.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 i={"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);const s=Boolean(this.customInputs?.file_url&&this.customInputs?.job_info);return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&o("div",{class:"input-container"},!r&&o("div",{class:"jd-input-section"},o("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&o("pcm-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}),o("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&o("div",{class:"resume-upload-section"},o("label",null,"上传简历"),o("pcm-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)}})),o("button",{class:"submit-button",disabled:!a&&!this.uploadedFileInfo||!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartAnalysis},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&o("div",null,o("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,fullscreen:this.fullscreen,conversationId:this.conversationId,defaultQuery:this.defaultQuery,filePreviewMode:this.filePreviewMode,showWorkspaceHistory:this.showWorkspaceHistory,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"]}}};Be.style=Fe+(Me+Te);const Ee='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const De=".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}.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{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}.task-pagination{display:flex;align-items:center;justify-content:center;gap:16px;padding:16px;border-top:1px solid #e8e8e8;background:#fafafa;flex-shrink:0}.task-pagination .page-btn{background:#fff;border:1px solid #d9d9d9;color:#333;padding:6px 12px;border-radius:4px;cursor:pointer;font-size:14px;transition:all 0.2s ease}.task-pagination .page-btn:hover:not(:disabled){border-color:#1890ff;color:#1890ff}.task-pagination .page-btn:disabled{background:#f5f5f5;color:#bfbfbf;cursor:not-allowed;border-color:#e8e8e8}.task-pagination .page-info{font-size:14px;color:#666}@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}.task-pagination{padding:12px;gap:12px}.task-pagination .page-btn{padding:8px 12px;font-size:13px}.task-pagination .page-info{font-size:13px}}.pcm-jlsx-card{margin-bottom:20px;background-color:#ffffff;border-radius:8px;border:1px solid #e9ecef}.pcm-jlsx-card-header{padding:12px 20px;font-size:16px;font-weight:500;color:#333;border-bottom:1px solid #e9ecef}.pcm-jlsx-card-body{padding:20px;font-size:14px;color:#333;line-height:1.6;white-space:pre-wrap;word-wrap:break-word}.out-important-conditions{margin-top:8px;color:#666;font-size:12px}";const Oe='.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}';const Ae=":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 Le=class{modalTitle="简历筛选精灵";token;isOpen=false;modalClosed;icon;zIndex=1e3;isShowHeader=true;isNeedClose=true;fullscreen=false;customInputs={};mobileUploadAble=false;mobileJdInputAble=false;showBatchExport=false;uploadSuccess;tokenInvalid;someErrorEvent;taskCreated;resumeAnalysisStart;resumeAnalysisComplete;taskSwitch;resumeDeleted;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:"判断求职者对目标岗位的兴趣和热情,以及其职业规划与公司及岗位的契合度。清晰合理的求职动机表明求职者对自身职业发展有明确认知,且对目标岗位做了充分了解,入职后更有可能长期稳定发展并积极投入工作。"}];importantConditions="";isSubmitting=false;isUploading=false;uploadedResumeRecords=[];filteredResumeRecords=[];selectedFiles=[];showJdDrawer=false;showCriteriaDrawer=false;currentTask=null;currentPage=1;pageSize=10;totalRecords=0;isAnalyzing=false;showPreviewDrawer=false;previewContent="";previewTitle="";previewType="markdown";previewUrl="";activeDropdownId=null;deletingRecordId=null;sortOrder="none";isTaskHistoryDrawerOpen=false;historyTasks=[];isLoadingHistoryTasks=false;taskHistoryCurrentPage=1;taskHistoryPageSize=10;taskHistoryTotal=0;isLoadingResumeList=false;isExportRecordsModalOpen=false;get hostElement(){return i(this)}tokenInvalidListener;removeErrorListener;botId="3022316191018874";pcmUploadRef;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");I.use(S);I.setOptions({breaks:true,gfm:true});document.addEventListener("click",this.handleDocumentClick)}handleTokenChange(e){if(e&&e!==r.getToken()){r.setToken(e)}}async handleIsOpenChange(e){if(!e){this.resetStates()}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await a(this.token)}}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.setToken(this.token)}a(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.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.isLoadingResumeList=false;this.isExportRecordsModalOpen=false};handleClose=()=>{this.modalClosed.emit()};handleJobDescriptionChange=e=>{const t=e.target;this.jobDescription=t.value};handleImportantConditionsChange=e=>{const t=e.target;this.importantConditions=t.value};handleCreateTask=async()=>{if(!this.jobDescription.trim()){j("请输入职位描述","warning");return}if(this.evaluationCriteria.length===0){j("请输入评分标准","warning");return}this.isSubmitting=true;try{const e=await g({url:"/sdk/v1/agent/app_filter_task/create",method:"POST",data:{job_info:this.jobDescription,extra:JSON.stringify(this.evaluationCriteria),important_conditions:this.importantConditions}});if(e.success&&e.data){this.currentTask=e.data;this.currentStep="task";this.taskCreated.emit({task_id:e.data.id,job_description:this.jobDescription,evaluation_criteria:this.evaluationCriteria,create_time:(new Date).toISOString()})}else{throw new Error(e.message||"创建任务失败")}}catch(e){console.error("创建任务时出错:",e);_.captureError(e,{action:"handleCreateTask",component:"pcm-jlsx-modal",title:"创建任务时出错"});z.emitError({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=`${l}/exportFile?id=${e.id}&title=${this.jobTitle||""}&token=${r.getToken()}&referrer=sdk`;this.showPreview(`${e.fileName} - 评估详情`,"","file",t)};exportAllPdfLoading=false;exportAllPDF=async()=>{this.exportAllPdfLoading=true;const e=await g({url:`/sdk/v1/agent/app_filter_task/export_all`,method:"GET",params:{task_id:this.currentTask?.id}});this.exportAllPdfLoading=false;if(e.success){j("导出任务已创建!","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 w(t);if(o){this.showPreview(`${e.fileName} - 简历详情`,"","file",o)}else{j("无法获取简历预览,请稍后重试","error")}}catch(e){console.error("获取简历预览失败:",e);_.captureError(e,{action:"handleViewResume",component:"pcm-jlsx-modal",title:"获取简历预览失败"});z.emitError({error:e,message:"获取简历预览失败,请稍后重试"})}}else{j("简历文件不存在","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 g({url:`/sdk/v1/agent/app_filter_resume/delete/${e}`,method:"DELETE"});if(o.success){this.filteredResumeRecords=this.filteredResumeRecords.filter((t=>t.id!==e));j("删除成功","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);_.captureError(t,{action:"handleDeleteRecord",component:"pcm-jlsx-modal",title:"删除记录失败",recordId:e});j("删除失败,请重试","error")}finally{this.deletingRecordId=null}}else{this.uploadedResumeRecords=this.uploadedResumeRecords.filter((t=>t.id!==e));j("删除成功","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){j("至少需要保留一个评分标准","warning");return}const t=this.evaluationCriteria.filter(((t,o)=>o!==e));this.evaluationCriteria=t};getTotalWeight=()=>this.evaluationCriteria.reduce(((e,t)=>e+t.value),0);renderInputStep(){return o("div",{class:"input-container"},o("div",{class:"step-header"},o("h3",null,"创建简历筛选任务"),o("p",{class:"step-description"},"请输入职位描述和评分标准")),o("div",{class:"jd-input-section"},o("label",{htmlFor:"job-description"},"职位描述 (JD)"),!!this.mobileJdInputAble&&o("pcm-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}),o("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),o("div",{class:"criteria-input-section"},o("div",{class:"criteria-header"},o("label",{htmlFor:"evaluation-criteria"},"评分标准"),o("div",{class:"criteria-actions"},o("span",{class:`total-weight ${this.getTotalWeight()!==100?"invalid":""}`},"总权重: ",this.getTotalWeight(),"%"),o("button",{type:"button",class:"add-criteria-btn",onClick:this.addEvaluationCriteria},"+ 添加标准"))),o("div",{class:"criteria-table-container"},o("table",{class:"criteria-table"},o("thead",null,o("tr",null,o("th",{style:{width:"25%"}},"标准名称"),o("th",{style:{width:"15%"}},"权重(%)"),o("th",{style:{width:"50%"}},"描述"),o("th",{style:{width:"10%"}},"操作"))),o("tbody",null,this.evaluationCriteria.map(((e,t)=>o("tr",{key:t},o("td",null,o("input",{type:"text",class:"criteria-name-input",placeholder:"请输入标准名称",value:e.name,onInput:e=>this.handleEvaluationCriteriaNameChange(t,e.target.value)})),o("td",null,o("input",{type:"number",class:"criteria-value-input",placeholder:"0",min:"0",max:"100",value:e.value,onInput:e=>this.handleEvaluationCriteriaValueChange(t,e.target.value)})),o("td",null,o("textarea",{class:"criteria-description-input",placeholder:"请输入评分标准描述",rows:2,value:e.description,onInput:e=>this.handleEvaluationCriteriaDescriptionChange(t,e.target.value)})),o("td",null,o("button",{type:"button",class:"remove-criteria-btn",disabled:this.evaluationCriteria.length<=1,onClick:()=>this.removeEvaluationCriteria(t),title:this.evaluationCriteria.length<=1?"至少需要保留一个评分标准":"删除此标准"},"×")))))))),this.getTotalWeight()!==100&&o("p",{class:"criteria-warning"},"⚠️ 权重总和应为100%,当前为",this.getTotalWeight(),"%")),o("div",{class:"criteria-input-section"},o("div",{class:"criteria-header"},o("label",{htmlFor:"evaluation-criteria"},"重要条件(选填)"),o("div",null)),o("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"在此栏填写的条件为硬性要求,不符合条件的简历,其最终匹配度将直接判定为0分。",rows:6,value:this.importantConditions,onInput:this.handleImportantConditionsChange})),o("button",{class:"submit-button",disabled:!this.jobDescription.trim()||this.evaluationCriteria.length===0||this.getTotalWeight()!==100||this.isSubmitting,onClick:this.handleCreateTask},this.isSubmitting?"创建中...":"创建任务"),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003"))))}renderTaskStep(){return o("div",{class:"task-container"},o("div",{class:"task-info-section"},o("div",{class:"info-cards"},o("div",{class:"info-card"},o("div",{class:"card-header",onClick:this.toggleJdDetail},o("span",{class:"card-title"},"职位描述"),o("button",{class:"toggle-btn"},"查看")),o("div",{class:"card-preview"},o("p",{class:"preview-text"},this.jobDescription))),o("div",{class:"info-card"},o("div",{class:"card-header",onClick:this.toggleCriteriaDetail},o("span",{class:"card-title"},"评分标准、重要条件"),o("button",{class:"toggle-btn"},"查看")),o("div",{class:"card-preview"},o("p",{class:"preview-text"},this.getEvaluationCriteriaText()))))),o("div",{class:"upload-section"},o("div",{class:"section-header"},o("h4",null,"上传简历")),o("pcm-upload",{ref:e=>this.pcmUploadRef=e,multiple:true,maxFileSize:15*1024*1024,acceptFileSuffixList:[".pdf",".doc",".docx",".txt",".md",".ppt",".pptx",".jpg",".jpeg",".png"],mobileUploadAble:this.mobileUploadAble,uploadParams:{tags:["resume"]},onUploadChange:this.handleUploadChange}),o("div",{class:"upload-actions"},this.uploadedResumeRecords.some((e=>e.evaluate_status!==1&&e.evaluate_status!==0))&&o("button",{class:"analyze-btn",onClick:this.handleStartAnalysis},`开始分析 (${this.uploadedResumeRecords.filter((e=>e.evaluate_status!==1&&e.evaluate_status!==0)).length} 个待分析)`))),o("div",{class:"resume-table-section"},o("div",{class:"section-header"},o("h4",null,"简历列表"),o("div",{class:"section-header-side"},this.showBatchExport&&!!this.resumeRecords?.find((e=>e.evaluate_status==1))&&o("div",{class:"export-actions"},o("div",{class:"export-btn",onClick:this.exportAllPDF},o("span",null,"批量导出报告")),o("div",{class:"export-divide"}),o("div",{class:"export-btn",onClick:this.handleExportRecordsClick},"导出记录")),o("button",{class:"refresh-btn",onClick:this.handleRefreshTable,disabled:this.isLoadingResumeList,title:"刷新表格"},o("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",class:this.isLoadingResumeList?"rotating":""},o("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"}))),o("span",{class:"record-count"},"已筛选 ",this.totalRecords," 条记录"))),o("div",{class:"table-container"},o("table",{class:"resume-table"},o("thead",null,o("tr",null,o("th",null,"简历文件名"),o("th",null,"人才信息"),o("th",{class:`sortable-header ${this.sortOrder!=="none"?"active":""}`,onClick:this.handleSortByScore},o("span",{class:"header-content"},"评估分数",o("span",{class:"sort-icons"},o("svg",{class:`sort-icon ${this.sortOrder==="asc"?"active":""}`,width:"12",height:"12",viewBox:"0 0 12 12"},o("path",{d:"M6 3l4 4H2z",fill:"currentColor"})),o("svg",{class:`sort-icon ${this.sortOrder==="desc"?"active":""}`,width:"12",height:"12",viewBox:"0 0 12 12"},o("path",{d:"M6 9L2 5h8z",fill:"currentColor"}))))),o("th",null,"评估详情"),o("th",null,"状态"),o("th",null,"操作"))),o("tbody",null,this.isLoadingResumeList?o("tr",null,o("td",{colSpan:6,class:"empty-row"},o("div",{class:"empty-state"},o("div",{class:"loading-spinner-small"}),o("p",null,"正在加载简历数据...")))):this.resumeRecords.length===0?o("tr",null,o("td",{colSpan:6,class:"empty-row"},o("div",{class:"empty-state"},o("p",null,"暂无简历数据"),o("p",{class:"empty-hint"},"请上传简历开始筛选")))):this.resumeRecords.map((e=>o("tr",{key:e.id},o("td",{class:"filename-cell"},o("span",{class:"file-icon"},"📝"),o("span",{title:e.fileName},e.fileName)),o("td",{class:"talent-info-cell",title:e.talentInfo},e.talentInfo),o("td",{class:"score-cell"},o("div",{class:`score-badge ${this.getScoreClass(e.score)}`},typeof e.score==="number"?e.score:"--"),e.out_important_conditions===1&&o("div",{class:"out-important-conditions"},"不满足重要条件")),o("td",{class:"detail-cell",title:e.scoreDetail},o("span",{class:"detail-content",onClick:()=>this.handleViewEvaluate(e)},e.scoreDetail)),o("td",{class:"status-cell"},o("span",{class:`status-badge status-${this.getEvaluateStatusClass(e.evaluate_status)}`},this.getEvaluateStatusText(e.evaluate_status))),o("td",{class:"action-cell"},o("div",{class:"action-dropdown"},o("button",{class:"action-btn dropdown-trigger",onClick:t=>{t.stopPropagation();this.toggleDropdown(e.id)}},"操作",o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor"},o("path",{d:"M7 10l5 5 5-5z"}))),this.activeDropdownId===e.id&&o("div",{class:"dropdown-menu"},o("div",{class:"dropdown-item",onClick:t=>{t.stopPropagation();this.handleViewEvaluate(e)}},o("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},o("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"})),"评估详情"),o("div",{class:"dropdown-item",onClick:t=>{t.stopPropagation();this.handleViewResume(e)}},o("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},o("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"})),"简历详情"),o("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?o("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",class:"loading-spinner"},o("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"}),o("path",{d:"M12 2C17.523 2 22 6.477 22 12h-2a8 8 0 0 0-8-8V2z"})):o("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},o("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.totalRecords>this.pageSize&&o("div",{class:"pagination"},o("button",{class:"page-btn",disabled:this.currentPage===1,onClick:()=>this.changePage(this.currentPage-1)},"上一页"),o("span",{class:"page-info"},"第 ",this.currentPage," 页,共 ",Math.ceil(this.totalRecords/this.pageSize)," 页"),o("button",{class:"page-btn",disabled:this.currentPage>=Math.ceil(this.totalRecords/this.pageSize),onClick:()=>this.changePage(this.currentPage+1)},"下一页")),o("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();j("刷新成功","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 g({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}}startAnalysis=async()=>{if(!this.currentTask){j("任务信息不存在","error");return}const e=this.uploadedResumeRecords.filter((e=>e.evaluate_status!==1&&e.evaluate_status!==0));if(e.length===0){j("没有需要分析的简历","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){j("简历文件URL获取失败","error");return}const o=await g({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){j("已清除重复上传的简历,没有新的简历需要分析","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 h({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=>{},onComplete:async()=>{this.uploadedResumeRecords=this.uploadedResumeRecords.filter((e=>e.evaluate_status!==0));await this.loadResumeList();this.emitAnalysisCompleteEvent()},onError:t=>{console.error("简历分析失败:",t);e.forEach((e=>{e.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];_.captureError(t,{action:"startAnalysis",component:"pcm-jlsx-modal",title:"开始分析失败"});z.emitError({error:t,message:"开始分析失败,请重试"})}})}catch(t){console.error("开始分析失败:",t);e.forEach((e=>{e.evaluate_status=-1}));this.uploadedResumeRecords=[...this.uploadedResumeRecords];_.captureError(t,{action:"startAnalysis",component:"pcm-jlsx-modal",title:"开始分析失败"});z.emitError({error:t,message:"开始分析失败,请重试"})}finally{this.isAnalyzing=false}};handleTaskHistoryClick=()=>{this.isTaskHistoryDrawerOpen=true;this.loadHistoryTasks()};async loadHistoryTasks(){this.isLoadingHistoryTasks=true;try{const e=await g({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;let o="未知时间";try{t=new Date(e.create_at);if(isNaN(t.getTime())){console.warn("无效的日期对象:",e.create_at);t=new Date}const i=new Date;const n=i.getTime()-t.getTime();const r=Math.floor(n/(1e3*60*60*24));if(r===0){o=`今天 ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(r===1){o=`昨天 ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(r>0&&r<7){const e=["周日","周一","周二","周三","周四","周五","周六"];o=`${e[t.getDay()]} ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}else if(r<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.create_at);o="时间解析失败"}return{...e,timeDisplay:o}}));this.taskHistoryTotal=e.data.total||0}}catch(e){console.error("获取历史任务失败:",e);_.captureError(e,{action:"loadHistoryTasks",component:"pcm-jlsx-modal",title:"获取历史任务失败"});z.emitError({error:e,message:"获取历史任务失败"})}finally{this.isLoadingHistoryTasks=false}}handleSwitchTask=async e=>{if(e.id===this.currentTask?.id){this.isTaskHistoryDrawerOpen=false;return}try{const t=await g({url:`/sdk/v1/agent/app_filter_task/query/${e.id}`,method:"GET"});if(!t.success||!t.data){throw new Error(t.message||"获取任务详情失败")}const o=t.data;let i=[];if(o.extra){try{i=JSON.parse(o.extra)}catch(e){console.warn("解析评分标准失败:",e)}}this.currentTask={id:o.id,jd_id:o.jd_id,user_id:o.user_id,extra:o.extra,important_conditions:o.important_conditions||"",create_at:o.create_at,update_at:o.update_at};this.jobDescription=o.jd_info.description||"";this.jobTitle=o.jd_info.title||"";this.evaluationCriteria=i.length>0?i:this.evaluationCriteria;this.importantConditions=o.important_conditions||"";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:this.currentTask?this.currentTask.id:undefined,current_task_id:o.id,task_title:`任务 #${o.id}`,switch_time:(new Date).toISOString()});j("切换任务成功","success")}catch(e){console.error("切换任务失败:",e);_.captureError(e,{action:"handleSwitchTask",component:"pcm-jlsx-modal",title:"切换任务失败"});z.emitError({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.currentTask){j("请先创建任务","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)}));j(`成功上传 ${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?.())){j("文件上传中,请稍后","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 i={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle),o("span",{class:"step-indicator clickable",onClick:this.handleTaskHistoryClick,title:"点击查看任务管理"},"任务管理")),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),this.currentStep==="input"?this.renderInputStep():this.renderTaskStep()),o("pcm-drawer",{isOpen:this.showJdDrawer,drawerTitle:"职位描述",width:"500px",onClosed:this.closeJdDrawer},o("div",{class:"drawer-content"},o("div",{class:"drawer-text-content"},this.jobDescription))),o("pcm-drawer",{isOpen:this.showCriteriaDrawer,drawerTitle:"评分标准、重要条件",width:"500px",onClosed:this.closeCriteriaDrawer},o("div",{class:"drawer-content"},o("div",{class:"pcm-jlsx-card"},o("div",{class:"pcm-jlsx-card-header"},"评分标准"),o("div",{class:"pcm-jlsx-card-body"},this.getEvaluationCriteriaText())),o("div",{class:"pcm-jlsx-card"},o("div",{class:"pcm-jlsx-card-header"},"重要条件"),o("div",{class:"pcm-jlsx-card-body"},this.importantConditions)))),o("pcm-drawer",{isOpen:this.showPreviewDrawer,drawerTitle:this.previewTitle,width:"600px",onClosed:this.closePreviewDrawer},o("div",{class:"drawer-content"},this.previewType==="markdown"?o("div",{class:"markdown-content markdown-body",innerHTML:I(this.previewContent)}):o("div",{class:"file-preview"},o("iframe",{src:this.previewUrl,frameborder:"0",width:"100%",height:"100%",style:{border:"none",height:"calc(100vh - 120px)"}})))),o("pcm-drawer",{isOpen:this.isTaskHistoryDrawerOpen,drawerTitle:"任务管理",width:"500px",onClosed:()=>{this.isTaskHistoryDrawerOpen=false}},o("div",{class:"task-history-drawer-content"},o("div",{class:"task-list"},this.isLoadingHistoryTasks?o("div",{class:"loading-tasks"},o("div",{class:"loading-spinner-small"}),o("p",null,"加载中...")):this.historyTasks.length===0?o("div",{class:"empty-tasks"},o("p",null,"暂无历史任务")):this.historyTasks.map((e=>o("div",{key:e.id,class:{"task-item":true,active:e.id===this.currentTask?.id},onClick:()=>this.handleSwitchTask(e)},o("div",{class:"task-info"},o("div",{class:"task-header"},o("div",{class:"task-id"},e.title||`任务 #${e.id}`),o("div",{class:"task-time"},e.timeDisplay))),e.id===this.currentTask?.id&&o("div",{class:"current-task-indicator"},o("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},o("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))))))),this.taskHistoryTotal>this.taskHistoryPageSize&&o("div",{class:"task-pagination"},o("button",{class:"page-btn",disabled:this.taskHistoryCurrentPage===1,onClick:()=>this.handleTaskHistoryPageChange(this.taskHistoryCurrentPage-1)},"上一页"),o("span",{class:"page-info"},"第 ",this.taskHistoryCurrentPage," 页,共 ",Math.ceil(this.taskHistoryTotal/this.taskHistoryPageSize)," 页"),o("button",{class:"page-btn",disabled:this.taskHistoryCurrentPage>=Math.ceil(this.taskHistoryTotal/this.taskHistoryPageSize),onClick:()=>this.handleTaskHistoryPageChange(this.taskHistoryCurrentPage+1)},"下一页")))),o("pcm-export-records-modal",{open:this.isExportRecordsModalOpen,botId:this.botId,sourceId:this.currentTask?.id?.toString(),onCancel:this.handleExportRecordsModalClose}))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Le.style=Ee+(De+(Oe+Ae));const Re=".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 $e=":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 Ue=class{constructor(t){e(this,t)}get el(){return i(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 o("div",{key:"6dae832a791465cb5b965f9d5b984a45a6af0dc3",class:{"pcm-message":true,"pcm-message-visible":this.visible,[`pcm-message-${this.type}`]:true}},o("div",{key:"30717a23797ea0c287bbffc37b4a126e40639264",class:"pcm-message-content"},o("span",{key:"bcc4fa1987a4709cec74175434627f3c482f6de1",class:"pcm-message-icon"},this.renderIcon()),o("span",{key:"42021e8bcdb80173e1ad1845ef6e64233bc6749c",class:"pcm-message-text"},this.content)))}renderIcon(){switch(this.type){case"success":return o("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},o("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 o("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},o("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 o("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},o("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 o("svg",{viewBox:"64 64 896 896",width:"16px",height:"16px",fill:"currentColor"},o("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"}))}}};Ue.style=Re+$e;const He="";const qe='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const Pe=":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 Ne=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;questionNumber=6;canOutputAnalysis=true;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return i(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;handleTokenChange(e){if(e&&e!==r.getToken()){r.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 a(this.token);if(this.conversationId||this.customInputs?.file_url&&this.customInputs?.job_info){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.setToken(this.token)}a(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.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()};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 u(this.selectedFile,{},{tags:["resume"]});this.uploadedFileInfo=e;this.uploadSuccess.emit(e)}catch(e){console.error("文件上传错误:",e);this.clearSelectedFile();_.captureError(e,{action:"uploadFile",component:"pcm-mnct-modal",title:"文件上传失败"});z.emitError({error:e,message:"文件上传失败,请重试"})}finally{this.isUploading=false}}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};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);_.captureError(e,{action:"handleStartInterview",component:"pcm-mnct-modal",title:"开始面试时出错"});z.emitError({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 i={"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);const s=Boolean(this.customInputs?.file_url&&this.customInputs?.job_info);return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&o("div",{class:"input-container"},!r&&o("div",{class:"jd-input-section"},o("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),o("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&o("div",{class:"resume-upload-section"},o("label",null,"上传简历"),o("div",{class:"upload-area",onClick:this.handleUploadClick},this.selectedFile?o("div",{class:"file-item"},o("div",{class:"file-item-content"},o("span",{class:"file-icon"},"📝"),o("span",{class:"file-name"},this.selectedFile.name)),o("button",{class:"remove-file",onClick:e=>{e.stopPropagation();this.clearSelectedFile()}},"×")):o("div",{class:"upload-placeholder"},o("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),o("p",{class:"upload-text"},"点击上传简历"),o("p",{class:"upload-hint"},"支持 txt、markdown、pdf、docx、doc、md 格式")))),o("div",{class:"interview-settings-section"},o("div",{class:"settings-row"},o("div",{class:"question-number-section"},o("label",{class:"settings-label"},"面试题数量:"),o("div",{class:"slider-container"},o("input",{type:"range",min:"3",max:"20",value:this.questionNumber,class:"question-slider",onInput:this.handleQuestionNumberChange}),o("div",{class:"slider-value"},this.questionNumber,"题")))),o("div",{class:"settings-row"},o("div",{class:"analysis-toggle-section"},o("label",{class:"settings-label"},"是否需要参考答案:"),o("div",{class:"toggle-container"},o("label",{class:"toggle-switch"},o("input",{type:"checkbox",checked:this.canOutputAnalysis,onChange:this.handleAnalysisToggle}),o("span",{class:"toggle-slider"})),o("span",{class:"toggle-text"},this.canOutputAnalysis?"开启":"关闭"))))),o("button",{class:"submit-button",disabled:!a&&!this.selectedFile||!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003"))),o("input",{type:"file",class:"file-input",onChange:this.handleFileChange})),n&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&o("div",null,o("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:"3022316191018876",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"]}}};Ne.style=He+(qe+Pe);const Ve="";const We='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const Je=":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 Qe=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;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;interviewMode="text";recordingError;showCopyButton=true;showFeedbackButtons=true;selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return i(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;virtualChatModalRef=null;handleTokenChange(e){if(e&&e!==r.getToken()){r.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 a(this.token);if((this.customInputs?.file_url||this.customInputs?.resume_content)&&this.customInputs?.job_info||this.conversationId){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.setToken(this.token)}a(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.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?.())){C.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 i={"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 o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&o("div",{class:"input-container"},!r&&o("div",{class:"jd-input-section"},o("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&o("pcm-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}),o("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&o("div",{class:"jd-input-section"},o("label",null,"上传简历(选填)"),o("pcm-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)}})),o("button",{class:"submit-button",disabled:!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始面试"),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&o("div",null,this.enableVirtualHuman&&this.digitalId?o("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,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,interview_type:"1"}}):o("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,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},interviewMode:this.interviewMode}))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};Qe.style=Ve+(We+Je);
|
|
2
|
-
/**
|
|
3
|
-
* @module QRCode
|
|
4
|
-
* @package @nuintun/qrcode
|
|
5
|
-
* @license MIT
|
|
6
|
-
* @version 5.0.2
|
|
7
|
-
* @author nuintun <nuintun@qq.com>
|
|
8
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
9
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
10
|
-
*/const Ge=new Map;class Xe{#e;#t;static CP437=new Xe("cp437",2,0);static ISO_8859_1=new Xe("iso-8859-1",3,1);static ISO_8859_2=new Xe("iso-8859-2",4);static ISO_8859_3=new Xe("iso-8859-3",5);static ISO_8859_4=new Xe("iso-8859-4",6);static ISO_8859_5=new Xe("iso-8859-5",7);static ISO_8859_6=new Xe("iso-8859-6",8);static ISO_8859_7=new Xe("iso-8859-7",9);static ISO_8859_8=new Xe("iso-8859-8",10);static ISO_8859_9=new Xe("iso-8859-9",11);static ISO_8859_10=new Xe("iso-8859-10",12);static ISO_8859_11=new Xe("iso-8859-11",13);static ISO_8859_13=new Xe("iso-8859-13",15);static ISO_8859_14=new Xe("iso-8859-14",16);static ISO_8859_15=new Xe("iso-8859-15",17);static ISO_8859_16=new Xe("iso-8859-16",18);static SHIFT_JIS=new Xe("shift-jis",20);static CP1250=new Xe("cp1250",21);static CP1251=new Xe("cp1251",22);static CP1252=new Xe("cp1252",23);static CP1256=new Xe("cp1256",24);static UTF_16BE=new Xe("utf-16be",25);static UTF_8=new Xe("utf-8",26);static ASCII=new Xe("ascii",27);static BIG5=new Xe("big5",28);static GB2312=new Xe("gb2312",29);static EUC_KR=new Xe("euc-kr",30);static GBK=new Xe("gbk",31);static GB18030=new Xe("gb18030",32);static UTF_16LE=new Xe("utf-16le",33);static UTF_32BE=new Xe("utf-32be",34);static UTF_32LE=new Xe("utf-32le",35);static ISO_646_INV=new Xe("iso-646-inv",170);static BINARY=new Xe("binary",899);constructor(e,...t){this.#e=e;this.#t=Object.freeze(t);for(const e of t){if(e>=0&&e<=999999&&Number.isInteger(e)){Ge.set(e,this)}else{throw new Error("illegal extended channel interpretation value")}}}get label(){return this.#e}get values(){return this.#t}}
|
|
11
|
-
/**
|
|
12
|
-
* @module QRCode
|
|
13
|
-
* @package @nuintun/qrcode
|
|
14
|
-
* @license MIT
|
|
15
|
-
* @version 5.0.2
|
|
16
|
-
* @author nuintun <nuintun@qq.com>
|
|
17
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
18
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
19
|
-
*/function Ke(e){return e&1}function Ye(e){return e|0}function Ze(e){return 1<<et(e)}function et(e){return e&31}function tt(e){return 32-Math.clz32(e)}function ot(e,t){const o=tt(t);e<<=o-1;while(tt(e)>=o){e^=t<<tt(e)-o}return e}
|
|
20
|
-
/**
|
|
21
|
-
* @module QRCode
|
|
22
|
-
* @package @nuintun/qrcode
|
|
23
|
-
* @license MIT
|
|
24
|
-
* @version 5.0.2
|
|
25
|
-
* @author nuintun <nuintun@qq.com>
|
|
26
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
27
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
28
|
-
*/const it=new Map;class nt{#o;#i;static TERMINATOR=new nt([0,0,0],0);static NUMERIC=new nt([10,12,14],1);static ALPHANUMERIC=new nt([9,11,13],2);static STRUCTURED_APPEND=new nt([0,0,0],3);static BYTE=new nt([8,16,16],4);static ECI=new nt([0,0,0],7);static KANJI=new nt([8,10,12],8);static FNC1_FIRST_POSITION=new nt([0,0,0],5);static FNC1_SECOND_POSITION=new nt([0,0,0],9);static HANZI=new nt([8,10,12],13);constructor(e,t){this.#o=t;this.#i=new Int32Array(e);it.set(t,this)}get bits(){return this.#o}getCharacterCountBits({version:e}){let t;if(e<=9){t=0}else if(e<=26){t=1}else{t=2}return this.#i[t]}}
|
|
29
|
-
/**
|
|
30
|
-
* @module QRCode
|
|
31
|
-
* @package @nuintun/qrcode
|
|
32
|
-
* @license MIT
|
|
33
|
-
* @version 5.0.2
|
|
34
|
-
* @author nuintun <nuintun@qq.com>
|
|
35
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
36
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
37
|
-
*/const rt=3;const at=3;const st=40;const lt=10;function dt(e,t,o){return e.get(t,o)===1}function ct(e,t){let o=0;const{size:i}=e;for(let n=0;n<i;n++){let r=-1;let a=0;for(let s=0;s<i;s++){const i=t?e.get(n,s):e.get(s,n);if(i===r){a++}else{if(a>=5){o+=rt+(a-5)}r=i;a=1}}if(a>=5){o+=rt+(a-5)}}return o}function pt(e){return ct(e)+ct(e,true)}function ht(e){let t=0;const o=e.size-1;for(let i=0;i<o;i++){for(let n=0;n<o;n++){const o=e.get(n,i);if(o===e.get(n+1,i)&&o===e.get(n,i+1)&&o===e.get(n+1,i+1)){t+=at}}}return t}function gt(e,t,o,i,n){if(o<0||i>e.size){return false}for(let r=o;r<i;r++){if(n?dt(e,t,r):dt(e,r,t)){return false}}return true}function mt(e){let t=0;const{size:o}=e;for(let i=0;i<o;i++){for(let n=0;n<o;n++){if(n+6<o&&dt(e,n,i)&&!dt(e,n+1,i)&&dt(e,n+2,i)&&dt(e,n+3,i)&&dt(e,n+4,i)&&!dt(e,n+5,i)&&dt(e,n+6,i)&&(gt(e,i,n-4,n)||gt(e,i,n+7,n+11))){t++}if(i+6<o&&dt(e,n,i)&&!dt(e,n,i+1)&&dt(e,n,i+2)&&dt(e,n,i+3)&&dt(e,n,i+4)&&!dt(e,n,i+5)&&dt(e,n,i+6)&&(gt(e,n,i-4,i,true)||gt(e,n,i+7,i+11,true))){t++}}}return t*st}function ut(e){let t=0;const{size:o}=e;for(let i=0;i<o;i++){for(let n=0;n<o;n++){if(dt(e,n,i)){t++}}}const i=o*o;const n=Ye(Math.abs(t*2-i)*10/i);return n*lt}function ft(e){return pt(e)+ht(e)+mt(e)+ut(e)}function bt(e,t,o){let i;let n;switch(e){case 0:n=o+t&1;break;case 1:n=o&1;break;case 2:n=t%3;break;case 3:n=(o+t)%3;break;case 4:n=Ye(o/2)+Ye(t/3)&1;break;case 5:i=o*t;n=(i&1)+i%3;break;case 6:i=o*t;n=(i&1)+i%3&1;break;case 7:n=o*t%3+(o+t&1)&1;break;default:throw new Error(`illegal mask: ${e}`)}return n===0}
|
|
38
|
-
/**
|
|
39
|
-
* @module QRCode
|
|
40
|
-
* @package @nuintun/qrcode
|
|
41
|
-
* @license MIT
|
|
42
|
-
* @version 5.0.2
|
|
43
|
-
* @author nuintun <nuintun@qq.com>
|
|
44
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
45
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
46
|
-
*/const xt=new Map;class wt{#n;#o;#r;static L=new wt("L",0,1);static M=new wt("M",1,0);static Q=new wt("Q",2,3);static H=new wt("H",3,2);constructor(e,t,o){this.#o=o;this.#n=e;this.#r=t;xt.set(o,this)}get bits(){return this.#o}get name(){return this.#n}get level(){return this.#r}}
|
|
47
|
-
/**
|
|
48
|
-
* @module QRCode
|
|
49
|
-
* @package @nuintun/qrcode
|
|
50
|
-
* @license MIT
|
|
51
|
-
* @version 5.0.2
|
|
52
|
-
* @author nuintun <nuintun@qq.com>
|
|
53
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
54
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
55
|
-
*/class yt{#a;#s;constructor(e,t){this.#a=e;this.#s=t}get count(){return this.#a}get numDataCodewords(){return this.#s}}
|
|
56
|
-
/**
|
|
57
|
-
* @module QRCode
|
|
58
|
-
* @package @nuintun/qrcode
|
|
59
|
-
* @license MIT
|
|
60
|
-
* @version 5.0.2
|
|
61
|
-
* @author nuintun <nuintun@qq.com>
|
|
62
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
63
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
64
|
-
*/class kt{#l;#d;#c;#p;#h;constructor(e,...t){let o=0;let i=0;for(const{count:e,numDataCodewords:n}of t){o+=e;i+=n*e}const n=e*o;this.#l=t;this.#c=n;this.#p=i;this.#h=e;this.#d=i+n}get ecBlocks(){return this.#l}get numTotalCodewords(){return this.#d}get numTotalECCodewords(){return this.#c}get numTotalDataCodewords(){return this.#p}get numECCodewordsPerBlock(){return this.#h}}
|
|
65
|
-
/**
|
|
66
|
-
* @module QRCode
|
|
67
|
-
* @package @nuintun/qrcode
|
|
68
|
-
* @license MIT
|
|
69
|
-
* @version 5.0.2
|
|
70
|
-
* @author nuintun <nuintun@qq.com>
|
|
71
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
72
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
73
|
-
*/class vt{#g;#m;#l;#u;constructor(e,t,...o){this.#m=e;this.#l=o;this.#g=17+4*e;this.#u=t}get size(){return this.#g}get version(){return this.#m}get alignmentPatterns(){return this.#u}getECBlocks({level:e}){return this.#l[e]}}const Ct=[new vt(1,[],new kt(7,new yt(1,19)),new kt(10,new yt(1,16)),new kt(13,new yt(1,13)),new kt(17,new yt(1,9))),new vt(2,[6,18],new kt(10,new yt(1,34)),new kt(16,new yt(1,28)),new kt(22,new yt(1,22)),new kt(28,new yt(1,16))),new vt(3,[6,22],new kt(15,new yt(1,55)),new kt(26,new yt(1,44)),new kt(18,new yt(2,17)),new kt(22,new yt(2,13))),new vt(4,[6,26],new kt(20,new yt(1,80)),new kt(18,new yt(2,32)),new kt(26,new yt(2,24)),new kt(16,new yt(4,9))),new vt(5,[6,30],new kt(26,new yt(1,108)),new kt(24,new yt(2,43)),new kt(18,new yt(2,15),new yt(2,16)),new kt(22,new yt(2,11),new yt(2,12))),new vt(6,[6,34],new kt(18,new yt(2,68)),new kt(16,new yt(4,27)),new kt(24,new yt(4,19)),new kt(28,new yt(4,15))),new vt(7,[6,22,38],new kt(20,new yt(2,78)),new kt(18,new yt(4,31)),new kt(18,new yt(2,14),new yt(4,15)),new kt(26,new yt(4,13),new yt(1,14))),new vt(8,[6,24,42],new kt(24,new yt(2,97)),new kt(22,new yt(2,38),new yt(2,39)),new kt(22,new yt(4,18),new yt(2,19)),new kt(26,new yt(4,14),new yt(2,15))),new vt(9,[6,26,46],new kt(30,new yt(2,116)),new kt(22,new yt(3,36),new yt(2,37)),new kt(20,new yt(4,16),new yt(4,17)),new kt(24,new yt(4,12),new yt(4,13))),new vt(10,[6,28,50],new kt(18,new yt(2,68),new yt(2,69)),new kt(26,new yt(4,43),new yt(1,44)),new kt(24,new yt(6,19),new yt(2,20)),new kt(28,new yt(6,15),new yt(2,16))),new vt(11,[6,30,54],new kt(20,new yt(4,81)),new kt(30,new yt(1,50),new yt(4,51)),new kt(28,new yt(4,22),new yt(4,23)),new kt(24,new yt(3,12),new yt(8,13))),new vt(12,[6,32,58],new kt(24,new yt(2,92),new yt(2,93)),new kt(22,new yt(6,36),new yt(2,37)),new kt(26,new yt(4,20),new yt(6,21)),new kt(28,new yt(7,14),new yt(4,15))),new vt(13,[6,34,62],new kt(26,new yt(4,107)),new kt(22,new yt(8,37),new yt(1,38)),new kt(24,new yt(8,20),new yt(4,21)),new kt(22,new yt(12,11),new yt(4,12))),new vt(14,[6,26,46,66],new kt(30,new yt(3,115),new yt(1,116)),new kt(24,new yt(4,40),new yt(5,41)),new kt(20,new yt(11,16),new yt(5,17)),new kt(24,new yt(11,12),new yt(5,13))),new vt(15,[6,26,48,70],new kt(22,new yt(5,87),new yt(1,88)),new kt(24,new yt(5,41),new yt(5,42)),new kt(30,new yt(5,24),new yt(7,25)),new kt(24,new yt(11,12),new yt(7,13))),new vt(16,[6,26,50,74],new kt(24,new yt(5,98),new yt(1,99)),new kt(28,new yt(7,45),new yt(3,46)),new kt(24,new yt(15,19),new yt(2,20)),new kt(30,new yt(3,15),new yt(13,16))),new vt(17,[6,30,54,78],new kt(28,new yt(1,107),new yt(5,108)),new kt(28,new yt(10,46),new yt(1,47)),new kt(28,new yt(1,22),new yt(15,23)),new kt(28,new yt(2,14),new yt(17,15))),new vt(18,[6,30,56,82],new kt(30,new yt(5,120),new yt(1,121)),new kt(26,new yt(9,43),new yt(4,44)),new kt(28,new yt(17,22),new yt(1,23)),new kt(28,new yt(2,14),new yt(19,15))),new vt(19,[6,30,58,86],new kt(28,new yt(3,113),new yt(4,114)),new kt(26,new yt(3,44),new yt(11,45)),new kt(26,new yt(17,21),new yt(4,22)),new kt(26,new yt(9,13),new yt(16,14))),new vt(20,[6,34,62,90],new kt(28,new yt(3,107),new yt(5,108)),new kt(26,new yt(3,41),new yt(13,42)),new kt(30,new yt(15,24),new yt(5,25)),new kt(28,new yt(15,15),new yt(10,16))),new vt(21,[6,28,50,72,94],new kt(28,new yt(4,116),new yt(4,117)),new kt(26,new yt(17,42)),new kt(28,new yt(17,22),new yt(6,23)),new kt(30,new yt(19,16),new yt(6,17))),new vt(22,[6,26,50,74,98],new kt(28,new yt(2,111),new yt(7,112)),new kt(28,new yt(17,46)),new kt(30,new yt(7,24),new yt(16,25)),new kt(24,new yt(34,13))),new vt(23,[6,30,54,78,102],new kt(30,new yt(4,121),new yt(5,122)),new kt(28,new yt(4,47),new yt(14,48)),new kt(30,new yt(11,24),new yt(14,25)),new kt(30,new yt(16,15),new yt(14,16))),new vt(24,[6,28,54,80,106],new kt(30,new yt(6,117),new yt(4,118)),new kt(28,new yt(6,45),new yt(14,46)),new kt(30,new yt(11,24),new yt(16,25)),new kt(30,new yt(30,16),new yt(2,17))),new vt(25,[6,32,58,84,110],new kt(26,new yt(8,106),new yt(4,107)),new kt(28,new yt(8,47),new yt(13,48)),new kt(30,new yt(7,24),new yt(22,25)),new kt(30,new yt(22,15),new yt(13,16))),new vt(26,[6,30,58,86,114],new kt(28,new yt(10,114),new yt(2,115)),new kt(28,new yt(19,46),new yt(4,47)),new kt(28,new yt(28,22),new yt(6,23)),new kt(30,new yt(33,16),new yt(4,17))),new vt(27,[6,34,62,90,118],new kt(30,new yt(8,122),new yt(4,123)),new kt(28,new yt(22,45),new yt(3,46)),new kt(30,new yt(8,23),new yt(26,24)),new kt(30,new yt(12,15),new yt(28,16))),new vt(28,[6,26,50,74,98,122],new kt(30,new yt(3,117),new yt(10,118)),new kt(28,new yt(3,45),new yt(23,46)),new kt(30,new yt(4,24),new yt(31,25)),new kt(30,new yt(11,15),new yt(31,16))),new vt(29,[6,30,54,78,102,126],new kt(30,new yt(7,116),new yt(7,117)),new kt(28,new yt(21,45),new yt(7,46)),new kt(30,new yt(1,23),new yt(37,24)),new kt(30,new yt(19,15),new yt(26,16))),new vt(30,[6,26,52,78,104,130],new kt(30,new yt(5,115),new yt(10,116)),new kt(28,new yt(19,47),new yt(10,48)),new kt(30,new yt(15,24),new yt(25,25)),new kt(30,new yt(23,15),new yt(25,16))),new vt(31,[6,30,56,82,108,134],new kt(30,new yt(13,115),new yt(3,116)),new kt(28,new yt(2,46),new yt(29,47)),new kt(30,new yt(42,24),new yt(1,25)),new kt(30,new yt(23,15),new yt(28,16))),new vt(32,[6,34,60,86,112,138],new kt(30,new yt(17,115)),new kt(28,new yt(10,46),new yt(23,47)),new kt(30,new yt(10,24),new yt(35,25)),new kt(30,new yt(19,15),new yt(35,16))),new vt(33,[6,30,58,86,114,142],new kt(30,new yt(17,115),new yt(1,116)),new kt(28,new yt(14,46),new yt(21,47)),new kt(30,new yt(29,24),new yt(19,25)),new kt(30,new yt(11,15),new yt(46,16))),new vt(34,[6,34,62,90,118,146],new kt(30,new yt(13,115),new yt(6,116)),new kt(28,new yt(14,46),new yt(23,47)),new kt(30,new yt(44,24),new yt(7,25)),new kt(30,new yt(59,16),new yt(1,17))),new vt(35,[6,30,54,78,102,126,150],new kt(30,new yt(12,121),new yt(7,122)),new kt(28,new yt(12,47),new yt(26,48)),new kt(30,new yt(39,24),new yt(14,25)),new kt(30,new yt(22,15),new yt(41,16))),new vt(36,[6,24,50,76,102,128,154],new kt(30,new yt(6,121),new yt(14,122)),new kt(28,new yt(6,47),new yt(34,48)),new kt(30,new yt(46,24),new yt(10,25)),new kt(30,new yt(2,15),new yt(64,16))),new vt(37,[6,28,54,80,106,132,158],new kt(30,new yt(17,122),new yt(4,123)),new kt(28,new yt(29,46),new yt(14,47)),new kt(30,new yt(49,24),new yt(10,25)),new kt(30,new yt(24,15),new yt(46,16))),new vt(38,[6,32,58,84,110,136,162],new kt(30,new yt(4,122),new yt(18,123)),new kt(28,new yt(13,46),new yt(32,47)),new kt(30,new yt(48,24),new yt(14,25)),new kt(30,new yt(42,15),new yt(32,16))),new vt(39,[6,26,54,82,110,138,166],new kt(30,new yt(20,117),new yt(4,118)),new kt(28,new yt(40,47),new yt(7,48)),new kt(30,new yt(43,24),new yt(22,25)),new kt(30,new yt(10,15),new yt(67,16))),new vt(40,[6,30,58,86,114,142,170],new kt(30,new yt(19,118),new yt(6,119)),new kt(28,new yt(18,47),new yt(31,48)),new kt(30,new yt(34,24),new yt(34,25)),new kt(30,new yt(20,15),new yt(61,16)))];
|
|
74
|
-
/**
|
|
75
|
-
* @module QRCode
|
|
76
|
-
* @package @nuintun/qrcode
|
|
77
|
-
* @license MIT
|
|
78
|
-
* @version 5.0.2
|
|
79
|
-
* @author nuintun <nuintun@qq.com>
|
|
80
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
81
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
82
|
-
*/class zt{#f;#b;constructor(e,t){const{length:o}=t;if(o<=0){throw new Error("polynomial coefficients cannot empty")}this.#f=e;if(o>1&&t[0]===0){let e=1;while(e<o&&t[e]===0){e++}if(e===o){this.#b=new Int32Array([0])}else{const i=new Int32Array(o-e);i.set(t.subarray(e));this.#b=i}}else{this.#b=t}}get coefficients(){return this.#b}isZero(){return this.#b[0]===0}getDegree(){return this.#b.length-1}getCoefficient(e){const t=this.#b;return t[t.length-1-e]}evaluate(e){if(e===0){return this.getCoefficient(0)}let t;const o=this.#b;if(e===1){t=0;for(const e of o){t^=e}return t}[t]=o;const i=this.#f;const{length:n}=o;for(let r=1;r<n;r++){t=i.multiply(e,t)^o[r]}return t}multiply(e){const t=this.#f;const o=this.#b;const{length:i}=o;if(e instanceof zt){if(this.isZero()||e.isZero()){return t.zero}const n=e.#b;const r=n.length;const a=new Int32Array(i+r-1);for(let e=0;e<i;e++){const i=o[e];for(let o=0;o<r;o++){a[e+o]^=t.multiply(i,n[o])}}return new zt(t,a)}if(e===0){return t.zero}if(e===1){return this}const n=new Int32Array(i);for(let r=0;r<i;r++){n[r]=t.multiply(o[r],e)}return new zt(t,n)}multiplyByMonomial(e,t){const o=this.#f;if(t===0){return o.zero}const i=this.#b;const{length:n}=i;const r=new Int32Array(n+e);for(let e=0;e<n;e++){r[e]=o.multiply(i[e],t)}return new zt(o,r)}addOrSubtract(e){if(this.isZero()){return e}if(e.isZero()){return this}let t=e.#b;let o=t.length;let i=this.#b;let n=i.length;if(o<n){[o,n]=[n,o];[t,i]=[i,t]}const r=o-n;const a=new Int32Array(o);a.set(t.subarray(0,r));for(let e=r;e<o;e++){a[e]=i[e-r]^t[e]}return new zt(this.#f,a)}divide(e){const t=this.#f;let o=t.zero;let i=this;const n=e.getCoefficient(e.getDegree());const r=t.invert(n);while(i.getDegree()>=e.getDegree()&&!i.isZero()){const n=i.getDegree();const a=n-e.getDegree();const s=t.multiply(i.getCoefficient(n),r);const l=e.multiplyByMonomial(a,s);const d=t.buildPolynomial(a,s);o=o.addOrSubtract(d);i=i.addOrSubtract(l)}return[o,i]}}
|
|
83
|
-
/**
|
|
84
|
-
* @module QRCode
|
|
85
|
-
* @package @nuintun/qrcode
|
|
86
|
-
* @license MIT
|
|
87
|
-
* @version 5.0.2
|
|
88
|
-
* @author nuintun <nuintun@qq.com>
|
|
89
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
90
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
91
|
-
*/class It{#g;#x;#w;#y;#k;#v;constructor(e,t,o){let i=1;const n=new Int32Array(t);for(let o=0;o<t;o++){n[o]=i;i*=2;if(i>=t){i^=e;i&=t-1}}const r=new Int32Array(t);for(let e=0,o=t-1;e<o;e++){r[n[e]]=e}this.#g=t;this.#k=n;this.#v=r;this.#y=o;this.#x=new zt(this,new Int32Array([1]));this.#w=new zt(this,new Int32Array([0]))}get size(){return this.#g}get one(){return this.#x}get zero(){return this.#w}get generator(){return this.#y}exp(e){return this.#k[e]}log(e){return this.#v[e]}invert(e){return this.#k[this.#g-this.#v[e]-1]}multiply(e,t){if(e===0||t===0){return 0}const o=this.#v;return this.#k[(o[e]+o[t])%(this.#g-1)]}buildPolynomial(e,t){if(t===0){return this.#w}const o=new Int32Array(e+1);o[0]=t;return new zt(this,o)}}const St=new It(285,256,0);
|
|
92
|
-
/**
|
|
93
|
-
* @module QRCode
|
|
94
|
-
* @package @nuintun/qrcode
|
|
95
|
-
* @license MIT
|
|
96
|
-
* @version 5.0.2
|
|
97
|
-
* @author nuintun <nuintun@qq.com>
|
|
98
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
99
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
100
|
-
*/function jt(e,t){const o=[];for(const i of e){const e=i.codePointAt(0);o.push(e==null||e>t?63:e)}return new Uint8Array(o)}function _t(e,t){switch(t){case Xe.ASCII:return jt(e,127);case Xe.ISO_8859_1:return jt(e,255);case Xe.UTF_8:return(new TextEncoder).encode(e);default:throw Error(`built-in encode not support charset: ${t.label}`)}}
|
|
101
|
-
/**
|
|
102
|
-
* @module QRCode
|
|
103
|
-
* @package @nuintun/qrcode
|
|
104
|
-
* @license MIT
|
|
105
|
-
* @version 5.0.2
|
|
106
|
-
* @author nuintun <nuintun@qq.com>
|
|
107
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
108
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
109
|
-
*/const Ft=.75;function Mt(e){return Ye(e/32)}function Tt(e){return new Int32Array(Math.ceil(e/32))}class Bt{#C;#o;constructor(e=0){this.#C=e;this.#o=Tt(e)}#z(e){const t=this.#o;if(e>t.length*32){const o=Tt(Math.ceil(e/Ft));o.set(t);this.#o=o}this.#C=e}get length(){return this.#C}get byteLength(){return Math.ceil(this.#C/8)}set(e){this.#o[Mt(e)]|=Ze(e)}get(e){return Ke(this.#o[Mt(e)]>>>et(e))}xor(e){const t=this.#o;const o=e.#o;const i=Math.min(this.#C,e.#C);for(let e=0;e<i;e++){t[e]^=o[e]}}append(e,t=1){let o=this.#C;if(e instanceof Bt){t=e.#C;this.#z(o+t);for(let i=0;i<t;i++){if(e.get(i)!==0){this.set(o)}o++}}else{this.#z(o+t);for(let i=t-1;i>=0;i--){if(Ke(e>>>i)!==0){this.set(o)}o++}}}writeToUint8Array(e,t,o,i){for(let n=0;n<i;n++){let i=0;for(let t=0;t<8;t++){if(this.get(e++)!==0){i|=1<<7-t}}t[o+n]=i}}clear(){this.#o.fill(0)}}
|
|
110
|
-
/**
|
|
111
|
-
* @module QRCode
|
|
112
|
-
* @package @nuintun/qrcode
|
|
113
|
-
* @license MIT
|
|
114
|
-
* @version 5.0.2
|
|
115
|
-
* @author nuintun <nuintun@qq.com>
|
|
116
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
117
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
118
|
-
*/class Et{#g;#I;constructor(e){this.#g=e;this.#I=new Int8Array(e*e)}get size(){return this.#g}set(e,t,o){this.#I[t*this.#g+e]=o}get(e,t){return this.#I[t*this.#g+e]}clear(e){this.#I.fill(e)}}
|
|
119
|
-
/**
|
|
120
|
-
* @module QRCode
|
|
121
|
-
* @package @nuintun/qrcode
|
|
122
|
-
* @license MIT
|
|
123
|
-
* @version 5.0.2
|
|
124
|
-
* @author nuintun <nuintun@qq.com>
|
|
125
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
126
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
127
|
-
*/const Dt=1335;const Ot=21522;const At=7973;const Lt=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,1,1,1,0,1],[1,0,1,1,1,0,1],[1,0,1,1,1,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]];const Rt=[[1,1,1,1,1],[1,0,0,0,1],[1,0,1,0,1],[1,0,0,0,1],[1,1,1,1,1]];const $t=[[8,0],[8,1],[8,2],[8,3],[8,4],[8,5],[8,7],[8,8],[7,8],[5,8],[4,8],[3,8],[2,8],[1,8],[0,8]];function Ut(e,t,o){return e.get(t,o)===-1}function Ht(e,t,o){for(let i=0;i<7;i++){const n=Lt[i];for(let r=0;r<7;r++){e.set(t+r,o+i,n[r])}}}function qt(e,t,o){for(let i=0;i<8;i++){e.set(t+i,o,0)}}function Pt(e,t,o){for(let i=0;i<7;i++){e.set(t,o+i,0)}}function Nt(e){const t=7;const o=8;const i=7;const{size:n}=e;Ht(e,0,0);Ht(e,n-t,0);Ht(e,0,n-t);qt(e,0,o-1);qt(e,n-o,o-1);qt(e,0,n-o);Pt(e,i,0);Pt(e,n-i-1,0);Pt(e,i,n-i)}function Vt(e){const t=e.size-8;for(let o=8;o<t;o++){const t=o+1&1;if(Ut(e,o,6)){e.set(o,6,t)}}for(let o=8;o<t;o++){const t=o+1&1;if(Ut(e,6,o)){e.set(6,o,t)}}}function Wt(e,t,o){for(let i=0;i<5;i++){const n=Rt[i];for(let r=0;r<5;r++){e.set(t+r,o+i,n[r])}}}function Jt(e,{version:t}){if(t>=2){const{alignmentPatterns:o}=Ct[t-1];const{length:i}=o;for(let t=0;t<i;t++){const n=o[t];for(let t=0;t<i;t++){const i=o[t];if(Ut(e,i,n)){Wt(e,i-2,n-2)}}}}}function Qt(e){e.set(8,e.size-8,1)}function Gt(e,t,o){const i=t.bits<<3|o;e.append(i,5);const n=ot(i,Dt);e.append(n,10);const r=new Bt;r.append(Ot,15);e.xor(r)}function Xt(e,t,o){const i=new Bt;Gt(i,t,o);const{size:n}=e;const{length:r}=i;for(let t=0;t<r;t++){const[o,a]=$t[t];const s=i.get(r-1-t);e.set(o,a,s);if(t<8){e.set(n-t-1,8,s)}else{e.set(8,n-7+(t-8),s)}}Qt(e)}function Kt(e,t){e.append(t,6);const o=ot(t,At);e.append(o,12)}function Yt(e,{version:t}){if(t>=7){const o=new Bt;Kt(o,t);let i=6*3-1;const{size:n}=e;for(let t=0;t<6;t++){for(let r=0;r<3;r++){const a=o.get(i--);e.set(t,n-11+r,a);e.set(n-11+r,t,a)}}}}function Zt(e,t,o){let i=0;const{size:n}=e;const{length:r}=t;for(let a=n-1;a>=1;a-=2){if(a===6){a=5}for(let s=0;s<n;s++){for(let l=0;l<2;l++){const d=a-l;const c=(a+1&2)===0;const p=c?n-1-s:s;if(Ut(e,d,p)){let n=0;if(i<r){n=t.get(i++)}if(bt(o,d,p)){n^=1}e.set(d,p,n)}}}}}function eo(e,t){Nt(e);Jt(e,t);Vt(e)}function to(e,t,o,i,n){Xt(e,i,n);Yt(e,o);Zt(e,t,n)}function oo(e,t,o,i){const n=new Et(t.size);n.clear(-1);eo(n,t);to(n,e,t,o,i);return n}
|
|
128
|
-
/**
|
|
129
|
-
* @module QRCode
|
|
130
|
-
* @package @nuintun/qrcode
|
|
131
|
-
* @license MIT
|
|
132
|
-
* @version 5.0.2
|
|
133
|
-
* @author nuintun <nuintun@qq.com>
|
|
134
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
135
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
136
|
-
*/class io{#S;#j;constructor(e,t){this.#S=t;this.#j=e}get ecCodewords(){return this.#S}get dataCodewords(){return this.#j}}
|
|
137
|
-
/**
|
|
138
|
-
* @module QRCode
|
|
139
|
-
* @package @nuintun/qrcode
|
|
140
|
-
* @license MIT
|
|
141
|
-
* @version 5.0.2
|
|
142
|
-
* @author nuintun <nuintun@qq.com>
|
|
143
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
144
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
145
|
-
*/function no(e,t,o){const{length:i}=t;if(o>=i){const{generator:n}=e;let r=t[i-1];for(let a=i;a<=o;a++){const o=new Int32Array([1,e.exp(a-1+n)]);const i=r.multiply(new zt(e,o));t.push(i);r=i}}return t[o]}let ro=class e{#f;#_;constructor(e=St){this.#f=e;this.#_=[new zt(e,new Int32Array([1]))]}encode(e,t){const o=e.length-t;const i=new Int32Array(o);const n=no(this.#f,this.#_,t);i.set(e.subarray(0,o));const r=new zt(this.#f,i);const a=r.multiplyByMonomial(t,1);const[,s]=a.divide(n);const{coefficients:l}=s;const d=t-l.length;const c=o+d;e.fill(0,o,c);e.set(l,c)}};
|
|
146
|
-
/**
|
|
147
|
-
* @module QRCode
|
|
148
|
-
* @package @nuintun/qrcode
|
|
149
|
-
* @license MIT
|
|
150
|
-
* @version 5.0.2
|
|
151
|
-
* @author nuintun <nuintun@qq.com>
|
|
152
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
153
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
154
|
-
*/function ao(e,t){const o=e.length;const i=new Int32Array(o+t);i.set(e);(new ro).encode(i,t);return new Uint8Array(i.subarray(o))}function so(e,{ecBlocks:t,numECCodewordsPerBlock:o}){let i=0;let n=0;let r=0;const a=[];for(const{count:s,numDataCodewords:l}of t){for(let t=0;t<s;t++){const t=new Uint8Array(l);e.writeToUint8Array(r*8,t,0,l);const s=ao(t,o);a.push(new io(t,s));r+=l;i=Math.max(i,s.length);n=Math.max(n,l)}}const s=new Bt;for(let e=0;e<n;e++){for(const{dataCodewords:t}of a){if(e<t.length){s.append(t[e],8)}}}for(let e=0;e<i;e++){for(const{ecCodewords:t}of a){if(e<t.length){s.append(t[e],8)}}}return s}function lo(e,t){const o=t*8;for(let t=0;t<4&&e.length<o;t++){e.append(0)}const i=e.length&7;if(i>0){for(let t=i;t<8;t++){e.append(0)}}const n=t-e.byteLength;for(let t=0;t<n;t++){e.append(t&1?17:236,8)}}function co(e){return e.mode===nt.BYTE}function po(e){return e.mode===nt.HANZI}function ho(e,t){e.append(t.bits,4)}function go(e,t,o){if(co(t)){const[i]=t.charset.values;if(i!==o){e.append(nt.ECI.bits,4);if(i<=127){e.append(i,8)}else if(i<=16383){e.append(32768|i,16)}else{e.append(12582912|i,24)}return i}}return o}function mo(e,t){const[o,i]=t;switch(o){case"GS1":ho(e,nt.FNC1_FIRST_POSITION);break;case"AIM":ho(e,nt.FNC1_SECOND_POSITION);e.append(i,8);break}}function uo(e,t){if(co(e)){return t.byteLength}return e.content.length}function fo(e,t,o,i){e.append(i,t.getCharacterCountBits(o))}function bo(e,t,o){const i=t.getECBlocks(o);const n=Math.ceil(e/8);return i.numTotalDataCodewords>=n}function xo(e,t){for(const o of Ct){if(bo(e,o,t)){return o}}throw new Error("data too big for all versions")}function wo(e,t){let o=0;for(const{mode:i,head:n,body:r}of e){o+=n.length+i.getCharacterCountBits(t)+r.length}return o}function yo(e,t){const o=wo(e,Ct[0]);const i=xo(o,t);const n=wo(e,i);return xo(n,t)}function ko(e,t,o){let i=0;let n=oo(e,t,o,i);let r=ft(n);for(let a=1;a<8;a++){const s=oo(e,t,o,a);const l=ft(s);if(l<r){i=a;n=s;r=l}}return[i,n]}
|
|
155
|
-
/**
|
|
156
|
-
* @module QRCode
|
|
157
|
-
* @package @nuintun/qrcode
|
|
158
|
-
* @license MIT
|
|
159
|
-
* @version 5.0.2
|
|
160
|
-
* @author nuintun <nuintun@qq.com>
|
|
161
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
162
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
163
|
-
*/const vo=(1<<12)-1;class Co{#F;#M;#o;#T;#g;#B;#E;constructor(e){const t=1<<e;const o=t+1;this.#F=t;this.#M=o;this.#T=e;this.reset()}get bof(){return this.#F}get eof(){return this.#M}get bits(){return this.#o}get depth(){return this.#T}reset(){const e=this.#T+1;this.#o=e;this.#g=1<<e;this.#E=new Map;this.#B=this.#M+1}add(e,t){let o=this.#B;if(o>vo){return false}this.#E.set(e<<8|t,o++);let i=this.#o;let n=this.#g;if(o>n){n=1<<++i}this.#o=i;this.#g=n;this.#B=o;return true}get(e,t){return this.#E.get(e<<8|t)}}
|
|
164
|
-
/**
|
|
165
|
-
* @module QRCode
|
|
166
|
-
* @package @nuintun/qrcode
|
|
167
|
-
* @license MIT
|
|
168
|
-
* @version 5.0.2
|
|
169
|
-
* @author nuintun <nuintun@qq.com>
|
|
170
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
171
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
172
|
-
*/class zo{#o=0;#D;#O=0;#I=[];constructor(e){this.#D=e}write(e){let t=this.#o;let o=this.#O|e<<t;t+=this.#D.bits;const i=this.#I;while(t>=8){i.push(o&255);o>>=8;t-=8}this.#o=t;this.#O=o}pipe(e){const t=this.#I;if(this.#o>0){t.push(this.#O)}e.writeByte(this.#D.depth);const{length:o}=t;for(let i=0;i<o;){const n=o-i;if(n>=255){e.writeByte(255);e.writeBytes(t,i,255);i+=255}else{e.writeByte(n);e.writeBytes(t,i,n);i=o}}e.writeByte(0)}}
|
|
173
|
-
/**
|
|
174
|
-
* @module QRCode
|
|
175
|
-
* @package @nuintun/qrcode
|
|
176
|
-
* @license MIT
|
|
177
|
-
* @version 5.0.2
|
|
178
|
-
* @author nuintun <nuintun@qq.com>
|
|
179
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
180
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
181
|
-
*/function Io(e,t,o){const i=new Co(t);const n=new zo(i);n.write(i.bof);if(e.length>0){let t=e[0];const{length:o}=e;for(let r=1;r<o;r++){const o=e[r];const a=i.get(t,o);if(a!=null){t=a}else{n.write(t);if(!i.add(t,o)){n.write(i.bof);i.reset()}t=o}}n.write(t)}n.write(i.eof);n.pipe(o)}
|
|
182
|
-
/**
|
|
183
|
-
* @module QRCode
|
|
184
|
-
* @package @nuintun/qrcode
|
|
185
|
-
* @license MIT
|
|
186
|
-
* @version 5.0.2
|
|
187
|
-
* @author nuintun <nuintun@qq.com>
|
|
188
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
189
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
190
|
-
*/class So{#I=[];get bytes(){return this.#I}writeByte(e){this.#I.push(e&255)}writeInt16(e){this.#I.push(e&255,e>>8&255)}writeBytes(e,t=0,o=e.length){const i=this.#I;for(let n=0;n<o;n++){i.push(e[t+n]&255)}}}
|
|
191
|
-
/**
|
|
192
|
-
* @module QRCode
|
|
193
|
-
* @package @nuintun/qrcode
|
|
194
|
-
* @license MIT
|
|
195
|
-
* @version 5.0.2
|
|
196
|
-
* @author nuintun <nuintun@qq.com>
|
|
197
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
198
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
199
|
-
*/const{fromCharCode:jo}=String;function _o(e){e&=63;if(e>=0){if(e<26){return 65+e}else if(e<52){return 97+(e-26)}else if(e<62){return 48+(e-52)}else if(e===62){return 43}else if(e===63){return 47}}throw new Error(`illegal char: ${jo(e)}`)}class Fo{#o=0;#O=0;#C=0;#A=new So;get bytes(){return this.#A.bytes}write(e){let t=this.#o+8;const o=this.#A;const i=this.#O<<8|e&255;while(t>=6){o.writeByte(_o(i>>>t-6));t-=6}this.#C++;this.#o=t;this.#O=i}close(){const e=this.#o;const t=this.#A;if(e>0){t.writeByte(_o(this.#O<<6-e));this.#o=0;this.#O=0}const o=this.#C;if(o%3!=0){const e=3-o%3;for(let o=0;o<e;o++){t.writeByte(61)}}}}
|
|
200
|
-
/**
|
|
201
|
-
* @module QRCode
|
|
202
|
-
* @package @nuintun/qrcode
|
|
203
|
-
* @license MIT
|
|
204
|
-
* @version 5.0.2
|
|
205
|
-
* @author nuintun <nuintun@qq.com>
|
|
206
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
207
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
208
|
-
*/class Mo{#L;#R;#$;#U;#H=[];constructor(e,t,{foreground:o=[0,0,0],background:i=[255,255,255]}={}){this.#L=e;this.#R=t;this.#$=o;this.#U=i}#q(){const e=this.#L;const t=this.#R;const o=new So;const i=this.#U;const n=this.#$;o.writeBytes([71,73,70,56,57,97]);o.writeInt16(e);o.writeInt16(t);o.writeBytes([128,0,0]);o.writeBytes([i[0],i[1],i[2]]);o.writeBytes([n[0],n[1],n[2]]);o.writeByte(44);o.writeInt16(0);o.writeInt16(0);o.writeInt16(e);o.writeInt16(t);o.writeByte(0);Io(this.#H,2,o);o.writeByte(59);return o.bytes}set(e,t,o){this.#H[t*this.#L+e]=o}toDataURL(){const e=this.#q();const t=new Fo;for(const o of e){t.write(o)}t.close();const o=t.bytes;let i="data:image/gif;base64,";for(const e of o){i+=jo(e)}return i}}
|
|
209
|
-
/**
|
|
210
|
-
* @module QRCode
|
|
211
|
-
* @package @nuintun/qrcode
|
|
212
|
-
* @license MIT
|
|
213
|
-
* @version 5.0.2
|
|
214
|
-
* @author nuintun <nuintun@qq.com>
|
|
215
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
216
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
217
|
-
*/class To{#P;#r;#m;#N;constructor(e,t,o,i){this.#P=i;this.#r=o;this.#N=e;this.#m=t}get size(){return this.#N.size}get mask(){return this.#P}get level(){return this.#r.name}get version(){return this.#m.version}get(e,t){const{size:o}=this.#N;if(e<0||t<0||e>=o||t>=o){throw new Error(`illegal coordinate: [${e}, ${t}]`)}return this.#N.get(e,t)}toDataURL(e=2,{margin:t=e*4,...o}={}){e=Math.max(1,e>>0);t=Math.max(0,t>>0);const i=this.#N;const n=i.size;const r=e*n+t*2;const a=new Mo(r,r,o);const s=r-t;for(let o=0;o<r;o++){for(let n=0;n<r;n++){if(n>=t&&n<s&&o>=t&&o<s){const r=Ye((n-t)/e);const s=Ye((o-t)/e);a.set(n,o,i.get(r,s))}else{a.set(n,o,0)}}}return a.toDataURL()}}
|
|
218
|
-
/**
|
|
219
|
-
* @module QRCode
|
|
220
|
-
* @package @nuintun/qrcode
|
|
221
|
-
* @license MIT
|
|
222
|
-
* @version 5.0.2
|
|
223
|
-
* @author nuintun <nuintun@qq.com>
|
|
224
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
225
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
226
|
-
*/function Bo(e){if(e===""){throw new Error("segment content should be at least 1 character")}}function Eo(e){if(!(e instanceof Xe)){throw new Error("illegal charset")}}function Do(e){const{fnc1:t}=e;if(t!=null){const[e]=t;if(e!=="GS1"&&e!=="AIM"){throw new Error("illegal fn1 hint")}if(e==="AIM"){const[,e]=t;if(e<0||e>255||!Number.isInteger(e)){throw new Error("illegal fn1 application indicator")}}}}function Oo(e){if(["L","M","Q","H"].indexOf(e)<0){throw new Error("illegal error correction level")}}function Ao(e){if(e!=="Auto"){if(e<1||e>40||!Number.isInteger(e)){throw new Error("illegal version")}}}
|
|
227
|
-
/**
|
|
228
|
-
* @module QRCode
|
|
229
|
-
* @package @nuintun/qrcode
|
|
230
|
-
* @license MIT
|
|
231
|
-
* @version 5.0.2
|
|
232
|
-
* @author nuintun <nuintun@qq.com>
|
|
233
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
234
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
235
|
-
*/class Lo{#V;#r;#q;#m;constructor({hints:e={},level:t="L",version:o="Auto",encode:i=_t}={}){Do(e);Oo(t);Ao(o);this.#V=e;this.#q=i;this.#m=o;this.#r=wt[t]}encode(...e){const t=this.#r;const o=this.#q;const{fnc1:i}=this.#V;const n=this.#m;const r=[];let a=false;let[s]=Xe.ISO_8859_1.values;for(const t of e){const{mode:e}=t;const n=new Bt;const l=t.encode(o);const d=uo(t,l);s=go(n,t,s);if(i!=null&&!a){a=true;mo(n,i)}ho(n,e);if(po(t)){n.append(1,4)}r.push({mode:e,head:n,body:l,length:d})}let l;if(n==="Auto"){l=yo(r,t)}else{l=Ct[n-1];const e=wo(r,l);if(!bo(e,l,t)){throw new Error("data too big for requested version")}}const d=new Bt;for(const{mode:e,head:t,body:o,length:i}of r){d.append(t);fo(d,e,l,i);d.append(o)}const c=l.getECBlocks(t);lo(d,c.numTotalDataCodewords);const p=so(d,c);const[h,g]=ko(p,l,t);return new To(g,l,t,h)}}
|
|
236
|
-
/**
|
|
237
|
-
* @module QRCode
|
|
238
|
-
* @package @nuintun/qrcode
|
|
239
|
-
* @license MIT
|
|
240
|
-
* @version 5.0.2
|
|
241
|
-
* @author nuintun <nuintun@qq.com>
|
|
242
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
|
243
|
-
* @see https://github.com/nuintun/qrcode#readme
|
|
244
|
-
*/class Ro{#W;#J;constructor(e,t=Xe.ISO_8859_1){Bo(e);Eo(t);this.#W=e;this.#J=t}get mode(){return nt.BYTE}get content(){return this.#W}get charset(){return this.#J}encode(e){const t=new Bt;const o=e(this.#W,this.#J);for(const e of o){t.append(e,8)}return t}}const $o={number:"",isWorking:false,close:async function(e){const{onOk:t,onError:o}=e??{};const{number:i}=this;if(i){const e=await g({url:`/resource/update_id/${i}`,method:"delete"});if(e.success){this.number="";t?.()}else{o?.()}}}};const Uo=".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 Ho='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const qo=":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 i{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=>{$o.isWorking=e;this.setStartMobileUpload=e};qrcodeUrl="";setMobileUrlWrapper=e=>{this.mobileUrl=e;if(e){const t=new Lo;const o=t.encode(new Ro(e));this.qrcodeUrl=o.toDataURL()}else{this.qrcodeUrl=""}};pollingQueryNumberInfo=async e=>{const t=await g({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($o.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 g({url:`/sdk/v1/update_id`,method:"post",data:o});if(i?.success){const e=i.data??{};$o.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=`${l}/agents/inputByCode?num=${$o.number}`;this.setMobileUrlWrapper(o);this.setStartMobileUploadWrapper(true);this.qrcodeStatus="active";this.pollingQueryNumberInfo($o.number)}this.startMobileUploadLoading=false};cancelLoading=false;cancelMobileUpload=async()=>{this.cancelLoading=true;await $o.close({onError(){C.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(){const e=y();if(e){return null}else{return o("div",null,o("div",{class:"mobile-upload"},o("div",{class:"btn btn-link",onClick:()=>{this.open=true;this.handleStartMobileUpload()}},"扫码填写")),this.open&&o("div",{class:"mask"},o("div",{class:"upload-wrapper"},this.setStartMobileUpload?o("div",{class:"upload-box"},o("div",{class:"qrcode-wrapper"},this.qrcodeStatus==="active"&&o("img",{class:"qrcode",src:this.qrcodeUrl}),this.qrcodeStatus==="loading"&&o("span",{class:"loading"},"加载中..."),this.qrcodeStatus==="expired"&&o("div",{class:"btn btn-link",onClick:this.handleStartMobileUpload},"重新获取")),o("div",{class:"time-expire"},"二维码有效期至 ",this.expireTime),o("div",{class:"alert-tip"},"填写过程中请不要关闭此弹窗"),this.qrcodeStatus==="active"&&o("div",{style:{marginTop:"12px",fontSize:"12px"},class:"btn btn-link",onClick:()=>{navigator.clipboard.writeText(this.mobileUrl).then((()=>{C.success("已复制到剪贴板")})).catch((()=>{C.error("复制失败")}))}},"复制二维码地址")):this.startMobileUploadLoading&&o("span",{class:"loading"},"加载中..."),o("div",{style:{marginTop:"12px"}},!!this.value?.length&&o("textarea",{readOnly:true,class:"qrcode-textarea",value:this.value,onChange:e=>{this.value=e.target.value}})),o("div",{class:"modal-footer"},o("div",{class:"btn btn-default",onClick:this.cancelMobileUpload},"取消"),o("div",{class:"btn btn-primary",onClick:()=>{if(!this.value){C.info(`请输入内容`);return}if(this.value.length>this.maxLength){C.info(`输入内容不能超过${this.maxLength}个字符`);return}this.ok.emit(this.value);this.cancelMobileUpload()}},"完成")))))}}};Po.style=Uo+(Ho+qo);const No={number:"",isWorking:false,close:async function(e){const{onOk:t,onError:o}=e??{};const{number:i}=this;if(i){const e=await g({url:`/resource/update_id/${i}`,method:"delete"});if(e.success){this.number="";t?.()}else{o?.()}}}};const Vo=".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 Wo='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const Jo=":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 Qo=class{constructor(o){e(this,o);this.ok=t(this,"ok")}multiple=false;acceptFileSuffixList=[];maxFileCount=Infinity;maxFileSize=Infinity;uploadHeaders;uploadParams;QR_CODE_VALID_TIME=0;open=false;mobileUrl="";setStartMobileUpload=false;startMobileUploadLoading=false;qrcodeStatus="loading";value=[];expireTime="";ok;setStartMobileUploadWrapper=e=>{No.isWorking=e;this.setStartMobileUpload=e};qrcodeUrl="";setMobileUrlWrapper=e=>{this.mobileUrl=e;if(e){const t=new Lo;const o=t.encode(new Ro(e));this.qrcodeUrl=o.toDataURL()}else{this.qrcodeUrl=""}};pollingQueryNumberInfo=async e=>{const t=await g({url:`/sdk/v1/update_id/${e}/status`,method:"get"});if(t?.success){const e=t.data??{};const{file_list:o}=e;this.value=o??[]}if(No.isWorking){setTimeout((()=>{this.pollingQueryNumberInfo(e)}),3e3)}};handleStartMobileUpload=async()=>{const e=this;this.qrcodeStatus="loading";this.startMobileUploadLoading=true;const t=this.uploadParams??{};const o={is_knowledge_doc:false,tags:t.tags,cfg:{maxSize:e.maxFileSize,maxCount:e.multiple?e.maxFileCount:1,fromUserName:"",fromUserId:"",customAccept:e.acceptFileSuffixList.join(","),upload:e.uploadParams}};const i=await g({url:`/sdk/v1/update_id`,method:"post",data:o});if(i?.success){const e=i.data??{};No.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=`${l}/agents/uploadFileByCode?num=${No.number}`;this.setMobileUrlWrapper(o);this.setStartMobileUploadWrapper(true);this.qrcodeStatus="active";this.pollingQueryNumberInfo(No.number)}this.startMobileUploadLoading=false};cancelLoading=false;cancelMobileUpload=async()=>{this.cancelLoading=true;await No.close({onError(){C.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};handleDelete=async e=>{const t=await g({url:`/sdk/v1/update_id/${No.number}/file`,method:"delete",params:{update_id:No.number,cos_key:e}});if(t?.success){this.value=this.value.filter((t=>t.cos_key!==e))}};render(){const e=y();if(e){return null}else{return o("div",null,o("div",{class:"mobile-upload"},o("div",{class:"btn btn-link",onClick:()=>{if(this.maxFileCount<1){C.info("文件数量已达到上限!");return}this.open=true;this.handleStartMobileUpload()}},"扫码上传")),this.open&&o("div",{class:"mask"},o("div",{class:"upload-wrapper"},this.setStartMobileUpload?o("div",{class:"upload-box"},o("div",{class:"qrcode-wrapper"},this.qrcodeStatus==="active"&&o("img",{class:"qrcode",src:this.qrcodeUrl}),this.qrcodeStatus==="loading"&&o("span",{class:"loading"},"加载中..."),this.qrcodeStatus==="expired"&&o("div",{class:"btn btn-link",onClick:this.handleStartMobileUpload},"重新获取")),o("div",{class:"time-expire"},"二维码有效期至 ",this.expireTime),o("div",{class:"alert-tip"},"上传过程中请不要关闭此弹窗"),this.qrcodeStatus==="active"&&o("div",{style:{marginTop:"12px",fontSize:"12px"},class:"btn btn-link",onClick:()=>{navigator.clipboard.writeText(this.mobileUrl).then((()=>{C.success("已复制到剪贴板")})).catch((()=>{C.error("复制失败")}))}},"复制二维码地址")):this.startMobileUploadLoading&&o("span",{class:"loading"},"加载中..."),o("div",{style:{marginTop:"12px"}},this.value?.map?.(((e,t)=>o("div",{class:"file-item",key:t},o("div",{class:"file-item-content"},o("span",{class:"file-icon"},"📝"),o("span",{class:"file-name"},e?.file_name)),o("button",{class:"remove-file",onClick:t=>{t.stopPropagation();this.handleDelete(e.cos_key)}},"×"))))),o("div",{class:"modal-footer"},o("div",{class:"btn btn-default",onClick:this.cancelMobileUpload},"取消"),o("div",{class:"btn btn-primary",onClick:()=>{if(this.value.length>this.maxFileCount){C.info(`最多只能选择${this.maxFileCount}个文件,请删除多余文件!`);return}this.ok.emit(this.value);this.cancelMobileUpload()}},"完成")))))}}};Qo.style=Vo+(Wo+Jo);const Go="";const Xo='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const Ko=":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 Yo=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;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";selectedFile=null;isUploading=false;uploadedFileInfo=null;showChatModal=false;get hostElement(){return i(this)}jobDescription="";isSubmitting=false;tokenInvalidListener;removeErrorListener;handleTokenChange(e){if(e&&e!==r.getToken()){r.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 a(this.token);if(this.conversationId||this.customInputs?.file_urls&&this.customInputs?.job_info){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.setToken(this.token)}a(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.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()};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 u(this.selectedFile,{},{tags:["other"]});this.uploadedFileInfo=e;this.uploadSuccess.emit(e)}catch(e){console.error("文件上传错误:",e);this.clearSelectedFile();_.captureError(e,{action:"uploadFile",component:"pcm-msbg-modal",title:"文件上传失败"});z.emitError({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);_.captureError(e,{action:"handleStartInterview",component:"pcm-msbg-modal",title:"开始面试时出错"});z.emitError({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 i={"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 o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!s&&o("div",{class:"input-container"},!r&&o("div",{class:"jd-input-section"},o("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),o("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&o("div",{class:"resume-upload-section"},o("label",null,"上传面试内容"),o("div",{class:"upload-area",onClick:this.handleUploadClick},this.selectedFile?o("div",{class:"file-item"},o("div",{class:"file-item-content"},o("span",{class:"file-icon"},"📝"),o("span",{class:"file-name"},this.selectedFile.name)),o("button",{class:"remove-file",onClick:e=>{e.stopPropagation();this.clearSelectedFile()}},"×")):o("div",{class:"upload-placeholder"},o("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),o("p",{class:"upload-text"},"点击上传面试内容"),o("p",{class:"upload-hint"},"支持 mp3、markdown、pdf、docx、doc、md 格式")))),o("button",{class:"submit-button",disabled:!a&&!this.selectedFile||!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003"))),o("input",{type:"file",class:"file-input",onChange:this.handleFileChange})),n&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&o("div",null,o("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:"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"]}}};Yo.style=Go+(Xo+Ko);const Zo=".iframe-container{width:100%;height:85vh}.iframe-container iframe{width:100%;height:100%}";const ei='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const ti=":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 oi=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;mobileUploadAble=false;mobileJdInputAble=false;uploadSuccess;streamComplete;conversationStart;interviewComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";isUploading=false;uploadedFileInfo=null;showChatModal=false;showIframe=false;_internalConversationId;get hostElement(){return i(this)}jobDescription="";isSubmitting=false;_iframeEl;tokenInvalidListener;removeErrorListener;pcmUploadRef;handleTokenChange(e){if(e&&e!==r.getToken()){r.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}else{if(this.customInputs&&this.customInputs.job_info){this.jobDescription=this.customInputs.job_info}await a(this.token);if(this.currentConversationId||this.customInputs?.file_url&&this.customInputs?.job_info){this.showChatModal=true;this.showIframe=false}}}get currentConversationId(){return this.conversationId||this._internalConversationId}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.setToken(this.token)}a(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.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()};closeResumeChat=()=>{this.showIframe=true;this.showChatModal=false};handleIframeLoad=()=>{};handleIframeMessage=e=>{const t=["http://localhost:3000",l];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};handleStartInterview=async()=>{if(!this.customInputs?.file_url&&!this.uploadedFileInfo){C.info("请上传简历");return}if(!this.customInputs?.job_info&&!this.jobDescription.trim()){C.info("请输入职位描述");return}if(await(this.pcmUploadRef?.getIsUploading?.())){C.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":!this.showIframe};const i={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.currentConversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.job_info);const a=Boolean(this.customInputs&&this.customInputs.file_url);const s=Boolean(this.customInputs?.file_url&&this.customInputs?.job_info);return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.currentConversationId&&!s&&o("div",{class:"input-container"},!r&&o("div",{class:"jd-input-section"},o("label",{htmlFor:"job-description"},"请输入职位描述 (JD)"),!!this.mobileJdInputAble&&o("pcm-mobile-input-btn",{name:"职位描述",onOk:e=>{this.jobDescription=e.detail}}),o("textarea",{id:"job-description",class:"job-description-textarea",placeholder:"请输入职位描述,包括职责、要求等信息...",rows:6,value:this.jobDescription,onInput:this.handleJobDescriptionChange})),!a&&o("div",{class:"resume-upload-section"},o("label",null,"上传简历"),o("pcm-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)}})),o("button",{class:"submit-button",disabled:!a&&!this.uploadedFileInfo||!r&&!this.jobDescription.trim()||this.isUploading||this.isSubmitting,onClick:this.handleStartInterview},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始分析"),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&!this.showIframe&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&o("div",null,o("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:"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.jobDescription},interviewMode:"text",onStreamComplete:this.handleStreamComplete})),this.showIframe&&o(o.Fragment,null,o("div",{class:"iframe-container"},o("iframe",{ref:e=>this._iframeEl=e,src:`${l}/myresume?conversation_id=${this.currentConversationId}&isSdk=true`,frameborder:"0",onLoad:this.handleIframeLoad})))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};oi.style=Zo+(ei+ti);const ii=".upload-area{max-height:300px;overflow-y:auto}.upload-actions{display:flex;gap:12px;margin-top:12px;width:100%}";const ni='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const ri=":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 ai=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 i(this)}selectedFiles=null;componentWillLoad(){if(this.defaultFileList&&this.defaultFileList.length>0){this.selectedFiles=this.defaultFileList.map((e=>({...e,state:k.Success})))}}async getIsUploading(){return!!this.selectedFiles?.some((e=>e.state===k.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 u(e,this.uploadHeaders||{},this.uploadParams||{});return{...t,file:e,file_name:e.name,file_size:e.size,state:k.Success}}catch(t){this.clearSelectedFile();_.captureError(t,{action:"uploadFile",component:"pcm-mnms-modal",title:"文件上传失败"});this.uploadFailed.emit({error:t,message:"文件上传失败,请重试"});return{file:e,error:t,state:k.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){C.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?v(this.maxFileSize):"";C.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:k.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)){C.info(`请上传 ${this.acceptFileSuffixList.join("、")} 格式的文件`);return}}if(this.maxFileSize<e.size){C.info(`文件大小不能超过 ${v(this.maxFileSize)??"-"}`);return}this.selectedFiles=[{file:e,file_name:e.name,file_size:e.size,state:k.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===k.Success)).map?.((e=>({cos_key:e.cos_key,file_name:e.file_name,file_size:e.file_size,ext:e.ext}))))};uploadBtn(){return o("div",{style:{width:"100%"}},!!this.mobileUploadAble&&o("pcm-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:k.Success})))];this.emitUploadChange()}}),o("div",{class:"upload-placeholder",onClick:this.handleUploadClick},o("img",{src:"https://pub.pincaimao.com/static/web/images/home/i_upload.png"}),o("p",{class:"upload-text"},this.uploadText),!!this.acceptFileSuffixList?.length&&o("p",{class:"upload-hint"},"支持 ",this.acceptFileSuffixList.join("、")," 格式。"),!!this.maxFileSize&&this.maxFileSize!==Infinity&&o("p",{class:"upload-hint"},"文件大小不能超过 ",v(this.maxFileSize)??"","。"),!!this.maxFileCount&&this.maxFileCount!==Infinity&&o("p",{class:"upload-hint"},"最多上传 ",this.maxFileCount," 个文件。")))}render(){return o("div",{key:"2474772f77ba61b33fad367a806979bf741810b4"},o("div",{key:"93c3e98c7b9cf8254316fdf31c27db45b095df2b",class:"resume-upload-section"},o("div",{key:"ba2792c378583f43a5810b0f15ae0842f01d6edc",class:"upload-area"},o("div",{key:"cbdc8adc18ef54fff5227fd7cf3729d34f790081"},this.selectedFiles?.map?.(((e,t)=>o("div",{class:"file-item"},o("div",{class:"file-item-content"},o("span",{class:"file-icon"},"📝"),o("span",{class:"file-name",style:e.state===k.Failed?{color:"red",textDecoration:"line-through"}:undefined},e?.file_name),e.state===k.Failed&&o("span",{style:{color:"red",marginLeft:"4px"}},"(",e.error?.message??"上传失败",")")),!this.disabled&&o("button",{class:"remove-file",onClick:e=>{e.stopPropagation();this.selectedFiles=this.selectedFiles?.filter(((e,o)=>t!==o));this.emitUploadChange()}},"×")))))),!this.disabled&&(this.multiple?o("div",{class:"upload-actions"},(this.selectedFiles?.length??0)<this.maxFileCount&&this.uploadBtn()):o("div",{class:"upload-actions"},!this.selectedFiles?.length&&this.uploadBtn()))),o("input",{key:"79d0eac29a56efcf85d8663ef0a0f84df81d866d",type:"file",class:"file-input",multiple:this.multiple,onChange:this.handleFileChange}))}};ai.style=ii+(ni+ri);const si=":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: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 li=":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 di=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 i(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;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;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!==r.getToken()){r.setToken(e)}}async setComponentActive(e){this.isComponentActive=e}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}else{const e=s.getItem("modal-zIndex");if(e){this.zIndex=e}else{this.zIndex=1e3;s.setItem("modal-zIndex",1e3)}}if(this.token){r.setToken(this.token)}this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};document.addEventListener("pcm-token-invalid",this.tokenInvalidListener);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 p(this.botId);if(e&&e.logo){this.agentLogo=e.logo}}catch(e){_.captureError(e,{action:"fetchAgentLogo",component:"pcm-virtual-chat-modal",title:"获取智能体信息失败"});z.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 h({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==="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);z.emitError({error:e,message:"消息发送失败,请稍后再试"});_.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 g({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 g({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);_.captureError(e,{action:"loadHistoryMessages",component:"pcm-virtual-chat-modal",title:"加载历史消息失败"});z.emitError({error:e,message:"加载历史消息失败,请刷新重试"})}finally{this.isLoadingHistory=false;if(this.conversationId&&this.messages.length>0&&!e&&!this.isEndingInterview){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl;this.isPlayingDigitalHumanVideo=false;this.isPlayingWelcomeVideo=false;this.digitalHumanVideoReady=true;this.initializeDigitalHuman();setTimeout((()=>{this.startWaitingToRecord()}),200)}else if(e){this.isTaskCompleted=true;if(this.digitalId){this.digitalHumanVideoUrl=this.digitalHumanDefaultVideoUrl;this.isPlayingDigitalHumanVideo=false;this.isPlayingWelcomeVideo=false;this.digitalHumanVideoReady=true;this.initializeDigitalHuman()}}}}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=m();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;_.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;_.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="设备正在被其他应用程序使用"}else if(e.name==="OverconstrainedError"){t="摄像头不支持指定的配置"}else{t="无法访问摄像头或麦克风,请检查设备连接"}this.deviceError=t;this.showRecordingUI=false;z.emitError({error:e,message:t});_.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);_.captureError(e,{action:"setupVideoPreview",component:"pcm-virtual-chat-modal",title:"视频播放失败"});z.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);_.captureError(e,{action:"setupVideoPreview",component:"pcm-virtual-chat-modal",title:"创建对象URL失败"});z.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 u(o,{},{tags:["other"]});const n=await f(i.cos_key);if(this.isEndingInterview){await this.sendEndInterviewMessage()}else{this.sendMessageToAPI(n||"下一题",i.cos_key)}}catch(e){console.error("视频上传或处理错误:",e);this.isEndingInterview=false;_.captureError(e,{action:"uploadRecordedVideo",component:"pcm-virtual-chat-modal",title:"视频上传或处理失败"});z.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.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 g({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);_.captureError(e,{action:"precreateDigitalHumanVideos",component:"pcm-virtual-chat-modal",title:`为文本 "${t}" 创建视频任务失败`})}}}async initializeDigitalHuman(){if(!this.digitalId)return;try{const e=await g({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);_.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 g({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){j(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);_.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 g({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)}))}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;_.captureError(e,{action:"handleConfirmEndInterview",component:"pcm-virtual-chat-modal",title:"点击结束发送消息失败"});z.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 i=t.text;return o("div",{class:"ai-message-item"},o("div",{class:"ai-message-content"},i))}if(this.isGeneratingDigitalHumanVideo||this.isLoading){return o("div",{class:"ai-message-item"},o("div",{class:"ai-message-content"},"请稍等,我查看一下本次面试的信息..."))}if(this.currentStreamingMessage&&this.currentStreamingMessage.answer){return o("div",{class:"ai-message-item streaming"},o("div",{class:"ai-message-content",innerHTML:this.currentStreamingMessage.answer}),this.currentStreamingMessage.isStreaming&&o("div",{class:"typing-indicator"},o("span",null),o("span",null),o("span",null)))}const e=[...this.messages].reverse().find((e=>e.answer&&e.answer.trim()));if(e){return o("div",{class:"ai-message-item"},o("div",{class:"ai-message-content",innerHTML:e.answer}))}return o("div",{class:"ai-message-item"},o("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 i={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};return o("div",{class:i,style:e},o("div",{class:t},o("button",{class:"close-button",onClick:this.handleCloseClick},o("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},o("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&&o("div",{class:"digital-human-background"},o("video",{autoplay:true,playsinline:true,loop:!this.isPlayingDigitalHumanVideo,muted:!this.isPlayingDigitalHumanVideo,src:this.digitalHumanVideoUrl,class:"digital-human-background-video",onEnded:this.handleVideoElementEnded})),this.renderVideoPreview(),o("div",{class:"modal-content-layer"},o("div",{class:"main-content"},o("div",{class:"chat-history-section"},this.renderChatHistory()),this.showEndInterviewButton&&!this.isTaskCompleted&&this.conversationId&&o("div",{class:"end-interview-button-container"},o("button",{class:"end-interview-button",onClick:this.handleInterviewEnd,disabled:this.isEndingInterview||!this.isRecording,title:this.isEndingInterview?"正在结束面试...":!this.isRecording?"请在录制时点击":"结束面试"},this.isEndingInterview?"正在结束...":"结束面试")),this.renderRecordingStatusBar())),o("div",{style:{position:"relative",zIndex:"100"}},o("pcm-confirm-modal",{isOpen:this.showConfirmModal,modalTitle:"确认完成回答?",okText:"确认完成",cancelText:"继续录制",okType:"danger",onOk:this.handleConfirmModalOk,onCancel:this.handleConfirmModalCancelEvent,onClosed:this.handleConfirmModalCancel},o("div",{style:{marginBottom:"16px"}},o("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")}`})()),o("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"}},o("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},o("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),o("span",null,"注意:录制仍在进行中")),o("div",{style:{fontSize:"16px",color:"#595959",lineHeight:"1.5",marginBottom:"16px"}},'点击"确认完成"将结束本题回答'),o("label",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",padding:"8px 0",userSelect:"none"}},o("input",{type:"checkbox",style:{width:"16px",height:"16px",accentColor:"#1890ff",cursor:"pointer",margin:"0"},checked:this.skipConfirmThisInterview,onChange:this.handleSkipConfirmChange}),o("span",{style:{fontSize:"14px",color:"#595959",cursor:"pointer",lineHeight:"1.4"}},"本次面试不再提醒"))))),o("div",{style:{position:"relative",zIndex:"100"}},o("pcm-confirm-modal",{isOpen:this.showCloseConfirmModal,modalTitle:"确认关闭?",okText:"确认关闭",cancelText:"取消",okType:"danger",onOk:this.handleCloseConfirmOk,onCancel:this.handleCloseConfirmCancel,onClosed:this.handleCloseConfirmCancel},o("div",{style:{marginBottom:"16px"}},o("div",{style:{fontSize:"16px",color:"#595959",lineHeight:"1.5",marginBottom:"16px"}},this.isTaskCompleted?"面试已结束,确认要关闭吗?":"您的面试未完成,确认要关闭吗?")))),o("div",{style:{position:"relative",zIndex:"100"}},o("pcm-confirm-modal",{isOpen:this.showEndInterviewConfirmModal,modalTitle:"确认结束面试?",okText:"确认结束",cancelText:"取消",okType:"danger",onOk:this.handleConfirmEndInterview,onCancel:this.handleCancelEndInterview,onClosed:this.handleCancelEndInterview},o("div",{style:{marginBottom:"16px"}},(()=>{const e=this.getAnsweredQuestionCount();return o("div",null,o("div",{style:{fontSize:"14px",color:"#1890ff",fontWeight:"500",marginBottom:"16px",textAlign:"center"}},"当前第 ",e," 题"),e<3&&o("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"}},o("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",style:{flexShrink:"0",marginTop:"2px"}},o("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),o("span",null,o("strong",null,"警告:"),"当前已回答题数小于 3 题,结束面试可能无法正常完成面试流程,建议继续完成更多题目后再结束面试。")),o("div",{style:{fontSize:"14px",color:"#595959",lineHeight:"1.6",textAlign:"center"}},"确认要结束面试吗?结束后将生成面试报告。"))})())))))}renderVideoPreview(){if(!this.showRecordingUI){return null}return o("div",{class:"recording-preview-top-right"},o("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 o("div",{class:"recording-status-bar"},o("div",{class:"audio-waveform"},o("div",{class:"waveform-bar"}),o("div",{class:"waveform-bar"}),o("div",{class:"waveform-bar"}),o("div",{class:"waveform-bar"}),o("div",{class:"waveform-bar"}),o("div",{class:"waveform-bar"}),o("div",{class:"waveform-bar"}),o("div",{class:"waveform-bar"})),o("span",{class:"recording-timer"},e,":",t),o("button",{class:"finish-recording-btn",onClick:()=>this.handleStopRecording()},o("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 o("div",{class:"recording-status-bar"},this.renderStatusIndicator())}renderStatusIndicator(){if(this.deviceError){return o("div",{class:"status-indicator-text error"},o("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},o("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),o("span",null,this.deviceError))}if(this.isTaskCompleted){return o("div",{class:"status-indicator-text"},o("span",null,"面试已完成"))}if(this.waitingForDigitalHuman&&this.digitalId){return o("div",{class:"status-indicator-text loading"},o("div",{class:"loading-spinner-small"}),o("span",null,"AI正在查看面试信息..."))}if(this.isUploadingVideo){return o("div",{class:"status-indicator-text loading"},o("div",{class:"loading-spinner-small"}),o("span",null,"正在分析..."))}if(this.isLoading||this.currentStreamingMessage){return o("div",{class:"status-indicator-text loading"},o("div",{class:"loading-spinner-small"}),o("span",null,"等待题目..."))}if(this.waitingToRecord){return o("div",{class:"status-indicator-text"},o("span",null,this.waitingTimeLeft," 秒后开始您的回答"))}return o("div",{class:"status-indicator-text ready"},o("img",{src:"https://pcm-resource-1312611446.cos.ap-guangzhou.myqcloud.com/sdk/icon/gou.png",width:"16",height:"16",alt:"准备就绪"}),o("span",null,"准备就绪"))}static get watchers(){return{token:["handleTokenChange"]}}};di.style=si+li;const ci=":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: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:400px}.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}.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: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 pi=":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 hi=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.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 i(this)}streamComplete;conversationStart;tokenInvalid;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;handleTokenChange(e){if(e&&e!==r.getToken()){r.setToken(e)}}async handleIsOpenChange(e){if(e){if(!this.employeeId){console.error("未提供数字员工ID (employeeId)");setTimeout((()=>alert("请提供有效的数字员工ID")),0);return}await a(this.token);await this.fetchEmployeeDetails()}}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.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 h({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==="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(){if(!this.conversationId)return;this.isLoadingHistory=true;try{const e=await g({url:"/sdk/v1/knowledge/chat/conversation-history",method:"GET",data:{conversation_id:this.conversationId}});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 g({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 g({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=b();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=b()||"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 u(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 handleDocumentDownload(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 g({url:`/sdk/v1/files/${o}/info`,method:"GET"});if(i.success&&i.data?.file_url){const e=i.data.file_url;const t=`${e}${e.includes("?")?"&":"?"}ci-process=doc-preview©able=1&dstType=html`;window.open(t,"_blank")}else{alert("获取文档链接失败")}}catch(e){console.error("下载文档失败:",e);alert("下载文档失败,请稍后再试")}}handleClearConversation=()=>{if(this.isLoading||this.currentStreamingMessage)return;this.clearConversation.emit(this.conversationId);this.messages=[];this.currentStreamingMessage=null;this.conversationId=undefined;this.currentRefs=[];this.suggestedQuestions=[]};render(){if(!this.isOpen)return null;const e={zIndex:String(this.zIndex)};const t={"modal-container":true,fullscreen:this.fullscreen};const i={"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 o("div",{class:"references-section"},o("h3",{class:"references-title"},"引用文档"),o("div",{class:"references-list"},this.currentRefs.map(((e,t)=>o("div",{class:"reference-item",key:`ref-${t}`,onClick:()=>this.handleDocumentDownload(e)},o("div",{class:"reference-header"},o("span",{class:"reference-icon"},o("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},o("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"}))),o("span",{class:"reference-name"},e.doc_info.doc_name),o("span",{class:"download-icon"},o("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},o("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 o("div",{class:"loading-suggestions"},o("div",{class:"loading-spinner-small"}))}if(this.suggestedQuestions.length===0)return null;return o("div",{class:"suggested-questions"},o("h3",{class:"suggested-title"},"推荐问题"),this.suggestedQuestions.map(((e,t)=>o("div",{class:"suggested-question",key:`question-${t}`,onClick:()=>this.handleSuggestedQuestionClick(e)},o("span",null,e),o("span",{class:"arrow-right"},o("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},o("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 o("div",{class:"suggested-questions"},o("h3",{class:"suggested-title"},"常见问题"),this.quickQuestions.map(((e,t)=>o("div",{class:"suggested-question",key:`preset-question-${t}`,onClick:()=>this.handleSuggestedQuestionClick(e)},o("span",null,e),o("span",{class:"arrow-right"},o("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},o("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})))))))};const d=()=>o("div",{class:"text-input-area"},o("textarea",{class:"text-answer-input",placeholder:"发消息",value:this.textAnswer,onInput:this.handleTextInputChange,onKeyDown:this.handleKeyDown,disabled:this.isRecordingAudio||this.isConvertingAudio}),o("div",{class:"input-toolbar"},o("div",{class:"toolbar-actions"},o("button",{class:"toolbar-button",title:"清除对话记录",onClick:this.handleClearConversation,disabled:this.isSubmittingText||this.isLoading||!!this.currentStreamingMessage||this.messages.length===0},o("img",{src:"https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/brush-alt-svgrepo-com.png",alt:"清除对话记录"}))),o("div",{class:"toolbar-actions"},o("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?o("div",null,o("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},o("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"}),o("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"}),o("circle",{cx:"12",cy:"11",r:"4",fill:"red"}))):this.isConvertingAudio?o("div",{class:"converting-indicator"},o("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},o("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"}))):o("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},o("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"}),o("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"})))),o("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()}},o("img",{src:"https://pcm-pub-1351162788.cos.ap-guangzhou.myqcloud.com/sdk/image/i_send.png",alt:"发送"}))));return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},n&&o("img",{src:n,class:"header-icon",alt:"应用图标"}),o("div",null,r)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),o("div",{class:"chat-container"},o("div",{class:"chat-history",onScroll:this.handleScroll,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onWheel:this.handleWheel},this.isLoadingHistory?o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",null,"加载历史消息中...")):o("div",null,this.messages.map((e=>o("div",{id:`message_${e.id}`,key:e.id},o("pcm-chat-message",{message:e,showFeedbackButtons:false})))),this.currentStreamingMessage&&o("div",{id:`message_${this.currentStreamingMessage.id}`},o("pcm-chat-message",{message:this.currentStreamingMessage,showFeedbackButtons:false})),this.messages.length===0&&!this.currentStreamingMessage&&o("div",{class:"empty-state"},this.isLoadingEmployeeDetails?o("p",null,"加载中..."):this.employeeDetails?.default_greeting?o("p",null,this.employeeDetails.default_greeting):o("p",null,"请输入...")),a(),s(),l())),o("div",{class:"recording-section"},o("div",{class:"recording-container"},d())))))}static get watchers(){return{token:["handleTokenChange"],isOpen:["handleIsOpenChange"]}}};hi.style=ci+pi;const gi='.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:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin: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)}}';const mi=".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 ui=":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 fi=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;mobileUploadAble=false;uploadSuccess;streamComplete;conversationStart;planningComplete;tokenInvalid;someErrorEvent;filePreviewMode="window";isUploading=false;uploadedFileInfo=null;showChatModal=false;isSubmitting=false;selectedPlanType="长期规划";get hostElement(){return i(this)}tokenInvalidListener;removeErrorListener;pcmUploadRef;handleTokenChange(e){if(e&&e!==r.getToken()){r.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 a(this.token);if(this.conversationId||this.customInputs?.file_url&&this.customInputs?.type){this.showChatModal=true}}}componentWillLoad(){if(this.zIndex){s.setItem("modal-zIndex",this.zIndex)}if(this.token){r.setToken(this.token)}a(this.token);this.tokenInvalidListener=()=>{this.tokenInvalid.emit()};this.removeErrorListener=z.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()};handlePlanTypeChange=e=>{this.selectedPlanType=e};handleStartPlanning=async()=>{if(!this.customInputs?.file_url&&!this.uploadedFileInfo){C.info("请上传简历");return}if(await(this.pcmUploadRef?.getIsUploading?.())){C.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 i={"modal-overlay":true,"fullscreen-overlay":this.fullscreen};const n=this.conversationId&&!this.showChatModal;const r=Boolean(this.customInputs&&this.customInputs.file_url);const a=Boolean(this.customInputs?.file_url&&this.customInputs?.type);return o("div",{class:i,style:e},o("div",{class:t},this.isShowHeader&&o("div",{class:"modal-header"},o("div",{class:"header-left"},this.icon&&o("img",{src:this.icon,class:"header-icon",alt:"应用图标"}),o("div",null,this.modalTitle)),this.isNeedClose&&o("button",{class:"close-button",onClick:this.handleClose},o("span",null,"×"))),!this.showChatModal&&!this.conversationId&&!a&&o("div",{class:"input-container"},o("div",{class:"plan-type-section"},o("label",null,"选择规划类型"),o("div",{class:"plan-type-options"},o("div",{class:`plan-type-option ${this.selectedPlanType==="长期规划"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("长期规划")},o("div",{class:"option-icon"},"📈"),o("div",{class:"option-label"},"长期规划")),o("div",{class:`plan-type-option ${this.selectedPlanType==="转行建议"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("转行建议")},o("div",{class:"option-icon"},"🔄"),o("div",{class:"option-label"},"转行建议")),o("div",{class:`plan-type-option ${this.selectedPlanType==="晋升路径"?"selected":""}`,onClick:()=>this.handlePlanTypeChange("晋升路径")},o("div",{class:"option-icon"},"🚀"),o("div",{class:"option-label"},"晋升路径")))),!r&&o("div",{class:"resume-upload-section"},o("label",null,"上传简历"),o("pcm-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)}})),o("button",{class:"submit-button",disabled:!this.customInputs?.file_url&&!this.uploadedFileInfo||this.isUploading||this.isSubmitting,onClick:this.handleStartPlanning},this.isUploading?"上传中...":this.isSubmitting?"处理中...":"开始规划"),o("div",{class:"ai-disclaimer"},o("p",null,"所有内容均由AI生成仅供参考"),o("p",{class:"beian-info"},o("span",null,"中央网信办生成式人工智能服务备案号"),":",o("a",{href:"https://www.pincaimao.com",target:"_blank",rel:"noopener noreferrer"},"Hunan-PinCaiMao-202412310003")))),n&&o("div",{class:"loading-container"},o("div",{class:"loading-spinner"}),o("p",{class:"loading-text"},"正在加载对话...")),this.showChatModal&&o("div",null,o("pcm-app-chat-modal",{isOpen:true,modalTitle:this.modalTitle,icon:this.icon,isShowHeader:this.isShowHeader,isNeedClose:this.isShowHeader,showWorkspaceHistory:this.showWorkspaceHistory,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"]}}};fi.style=gi+(mi+ui);export{T as components_position_selector,O as oem_jlzz_modal,$ as oem_mnms_modal,P as pcm_1zhanshi_mnms_modal,J as pcm_app_chat_modal,X as pcm_button,Z as pcm_card,ie as pcm_chat_message,ae as pcm_confirm_modal,de as pcm_digital_human,he as pcm_drawer,fe as pcm_export_records_modal,ye as pcm_htws_modal,ze as pcm_hyzj_modal,_e as pcm_jd_modal,Be as pcm_jlpp_modal,Le as pcm_jlsx_modal,Ue as pcm_message,Ne as pcm_mnct_modal,Qe as pcm_mnms_zp_modal,Po as pcm_mobile_input_btn,Qo as pcm_mobile_upload_btn,Yo as pcm_msbg_modal,oi as pcm_qgqjl_modal,ai as pcm_upload,di as pcm_virtual_chat_modal,hi as pcm_zsk_chat_modal,fi as pcm_zygh_modal};
|
|
245
|
-
//# sourceMappingURL=p-7a11e5b2.entry.js.map
|