markpdfdown 0.4.6 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -71135,6 +71135,8 @@ const List = () => {
|
|
|
71135
71135
|
const { t: t2 } = useTranslation("list");
|
|
71136
71136
|
const { t: tCommon } = useTranslation("common");
|
|
71137
71137
|
const cloudContext = reactExports.useContext(CloudContext);
|
|
71138
|
+
const cloudIsAuthenticated = cloudContext?.isAuthenticated ?? false;
|
|
71139
|
+
const cloudGetTasks = cloudContext?.getTasks;
|
|
71138
71140
|
const [loading, setLoading] = reactExports.useState(false);
|
|
71139
71141
|
const [data, setData] = reactExports.useState([]);
|
|
71140
71142
|
const [pagination, setPagination] = reactExports.useState({
|
|
@@ -71147,6 +71149,10 @@ const List = () => {
|
|
|
71147
71149
|
const pollTimerRef = reactExports.useRef(null);
|
|
71148
71150
|
const paginationRef = reactExports.useRef(pagination);
|
|
71149
71151
|
paginationRef.current = pagination;
|
|
71152
|
+
const pendingRefreshRef = reactExports.useRef(false);
|
|
71153
|
+
const refreshTimerRef = reactExports.useRef(null);
|
|
71154
|
+
const dataRef = reactExports.useRef(data);
|
|
71155
|
+
dataRef.current = data;
|
|
71150
71156
|
const MAX_FETCH_ITEMS = 100;
|
|
71151
71157
|
const buildLocalModelValue = (modelId, providerId) => `${modelId}@${providerId}`;
|
|
71152
71158
|
const parseLocalModelValue = (value) => {
|
|
@@ -71193,8 +71199,8 @@ const List = () => {
|
|
|
71193
71199
|
const promises = [
|
|
71194
71200
|
window.api.task.getAll({ page: 1, pageSize: MAX_FETCH_ITEMS })
|
|
71195
71201
|
];
|
|
71196
|
-
if (
|
|
71197
|
-
promises.push(
|
|
71202
|
+
if (cloudIsAuthenticated && cloudGetTasks) {
|
|
71203
|
+
promises.push(cloudGetTasks(1, MAX_FETCH_ITEMS));
|
|
71198
71204
|
}
|
|
71199
71205
|
const results = await Promise.all(promises);
|
|
71200
71206
|
const localResult = results[0];
|
|
@@ -71285,7 +71291,7 @@ const List = () => {
|
|
|
71285
71291
|
} finally {
|
|
71286
71292
|
setLoading(false);
|
|
71287
71293
|
}
|
|
71288
|
-
}, [message2, t2,
|
|
71294
|
+
}, [message2, t2, cloudIsAuthenticated, cloudGetTasks]);
|
|
71289
71295
|
const handleTaskEvent = reactExports.useCallback((event) => {
|
|
71290
71296
|
const { type: type4, taskId, task } = event;
|
|
71291
71297
|
console.log(`[List] Received task event: ${type4}`, { taskId, task });
|
|
@@ -71335,27 +71341,33 @@ const List = () => {
|
|
|
71335
71341
|
reactExports.useEffect(() => {
|
|
71336
71342
|
if (!window.api?.events?.onCloudTaskEvent) return;
|
|
71337
71343
|
console.log("[List] Registering cloud SSE event listener");
|
|
71338
|
-
let pendingRefresh = false;
|
|
71339
71344
|
const handleCloudEvent = (event) => {
|
|
71340
|
-
const { type: type4, data:
|
|
71345
|
+
const { type: type4, data: eventData } = event;
|
|
71341
71346
|
if (type4 === "heartbeat" || type4 === "connected") return;
|
|
71342
|
-
const taskId =
|
|
71347
|
+
const taskId = eventData.task_id;
|
|
71343
71348
|
if (!taskId) return;
|
|
71344
71349
|
console.log(`[List] Cloud SSE event: type=${type4}, task_id=${taskId}`);
|
|
71345
|
-
|
|
71346
|
-
|
|
71347
|
-
|
|
71348
|
-
|
|
71349
|
-
|
|
71350
|
-
|
|
71351
|
-
|
|
71352
|
-
fetchTasks(paginationRef.current.current, paginationRef.current.pageSize);
|
|
71353
|
-
}
|
|
71354
|
-
|
|
71355
|
-
|
|
71350
|
+
const currentData = dataRef.current;
|
|
71351
|
+
const index2 = currentData.findIndex((t22) => t22.id === taskId);
|
|
71352
|
+
if (index2 === -1) {
|
|
71353
|
+
if (!pendingRefreshRef.current) {
|
|
71354
|
+
pendingRefreshRef.current = true;
|
|
71355
|
+
refreshTimerRef.current = setTimeout(async () => {
|
|
71356
|
+
try {
|
|
71357
|
+
await fetchTasks(paginationRef.current.current, paginationRef.current.pageSize);
|
|
71358
|
+
} finally {
|
|
71359
|
+
pendingRefreshRef.current = false;
|
|
71360
|
+
refreshTimerRef.current = null;
|
|
71361
|
+
}
|
|
71362
|
+
}, 500);
|
|
71356
71363
|
}
|
|
71364
|
+
return;
|
|
71365
|
+
}
|
|
71366
|
+
setData((prevData) => {
|
|
71367
|
+
const idx = prevData.findIndex((t22) => t22.id === taskId);
|
|
71368
|
+
if (idx === -1) return prevData;
|
|
71357
71369
|
const newData = [...prevData];
|
|
71358
|
-
const task = { ...newData[
|
|
71370
|
+
const task = { ...newData[idx] };
|
|
71359
71371
|
switch (type4) {
|
|
71360
71372
|
case "page_started":
|
|
71361
71373
|
case "page_retry_started": {
|
|
@@ -71363,8 +71375,8 @@ const List = () => {
|
|
|
71363
71375
|
break;
|
|
71364
71376
|
}
|
|
71365
71377
|
case "page_completed": {
|
|
71366
|
-
const pageNumber =
|
|
71367
|
-
const totalPages =
|
|
71378
|
+
const pageNumber = eventData.page;
|
|
71379
|
+
const totalPages = eventData.total_pages || task.pages || 1;
|
|
71368
71380
|
if (task.status === 8) {
|
|
71369
71381
|
task.completed_count = (task.completed_count || 0) + 1;
|
|
71370
71382
|
task.failed_count = Math.max(0, (task.failed_count || 0) - 1);
|
|
@@ -71380,15 +71392,15 @@ const List = () => {
|
|
|
71380
71392
|
break;
|
|
71381
71393
|
}
|
|
71382
71394
|
case "completed": {
|
|
71383
|
-
task.status =
|
|
71395
|
+
task.status = eventData.status || 6;
|
|
71384
71396
|
task.progress = 100;
|
|
71385
|
-
task.completed_count =
|
|
71386
|
-
task.failed_count =
|
|
71397
|
+
task.completed_count = eventData.pages_completed;
|
|
71398
|
+
task.failed_count = eventData.pages_failed;
|
|
71387
71399
|
break;
|
|
71388
71400
|
}
|
|
71389
71401
|
case "error": {
|
|
71390
71402
|
task.status = 0;
|
|
71391
|
-
task.error =
|
|
71403
|
+
task.error = eventData.error;
|
|
71392
71404
|
break;
|
|
71393
71405
|
}
|
|
71394
71406
|
case "cancelled": {
|
|
@@ -71397,13 +71409,13 @@ const List = () => {
|
|
|
71397
71409
|
}
|
|
71398
71410
|
case "pdf_ready": {
|
|
71399
71411
|
task.status = 3;
|
|
71400
|
-
task.pages =
|
|
71412
|
+
task.pages = eventData.page_count;
|
|
71401
71413
|
break;
|
|
71402
71414
|
}
|
|
71403
71415
|
default:
|
|
71404
71416
|
return prevData;
|
|
71405
71417
|
}
|
|
71406
|
-
newData[
|
|
71418
|
+
newData[idx] = task;
|
|
71407
71419
|
if (task.id) {
|
|
71408
71420
|
const terminalStatuses = [0, 6, 7, 8];
|
|
71409
71421
|
if (terminalStatuses.includes(task.status ?? -1)) {
|
|
@@ -71424,6 +71436,11 @@ const List = () => {
|
|
|
71424
71436
|
return () => {
|
|
71425
71437
|
console.log("[List] Cleaning up cloud SSE event listener");
|
|
71426
71438
|
cleanup2();
|
|
71439
|
+
if (refreshTimerRef.current) {
|
|
71440
|
+
clearTimeout(refreshTimerRef.current);
|
|
71441
|
+
refreshTimerRef.current = null;
|
|
71442
|
+
pendingRefreshRef.current = false;
|
|
71443
|
+
}
|
|
71427
71444
|
};
|
|
71428
71445
|
}, [fetchTasks]);
|
|
71429
71446
|
reactExports.useEffect(() => {
|
|
@@ -72306,6 +72323,23 @@ const Provider = ({
|
|
|
72306
72323
|
)
|
|
72307
72324
|
] })
|
|
72308
72325
|
] }),
|
|
72326
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "provider-ad-banner", children: [
|
|
72327
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "provider-ad-banner__content", children: [
|
|
72328
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { className: "provider-ad-banner__brand", children: t2("ad_banner.title") }),
|
|
72329
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { className: "provider-ad-banner__text", children: t2("ad_banner.description") })
|
|
72330
|
+
] }),
|
|
72331
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
72332
|
+
"a",
|
|
72333
|
+
{
|
|
72334
|
+
className: "provider-ad-banner__link",
|
|
72335
|
+
href: "https://zenmux.ai/invite/9H70CU",
|
|
72336
|
+
target: "_blank",
|
|
72337
|
+
rel: "noreferrer",
|
|
72338
|
+
"aria-label": t2("ad_banner.cta_aria"),
|
|
72339
|
+
children: t2("ad_banner.cta")
|
|
72340
|
+
}
|
|
72341
|
+
)
|
|
72342
|
+
] }),
|
|
72309
72343
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { variant: "dashed", dashed: true, plain: true, children: t2("model_config.title") }),
|
|
72310
72344
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
72311
72345
|
List$1,
|
|
@@ -128998,6 +129032,7 @@ const enUpload = {
|
|
|
128998
129032
|
};
|
|
128999
129033
|
const details$5 = { "protocol_type": "Protocol:", "api_key_label": "API Key:", "api_key_placeholder": "Enter API key", "api_url_label": "API URL:", "api_url_placeholder": "Enter API URL", "no_suffix": "No Suffix" };
|
|
129000
129034
|
const model_config$5 = { "title": "Model Configuration", "name_label": "Model Name:", "name_placeholder": "GPT 4o", "id_label": "Model ID:", "id_placeholder": "gpt-4o", "add_button": "Add Model", "warning": "Note: Please add models that support vision recognition and ensure the Model ID is correct, otherwise the model will not work properly!" };
|
|
129035
|
+
const ad_banner$5 = { "title": "ZenMux: reliable enterprise-grade LLM API service", "description": "Get an extra 5–8% bonus on your first top-up", "cta": "Get it now", "cta_aria": "Get ZenMux enterprise-grade LLM API service" };
|
|
129001
129036
|
const actions$f = { "delete_provider": "Delete Provider", "delete_model_title": "Delete", "test_connection": "Test Connection" };
|
|
129002
129037
|
const confirmations$a = { "delete_model_title": "Confirm Delete", "delete_model_content": 'Are you sure you want to delete model "{{name}}"?', "delete_provider_title": "Confirm Delete", "delete_provider_content": "Are you sure you want to delete this provider? This action cannot be undone.", "ok": "Delete", "cancel": "Cancel" };
|
|
129003
129038
|
const messages$f = { "fetch_providers_failed": "Failed to fetch provider list", "fetch_details_failed": "Failed to fetch provider details", "fetch_models_failed": "Failed to fetch model list", "delete_model_success": "Model deleted successfully", "delete_model_failed": "Failed to delete model", "add_model_warning": "Please fill in complete model information", "add_model_success": "Model added successfully", "add_model_failed": "Failed to add model", "update_success": "Updated successfully", "update_failed": "Update failed", "test_success": "Model connection test successful", "test_failed": "Connection test failed", "delete_provider_success": "Provider deleted successfully", "delete_provider_failed": "Failed to delete provider", "update_status_failed": "Failed to update provider status", "fetch_model_list_failed": "Failed to fetch remote model list", "model_already_exists": "This model already exists in the list" };
|
|
@@ -129006,6 +129041,7 @@ const model_list$5 = { "button": "Model List", "modal_title": "Fetch Models from
|
|
|
129006
129041
|
const enProvider = {
|
|
129007
129042
|
details: details$5,
|
|
129008
129043
|
model_config: model_config$5,
|
|
129044
|
+
ad_banner: ad_banner$5,
|
|
129009
129045
|
actions: actions$f,
|
|
129010
129046
|
confirmations: confirmations$a,
|
|
129011
129047
|
messages: messages$f,
|
|
@@ -129186,6 +129222,7 @@ const zhUpload = {
|
|
|
129186
129222
|
};
|
|
129187
129223
|
const details$4 = { "protocol_type": "协议类型:", "api_key_label": "API 密钥:", "api_key_placeholder": "请输入API密钥", "api_url_label": "API 地址:", "api_url_placeholder": "请输入API地址", "no_suffix": "无后缀" };
|
|
129188
129224
|
const model_config$4 = { "title": "模型配置", "name_label": "模型名称:", "name_placeholder": "GPT 4o", "id_label": "模型ID:", "id_placeholder": "gpt-4o", "add_button": "添加模型", "warning": "注意:请添加支持视觉识别的模型,并确保模型ID正确,否则模型将无法正常使用!" };
|
|
129225
|
+
const ad_banner$4 = { "title": "ZenMux:可靠的企业级大模型API服务", "description": "首充可获5~8%额外赠送", "cta": "点击获取", "cta_aria": "点击获取 ZenMux 企业级大模型API服务" };
|
|
129189
129226
|
const actions$c = { "delete_provider": "删除服务商", "delete_model_title": "删除", "test_connection": "检查" };
|
|
129190
129227
|
const confirmations$8 = { "delete_model_title": "确认删除", "delete_model_content": '确定要删除模型"{{name}}"吗?', "delete_provider_title": "确认删除", "delete_provider_content": "确定要删除此服务商吗?删除后无法恢复。", "ok": "删除", "cancel": "取消" };
|
|
129191
129228
|
const messages$c = { "fetch_providers_failed": "获取服务商列表失败", "fetch_details_failed": "获取服务商详情失败", "fetch_models_failed": "获取模型列表失败", "delete_model_success": "模型已成功删除", "delete_model_failed": "删除模型失败", "add_model_warning": "请填写完整的模型信息", "add_model_success": "模型添加成功", "add_model_failed": "添加模型失败", "update_success": "更新成功", "update_failed": "更新失败", "test_success": "模型连接测试成功", "test_failed": "连接测试失败", "delete_provider_success": "服务商已成功删除", "delete_provider_failed": "删除服务商失败", "update_status_failed": "更新服务商状态失败", "fetch_model_list_failed": "获取远程模型列表失败", "model_already_exists": "该模型已存在于列表中" };
|
|
@@ -129194,6 +129231,7 @@ const model_list$4 = { "button": "模型列表", "modal_title": "从远程获取
|
|
|
129194
129231
|
const zhProvider = {
|
|
129195
129232
|
details: details$4,
|
|
129196
129233
|
model_config: model_config$4,
|
|
129234
|
+
ad_banner: ad_banner$4,
|
|
129197
129235
|
actions: actions$c,
|
|
129198
129236
|
confirmations: confirmations$8,
|
|
129199
129237
|
messages: messages$c,
|
|
@@ -129372,6 +129410,7 @@ const jaUpload = {
|
|
|
129372
129410
|
};
|
|
129373
129411
|
const details$3 = { "protocol_type": "プロトコル:", "api_key_label": "APIキー:", "api_key_placeholder": "APIキーを入力してください", "api_url_label": "API URL:", "api_url_placeholder": "API URLを入力してください", "no_suffix": "サフィックスなし" };
|
|
129374
129412
|
const model_config$3 = { "title": "モデル設定", "name_label": "モデル名:", "name_placeholder": "GPT 4o", "id_label": "モデルID:", "id_placeholder": "gpt-4o", "add_button": "モデルを追加", "warning": "注意: 視覚認識に対応しているモデルを追加し、モデルIDが正確であることを確認してください。さもなければモデルは正常に動作しません!" };
|
|
129413
|
+
const ad_banner$3 = { "title": "ZenMux:信頼できるエンタープライズ向け大規模モデルAPIサービス", "description": "初回チャージで5~8%の追加特典をプレゼント", "cta": "今すぐ入手", "cta_aria": "ZenMux のエンタープライズ向け大規模モデルAPIサービスを入手" };
|
|
129375
129414
|
const actions$9 = { "delete_provider": "プロバイダーを削除", "delete_model_title": "削除", "test_connection": "接続をテスト" };
|
|
129376
129415
|
const confirmations$6 = { "delete_model_title": "削除の確認", "delete_model_content": "モデル「{{name}}」を削除してもよろしいですか?", "delete_provider_title": "削除の確認", "delete_provider_content": "このプロバイダーを削除してもよろしいですか?この操作は元に戻せません。", "ok": "削除", "cancel": "キャンセル" };
|
|
129377
129416
|
const messages$9 = { "fetch_providers_failed": "プロバイダーリストの取得に失敗しました", "fetch_details_failed": "プロバイダーの詳細取得に失敗しました", "fetch_models_failed": "モデルリストの取得に失敗しました", "delete_model_success": "モデルの削除が完了しました", "delete_model_failed": "モデルの削除に失敗しました", "add_model_warning": "モデル情報をすべて入力してください", "add_model_success": "モデルの追加が完了しました", "add_model_failed": "モデルの追加に失敗しました", "update_success": "更新が完了しました", "update_failed": "更新に失敗しました", "test_success": "モデルの接続テストが成功しました", "test_failed": "接続テストに失敗しました", "delete_provider_success": "プロバイダーの削除が完了しました", "delete_provider_failed": "プロバイダーの削除に失敗しました", "update_status_failed": "プロバイダーのステータス更新に失敗しました", "fetch_model_list_failed": "リモートモデルリストの取得に失敗しました", "model_already_exists": "このモデルは既にリストに存在します" };
|
|
@@ -129380,6 +129419,7 @@ const model_list$3 = { "button": "モデルリスト", "modal_title": "リモー
|
|
|
129380
129419
|
const jaProvider = {
|
|
129381
129420
|
details: details$3,
|
|
129382
129421
|
model_config: model_config$3,
|
|
129422
|
+
ad_banner: ad_banner$3,
|
|
129383
129423
|
actions: actions$9,
|
|
129384
129424
|
confirmations: confirmations$6,
|
|
129385
129425
|
messages: messages$9,
|
|
@@ -129550,6 +129590,7 @@ const ruUpload = {
|
|
|
129550
129590
|
};
|
|
129551
129591
|
const details$2 = { "protocol_type": "Протокол:", "api_key_label": "API-ключ:", "api_key_placeholder": "Введите API-ключ", "api_url_label": "API URL:", "api_url_placeholder": "Введите API URL", "no_suffix": "Без суффикса" };
|
|
129552
129592
|
const model_config$2 = { "title": "Конфигурация модели", "name_label": "Название модели:", "name_placeholder": "GPT 4o", "id_label": "ID модели:", "id_placeholder": "gpt-4o", "add_button": "Добавить модель", "warning": "Примечание: Пожалуйста, добавьте модели, поддерживающие визуальное распознавание, и убедитесь, что ID модели указан правильно. В противном случае модель не будет работать должным образом!" };
|
|
129593
|
+
const ad_banner$2 = { "title": "ZenMux: надежный корпоративный API-сервис больших моделей", "description": "Получите дополнительный бонус 5–8% при первом пополнении", "cta": "Получить", "cta_aria": "Получить корпоративный API-сервис больших моделей ZenMux" };
|
|
129553
129594
|
const actions$6 = { "delete_provider": "Удалить провайдера", "delete_model_title": "Удалить", "test_connection": "Проверить подключение" };
|
|
129554
129595
|
const confirmations$4 = { "delete_model_title": "Подтверждение удаления", "delete_model_content": 'Вы уверены, что хотите удалить модель "{{name}}"?', "delete_provider_title": "Подтверждение удаления", "delete_provider_content": "Вы уверены, что хотите удалить этого провайдера? Это действие нельзя отменить.", "ok": "Удалить", "cancel": "Отмена" };
|
|
129555
129596
|
const messages$6 = { "fetch_providers_failed": "Не удалось получить список провайдеров", "fetch_details_failed": "Не удалось получить данные провайдера", "fetch_models_failed": "Не удалось получить список моделей", "delete_model_success": "Модель успешно удалена", "delete_model_failed": "Не удалось удалить модель", "add_model_warning": "Пожалуйста, заполните полную информацию о модели", "add_model_success": "Модель успешно добавлена", "add_model_failed": "Не удалось добавить модель", "update_success": "Успешно обновлено", "update_failed": "Ошибка обновления", "test_success": "Проверка подключения модели успешна", "test_failed": "Ошибка проверки подключения", "delete_provider_success": "Провайдер успешно удалён", "delete_provider_failed": "Не удалось удалить провайдера", "update_status_failed": "Не удалось обновить статус провайдера", "fetch_model_list_failed": "Не удалось получить список удалённых моделей", "model_already_exists": "Эта модель уже существует в списке" };
|
|
@@ -129558,6 +129599,7 @@ const model_list$2 = { "button": "Список моделей", "modal_title": "
|
|
|
129558
129599
|
const ruProvider = {
|
|
129559
129600
|
details: details$2,
|
|
129560
129601
|
model_config: model_config$2,
|
|
129602
|
+
ad_banner: ad_banner$2,
|
|
129561
129603
|
actions: actions$6,
|
|
129562
129604
|
confirmations: confirmations$4,
|
|
129563
129605
|
messages: messages$6,
|
|
@@ -129728,6 +129770,7 @@ const faUpload = {
|
|
|
129728
129770
|
};
|
|
129729
129771
|
const details$1 = { "protocol_type": "پروتکل:", "api_key_label": "کلید API:", "api_key_placeholder": "کلید API را وارد کنید", "api_url_label": "API URL:", "api_url_placeholder": "API URL را وارد کنید", "no_suffix": "بدون پسوند" };
|
|
129730
129772
|
const model_config$1 = { "title": "پیکربندی مدل", "name_label": "نام مدل:", "name_placeholder": "GPT 4o", "id_label": "شناسه مدل:", "id_placeholder": "gpt-4o", "add_button": "افزودن مدل", "warning": "توجه: لطفاً مدلهایی که از تشخیص تصویر پشتیبانی میکنند اضافه کنید و مطمئن شوید که شناسه مدل صحیح است. در غیر این صورت مدل به درستی کار نخواهد کرد!" };
|
|
129773
|
+
const ad_banner$1 = { "title": "ZenMux: سرویس API قابل اعتماد مدلهای زبانی بزرگ در سطح سازمانی", "description": "برای اولین شارژ 5 تا 8٪ هدیه اضافه دریافت کنید", "cta": "دریافت کنید", "cta_aria": "دریافت سرویس API سازمانی مدلهای زبانی بزرگ ZenMux" };
|
|
129731
129774
|
const actions$3 = { "delete_provider": "حذف ارائهدهنده", "delete_model_title": "حذف", "test_connection": "تست اتصال" };
|
|
129732
129775
|
const confirmations$2 = { "delete_model_title": "تأیید حذف", "delete_model_content": "آیا از حذف مدل «{{name}}» مطمئن هستید؟", "delete_provider_title": "تأیید حذف", "delete_provider_content": "آیا از حذف این ارائهدهنده مطمئن هستید؟ این عملیات قابل بازگشت نیست.", "ok": "حذف", "cancel": "لغو" };
|
|
129733
129776
|
const messages$3 = { "fetch_providers_failed": "دریافت لیست ارائهدهندگان ناموفق بود", "fetch_details_failed": "دریافت جزئیات ارائهدهنده ناموفق بود", "fetch_models_failed": "دریافت لیست مدلها ناموفق بود", "delete_model_success": "مدل با موفقیت حذف شد", "delete_model_failed": "حذف مدل ناموفق بود", "add_model_warning": "لطفاً اطلاعات کامل مدل را وارد کنید", "add_model_success": "مدل با موفقیت اضافه شد", "add_model_failed": "افزودن مدل ناموفق بود", "update_success": "با موفقیت بهروزرسانی شد", "update_failed": "بهروزرسانی ناموفق بود", "test_success": "تست اتصال مدل موفق بود", "test_failed": "تست اتصال ناموفق بود", "delete_provider_success": "ارائهدهنده با موفقیت حذف شد", "delete_provider_failed": "حذف ارائهدهنده ناموفق بود", "update_status_failed": "بهروزرسانی وضعیت ارائهدهنده ناموفق بود", "fetch_model_list_failed": "دریافت لیست مدلهای ریموت ناموفق بود", "model_already_exists": "این مدل قبلاً در لیست وجود دارد" };
|
|
@@ -129736,6 +129779,7 @@ const model_list$1 = { "button": "لیست مدلها", "modal_title": "در
|
|
|
129736
129779
|
const faProvider = {
|
|
129737
129780
|
details: details$1,
|
|
129738
129781
|
model_config: model_config$1,
|
|
129782
|
+
ad_banner: ad_banner$1,
|
|
129739
129783
|
actions: actions$3,
|
|
129740
129784
|
confirmations: confirmations$2,
|
|
129741
129785
|
messages: messages$3,
|
|
@@ -129906,6 +129950,7 @@ const arUpload = {
|
|
|
129906
129950
|
};
|
|
129907
129951
|
const details = { "protocol_type": "بروتوكول:", "api_key_label": "مفتاح API:", "api_key_placeholder": "أدخل مفتاح API", "api_url_label": "API URL:", "api_url_placeholder": "أدخل API URL", "no_suffix": "بدون لاحقة" };
|
|
129908
129952
|
const model_config = { "title": "تكوين النموذج", "name_label": "اسم النموذج:", "name_placeholder": "GPT 4o", "id_label": "معرف النموذج:", "id_placeholder": "gpt-4o", "add_button": "إضافة نموذج", "warning": "ملاحظة: يرجى إضافة نماذج تدعم التعرف على الرؤية والتأكد من صحة معرف النموذج، وإلا لن يعمل النموذج بشكل صحيح!" };
|
|
129953
|
+
const ad_banner = { "title": "ZenMux: خدمة API موثوقة لنماذج اللغة الكبيرة على مستوى المؤسسات", "description": "احصل على هدية إضافية بنسبة 5–8% عند أول شحن", "cta": "احصل عليها", "cta_aria": "احصل على خدمة API المؤسسية لنماذج اللغة الكبيرة ZenMux" };
|
|
129909
129954
|
const actions = { "delete_provider": "حذف المزود", "delete_model_title": "حذف", "test_connection": "اختبار الاتصال" };
|
|
129910
129955
|
const confirmations = { "delete_model_title": "تأكيد الحذف", "delete_model_content": 'هل أنت متأكد من حذف النموذج "{{name}}"؟', "delete_provider_title": "تأكيد الحذف", "delete_provider_content": "هل أنت متأكد من حذف هذا المزود؟ لا يمكن التراجع عن هذا الإجراء.", "ok": "حذف", "cancel": "إلغاء" };
|
|
129911
129956
|
const messages = { "fetch_providers_failed": "فشل في جلب قائمة المزودين", "fetch_details_failed": "فشل في جلب تفاصيل المزود", "fetch_models_failed": "فشل في جلب قائمة النماذج", "delete_model_success": "تم حذف النموذج بنجاح", "delete_model_failed": "فشل في حذف النموذج", "add_model_warning": "الرجاء ملء معلومات النموذج الكاملة", "add_model_success": "تم إضافة النموذج بنجاح", "add_model_failed": "فشل في إضافة النموذج", "update_success": "تم التحديث بنجاح", "update_failed": "فشل التحديث", "test_success": "نجاح اختبار اتصال النموذج", "test_failed": "فشل اختبار الاتصال", "delete_provider_success": "تم حذف المزود بنجاح", "delete_provider_failed": "فشل في حذف المزود", "update_status_failed": "فشل في تحديث حالة المزود", "fetch_model_list_failed": "فشل في جلب قائمة النماذج البعيدة", "model_already_exists": "هذا النموذج موجود بالفعل في القائمة" };
|
|
@@ -129914,6 +129959,7 @@ const model_list = { "button": "قائمة النماذج", "modal_title": "جل
|
|
|
129914
129959
|
const arProvider = {
|
|
129915
129960
|
details,
|
|
129916
129961
|
model_config,
|
|
129962
|
+
ad_banner,
|
|
129917
129963
|
actions,
|
|
129918
129964
|
confirmations,
|
|
129919
129965
|
messages,
|
|
@@ -130540,41 +130586,64 @@ const CloudProvider = ({ children }) => {
|
|
|
130540
130586
|
});
|
|
130541
130587
|
return cleanup2;
|
|
130542
130588
|
}, [isAuthenticated, refreshCredits]);
|
|
130543
|
-
|
|
130544
|
-
|
|
130545
|
-
|
|
130546
|
-
|
|
130547
|
-
|
|
130548
|
-
|
|
130549
|
-
|
|
130550
|
-
|
|
130551
|
-
|
|
130552
|
-
|
|
130553
|
-
|
|
130554
|
-
|
|
130555
|
-
|
|
130556
|
-
|
|
130557
|
-
|
|
130558
|
-
|
|
130559
|
-
|
|
130560
|
-
|
|
130561
|
-
|
|
130562
|
-
|
|
130563
|
-
|
|
130564
|
-
|
|
130565
|
-
|
|
130566
|
-
|
|
130567
|
-
|
|
130568
|
-
|
|
130569
|
-
|
|
130570
|
-
|
|
130571
|
-
|
|
130572
|
-
|
|
130573
|
-
|
|
130574
|
-
|
|
130575
|
-
|
|
130576
|
-
|
|
130577
|
-
|
|
130589
|
+
const contextValue = reactExports.useMemo(() => ({
|
|
130590
|
+
user,
|
|
130591
|
+
credits,
|
|
130592
|
+
isAuthenticated,
|
|
130593
|
+
isLoading,
|
|
130594
|
+
deviceFlowStatus,
|
|
130595
|
+
userCode,
|
|
130596
|
+
verificationUrl,
|
|
130597
|
+
authError,
|
|
130598
|
+
login,
|
|
130599
|
+
logout,
|
|
130600
|
+
cancelLogin,
|
|
130601
|
+
refreshCredits,
|
|
130602
|
+
convertFile,
|
|
130603
|
+
getTasks,
|
|
130604
|
+
getTaskById,
|
|
130605
|
+
getTaskPages,
|
|
130606
|
+
cancelTask,
|
|
130607
|
+
retryTask,
|
|
130608
|
+
deleteTask,
|
|
130609
|
+
retryPage,
|
|
130610
|
+
getTaskResult,
|
|
130611
|
+
downloadResult,
|
|
130612
|
+
createCheckout,
|
|
130613
|
+
getCheckoutStatus,
|
|
130614
|
+
reconcileCheckout,
|
|
130615
|
+
getCreditHistory,
|
|
130616
|
+
getPaymentHistory
|
|
130617
|
+
}), [
|
|
130618
|
+
user,
|
|
130619
|
+
credits,
|
|
130620
|
+
isAuthenticated,
|
|
130621
|
+
isLoading,
|
|
130622
|
+
deviceFlowStatus,
|
|
130623
|
+
userCode,
|
|
130624
|
+
verificationUrl,
|
|
130625
|
+
authError,
|
|
130626
|
+
login,
|
|
130627
|
+
logout,
|
|
130628
|
+
cancelLogin,
|
|
130629
|
+
refreshCredits,
|
|
130630
|
+
convertFile,
|
|
130631
|
+
getTasks,
|
|
130632
|
+
getTaskById,
|
|
130633
|
+
getTaskPages,
|
|
130634
|
+
cancelTask,
|
|
130635
|
+
retryTask,
|
|
130636
|
+
deleteTask,
|
|
130637
|
+
retryPage,
|
|
130638
|
+
getTaskResult,
|
|
130639
|
+
downloadResult,
|
|
130640
|
+
createCheckout,
|
|
130641
|
+
getCheckoutStatus,
|
|
130642
|
+
reconcileCheckout,
|
|
130643
|
+
getCreditHistory,
|
|
130644
|
+
getPaymentHistory
|
|
130645
|
+
]);
|
|
130646
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CloudContext.Provider, { value: contextValue, children });
|
|
130578
130647
|
};
|
|
130579
130648
|
clientExports.createRoot(document.getElementById("root")).render(
|
|
130580
130649
|
/* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.StrictMode, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CloudProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(App, {}) }) })
|
|
@@ -156,6 +156,83 @@ body {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
/* Provider ZenMux promotion banner */
|
|
160
|
+
.provider-ad-banner {
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
justify-content: space-between;
|
|
164
|
+
gap: 12px;
|
|
165
|
+
padding: 10px 14px;
|
|
166
|
+
border: 1px solid rgba(22, 119, 255, 0.22);
|
|
167
|
+
border-radius: 12px;
|
|
168
|
+
background:
|
|
169
|
+
linear-gradient(135deg, rgba(22, 119, 255, 0.1), rgba(114, 46, 209, 0.08)),
|
|
170
|
+
#ffffff;
|
|
171
|
+
box-shadow: 0 6px 18px rgba(22, 119, 255, 0.08);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.provider-ad-banner__content {
|
|
175
|
+
display: flex;
|
|
176
|
+
align-items: center;
|
|
177
|
+
gap: 10px;
|
|
178
|
+
min-width: 0;
|
|
179
|
+
flex-wrap: wrap;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.provider-ad-banner__brand {
|
|
183
|
+
color: #0958d9;
|
|
184
|
+
font-weight: 600;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.provider-ad-banner__text {
|
|
188
|
+
color: #5a6072;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.provider-ad-banner__link {
|
|
192
|
+
display: inline-flex;
|
|
193
|
+
align-items: center;
|
|
194
|
+
justify-content: center;
|
|
195
|
+
flex-shrink: 0;
|
|
196
|
+
min-height: 30px;
|
|
197
|
+
padding: 3px 12px;
|
|
198
|
+
border: 1px solid rgba(22, 119, 255, 0.28);
|
|
199
|
+
border-radius: 999px;
|
|
200
|
+
color: #0958d9;
|
|
201
|
+
font-weight: 500;
|
|
202
|
+
line-height: 1.4;
|
|
203
|
+
text-decoration: none;
|
|
204
|
+
background: rgba(255, 255, 255, 0.72);
|
|
205
|
+
box-shadow: none;
|
|
206
|
+
transition:
|
|
207
|
+
border-color 0.2s ease,
|
|
208
|
+
color 0.2s ease,
|
|
209
|
+
background 0.2s ease;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.provider-ad-banner__link:hover,
|
|
213
|
+
.provider-ad-banner__link:focus {
|
|
214
|
+
color: #1677ff;
|
|
215
|
+
text-decoration: none;
|
|
216
|
+
border-color: rgba(22, 119, 255, 0.45);
|
|
217
|
+
background: rgba(22, 119, 255, 0.08);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.provider-ad-banner__link:focus-visible {
|
|
221
|
+
outline: 3px solid rgba(22, 119, 255, 0.22);
|
|
222
|
+
outline-offset: 2px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@media (max-width: 720px) {
|
|
226
|
+
.provider-ad-banner {
|
|
227
|
+
align-items: flex-start;
|
|
228
|
+
flex-direction: column;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.provider-ad-banner__link {
|
|
232
|
+
width: 100%;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
159
236
|
/* Settings Tabs - tab栏固定,内容区域滚动 */
|
|
160
237
|
.settings-tabs .ant-tabs-content-holder {
|
|
161
238
|
flex: 1 1 auto;
|
package/dist/renderer/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>MarkPDFdown</title>
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-BZDr5OuP.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="./assets/index-CbaW4x8u.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|