正在显示
24 个修改的文件
包含
894 行增加
和
423 行删除
| @@ -20,6 +20,7 @@ import { handle as zuotangHandler } from "../../zuotang"; | @@ -20,6 +20,7 @@ import { handle as zuotangHandler } from "../../zuotang"; | ||
| 20 | //20250328新增PPT API | 20 | //20250328新增PPT API |
| 21 | import { handle as docmeeHandler } from "../../docmee"; | 21 | import { handle as docmeeHandler } from "../../docmee"; |
| 22 | import { handle as generateImgHandler } from "../../generateImg"; | 22 | import { handle as generateImgHandler } from "../../generateImg"; |
| 23 | +import { handle as tencentCosHandler } from "../../tencentCos"; | ||
| 23 | 24 | ||
| 24 | async function handle( | 25 | async function handle( |
| 25 | req: NextRequest, | 26 | req: NextRequest, |
| @@ -63,6 +64,8 @@ async function handle( | @@ -63,6 +64,8 @@ async function handle( | ||
| 63 | return docmeeHandler(req, { params }); | 64 | return docmeeHandler(req, { params }); |
| 64 | case ApiPath.OpenAiImg: | 65 | case ApiPath.OpenAiImg: |
| 65 | return generateImgHandler(req, { params }); | 66 | return generateImgHandler(req, { params }); |
| 67 | + case ApiPath.TencentCos: | ||
| 68 | + return tencentCosHandler(req, { params }); | ||
| 66 | default: | 69 | default: |
| 67 | return proxyHandler(req, { params }); | 70 | return proxyHandler(req, { params }); |
| 68 | } | 71 | } |
app/api/tencentCos.ts
0 → 100644
| 1 | +import { NextRequest, NextResponse } from "next/server"; | ||
| 2 | + | ||
| 3 | +export async function handle( | ||
| 4 | + req: NextRequest, | ||
| 5 | + { params }: { params: { path: string[] } }, | ||
| 6 | +) { | ||
| 7 | + return NextResponse.json( | ||
| 8 | + { | ||
| 9 | + success: true, | ||
| 10 | + data: { | ||
| 11 | + msg: "success", | ||
| 12 | + }, | ||
| 13 | + }, | ||
| 14 | + { status: 200 }, | ||
| 15 | + ); | ||
| 16 | +} |
| @@ -75,14 +75,14 @@ export async function handle( | @@ -75,14 +75,14 @@ export async function handle( | ||
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | // 准备API请求 | 77 | // 准备API请求 |
| 78 | - const imageFile = formData.get("image_file"); | ||
| 79 | - if (!(imageFile instanceof Blob)) { | ||
| 80 | - return createErrorResponse("无效图片文件", 400); | 78 | + const imageFile = formData.get("image_url"); |
| 79 | + if (!imageFile) { | ||
| 80 | + return createErrorResponse("缺少请求参数", 400); | ||
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | const headers = new Headers({ "X-API-KEY": config.bgRemovalApiKey }); | 83 | const headers = new Headers({ "X-API-KEY": config.bgRemovalApiKey }); |
| 84 | const newFormData = new FormData(); | 84 | const newFormData = new FormData(); |
| 85 | - newFormData.append("image_file", imageFile); | 85 | + newFormData.append("image_url", imageFile); |
| 86 | 86 | ||
| 87 | if (subPath === "visual/r-background") { | 87 | if (subPath === "visual/r-background") { |
| 88 | newFormData.append("batch_size", "1"); | 88 | newFormData.append("batch_size", "1"); |
| @@ -3,14 +3,16 @@ import { IconButton } from "../button"; | @@ -3,14 +3,16 @@ import { IconButton } from "../button"; | ||
| 3 | import styles from "./bg-removal-panel.module.scss"; | 3 | import styles from "./bg-removal-panel.module.scss"; |
| 4 | import { useState } from "react"; | 4 | import { useState } from "react"; |
| 5 | import { message } from "antd"; | 5 | import { message } from "antd"; |
| 6 | -import type { LocalData, FileProps } from "@/app/types/zuotang"; | ||
| 7 | -import { ApiPath } from "@/app/constant"; | 6 | +import type { LocalData, PanelProps } from "@/app/types/zuotang"; |
| 7 | +import { ApiPath, Path } from "@/app/constant"; | ||
| 8 | import { useAccessStore } from "@/app/store"; | 8 | import { useAccessStore } from "@/app/store"; |
| 9 | import Locale from "@/app/locales"; | 9 | import Locale from "@/app/locales"; |
| 10 | import LoadingIcon from "@/app/icons/three-dots.svg"; | 10 | import LoadingIcon from "@/app/icons/three-dots.svg"; |
| 11 | import WriteIcon from "@/app/icons/write.svg"; | 11 | import WriteIcon from "@/app/icons/write.svg"; |
| 12 | import { useChatStore } from "@/app/store"; | 12 | import { useChatStore } from "@/app/store"; |
| 13 | import { getBgPrompt } from "@/app/utils/prompt"; | 13 | import { getBgPrompt } from "@/app/utils/prompt"; |
| 14 | +import { cosUploadImage } from "@/app/utils/tencentCos"; | ||
| 15 | +import { getFileByUrl } from "@/app/utils/fileUtil"; | ||
| 14 | 16 | ||
| 15 | // 错误消息映射函数 | 17 | // 错误消息映射函数 |
| 16 | const getErrorMessage = (state: number): string => { | 18 | const getErrorMessage = (state: number): string => { |
| @@ -29,7 +31,8 @@ const getErrorMessage = (state: number): string => { | @@ -29,7 +31,8 @@ const getErrorMessage = (state: number): string => { | ||
| 29 | const urlToBlob = async (url: string): Promise<Blob> => { | 31 | const urlToBlob = async (url: string): Promise<Blob> => { |
| 30 | const response = await fetch(url); | 32 | const response = await fetch(url); |
| 31 | if (!response.ok) throw new Error(Locale.BgRemoval.error.imgLoadingErr); | 33 | if (!response.ok) throw new Error(Locale.BgRemoval.error.imgLoadingErr); |
| 32 | - return await response.blob(); | 34 | + const blob = await response.blob(); |
| 35 | + return blob; | ||
| 33 | }; | 36 | }; |
| 34 | 37 | ||
| 35 | // 通用轮询函数 | 38 | // 通用轮询函数 |
| @@ -278,21 +281,14 @@ const PromptListComponent: React.FC<PromptListProps> = ({ | @@ -278,21 +281,14 @@ const PromptListComponent: React.FC<PromptListProps> = ({ | ||
| 278 | ); | 281 | ); |
| 279 | }; | 282 | }; |
| 280 | 283 | ||
| 281 | -export function BgPanel(props: FileProps) { | 284 | +export function BgPanel(props: PanelProps) { |
| 282 | const [prompt, setPrompt] = useState(""); //背景提示词 | 285 | const [prompt, setPrompt] = useState(""); //背景提示词 |
| 283 | const [promptList, setPromptList] = useState<string[]>([]); //背景提示词优化列表 | 286 | const [promptList, setPromptList] = useState<string[]>([]); //背景提示词优化列表 |
| 284 | const [isGenerate, setIsGenerate] = useState(false); | 287 | const [isGenerate, setIsGenerate] = useState(false); |
| 285 | const [sceneTypeList, setSceneTypeList] = useState([]); | 288 | const [sceneTypeList, setSceneTypeList] = useState([]); |
| 286 | const chatStore = useChatStore(); | 289 | const chatStore = useChatStore(); |
| 287 | const [loading, setLoading] = useState(false); //是否优化文案 | 290 | const [loading, setLoading] = useState(false); //是否优化文案 |
| 288 | - const { | ||
| 289 | - previewUrl, | ||
| 290 | - setPreviewUrl, | ||
| 291 | - fileData, | ||
| 292 | - setFileData, | ||
| 293 | - isLoading, | ||
| 294 | - setIsLoading, | ||
| 295 | - } = props; | 291 | + const { previewUrl, setPreviewUrl, isLoading, setIsLoading } = props; |
| 296 | const accessStore = useAccessStore(); | 292 | const accessStore = useAccessStore(); |
| 297 | const { pollTask } = useTaskPoller(); | 293 | const { pollTask } = useTaskPoller(); |
| 298 | const { updateLocalUsage, getLocalData } = useLocalStorage(); | 294 | const { updateLocalUsage, getLocalData } = useLocalStorage(); |
| @@ -312,13 +308,21 @@ export function BgPanel(props: FileProps) { | @@ -312,13 +308,21 @@ export function BgPanel(props: FileProps) { | ||
| 312 | throw new Error(errorData.message || Locale.BgRemoval.error.reqErr); | 308 | throw new Error(errorData.message || Locale.BgRemoval.error.reqErr); |
| 313 | } | 309 | } |
| 314 | const responseData = await res.json(); | 310 | const responseData = await res.json(); |
| 315 | - // 获取新图片的Blob | ||
| 316 | - const newBlob = await urlToBlob(responseData.data.data[0].url); | ||
| 317 | - // 创建新的对象URL | ||
| 318 | - const newUrl = URL.createObjectURL(newBlob); | ||
| 319 | - // 同步更新所有相关状态 | ||
| 320 | - setPreviewUrl(newUrl); | ||
| 321 | - setFileData(newBlob); | 311 | + setPreviewUrl(responseData.data.data[0].url); |
| 312 | + //异步上传保存图片 | ||
| 313 | + setTimeout(async () => { | ||
| 314 | + try { | ||
| 315 | + const file: File = await getFileByUrl(responseData.data.data[0].url); | ||
| 316 | + const imageUrl = await cosUploadImage(file, Path.BgRemoval); | ||
| 317 | + setPreviewUrl( | ||
| 318 | + imageUrl.startsWith("https://") ? imageUrl : `https://${imageUrl}`, | ||
| 319 | + ); | ||
| 320 | + } catch (error) { | ||
| 321 | + console.log(error); | ||
| 322 | + | ||
| 323 | + message.error(Locale.ComError.UploadErr); | ||
| 324 | + } | ||
| 325 | + }, 0); | ||
| 322 | } catch (error) { | 326 | } catch (error) { |
| 323 | message.error(Locale.BgRemoval.error.reqErr); | 327 | message.error(Locale.BgRemoval.error.reqErr); |
| 324 | } finally { | 328 | } finally { |
| @@ -345,7 +349,7 @@ export function BgPanel(props: FileProps) { | @@ -345,7 +349,7 @@ export function BgPanel(props: FileProps) { | ||
| 345 | const localData = getLocalData(accessStore.accessCode); // 获取本地数据 | 349 | const localData = getLocalData(accessStore.accessCode); // 获取本地数据 |
| 346 | formData.append("accessCode", accessStore.accessCode); | 350 | formData.append("accessCode", accessStore.accessCode); |
| 347 | formData.append("localData", JSON.stringify(localData)); | 351 | formData.append("localData", JSON.stringify(localData)); |
| 348 | - formData.append("image_file", fileData as Blob); | 352 | + formData.append("image_url", previewUrl); |
| 349 | if (endpoint === "visual/r-background") { | 353 | if (endpoint === "visual/r-background") { |
| 350 | formData.append("prompt", prompt); | 354 | formData.append("prompt", prompt); |
| 351 | } //生成背景添加提示词 | 355 | } //生成背景添加提示词 |
| @@ -380,14 +384,25 @@ export function BgPanel(props: FileProps) { | @@ -380,14 +384,25 @@ export function BgPanel(props: FileProps) { | ||
| 380 | endpoint, | 384 | endpoint, |
| 381 | async (data) => { | 385 | async (data) => { |
| 382 | try { | 386 | try { |
| 383 | - // 获取新图片的Blob | ||
| 384 | - const newBlob = await urlToBlob(data.image || data.image_1); | ||
| 385 | - // 创建新的对象URL | ||
| 386 | - const newUrl = URL.createObjectURL(newBlob); | ||
| 387 | - // 同步更新所有相关状态 | ||
| 388 | - setPreviewUrl(newUrl); | ||
| 389 | - setFileData(newBlob); | 387 | + setPreviewUrl(data.image || data.image_1); |
| 390 | message.success(Locale.BgRemoval.success); | 388 | message.success(Locale.BgRemoval.success); |
| 389 | + //异步上传保存图片 | ||
| 390 | + setTimeout(async () => { | ||
| 391 | + try { | ||
| 392 | + const file: File = await getFileByUrl( | ||
| 393 | + data.image || data.image_1, | ||
| 394 | + ); | ||
| 395 | + const imageUrl = await cosUploadImage(file, Path.BgRemoval); | ||
| 396 | + setPreviewUrl( | ||
| 397 | + imageUrl.startsWith("https://") | ||
| 398 | + ? imageUrl | ||
| 399 | + : `https://${imageUrl}`, | ||
| 400 | + ); | ||
| 401 | + } catch (error) { | ||
| 402 | + console.log(error); | ||
| 403 | + message.error(Locale.ComError.UploadErr); | ||
| 404 | + } | ||
| 405 | + }, 0); | ||
| 391 | } catch (error) { | 406 | } catch (error) { |
| 392 | message.error(Locale.BgRemoval.error.resultErr); | 407 | message.error(Locale.BgRemoval.error.resultErr); |
| 393 | } finally { | 408 | } finally { |
| @@ -434,6 +449,7 @@ export function BgPanel(props: FileProps) { | @@ -434,6 +449,7 @@ export function BgPanel(props: FileProps) { | ||
| 434 | setLoading(false); | 449 | setLoading(false); |
| 435 | } | 450 | } |
| 436 | }; | 451 | }; |
| 452 | + | ||
| 437 | return ( | 453 | return ( |
| 438 | <> | 454 | <> |
| 439 | <ControlParamItem title={Locale.BgRemoval.subTitle}> | 455 | <ControlParamItem title={Locale.BgRemoval.subTitle}> |
| @@ -466,6 +482,13 @@ export function BgPanel(props: FileProps) { | @@ -466,6 +482,13 @@ export function BgPanel(props: FileProps) { | ||
| 466 | onClick={() => handleProcessImage("visual/r-background")} | 482 | onClick={() => handleProcessImage("visual/r-background")} |
| 467 | disabled={isLoading} | 483 | disabled={isLoading} |
| 468 | /> | 484 | /> |
| 485 | + <IconButton | ||
| 486 | + text={Locale.BgRemoval.generateBg} | ||
| 487 | + type="primary" | ||
| 488 | + shadow | ||
| 489 | + onClick={() => console.log(Path.BgRemoval)} | ||
| 490 | + disabled={isLoading} | ||
| 491 | + /> | ||
| 469 | </div> | 492 | </div> |
| 470 | </ControlParamItem> | 493 | </ControlParamItem> |
| 471 | <ControlParamItem title={Locale.BgRemoval.promptTitle} required={true}> | 494 | <ControlParamItem title={Locale.BgRemoval.promptTitle} required={true}> |
| 1 | import { useMobileScreen } from "@/app/utils"; | 1 | import { useMobileScreen } from "@/app/utils"; |
| 2 | import dynamic from "next/dynamic"; | 2 | import dynamic from "next/dynamic"; |
| 3 | import { | 3 | import { |
| 4 | - SideBarContainer, | ||
| 5 | - SideBarBody, | ||
| 6 | - SideBarHeader, | ||
| 7 | - SideBarTail, | ||
| 8 | - useDragSideBar, | ||
| 9 | - useHotKey, | 4 | + SideBarContainer, |
| 5 | + SideBarBody, | ||
| 6 | + SideBarHeader, | ||
| 7 | + useDragSideBar, | ||
| 8 | + useHotKey, | ||
| 10 | } from "@/app/components/sidebar"; | 9 | } from "@/app/components/sidebar"; |
| 11 | import { IconButton } from "@/app/components/button"; | 10 | import { IconButton } from "@/app/components/button"; |
| 12 | import ReturnIcon from "@/app/icons/return.svg"; | 11 | import ReturnIcon from "@/app/icons/return.svg"; |
| @@ -15,102 +14,87 @@ import Locale from "@/app/locales"; | @@ -15,102 +14,87 @@ import Locale from "@/app/locales"; | ||
| 15 | import { Path } from "@/app/constant"; | 14 | import { Path } from "@/app/constant"; |
| 16 | import { useNavigate } from "react-router-dom"; | 15 | import { useNavigate } from "react-router-dom"; |
| 17 | import SDIcon from "@/app/icons/sd.svg"; | 16 | import SDIcon from "@/app/icons/sd.svg"; |
| 18 | -import type { LocalData } from '@/app/types/zuotang'; | ||
| 19 | -import { ApiPath } from '@/app/constant'; | ||
| 20 | -import { message } from 'antd'; | ||
| 21 | 17 | ||
| 22 | const BgPanel = dynamic( | 18 | const BgPanel = dynamic( |
| 23 | - async () => (await import("@/app/components/bgRemoval")).BgPanel, | ||
| 24 | - { | ||
| 25 | - loading: () => null, | ||
| 26 | - }, | 19 | + async () => (await import("@/app/components/bgRemoval")).BgPanel, |
| 20 | + { | ||
| 21 | + loading: () => null, | ||
| 22 | + }, | ||
| 27 | ); | 23 | ); |
| 28 | 24 | ||
| 29 | export interface BgSiderBarProps { | 25 | export interface BgSiderBarProps { |
| 30 | - className?: string; | ||
| 31 | - fileData: Blob | null; | ||
| 32 | - setFileData: React.Dispatch<React.SetStateAction<Blob | null>>; | ||
| 33 | - previewUrl: string | null; | ||
| 34 | - setPreviewUrl: React.Dispatch<React.SetStateAction<string | null>>; | ||
| 35 | - isLoading: boolean; | ||
| 36 | - setIsLoading: React.Dispatch<React.SetStateAction<boolean>>; | 26 | + className?: string; |
| 27 | + previewUrl: string | null; | ||
| 28 | + setPreviewUrl: React.Dispatch<React.SetStateAction<string | null>>; | ||
| 29 | + isLoading: boolean; | ||
| 30 | + setIsLoading: React.Dispatch<React.SetStateAction<boolean>>; | ||
| 37 | } | 31 | } |
| 38 | 32 | ||
| 39 | - | ||
| 40 | export function BgSiderBar(props: BgSiderBarProps) { | 33 | export function BgSiderBar(props: BgSiderBarProps) { |
| 41 | - const isMobileScreen = useMobileScreen(); | ||
| 42 | - const { onDragStart, shouldNarrow } = useDragSideBar(); | ||
| 43 | - const navigate = useNavigate(); | ||
| 44 | - useHotKey(); | ||
| 45 | - const { | ||
| 46 | - className, | ||
| 47 | - fileData, | ||
| 48 | - setFileData, | ||
| 49 | - previewUrl, | ||
| 50 | - setPreviewUrl, | ||
| 51 | - isLoading, | ||
| 52 | - setIsLoading, | ||
| 53 | - } = props; | ||
| 54 | - return ( | ||
| 55 | - <SideBarContainer | ||
| 56 | - onDragStart={onDragStart} | ||
| 57 | - shouldNarrow={shouldNarrow} | ||
| 58 | - className={className} | 34 | + const isMobileScreen = useMobileScreen(); |
| 35 | + const { onDragStart, shouldNarrow } = useDragSideBar(); | ||
| 36 | + const navigate = useNavigate(); | ||
| 37 | + useHotKey(); | ||
| 38 | + const { className, previewUrl, setPreviewUrl, isLoading, setIsLoading } = | ||
| 39 | + props; | ||
| 40 | + return ( | ||
| 41 | + <SideBarContainer | ||
| 42 | + onDragStart={onDragStart} | ||
| 43 | + shouldNarrow={shouldNarrow} | ||
| 44 | + className={className} | ||
| 45 | + > | ||
| 46 | + {isMobileScreen ? ( | ||
| 47 | + <div | ||
| 48 | + className="window-header" | ||
| 49 | + data-tauri-drag-region | ||
| 50 | + style={{ | ||
| 51 | + paddingLeft: 0, | ||
| 52 | + paddingRight: 0, | ||
| 53 | + }} | ||
| 59 | > | 54 | > |
| 60 | - {isMobileScreen ? ( | ||
| 61 | - <div | ||
| 62 | - className="window-header" | ||
| 63 | - data-tauri-drag-region | ||
| 64 | - style={{ | ||
| 65 | - paddingLeft: 0, | ||
| 66 | - paddingRight: 0, | ||
| 67 | - }} | ||
| 68 | - > | ||
| 69 | - <div className="window-actions"> | ||
| 70 | - <div className="window-action-button"> | ||
| 71 | - <IconButton | ||
| 72 | - icon={<ReturnIcon />} | ||
| 73 | - bordered | ||
| 74 | - title={Locale.Sd.Actions.ReturnHome} | ||
| 75 | - onClick={() => navigate(Path.Home)} | ||
| 76 | - /> | ||
| 77 | - </div> | ||
| 78 | - </div> | ||
| 79 | - <SDIcon width={50} height={50} /> | ||
| 80 | - <div className="window-actions"> | ||
| 81 | - <div className="window-action-button"> | ||
| 82 | - <IconButton | ||
| 83 | - icon={<HistoryIcon />} | ||
| 84 | - bordered | ||
| 85 | - title={Locale.Sd.Actions.History} | ||
| 86 | - onClick={() => navigate(Path.SdNew)} | ||
| 87 | - /> | ||
| 88 | - </div> | ||
| 89 | - </div> | ||
| 90 | - </div> | ||
| 91 | - ) : ( | ||
| 92 | - <SideBarHeader | ||
| 93 | - title={ | ||
| 94 | - <IconButton | ||
| 95 | - icon={<ReturnIcon />} | ||
| 96 | - bordered | ||
| 97 | - title={Locale.Sd.Actions.ReturnHome} | ||
| 98 | - onClick={() => navigate(Path.Home)} | ||
| 99 | - /> | ||
| 100 | - } | ||
| 101 | - logo={<SDIcon width={38} height={"100%"} />} | ||
| 102 | - ></SideBarHeader> | ||
| 103 | - )} | ||
| 104 | - <SideBarBody> | ||
| 105 | - <BgPanel | ||
| 106 | - fileData={fileData} | ||
| 107 | - setFileData={setFileData} | ||
| 108 | - previewUrl={previewUrl} | ||
| 109 | - setPreviewUrl={setPreviewUrl} | ||
| 110 | - isLoading={isLoading} | ||
| 111 | - setIsLoading={setIsLoading} | ||
| 112 | - /> | ||
| 113 | - </SideBarBody> | ||
| 114 | - </SideBarContainer> | ||
| 115 | - ) | ||
| 116 | -} | ||
| 55 | + <div className="window-actions"> | ||
| 56 | + <div className="window-action-button"> | ||
| 57 | + <IconButton | ||
| 58 | + icon={<ReturnIcon />} | ||
| 59 | + bordered | ||
| 60 | + title={Locale.Sd.Actions.ReturnHome} | ||
| 61 | + onClick={() => navigate(Path.Home)} | ||
| 62 | + /> | ||
| 63 | + </div> | ||
| 64 | + </div> | ||
| 65 | + <SDIcon width={50} height={50} /> | ||
| 66 | + <div className="window-actions"> | ||
| 67 | + <div className="window-action-button"> | ||
| 68 | + <IconButton | ||
| 69 | + icon={<HistoryIcon />} | ||
| 70 | + bordered | ||
| 71 | + title={Locale.Sd.Actions.History} | ||
| 72 | + onClick={() => navigate(Path.SdNew)} | ||
| 73 | + /> | ||
| 74 | + </div> | ||
| 75 | + </div> | ||
| 76 | + </div> | ||
| 77 | + ) : ( | ||
| 78 | + <SideBarHeader | ||
| 79 | + title={ | ||
| 80 | + <IconButton | ||
| 81 | + icon={<ReturnIcon />} | ||
| 82 | + bordered | ||
| 83 | + title={Locale.Sd.Actions.ReturnHome} | ||
| 84 | + onClick={() => navigate(Path.Home)} | ||
| 85 | + /> | ||
| 86 | + } | ||
| 87 | + logo={<SDIcon width={38} height={"100%"} />} | ||
| 88 | + ></SideBarHeader> | ||
| 89 | + )} | ||
| 90 | + <SideBarBody> | ||
| 91 | + <BgPanel | ||
| 92 | + previewUrl={previewUrl} | ||
| 93 | + setPreviewUrl={setPreviewUrl} | ||
| 94 | + isLoading={isLoading} | ||
| 95 | + setIsLoading={setIsLoading} | ||
| 96 | + /> | ||
| 97 | + </SideBarBody> | ||
| 98 | + </SideBarContainer> | ||
| 99 | + ); | ||
| 100 | +} |
| @@ -15,7 +15,6 @@ import { useAppConfig } from "@/app/store"; | @@ -15,7 +15,6 @@ import { useAppConfig } from "@/app/store"; | ||
| 15 | import { BgSiderBar } from "./bg-siderBar"; | 15 | import { BgSiderBar } from "./bg-siderBar"; |
| 16 | import { Button, Flex, Upload, message } from "antd"; | 16 | import { Button, Flex, Upload, message } from "antd"; |
| 17 | import { UploadOutlined } from "@ant-design/icons"; | 17 | import { UploadOutlined } from "@ant-design/icons"; |
| 18 | -import type { UploadFile } from "antd"; | ||
| 19 | 18 | ||
| 20 | import ReturnIcon from "@/app/icons/return.svg"; | 19 | import ReturnIcon from "@/app/icons/return.svg"; |
| 21 | import MinIcon from "@/app/icons/min.svg"; | 20 | import MinIcon from "@/app/icons/min.svg"; |
| @@ -24,6 +23,7 @@ import SDIcon from "@/app/icons/sd.svg"; | @@ -24,6 +23,7 @@ import SDIcon from "@/app/icons/sd.svg"; | ||
| 24 | import LoadingIcon from "@/app/icons/three-dots.svg"; | 23 | import LoadingIcon from "@/app/icons/three-dots.svg"; |
| 25 | import BotIcon from "@/app/icons/bot.svg"; | 24 | import BotIcon from "@/app/icons/bot.svg"; |
| 26 | import CloseIcon from "@/app/icons/close.svg"; | 25 | import CloseIcon from "@/app/icons/close.svg"; |
| 26 | +import { cosUploadImage } from "@/app/utils/tencentCos"; | ||
| 27 | 27 | ||
| 28 | export function BgRemoval() { | 28 | export function BgRemoval() { |
| 29 | const isMobileScreen = useMobileScreen(); | 29 | const isMobileScreen = useMobileScreen(); |
| @@ -35,45 +35,47 @@ export function BgRemoval() { | @@ -35,45 +35,47 @@ export function BgRemoval() { | ||
| 35 | const isBgRemoval = location.pathname === Path.BgRemoval; | 35 | const isBgRemoval = location.pathname === Path.BgRemoval; |
| 36 | 36 | ||
| 37 | const [isLoading, setIsLoading] = useState(false); | 37 | const [isLoading, setIsLoading] = useState(false); |
| 38 | - const [fileData, setFileData] = useState<Blob | null>(null); //储存上传图片 | ||
| 39 | - const [previewUrl, setPreviewUrl] = useState<string | null>(""); | 38 | + const [previewUrl, setPreviewUrl] = useState<string | null>( |
| 39 | + localStorage.getItem("image") || "", | ||
| 40 | + ); | ||
| 40 | // 关闭图片 | 41 | // 关闭图片 |
| 41 | const closePic = () => { | 42 | const closePic = () => { |
| 42 | - setFileData(null); | ||
| 43 | setPreviewUrl(""); | 43 | setPreviewUrl(""); |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | //上传图片 | 46 | //上传图片 |
| 47 | - const onChange = (info: any) => { | 47 | + const onChange = async (info: any) => { |
| 48 | if (info.file.status === "uploading") { | 48 | if (info.file.status === "uploading") { |
| 49 | return; | 49 | return; |
| 50 | } | 50 | } |
| 51 | if (info.file.status === "done") { | 51 | if (info.file.status === "done") { |
| 52 | // 获取上传的文件对象 | 52 | // 获取上传的文件对象 |
| 53 | - const file = info.file as UploadFile; | ||
| 54 | - const blob = file.originFileObj as Blob; | ||
| 55 | - setFileData(blob); | 53 | + const file = info.file.originFileObj; |
| 54 | + setIsLoading(true); | ||
| 55 | + try { | ||
| 56 | + const imageUrl = await cosUploadImage(file, Path.BgRemoval); | ||
| 57 | + setPreviewUrl( | ||
| 58 | + imageUrl.startsWith("https://") ? imageUrl : `https://${imageUrl}`, | ||
| 59 | + ); | ||
| 60 | + } catch (error) { | ||
| 61 | + console.log(error); | ||
| 62 | + message.error(Locale.ComError.UploadErr); | ||
| 63 | + } finally { | ||
| 64 | + setIsLoading(false); | ||
| 65 | + } | ||
| 56 | } else if (info.file.status === "error") { | 66 | } else if (info.file.status === "error") { |
| 57 | message.error(`${info.file.name} file upload failed.`); | 67 | message.error(`${info.file.name} file upload failed.`); |
| 58 | } | 68 | } |
| 59 | }; | 69 | }; |
| 60 | - // 修改 useEffect 监听 fileData | 70 | + |
| 61 | useEffect(() => { | 71 | useEffect(() => { |
| 62 | - if (fileData) { | ||
| 63 | - // 创建 Blob 的临时 URL | ||
| 64 | - const objectUrl = URL.createObjectURL(fileData); | ||
| 65 | - setPreviewUrl(objectUrl); | ||
| 66 | - // 组件卸载时释放内存 | ||
| 67 | - return () => URL.revokeObjectURL(objectUrl); | ||
| 68 | - } | ||
| 69 | - }, [fileData]); | 72 | + previewUrl && localStorage.setItem("image", previewUrl); |
| 73 | + }, [previewUrl]); | ||
| 70 | 74 | ||
| 71 | return ( | 75 | return ( |
| 72 | <> | 76 | <> |
| 73 | <BgSiderBar | 77 | <BgSiderBar |
| 74 | className={clsx({ [homeStyles["sidebar-show"]]: isBgRemoval })} | 78 | className={clsx({ [homeStyles["sidebar-show"]]: isBgRemoval })} |
| 75 | - fileData={fileData} | ||
| 76 | - setFileData={setFileData} | ||
| 77 | previewUrl={previewUrl} | 79 | previewUrl={previewUrl} |
| 78 | setPreviewUrl={setPreviewUrl} | 80 | setPreviewUrl={setPreviewUrl} |
| 79 | isLoading={isLoading} | 81 | isLoading={isLoading} |
| @@ -150,10 +152,6 @@ export function BgRemoval() { | @@ -150,10 +152,6 @@ export function BgRemoval() { | ||
| 150 | ) : ( | 152 | ) : ( |
| 151 | <Upload | 153 | <Upload |
| 152 | onChange={onChange} | 154 | onChange={onChange} |
| 153 | - beforeUpload={(file) => { | ||
| 154 | - setFileData(file); | ||
| 155 | - return false; | ||
| 156 | - }} | ||
| 157 | showUploadList={false} | 155 | showUploadList={false} |
| 158 | accept="image/*" | 156 | accept="image/*" |
| 159 | > | 157 | > |
| @@ -6,15 +6,6 @@ | @@ -6,15 +6,6 @@ | ||
| 6 | pointer-events: none; /* 可选,禁用所有鼠标事件 */ | 6 | pointer-events: none; /* 可选,禁用所有鼠标事件 */ |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | -.message-file{ | ||
| 10 | - align-items: center; | ||
| 11 | - padding: 6px 12px; | ||
| 12 | - background-color: var(--white); | ||
| 13 | - border: 1px solid rgba(136, 136, 136, 0.2); | ||
| 14 | - border-radius: 5px; | ||
| 15 | -} | ||
| 16 | - | ||
| 17 | - | ||
| 18 | .attach-file { | 9 | .attach-file { |
| 19 | position: absolute; | 10 | position: absolute; |
| 20 | left: 30px; | 11 | left: 30px; |
| @@ -137,12 +137,12 @@ import clsx from "clsx"; | @@ -137,12 +137,12 @@ import clsx from "clsx"; | ||
| 137 | import { getAvailableClientsCount, isMcpEnabled } from "../mcp/actions"; | 137 | import { getAvailableClientsCount, isMcpEnabled } from "../mcp/actions"; |
| 138 | 138 | ||
| 139 | //20250317新增 | 139 | //20250317新增 |
| 140 | -import { getExcelData, toExcel } from "../utils/fileExport/export2Excel"; | ||
| 141 | -import { exportWord, getWordData } from "../utils/fileExport/word"; | 140 | +import { toExcel } from "../utils/fileExport/export2Excel"; |
| 141 | +import { exportWord } from "../utils/fileExport/word"; | ||
| 142 | import { getMindPrompt } from "../utils/prompt"; | 142 | import { getMindPrompt } from "../utils/prompt"; |
| 143 | import { message as msgModal } from "antd"; | 143 | import { message as msgModal } from "antd"; |
| 144 | -import { getPdfData } from "../utils/fileExport/toPdf"; | ||
| 145 | import { removeDeepThink } from "../utils/deepThink"; | 144 | import { removeDeepThink } from "../utils/deepThink"; |
| 145 | +import { processChatFile } from "../utils/fileUtil"; | ||
| 146 | const localStorage = safeLocalStorage(); | 146 | const localStorage = safeLocalStorage(); |
| 147 | 147 | ||
| 148 | const ttsPlayer = createTTSPlayer(); | 148 | const ttsPlayer = createTTSPlayer(); |
| @@ -1785,62 +1785,15 @@ function _Chat() { | @@ -1785,62 +1785,15 @@ function _Chat() { | ||
| 1785 | const [fileName, setFileName] = useState(""); | 1785 | const [fileName, setFileName] = useState(""); |
| 1786 | 1786 | ||
| 1787 | async function uploadFile() { | 1787 | async function uploadFile() { |
| 1788 | - const fileInput = document.createElement("input"); | ||
| 1789 | - fileInput.type = "file"; | ||
| 1790 | - fileInput.accept = ".xlsx, .xls, .pdf, .docx, .doc"; | ||
| 1791 | - fileInput.multiple = false; | ||
| 1792 | - fileInput.style.display = "none"; | ||
| 1793 | - const handleFileResult = (fileName: string, data: any) => { | ||
| 1794 | - if (!data) { | ||
| 1795 | - msgModal.error(Locale.ComError.Notread); | ||
| 1796 | - return; | ||
| 1797 | - } | ||
| 1798 | - setFileData(`'''filedata | ||
| 1799 | - ${fileName} | ||
| 1800 | - ${JSON.stringify(data)} | ||
| 1801 | - '''filedata`); | ||
| 1802 | - setFileName(fileName); | ||
| 1803 | - }; | ||
| 1804 | - const handleError = ( | ||
| 1805 | - error: any, | ||
| 1806 | - defaultMsg = Locale.ComError.UploadErr, | ||
| 1807 | - ) => { | ||
| 1808 | - console.error(`${defaultMsg}:`, error); | ||
| 1809 | - msgModal.error(defaultMsg); | ||
| 1810 | - }; | ||
| 1811 | - // 文件处理器映射 | ||
| 1812 | - const fileHandlers: Record<string, (file: File) => Promise<any>> = { | ||
| 1813 | - ".xlsx": getExcelData, | ||
| 1814 | - ".xls": getExcelData, | ||
| 1815 | - ".doc": getWordData, | ||
| 1816 | - ".docx": getWordData, | ||
| 1817 | - ".pdf": getPdfData, | ||
| 1818 | - }; | ||
| 1819 | - fileInput.onchange = async (event: Event) => { | ||
| 1820 | - try { | ||
| 1821 | - const file = (event.target as HTMLInputElement).files?.[0]; | ||
| 1822 | - if (!file) return; | ||
| 1823 | - const fileExt = file.name | ||
| 1824 | - .toLowerCase() | ||
| 1825 | - .slice(file.name.lastIndexOf(".")); | ||
| 1826 | - // 校验文件类型 | ||
| 1827 | - if (!Object.keys(fileHandlers).includes(fileExt)) { | ||
| 1828 | - msgModal.error(Locale.ComError.UnsupportedFile); | ||
| 1829 | - return; | ||
| 1830 | - } | ||
| 1831 | - // 获取处理器并执行 | ||
| 1832 | - const handler = fileHandlers[fileExt]; | ||
| 1833 | - const data = await handler(file); | ||
| 1834 | - handleFileResult(file.name, data); | ||
| 1835 | - } catch (error) { | ||
| 1836 | - handleError(error); | ||
| 1837 | - } finally { | ||
| 1838 | - fileInput.remove(); | ||
| 1839 | - } | ||
| 1840 | - }; | ||
| 1841 | - document.body.appendChild(fileInput); | ||
| 1842 | - fileInput.click(); | 1788 | + try { |
| 1789 | + const { data, name } = await processChatFile(); | ||
| 1790 | + setFileData(data); | ||
| 1791 | + setFileName(name); | ||
| 1792 | + } catch (err) { | ||
| 1793 | + msgModal.error(Locale.ComError.UploadErr); | ||
| 1794 | + } | ||
| 1843 | } | 1795 | } |
| 1796 | + | ||
| 1844 | return ( | 1797 | return ( |
| 1845 | <> | 1798 | <> |
| 1846 | <div className={styles.chat} key={session.id}> | 1799 | <div className={styles.chat} key={session.id}> |
| 1 | import React, { useEffect, useRef, useState } from "react"; | 1 | import React, { useEffect, useRef, useState } from "react"; |
| 2 | import { Editor } from "@tinymce/tinymce-react"; | 2 | import { Editor } from "@tinymce/tinymce-react"; |
| 3 | import tinymce from "tinymce"; | 3 | import tinymce from "tinymce"; |
| 4 | +import { message } from "antd"; | ||
| 5 | +import { cosUploadImage } from "@/app/utils/tencentCos"; | ||
| 6 | +import { Path } from "@/app/constant"; | ||
| 4 | 7 | ||
| 5 | export function EditorComponent(props: { | 8 | export function EditorComponent(props: { |
| 6 | htmlCode: string; | 9 | htmlCode: string; |
| @@ -8,14 +11,9 @@ export function EditorComponent(props: { | @@ -8,14 +11,9 @@ export function EditorComponent(props: { | ||
| 8 | }) { | 11 | }) { |
| 9 | const editorRef = useRef<tinymce.Editor | null>(null); | 12 | const editorRef = useRef<tinymce.Editor | null>(null); |
| 10 | const [editorValue, setEditorValue] = useState(props.htmlCode); | 13 | const [editorValue, setEditorValue] = useState(props.htmlCode); |
| 11 | - | ||
| 12 | useEffect(() => { | 14 | useEffect(() => { |
| 13 | setEditorValue(props.htmlCode); | 15 | setEditorValue(props.htmlCode); |
| 14 | }, [props.htmlCode]); | 16 | }, [props.htmlCode]); |
| 15 | - function uploadImageToServer(file: File) { | ||
| 16 | - const blob = file as Blob; | ||
| 17 | - return URL.createObjectURL(blob); | ||
| 18 | - } | ||
| 19 | return ( | 17 | return ( |
| 20 | <Editor | 18 | <Editor |
| 21 | apiKey="l4kgoxhh8dtkv4thb22g4wskoq4obivan58l38asxk32an6f" | 19 | apiKey="l4kgoxhh8dtkv4thb22g4wskoq4obivan58l38asxk32an6f" |
| @@ -73,13 +71,13 @@ export function EditorComponent(props: { | @@ -73,13 +71,13 @@ export function EditorComponent(props: { | ||
| 73 | const file = (e.target as HTMLInputElement).files?.[0]; | 71 | const file = (e.target as HTMLInputElement).files?.[0]; |
| 74 | if (!file) return; | 72 | if (!file) return; |
| 75 | if (!file.type.startsWith("image/")) { | 73 | if (!file.type.startsWith("image/")) { |
| 76 | - alert("请选择有效的图片文件"); | 74 | + message.error("请选择有效的图片文件"); |
| 77 | return; | 75 | return; |
| 78 | } | 76 | } |
| 79 | try { | 77 | try { |
| 80 | - const imageUrl = await uploadImageToServer(file); | 78 | + const imageUrl = await cosUploadImage(file, Path.Writing); |
| 81 | editor.insertContent( | 79 | editor.insertContent( |
| 82 | - `<img src="${imageUrl}" alt="上传的图片"/>`, | 80 | + `<img src="https://${imageUrl}" alt="上传的图片"/>`, |
| 83 | ); | 81 | ); |
| 84 | } catch (error) { | 82 | } catch (error) { |
| 85 | alert( | 83 | alert( |
| @@ -7,6 +7,10 @@ import { message } from "antd"; | @@ -7,6 +7,10 @@ import { message } from "antd"; | ||
| 7 | import { useChatStore } from "@/app/store"; | 7 | import { useChatStore } from "@/app/store"; |
| 8 | import { getWrtingPrompt } from "@/app/utils/prompt"; | 8 | import { getWrtingPrompt } from "@/app/utils/prompt"; |
| 9 | import type { writePromptParam } from "@/app/types/prompt"; | 9 | import type { writePromptParam } from "@/app/types/prompt"; |
| 10 | +import { processChatFile } from "@/app/utils/fileUtil"; | ||
| 11 | +import Locale from "@/app/locales"; | ||
| 12 | +import styles from "./wrtie-panel.module.scss"; | ||
| 13 | +import DeleteIcon from "@/app/icons/delete.svg"; | ||
| 10 | 14 | ||
| 11 | export const mergedData = [ | 15 | export const mergedData = [ |
| 12 | { | 16 | { |
| @@ -141,6 +145,9 @@ export function WritingPanel(props: WritePanelProps) { | @@ -141,6 +145,9 @@ export function WritingPanel(props: WritePanelProps) { | ||
| 141 | const [prompt, setPrompt] = useState(""); // 提示词 | 145 | const [prompt, setPrompt] = useState(""); // 提示词 |
| 142 | const [isLoading, setIsLoading] = useState(false); | 146 | const [isLoading, setIsLoading] = useState(false); |
| 143 | 147 | ||
| 148 | + const [fileData, setFileData] = useState(""); | ||
| 149 | + const [fileName, setFileName] = useState(""); | ||
| 150 | + | ||
| 144 | // 生成动态数据 | 151 | // 生成动态数据 |
| 145 | const dynamicMergedData = mergedData.map((item) => { | 152 | const dynamicMergedData = mergedData.map((item) => { |
| 146 | if (item.title === "写作风格") { | 153 | if (item.title === "写作风格") { |
| @@ -196,6 +203,21 @@ export function WritingPanel(props: WritePanelProps) { | @@ -196,6 +203,21 @@ export function WritingPanel(props: WritePanelProps) { | ||
| 196 | setPrompt(e.target.value); | 203 | setPrompt(e.target.value); |
| 197 | }; | 204 | }; |
| 198 | 205 | ||
| 206 | + //上传文件 | ||
| 207 | + const uploadFile = async () => { | ||
| 208 | + try { | ||
| 209 | + const { data, name } = await processChatFile(); | ||
| 210 | + console.log(data); | ||
| 211 | + | ||
| 212 | + setFileData(data); | ||
| 213 | + console.log(fileData); | ||
| 214 | + | ||
| 215 | + setFileName(name); | ||
| 216 | + } catch { | ||
| 217 | + message.error(Locale.ComError.UploadErr); | ||
| 218 | + } | ||
| 219 | + }; | ||
| 220 | + | ||
| 199 | // 提交表单时的处理函数 | 221 | // 提交表单时的处理函数 |
| 200 | const handleSubmit = async () => { | 222 | const handleSubmit = async () => { |
| 201 | if (!prompt.trim()) { | 223 | if (!prompt.trim()) { |
| @@ -210,6 +232,7 @@ export function WritingPanel(props: WritePanelProps) { | @@ -210,6 +232,7 @@ export function WritingPanel(props: WritePanelProps) { | ||
| 210 | writingTypeName, | 232 | writingTypeName, |
| 211 | isImgName, | 233 | isImgName, |
| 212 | writingCount, | 234 | writingCount, |
| 235 | + fileData, | ||
| 213 | }; | 236 | }; |
| 214 | const input = getWrtingPrompt(param); | 237 | const input = getWrtingPrompt(param); |
| 215 | setLoading(true); | 238 | setLoading(true); |
| @@ -304,6 +327,28 @@ export function WritingPanel(props: WritePanelProps) { | @@ -304,6 +327,28 @@ export function WritingPanel(props: WritePanelProps) { | ||
| 304 | /> | 327 | /> |
| 305 | </ControlParamItem> | 328 | </ControlParamItem> |
| 306 | 329 | ||
| 330 | + <IconButton | ||
| 331 | + text="上传文件" | ||
| 332 | + type="primary" | ||
| 333 | + shadow | ||
| 334 | + onClick={uploadFile} | ||
| 335 | + disabled={loading} | ||
| 336 | + ></IconButton> | ||
| 337 | + {fileName && fileData && ( | ||
| 338 | + <div className={styles["attach-file"]}> | ||
| 339 | + <span className={styles["file-name"]}>{fileName}</span> | ||
| 340 | + <div | ||
| 341 | + className={styles["delete-file"]} | ||
| 342 | + onClick={() => { | ||
| 343 | + setFileData(""); | ||
| 344 | + setFileName(""); | ||
| 345 | + }} | ||
| 346 | + > | ||
| 347 | + <DeleteIcon /> | ||
| 348 | + </div> | ||
| 349 | + </div> | ||
| 350 | + )} | ||
| 351 | + | ||
| 307 | {/* 提示词文本区域 */} | 352 | {/* 提示词文本区域 */} |
| 308 | <ControlParamItem title="提示词" required={true}> | 353 | <ControlParamItem title="提示词" required={true}> |
| 309 | <textarea | 354 | <textarea |
| @@ -92,6 +92,7 @@ export function WritingPage() { | @@ -92,6 +92,7 @@ export function WritingPage() { | ||
| 92 | writingTypeName: mergedData[4].default, | 92 | writingTypeName: mergedData[4].default, |
| 93 | isImgName: mergedData[5].default, | 93 | isImgName: mergedData[5].default, |
| 94 | writingCount: "200", | 94 | writingCount: "200", |
| 95 | + fileData: "", | ||
| 95 | }; | 96 | }; |
| 96 | const input = getWrtingPrompt(param); | 97 | const input = getWrtingPrompt(param); |
| 97 | setLoading(true); | 98 | setLoading(true); |
| @@ -160,6 +161,8 @@ export function WritingPage() { | @@ -160,6 +161,8 @@ export function WritingPage() { | ||
| 160 | await navigator.clipboard.write([clipboardItem]); | 161 | await navigator.clipboard.write([clipboardItem]); |
| 161 | message.success("复制成功!"); | 162 | message.success("复制成功!"); |
| 162 | } catch (error) { | 163 | } catch (error) { |
| 164 | + console.log(error); | ||
| 165 | + | ||
| 163 | message.error("复制失败"); | 166 | message.error("复制失败"); |
| 164 | } | 167 | } |
| 165 | }; | 168 | }; |
| 1 | +/* 在你的样式文件中 */ | ||
| 2 | +.attach-file { | ||
| 3 | + display: flex; | ||
| 4 | + align-items: center; | ||
| 5 | + /* 垂直居中对齐 */ | ||
| 6 | + gap: 10px; | ||
| 7 | + /* 文件名和删除按钮之间的间距 */ | ||
| 8 | + padding: 8px 12px; | ||
| 9 | + border-radius: 4px; | ||
| 10 | + background-color: #f5f5f5; | ||
| 11 | + /* 背景颜色 */ | ||
| 12 | + cursor: pointer; | ||
| 13 | + /* 鼠标悬停效果 */ | ||
| 14 | + transition: background-color 0.2s; | ||
| 15 | + /* 平滑过渡效果 */ | ||
| 16 | +} | ||
| 17 | + | ||
| 18 | +.attach-file:hover { | ||
| 19 | + background-color: #e9e9e9; | ||
| 20 | + /* 悬停时的背景颜色 */ | ||
| 21 | +} | ||
| 22 | + | ||
| 23 | +.file-name { | ||
| 24 | + flex-grow: 1; | ||
| 25 | + /* 文件名占据剩余空间 */ | ||
| 26 | + font-size: 14px; | ||
| 27 | + color: #333; | ||
| 28 | + overflow: hidden; | ||
| 29 | + /* 防止文件名过长溢出 */ | ||
| 30 | + text-overflow: ellipsis; | ||
| 31 | + /* 超出部分显示省略号 */ | ||
| 32 | + white-space: nowrap; | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +.delete-file { | ||
| 36 | + width: 24px; | ||
| 37 | + height: 24px; | ||
| 38 | + display: flex; | ||
| 39 | + align-items: center; | ||
| 40 | + justify-content: center; | ||
| 41 | + border-radius: 50%; | ||
| 42 | + /* 圆形按钮 */ | ||
| 43 | + background-color: #fff; | ||
| 44 | + cursor: pointer; | ||
| 45 | + transition: all 0.2s; | ||
| 46 | +} | ||
| 47 | + | ||
| 48 | +.delete-file:hover { | ||
| 49 | + background-color: #f0f0f0; | ||
| 50 | + /* 悬停时的按钮背景 */ | ||
| 51 | + transform: scale(1.1); | ||
| 52 | + /* 悬停时轻微放大 */ | ||
| 53 | +} |
| @@ -98,12 +98,19 @@ declare global { | @@ -98,12 +98,19 @@ declare global { | ||
| 98 | BACKGROUND_REMOVAL_API_KEY: string; | 98 | BACKGROUND_REMOVAL_API_KEY: string; |
| 99 | MAX_DAILY_USES: number; | 99 | MAX_DAILY_USES: number; |
| 100 | 100 | ||
| 101 | + //AI PPT | ||
| 101 | DOCMEE_URL: string; | 102 | DOCMEE_URL: string; |
| 102 | DOCMEE_API_KEY: string; | 103 | DOCMEE_API_KEY: string; |
| 103 | DOCMEE_MAX_DAILY_USES: number; | 104 | DOCMEE_MAX_DAILY_USES: number; |
| 104 | 105 | ||
| 105 | NXET_PUBLIC_BGREMOVAL_MODEL: string; | 106 | NXET_PUBLIC_BGREMOVAL_MODEL: string; |
| 106 | NXET_PUBLIC_WRITING_MODEL: string; | 107 | NXET_PUBLIC_WRITING_MODEL: string; |
| 108 | + | ||
| 109 | + //腾讯云 | ||
| 110 | + TENCENT_COS_SECRETKEY: string; | ||
| 111 | + TENCENT_COS_SECRETID: string; | ||
| 112 | + TENCENT_COS_BUCKET: string; | ||
| 113 | + TENCENT_COS_URL: string; | ||
| 107 | } | 114 | } |
| 108 | } | 115 | } |
| 109 | } | 116 | } |
| @@ -287,7 +294,15 @@ export const getServerSideConfig = () => { | @@ -287,7 +294,15 @@ export const getServerSideConfig = () => { | ||
| 287 | docmeeApiKey: process.env.DOCMEE_API_KEY ?? "", | 294 | docmeeApiKey: process.env.DOCMEE_API_KEY ?? "", |
| 288 | docmeeMaxDailyUses: process.env.DOCMEE_MAX_DAILY_USES, | 295 | docmeeMaxDailyUses: process.env.DOCMEE_MAX_DAILY_USES, |
| 289 | 296 | ||
| 297 | + //生成图片模型名称 | ||
| 290 | bgRemovalModel: process.env.NXET_PUBLIC_BGREMOVAL_MODEL, | 298 | bgRemovalModel: process.env.NXET_PUBLIC_BGREMOVAL_MODEL, |
| 299 | + //生成文章模型名称 | ||
| 291 | writingModel: process.env.NXET_PUBLIC_WRITING_MODEL, | 300 | writingModel: process.env.NXET_PUBLIC_WRITING_MODEL, |
| 301 | + | ||
| 302 | + //腾讯云 | ||
| 303 | + tencentCosSecretKey: process.env.TENCENT_COS_SECRETKEY, | ||
| 304 | + tencentCosSecretId: process.env.TENCENT_COS_SECRETID, | ||
| 305 | + tencentCosBucket: process.env.TENCENT_COS_BUCKET, | ||
| 306 | + tencentCosUrl: process.env.TENCENT_COS_URL, | ||
| 292 | }; | 307 | }; |
| 293 | }; | 308 | }; |
| @@ -81,6 +81,7 @@ export enum ApiPath { | @@ -81,6 +81,7 @@ export enum ApiPath { | ||
| 81 | ZuoTang = "/api/tasks", | 81 | ZuoTang = "/api/tasks", |
| 82 | Docmee = "/api/ppt", | 82 | Docmee = "/api/ppt", |
| 83 | OpenAiImg = "/api/v1", | 83 | OpenAiImg = "/api/v1", |
| 84 | + TencentCos = "/api/cos", | ||
| 84 | } | 85 | } |
| 85 | ///api/tasks/visual/segmentation | 86 | ///api/tasks/visual/segmentation |
| 86 | //api/tasks/visual/segmentation/{task_id} | 87 | //api/tasks/visual/segmentation/{task_id} |
| @@ -880,7 +880,7 @@ const cn = { | @@ -880,7 +880,7 @@ const cn = { | ||
| 880 | timeoutErr: "处理超时,请稍后重试", | 880 | timeoutErr: "处理超时,请稍后重试", |
| 881 | imgLoadingErr: "图片加载失败", | 881 | imgLoadingErr: "图片加载失败", |
| 882 | }, | 882 | }, |
| 883 | - success: "图片处理成功,请在一小时内保存图片!", | 883 | + success: "图片处理成功", |
| 884 | generateImg: "生成图片", | 884 | generateImg: "生成图片", |
| 885 | bgRemoveBtn: "一键抠图", | 885 | bgRemoveBtn: "一键抠图", |
| 886 | downloadImg: "下载图片", | 886 | downloadImg: "下载图片", |
| @@ -894,6 +894,7 @@ const cn = { | @@ -894,6 +894,7 @@ const cn = { | ||
| 894 | UploadErr: "上传失败", | 894 | UploadErr: "上传失败", |
| 895 | UnsupportedFile: "不支持的文件类型", | 895 | UnsupportedFile: "不支持的文件类型", |
| 896 | Notread: "未读取到内容", | 896 | Notread: "未读取到内容", |
| 897 | + ImageUploadFail: "文件上传失败,请在30分钟内保存图片", | ||
| 897 | }, | 898 | }, |
| 898 | }; | 899 | }; |
| 899 | 900 |
app/types/tencentcos.d.ts
0 → 100644
| 1 | +declare module "cos-js-sdk-v5" { | ||
| 2 | + // 进度信息接口 | ||
| 3 | + export interface ProgressInfo { | ||
| 4 | + loaded: number; | ||
| 5 | + total: number; | ||
| 6 | + speed: number; | ||
| 7 | + percent: number; | ||
| 8 | + } | ||
| 9 | + | ||
| 10 | + // 鉴权凭证回调类型 | ||
| 11 | + export interface Credentials { | ||
| 12 | + TmpSecretId: string; | ||
| 13 | + TmpSecretKey: string; | ||
| 14 | + SecurityToken: string; | ||
| 15 | + StartTime: number; | ||
| 16 | + ExpiredTime: number; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + // 获取签名回调参数 | ||
| 20 | + type GetAuthorizationCallback = | ||
| 21 | + | string // 格式一:直接返回签名字符串 | ||
| 22 | + | { | ||
| 23 | + // 格式二:返回对象形式 | ||
| 24 | + Authorization: string; | ||
| 25 | + SecurityToken?: string; | ||
| 26 | + }; | ||
| 27 | + | ||
| 28 | + // 鉴权回调选项 | ||
| 29 | + type GetAuthorizationOptions = | ||
| 30 | + | { | ||
| 31 | + // 格式一:临时密钥模式 | ||
| 32 | + Bucket: string; | ||
| 33 | + Region: string; | ||
| 34 | + } | ||
| 35 | + | { | ||
| 36 | + // 格式二:签名计算模式 | ||
| 37 | + Method: string; | ||
| 38 | + Pathname: string; | ||
| 39 | + Key: string; | ||
| 40 | + Query: Record<string, any>; | ||
| 41 | + Headers: Record<string, any>; | ||
| 42 | + }; | ||
| 43 | + | ||
| 44 | + // SDK 配置项 | ||
| 45 | + export interface COSOptions { | ||
| 46 | + // 基础鉴权参数 | ||
| 47 | + SecretId?: string; | ||
| 48 | + SecretKey?: string; | ||
| 49 | + SecurityToken?: string; | ||
| 50 | + getAuthorization?: ( | ||
| 51 | + options: GetAuthorizationOptions, | ||
| 52 | + callback: (credentials: Credentials | GetAuthorizationCallback) => void, | ||
| 53 | + ) => void; | ||
| 54 | + | ||
| 55 | + // 并发控制参数 | ||
| 56 | + FileParallelLimit?: number; | ||
| 57 | + ChunkParallelLimit?: number; | ||
| 58 | + CopyChunkParallelLimit?: number; | ||
| 59 | + ChunkRetryTimes?: number; | ||
| 60 | + | ||
| 61 | + // 分片配置 | ||
| 62 | + ChunkSize?: number; | ||
| 63 | + SliceSize?: number; | ||
| 64 | + CopyChunkSize?: number; | ||
| 65 | + CopySliceSize?: number; | ||
| 66 | + | ||
| 67 | + // 网络配置 | ||
| 68 | + Protocol?: "http" | "https"; | ||
| 69 | + ServiceDomain?: string; | ||
| 70 | + Domain?: string; | ||
| 71 | + Proxy?: string; | ||
| 72 | + Timeout?: number; | ||
| 73 | + KeepAlive?: boolean; | ||
| 74 | + StrictSsl?: boolean; | ||
| 75 | + | ||
| 76 | + // 高级配置 | ||
| 77 | + UploadQueueSize?: number; | ||
| 78 | + UploadCheckContentMd5?: boolean; | ||
| 79 | + ProgressInterval?: number; | ||
| 80 | + UseAccelerate?: boolean; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + // 上传参数 | ||
| 84 | + export interface UploadParams { | ||
| 85 | + Bucket: string; | ||
| 86 | + Region: string; | ||
| 87 | + Key: string; | ||
| 88 | + Body: File | Blob | string | Buffer; | ||
| 89 | + CacheControl?: string; | ||
| 90 | + ContentDisposition?: string; | ||
| 91 | + ContentEncoding?: string; | ||
| 92 | + ContentType?: string; | ||
| 93 | + Expires?: string; | ||
| 94 | + StorageClass?: string; | ||
| 95 | + onProgress?: (progressData: ProgressInfo) => void; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + // 响应数据结构 | ||
| 99 | + export interface ResponseData { | ||
| 100 | + statusCode: number; | ||
| 101 | + headers: Record<string, string>; | ||
| 102 | + Location: string; | ||
| 103 | + ETag: string; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + // 错误处理 | ||
| 107 | + export interface ErrorData { | ||
| 108 | + statusCode?: number; | ||
| 109 | + error?: Error; | ||
| 110 | + message?: string; | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + // 回调函数类型 | ||
| 114 | + type Callback<T> = (error: ErrorData | null, data: T & ResponseData) => void; | ||
| 115 | + | ||
| 116 | + // COS 核心类 | ||
| 117 | + export class COS { | ||
| 118 | + constructor(options: COSOptions); | ||
| 119 | + | ||
| 120 | + // 对象操作 | ||
| 121 | + uploadFile( | ||
| 122 | + params: UploadParams, | ||
| 123 | + callback?: Callback<{ Location: string; ETag: string }>, | ||
| 124 | + ): Promise<ResponseData>; | ||
| 125 | + | ||
| 126 | + getObject( | ||
| 127 | + params: { | ||
| 128 | + Bucket: string; | ||
| 129 | + Region: string; | ||
| 130 | + Key: string; | ||
| 131 | + ResponseContentType?: string; | ||
| 132 | + }, | ||
| 133 | + callback?: Callback<{ Body: Buffer }>, | ||
| 134 | + ): Promise<ResponseData & { Body: Buffer }>; | ||
| 135 | + | ||
| 136 | + deleteObject( | ||
| 137 | + params: { | ||
| 138 | + Bucket: string; | ||
| 139 | + Region: string; | ||
| 140 | + Key: string; | ||
| 141 | + }, | ||
| 142 | + callback?: Callback<void>, | ||
| 143 | + ): Promise<ResponseData>; | ||
| 144 | + | ||
| 145 | + // 存储桶操作 | ||
| 146 | + getBucket( | ||
| 147 | + params: { | ||
| 148 | + Bucket: string; | ||
| 149 | + Region: string; | ||
| 150 | + Prefix?: string; | ||
| 151 | + Marker?: string; | ||
| 152 | + MaxKeys?: number; | ||
| 153 | + }, | ||
| 154 | + callback?: Callback<{ | ||
| 155 | + Contents: { | ||
| 156 | + Key: string; | ||
| 157 | + LastModified: string; | ||
| 158 | + ETag: string; | ||
| 159 | + Size: number; | ||
| 160 | + StorageClass: string; | ||
| 161 | + }[]; | ||
| 162 | + }>, | ||
| 163 | + ): Promise<ResponseData>; | ||
| 164 | + | ||
| 165 | + // 分片上传 | ||
| 166 | + sliceUploadFile( | ||
| 167 | + params: UploadParams & { | ||
| 168 | + TaskReady?: (taskId: string) => void; | ||
| 169 | + onHashProgress?: (progressData: ProgressInfo) => void; | ||
| 170 | + onProgress?: (progressData: ProgressInfo) => void; | ||
| 171 | + }, | ||
| 172 | + callback?: Callback<{ Location: string; ETag: string }>, | ||
| 173 | + ): Promise<ResponseData>; | ||
| 174 | + } | ||
| 175 | + | ||
| 176 | + // 浏览器环境 File 类型扩展 | ||
| 177 | + export interface File extends Blob { | ||
| 178 | + readonly lastModified: number; | ||
| 179 | + readonly name: string; | ||
| 180 | + } | ||
| 181 | + | ||
| 182 | + export default COS; | ||
| 183 | +} |
| 1 | -export type FileProps = { | ||
| 2 | - fileData: Blob | null; | ||
| 3 | - setFileData: React.Dispatch<React.SetStateAction<Blob | null>>; | 1 | +export type PanelProps = { |
| 4 | previewUrl: string | null; | 2 | previewUrl: string | null; |
| 5 | setPreviewUrl: React.Dispatch<React.SetStateAction<string | null>>; | 3 | setPreviewUrl: React.Dispatch<React.SetStateAction<string | null>>; |
| 6 | isLoading: boolean; | 4 | isLoading: boolean; |
app/utils/fileUtil.ts
0 → 100644
| 1 | +import { getExcelData } from "./fileExport/export2Excel"; | ||
| 2 | +import { getWordData } from "./fileExport/word"; | ||
| 3 | +import { getPdfData } from "./fileExport/toPdf"; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 提取文件的扩展名 | ||
| 7 | + * @param filename 原始文件名 | ||
| 8 | + * @returns 文件扩展名(例如 ".jpg") | ||
| 9 | + */ | ||
| 10 | +function getFileExtension(filename: string): string { | ||
| 11 | + const lastDotIndex = filename.lastIndexOf("."); | ||
| 12 | + return lastDotIndex === -1 ? "" : filename.substring(lastDotIndex); | ||
| 13 | +} | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * 清理文件名,替换非字母数字字符为下划线并截断长度 | ||
| 17 | + * @param filename 待处理的文件名(不含扩展名) | ||
| 18 | + * @param maxLength 文件名最大长度,默认50 | ||
| 19 | + * @returns 清理后的文件名 | ||
| 20 | + */ | ||
| 21 | +function cleanFileName(filename: string, maxLength: number = 50): string { | ||
| 22 | + const cleaned = filename | ||
| 23 | + .replace(/[^a-zA-Z0-9]/g, "_") // 非字母数字替换为下划线 | ||
| 24 | + .replace(/_+/g, "_") // 合并连续下划线 | ||
| 25 | + .replace(/^_+|_+$/g, "") // 去除首尾下划线 | ||
| 26 | + .substring(0, maxLength); // 截断到指定长度 | ||
| 27 | + return cleaned; | ||
| 28 | +} | ||
| 29 | + | ||
| 30 | +/** | ||
| 31 | + * 生成安全的随机字符串 | ||
| 32 | + * @param length 字符串长度,默认8 | ||
| 33 | + * @returns 随机字符串 | ||
| 34 | + */ | ||
| 35 | +function generateRandomString(length: number = 8): string { | ||
| 36 | + const characters = | ||
| 37 | + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | ||
| 38 | + let result = ""; | ||
| 39 | + | ||
| 40 | + // 优先使用加密安全的随机数生成器 | ||
| 41 | + if (typeof crypto !== "undefined" && crypto.getRandomValues) { | ||
| 42 | + const values = new Uint8Array(length); | ||
| 43 | + crypto.getRandomValues(values); | ||
| 44 | + for (let i = 0; i < length; i++) { | ||
| 45 | + result += characters[values[i] % characters.length]; | ||
| 46 | + } | ||
| 47 | + } else { | ||
| 48 | + // 降级方案:使用 Math.random() | ||
| 49 | + for (let i = 0; i < length; i++) { | ||
| 50 | + result += characters[Math.floor(Math.random() * characters.length)]; | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | + return result; | ||
| 54 | +} | ||
| 55 | + | ||
| 56 | +/** | ||
| 57 | + * 生成唯一文件名 | ||
| 58 | + * @param originalFileName 原始文件名 | ||
| 59 | + * @returns 格式为 [清理后的名称]_[时间戳]_[随机字符串].[扩展名] | ||
| 60 | + */ | ||
| 61 | +export function generateUniqueFileName(originalFileName: string): string { | ||
| 62 | + const ext = getFileExtension(originalFileName); | ||
| 63 | + const nameWithoutExt = originalFileName.slice(0, -ext.length); | ||
| 64 | + const cleanedName = cleanFileName(nameWithoutExt); | ||
| 65 | + const timestamp = Date.now().toString(); | ||
| 66 | + const randomStr = generateRandomString(8); | ||
| 67 | + | ||
| 68 | + // 组合最终文件名 | ||
| 69 | + const uniquePart = `${timestamp}_${randomStr}`; | ||
| 70 | + const newName = cleanedName ? `${cleanedName}_${uniquePart}` : uniquePart; | ||
| 71 | + return `${newName}${ext}`; | ||
| 72 | +} | ||
| 73 | + | ||
| 74 | +export async function getFileByUrl(url: string): Promise<File> { | ||
| 75 | + try { | ||
| 76 | + // 1. 发起网络请求获取图片数据 | ||
| 77 | + const response = await fetch(url); | ||
| 78 | + if (!response.ok) { | ||
| 79 | + throw new Error(`HTTP error! Status: ${response.status}`); | ||
| 80 | + } | ||
| 81 | + // 2. 提取文件名(处理URL中的特殊字符) | ||
| 82 | + const parsedUrl = new URL(url); | ||
| 83 | + let filename = "image.png"; | ||
| 84 | + // 移除文件名中的查询参数和哈希片段(如 "image.jpg?param=1#section" → "image.jpg") | ||
| 85 | + filename = filename.split(/[?#]/)[0]; | ||
| 86 | + // 3. 获取 MIME 类型(优先使用响应头类型) | ||
| 87 | + const mimeType = response.headers.get("Content-Type") || ""; | ||
| 88 | + // 4. 转换为 Blob 并生成 File 对象 | ||
| 89 | + const blob = await response.blob(); | ||
| 90 | + return new File([blob], filename, { | ||
| 91 | + type: mimeType || blob.type, // 双重保障类型 | ||
| 92 | + lastModified: Date.now(), | ||
| 93 | + }); | ||
| 94 | + } catch (error) { | ||
| 95 | + throw new Error("Failed to download image"); | ||
| 96 | + } | ||
| 97 | +} | ||
| 98 | + | ||
| 99 | +export async function processChatFile(): Promise<{ | ||
| 100 | + data: string; | ||
| 101 | + name: string; | ||
| 102 | +}> { | ||
| 103 | + return new Promise((resolve, reject) => { | ||
| 104 | + // 创建隐藏的文件输入元素 | ||
| 105 | + const fileInput = document.createElement("input"); | ||
| 106 | + fileInput.type = "file"; | ||
| 107 | + fileInput.accept = ".xlsx, .xls, .pdf, .docx, .doc"; | ||
| 108 | + fileInput.multiple = false; | ||
| 109 | + fileInput.style.display = "none"; | ||
| 110 | + | ||
| 111 | + // 文件类型与处理函数映射 | ||
| 112 | + const fileHandlers: Record<string, (file: File) => Promise<any>> = { | ||
| 113 | + ".xlsx": getExcelData, | ||
| 114 | + ".xls": getExcelData, | ||
| 115 | + ".doc": getWordData, | ||
| 116 | + ".docx": getWordData, | ||
| 117 | + ".pdf": getPdfData, | ||
| 118 | + }; | ||
| 119 | + | ||
| 120 | + fileInput.onchange = async (event: Event) => { | ||
| 121 | + try { | ||
| 122 | + const input = event.target as HTMLInputElement; | ||
| 123 | + const file = input.files?.[0]; | ||
| 124 | + if (!file) throw new Error("No file selected"); | ||
| 125 | + | ||
| 126 | + // 获取文件扩展名并校验类型 | ||
| 127 | + const fileExt = file.name | ||
| 128 | + .toLowerCase() | ||
| 129 | + .slice(file.name.lastIndexOf(".")); | ||
| 130 | + if (!Object.keys(fileHandlers).includes(fileExt)) { | ||
| 131 | + throw new Error("Unsupported file type"); | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + // 处理文件内容 | ||
| 135 | + const handler = fileHandlers[fileExt]; | ||
| 136 | + const filedata = await handler(file); | ||
| 137 | + | ||
| 138 | + // 格式化返回数据 | ||
| 139 | + const data = `'''filedata | ||
| 140 | + ${file.name} | ||
| 141 | + ${JSON.stringify(filedata)} | ||
| 142 | + '''filedata`; | ||
| 143 | + resolve({ data: data, name: file.name }); | ||
| 144 | + } catch (error) { | ||
| 145 | + reject(error instanceof Error ? error : new Error(String(error))); | ||
| 146 | + } finally { | ||
| 147 | + fileInput.remove(); | ||
| 148 | + } | ||
| 149 | + }; | ||
| 150 | + | ||
| 151 | + // 触发文件选择 | ||
| 152 | + document.body.appendChild(fileInput); | ||
| 153 | + fileInput.click(); | ||
| 154 | + }); | ||
| 155 | +} |
| @@ -10,7 +10,10 @@ export function getWrtingPrompt(param: writePromptParam): string { | @@ -10,7 +10,10 @@ export function getWrtingPrompt(param: writePromptParam): string { | ||
| 10 | writingLanguageName, | 10 | writingLanguageName, |
| 11 | prompt, | 11 | prompt, |
| 12 | writingCount, | 12 | writingCount, |
| 13 | + fileData, | ||
| 13 | } = param; | 14 | } = param; |
| 15 | + console.log("********************", fileData); | ||
| 16 | + console.log("**********************", prompt); | ||
| 14 | 17 | ||
| 15 | // 根据用途调整文案类型描述 | 18 | // 根据用途调整文案类型描述 |
| 16 | const purposeMap: Record<string, string> = { | 19 | const purposeMap: Record<string, string> = { |
| @@ -41,7 +44,6 @@ export function getWrtingPrompt(param: writePromptParam): string { | @@ -41,7 +44,6 @@ export function getWrtingPrompt(param: writePromptParam): string { | ||
| 41 | if (isImgName === "是") { | 44 | if (isImgName === "是") { |
| 42 | const purpose = purposeMap[rawPurpose] || "公司官网的介绍"; | 45 | const purpose = purposeMap[rawPurpose] || "公司官网的介绍"; |
| 43 | const style = styleMap[rawStyle] || "专业的风格"; | 46 | const style = styleMap[rawStyle] || "专业的风格"; |
| 44 | - | ||
| 45 | isImg = `要求图文混排,需符合以下要求: | 47 | isImg = `要求图文混排,需符合以下要求: |
| 46 | 文案要配上图片,实现图文混排,要美观,要符合${purpose}的排版标准和写作风格,写作风格要${style}, | 48 | 文案要配上图片,实现图文混排,要美观,要符合${purpose}的排版标准和写作风格,写作风格要${style}, |
| 47 | 你没有图片没关系,把图文混排的效果实现,并在你认为要插入图片的地方将图片的Prompt用英文输出给:,记得图片地址后面的?nologo=true一定不能去掉了, | 49 | 你没有图片没关系,把图文混排的效果实现,并在你认为要插入图片的地方将图片的Prompt用英文输出给:,记得图片地址后面的?nologo=true一定不能去掉了, |
| @@ -49,8 +51,16 @@ export function getWrtingPrompt(param: writePromptParam): string { | @@ -49,8 +51,16 @@ export function getWrtingPrompt(param: writePromptParam): string { | ||
| 49 | } | 51 | } |
| 50 | const writingTypeName = typeMap[rawType] || "产品推广文案"; | 52 | const writingTypeName = typeMap[rawType] || "产品推广文案"; |
| 51 | 53 | ||
| 54 | + let filePrompt = ""; | ||
| 55 | + if (fileData) { | ||
| 56 | + filePrompt = `并结合以下文件内容: | ||
| 57 | + ${fileData} | ||
| 58 | + `; | ||
| 59 | + } | ||
| 60 | + | ||
| 52 | return `请用${writingLanguageName}撰写一篇关于【${prompt}】的${writingTypeName}: | 61 | return `请用${writingLanguageName}撰写一篇关于【${prompt}】的${writingTypeName}: |
| 53 | ${isImg} | 62 | ${isImg} |
| 63 | + ${filePrompt} | ||
| 54 | 具体要求: | 64 | 具体要求: |
| 55 | 1. 写作风格:${styleMap[rawStyle] || "专业"} | 65 | 1. 写作风格:${styleMap[rawStyle] || "专业"} |
| 56 | 2. 字数要求:不少于${writingCount}字(不计代码) | 66 | 2. 字数要求:不少于${writingCount}字(不计代码) |
app/utils/tencentCos.ts
0 → 100644
| 1 | +import COS from "cos-js-sdk-v5"; | ||
| 2 | +import { generateUniqueFileName } from "./fileUtil"; | ||
| 3 | + | ||
| 4 | +const cos = new COS({ | ||
| 5 | + SecretId: "AKIDMWTChxzmKejaChy0sWv50h9NM7g17ze6", | ||
| 6 | + SecretKey: "GMEWfZFilbCYfYDeqoX2IJ6g292g5GCu", | ||
| 7 | +}); | ||
| 8 | + | ||
| 9 | +export async function cosUploadImage(file: File, dir: string): Promise<string> { | ||
| 10 | + return new Promise((resolve, reject) => { | ||
| 11 | + cos.uploadFile( | ||
| 12 | + { | ||
| 13 | + Bucket: "baolinaitanjie-1253433799", | ||
| 14 | + Region: "ap-guangzhou", | ||
| 15 | + Key: `${dir}/${generateUniqueFileName(file.name)}`, | ||
| 16 | + Body: file, | ||
| 17 | + }, | ||
| 18 | + (err, data) => { | ||
| 19 | + if (err) { | ||
| 20 | + reject(err); | ||
| 21 | + } else { | ||
| 22 | + resolve(data.Location); | ||
| 23 | + } | ||
| 24 | + }, | ||
| 25 | + ); | ||
| 26 | + }); | ||
| 27 | +} |
| @@ -15,7 +15,9 @@ | @@ -15,7 +15,9 @@ | ||
| 15 | "@radix-ui/react-slot": "^1.1.2", | 15 | "@radix-ui/react-slot": "^1.1.2", |
| 16 | "@svgr/webpack": "^6.5.1", | 16 | "@svgr/webpack": "^6.5.1", |
| 17 | "@tinymce/tinymce-react": "^6.1.0", | 17 | "@tinymce/tinymce-react": "^6.1.0", |
| 18 | + "@types/html-to-pdfmake": "^2.4.4", | ||
| 18 | "@types/mdast": "^4.0.4", | 19 | "@types/mdast": "^4.0.4", |
| 20 | + "@types/pdfmake": "^0.2.11", | ||
| 19 | "@types/tinymce": "^4.6.9", | 21 | "@types/tinymce": "^4.6.9", |
| 20 | "@vercel/analytics": "^0.1.11", | 22 | "@vercel/analytics": "^0.1.11", |
| 21 | "@vercel/speed-insights": "^1.0.2", | 23 | "@vercel/speed-insights": "^1.0.2", |
| @@ -24,12 +26,12 @@ | @@ -24,12 +26,12 @@ | ||
| 24 | "axios": "^1.7.5", | 26 | "axios": "^1.7.5", |
| 25 | "cheerio": "^1.0.0", | 27 | "cheerio": "^1.0.0", |
| 26 | "clsx": "^2.1.1", | 28 | "clsx": "^2.1.1", |
| 29 | + "cos-js-sdk-v5": "^1.8.7", | ||
| 27 | "docx": "^9.3.0", | 30 | "docx": "^9.3.0", |
| 28 | "docxtemplater": "^3.60.1", | 31 | "docxtemplater": "^3.60.1", |
| 29 | "echarts": "^5.6.0", | 32 | "echarts": "^5.6.0", |
| 30 | "emoji-picker-react": "^4.9.2", | 33 | "emoji-picker-react": "^4.9.2", |
| 31 | "file-saver": "^2.0.5", | 34 | "file-saver": "^2.0.5", |
| 32 | - "fs-extra": "^11.3.0", | ||
| 33 | "fuse.js": "^7.0.0", | 35 | "fuse.js": "^7.0.0", |
| 34 | "heic2any": "^0.0.4", | 36 | "heic2any": "^0.0.4", |
| 35 | "html-to-image": "^1.11.11", | 37 | "html-to-image": "^1.11.11", |
| @@ -71,7 +73,6 @@ | @@ -71,7 +73,6 @@ | ||
| 71 | "@testing-library/jest-dom": "^6.6.3", | 73 | "@testing-library/jest-dom": "^6.6.3", |
| 72 | "@testing-library/react": "^16.1.0", | 74 | "@testing-library/react": "^16.1.0", |
| 73 | "@types/file-saver": "^2.0.7", | 75 | "@types/file-saver": "^2.0.7", |
| 74 | - "@types/fs-extra": "^11.0.4", | ||
| 75 | "@types/html-docx-js": "^0.3.4", | 76 | "@types/html-docx-js": "^0.3.4", |
| 76 | "@types/html-to-draftjs": "^1.5.0", | 77 | "@types/html-to-draftjs": "^1.5.0", |
| 77 | "@types/jest": "^29.5.14", | 78 | "@types/jest": "^29.5.14", |
| @@ -4815,17 +4816,6 @@ | @@ -4815,17 +4816,6 @@ | ||
| 4815 | "dev": true, | 4816 | "dev": true, |
| 4816 | "license": "MIT" | 4817 | "license": "MIT" |
| 4817 | }, | 4818 | }, |
| 4818 | - "node_modules/@types/fs-extra": { | ||
| 4819 | - "version": "11.0.4", | ||
| 4820 | - "resolved": "https://registry.npmmirror.com/@types/fs-extra/-/fs-extra-11.0.4.tgz", | ||
| 4821 | - "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", | ||
| 4822 | - "dev": true, | ||
| 4823 | - "license": "MIT", | ||
| 4824 | - "dependencies": { | ||
| 4825 | - "@types/jsonfile": "*", | ||
| 4826 | - "@types/node": "*" | ||
| 4827 | - } | ||
| 4828 | - }, | ||
| 4829 | "node_modules/@types/graceful-fs": { | 4819 | "node_modules/@types/graceful-fs": { |
| 4830 | "version": "4.1.9", | 4820 | "version": "4.1.9", |
| 4831 | "resolved": "https://registry.npmmirror.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", | 4821 | "resolved": "https://registry.npmmirror.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", |
| @@ -4875,6 +4865,16 @@ | @@ -4875,6 +4865,16 @@ | ||
| 4875 | "@types/draft-js": "*" | 4865 | "@types/draft-js": "*" |
| 4876 | } | 4866 | } |
| 4877 | }, | 4867 | }, |
| 4868 | + "node_modules/@types/html-to-pdfmake": { | ||
| 4869 | + "version": "2.4.4", | ||
| 4870 | + "resolved": "https://registry.npmmirror.com/@types/html-to-pdfmake/-/html-to-pdfmake-2.4.4.tgz", | ||
| 4871 | + "integrity": "sha512-2dt44vpbftXWuObFP3UmQwsl6BGCuByxa6IXaIVLn1TqvWDJ6ithkKbiTuWjxmlpCG9vrLJNZYnckbuKQPf19w==", | ||
| 4872 | + "license": "MIT", | ||
| 4873 | + "dependencies": { | ||
| 4874 | + "@types/jsdom": "*", | ||
| 4875 | + "@types/pdfmake": "*" | ||
| 4876 | + } | ||
| 4877 | + }, | ||
| 4878 | "node_modules/@types/istanbul-lib-coverage": { | 4878 | "node_modules/@types/istanbul-lib-coverage": { |
| 4879 | "version": "2.0.6", | 4879 | "version": "2.0.6", |
| 4880 | "resolved": "https://registry.npmmirror.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", | 4880 | "resolved": "https://registry.npmmirror.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", |
| @@ -4933,7 +4933,6 @@ | @@ -4933,7 +4933,6 @@ | ||
| 4933 | "version": "20.0.1", | 4933 | "version": "20.0.1", |
| 4934 | "resolved": "https://registry.npmmirror.com/@types/jsdom/-/jsdom-20.0.1.tgz", | 4934 | "resolved": "https://registry.npmmirror.com/@types/jsdom/-/jsdom-20.0.1.tgz", |
| 4935 | "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", | 4935 | "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", |
| 4936 | - "dev": true, | ||
| 4937 | "license": "MIT", | 4936 | "license": "MIT", |
| 4938 | "dependencies": { | 4937 | "dependencies": { |
| 4939 | "@types/node": "*", | 4938 | "@types/node": "*", |
| @@ -4955,16 +4954,6 @@ | @@ -4955,16 +4954,6 @@ | ||
| 4955 | "dev": true, | 4954 | "dev": true, |
| 4956 | "license": "MIT" | 4955 | "license": "MIT" |
| 4957 | }, | 4956 | }, |
| 4958 | - "node_modules/@types/jsonfile": { | ||
| 4959 | - "version": "6.1.4", | ||
| 4960 | - "resolved": "https://registry.npmmirror.com/@types/jsonfile/-/jsonfile-6.1.4.tgz", | ||
| 4961 | - "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", | ||
| 4962 | - "dev": true, | ||
| 4963 | - "license": "MIT", | ||
| 4964 | - "dependencies": { | ||
| 4965 | - "@types/node": "*" | ||
| 4966 | - } | ||
| 4967 | - }, | ||
| 4968 | "node_modules/@types/jszip": { | 4957 | "node_modules/@types/jszip": { |
| 4969 | "version": "3.4.0", | 4958 | "version": "3.4.0", |
| 4970 | "resolved": "https://registry.npmmirror.com/@types/jszip/-/jszip-3.4.0.tgz", | 4959 | "resolved": "https://registry.npmmirror.com/@types/jszip/-/jszip-3.4.0.tgz", |
| @@ -5017,7 +5006,6 @@ | @@ -5017,7 +5006,6 @@ | ||
| 5017 | "version": "20.17.24", | 5006 | "version": "20.17.24", |
| 5018 | "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.17.24.tgz", | 5007 | "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.17.24.tgz", |
| 5019 | "integrity": "sha512-d7fGCyB96w9BnWQrOsJtpyiSaBcAYYr75bnK6ZRjDbql2cGLj/3GsL5OYmLPNq76l7Gf2q4Rv9J2o6h5CrD9sA==", | 5008 | "integrity": "sha512-d7fGCyB96w9BnWQrOsJtpyiSaBcAYYr75bnK6ZRjDbql2cGLj/3GsL5OYmLPNq76l7Gf2q4Rv9J2o6h5CrD9sA==", |
| 5020 | - "dev": true, | ||
| 5021 | "license": "MIT", | 5009 | "license": "MIT", |
| 5022 | "dependencies": { | 5010 | "dependencies": { |
| 5023 | "undici-types": "~6.19.2" | 5011 | "undici-types": "~6.19.2" |
| @@ -5029,6 +5017,25 @@ | @@ -5029,6 +5017,25 @@ | ||
| 5029 | "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", | 5017 | "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", |
| 5030 | "license": "MIT" | 5018 | "license": "MIT" |
| 5031 | }, | 5019 | }, |
| 5020 | + "node_modules/@types/pdfkit": { | ||
| 5021 | + "version": "0.13.9", | ||
| 5022 | + "resolved": "https://registry.npmmirror.com/@types/pdfkit/-/pdfkit-0.13.9.tgz", | ||
| 5023 | + "integrity": "sha512-RDG8Yb1zT7I01FfpwK7nMSA433XWpblMqSCtA5vJlSyavWZb303HUYPCel6JTiDDFqwGLvtAnYbH8N/e0Cb89g==", | ||
| 5024 | + "license": "MIT", | ||
| 5025 | + "dependencies": { | ||
| 5026 | + "@types/node": "*" | ||
| 5027 | + } | ||
| 5028 | + }, | ||
| 5029 | + "node_modules/@types/pdfmake": { | ||
| 5030 | + "version": "0.2.11", | ||
| 5031 | + "resolved": "https://registry.npmmirror.com/@types/pdfmake/-/pdfmake-0.2.11.tgz", | ||
| 5032 | + "integrity": "sha512-gglgMQhnG6C2kco13DJlvokqTxL+XKxHwCejElH8fSCNF9ZCkRK6Mzo011jQ0zuug+YlIgn6BpcpZrARyWdW3Q==", | ||
| 5033 | + "license": "MIT", | ||
| 5034 | + "dependencies": { | ||
| 5035 | + "@types/node": "*", | ||
| 5036 | + "@types/pdfkit": "*" | ||
| 5037 | + } | ||
| 5038 | + }, | ||
| 5032 | "node_modules/@types/prop-types": { | 5039 | "node_modules/@types/prop-types": { |
| 5033 | "version": "15.7.5", | 5040 | "version": "15.7.5", |
| 5034 | "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", | 5041 | "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", |
| @@ -5112,7 +5119,6 @@ | @@ -5112,7 +5119,6 @@ | ||
| 5112 | "version": "4.0.5", | 5119 | "version": "4.0.5", |
| 5113 | "resolved": "https://registry.npmmirror.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", | 5120 | "resolved": "https://registry.npmmirror.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", |
| 5114 | "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", | 5121 | "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", |
| 5115 | - "dev": true, | ||
| 5116 | "license": "MIT" | 5122 | "license": "MIT" |
| 5117 | }, | 5123 | }, |
| 5118 | "node_modules/@types/trusted-types": { | 5124 | "node_modules/@types/trusted-types": { |
| @@ -6922,18 +6928,6 @@ | @@ -6922,18 +6928,6 @@ | ||
| 6922 | "node": ">= 0.4.0" | 6928 | "node": ">= 0.4.0" |
| 6923 | } | 6929 | } |
| 6924 | }, | 6930 | }, |
| 6925 | - "node_modules/buffer": { | ||
| 6926 | - "version": "4.9.2", | ||
| 6927 | - "resolved": "https://registry.npmmirror.com/buffer/-/buffer-4.9.2.tgz", | ||
| 6928 | - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", | ||
| 6929 | - "license": "MIT", | ||
| 6930 | - "peer": true, | ||
| 6931 | - "dependencies": { | ||
| 6932 | - "base64-js": "^1.0.2", | ||
| 6933 | - "ieee754": "^1.1.4", | ||
| 6934 | - "isarray": "^1.0.0" | ||
| 6935 | - } | ||
| 6936 | - }, | ||
| 6937 | "node_modules/buffer-from": { | 6931 | "node_modules/buffer-from": { |
| 6938 | "version": "1.1.2", | 6932 | "version": "1.1.2", |
| 6939 | "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", | 6933 | "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", |
| @@ -6947,13 +6941,6 @@ | @@ -6947,13 +6941,6 @@ | ||
| 6947 | "license": "MIT", | 6941 | "license": "MIT", |
| 6948 | "peer": true | 6942 | "peer": true |
| 6949 | }, | 6943 | }, |
| 6950 | - "node_modules/buffer/node_modules/isarray": { | ||
| 6951 | - "version": "1.0.0", | ||
| 6952 | - "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", | ||
| 6953 | - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", | ||
| 6954 | - "license": "MIT", | ||
| 6955 | - "peer": true | ||
| 6956 | - }, | ||
| 6957 | "node_modules/builtin-status-codes": { | 6944 | "node_modules/builtin-status-codes": { |
| 6958 | "version": "3.0.0", | 6945 | "version": "3.0.0", |
| 6959 | "resolved": "https://registry.npmmirror.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", | 6946 | "resolved": "https://registry.npmmirror.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", |
| @@ -7979,6 +7966,37 @@ | @@ -7979,6 +7966,37 @@ | ||
| 7979 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", | 7966 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", |
| 7980 | "license": "MIT" | 7967 | "license": "MIT" |
| 7981 | }, | 7968 | }, |
| 7969 | + "node_modules/cos-js-sdk-v5": { | ||
| 7970 | + "version": "1.8.7", | ||
| 7971 | + "resolved": "https://registry.npmmirror.com/cos-js-sdk-v5/-/cos-js-sdk-v5-1.8.7.tgz", | ||
| 7972 | + "integrity": "sha512-KK3PYbUiLxcjvVhyvEeBQRWzDgAmuldDZQL1lTRM0aeQaI+hlm84xQQQyv+oIRxPnnAIleZF2vUgB4sJFUzcxQ==", | ||
| 7973 | + "license": "ISC", | ||
| 7974 | + "dependencies": { | ||
| 7975 | + "fast-xml-parser": "4.5.0" | ||
| 7976 | + } | ||
| 7977 | + }, | ||
| 7978 | + "node_modules/cos-js-sdk-v5/node_modules/fast-xml-parser": { | ||
| 7979 | + "version": "4.5.0", | ||
| 7980 | + "resolved": "https://registry.npmmirror.com/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz", | ||
| 7981 | + "integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==", | ||
| 7982 | + "funding": [ | ||
| 7983 | + { | ||
| 7984 | + "type": "github", | ||
| 7985 | + "url": "https://github.com/sponsors/NaturalIntelligence" | ||
| 7986 | + }, | ||
| 7987 | + { | ||
| 7988 | + "type": "paypal", | ||
| 7989 | + "url": "https://paypal.me/naturalintelligence" | ||
| 7990 | + } | ||
| 7991 | + ], | ||
| 7992 | + "license": "MIT", | ||
| 7993 | + "dependencies": { | ||
| 7994 | + "strnum": "^1.0.5" | ||
| 7995 | + }, | ||
| 7996 | + "bin": { | ||
| 7997 | + "fxparser": "src/cli/cli.js" | ||
| 7998 | + } | ||
| 7999 | + }, | ||
| 7982 | "node_modules/cose-base": { | 8000 | "node_modules/cose-base": { |
| 7983 | "version": "1.0.3", | 8001 | "version": "1.0.3", |
| 7984 | "resolved": "https://registry.npmmirror.com/cose-base/-/cose-base-1.0.3.tgz", | 8002 | "resolved": "https://registry.npmmirror.com/cose-base/-/cose-base-1.0.3.tgz", |
| @@ -11001,29 +11019,6 @@ | @@ -11001,29 +11019,6 @@ | ||
| 11001 | "readable-stream": "^2.0.0" | 11019 | "readable-stream": "^2.0.0" |
| 11002 | } | 11020 | } |
| 11003 | }, | 11021 | }, |
| 11004 | - "node_modules/fs-extra": { | ||
| 11005 | - "version": "11.3.0", | ||
| 11006 | - "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.3.0.tgz", | ||
| 11007 | - "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", | ||
| 11008 | - "license": "MIT", | ||
| 11009 | - "dependencies": { | ||
| 11010 | - "graceful-fs": "^4.2.0", | ||
| 11011 | - "jsonfile": "^6.0.1", | ||
| 11012 | - "universalify": "^2.0.0" | ||
| 11013 | - }, | ||
| 11014 | - "engines": { | ||
| 11015 | - "node": ">=14.14" | ||
| 11016 | - } | ||
| 11017 | - }, | ||
| 11018 | - "node_modules/fs-extra/node_modules/universalify": { | ||
| 11019 | - "version": "2.0.1", | ||
| 11020 | - "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", | ||
| 11021 | - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", | ||
| 11022 | - "license": "MIT", | ||
| 11023 | - "engines": { | ||
| 11024 | - "node": ">= 10.0.0" | ||
| 11025 | - } | ||
| 11026 | - }, | ||
| 11027 | "node_modules/fs-minipass": { | 11022 | "node_modules/fs-minipass": { |
| 11028 | "version": "2.1.0", | 11023 | "version": "2.1.0", |
| 11029 | "resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-2.1.0.tgz", | 11024 | "resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-2.1.0.tgz", |
| @@ -11435,13 +11430,13 @@ | @@ -11435,13 +11430,13 @@ | ||
| 11435 | } | 11430 | } |
| 11436 | }, | 11431 | }, |
| 11437 | "node_modules/has-tostringtag": { | 11432 | "node_modules/has-tostringtag": { |
| 11438 | - "version": "1.0.0", | ||
| 11439 | - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", | ||
| 11440 | - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", | 11433 | + "version": "1.0.2", |
| 11434 | + "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz", | ||
| 11435 | + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", | ||
| 11441 | "dev": true, | 11436 | "dev": true, |
| 11442 | "license": "MIT", | 11437 | "license": "MIT", |
| 11443 | "dependencies": { | 11438 | "dependencies": { |
| 11444 | - "has-symbols": "^1.0.2" | 11439 | + "has-symbols": "^1.0.3" |
| 11445 | }, | 11440 | }, |
| 11446 | "engines": { | 11441 | "engines": { |
| 11447 | "node": ">= 0.4" | 11442 | "node": ">= 0.4" |
| @@ -12494,14 +12489,16 @@ | @@ -12494,14 +12489,16 @@ | ||
| 12494 | "license": "MIT" | 12489 | "license": "MIT" |
| 12495 | }, | 12490 | }, |
| 12496 | "node_modules/is-regex": { | 12491 | "node_modules/is-regex": { |
| 12497 | - "version": "1.1.4", | ||
| 12498 | - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", | ||
| 12499 | - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", | 12492 | + "version": "1.2.1", |
| 12493 | + "resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.2.1.tgz", | ||
| 12494 | + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", | ||
| 12500 | "dev": true, | 12495 | "dev": true, |
| 12501 | "license": "MIT", | 12496 | "license": "MIT", |
| 12502 | "dependencies": { | 12497 | "dependencies": { |
| 12503 | - "call-bind": "^1.0.2", | ||
| 12504 | - "has-tostringtag": "^1.0.0" | 12498 | + "call-bound": "^1.0.2", |
| 12499 | + "gopd": "^1.2.0", | ||
| 12500 | + "has-tostringtag": "^1.0.2", | ||
| 12501 | + "hasown": "^2.0.2" | ||
| 12505 | }, | 12502 | }, |
| 12506 | "engines": { | 12503 | "engines": { |
| 12507 | "node": ">= 0.4" | 12504 | "node": ">= 0.4" |
| @@ -14554,27 +14551,6 @@ | @@ -14554,27 +14551,6 @@ | ||
| 14554 | "node": ">=6" | 14551 | "node": ">=6" |
| 14555 | } | 14552 | } |
| 14556 | }, | 14553 | }, |
| 14557 | - "node_modules/jsonfile": { | ||
| 14558 | - "version": "6.1.0", | ||
| 14559 | - "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.1.0.tgz", | ||
| 14560 | - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", | ||
| 14561 | - "license": "MIT", | ||
| 14562 | - "dependencies": { | ||
| 14563 | - "universalify": "^2.0.0" | ||
| 14564 | - }, | ||
| 14565 | - "optionalDependencies": { | ||
| 14566 | - "graceful-fs": "^4.1.6" | ||
| 14567 | - } | ||
| 14568 | - }, | ||
| 14569 | - "node_modules/jsonfile/node_modules/universalify": { | ||
| 14570 | - "version": "2.0.1", | ||
| 14571 | - "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", | ||
| 14572 | - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", | ||
| 14573 | - "license": "MIT", | ||
| 14574 | - "engines": { | ||
| 14575 | - "node": ">= 10.0.0" | ||
| 14576 | - } | ||
| 14577 | - }, | ||
| 14578 | "node_modules/jspdf": { | 14554 | "node_modules/jspdf": { |
| 14579 | "version": "3.0.1", | 14555 | "version": "3.0.1", |
| 14580 | "resolved": "https://registry.npmmirror.com/jspdf/-/jspdf-3.0.1.tgz", | 14556 | "resolved": "https://registry.npmmirror.com/jspdf/-/jspdf-3.0.1.tgz", |
| @@ -15678,6 +15654,19 @@ | @@ -15678,6 +15654,19 @@ | ||
| 15678 | "web-worker": "^1.2.0" | 15654 | "web-worker": "^1.2.0" |
| 15679 | } | 15655 | } |
| 15680 | }, | 15656 | }, |
| 15657 | + "node_modules/mermaid/node_modules/uuid": { | ||
| 15658 | + "version": "9.0.1", | ||
| 15659 | + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-9.0.1.tgz", | ||
| 15660 | + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", | ||
| 15661 | + "funding": [ | ||
| 15662 | + "https://github.com/sponsors/broofa", | ||
| 15663 | + "https://github.com/sponsors/ctavan" | ||
| 15664 | + ], | ||
| 15665 | + "license": "MIT", | ||
| 15666 | + "bin": { | ||
| 15667 | + "uuid": "dist/bin/uuid" | ||
| 15668 | + } | ||
| 15669 | + }, | ||
| 15681 | "node_modules/micromark": { | 15670 | "node_modules/micromark": { |
| 15682 | "version": "3.1.0", | 15671 | "version": "3.1.0", |
| 15683 | "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.1.0.tgz", | 15672 | "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.1.0.tgz", |
| @@ -16797,6 +16786,32 @@ | @@ -16797,6 +16786,32 @@ | ||
| 16797 | "vm-browserify": "^1.0.1" | 16786 | "vm-browserify": "^1.0.1" |
| 16798 | } | 16787 | } |
| 16799 | }, | 16788 | }, |
| 16789 | + "node_modules/node-libs-browser/node_modules/buffer": { | ||
| 16790 | + "version": "4.9.2", | ||
| 16791 | + "resolved": "https://registry.npmmirror.com/buffer/-/buffer-4.9.2.tgz", | ||
| 16792 | + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", | ||
| 16793 | + "license": "MIT", | ||
| 16794 | + "peer": true, | ||
| 16795 | + "dependencies": { | ||
| 16796 | + "base64-js": "^1.0.2", | ||
| 16797 | + "ieee754": "^1.1.4", | ||
| 16798 | + "isarray": "^1.0.0" | ||
| 16799 | + } | ||
| 16800 | + }, | ||
| 16801 | + "node_modules/node-libs-browser/node_modules/inherits": { | ||
| 16802 | + "version": "2.0.3", | ||
| 16803 | + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.3.tgz", | ||
| 16804 | + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", | ||
| 16805 | + "license": "ISC", | ||
| 16806 | + "peer": true | ||
| 16807 | + }, | ||
| 16808 | + "node_modules/node-libs-browser/node_modules/isarray": { | ||
| 16809 | + "version": "1.0.0", | ||
| 16810 | + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", | ||
| 16811 | + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", | ||
| 16812 | + "license": "MIT", | ||
| 16813 | + "peer": true | ||
| 16814 | + }, | ||
| 16800 | "node_modules/node-libs-browser/node_modules/punycode": { | 16815 | "node_modules/node-libs-browser/node_modules/punycode": { |
| 16801 | "version": "1.4.1", | 16816 | "version": "1.4.1", |
| 16802 | "resolved": "https://registry.npmmirror.com/punycode/-/punycode-1.4.1.tgz", | 16817 | "resolved": "https://registry.npmmirror.com/punycode/-/punycode-1.4.1.tgz", |
| @@ -16804,6 +16819,27 @@ | @@ -16804,6 +16819,27 @@ | ||
| 16804 | "license": "MIT", | 16819 | "license": "MIT", |
| 16805 | "peer": true | 16820 | "peer": true |
| 16806 | }, | 16821 | }, |
| 16822 | + "node_modules/node-libs-browser/node_modules/stream-browserify": { | ||
| 16823 | + "version": "2.0.2", | ||
| 16824 | + "resolved": "https://registry.npmmirror.com/stream-browserify/-/stream-browserify-2.0.2.tgz", | ||
| 16825 | + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", | ||
| 16826 | + "license": "MIT", | ||
| 16827 | + "peer": true, | ||
| 16828 | + "dependencies": { | ||
| 16829 | + "inherits": "~2.0.1", | ||
| 16830 | + "readable-stream": "^2.0.2" | ||
| 16831 | + } | ||
| 16832 | + }, | ||
| 16833 | + "node_modules/node-libs-browser/node_modules/util": { | ||
| 16834 | + "version": "0.11.1", | ||
| 16835 | + "resolved": "https://registry.npmmirror.com/util/-/util-0.11.1.tgz", | ||
| 16836 | + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", | ||
| 16837 | + "license": "MIT", | ||
| 16838 | + "peer": true, | ||
| 16839 | + "dependencies": { | ||
| 16840 | + "inherits": "2.0.3" | ||
| 16841 | + } | ||
| 16842 | + }, | ||
| 16807 | "node_modules/node-releases": { | 16843 | "node_modules/node-releases": { |
| 16808 | "version": "2.0.19", | 16844 | "version": "2.0.19", |
| 16809 | "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.19.tgz", | 16845 | "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.19.tgz", |
| @@ -20044,15 +20080,18 @@ | @@ -20044,15 +20080,18 @@ | ||
| 20044 | } | 20080 | } |
| 20045 | }, | 20081 | }, |
| 20046 | "node_modules/safe-regex-test": { | 20082 | "node_modules/safe-regex-test": { |
| 20047 | - "version": "1.0.0", | ||
| 20048 | - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", | ||
| 20049 | - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", | 20083 | + "version": "1.1.0", |
| 20084 | + "resolved": "https://registry.npmmirror.com/safe-regex-test/-/safe-regex-test-1.1.0.tgz", | ||
| 20085 | + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", | ||
| 20050 | "dev": true, | 20086 | "dev": true, |
| 20051 | "license": "MIT", | 20087 | "license": "MIT", |
| 20052 | "dependencies": { | 20088 | "dependencies": { |
| 20053 | - "call-bind": "^1.0.2", | ||
| 20054 | - "get-intrinsic": "^1.1.3", | ||
| 20055 | - "is-regex": "^1.1.4" | 20089 | + "call-bound": "^1.0.2", |
| 20090 | + "es-errors": "^1.3.0", | ||
| 20091 | + "is-regex": "^1.2.1" | ||
| 20092 | + }, | ||
| 20093 | + "engines": { | ||
| 20094 | + "node": ">= 0.4" | ||
| 20056 | }, | 20095 | }, |
| 20057 | "funding": { | 20096 | "funding": { |
| 20058 | "url": "https://github.com/sponsors/ljharb" | 20097 | "url": "https://github.com/sponsors/ljharb" |
| @@ -20831,17 +20870,6 @@ | @@ -20831,17 +20870,6 @@ | ||
| 20831 | "node": ">= 0.4" | 20870 | "node": ">= 0.4" |
| 20832 | } | 20871 | } |
| 20833 | }, | 20872 | }, |
| 20834 | - "node_modules/stream-browserify": { | ||
| 20835 | - "version": "2.0.2", | ||
| 20836 | - "resolved": "https://registry.npmmirror.com/stream-browserify/-/stream-browserify-2.0.2.tgz", | ||
| 20837 | - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", | ||
| 20838 | - "license": "MIT", | ||
| 20839 | - "peer": true, | ||
| 20840 | - "dependencies": { | ||
| 20841 | - "inherits": "~2.0.1", | ||
| 20842 | - "readable-stream": "^2.0.2" | ||
| 20843 | - } | ||
| 20844 | - }, | ||
| 20845 | "node_modules/stream-each": { | 20873 | "node_modules/stream-each": { |
| 20846 | "version": "1.2.3", | 20874 | "version": "1.2.3", |
| 20847 | "resolved": "https://registry.npmmirror.com/stream-each/-/stream-each-1.2.3.tgz", | 20875 | "resolved": "https://registry.npmmirror.com/stream-each/-/stream-each-1.2.3.tgz", |
| @@ -21073,6 +21101,18 @@ | @@ -21073,6 +21101,18 @@ | ||
| 21073 | "url": "https://github.com/sponsors/sindresorhus" | 21101 | "url": "https://github.com/sponsors/sindresorhus" |
| 21074 | } | 21102 | } |
| 21075 | }, | 21103 | }, |
| 21104 | + "node_modules/strnum": { | ||
| 21105 | + "version": "1.1.2", | ||
| 21106 | + "resolved": "https://registry.npmmirror.com/strnum/-/strnum-1.1.2.tgz", | ||
| 21107 | + "integrity": "sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA==", | ||
| 21108 | + "funding": [ | ||
| 21109 | + { | ||
| 21110 | + "type": "github", | ||
| 21111 | + "url": "https://github.com/sponsors/NaturalIntelligence" | ||
| 21112 | + } | ||
| 21113 | + ], | ||
| 21114 | + "license": "MIT" | ||
| 21115 | + }, | ||
| 21076 | "node_modules/style-to-object": { | 21116 | "node_modules/style-to-object": { |
| 21077 | "version": "0.4.1", | 21117 | "version": "0.4.1", |
| 21078 | "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.1.tgz", | 21118 | "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.1.tgz", |
| @@ -21774,7 +21814,6 @@ | @@ -21774,7 +21814,6 @@ | ||
| 21774 | "version": "6.19.8", | 21814 | "version": "6.19.8", |
| 21775 | "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.19.8.tgz", | 21815 | "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.19.8.tgz", |
| 21776 | "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", | 21816 | "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", |
| 21777 | - "dev": true, | ||
| 21778 | "license": "MIT" | 21817 | "license": "MIT" |
| 21779 | }, | 21818 | }, |
| 21780 | "node_modules/unicode-canonical-property-names-ecmascript": { | 21819 | "node_modules/unicode-canonical-property-names-ecmascript": { |
| @@ -22204,29 +22243,12 @@ | @@ -22204,29 +22243,12 @@ | ||
| 22204 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" | 22243 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" |
| 22205 | } | 22244 | } |
| 22206 | }, | 22245 | }, |
| 22207 | - "node_modules/util": { | ||
| 22208 | - "version": "0.11.1", | ||
| 22209 | - "resolved": "https://registry.npmmirror.com/util/-/util-0.11.1.tgz", | ||
| 22210 | - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", | ||
| 22211 | - "license": "MIT", | ||
| 22212 | - "peer": true, | ||
| 22213 | - "dependencies": { | ||
| 22214 | - "inherits": "2.0.3" | ||
| 22215 | - } | ||
| 22216 | - }, | ||
| 22217 | "node_modules/util-deprecate": { | 22246 | "node_modules/util-deprecate": { |
| 22218 | "version": "1.0.2", | 22247 | "version": "1.0.2", |
| 22219 | "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", | 22248 | "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", |
| 22220 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", | 22249 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", |
| 22221 | "license": "MIT" | 22250 | "license": "MIT" |
| 22222 | }, | 22251 | }, |
| 22223 | - "node_modules/util/node_modules/inherits": { | ||
| 22224 | - "version": "2.0.3", | ||
| 22225 | - "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.3.tgz", | ||
| 22226 | - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", | ||
| 22227 | - "license": "ISC", | ||
| 22228 | - "peer": true | ||
| 22229 | - }, | ||
| 22230 | "node_modules/utrie": { | 22252 | "node_modules/utrie": { |
| 22231 | "version": "1.0.2", | 22253 | "version": "1.0.2", |
| 22232 | "resolved": "https://registry.npmmirror.com/utrie/-/utrie-1.0.2.tgz", | 22254 | "resolved": "https://registry.npmmirror.com/utrie/-/utrie-1.0.2.tgz", |
| @@ -22236,15 +22258,6 @@ | @@ -22236,15 +22258,6 @@ | ||
| 22236 | "base64-arraybuffer": "^1.0.2" | 22258 | "base64-arraybuffer": "^1.0.2" |
| 22237 | } | 22259 | } |
| 22238 | }, | 22260 | }, |
| 22239 | - "node_modules/uuid": { | ||
| 22240 | - "version": "9.0.0", | ||
| 22241 | - "resolved": "https://registry.npmmirror.com/uuid/-/uuid-9.0.0.tgz", | ||
| 22242 | - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", | ||
| 22243 | - "license": "MIT", | ||
| 22244 | - "bin": { | ||
| 22245 | - "uuid": "dist/bin/uuid" | ||
| 22246 | - } | ||
| 22247 | - }, | ||
| 22248 | "node_modules/uvu": { | 22261 | "node_modules/uvu": { |
| 22249 | "version": "0.5.6", | 22262 | "version": "0.5.6", |
| 22250 | "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", | 22263 | "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", |
| @@ -40,8 +40,8 @@ | @@ -40,8 +40,8 @@ | ||
| 40 | "axios": "^1.7.5", | 40 | "axios": "^1.7.5", |
| 41 | "cheerio": "^1.0.0", | 41 | "cheerio": "^1.0.0", |
| 42 | "clsx": "^2.1.1", | 42 | "clsx": "^2.1.1", |
| 43 | + "cos-js-sdk-v5": "^1.8.7", | ||
| 43 | "docx": "^9.3.0", | 44 | "docx": "^9.3.0", |
| 44 | - "docxtemplater": "^3.60.1", | ||
| 45 | "echarts": "^5.6.0", | 45 | "echarts": "^5.6.0", |
| 46 | "emoji-picker-react": "^4.9.2", | 46 | "emoji-picker-react": "^4.9.2", |
| 47 | "file-saver": "^2.0.5", | 47 | "file-saver": "^2.0.5", |
| @@ -2299,7 +2299,7 @@ | @@ -2299,7 +2299,7 @@ | ||
| 2299 | 2299 | ||
| 2300 | "@tinymce/tinymce-react@^6.1.0": | 2300 | "@tinymce/tinymce-react@^6.1.0": |
| 2301 | version "6.1.0" | 2301 | version "6.1.0" |
| 2302 | - resolved "https://registry.npmmirror.com/@tinymce/tinymce-react/-/tinymce-react-6.1.0.tgz#1c53bc9790f46e5f0502764c2c421562b03176c2" | 2302 | + resolved "https://registry.npmmirror.com/@tinymce/tinymce-react/-/tinymce-react-6.1.0.tgz" |
| 2303 | integrity sha512-K0MP3yYVKe8+etUwsg6zyRq+q9TGLaVf005WiBHiB8JZEomAwbBPERGunhU9uOqNQ5gJs8yVOPZ68Xcd1UHclA== | 2303 | integrity sha512-K0MP3yYVKe8+etUwsg6zyRq+q9TGLaVf005WiBHiB8JZEomAwbBPERGunhU9uOqNQ5gJs8yVOPZ68Xcd1UHclA== |
| 2304 | dependencies: | 2304 | dependencies: |
| 2305 | prop-types "^15.6.2" | 2305 | prop-types "^15.6.2" |
| @@ -2512,7 +2512,7 @@ | @@ -2512,7 +2512,7 @@ | ||
| 2512 | 2512 | ||
| 2513 | "@types/html-to-pdfmake@^2.4.4": | 2513 | "@types/html-to-pdfmake@^2.4.4": |
| 2514 | version "2.4.4" | 2514 | version "2.4.4" |
| 2515 | - resolved "https://registry.npmmirror.com/@types/html-to-pdfmake/-/html-to-pdfmake-2.4.4.tgz#42f97eaaf69ecb68f701b686e56fd914e1780b81" | 2515 | + resolved "https://registry.npmmirror.com/@types/html-to-pdfmake/-/html-to-pdfmake-2.4.4.tgz" |
| 2516 | integrity sha512-2dt44vpbftXWuObFP3UmQwsl6BGCuByxa6IXaIVLn1TqvWDJ6ithkKbiTuWjxmlpCG9vrLJNZYnckbuKQPf19w== | 2516 | integrity sha512-2dt44vpbftXWuObFP3UmQwsl6BGCuByxa6IXaIVLn1TqvWDJ6ithkKbiTuWjxmlpCG9vrLJNZYnckbuKQPf19w== |
| 2517 | dependencies: | 2517 | dependencies: |
| 2518 | "@types/jsdom" "*" | 2518 | "@types/jsdom" "*" |
| @@ -2547,7 +2547,7 @@ | @@ -2547,7 +2547,7 @@ | ||
| 2547 | 2547 | ||
| 2548 | "@types/jquery@*": | 2548 | "@types/jquery@*": |
| 2549 | version "3.5.32" | 2549 | version "3.5.32" |
| 2550 | - resolved "https://registry.npmmirror.com/@types/jquery/-/jquery-3.5.32.tgz#3eb0da20611b92c7c49ebed6163b52a4fdc57def" | 2550 | + resolved "https://registry.npmmirror.com/@types/jquery/-/jquery-3.5.32.tgz" |
| 2551 | integrity sha512-b9Xbf4CkMqS02YH8zACqN1xzdxc3cO735Qe5AbSUFmyOiaWAbcpqh9Wna+Uk0vgACvoQHpWDg2rGdHkYPLmCiQ== | 2551 | integrity sha512-b9Xbf4CkMqS02YH8zACqN1xzdxc3cO735Qe5AbSUFmyOiaWAbcpqh9Wna+Uk0vgACvoQHpWDg2rGdHkYPLmCiQ== |
| 2552 | dependencies: | 2552 | dependencies: |
| 2553 | "@types/sizzle" "*" | 2553 | "@types/sizzle" "*" |
| @@ -2557,16 +2557,7 @@ | @@ -2557,16 +2557,7 @@ | ||
| 2557 | resolved "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz" | 2557 | resolved "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz" |
| 2558 | integrity sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg== | 2558 | integrity sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg== |
| 2559 | 2559 | ||
| 2560 | -"@types/jsdom@*": | ||
| 2561 | - version "21.1.7" | ||
| 2562 | - resolved "https://registry.npmmirror.com/@types/jsdom/-/jsdom-21.1.7.tgz#9edcb09e0b07ce876e7833922d3274149c898cfa" | ||
| 2563 | - integrity sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA== | ||
| 2564 | - dependencies: | ||
| 2565 | - "@types/node" "*" | ||
| 2566 | - "@types/tough-cookie" "*" | ||
| 2567 | - parse5 "^7.0.0" | ||
| 2568 | - | ||
| 2569 | -"@types/jsdom@^20.0.0": | 2560 | +"@types/jsdom@*", "@types/jsdom@^20.0.0": |
| 2570 | version "20.0.1" | 2561 | version "20.0.1" |
| 2571 | resolved "https://registry.npmmirror.com/@types/jsdom/-/jsdom-20.0.1.tgz" | 2562 | resolved "https://registry.npmmirror.com/@types/jsdom/-/jsdom-20.0.1.tgz" |
| 2572 | integrity sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ== | 2563 | integrity sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ== |
| @@ -2654,14 +2645,14 @@ | @@ -2654,14 +2645,14 @@ | ||
| 2654 | 2645 | ||
| 2655 | "@types/pdfkit@*": | 2646 | "@types/pdfkit@*": |
| 2656 | version "0.13.9" | 2647 | version "0.13.9" |
| 2657 | - resolved "https://registry.npmmirror.com/@types/pdfkit/-/pdfkit-0.13.9.tgz#0acf17575737c8856a946e5dfad35ad444b510a1" | 2648 | + resolved "https://registry.npmmirror.com/@types/pdfkit/-/pdfkit-0.13.9.tgz" |
| 2658 | integrity sha512-RDG8Yb1zT7I01FfpwK7nMSA433XWpblMqSCtA5vJlSyavWZb303HUYPCel6JTiDDFqwGLvtAnYbH8N/e0Cb89g== | 2649 | integrity sha512-RDG8Yb1zT7I01FfpwK7nMSA433XWpblMqSCtA5vJlSyavWZb303HUYPCel6JTiDDFqwGLvtAnYbH8N/e0Cb89g== |
| 2659 | dependencies: | 2650 | dependencies: |
| 2660 | "@types/node" "*" | 2651 | "@types/node" "*" |
| 2661 | 2652 | ||
| 2662 | "@types/pdfmake@*", "@types/pdfmake@^0.2.11": | 2653 | "@types/pdfmake@*", "@types/pdfmake@^0.2.11": |
| 2663 | version "0.2.11" | 2654 | version "0.2.11" |
| 2664 | - resolved "https://registry.npmmirror.com/@types/pdfmake/-/pdfmake-0.2.11.tgz#ca5475efe44c966e88aed90040670f562ac1eebc" | 2655 | + resolved "https://registry.npmmirror.com/@types/pdfmake/-/pdfmake-0.2.11.tgz" |
| 2665 | integrity sha512-gglgMQhnG6C2kco13DJlvokqTxL+XKxHwCejElH8fSCNF9ZCkRK6Mzo011jQ0zuug+YlIgn6BpcpZrARyWdW3Q== | 2656 | integrity sha512-gglgMQhnG6C2kco13DJlvokqTxL+XKxHwCejElH8fSCNF9ZCkRK6Mzo011jQ0zuug+YlIgn6BpcpZrARyWdW3Q== |
| 2666 | dependencies: | 2657 | dependencies: |
| 2667 | "@types/node" "*" | 2658 | "@types/node" "*" |
| @@ -2707,7 +2698,7 @@ | @@ -2707,7 +2698,7 @@ | ||
| 2707 | 2698 | ||
| 2708 | "@types/sizzle@*": | 2699 | "@types/sizzle@*": |
| 2709 | version "2.3.9" | 2700 | version "2.3.9" |
| 2710 | - resolved "https://registry.npmmirror.com/@types/sizzle/-/sizzle-2.3.9.tgz#d4597dbd4618264c414d7429363e3f50acb66ea2" | 2701 | + resolved "https://registry.npmmirror.com/@types/sizzle/-/sizzle-2.3.9.tgz" |
| 2711 | integrity sha512-xzLEyKB50yqCUPUJkIsrVvoWNfFUbIZI+RspLWt8u+tIW/BetMBZtgV2LY/2o+tYH8dRvQ+eoPf3NdhQCcLE2w== | 2702 | integrity sha512-xzLEyKB50yqCUPUJkIsrVvoWNfFUbIZI+RspLWt8u+tIW/BetMBZtgV2LY/2o+tYH8dRvQ+eoPf3NdhQCcLE2w== |
| 2712 | 2703 | ||
| 2713 | "@types/spark-md5@^3.0.4": | 2704 | "@types/spark-md5@^3.0.4": |
| @@ -2722,7 +2713,7 @@ | @@ -2722,7 +2713,7 @@ | ||
| 2722 | 2713 | ||
| 2723 | "@types/tinymce@^4.6.9": | 2714 | "@types/tinymce@^4.6.9": |
| 2724 | version "4.6.9" | 2715 | version "4.6.9" |
| 2725 | - resolved "https://registry.npmmirror.com/@types/tinymce/-/tinymce-4.6.9.tgz#4d347b3831b35d59514fab2ab90c5d500e844ee2" | 2716 | + resolved "https://registry.npmmirror.com/@types/tinymce/-/tinymce-4.6.9.tgz" |
| 2726 | integrity sha512-pDxBUlV4v1jgJ97SlnVOSyf3KUy3OQ3s5Ddpfh1L9M5lXlBmX7TJ2OLSozx1WBxp91acHvYPWDwz2U/kMM1oxQ== | 2717 | integrity sha512-pDxBUlV4v1jgJ97SlnVOSyf3KUy3OQ3s5Ddpfh1L9M5lXlBmX7TJ2OLSozx1WBxp91acHvYPWDwz2U/kMM1oxQ== |
| 2727 | dependencies: | 2718 | dependencies: |
| 2728 | "@types/jquery" "*" | 2719 | "@types/jquery" "*" |
| @@ -2971,11 +2962,6 @@ | @@ -2971,11 +2962,6 @@ | ||
| 2971 | resolved "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz" | 2962 | resolved "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz" |
| 2972 | integrity sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw== | 2963 | integrity sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw== |
| 2973 | 2964 | ||
| 2974 | -"@xmldom/xmldom@^0.9.7": | ||
| 2975 | - version "0.9.8" | ||
| 2976 | - resolved "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.9.8.tgz" | ||
| 2977 | - integrity sha512-p96FSY54r+WJ50FIOsCOjyj/wavs8921hG5+kVMmZgKcvIKxMXHTrjNJvRgWa/zuX3B6t2lijLNFaOyuxUH+2A== | ||
| 2978 | - | ||
| 2979 | "@xtuc/ieee754@^1.2.0": | 2965 | "@xtuc/ieee754@^1.2.0": |
| 2980 | version "1.2.0" | 2966 | version "1.2.0" |
| 2981 | resolved "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz" | 2967 | resolved "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz" |
| @@ -3888,6 +3874,13 @@ core-util-is@~1.0.0: | @@ -3888,6 +3874,13 @@ core-util-is@~1.0.0: | ||
| 3888 | resolved "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz" | 3874 | resolved "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz" |
| 3889 | integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== | 3875 | integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== |
| 3890 | 3876 | ||
| 3877 | +cos-js-sdk-v5@^1.8.7: | ||
| 3878 | + version "1.8.7" | ||
| 3879 | + resolved "https://registry.npmmirror.com/cos-js-sdk-v5/-/cos-js-sdk-v5-1.8.7.tgz" | ||
| 3880 | + integrity sha512-KK3PYbUiLxcjvVhyvEeBQRWzDgAmuldDZQL1lTRM0aeQaI+hlm84xQQQyv+oIRxPnnAIleZF2vUgB4sJFUzcxQ== | ||
| 3881 | + dependencies: | ||
| 3882 | + fast-xml-parser "4.5.0" | ||
| 3883 | + | ||
| 3891 | cose-base@^1.0.0: | 3884 | cose-base@^1.0.0: |
| 3892 | version "1.0.3" | 3885 | version "1.0.3" |
| 3893 | resolved "https://registry.npmmirror.com/cose-base/-/cose-base-1.0.3.tgz" | 3886 | resolved "https://registry.npmmirror.com/cose-base/-/cose-base-1.0.3.tgz" |
| @@ -4546,13 +4539,6 @@ docx@^9.3.0: | @@ -4546,13 +4539,6 @@ docx@^9.3.0: | ||
| 4546 | xml "^1.0.1" | 4539 | xml "^1.0.1" |
| 4547 | xml-js "^1.6.8" | 4540 | xml-js "^1.6.8" |
| 4548 | 4541 | ||
| 4549 | -docxtemplater@^3.60.1: | ||
| 4550 | - version "3.60.1" | ||
| 4551 | - resolved "https://registry.npmmirror.com/docxtemplater/-/docxtemplater-3.60.1.tgz" | ||
| 4552 | - integrity sha512-xf9C8AbA2GhmUSJQSNomjWpPjVD38k60yP+21eRsVtawTyl+tQ8N9V+alZbuG0dbDvA04OQtpxnEpNL2gF5AkA== | ||
| 4553 | - dependencies: | ||
| 4554 | - "@xmldom/xmldom" "^0.9.7" | ||
| 4555 | - | ||
| 4556 | dom-accessibility-api@^0.5.9: | 4542 | dom-accessibility-api@^0.5.9: |
| 4557 | version "0.5.16" | 4543 | version "0.5.16" |
| 4558 | resolved "https://registry.npmmirror.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz" | 4544 | resolved "https://registry.npmmirror.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz" |
| @@ -5232,6 +5218,13 @@ fast-levenshtein@^2.0.6: | @@ -5232,6 +5218,13 @@ fast-levenshtein@^2.0.6: | ||
| 5232 | resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" | 5218 | resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" |
| 5233 | integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== | 5219 | integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== |
| 5234 | 5220 | ||
| 5221 | +fast-xml-parser@4.5.0: | ||
| 5222 | + version "4.5.0" | ||
| 5223 | + resolved "https://registry.npmmirror.com/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz" | ||
| 5224 | + integrity sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg== | ||
| 5225 | + dependencies: | ||
| 5226 | + strnum "^1.0.5" | ||
| 5227 | + | ||
| 5235 | fastq@^1.6.0: | 5228 | fastq@^1.6.0: |
| 5236 | version "1.15.0" | 5229 | version "1.15.0" |
| 5237 | resolved "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz" | 5230 | resolved "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz" |
| @@ -5569,7 +5562,7 @@ gopd@^1.0.1, gopd@^1.2.0: | @@ -5569,7 +5562,7 @@ gopd@^1.0.1, gopd@^1.2.0: | ||
| 5569 | 5562 | ||
| 5570 | graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: | 5563 | graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: |
| 5571 | version "4.2.11" | 5564 | version "4.2.11" |
| 5572 | - resolved "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" | 5565 | + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" |
| 5573 | integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== | 5566 | integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== |
| 5574 | 5567 | ||
| 5575 | graphemer@^1.4.0: | 5568 | graphemer@^1.4.0: |
| @@ -5609,12 +5602,12 @@ has-symbols@^1.0.2, has-symbols@^1.0.3, has-symbols@^1.1.0: | @@ -5609,12 +5602,12 @@ has-symbols@^1.0.2, has-symbols@^1.0.3, has-symbols@^1.1.0: | ||
| 5609 | resolved "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz" | 5602 | resolved "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz" |
| 5610 | integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== | 5603 | integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== |
| 5611 | 5604 | ||
| 5612 | -has-tostringtag@^1.0.0: | ||
| 5613 | - version "1.0.0" | ||
| 5614 | - resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz" | ||
| 5615 | - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== | 5605 | +has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: |
| 5606 | + version "1.0.2" | ||
| 5607 | + resolved "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz" | ||
| 5608 | + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== | ||
| 5616 | dependencies: | 5609 | dependencies: |
| 5617 | - has-symbols "^1.0.2" | 5610 | + has-symbols "^1.0.3" |
| 5618 | 5611 | ||
| 5619 | has@^1.0.3: | 5612 | has@^1.0.3: |
| 5620 | version "1.0.3" | 5613 | version "1.0.3" |
| @@ -6060,13 +6053,15 @@ is-potential-custom-element-name@^1.0.1: | @@ -6060,13 +6053,15 @@ is-potential-custom-element-name@^1.0.1: | ||
| 6060 | resolved "https://registry.npmmirror.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz" | 6053 | resolved "https://registry.npmmirror.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz" |
| 6061 | integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== | 6054 | integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== |
| 6062 | 6055 | ||
| 6063 | -is-regex@^1.1.4: | ||
| 6064 | - version "1.1.4" | ||
| 6065 | - resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" | ||
| 6066 | - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== | 6056 | +is-regex@^1.1.4, is-regex@^1.2.1: |
| 6057 | + version "1.2.1" | ||
| 6058 | + resolved "https://registry.npmmirror.com/is-regex/-/is-regex-1.2.1.tgz" | ||
| 6059 | + integrity sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g== | ||
| 6067 | dependencies: | 6060 | dependencies: |
| 6068 | - call-bind "^1.0.2" | ||
| 6069 | - has-tostringtag "^1.0.0" | 6061 | + call-bound "^1.0.2" |
| 6062 | + gopd "^1.2.0" | ||
| 6063 | + has-tostringtag "^1.0.2" | ||
| 6064 | + hasown "^2.0.2" | ||
| 6070 | 6065 | ||
| 6071 | is-set@^2.0.1, is-set@^2.0.2: | 6066 | is-set@^2.0.1, is-set@^2.0.2: |
| 6072 | version "2.0.2" | 6067 | version "2.0.2" |
| @@ -8907,13 +8902,13 @@ safe-buffer@^5.1.0, safe-buffer@~5.1.0, safe-buffer@~5.1.1: | @@ -8907,13 +8902,13 @@ safe-buffer@^5.1.0, safe-buffer@~5.1.0, safe-buffer@~5.1.1: | ||
| 8907 | integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== | 8902 | integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== |
| 8908 | 8903 | ||
| 8909 | safe-regex-test@^1.0.0: | 8904 | safe-regex-test@^1.0.0: |
| 8910 | - version "1.0.0" | ||
| 8911 | - resolved "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz" | ||
| 8912 | - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== | 8905 | + version "1.1.0" |
| 8906 | + resolved "https://registry.npmmirror.com/safe-regex-test/-/safe-regex-test-1.1.0.tgz" | ||
| 8907 | + integrity sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw== | ||
| 8913 | dependencies: | 8908 | dependencies: |
| 8914 | - call-bind "^1.0.2" | ||
| 8915 | - get-intrinsic "^1.1.3" | ||
| 8916 | - is-regex "^1.1.4" | 8909 | + call-bound "^1.0.2" |
| 8910 | + es-errors "^1.3.0" | ||
| 8911 | + is-regex "^1.2.1" | ||
| 8917 | 8912 | ||
| 8918 | "safer-buffer@>= 2.1.2 < 3.0.0": | 8913 | "safer-buffer@>= 2.1.2 < 3.0.0": |
| 8919 | version "2.1.2" | 8914 | version "2.1.2" |
| @@ -9370,6 +9365,11 @@ strip-json-comments@^3.1.1: | @@ -9370,6 +9365,11 @@ strip-json-comments@^3.1.1: | ||
| 9370 | resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" | 9365 | resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" |
| 9371 | integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== | 9366 | integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== |
| 9372 | 9367 | ||
| 9368 | +strnum@^1.0.5: | ||
| 9369 | + version "1.1.2" | ||
| 9370 | + resolved "https://registry.npmmirror.com/strnum/-/strnum-1.1.2.tgz" | ||
| 9371 | + integrity sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA== | ||
| 9372 | + | ||
| 9373 | style-to-object@^0.4.0: | 9373 | style-to-object@^0.4.0: |
| 9374 | version "0.4.1" | 9374 | version "0.4.1" |
| 9375 | resolved "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.1.tgz" | 9375 | resolved "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.1.tgz" |
| @@ -9893,9 +9893,9 @@ utrie@^1.0.2: | @@ -9893,9 +9893,9 @@ utrie@^1.0.2: | ||
| 9893 | base64-arraybuffer "^1.0.2" | 9893 | base64-arraybuffer "^1.0.2" |
| 9894 | 9894 | ||
| 9895 | uuid@^9.0.0: | 9895 | uuid@^9.0.0: |
| 9896 | - version "9.0.0" | ||
| 9897 | - resolved "https://registry.npmmirror.com/uuid/-/uuid-9.0.0.tgz" | ||
| 9898 | - integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== | 9896 | + version "9.0.1" |
| 9897 | + resolved "https://registry.npmmirror.com/uuid/-/uuid-9.0.1.tgz" | ||
| 9898 | + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== | ||
| 9899 | 9899 | ||
| 9900 | uvu@^0.5.0: | 9900 | uvu@^0.5.0: |
| 9901 | version "0.5.6" | 9901 | version "0.5.6" |
-
请 注册 或 登录 后发表评论