pcm-agents 0.6.62 → 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 +6 -8
- package/dist/cjs/components-position-selector_28.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-oCI89hDY.js → index-NR0bG-Uv.js} +3 -3
- package/dist/cjs/{index-oCI89hDY.js.map → index-NR0bG-Uv.js.map} +1 -1
- package/dist/cjs/index.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/oem-jlzz-modal.cjs.entry.js +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-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-BmOwSI2j.js → sentry-reporter-BvQcVVQ_.js} +3 -3
- package/dist/cjs/{sentry-reporter-BmOwSI2j.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 +2 -2
- 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-ZQIpCN-g.js → p-B0in66n7.js} +3 -3
- package/dist/components/{p-ZQIpCN-g.js.map → p-B0in66n7.js.map} +1 -1
- package/dist/components/{p-D4N6bvJF.js → p-C3QG0kk0.js} +4 -4
- package/dist/components/{p-D4N6bvJF.js.map → p-C3QG0kk0.js.map} +1 -1
- package/dist/components/{p-DLAGpFb_.js → p-CNKZCbo_.js} +5 -5
- package/dist/components/{p-DLAGpFb_.js.map → p-CNKZCbo_.js.map} +1 -1
- package/dist/components/{p-bq_oqII4.js → p-CNx58GiW.js} +3 -3
- package/dist/components/{p-bq_oqII4.js.map → p-CNx58GiW.js.map} +1 -1
- package/dist/components/{p-D0Yu-fO8.js → p-DY30qE8x.js} +3 -3
- package/dist/components/{p-D0Yu-fO8.js.map → p-DY30qE8x.js.map} +1 -1
- package/dist/components/{p-Bq2zTnFk.js → p-DeoeSzgS.js} +3 -3
- package/dist/components/{p-Bq2zTnFk.js.map → p-DeoeSzgS.js.map} +1 -1
- package/dist/components/{p-BvRXK_mf.js → p-Dl6ISIDE.js} +3 -3
- package/dist/components/{p-BvRXK_mf.js.map → p-Dl6ISIDE.js.map} +1 -1
- package/dist/components/{p-Dc0jLjwJ.js → p-_ysXxBbt.js} +3 -3
- package/dist/components/{p-Dc0jLjwJ.js.map → p-_ysXxBbt.js.map} +1 -1
- package/dist/components/{p-D0nx0wKX.js → p-ebsIIpQh.js} +3 -3
- package/dist/components/{p-D0nx0wKX.js.map → p-ebsIIpQh.js.map} +1 -1
- package/dist/components/{p-NcgycWbs.js → p-zNL5HFbN.js} +3 -3
- package/dist/components/{p-NcgycWbs.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 +7 -7
- 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 +6 -8
- package/dist/esm/components-position-selector_28.entry.js.map +1 -1
- package/dist/esm/{index-CK35lVyu.js → index-DcHaiJdv.js} +3 -3
- package/dist/esm/{index-CK35lVyu.js.map → index-DcHaiJdv.js.map} +1 -1
- package/dist/esm/index.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/oem-jlzz-modal.entry.js +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-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-4lgFL2MJ.js → sentry-reporter-BZ6jaP_d.js} +3 -3
- package/dist/esm/{sentry-reporter-4lgFL2MJ.js.map → sentry-reporter-BZ6jaP_d.js.map} +1 -1
- package/dist/pcm-agents/index.esm.js +1 -1
- package/dist/pcm-agents/{p-f68e45d7.entry.js → p-079c81fd.entry.js} +2 -2
- package/dist/pcm-agents/{p-66df336d.entry.js → p-178f3772.entry.js} +2 -2
- package/dist/pcm-agents/{p-94cd1672.entry.js → p-22e147d9.entry.js} +2 -2
- package/dist/pcm-agents/{p-4f7cce57.entry.js → p-26c3bb94.entry.js} +2 -2
- package/dist/pcm-agents/{p-0c7a4fd3.entry.js → p-285a11db.entry.js} +2 -2
- package/dist/pcm-agents/{p-1f724e43.entry.js → p-359d3474.entry.js} +2 -2
- package/dist/pcm-agents/{p-d63c3394.entry.js → p-4a91a26a.entry.js} +2 -2
- package/dist/pcm-agents/{p-0d795f3f.entry.js → p-6037c915.entry.js} +2 -2
- package/dist/pcm-agents/{p-730afd8d.entry.js → p-7a6267c2.entry.js} +2 -2
- package/dist/pcm-agents/{p-CJrQ18zg.js → p-CBQPOkZb.js} +2 -2
- package/dist/pcm-agents/{p-CJrQ18zg.js.map → p-CBQPOkZb.js.map} +1 -1
- package/dist/pcm-agents/{p-DU3DLNhC.js → p-WTSeW6oH.js} +2 -2
- package/dist/pcm-agents/{p-DU3DLNhC.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-86721538.entry.js → p-da967a8c.entry.js} +2 -2
- package/dist/pcm-agents/{p-303078d8.entry.js → p-df3f8c9a.entry.js} +2 -2
- package/dist/pcm-agents/{p-303078d8.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 +1 -1
- 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 +8 -8
- package/package.json +1 -1
- package/dist/pcm-agents/p-b89a19be.entry.js +0 -245
- package/dist/pcm-agents/p-b89a19be.entry.js.map +0 -1
- /package/dist/pcm-agents/{p-f68e45d7.entry.js.map → p-079c81fd.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-66df336d.entry.js.map → p-178f3772.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-94cd1672.entry.js.map → p-22e147d9.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-4f7cce57.entry.js.map → p-26c3bb94.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-0c7a4fd3.entry.js.map → p-285a11db.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-1f724e43.entry.js.map → p-359d3474.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-d63c3394.entry.js.map → p-4a91a26a.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-0d795f3f.entry.js.map → p-6037c915.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-730afd8d.entry.js.map → p-7a6267c2.entry.js.map} +0 -0
- /package/dist/pcm-agents/{p-86721538.entry.js.map → p-da967a8c.entry.js.map} +0 -0
|
@@ -286,7 +286,7 @@ onChange('data', value => {
|
|
|
286
286
|
}
|
|
287
287
|
});
|
|
288
288
|
|
|
289
|
-
const version = "0.6.
|
|
289
|
+
const version = "0.6.63";
|
|
290
290
|
|
|
291
291
|
// 导入环境变量
|
|
292
292
|
function format(first, middle, last) {
|
|
@@ -1047,6 +1047,6 @@ exports.uploadFileByUrl = uploadFileByUrl;
|
|
|
1047
1047
|
exports.uploadFileToBackend = uploadFileToBackend;
|
|
1048
1048
|
exports.verifyApiKey = verifyApiKey;
|
|
1049
1049
|
exports.verifySmsCode = verifySmsCode;
|
|
1050
|
-
//# sourceMappingURL=index-
|
|
1050
|
+
//# sourceMappingURL=index-NR0bG-Uv.js.map
|
|
1051
1051
|
|
|
1052
|
-
//# sourceMappingURL=index-
|
|
1052
|
+
//# sourceMappingURL=index-NR0bG-Uv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-oCI89hDY.js","sources":["src/utils/env.ts","node_modules/.pnpm/@stencil+store@2.1.3_@stencil+core@4.31.0/node_modules/@stencil/store/dist/index.js","store/auth.store.ts","store/config.store.ts"],"sourcesContent":["// 默认 API 域名\r\nconst DEFAULT_API_DOMAIN = 'https://api.pincaimao.com/agents/platform';\r\nconst DEFAULT_PCM_DOMAIN = 'https://www.pincaimao.com';\r\n\r\n\r\n// 从环境变量获取 API 域名,如果未设置则使用默认值\r\nexport const API_DOMAIN = process.env.API_DOMAIN || DEFAULT_API_DOMAIN;\r\nexport const PCM_DOMAIN = process.env.PCM_DOMAIN || DEFAULT_PCM_DOMAIN;\r\n\r\n// 导出其他环境变量\r\nexport const ENV = {\r\n API_DOMAIN,\r\n PCM_DOMAIN,\r\n // 可以添加其他环境变量\r\n}; ","import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","// src/store/auth.store.ts\r\nimport { createStore } from '@stencil/store';\r\n\r\nexport const { state: authState, onChange } = createStore({\r\n token: localStorage.getItem('pcm-sdk-auth-token') || null\r\n});\r\n\r\n// 添加一些辅助方法\r\nexport const authStore = {\r\n getToken: () => authState.token,\r\n setToken: (token: string) => {\r\n authState.token = token;\r\n localStorage.setItem('pcm-sdk-auth-token', token);\r\n },\r\n clearToken: () => {\r\n authState.token = null;\r\n localStorage.removeItem('pcm-sdk-auth-token');\r\n }\r\n};\r\n\r\n// 自动保存到localStorage\r\nonChange('token', value => {\r\n if (value) {\r\n localStorage.setItem('pcm-sdk-auth-token', value);\r\n } else {\r\n localStorage.removeItem('pcm-sdk-auth-token');\r\n }\r\n});","import { createStore } from '@stencil/store';\r\n\r\n// 定义配置数据的类型\r\nexport interface ConfigData {\r\n [key: string]: any;\r\n}\r\n\r\n// 从localStorage获取初始配置\r\nconst getInitialConfig = (): ConfigData => {\r\n try {\r\n const storedConfig = localStorage.getItem('pcm-sdk-config-data');\r\n return storedConfig ? JSON.parse(storedConfig) : {};\r\n } catch (error) {\r\n console.error('Error parsing stored config:', error);\r\n return {};\r\n }\r\n};\r\n\r\n// 创建配置存储\r\nexport const { state: configState, onChange } = createStore<{\r\n data: ConfigData;\r\n}>({\r\n data: getInitialConfig()\r\n});\r\n\r\n// 配置存储的辅助方法\r\nexport const configStore = {\r\n // 获取整个配置对象\r\n getConfig: (): ConfigData => configState.data,\r\n \r\n // 获取特定配置项\r\n getItem: <T>(key: string, defaultValue?: T): T => {\r\n return configState.data[key] !== undefined ? configState.data[key] : defaultValue;\r\n },\r\n \r\n // 设置特定配置项\r\n setItem: <T>(key: string, value: T): void => {\r\n configState.data = {\r\n ...configState.data,\r\n [key]: value\r\n };\r\n },\r\n \r\n // 移除特定配置项\r\n removeItem: (key: string): void => {\r\n const newConfig = { ...configState.data };\r\n delete newConfig[key];\r\n configState.data = newConfig;\r\n },\r\n \r\n // 清除所有配置\r\n clear: (): void => {\r\n configState.data = {};\r\n },\r\n \r\n // 批量更新配置\r\n updateConfig: (newConfig: Partial<ConfigData>): void => {\r\n configState.data = {\r\n ...configState.data,\r\n ...newConfig\r\n };\r\n }\r\n};\r\n\r\n// 自动保存到localStorage\r\nonChange('data', value => {\r\n try {\r\n if (Object.keys(value).length > 0) {\r\n localStorage.setItem('pcm-sdk-config-data', JSON.stringify(value));\r\n } else {\r\n localStorage.removeItem('pcm-sdk-config-data');\r\n }\r\n } catch (error) {\r\n console.error('Error saving config to localStorage:', error);\r\n }\r\n}); "],"names":["getRenderingRef","forceUpdate","onChange"],"mappings":";;;;AAAA;AAKA;AACO,MAAM,UAAU,GAAG,2CAA4C;AACzD,MAAA,UAAU,GAAG;;ACL1B,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC;AACnC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;AAClC;AACA,SAAS,IAAI,CAAC,KA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
|
1
|
+
{"version":3,"file":"index-NR0bG-Uv.js","sources":["src/utils/env.ts","node_modules/.pnpm/@stencil+store@2.1.3_@stencil+core@4.31.0/node_modules/@stencil/store/dist/index.js","store/auth.store.ts","store/config.store.ts"],"sourcesContent":["// 默认 API 域名\r\nconst DEFAULT_API_DOMAIN = 'https://api.pincaimao.com/agents/platform';\r\nconst DEFAULT_PCM_DOMAIN = 'https://www.pincaimao.com';\r\n\r\n\r\n// 从环境变量获取 API 域名,如果未设置则使用默认值\r\nexport const API_DOMAIN = process.env.API_DOMAIN || DEFAULT_API_DOMAIN;\r\nexport const PCM_DOMAIN = process.env.PCM_DOMAIN || DEFAULT_PCM_DOMAIN;\r\n\r\n// 导出其他环境变量\r\nexport const ENV = {\r\n API_DOMAIN,\r\n PCM_DOMAIN,\r\n // 可以添加其他环境变量\r\n}; ","import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","// src/store/auth.store.ts\r\nimport { createStore } from '@stencil/store';\r\n\r\nexport const { state: authState, onChange } = createStore({\r\n token: localStorage.getItem('pcm-sdk-auth-token') || null\r\n});\r\n\r\n// 添加一些辅助方法\r\nexport const authStore = {\r\n getToken: () => authState.token,\r\n setToken: (token: string) => {\r\n authState.token = token;\r\n localStorage.setItem('pcm-sdk-auth-token', token);\r\n },\r\n clearToken: () => {\r\n authState.token = null;\r\n localStorage.removeItem('pcm-sdk-auth-token');\r\n }\r\n};\r\n\r\n// 自动保存到localStorage\r\nonChange('token', value => {\r\n if (value) {\r\n localStorage.setItem('pcm-sdk-auth-token', value);\r\n } else {\r\n localStorage.removeItem('pcm-sdk-auth-token');\r\n }\r\n});","import { createStore } from '@stencil/store';\r\n\r\n// 定义配置数据的类型\r\nexport interface ConfigData {\r\n [key: string]: any;\r\n}\r\n\r\n// 从localStorage获取初始配置\r\nconst getInitialConfig = (): ConfigData => {\r\n try {\r\n const storedConfig = localStorage.getItem('pcm-sdk-config-data');\r\n return storedConfig ? JSON.parse(storedConfig) : {};\r\n } catch (error) {\r\n console.error('Error parsing stored config:', error);\r\n return {};\r\n }\r\n};\r\n\r\n// 创建配置存储\r\nexport const { state: configState, onChange } = createStore<{\r\n data: ConfigData;\r\n}>({\r\n data: getInitialConfig()\r\n});\r\n\r\n// 配置存储的辅助方法\r\nexport const configStore = {\r\n // 获取整个配置对象\r\n getConfig: (): ConfigData => configState.data,\r\n \r\n // 获取特定配置项\r\n getItem: <T>(key: string, defaultValue?: T): T => {\r\n return configState.data[key] !== undefined ? configState.data[key] : defaultValue;\r\n },\r\n \r\n // 设置特定配置项\r\n setItem: <T>(key: string, value: T): void => {\r\n configState.data = {\r\n ...configState.data,\r\n [key]: value\r\n };\r\n },\r\n \r\n // 移除特定配置项\r\n removeItem: (key: string): void => {\r\n const newConfig = { ...configState.data };\r\n delete newConfig[key];\r\n configState.data = newConfig;\r\n },\r\n \r\n // 清除所有配置\r\n clear: (): void => {\r\n configState.data = {};\r\n },\r\n \r\n // 批量更新配置\r\n updateConfig: (newConfig: Partial<ConfigData>): void => {\r\n configState.data = {\r\n ...configState.data,\r\n ...newConfig\r\n };\r\n }\r\n};\r\n\r\n// 自动保存到localStorage\r\nonChange('data', value => {\r\n try {\r\n if (Object.keys(value).length > 0) {\r\n localStorage.setItem('pcm-sdk-config-data', JSON.stringify(value));\r\n } else {\r\n localStorage.removeItem('pcm-sdk-config-data');\r\n }\r\n } catch (error) {\r\n console.error('Error saving config to localStorage:', error);\r\n }\r\n}); "],"names":["get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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-NR0bG-Uv.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-NR0bG-Uv.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
|
-
var sentryReporter = require('./sentry-reporter-
|
|
6
|
+
var sentryReporter = require('./sentry-reporter-BvQcVVQ_.js');
|
|
7
7
|
require('./exports-Dc-pQh4A.js');
|
|
8
8
|
|
|
9
9
|
const oemJdModalCss = ".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}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-NR0bG-Uv.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-NR0bG-Uv.js');
|
|
5
5
|
var messageUtils = require('./message-utils-pPGi8R71.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
8
|
-
var sentryReporter = require('./sentry-reporter-
|
|
8
|
+
var sentryReporter = require('./sentry-reporter-BvQcVVQ_.js');
|
|
9
9
|
require('./exports-Dc-pQh4A.js');
|
|
10
10
|
|
|
11
11
|
const globalCss = ".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)}}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-NR0bG-Uv.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-NR0bG-Uv.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-NR0bG-Uv.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-NR0bG-Uv.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
5
|
-
var sentryReporter = require('./sentry-reporter-
|
|
4
|
+
var index$1 = require('./index-NR0bG-Uv.js');
|
|
5
|
+
var sentryReporter = require('./sentry-reporter-BvQcVVQ_.js');
|
|
6
6
|
require('./exports-Dc-pQh4A.js');
|
|
7
7
|
|
|
8
8
|
const pcmHrChatModalCss = ":host{display:block}.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-y:auto;padding:20px;z-index:1000}.fullscreen-overlay{padding:0}.modal-container{background:white;border-radius:8px;width:100%;max-width:800px;display:flex;flex-direction:column;position:relative;margin:auto}.modal-container.fullscreen{width:100vw;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;height:100vh;max-height:100vh}.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}@media screen and (max-width: 768px){.pc-layout{width:95%;}.modal-overlay{padding:0}.modal-container.fullscreen{height:-webkit-fill-available;max-height:-webkit-fill-available;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.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-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-history{position:relative;flex:1;overflow-y:auto;padding:20px;scroll-behavior:smooth;min-height:200px;background:url(https://pcm-resource-1312611446.cos.ap-guangzhou.myqcloud.com/web/sdk/chat_bg.png);background-size:100%}.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{background-color:#1890ff;color:white;border:none;border-radius:4px;padding:8px 16px;cursor:pointer;font-weight:500}.send-button:disabled{background-color:#ccc;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-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#999;cursor:pointer;padding:4px 8px;font-size:16px;line-height:1;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f0f0f0;color:#666}.initial-upload{padding:16px;display:flex;flex-direction:column;align-items:center;height:100%}.upload-section{max-width:600px;width:100%;text-align:center}.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}.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}.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}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.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}.submit-button:disabled{background:#ccc;cursor:not-allowed}.submit-button:hover:not(:disabled){background:#40a9ff}.category-select,.dimension-select{margin:30px 0}.category-options,.dimension-options{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}.category-button,.dimension-button{padding:12px 16px;border:1px solid #E5E5E5;border-radius:6px;background:white;cursor:pointer;transition:all 0.3s}.category-button:hover,.dimension-button:hover{background:#f5f5f5}.category-button.selected{background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);color:white}.dimension-button.selected{background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);color:white}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding: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}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_qhED9Z.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-NR0bG-Uv.js');
|
|
5
5
|
var errorEvent = require('./error-event-J_ZWIqWF.js');
|
|
6
6
|
var message_service = require('./message.service-DGUsA-FY.js');
|
|
7
7
|
|
|
@@ -82,7 +82,6 @@ const MnmsModal = class {
|
|
|
82
82
|
* customInputs.file_url(或customInputs.resume_content)和customInputs.job_info时,会直接开始聊天。<br>
|
|
83
83
|
* customInputs.resume_content:可传入json字符串,或纯文本字符串,字符串内容为简历内容。<br>
|
|
84
84
|
* customInputs.url_callback:可传入url字符串,当报告生成后,会调用该url进行回调。该url请使用post请求,接收报告字段为report_content,会话id字段为conversation_id。<br>
|
|
85
|
-
* customInputs.interview_type:可传入数字,传入 1 时,开启题目连续模式,一次性生成所有题目。不传入或传入其他值时,题目将逐个生成。<br>
|
|
86
85
|
* customInputs.question_number时,会设置面试题总数量, 默认5题。<br>
|
|
87
86
|
* customInputs.question_list:可传入字符串数组形式的JSON字符串,自定义面试问题列表。<br>
|
|
88
87
|
*/
|
|
@@ -295,7 +294,7 @@ const MnmsModal = class {
|
|
|
295
294
|
file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,
|
|
296
295
|
job_info: this.customInputs?.job_info || this.jobDescription,
|
|
297
296
|
question_number: this.customInputs?.question_number || 5,
|
|
298
|
-
interview_type:
|
|
297
|
+
interview_type: this.digitalId
|
|
299
298
|
} })) : (index.h("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: {
|
|
300
299
|
...this.customInputs,
|
|
301
300
|
file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pcm-mnms-modal.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,EAAE;;ACA1B,MAAM,SAAS,GAAG,i/MAAi/M;;ACAngN,MAAM,OAAO,GAAG,2wBAA2wB;;MCsB9wB,SAAS,GAAA,MAAA;;;;;;;;;;;;AAClB;;AAEG;IACK,UAAU,GAAW,MAAM;AAEnC;;AAEG;AAC2B,IAAA,KAAK;AAEnC;;AAEG;IACsB,MAAM,GAAY,KAAK;AAEhD;;AAEG;AACM,IAAA,WAAW;AAEpB;;AAEG;AACK,IAAA,IAAI;AAEZ;;AAEG;IACK,MAAM,GAAY,IAAI;AAE9B;;AAEG;IACK,YAAY,GAAY,IAAI;AAEpC;;AAEG;IACK,WAAW,GAAY,IAAI;AAEnC;;AAEG;AACsB,IAAA,cAAc;AAEvC;;AAEG;IACK,YAAY,GAAW,SAAS;AAExC;;AAEG;IACK,gBAAgB,GAAW,GAAG;AAEtC;;AAEG;IACK,WAAW,GAAW,EAAE;AAEhC;;AAEG;IACK,UAAU,GAAY,KAAK;AAEnC;;;;;;;;;;AAUG;IACK,YAAY,GAA2B,EAAE;AAEjD;;AAEG;IACK,oBAAoB,GAAY,KAAK;AAE7C;;AAEG;IACK,iBAAiB,GAAY,KAAK;AAE1C;;AAEG;IACK,gBAAgB,GAAY,KAAK;AAEzC;;;;;AAKG;AACK,IAAA,SAAS;AAEjB;;;;;AAKG;IACK,YAAY,GAAW,CAAC;AAEhC;;AAEG;IACK,kBAAkB,GAAY,KAAK;AAE3C;;AAEG;IACK,sBAAsB,GAAY,KAAK;AAG/C;;AAEG;AACM,IAAA,aAAa;AAEtB;;AAEG;AACM,IAAA,cAAc;AAEvB;;AAEG;AACM,IAAA,iBAAiB;AAE1B;;AAEG;AACM,IAAA,i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,YAAY;gBACpB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE,OAAO;gBACvE,SAAS,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,IAAI,IAAI,CAAC,gBAAgB,EAAE,SAAS;gBAC3E,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,IAAI,IAAI,CAAC,cAAc;AAC5D,gBAAA,eAAe,EAAE,IAAI,CAAC,YAAY,EAAE,eAAe,IAAI;AAC1D,aAAA,EACD,aAAa,EAAE,IAAI,CAAC,aAAa,EAAA,CACf,CACzB,CACC,CACT,CACC,CACJ;;;;;;;;;;;","names":["authStore","verifyApiKey","configStore","ErrorEventBus","Message","h"],"sources":["src/components/pcm-mnms-modal/pcm-mnms-modal.css?tag=pcm-mnms-modal&encapsulation=shadow","src/global/global.css?tag=pcm-mnms-modal&encapsulation=shadow","src/global/host.css?tag=pcm-mnms-modal&encapsulation=shadow","src/components/pcm-mnms-modal/pcm-mnms-modal.tsx"],"sourcesContent":["","/* 模态框基础样式 */\r\n.modal-overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n display: flex;\r\n z-index: 1000;\r\n overflow-y: auto;\r\n}\r\n\r\n/* 全屏模式下的overlay样式 - 改为基于父组件 */\r\n.fullscreen-overlay {\r\n padding: 0;\r\n background-color: rgba(0, 0, 0, 0.7);\r\n /* 改为基于父组件的全屏 */\r\n position: absolute;\r\n width: 100%;\r\n height: calc(100% - 10px);\r\n}\r\n\r\n.modal-container {\r\n background-color: #fff;\r\n border-radius: 8px;\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n position: relative;\r\n margin: auto;\r\n transition: all 0.3s ease-out;\r\n overflow: hidden;\r\n}\r\n\r\n/* 全屏模式样式 - 改为基于父组件 */\r\n.modal-container.fullscreen {\r\n width: 100%;\r\n max-width: none;\r\n height: 100%;\r\n border-radius: 0;\r\n margin: 0;\r\n display: flex;\r\n flex-direction: column;\r\n max-height: 100%;\r\n}\r\n\r\n/* PC端布局 */\r\n.pc-layout {\r\n width: 80%;\r\n max-width: 600px;\r\n min-width: 320px;\r\n}\r\n\r\n/* 响应式布局 */\r\n@media screen and (max-width: 768px) {\r\n .pc-layout {\r\n width: 95%;\r\n }\r\n\r\n .modal-overlay {\r\n padding: 10px 0px 0px 0px;\r\n }\r\n\r\n .modal-container.fullscreen {\r\n /* 移动端也基于父组件尺寸 */\r\n width: 100%;\r\n height: 100%;\r\n max-height: 100%;\r\n border-radius: 16px 16px 0 0;\r\n /* 保留安全区域支持 */\r\n padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);\r\n }\r\n}\r\n\r\n/* 模态框头部样式 */\r\n.modal-header {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: 4px 16px;\r\n height: 50px;\r\n border-bottom: 1px solid #e8e8e8;\r\n flex-shrink: 0;\r\n}\r\n\r\n.header-left {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n font-size: 16px;\r\n font-weight: 600;\r\n color: #333;\r\n}\r\n\r\n.header-icon {\r\n width: 24px;\r\n height: 24px;\r\n}\r\n\r\n.close-button {\r\n background: transparent;\r\n border: none;\r\n cursor: pointer;\r\n padding: 8px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 32px;\r\n height: 32px;\r\n border-radius: 4px;\r\n}\r\n\r\n.close-button:hover {\r\n background-color: rgba(0, 0, 0, 0.04);\r\n}\r\n\r\n.close-button span {\r\n font-size: 24px;\r\n line-height: 1;\r\n color: #999;\r\n}\r\n\r\n.close-button:hover span {\r\n color: #666;\r\n}\r\n\r\n\r\n/* 文件上传区域通用样式 */\r\n.upload-area {\r\n cursor: pointer;\r\n width: 100%;\r\n}\r\n\r\n\r\n.upload-placeholder {\r\n transition: all 0.3s ease;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.02);\r\n border: 1px dashed #d9d9d9;\r\n border-radius: 8px;\r\n cursor: pointer;\r\n}\r\n\r\n.upload-placeholder:hover {\r\n border: 1px dashed #1890ff;\r\n}\r\n\r\n.upload-placeholder img {\r\n margin-top: 8px;\r\n width: 50px;\r\n height: 50px;\r\n}\r\n\r\n.upload-placeholder .upload-text {\r\n margin: 4px 0;\r\n color: #332F39;\r\n font-size: 14px;\r\n}\r\n\r\n.upload-placeholder .upload-hint {\r\n font-size: 14px;\r\n color: #949AA5;\r\n margin-top: 8px;\r\n padding: 0px 10px;\r\n text-align: center;\r\n white-space: normal;\r\n word-wrap: break-word;\r\n word-break: break-all;\r\n line-height: 1.4;\r\n}\r\n\r\n\r\n/* 文件项样式 */\r\n.file-item {\r\n position: relative;\r\n padding: 16px;\r\n border: 1px solid #e2e8f0;\r\n border-radius: 8px;\r\n transition: border-color 0.3s;\r\n cursor: pointer;\r\n margin-bottom: 16px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n\r\n.file-item:hover {\r\n border-color: #0D75FB;\r\n}\r\n\r\n.file-item-content {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n flex: 1;\r\n min-width: 0;\r\n overflow: hidden;\r\n}\r\n\r\n.file-icon {\r\n color: #0D75FB;\r\n flex-shrink: 0;\r\n}\r\n\r\n.file-name {\r\n font-weight: 500;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n max-width: calc(100% - 50px);\r\n}\r\n\r\n.remove-file {\r\n background: transparent;\r\n border: none;\r\n color: #94a3b8;\r\n cursor: pointer;\r\n font-size: 18px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 4px;\r\n margin-left: 8px;\r\n border-radius: 4px;\r\n transition: all 0.2s;\r\n min-width: 30px;\r\n min-height: 30px;\r\n}\r\n\r\n.remove-file:hover {\r\n background-color: #f1f5f9;\r\n color: #475569;\r\n}\r\n\r\n.file-input {\r\n display: none;\r\n}\r\n\r\n\r\n\r\n/* 输入容器样式 */\r\n.input-container {\r\n padding: 20px;\r\n display: flex;\r\n flex-direction: column;\r\n height: calc(100% - 50px);\r\n background: linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;\r\n /* 减去header高度 */\r\n overflow-y: auto;\r\n}\r\n\r\n.input-container h3 {\r\n margin-top: 0;\r\n margin-bottom: 20px;\r\n font-size: 18px;\r\n color: #333;\r\n text-align: center;\r\n}\r\n\r\n/* JD输入区域样式 */\r\n.jd-input-section {\r\n margin-bottom: 20px;\r\n}\r\n\r\n.jd-input-section label {\r\n display: block;\r\n margin-bottom: 8px;\r\n font-weight: 500;\r\n color: #333;\r\n}\r\n\r\n.job-description-textarea {\r\n width: calc(100% - 16px);\r\n border: 1px solid #ddd;\r\n border-radius: 4px;\r\n resize: vertical;\r\n font-family: inherit;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n transition: border-color 0.3s;\r\n padding: 8px;\r\n}\r\n\r\n.job-description-textarea:focus {\r\n outline: none;\r\n border-color: #1890ff;\r\n box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);\r\n}\r\n\r\n/* 简历上传区域样式 */\r\n.resume-upload-section {\r\n margin-bottom: 20px;\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.resume-upload-section label {\r\n display: block;\r\n margin-bottom: 8px;\r\n font-weight: 500;\r\n color: #333;\r\n}\r\n\r\n/* 面试设置区域 */\r\n.interview-settings-section {\r\n margin-bottom: 24px;\r\n padding: 20px;\r\n background-color: #f8f9fa;\r\n border-radius: 8px;\r\n border: 1px solid #e9ecef;\r\n}\r\n\r\n.settings-row {\r\n margin-bottom: 20px;\r\n}\r\n\r\n.settings-row:last-child {\r\n margin-bottom: 0;\r\n}\r\n\r\n.settings-label {\r\n display: block;\r\n font-weight: 500;\r\n color: #333;\r\n margin-bottom: 12px;\r\n font-size: 14px;\r\n}\r\n\r\n/* 题目数量滑块样式 */\r\n.question-number-section {\r\n width: 100%;\r\n}\r\n\r\n.slider-container {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\r\n}\r\n\r\n.question-slider {\r\n flex: 1;\r\n height: 6px;\r\n background: #ddd;\r\n outline: none;\r\n border-radius: 3px;\r\n -webkit-appearance: none;\r\n appearance: none;\r\n}\r\n\r\n.question-slider::-webkit-slider-thumb {\r\n -webkit-appearance: none;\r\n appearance: none;\r\n width: 20px;\r\n height: 20px;\r\n background: #0D75FB;\r\n cursor: pointer;\r\n border-radius: 50%;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.question-slider::-moz-range-thumb {\r\n width: 20px;\r\n height: 20px;\r\n background: #0D75FB;\r\n cursor: pointer;\r\n border-radius: 50%;\r\n border: none;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.slider-value {\r\n font-weight: 600;\r\n color: #0D75FB;\r\n font-size: 14px;\r\n min-width: 30px;\r\n text-align: center;\r\n}\r\n\r\n/* 开关样式 */\r\n.analysis-toggle-section {\r\n width: 100%;\r\n}\r\n\r\n.toggle-container {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\r\n}\r\n\r\n.toggle-switch {\r\n position: relative;\r\n display: inline-block;\r\n width: 44px;\r\n height: 24px;\r\n}\r\n\r\n.toggle-switch input {\r\n opacity: 0;\r\n width: 0;\r\n height: 0;\r\n}\r\n\r\n.toggle-slider {\r\n position: absolute;\r\n cursor: pointer;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: #ccc;\r\n transition: 0.3s;\r\n border-radius: 24px;\r\n}\r\n\r\n.toggle-slider:before {\r\n position: absolute;\r\n content: \"\";\r\n height: 18px;\r\n width: 18px;\r\n left: 3px;\r\n bottom: 3px;\r\n background-color: white;\r\n transition: 0.3s;\r\n border-radius: 50%;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\ninput:checked + .toggle-slider {\r\n background-color: #0D75FB;\r\n}\r\n\r\ninput:checked + .toggle-slider:before {\r\n transform: translateX(20px);\r\n}\r\n\r\n.toggle-text {\r\n font-size: 14px;\r\n color: #666;\r\n font-weight: 500;\r\n}\r\n\r\n/* 提交按钮通用样式 */\r\n.submit-button {\r\n margin-top: 10px;\r\n padding: 10px 30px;\r\n background: #0D75FB;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n font-size: 16px;\r\n cursor: pointer;\r\n transition: all 0.3s ease;\r\n width: 100%;\r\n max-width: 400px;\r\n align-self: center;\r\n}\r\n\r\n.submit-button:hover {\r\n background-color: #40a9ff;\r\n}\r\n\r\n.submit-button:disabled {\r\n background-color: rgba(0,0,0,0.04);\r\n color: rgba(0,0,0,0.25);\r\n cursor: not-allowed;\r\n}\r\n\r\n\r\n\r\n/* AI免责声明和备案信息样式 */\r\n.ai-disclaimer {\r\n margin-top: 16px;\r\n text-align: center;\r\n font-size: 12px;\r\n color: #999;\r\n line-height: 1.5;\r\n}\r\n\r\n.ai-disclaimer p {\r\n margin: 4px 0;\r\n}\r\n\r\n.beian-info {\r\n display: flex;\r\n justify-content: center;\r\n flex-wrap: wrap;\r\n gap: 4px;\r\n}\r\n\r\n.ai-disclaimer a {\r\n color: #666;\r\n text-decoration: none;\r\n transition: color 0.2s ease;\r\n}\r\n\r\n.ai-disclaimer a:hover {\r\n color: #1890ff;\r\n text-decoration: underline;\r\n}\r\n\r\n/* 添加加载状态的样式 */\r\n.loading-container {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n height: 100%;\r\n padding: 24px;\r\n }\r\n \r\n .loading-spinner {\r\n width: 40px;\r\n height: 40px;\r\n border: 4px solid rgba(0, 0, 0, 0.1);\r\n border-radius: 50%;\r\n border-top-color: var(--pcm-primary-color, #1890ff);\r\n animation: spin 1s linear infinite;\r\n margin-bottom: 16px;\r\n }\r\n \r\n .loading-text {\r\n font-size: 16px;\r\n color: var(--pcm-text-color, #333);\r\n }\r\n \r\n @keyframes spin {\r\n 0% { transform: rotate(0deg); }\r\n 100% { transform: rotate(360deg); }\r\n }\r\n \r\n ",":host {\r\n /* 字体相关属性 */\r\n font-size: 16px;\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\r\n font-weight: normal;\r\n font-style: normal;\r\n font-variant: normal;\r\n line-height: 1.5;\r\n letter-spacing: normal;\r\n word-spacing: normal;\r\n \r\n /* 文本相关属性 */\r\n color: #333; /* 重置文字颜色,避免继承外部的red */\r\n text-align: left;\r\n text-indent: 0;\r\n text-transform: none;\r\n white-space: normal;\r\n word-wrap: normal;\r\n word-break: normal;\r\n \r\n /* 可见性 */\r\n visibility: visible;\r\n \r\n /* 列表相关 */\r\n list-style: none;\r\n list-style-image: none;\r\n list-style-position: outside;\r\n list-style-type: disc;\r\n \r\n /* 表格相关 */\r\n border-collapse: separate;\r\n border-spacing: 0;\r\n caption-side: top;\r\n empty-cells: show;\r\n table-layout: auto;\r\n \r\n /* 引用 */\r\n quotes: auto;\r\n \r\n /* 光标 */\r\n cursor: auto;\r\n \r\n /* 文本方向 */\r\n direction: ltr;\r\n \r\n /* 打印相关 */\r\n orphans: 2;\r\n widows: 2;\r\n page-break-inside: auto;\r\n \r\n /* 其他可能被继承的属性 */\r\n text-decoration: none;\r\n text-shadow: none;\r\n \r\n /* 确保组件有独立的盒模型 */\r\n box-sizing: border-box;\r\n \r\n /* 重置一些可能影响布局的继承属性 */\r\n writing-mode: horizontal-tb;\r\n text-orientation: mixed;\r\n}","import { Component, Prop, h, State, Element, Event, EventEmitter, Watch } from '@stencil/core';\r\nimport { FileUploadResponse, verifyApiKey } from '../../utils/utils';\r\nimport {\r\n StreamCompleteEventData,\r\n ConversationStartEventData,\r\n InterviewCompleteEventData,\r\n RecordingErrorEventData,\r\n} from '../../interfaces/events';\r\nimport { ErrorEventBus, ErrorEventDetail } from '../../utils/error-event';\r\nimport { authStore } from '../../../store/auth.store';\r\nimport { configStore } from '../../../store/config.store';\r\nimport { Message } from '../../services/message.service';\r\n\r\n/**\r\n * 模拟面试(求职)\r\n */\r\n\r\n@Component({\r\n tag: 'pcm-mnms-modal',\r\n styleUrls: ['pcm-mnms-modal.css', '../../global/global.css', '../../global/host.css'],\r\n shadow: true,\r\n})\r\nexport class MnmsModal {\r\n /**\r\n * 模态框标题\r\n */\r\n @Prop() modalTitle: string = '模拟面试';\r\n\r\n /**\r\n * SDK鉴权密钥\r\n */\r\n @Prop({ attribute: 'token' }) token!: string;\r\n\r\n /**\r\n * 是否显示聊天模态框\r\n */\r\n @Prop({ mutable: true }) isOpen: boolean = false;\r\n\r\n /**\r\n * 当点击模态框关闭时触发\r\n */\r\n @Event() modalClosed: EventEmitter<void>;\r\n\r\n /**\r\n * 应用图标URL\r\n */\r\n @Prop() icon?: string;\r\n\r\n /**\r\n * 聊天框的页面层级\r\n */\r\n @Prop() zIndex?: number = 1000;\r\n\r\n /**\r\n * 是否展示顶部标题栏\r\n */\r\n @Prop() isShowHeader: boolean = true;\r\n\r\n /**\r\n * 是否展示右上角的关闭按钮\r\n */\r\n @Prop() isNeedClose: boolean = true;\r\n\r\n /**\r\n * 会话ID,传入继续对话,否则创建新会话\r\n */\r\n @Prop({ mutable: true }) conversationId?: string;\r\n\r\n /**\r\n * 默认查询文本\r\n */\r\n @Prop() defaultQuery: string = '请开始模拟面试';\r\n\r\n /**\r\n * 视频录制最大时长(秒)默认120\r\n */\r\n @Prop() maxRecordingTime: number = 120;\r\n\r\n /**\r\n * 等待录制时间(秒)默认10\r\n */\r\n @Prop() waitingTime: number = 10;\r\n\r\n /**\r\n * 是否以全屏模式打开,移动端建议设置为true\r\n */\r\n @Prop() fullscreen: boolean = false;\r\n\r\n /**\r\n * 自定义输入参数,可传入以下参数:<br>\r\n * customInputs.job_info时,会隐藏JD输入区域。<br>\r\n * customInputs.file_url或customInputs.resume_content时,会隐藏简历上传区域。<br>\r\n * customInputs.file_url(或customInputs.resume_content)和customInputs.job_info时,会直接开始聊天。<br>\r\n * customInputs.resume_content:可传入json字符串,或纯文本字符串,字符串内容为简历内容。<br>\r\n * customInputs.url_callback:可传入url字符串,当报告生成后,会调用该url进行回调。该url请使用post请求,接收报告字段为report_content,会话id字段为conversation_id。<br>\r\n * customInputs.interview_type:可传入数字,传入 1 时,开启题目连续模式,一次性生成所有题目。不传入或传入其他值时,题目将逐个生成。<br>\r\n * customInputs.question_number时,会设置面试题总数量, 默认5题。<br>\r\n * customInputs.question_list:可传入字符串数组形式的JSON字符串,自定义面试问题列表。<br>\r\n */\r\n @Prop() customInputs: Record<string, string> = {};\r\n\r\n /**\r\n * 是否显示工作区历史会话按钮\r\n */\r\n @Prop() showWorkspaceHistory: boolean = false;\r\n\r\n /**\r\n * 是否开启移动端上传JD(仅PC端生效)\r\n */\r\n @Prop() mobileJdInputAble: boolean = false;\r\n\r\n /**\r\n * 是否开启移动端上传简历(仅PC端生效)\r\n */\r\n @Prop() mobileUploadAble: boolean = false;\r\n\r\n /**\r\n * 虚拟数字人ID,指定则开启虚拟数字人功能</br>\r\n * 智琪:79202506752 </br>\r\n * 艾綝:79402522624 </br>\r\n * 艾姮:79597885440 </br>\r\n */\r\n @Prop() digitalId?: string;\r\n\r\n /**\r\n * 数字人开场白索引,用于选择开场白和开场视频(可选:0, 1, 2)\r\n * 0、您好,我是聘才猫 AI 面试助手。很高兴为你主持这场面试!在开始前,请确保:身处安静、光线充足的环境。网络顺畅,摄像头和麦克风工作正常。现在我正在查看本次面试的相关信息,为您生成专属面试题,马上就好,请稍等片刻。</br>\r\n * 1、您好,我是您的 AI 面试助手。欢迎参加本次AI面试!为了获得最佳效果,请确认:您在安静、明亮的环境中。您的网络稳定,摄像头和麦克风已开启。我们正在后台为您准备本次专属面试内容,很快开始,请稍候。<br>\r\n * 2、您好,我是您的 AI 面试助手。面试马上开始。趁此片刻,请快速确认:周围安静吗?光线足够吗?网络没问题?摄像头和麦克风准备好了吗?我们正在为您加载个性化的面试环节,稍等就好!\r\n */\r\n @Prop() openingIndex: number = 0;\r\n\r\n /**\r\n * 是否启用全屏数字人模式,此模式下面试报告只会通过url_callback回调返回\r\n */\r\n @Prop() enableVirtualHuman: boolean = false;\r\n\r\n /**\r\n * 是否显示结束面试按钮\r\n */\r\n @Prop() showEndInterviewButton: boolean = false;\r\n\r\n\r\n /**\r\n * 上传成功事件\r\n */\r\n @Event() uploadSuccess: EventEmitter<FileUploadResponse>;\r\n\r\n /**\r\n * 流式输出完成事件\r\n */\r\n @Event() streamComplete: EventEmitter<StreamCompleteEventData>;\r\n\r\n /**\r\n * 新会话开始的回调,只会在一轮对话开始时触发一次\r\n */\r\n @Event() conversationStart: EventEmitter<ConversationStartEventData>;\r\n\r\n /**\r\n * 当聊天完成时触发\r\n */\r\n @Event() interviewComplete: EventEmitter<InterviewCompleteEventData>;\r\n\r\n /**\r\n * SDK密钥验证失败事件\r\n */\r\n @Event() tokenInvalid: EventEmitter<void>;\r\n\r\n /**\r\n * 错误事件\r\n */\r\n @Event() someErrorEvent: EventEmitter<ErrorEventDetail>;\r\n\r\n\r\n /**\r\n * 面试模式:text - 文本模式,video - 视频模式\r\n */\r\n @Prop() interviewMode: 'text' | 'video' = 'text';\r\n\r\n /**\r\n * 录制错误事件\r\n */\r\n @Event() recordingError: EventEmitter<RecordingErrorEventData>;\r\n\r\n /**\r\n * 是否显示复制按钮\r\n */\r\n @Prop() showCopyButton: boolean = true;\r\n\r\n /**\r\n * 是否显示点赞点踩按钮\r\n */\r\n @Prop() showFeedbackButtons: boolean = true;\r\n\r\n\r\n @State() selectedFile: File | null = null;\r\n @State() isUploading: boolean = false;\r\n @State() uploadedFileInfo: FileUploadResponse | null = null;\r\n @State() showChatModal: boolean = false;\r\n\r\n // 使用 @Element 装饰器获取组件的 host 元素\r\n @Element() hostElement: HTMLElement;\r\n\r\n @State() jobDescription: string = '';\r\n @State() isSubmitting: boolean = false;\r\n\r\n private tokenInvalidListener: () => void;\r\n private removeErrorListener: () => void;\r\n\r\n // 添加对子组件的引用\r\n private virtualChatModalRef: HTMLPcmVirtualChatModalElement | null = null;\r\n\r\n @Watch('token')\r\n handleTokenChange(newToken: string) {\r\n // 当传入的 token 变化时,更新 authStore 中的 token\r\n if (newToken && newToken !== authStore.getToken()) {\r\n authStore.setToken(newToken);\r\n }\r\n }\r\n\r\n\r\n @Watch('isOpen')\r\n async handleIsOpenChange(newValue: boolean) {\r\n if (!newValue) {\r\n // 当模态框关闭时,调用子组件方法停止所有活动\r\n if (this.virtualChatModalRef) {\r\n await this.virtualChatModalRef.setComponentActive(false);\r\n }\r\n // 重置状态\r\n this.resetState();\r\n } else {\r\n if (this.customInputs && this.customInputs.job_info) {\r\n this.jobDescription = this.customInputs.job_info;\r\n }\r\n\r\n await verifyApiKey(this.token);\r\n\r\n // 如果同时有 file_url 和 job_info,或者有会话ID,直接显示聊天模态框\r\n if (((this.customInputs?.file_url || this.customInputs?.resume_content) && this.customInputs?.job_info) || this.conversationId) {\r\n this.showChatModal = true;\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n componentWillLoad() {\r\n // 将 zIndex 存入配置缓存\r\n if (this.zIndex) {\r\n configStore.setItem('modal-zIndex', this.zIndex);\r\n }\r\n\r\n if (this.token) {\r\n authStore.setToken(this.token);\r\n }\r\n\r\n verifyApiKey(this.token);\r\n\r\n // 添加全局token无效事件监听器\r\n this.tokenInvalidListener = () => {\r\n this.tokenInvalid.emit();\r\n };\r\n\r\n // 添加全局错误监听\r\n this.removeErrorListener = ErrorEventBus.addErrorListener((errorDetail) => {\r\n this.someErrorEvent.emit(errorDetail);\r\n });\r\n\r\n document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);\r\n }\r\n\r\n disconnectedCallback() {\r\n // 组件销毁时移除事件监听器\r\n document.removeEventListener('pcm-token-invalid', this.tokenInvalidListener);\r\n // 移除错误监听器\r\n if (this.removeErrorListener) {\r\n this.removeErrorListener();\r\n }\r\n }\r\n\r\n /**\r\n * 重置组件状态\r\n */\r\n private resetState() {\r\n this.showChatModal = false;\r\n this.jobDescription = '';\r\n this.isSubmitting = false;\r\n this.selectedFile = null;\r\n this.isUploading = false;\r\n this.uploadedFileInfo = null;\r\n }\r\n\r\n private handleClose = () => {\r\n this.modalClosed.emit();\r\n };\r\n\r\n private handleJobDescriptionChange = (event: Event) => {\r\n const textarea = event.target as HTMLTextAreaElement;\r\n this.jobDescription = textarea.value;\r\n };\r\n\r\n private handleStartInterview = async () => {\r\n // 如果没有预设的job_info,则需要检查用户输入\r\n if (!this.customInputs?.job_info && !this.jobDescription.trim()) {\r\n alert('请输入职位描述');\r\n return;\r\n }\r\n // 判断文件是否正在上传\r\n if (await this.pcmUploadRef?.getIsUploading?.()) {\r\n Message.info('文件上传中,请稍后');\r\n return;\r\n }\r\n this.isSubmitting = true;\r\n this.showChatModal = true;\r\n };\r\n\r\n private pcmUploadRef;\r\n\r\n render() {\r\n if (!this.isOpen) return null;\r\n\r\n const modalStyle = {\r\n zIndex: String(this.zIndex)\r\n };\r\n\r\n\r\n const containerClass = {\r\n 'modal-container': true,\r\n 'fullscreen': this.fullscreen,\r\n 'pc-layout': true,\r\n };\r\n\r\n const overlayClass = {\r\n 'modal-overlay': true,\r\n 'fullscreen-overlay': this.fullscreen\r\n };\r\n\r\n // 显示加载状态\r\n const isLoading = this.conversationId && !this.showChatModal;\r\n\r\n // 修正这里的逻辑,确保当 customInputs.job_info 存在时,hideJdInput 为 true\r\n const hideJdInput = Boolean(this.customInputs && this.customInputs.job_info);\r\n\r\n // 判断是否隐藏简历上传区域 - 当有file_url或resume_content时都隐藏\r\n const hideResumeUpload = Boolean(this.customInputs && (this.customInputs.file_url || this.customInputs.resume_content));\r\n\r\n // 判断是否同时提供了(file_url或resume_content)和job_info\r\n const hasFileAndJob = Boolean((this.customInputs?.file_url || this.customInputs?.resume_content) && this.customInputs?.job_info);\r\n\r\n return (\r\n <div class={overlayClass} style={modalStyle}>\r\n <div class={containerClass}>\r\n {this.isShowHeader && (\r\n <div class=\"modal-header\">\r\n <div class=\"header-left\">\r\n {this.icon && <img src={this.icon} class=\"header-icon\" alt=\"应用图标\" />}\r\n <div>{this.modalTitle}</div>\r\n </div>\r\n {this.isNeedClose && (\r\n <button class=\"close-button\" onClick={this.handleClose}>\r\n <span>×</span>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n\r\n {/* 上传界面 - 仅在不显示聊天模态框且没有会话ID且没有同时提供file_url和job_info时显示 */}\r\n {!this.showChatModal && !this.conversationId && !hasFileAndJob && (\r\n <div class=\"input-container\">\r\n {/* JD输入区域 - 仅在没有customInputs.job_info时显示 */}\r\n {!hideJdInput && (\r\n <div class=\"jd-input-section\">\r\n <label htmlFor=\"job-description\">请输入职位描述 (JD)</label>\r\n {\r\n !!this.mobileJdInputAble && (\r\n <pcm-mobile-input-btn\r\n name=\"职位描述\"\r\n onOk={(e) => {\r\n this.jobDescription = e.detail;\r\n }}\r\n />\r\n )\r\n }\r\n <textarea\r\n id=\"job-description\"\r\n class=\"job-description-textarea\"\r\n placeholder=\"请输入职位描述,包括职责、要求等信息...\"\r\n rows={6}\r\n value={this.jobDescription}\r\n onInput={this.handleJobDescriptionChange}\r\n ></textarea>\r\n </div>\r\n )}\r\n\r\n {/* 简历上传区域 - 仅在没有customInputs.file_url或customInputs.resume_content时显示 */}\r\n {\r\n !hideResumeUpload && (\r\n <div class=\"jd-input-section\">\r\n <label>上传简历(选填)</label>\r\n <pcm-upload\r\n ref={el => this.pcmUploadRef = el}\r\n maxFileSize={15 * 1024 * 1024}\r\n multiple={false}\r\n mobileUploadAble={this.mobileUploadAble}\r\n acceptFileSuffixList={['.txt', '.md', '.pdf', '.docx', '.doc']}\r\n uploadParams={{\r\n tags: ['resume'],\r\n }}\r\n onUploadChange={(e) => {\r\n const result: FileUploadResponse[] = e.detail ?? [];\r\n this.uploadedFileInfo = result[0];\r\n this.uploadSuccess.emit(this.uploadedFileInfo);\r\n }}\r\n />\r\n </div>\r\n )\r\n }\r\n\r\n <button\r\n class=\"submit-button\"\r\n disabled={(!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting}\r\n onClick={this.handleStartInterview}\r\n >\r\n {this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始面试'}\r\n </button>\r\n\r\n <div class=\"ai-disclaimer\">\r\n <p>所有内容均由AI生成仅供参考</p>\r\n <p class=\"beian-info\">\r\n <span>中央网信办生成式人工智能服务备案号</span>:\r\n <a href=\"https://www.pincaimao.com\" target=\"_blank\" rel=\"noopener noreferrer\">Hunan-PinCaiMao-202412310003</a>\r\n </p>\r\n </div>\r\n </div>\r\n )}\r\n\r\n {/* 加载状态 - 在有会话ID但聊天模态框尚未显示时展示 */}\r\n {isLoading && (\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n <p class=\"loading-text\">正在加载对话...</p>\r\n </div>\r\n )}\r\n\r\n {/* 聊天界面 - 在显示聊天模态框时显示 */}\r\n {this.showChatModal && (\r\n <div >\r\n {this.enableVirtualHuman && this.digitalId ? (\r\n <pcm-virtual-chat-modal\r\n ref={el => this.virtualChatModalRef = el}\r\n isOpen={true}\r\n fullscreen={this.fullscreen}\r\n botId=\"3022316191018884\"\r\n digitalId={this.digitalId}\r\n openingIndex={this.openingIndex}\r\n conversationId={this.conversationId}\r\n defaultQuery={this.defaultQuery}\r\n waitingTime={this.waitingTime}\r\n showEndInterviewButton={this.showEndInterviewButton}\r\n customInputs={{\r\n ...this.customInputs,\r\n file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,\r\n file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,\r\n job_info: this.customInputs?.job_info || this.jobDescription,\r\n question_number: this.customInputs?.question_number || 5,\r\n interview_type:\"1\"\r\n }}\r\n ></pcm-virtual-chat-modal>\r\n ) : (\r\n <pcm-app-chat-modal\r\n isOpen={true}\r\n modalTitle={this.modalTitle}\r\n icon={this.icon}\r\n isShowHeader={this.isShowHeader}\r\n isNeedClose={this.isShowHeader}\r\n fullscreen={this.fullscreen}\r\n showWorkspaceHistory={this.showWorkspaceHistory}\r\n botId=\"3022316191018884\"\r\n digitalId={this.digitalId}\r\n conversationId={this.conversationId}\r\n defaultQuery={this.defaultQuery}\r\n maxRecordingTime={this.maxRecordingTime}\r\n waitingTime={this.waitingTime}\r\n showCopyButton={this.showCopyButton}\r\n showFeedbackButtons={this.showFeedbackButtons}\r\n showEndInterviewButton={this.showEndInterviewButton}\r\n customInputs={{\r\n ...this.customInputs,\r\n file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,\r\n file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,\r\n job_info: this.customInputs?.job_info || this.jobDescription,\r\n question_number: this.customInputs?.question_number || 5\r\n }}\r\n interviewMode={this.interviewMode}\r\n ></pcm-app-chat-modal>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n );\r\n }\r\n} "],"version":3}
|
|
1
|
+
{"file":"pcm-mnms-modal.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,EAAE;;ACA1B,MAAM,SAAS,GAAG,i/MAAi/M;;ACAngN,MAAM,OAAO,GAAG,2wBAA2wB;;MCsB9wB,SAAS,GAAA,MAAA;;;;;;;;;;;;AAClB;;AAEG;IACK,UAAU,GAAW,MAAM;AAEnC;;AAEG;AAC2B,IAAA,KAAK;AAEnC;;AAEG;IACsB,MAAM,GAAY,KAAK;AAEhD;;AAEG;AACM,IAAA,WAAW;AAEpB;;AAEG;AACK,IAAA,IAAI;AAEZ;;AAEG;IACK,MAAM,GAAY,IAAI;AAE9B;;AAEG;IACK,YAAY,GAAY,IAAI;AAEpC;;AAEG;IACK,WAAW,GAAY,IAAI;AAEnC;;AAEG;AACsB,IAAA,cAAc;AAEvC;;AAEG;IACK,YAAY,GAAW,SAAS;AAExC;;AAEG;IACK,gBAAgB,GAAW,GAAG;AA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AAY,EAAE,IAAI,CAAC,YAAY,EAC/B,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAC/C,KAAK,EAAC,kBAAkB,EACxB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAC7C,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EACnD,YAAY,EAAE;gBACV,GAAG,IAAI,CAAC,YAAY;gBACpB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE,OAAO;gBACvE,SAAS,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,IAAI,IAAI,CAAC,gBAAgB,EAAE,SAAS;gBAC3E,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,IAAI,IAAI,CAAC,cAAc;AAC5D,gBAAA,eAAe,EAAE,IAAI,CAAC,YAAY,EAAE,eAAe,IAAI;AAC1D,aAAA,EACD,aAAa,EAAE,IAAI,CAAC,aAAa,EAAA,CACf,CACzB,CACC,CACT,CACC,CACJ;;;;;;;;;;;","names":["authStore","verifyApiKey","configStore","ErrorEventBus","Message","h"],"sources":["src/components/pcm-mnms-modal/pcm-mnms-modal.css?tag=pcm-mnms-modal&encapsulation=shadow","src/global/global.css?tag=pcm-mnms-modal&encapsulation=shadow","src/global/host.css?tag=pcm-mnms-modal&encapsulation=shadow","src/components/pcm-mnms-modal/pcm-mnms-modal.tsx"],"sourcesContent":["","/* 模态框基础样式 */\r\n.modal-overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n display: flex;\r\n z-index: 1000;\r\n overflow-y: auto;\r\n}\r\n\r\n/* 全屏模式下的overlay样式 - 改为基于父组件 */\r\n.fullscreen-overlay {\r\n padding: 0;\r\n background-color: rgba(0, 0, 0, 0.7);\r\n /* 改为基于父组件的全屏 */\r\n position: absolute;\r\n width: 100%;\r\n height: calc(100% - 10px);\r\n}\r\n\r\n.modal-container {\r\n background-color: #fff;\r\n border-radius: 8px;\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n position: relative;\r\n margin: auto;\r\n transition: all 0.3s ease-out;\r\n overflow: hidden;\r\n}\r\n\r\n/* 全屏模式样式 - 改为基于父组件 */\r\n.modal-container.fullscreen {\r\n width: 100%;\r\n max-width: none;\r\n height: 100%;\r\n border-radius: 0;\r\n margin: 0;\r\n display: flex;\r\n flex-direction: column;\r\n max-height: 100%;\r\n}\r\n\r\n/* PC端布局 */\r\n.pc-layout {\r\n width: 80%;\r\n max-width: 600px;\r\n min-width: 320px;\r\n}\r\n\r\n/* 响应式布局 */\r\n@media screen and (max-width: 768px) {\r\n .pc-layout {\r\n width: 95%;\r\n }\r\n\r\n .modal-overlay {\r\n padding: 10px 0px 0px 0px;\r\n }\r\n\r\n .modal-container.fullscreen {\r\n /* 移动端也基于父组件尺寸 */\r\n width: 100%;\r\n height: 100%;\r\n max-height: 100%;\r\n border-radius: 16px 16px 0 0;\r\n /* 保留安全区域支持 */\r\n padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);\r\n }\r\n}\r\n\r\n/* 模态框头部样式 */\r\n.modal-header {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: 4px 16px;\r\n height: 50px;\r\n border-bottom: 1px solid #e8e8e8;\r\n flex-shrink: 0;\r\n}\r\n\r\n.header-left {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n font-size: 16px;\r\n font-weight: 600;\r\n color: #333;\r\n}\r\n\r\n.header-icon {\r\n width: 24px;\r\n height: 24px;\r\n}\r\n\r\n.close-button {\r\n background: transparent;\r\n border: none;\r\n cursor: pointer;\r\n padding: 8px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 32px;\r\n height: 32px;\r\n border-radius: 4px;\r\n}\r\n\r\n.close-button:hover {\r\n background-color: rgba(0, 0, 0, 0.04);\r\n}\r\n\r\n.close-button span {\r\n font-size: 24px;\r\n line-height: 1;\r\n color: #999;\r\n}\r\n\r\n.close-button:hover span {\r\n color: #666;\r\n}\r\n\r\n\r\n/* 文件上传区域通用样式 */\r\n.upload-area {\r\n cursor: pointer;\r\n width: 100%;\r\n}\r\n\r\n\r\n.upload-placeholder {\r\n transition: all 0.3s ease;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.02);\r\n border: 1px dashed #d9d9d9;\r\n border-radius: 8px;\r\n cursor: pointer;\r\n}\r\n\r\n.upload-placeholder:hover {\r\n border: 1px dashed #1890ff;\r\n}\r\n\r\n.upload-placeholder img {\r\n margin-top: 8px;\r\n width: 50px;\r\n height: 50px;\r\n}\r\n\r\n.upload-placeholder .upload-text {\r\n margin: 4px 0;\r\n color: #332F39;\r\n font-size: 14px;\r\n}\r\n\r\n.upload-placeholder .upload-hint {\r\n font-size: 14px;\r\n color: #949AA5;\r\n margin-top: 8px;\r\n padding: 0px 10px;\r\n text-align: center;\r\n white-space: normal;\r\n word-wrap: break-word;\r\n word-break: break-all;\r\n line-height: 1.4;\r\n}\r\n\r\n\r\n/* 文件项样式 */\r\n.file-item {\r\n position: relative;\r\n padding: 16px;\r\n border: 1px solid #e2e8f0;\r\n border-radius: 8px;\r\n transition: border-color 0.3s;\r\n cursor: pointer;\r\n margin-bottom: 16px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n\r\n.file-item:hover {\r\n border-color: #0D75FB;\r\n}\r\n\r\n.file-item-content {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n flex: 1;\r\n min-width: 0;\r\n overflow: hidden;\r\n}\r\n\r\n.file-icon {\r\n color: #0D75FB;\r\n flex-shrink: 0;\r\n}\r\n\r\n.file-name {\r\n font-weight: 500;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n max-width: calc(100% - 50px);\r\n}\r\n\r\n.remove-file {\r\n background: transparent;\r\n border: none;\r\n color: #94a3b8;\r\n cursor: pointer;\r\n font-size: 18px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 4px;\r\n margin-left: 8px;\r\n border-radius: 4px;\r\n transition: all 0.2s;\r\n min-width: 30px;\r\n min-height: 30px;\r\n}\r\n\r\n.remove-file:hover {\r\n background-color: #f1f5f9;\r\n color: #475569;\r\n}\r\n\r\n.file-input {\r\n display: none;\r\n}\r\n\r\n\r\n\r\n/* 输入容器样式 */\r\n.input-container {\r\n padding: 20px;\r\n display: flex;\r\n flex-direction: column;\r\n height: calc(100% - 50px);\r\n background: linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;\r\n /* 减去header高度 */\r\n overflow-y: auto;\r\n}\r\n\r\n.input-container h3 {\r\n margin-top: 0;\r\n margin-bottom: 20px;\r\n font-size: 18px;\r\n color: #333;\r\n text-align: center;\r\n}\r\n\r\n/* JD输入区域样式 */\r\n.jd-input-section {\r\n margin-bottom: 20px;\r\n}\r\n\r\n.jd-input-section label {\r\n display: block;\r\n margin-bottom: 8px;\r\n font-weight: 500;\r\n color: #333;\r\n}\r\n\r\n.job-description-textarea {\r\n width: calc(100% - 16px);\r\n border: 1px solid #ddd;\r\n border-radius: 4px;\r\n resize: vertical;\r\n font-family: inherit;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n transition: border-color 0.3s;\r\n padding: 8px;\r\n}\r\n\r\n.job-description-textarea:focus {\r\n outline: none;\r\n border-color: #1890ff;\r\n box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);\r\n}\r\n\r\n/* 简历上传区域样式 */\r\n.resume-upload-section {\r\n margin-bottom: 20px;\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.resume-upload-section label {\r\n display: block;\r\n margin-bottom: 8px;\r\n font-weight: 500;\r\n color: #333;\r\n}\r\n\r\n/* 面试设置区域 */\r\n.interview-settings-section {\r\n margin-bottom: 24px;\r\n padding: 20px;\r\n background-color: #f8f9fa;\r\n border-radius: 8px;\r\n border: 1px solid #e9ecef;\r\n}\r\n\r\n.settings-row {\r\n margin-bottom: 20px;\r\n}\r\n\r\n.settings-row:last-child {\r\n margin-bottom: 0;\r\n}\r\n\r\n.settings-label {\r\n display: block;\r\n font-weight: 500;\r\n color: #333;\r\n margin-bottom: 12px;\r\n font-size: 14px;\r\n}\r\n\r\n/* 题目数量滑块样式 */\r\n.question-number-section {\r\n width: 100%;\r\n}\r\n\r\n.slider-container {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\r\n}\r\n\r\n.question-slider {\r\n flex: 1;\r\n height: 6px;\r\n background: #ddd;\r\n outline: none;\r\n border-radius: 3px;\r\n -webkit-appearance: none;\r\n appearance: none;\r\n}\r\n\r\n.question-slider::-webkit-slider-thumb {\r\n -webkit-appearance: none;\r\n appearance: none;\r\n width: 20px;\r\n height: 20px;\r\n background: #0D75FB;\r\n cursor: pointer;\r\n border-radius: 50%;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.question-slider::-moz-range-thumb {\r\n width: 20px;\r\n height: 20px;\r\n background: #0D75FB;\r\n cursor: pointer;\r\n border-radius: 50%;\r\n border: none;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.slider-value {\r\n font-weight: 600;\r\n color: #0D75FB;\r\n font-size: 14px;\r\n min-width: 30px;\r\n text-align: center;\r\n}\r\n\r\n/* 开关样式 */\r\n.analysis-toggle-section {\r\n width: 100%;\r\n}\r\n\r\n.toggle-container {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\r\n}\r\n\r\n.toggle-switch {\r\n position: relative;\r\n display: inline-block;\r\n width: 44px;\r\n height: 24px;\r\n}\r\n\r\n.toggle-switch input {\r\n opacity: 0;\r\n width: 0;\r\n height: 0;\r\n}\r\n\r\n.toggle-slider {\r\n position: absolute;\r\n cursor: pointer;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: #ccc;\r\n transition: 0.3s;\r\n border-radius: 24px;\r\n}\r\n\r\n.toggle-slider:before {\r\n position: absolute;\r\n content: \"\";\r\n height: 18px;\r\n width: 18px;\r\n left: 3px;\r\n bottom: 3px;\r\n background-color: white;\r\n transition: 0.3s;\r\n border-radius: 50%;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\ninput:checked + .toggle-slider {\r\n background-color: #0D75FB;\r\n}\r\n\r\ninput:checked + .toggle-slider:before {\r\n transform: translateX(20px);\r\n}\r\n\r\n.toggle-text {\r\n font-size: 14px;\r\n color: #666;\r\n font-weight: 500;\r\n}\r\n\r\n/* 提交按钮通用样式 */\r\n.submit-button {\r\n margin-top: 10px;\r\n padding: 10px 30px;\r\n background: #0D75FB;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n font-size: 16px;\r\n cursor: pointer;\r\n transition: all 0.3s ease;\r\n width: 100%;\r\n max-width: 400px;\r\n align-self: center;\r\n}\r\n\r\n.submit-button:hover {\r\n background-color: #40a9ff;\r\n}\r\n\r\n.submit-button:disabled {\r\n background-color: rgba(0,0,0,0.04);\r\n color: rgba(0,0,0,0.25);\r\n cursor: not-allowed;\r\n}\r\n\r\n\r\n\r\n/* AI免责声明和备案信息样式 */\r\n.ai-disclaimer {\r\n margin-top: 16px;\r\n text-align: center;\r\n font-size: 12px;\r\n color: #999;\r\n line-height: 1.5;\r\n}\r\n\r\n.ai-disclaimer p {\r\n margin: 4px 0;\r\n}\r\n\r\n.beian-info {\r\n display: flex;\r\n justify-content: center;\r\n flex-wrap: wrap;\r\n gap: 4px;\r\n}\r\n\r\n.ai-disclaimer a {\r\n color: #666;\r\n text-decoration: none;\r\n transition: color 0.2s ease;\r\n}\r\n\r\n.ai-disclaimer a:hover {\r\n color: #1890ff;\r\n text-decoration: underline;\r\n}\r\n\r\n/* 添加加载状态的样式 */\r\n.loading-container {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n height: 100%;\r\n padding: 24px;\r\n }\r\n \r\n .loading-spinner {\r\n width: 40px;\r\n height: 40px;\r\n border: 4px solid rgba(0, 0, 0, 0.1);\r\n border-radius: 50%;\r\n border-top-color: var(--pcm-primary-color, #1890ff);\r\n animation: spin 1s linear infinite;\r\n margin-bottom: 16px;\r\n }\r\n \r\n .loading-text {\r\n font-size: 16px;\r\n color: var(--pcm-text-color, #333);\r\n }\r\n \r\n @keyframes spin {\r\n 0% { transform: rotate(0deg); }\r\n 100% { transform: rotate(360deg); }\r\n }\r\n \r\n ",":host {\r\n /* 字体相关属性 */\r\n font-size: 16px;\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\r\n font-weight: normal;\r\n font-style: normal;\r\n font-variant: normal;\r\n line-height: 1.5;\r\n letter-spacing: normal;\r\n word-spacing: normal;\r\n \r\n /* 文本相关属性 */\r\n color: #333; /* 重置文字颜色,避免继承外部的red */\r\n text-align: left;\r\n text-indent: 0;\r\n text-transform: none;\r\n white-space: normal;\r\n word-wrap: normal;\r\n word-break: normal;\r\n \r\n /* 可见性 */\r\n visibility: visible;\r\n \r\n /* 列表相关 */\r\n list-style: none;\r\n list-style-image: none;\r\n list-style-position: outside;\r\n list-style-type: disc;\r\n \r\n /* 表格相关 */\r\n border-collapse: separate;\r\n border-spacing: 0;\r\n caption-side: top;\r\n empty-cells: show;\r\n table-layout: auto;\r\n \r\n /* 引用 */\r\n quotes: auto;\r\n \r\n /* 光标 */\r\n cursor: auto;\r\n \r\n /* 文本方向 */\r\n direction: ltr;\r\n \r\n /* 打印相关 */\r\n orphans: 2;\r\n widows: 2;\r\n page-break-inside: auto;\r\n \r\n /* 其他可能被继承的属性 */\r\n text-decoration: none;\r\n text-shadow: none;\r\n \r\n /* 确保组件有独立的盒模型 */\r\n box-sizing: border-box;\r\n \r\n /* 重置一些可能影响布局的继承属性 */\r\n writing-mode: horizontal-tb;\r\n text-orientation: mixed;\r\n}","import { Component, Prop, h, State, Element, Event, EventEmitter, Watch } from '@stencil/core';\r\nimport { FileUploadResponse, verifyApiKey } from '../../utils/utils';\r\nimport {\r\n StreamCompleteEventData,\r\n ConversationStartEventData,\r\n InterviewCompleteEventData,\r\n RecordingErrorEventData,\r\n} from '../../interfaces/events';\r\nimport { ErrorEventBus, ErrorEventDetail } from '../../utils/error-event';\r\nimport { authStore } from '../../../store/auth.store';\r\nimport { configStore } from '../../../store/config.store';\r\nimport { Message } from '../../services/message.service';\r\n\r\n/**\r\n * 模拟面试(求职)\r\n */\r\n\r\n@Component({\r\n tag: 'pcm-mnms-modal',\r\n styleUrls: ['pcm-mnms-modal.css', '../../global/global.css', '../../global/host.css'],\r\n shadow: true,\r\n})\r\nexport class MnmsModal {\r\n /**\r\n * 模态框标题\r\n */\r\n @Prop() modalTitle: string = '模拟面试';\r\n\r\n /**\r\n * SDK鉴权密钥\r\n */\r\n @Prop({ attribute: 'token' }) token!: string;\r\n\r\n /**\r\n * 是否显示聊天模态框\r\n */\r\n @Prop({ mutable: true }) isOpen: boolean = false;\r\n\r\n /**\r\n * 当点击模态框关闭时触发\r\n */\r\n @Event() modalClosed: EventEmitter<void>;\r\n\r\n /**\r\n * 应用图标URL\r\n */\r\n @Prop() icon?: string;\r\n\r\n /**\r\n * 聊天框的页面层级\r\n */\r\n @Prop() zIndex?: number = 1000;\r\n\r\n /**\r\n * 是否展示顶部标题栏\r\n */\r\n @Prop() isShowHeader: boolean = true;\r\n\r\n /**\r\n * 是否展示右上角的关闭按钮\r\n */\r\n @Prop() isNeedClose: boolean = true;\r\n\r\n /**\r\n * 会话ID,传入继续对话,否则创建新会话\r\n */\r\n @Prop({ mutable: true }) conversationId?: string;\r\n\r\n /**\r\n * 默认查询文本\r\n */\r\n @Prop() defaultQuery: string = '请开始模拟面试';\r\n\r\n /**\r\n * 视频录制最大时长(秒)默认120\r\n */\r\n @Prop() maxRecordingTime: number = 120;\r\n\r\n /**\r\n * 等待录制时间(秒)默认10\r\n */\r\n @Prop() waitingTime: number = 10;\r\n\r\n /**\r\n * 是否以全屏模式打开,移动端建议设置为true\r\n */\r\n @Prop() fullscreen: boolean = false;\r\n\r\n /**\r\n * 自定义输入参数,可传入以下参数:<br>\r\n * customInputs.job_info时,会隐藏JD输入区域。<br>\r\n * customInputs.file_url或customInputs.resume_content时,会隐藏简历上传区域。<br>\r\n * customInputs.file_url(或customInputs.resume_content)和customInputs.job_info时,会直接开始聊天。<br>\r\n * customInputs.resume_content:可传入json字符串,或纯文本字符串,字符串内容为简历内容。<br>\r\n * customInputs.url_callback:可传入url字符串,当报告生成后,会调用该url进行回调。该url请使用post请求,接收报告字段为report_content,会话id字段为conversation_id。<br>\r\n * customInputs.question_number时,会设置面试题总数量, 默认5题。<br>\r\n * customInputs.question_list:可传入字符串数组形式的JSON字符串,自定义面试问题列表。<br>\r\n */\r\n @Prop() customInputs: Record<string, string> = {};\r\n\r\n /**\r\n * 是否显示工作区历史会话按钮\r\n */\r\n @Prop() showWorkspaceHistory: boolean = false;\r\n\r\n /**\r\n * 是否开启移动端上传JD(仅PC端生效)\r\n */\r\n @Prop() mobileJdInputAble: boolean = false;\r\n\r\n /**\r\n * 是否开启移动端上传简历(仅PC端生效)\r\n */\r\n @Prop() mobileUploadAble: boolean = false;\r\n\r\n /**\r\n * 虚拟数字人ID,指定则开启虚拟数字人功能</br>\r\n * 智琪:79202506752 </br>\r\n * 艾綝:79402522624 </br>\r\n * 艾姮:79597885440 </br>\r\n */\r\n @Prop() digitalId?: string;\r\n\r\n /**\r\n * 数字人开场白索引,用于选择开场白和开场视频(可选:0, 1, 2)\r\n * 0、您好,我是聘才猫 AI 面试助手。很高兴为你主持这场面试!在开始前,请确保:身处安静、光线充足的环境。网络顺畅,摄像头和麦克风工作正常。现在我正在查看本次面试的相关信息,为您生成专属面试题,马上就好,请稍等片刻。</br>\r\n * 1、您好,我是您的 AI 面试助手。欢迎参加本次AI面试!为了获得最佳效果,请确认:您在安静、明亮的环境中。您的网络稳定,摄像头和麦克风已开启。我们正在后台为您准备本次专属面试内容,很快开始,请稍候。<br>\r\n * 2、您好,我是您的 AI 面试助手。面试马上开始。趁此片刻,请快速确认:周围安静吗?光线足够吗?网络没问题?摄像头和麦克风准备好了吗?我们正在为您加载个性化的面试环节,稍等就好!\r\n */\r\n @Prop() openingIndex: number = 0;\r\n\r\n /**\r\n * 是否启用全屏数字人模式,此模式下面试报告只会通过url_callback回调返回\r\n */\r\n @Prop() enableVirtualHuman: boolean = false;\r\n\r\n /**\r\n * 是否显示结束面试按钮\r\n */\r\n @Prop() showEndInterviewButton: boolean = false;\r\n\r\n\r\n /**\r\n * 上传成功事件\r\n */\r\n @Event() uploadSuccess: EventEmitter<FileUploadResponse>;\r\n\r\n /**\r\n * 流式输出完成事件\r\n */\r\n @Event() streamComplete: EventEmitter<StreamCompleteEventData>;\r\n\r\n /**\r\n * 新会话开始的回调,只会在一轮对话开始时触发一次\r\n */\r\n @Event() conversationStart: EventEmitter<ConversationStartEventData>;\r\n\r\n /**\r\n * 当聊天完成时触发\r\n */\r\n @Event() interviewComplete: EventEmitter<InterviewCompleteEventData>;\r\n\r\n /**\r\n * SDK密钥验证失败事件\r\n */\r\n @Event() tokenInvalid: EventEmitter<void>;\r\n\r\n /**\r\n * 错误事件\r\n */\r\n @Event() someErrorEvent: EventEmitter<ErrorEventDetail>;\r\n\r\n\r\n /**\r\n * 面试模式:text - 文本模式,video - 视频模式\r\n */\r\n @Prop() interviewMode: 'text' | 'video' = 'text';\r\n\r\n /**\r\n * 录制错误事件\r\n */\r\n @Event() recordingError: EventEmitter<RecordingErrorEventData>;\r\n\r\n /**\r\n * 是否显示复制按钮\r\n */\r\n @Prop() showCopyButton: boolean = true;\r\n\r\n /**\r\n * 是否显示点赞点踩按钮\r\n */\r\n @Prop() showFeedbackButtons: boolean = true;\r\n\r\n\r\n @State() selectedFile: File | null = null;\r\n @State() isUploading: boolean = false;\r\n @State() uploadedFileInfo: FileUploadResponse | null = null;\r\n @State() showChatModal: boolean = false;\r\n\r\n // 使用 @Element 装饰器获取组件的 host 元素\r\n @Element() hostElement: HTMLElement;\r\n\r\n @State() jobDescription: string = '';\r\n @State() isSubmitting: boolean = false;\r\n\r\n private tokenInvalidListener: () => void;\r\n private removeErrorListener: () => void;\r\n\r\n // 添加对子组件的引用\r\n private virtualChatModalRef: HTMLPcmVirtualChatModalElement | null = null;\r\n\r\n @Watch('token')\r\n handleTokenChange(newToken: string) {\r\n // 当传入的 token 变化时,更新 authStore 中的 token\r\n if (newToken && newToken !== authStore.getToken()) {\r\n authStore.setToken(newToken);\r\n }\r\n }\r\n\r\n\r\n @Watch('isOpen')\r\n async handleIsOpenChange(newValue: boolean) {\r\n if (!newValue) {\r\n // 当模态框关闭时,调用子组件方法停止所有活动\r\n if (this.virtualChatModalRef) {\r\n await this.virtualChatModalRef.setComponentActive(false);\r\n }\r\n // 重置状态\r\n this.resetState();\r\n } else {\r\n if (this.customInputs && this.customInputs.job_info) {\r\n this.jobDescription = this.customInputs.job_info;\r\n }\r\n\r\n await verifyApiKey(this.token);\r\n\r\n // 如果同时有 file_url 和 job_info,或者有会话ID,直接显示聊天模态框\r\n if (((this.customInputs?.file_url || this.customInputs?.resume_content) && this.customInputs?.job_info) || this.conversationId) {\r\n this.showChatModal = true;\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n componentWillLoad() {\r\n // 将 zIndex 存入配置缓存\r\n if (this.zIndex) {\r\n configStore.setItem('modal-zIndex', this.zIndex);\r\n }\r\n\r\n if (this.token) {\r\n authStore.setToken(this.token);\r\n }\r\n\r\n verifyApiKey(this.token);\r\n\r\n // 添加全局token无效事件监听器\r\n this.tokenInvalidListener = () => {\r\n this.tokenInvalid.emit();\r\n };\r\n\r\n // 添加全局错误监听\r\n this.removeErrorListener = ErrorEventBus.addErrorListener((errorDetail) => {\r\n this.someErrorEvent.emit(errorDetail);\r\n });\r\n\r\n document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);\r\n }\r\n\r\n disconnectedCallback() {\r\n // 组件销毁时移除事件监听器\r\n document.removeEventListener('pcm-token-invalid', this.tokenInvalidListener);\r\n // 移除错误监听器\r\n if (this.removeErrorListener) {\r\n this.removeErrorListener();\r\n }\r\n }\r\n\r\n /**\r\n * 重置组件状态\r\n */\r\n private resetState() {\r\n this.showChatModal = false;\r\n this.jobDescription = '';\r\n this.isSubmitting = false;\r\n this.selectedFile = null;\r\n this.isUploading = false;\r\n this.uploadedFileInfo = null;\r\n }\r\n\r\n private handleClose = () => {\r\n this.modalClosed.emit();\r\n };\r\n\r\n private handleJobDescriptionChange = (event: Event) => {\r\n const textarea = event.target as HTMLTextAreaElement;\r\n this.jobDescription = textarea.value;\r\n };\r\n\r\n private handleStartInterview = async () => {\r\n // 如果没有预设的job_info,则需要检查用户输入\r\n if (!this.customInputs?.job_info && !this.jobDescription.trim()) {\r\n alert('请输入职位描述');\r\n return;\r\n }\r\n // 判断文件是否正在上传\r\n if (await this.pcmUploadRef?.getIsUploading?.()) {\r\n Message.info('文件上传中,请稍后');\r\n return;\r\n }\r\n this.isSubmitting = true;\r\n this.showChatModal = true;\r\n };\r\n\r\n private pcmUploadRef;\r\n\r\n render() {\r\n if (!this.isOpen) return null;\r\n\r\n const modalStyle = {\r\n zIndex: String(this.zIndex)\r\n };\r\n\r\n\r\n const containerClass = {\r\n 'modal-container': true,\r\n 'fullscreen': this.fullscreen,\r\n 'pc-layout': true,\r\n };\r\n\r\n const overlayClass = {\r\n 'modal-overlay': true,\r\n 'fullscreen-overlay': this.fullscreen\r\n };\r\n\r\n // 显示加载状态\r\n const isLoading = this.conversationId && !this.showChatModal;\r\n\r\n // 修正这里的逻辑,确保当 customInputs.job_info 存在时,hideJdInput 为 true\r\n const hideJdInput = Boolean(this.customInputs && this.customInputs.job_info);\r\n\r\n // 判断是否隐藏简历上传区域 - 当有file_url或resume_content时都隐藏\r\n const hideResumeUpload = Boolean(this.customInputs && (this.customInputs.file_url || this.customInputs.resume_content));\r\n\r\n // 判断是否同时提供了(file_url或resume_content)和job_info\r\n const hasFileAndJob = Boolean((this.customInputs?.file_url || this.customInputs?.resume_content) && this.customInputs?.job_info);\r\n\r\n return (\r\n <div class={overlayClass} style={modalStyle}>\r\n <div class={containerClass}>\r\n {this.isShowHeader && (\r\n <div class=\"modal-header\">\r\n <div class=\"header-left\">\r\n {this.icon && <img src={this.icon} class=\"header-icon\" alt=\"应用图标\" />}\r\n <div>{this.modalTitle}</div>\r\n </div>\r\n {this.isNeedClose && (\r\n <button class=\"close-button\" onClick={this.handleClose}>\r\n <span>×</span>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n\r\n {/* 上传界面 - 仅在不显示聊天模态框且没有会话ID且没有同时提供file_url和job_info时显示 */}\r\n {!this.showChatModal && !this.conversationId && !hasFileAndJob && (\r\n <div class=\"input-container\">\r\n {/* JD输入区域 - 仅在没有customInputs.job_info时显示 */}\r\n {!hideJdInput && (\r\n <div class=\"jd-input-section\">\r\n <label htmlFor=\"job-description\">请输入职位描述 (JD)</label>\r\n {\r\n !!this.mobileJdInputAble && (\r\n <pcm-mobile-input-btn\r\n name=\"职位描述\"\r\n onOk={(e) => {\r\n this.jobDescription = e.detail;\r\n }}\r\n />\r\n )\r\n }\r\n <textarea\r\n id=\"job-description\"\r\n class=\"job-description-textarea\"\r\n placeholder=\"请输入职位描述,包括职责、要求等信息...\"\r\n rows={6}\r\n value={this.jobDescription}\r\n onInput={this.handleJobDescriptionChange}\r\n ></textarea>\r\n </div>\r\n )}\r\n\r\n {/* 简历上传区域 - 仅在没有customInputs.file_url或customInputs.resume_content时显示 */}\r\n {\r\n !hideResumeUpload && (\r\n <div class=\"jd-input-section\">\r\n <label>上传简历(选填)</label>\r\n <pcm-upload\r\n ref={el => this.pcmUploadRef = el}\r\n maxFileSize={15 * 1024 * 1024}\r\n multiple={false}\r\n mobileUploadAble={this.mobileUploadAble}\r\n acceptFileSuffixList={['.txt', '.md', '.pdf', '.docx', '.doc']}\r\n uploadParams={{\r\n tags: ['resume'],\r\n }}\r\n onUploadChange={(e) => {\r\n const result: FileUploadResponse[] = e.detail ?? [];\r\n this.uploadedFileInfo = result[0];\r\n this.uploadSuccess.emit(this.uploadedFileInfo);\r\n }}\r\n />\r\n </div>\r\n )\r\n }\r\n\r\n <button\r\n class=\"submit-button\"\r\n disabled={(!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting}\r\n onClick={this.handleStartInterview}\r\n >\r\n {this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始面试'}\r\n </button>\r\n\r\n <div class=\"ai-disclaimer\">\r\n <p>所有内容均由AI生成仅供参考</p>\r\n <p class=\"beian-info\">\r\n <span>中央网信办生成式人工智能服务备案号</span>:\r\n <a href=\"https://www.pincaimao.com\" target=\"_blank\" rel=\"noopener noreferrer\">Hunan-PinCaiMao-202412310003</a>\r\n </p>\r\n </div>\r\n </div>\r\n )}\r\n\r\n {/* 加载状态 - 在有会话ID但聊天模态框尚未显示时展示 */}\r\n {isLoading && (\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n <p class=\"loading-text\">正在加载对话...</p>\r\n </div>\r\n )}\r\n\r\n {/* 聊天界面 - 在显示聊天模态框时显示 */}\r\n {this.showChatModal && (\r\n <div >\r\n {this.enableVirtualHuman && this.digitalId ? (\r\n <pcm-virtual-chat-modal\r\n ref={el => this.virtualChatModalRef = el}\r\n isOpen={true}\r\n fullscreen={this.fullscreen}\r\n botId=\"3022316191018884\"\r\n digitalId={this.digitalId}\r\n openingIndex={this.openingIndex}\r\n conversationId={this.conversationId}\r\n defaultQuery={this.defaultQuery}\r\n waitingTime={this.waitingTime}\r\n showEndInterviewButton={this.showEndInterviewButton}\r\n customInputs={{\r\n ...this.customInputs,\r\n file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,\r\n file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,\r\n job_info: this.customInputs?.job_info || this.jobDescription,\r\n question_number: this.customInputs?.question_number || 5,\r\n interview_type: this.digitalId\r\n }}\r\n ></pcm-virtual-chat-modal>\r\n ) : (\r\n <pcm-app-chat-modal\r\n isOpen={true}\r\n modalTitle={this.modalTitle}\r\n icon={this.icon}\r\n isShowHeader={this.isShowHeader}\r\n isNeedClose={this.isShowHeader}\r\n fullscreen={this.fullscreen}\r\n showWorkspaceHistory={this.showWorkspaceHistory}\r\n botId=\"3022316191018884\"\r\n digitalId={this.digitalId}\r\n conversationId={this.conversationId}\r\n defaultQuery={this.defaultQuery}\r\n maxRecordingTime={this.maxRecordingTime}\r\n waitingTime={this.waitingTime}\r\n showCopyButton={this.showCopyButton}\r\n showFeedbackButtons={this.showFeedbackButtons}\r\n showEndInterviewButton={this.showEndInterviewButton}\r\n customInputs={{\r\n ...this.customInputs,\r\n file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,\r\n file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,\r\n job_info: this.customInputs?.job_info || this.jobDescription,\r\n question_number: this.customInputs?.question_number || 5\r\n }}\r\n interviewMode={this.interviewMode}\r\n ></pcm-app-chat-modal>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n );\r\n }\r\n} "],"version":3}
|