@dickpy/dsh-imagegen 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -201
- package/README.md +203 -182
- package/cordis.patch.yml +8 -8
- package/docs/images/multi-model-comparison.png +0 -0
- package/lib/client.js +1103 -837
- package/lib/client.js.map +1 -1
- package/lib/index.js +265 -135
- package/package.json +70 -68
- package/src/agent-image-tools.ts +418 -418
- package/src/client/ImageGenPanel.tsx +1699 -1508
- package/src/client/SettingsCard.tsx +936 -957
- package/src/client/TemplateLibrary.tsx +336 -336
- package/src/client/api.ts +193 -193
- package/src/client/channels-form.ts +263 -263
- package/src/client/controller.ts +46 -46
- package/src/client/conversation-sync.ts +14 -0
- package/src/client/css-modules.d.ts +5 -5
- package/src/client/helpers.ts +33 -33
- package/src/client/image-toolview.module.css +73 -73
- package/src/client/image-toolview.tsx +169 -158
- package/src/client/index.ts +32 -22
- package/src/client/locales.ts +610 -594
- package/src/client/mount.tsx +185 -96
- package/src/client/panel.module.css +1713 -1445
- package/src/client/settings-card.module.css +1023 -1023
- package/src/client/settings-form.ts +336 -336
- package/src/client/settings-scope.ts +298 -298
- package/src/client/sidebar-entry.ts +148 -102
- package/src/client/templates.module.css +453 -453
- package/src/engine.ts +520 -478
- package/src/gallery-store.ts +286 -286
- package/src/generation-runtime.ts +79 -75
- package/src/history-store.ts +250 -244
- package/src/image-format.ts +11 -11
- package/src/image-models.ts +19 -19
- package/src/index.ts +318 -318
- package/src/model-catalog.ts +115 -98
- package/src/presets.ts +71 -63
- package/src/prompt-enhancer.ts +137 -79
- package/src/protocol.ts +338 -326
- package/src/routes.ts +916 -906
- package/src/task-queue.ts +113 -103
- package/src/templates/cases.json +10196 -10196
- package/src/templates-store.ts +278 -278
- package/src/updater.ts +117 -117
package/lib/client.js
CHANGED
|
@@ -291,9 +291,18 @@ window.__ModuleLoader__.load({
|
|
|
291
291
|
*/
|
|
292
292
|
const zh = {
|
|
293
293
|
"entry.label": "AI 生图",
|
|
294
|
-
"entry.tooltip": "AI 生图面板(gpt-image-2 / grok-imagine-image / nanobanana / seedream 系列)",
|
|
294
|
+
"entry.tooltip": "AI 生图面板(gpt-image-2 / glm-image / grok-imagine-image / nanobanana / seedream 系列)",
|
|
295
|
+
"entry.newSession": "新会话",
|
|
296
|
+
"entry.newSessionTooltip": "创建一个新的 DSH 会话",
|
|
297
|
+
"entry.image": "生图",
|
|
295
298
|
"panel.title": "AI 生图",
|
|
296
299
|
"panel.githubTip": "觉得好用或有建议?欢迎来 GitHub 提 issues、点个 star 支持一下!",
|
|
300
|
+
"conversation.add": "加入对话",
|
|
301
|
+
"conversation.adding": "加入中…",
|
|
302
|
+
"conversation.added": "图片已加入当前对话",
|
|
303
|
+
"conversation.noSession": "请先打开一个会话,再加入图片",
|
|
304
|
+
"conversation.unavailable": "当前会话暂不可用",
|
|
305
|
+
"conversation.busy": "当前对话正在发送,请稍后再试",
|
|
297
306
|
"mode.text": "文生图",
|
|
298
307
|
"mode.edit": "图生图",
|
|
299
308
|
"prompt.placeholder": "描述你想要的画面,例如:一只戴着宇航员头盔的橘猫,在月球上举起望远镜,水彩风格,柔和光线…",
|
|
@@ -338,6 +347,7 @@ window.__ModuleLoader__.load({
|
|
|
338
347
|
"detail.high": "高清",
|
|
339
348
|
"detail.hint": "透传参数,部分 gpt-image-2 网关支持;官方接口请保持「自动」",
|
|
340
349
|
"model.label": "模型",
|
|
350
|
+
"model.noEditModels": "当前模式暂无可用模型",
|
|
341
351
|
"compare.enable": "多模型对比",
|
|
342
352
|
"compare.models": "参与对比的模型",
|
|
343
353
|
"compare.title": "多模型结果对比",
|
|
@@ -568,21 +578,28 @@ window.__ModuleLoader__.load({
|
|
|
568
578
|
"channels.addModelConfirm": "添加",
|
|
569
579
|
"channels.copyFrom": "从其他渠道复制…",
|
|
570
580
|
"channels.copyApply": "复制",
|
|
571
|
-
"channels.candidatesTitle": "
|
|
572
|
-
"channels.candidatesQuick": "只勾已收录协议",
|
|
581
|
+
"channels.candidatesTitle": "图片模型候选(点击加入)",
|
|
573
582
|
"channels.deleteThisChannel": "删除此渠道",
|
|
574
583
|
"channels.setDefault": "设为默认渠道",
|
|
575
584
|
"channels.presetPickerTitle": "添加提供方",
|
|
576
585
|
"channels.presetPickerHint": "选择一个内置提供方,仅需填写 API 密钥",
|
|
577
|
-
"channels.presetModelsHint": "{n} 个预置模型",
|
|
578
586
|
"channels.presetCustomHint": "自行填写 API 地址、密钥与模型目录",
|
|
579
587
|
"channels.presetLoadFailed": "加载提供方失败:{error}"
|
|
580
588
|
};
|
|
581
589
|
const en = {
|
|
582
590
|
"entry.label": "AI Image",
|
|
583
|
-
"entry.tooltip": "AI image generation studio (gpt-image-2 / grok-imagine-image / nanobanana / seedream family)",
|
|
591
|
+
"entry.tooltip": "AI image generation studio (gpt-image-2 / glm-image / grok-imagine-image / nanobanana / seedream family)",
|
|
592
|
+
"entry.newSession": "New session",
|
|
593
|
+
"entry.newSessionTooltip": "Create a new DSH session",
|
|
594
|
+
"entry.image": "Image",
|
|
584
595
|
"panel.title": "AI Image",
|
|
585
596
|
"panel.githubTip": "Like it or have suggestions? Head to GitHub to open issues and star us!",
|
|
597
|
+
"conversation.add": "Add to chat",
|
|
598
|
+
"conversation.adding": "Adding…",
|
|
599
|
+
"conversation.added": "Image added to the current chat",
|
|
600
|
+
"conversation.noSession": "Open a session before adding an image",
|
|
601
|
+
"conversation.unavailable": "The current session is unavailable",
|
|
602
|
+
"conversation.busy": "The chat is sending a message; try again shortly",
|
|
586
603
|
"mode.text": "Text to Image",
|
|
587
604
|
"mode.edit": "Image to Image",
|
|
588
605
|
"prompt.placeholder": "Describe the picture you want, e.g. an orange cat in an astronaut helmet raising a telescope on the moon, watercolor style, soft light…",
|
|
@@ -627,6 +644,7 @@ window.__ModuleLoader__.load({
|
|
|
627
644
|
"detail.high": "High",
|
|
628
645
|
"detail.hint": "Passthrough parameter supported by some gpt-image-2 gateways; keep \"Auto\" for official endpoints",
|
|
629
646
|
"model.label": "Model",
|
|
647
|
+
"model.noEditModels": "No model is available for this mode",
|
|
630
648
|
"compare.enable": "Multi-model comparison",
|
|
631
649
|
"compare.models": "Models to compare",
|
|
632
650
|
"compare.title": "Multi-model comparison",
|
|
@@ -857,13 +875,11 @@ window.__ModuleLoader__.load({
|
|
|
857
875
|
"channels.addModelConfirm": "Add",
|
|
858
876
|
"channels.copyFrom": "Copy from another channel…",
|
|
859
877
|
"channels.copyApply": "Copy",
|
|
860
|
-
"channels.candidatesTitle": "
|
|
861
|
-
"channels.candidatesQuick": "Add only known protocols",
|
|
878
|
+
"channels.candidatesTitle": "Image model candidates (click to add)",
|
|
862
879
|
"channels.deleteThisChannel": "Delete this channel",
|
|
863
880
|
"channels.setDefault": "Set as default channel",
|
|
864
881
|
"channels.presetPickerTitle": "Add provider",
|
|
865
882
|
"channels.presetPickerHint": "Pick a built-in provider — only the API key is needed",
|
|
866
|
-
"channels.presetModelsHint": "{n} preset model(s)",
|
|
867
883
|
"channels.presetCustomHint": "Configure the API URL, key, and model catalog yourself",
|
|
868
884
|
"channels.presetLoadFailed": "Failed to load providers: {error}"
|
|
869
885
|
};
|
|
@@ -892,8 +908,8 @@ window.__ModuleLoader__.load({
|
|
|
892
908
|
return String(error);
|
|
893
909
|
}
|
|
894
910
|
//#endregion
|
|
895
|
-
//#region \0dsh-css:
|
|
896
|
-
const css$3 = ".
|
|
911
|
+
//#region \0dsh-css:D:\learn\dsh\dsh-imagegen\src\client\templates.module.css.mjs
|
|
912
|
+
const css$3 = ".APm5zW_overlay,.APm5zW_overlay *,.APm5zW_overlay :before,.APm5zW_overlay :after{box-sizing:border-box}.APm5zW_overlay{z-index:130;background:var(--dsw-alias-bg-mask-1);color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);justify-content:center;align-items:center;padding:28px;display:flex;position:fixed;inset:0}.APm5zW_shell{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-base);border-radius:14px;flex-direction:column;width:min(1180px,100%);height:100%;max-height:100%;display:flex;overflow:hidden;box-shadow:0 18px 60px #00000047}.APm5zW_header{flex:none;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px 10px;display:flex}.APm5zW_heading{align-items:baseline;gap:10px;min-width:0;display:flex}.APm5zW_title{margin:0;font-size:15px;font-weight:650}.APm5zW_meta{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-size:12px}.APm5zW_headerActions{flex:none;align-items:center;gap:8px;display:inline-flex}.APm5zW_close{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;display:inline-flex}.APm5zW_close:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.APm5zW_toolbar{flex-direction:column;flex:none;gap:10px;padding:0 18px 12px;display:flex}.APm5zW_search{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);width:100%;height:34px;color:var(--dsw-alias-label-primary);border-radius:9px;outline:none;padding:0 12px;font-family:inherit;font-size:13px}.APm5zW_search:focus{border-color:var(--dsw-alias-brand-primary)}.APm5zW_search::placeholder{color:var(--dsw-alias-label-dimmed)}.APm5zW_categoryRow{flex-wrap:wrap;gap:6px;max-height:64px;display:flex;overflow-y:auto}.APm5zW_categoryPill{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);height:26px;color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;border-radius:999px;padding:0 11px;font-family:inherit;font-size:12px}.APm5zW_categoryPill:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.APm5zW_categoryPill[data-active]{border-color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-base)}.APm5zW_notice{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-secondary);border-radius:9px;flex:none;margin:0 18px 10px;padding:8px 12px;font-size:12px}.APm5zW_body{flex:1;min-height:0;padding:2px 18px 14px;overflow-y:auto}.APm5zW_state{height:100%;min-height:220px;color:var(--dsw-alias-label-tertiary);flex-direction:column;justify-content:center;align-items:center;gap:12px;font-size:13px;display:flex}.APm5zW_spinner{border:2px solid var(--dsw-alias-border-l2);border-top-color:var(--dsw-alias-brand-primary);border-radius:50%;width:26px;height:26px;animation:.9s linear infinite APm5zW_dsh-imagegen-templates-spin}@keyframes APm5zW_dsh-imagegen-templates-spin{to{transform:rotate(360deg)}}.APm5zW_grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;display:grid}.APm5zW_card{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);cursor:pointer;text-align:left;color:var(--dsw-alias-label-primary);border-radius:11px;flex-direction:column;gap:0;padding:0;font-family:inherit;transition:border-color .15s,transform .15s;display:flex;overflow:hidden}.APm5zW_card:hover{border-color:var(--dsw-alias-brand-primary);transform:translateY(-1px)}.APm5zW_thumbWrap{aspect-ratio:1;background:var(--dsw-alias-bg-layer-2);width:100%;display:block;position:relative}.APm5zW_thumb{object-fit:cover;width:100%;height:100%;display:block}.APm5zW_thumbPlaceholder{width:100%;height:100%;color:var(--dsw-alias-label-dimmed);justify-content:center;align-items:center;display:flex}.APm5zW_featuredBadge{background:var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-base);border-radius:999px;padding:2px 8px;font-size:11px;font-weight:600;position:absolute;top:8px;left:8px}.APm5zW_cardBody{flex-direction:column;gap:4px;min-width:0;padding:9px 11px 10px;display:flex}.APm5zW_cardTitle{-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12.5px;font-weight:600;line-height:1.35;display:-webkit-box;overflow:hidden}.APm5zW_cardMeta{min-width:0;color:var(--dsw-alias-label-tertiary);align-items:center;gap:6px;font-size:11px;display:flex}.APm5zW_cardCategory{background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 7px}.APm5zW_cardSource{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.APm5zW_footer{border-top:1px solid var(--dsw-alias-border-l1);flex:none;justify-content:space-between;align-items:center;gap:10px;padding:9px 18px;display:flex}.APm5zW_attribution{color:var(--dsw-alias-label-dimmed);min-width:0;font-size:11.5px}.APm5zW_sourceLink{color:var(--dsw-alias-brand-primary);white-space:nowrap;flex:none;font-size:11.5px;font-weight:600;text-decoration:none}.APm5zW_sourceLink:hover{text-decoration:underline}.APm5zW_detailOverlay{background:var(--dsw-alias-bg-mask-1);justify-content:center;align-items:center;padding:34px;display:flex;position:absolute;inset:0}.APm5zW_detail{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-base);border-radius:14px;grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,5fr) minmax(0,4fr);gap:0;width:min(980px,100%);max-height:100%;display:grid;overflow:hidden;box-shadow:0 18px 60px #00000052}.APm5zW_detailMedia{background:var(--dsw-alias-bg-layer-2);justify-content:center;align-items:center;min-height:0;display:flex;overflow:hidden}.APm5zW_detailImage{object-fit:contain;width:100%;height:100%;display:block}.APm5zW_detailInfo{flex-direction:column;gap:10px;min-height:0;padding:18px;display:flex;overflow-y:auto}.APm5zW_detailTitle{margin:0;font-size:15px;font-weight:650;line-height:1.4}.APm5zW_detailMeta{color:var(--dsw-alias-label-tertiary);flex-wrap:wrap;align-items:center;gap:8px;font-size:12px;display:flex}.APm5zW_detailLink{color:var(--dsw-alias-brand-primary);text-overflow:ellipsis;white-space:nowrap;text-decoration:none;overflow:hidden}.APm5zW_detailLink:hover{text-decoration:underline}.APm5zW_detailPrompt{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);min-height:0;color:var(--dsw-alias-label-primary);white-space:pre-wrap;word-break:break-word;user-select:text;border-radius:10px;flex:1;margin:0;padding:12px;font-family:inherit;font-size:12.5px;line-height:1.6;overflow-y:auto}.APm5zW_detailActions{background:var(--dsw-alias-bg-base);border-top:1px solid var(--dsw-alias-border-l1);flex:none;gap:8px;margin:0 -18px -18px;padding:12px 18px;display:flex;position:sticky;bottom:0}@media (width<=760px){.APm5zW_detail{grid-template-rows:minmax(0,3fr) minmax(0,4fr);grid-template-columns:1fr}}";
|
|
897
913
|
const tagId$3 = "@dickpy/dsh-imagegen/templates.module.css";
|
|
898
914
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
|
|
899
915
|
const tag = document.createElement("style");
|
|
@@ -903,47 +919,47 @@ window.__ModuleLoader__.load({
|
|
|
903
919
|
document.head.appendChild(tag);
|
|
904
920
|
}
|
|
905
921
|
var templates_module_css_default = {
|
|
906
|
-
"
|
|
907
|
-
"
|
|
908
|
-
"
|
|
909
|
-
"
|
|
910
|
-
"
|
|
911
|
-
"
|
|
912
|
-
"
|
|
913
|
-
"
|
|
914
|
-
"
|
|
915
|
-
"
|
|
916
|
-
"
|
|
917
|
-
"
|
|
918
|
-
"
|
|
919
|
-
"
|
|
920
|
-
"
|
|
921
|
-
"
|
|
922
|
-
"
|
|
923
|
-
"
|
|
924
|
-
"
|
|
925
|
-
"
|
|
926
|
-
"
|
|
927
|
-
"
|
|
928
|
-
"
|
|
929
|
-
"
|
|
930
|
-
"
|
|
931
|
-
"
|
|
932
|
-
"
|
|
933
|
-
"
|
|
934
|
-
"
|
|
935
|
-
"
|
|
936
|
-
"
|
|
937
|
-
"
|
|
938
|
-
"
|
|
939
|
-
"
|
|
940
|
-
"
|
|
941
|
-
"
|
|
942
|
-
"
|
|
943
|
-
"
|
|
944
|
-
"
|
|
945
|
-
"
|
|
946
|
-
"
|
|
922
|
+
"cardTitle": "APm5zW_cardTitle",
|
|
923
|
+
"categoryPill": "APm5zW_categoryPill",
|
|
924
|
+
"spinner": "APm5zW_spinner",
|
|
925
|
+
"categoryRow": "APm5zW_categoryRow",
|
|
926
|
+
"cardSource": "APm5zW_cardSource",
|
|
927
|
+
"detailMedia": "APm5zW_detailMedia",
|
|
928
|
+
"thumbWrap": "APm5zW_thumbWrap",
|
|
929
|
+
"heading": "APm5zW_heading",
|
|
930
|
+
"dsh-imagegen-templates-spin": "APm5zW_dsh-imagegen-templates-spin",
|
|
931
|
+
"attribution": "APm5zW_attribution",
|
|
932
|
+
"grid": "APm5zW_grid",
|
|
933
|
+
"meta": "APm5zW_meta",
|
|
934
|
+
"body": "APm5zW_body",
|
|
935
|
+
"detailTitle": "APm5zW_detailTitle",
|
|
936
|
+
"state": "APm5zW_state",
|
|
937
|
+
"sourceLink": "APm5zW_sourceLink",
|
|
938
|
+
"cardCategory": "APm5zW_cardCategory",
|
|
939
|
+
"thumbPlaceholder": "APm5zW_thumbPlaceholder",
|
|
940
|
+
"cardMeta": "APm5zW_cardMeta",
|
|
941
|
+
"search": "APm5zW_search",
|
|
942
|
+
"detailOverlay": "APm5zW_detailOverlay",
|
|
943
|
+
"detailImage": "APm5zW_detailImage",
|
|
944
|
+
"detailMeta": "APm5zW_detailMeta",
|
|
945
|
+
"detailPrompt": "APm5zW_detailPrompt",
|
|
946
|
+
"headerActions": "APm5zW_headerActions",
|
|
947
|
+
"shell": "APm5zW_shell",
|
|
948
|
+
"detailLink": "APm5zW_detailLink",
|
|
949
|
+
"detailActions": "APm5zW_detailActions",
|
|
950
|
+
"cardBody": "APm5zW_cardBody",
|
|
951
|
+
"header": "APm5zW_header",
|
|
952
|
+
"overlay": "APm5zW_overlay",
|
|
953
|
+
"notice": "APm5zW_notice",
|
|
954
|
+
"title": "APm5zW_title",
|
|
955
|
+
"toolbar": "APm5zW_toolbar",
|
|
956
|
+
"detailInfo": "APm5zW_detailInfo",
|
|
957
|
+
"detail": "APm5zW_detail",
|
|
958
|
+
"card": "APm5zW_card",
|
|
959
|
+
"footer": "APm5zW_footer",
|
|
960
|
+
"close": "APm5zW_close",
|
|
961
|
+
"thumb": "APm5zW_thumb",
|
|
962
|
+
"featuredBadge": "APm5zW_featuredBadge"
|
|
947
963
|
};
|
|
948
964
|
//#endregion
|
|
949
965
|
//#region src/client/TemplateLibrary.tsx
|
|
@@ -1656,7 +1672,8 @@ window.__ModuleLoader__.load({
|
|
|
1656
1672
|
"nanobanana2",
|
|
1657
1673
|
"nanobanana2-lite",
|
|
1658
1674
|
"nanobanana-pro",
|
|
1659
|
-
"seedream-5.0-pro"
|
|
1675
|
+
"seedream-5.0-pro",
|
|
1676
|
+
"glm-image"
|
|
1660
1677
|
];
|
|
1661
1678
|
/** Normalize user-entered model identifiers and retain a usable legacy default. */
|
|
1662
1679
|
function normalizeImageModels(value) {
|
|
@@ -1670,8 +1687,118 @@ window.__ModuleLoader__.load({
|
|
|
1670
1687
|
return unique.size > 0 ? [...unique] : [...DEFAULT_IMAGE_MODELS];
|
|
1671
1688
|
}
|
|
1672
1689
|
//#endregion
|
|
1673
|
-
//#region
|
|
1674
|
-
const css$2 = "[data-pane=conversation],[class*=centerCol]{position:relative}[data-dsh-imagegen-view]{z-index:60;background:var(--dsw-alias-bg-base);display:none;position:absolute;inset:0}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-dsh-imagegen-view]{display:block}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-pane=conversation]>:not([data-dsh-imagegen-view]),html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [class*=centerCol]>:not([data-dsh-imagegen-view]){display:none!important}.Yvqh9W_entry{width:100%;height:32px;color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:8px;align-items:center;gap:8px;padding:0 12px;font-size:13px;display:flex}.Yvqh9W_entry:hover{background:var(--dsw-specific-sidebar-nav-item-hover);color:var(--dsw-alias-label-primary)}.Yvqh9W_entry[data-active]{background:var(--dsw-specific-sidebar-nav-item-active);color:var(--dsw-alias-label-primary);font-weight:600}.Yvqh9W_entryIcon{flex:none;justify-content:center;align-items:center;display:inline-flex}.Yvqh9W_entryLabel{text-overflow:ellipsis;overflow:hidden}[data-dsh-frame][data-sidebar-collapsed] .Yvqh9W_entry{justify-content:center;width:100%;padding:0}[data-dsh-frame][data-sidebar-collapsed] .Yvqh9W_entryLabel{display:none}.Yvqh9W_view{overflow:hidden}.Yvqh9W_panel,.Yvqh9W_panel *,.Yvqh9W_panel :before,.Yvqh9W_panel :after{box-sizing:border-box}.Yvqh9W_panel{background:var(--dsw-alias-bg-base);min-width:0;height:100%;min-height:0;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);flex-direction:column;gap:10px;padding:14px 16px 16px;display:flex;position:relative;overflow:hidden}.Yvqh9W_panelHeader{flex:none;justify-content:space-between;align-items:center;gap:12px;display:flex}.Yvqh9W_panelHeading{align-items:baseline;gap:10px;min-width:0;display:flex}.Yvqh9W_panelTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;margin:0;font-size:16px;font-weight:700}.Yvqh9W_githubLink{width:22px;height:22px;color:var(--dsw-alias-label-secondary);border-radius:6px;flex:none;justify-content:center;align-items:center;text-decoration:none;transition:color .12s,background .12s;display:inline-flex}.Yvqh9W_githubLink:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.Yvqh9W_connectionStatus{border:1px solid var(--dsw-alias-label-error);height:28px;color:var(--dsw-alias-label-error);font:inherit;white-space:nowrap;background:0 0;border-radius:8px;flex:none;align-items:center;gap:6px;padding:0 10px;font-size:12px;line-height:1;display:inline-flex}.Yvqh9W_connectionStatus[data-connected=true]{border-color:var(--dsw-alias-state-success-primary);color:var(--dsw-alias-state-success-primary)}.Yvqh9W_connectionDot{background:currentColor;border-radius:50%;width:6px;height:6px}.Yvqh9W_updateBanner{border:1px solid var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-state-warn-primary);overflow-wrap:anywhere;border-radius:10px;flex:none;justify-content:space-between;align-items:center;gap:12px;padding:7px 10px 7px 12px;font-size:12px;line-height:1.5;display:flex}.Yvqh9W_updateBanner[data-kind=ok]{color:var(--dsw-alias-state-success-primary);border-color:var(--dsw-alias-state-success-primary)}.Yvqh9W_updateText{min-width:0}.Yvqh9W_updateActions{flex:none;align-items:center;gap:10px;display:inline-flex}.Yvqh9W_updateRelease{color:inherit;text-underline-offset:2px;white-space:nowrap;text-decoration:underline}@media (width<=700px){.Yvqh9W_panelHeader{align-items:flex-start}.Yvqh9W_panelHeading{flex-direction:column;align-items:flex-start;gap:2px}.Yvqh9W_updateBanner{flex-direction:column;align-items:flex-start}.Yvqh9W_updateActions{justify-content:space-between;width:100%}}.Yvqh9W_studio{flex:1;gap:14px;min-width:0;min-height:0;display:flex}.Yvqh9W_config{flex-direction:column;flex:none;gap:12px;width:300px;min-width:260px;max-width:340px;height:100%;min-height:0;display:flex;overflow:hidden}.Yvqh9W_configScroll{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:12px;min-height:0;padding-right:2px;display:flex;overflow-y:auto}.Yvqh9W_configScroll::-webkit-scrollbar{width:8px}.Yvqh9W_configScroll::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_canvas{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:12px;flex-direction:column;flex:1;min-width:0;min-height:0;display:flex;position:relative;overflow:hidden}.Yvqh9W_taskTray{z-index:6;border:1px solid var(--dsw-alias-border-l2);background:color-mix(in srgb, var(--dsw-alias-bg-layer-1) 92%, transparent);backdrop-filter:blur(10px);border-radius:9px;flex-direction:column;width:min(360px,100% - 24px);max-height:calc(100% - 24px);display:flex;position:absolute;top:12px;right:12px;overflow:hidden;box-shadow:0 8px 24px #0000001f}.Yvqh9W_taskTray[data-open=false]{width:auto;max-width:calc(100% - 24px)}.Yvqh9W_taskTrayHeader{min-height:34px;color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);align-items:stretch;font-size:12px;font-weight:600;display:flex}.Yvqh9W_taskTray[data-open=false] .Yvqh9W_taskTrayHeader{border-bottom:0}.Yvqh9W_taskTrayToggle{min-width:0;color:inherit;cursor:pointer;font:inherit;font-size:inherit;font-weight:inherit;text-align:left;background:0 0;border:0;flex:1;align-items:center;gap:8px;padding:8px 10px;display:flex}.Yvqh9W_taskTrayToggle:hover{background:var(--dsw-alias-bg-layer-2)}.Yvqh9W_taskTrayCount{min-width:18px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);text-align:center;border-radius:999px;padding:1px 5px;font-size:11px;font-weight:500}.Yvqh9W_taskTrayChevron{color:var(--dsw-alias-label-tertiary);margin-left:auto;font-size:12px;font-weight:400}.Yvqh9W_taskTrayClose{border:0;border-left:1px solid var(--dsw-alias-border-l1);width:32px;color:var(--dsw-alias-label-tertiary);cursor:pointer;font:inherit;background:0 0;font-size:17px}.Yvqh9W_taskTrayClose:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.Yvqh9W_taskTray[data-open=false] .Yvqh9W_taskTrayToggle{min-height:34px}.Yvqh9W_taskRows{min-height:0;overflow-y:auto}.Yvqh9W_taskTray[data-open=false] .Yvqh9W_taskRows{display:none}.Yvqh9W_taskRow{border-top:1px solid var(--dsw-alias-border-l1);grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;padding:7px 10px;display:grid}.Yvqh9W_taskRow:first-of-type{border-top:0}.Yvqh9W_taskStatus{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-size:11px}.Yvqh9W_taskRow[data-status=running] .Yvqh9W_taskStatus{color:var(--dsw-alias-brand-primary)}.Yvqh9W_taskRow[data-status=failed] .Yvqh9W_taskStatus{color:var(--dsw-alias-label-error)}.Yvqh9W_taskPrompt{color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.Yvqh9W_taskRow button{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);cursor:pointer;font:inherit;border:0;border-radius:5px;padding:2px 7px;font-size:11px}.Yvqh9W_taskRow button:hover{color:var(--dsw-alias-brand-primary)}.Yvqh9W_configGuide{z-index:1100;background:#00000059;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.Yvqh9W_configGuideBody{border:1px solid var(--dsw-alias-border-l2);width:min(360px,100%);color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border-radius:10px;flex-direction:column;gap:12px;padding:18px;display:flex;box-shadow:0 14px 40px #0003}.Yvqh9W_configGuideBody span{color:var(--dsw-alias-label-secondary);font-size:13px;line-height:1.55}.Yvqh9W_configGuideBody button{min-height:30px;color:var(--dsw-alias-bg-layer-1);background:var(--dsw-alias-brand-primary);cursor:pointer;font:inherit;border:0;border-radius:7px;align-self:flex-end;padding:0 12px;font-size:12px}.Yvqh9W_history{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:12px;flex-direction:column;flex:none;width:240px;min-width:200px;max-width:280px;min-height:0;display:flex;overflow:hidden}.Yvqh9W_historyHeader{border-bottom:1px solid var(--dsw-alias-border-l1);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;display:flex}.Yvqh9W_historyFilters{border-bottom:1px solid var(--dsw-alias-border-l1);grid-template-columns:1fr 1fr;gap:6px;padding:8px 10px;display:grid}.Yvqh9W_historySearch,.Yvqh9W_historyFilters select,.Yvqh9W_gallerySearch{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);min-width:0;min-height:29px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);font:inherit;border-radius:7px;padding:0 8px;font-size:11px}.Yvqh9W_historySearch{grid-column:1/-1}.Yvqh9W_gallerySearch{width:156px}.Yvqh9W_galleryTagInput{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);width:130px;min-height:29px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);font:inherit;border-radius:7px;padding:0 8px;font-size:11px}.Yvqh9W_galleryBulkButton{border:1px solid var(--dsw-alias-border-l2);min-height:29px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);cursor:pointer;font:inherit;border-radius:7px;padding:0 8px;font-size:11px}.Yvqh9W_galleryBulkButton:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_galleryBulkButton:disabled{opacity:.45;cursor:default}.Yvqh9W_historyTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.Yvqh9W_historyClear{font:inherit;color:var(--dsw-alias-label-tertiary);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11.5px}.Yvqh9W_historyClear:hover{color:var(--dsw-alias-label-error);border-color:var(--dsw-alias-label-error)}.Yvqh9W_historyList{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:8px;min-height:0;padding:10px;display:flex;overflow-y:auto}.Yvqh9W_historyList::-webkit-scrollbar{width:8px}.Yvqh9W_historyList::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_historyEmpty{text-align:center;color:var(--dsw-alias-label-tertiary);flex:1;justify-content:center;align-items:center;padding:20px;font-size:12px;line-height:1.6;display:flex}.Yvqh9W_historyItem{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);border-radius:10px;flex-direction:column;flex:none;gap:6px;padding:8px;display:flex}.Yvqh9W_historyItem:hover{border-color:var(--dsw-alias-border-l2)}.Yvqh9W_historyItem[data-active]{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_historyMain{font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:flex-start;gap:8px;min-width:0;padding:0;display:flex}.Yvqh9W_historyThumb{object-fit:cover;background:var(--dsw-alias-bg-base);border-radius:8px;flex:none;width:52px;height:52px}.Yvqh9W_historyThumbPlaceholder{background:var(--dsw-alias-bg-layer-3);border-radius:8px;flex:none;width:52px;height:52px}.Yvqh9W_historyInfo{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.Yvqh9W_historyPrompt{color:var(--dsw-alias-label-primary);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:1.4;display:-webkit-box;overflow:hidden}.Yvqh9W_historyMeta{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.Yvqh9W_historyActions{justify-content:flex-end;gap:6px;display:flex}.Yvqh9W_historyAction{font:inherit;color:var(--dsw-alias-label-secondary);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11.5px}.Yvqh9W_historyAction:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.Yvqh9W_historyAction[data-danger]:hover{color:var(--dsw-alias-label-error);border-color:var(--dsw-alias-label-error)}.Yvqh9W_card{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;flex:none;gap:10px;padding:12px;display:flex}.Yvqh9W_modeRow{align-items:center;gap:8px;display:flex}.Yvqh9W_modePill{flex:1;justify-content:center;height:28px;font-size:13px}.Yvqh9W_uploadBox{min-height:128px;color:var(--dsw-alias-label-secondary);border:1.5px dashed var(--dsw-alias-border-l2);cursor:pointer;font:inherit;text-align:center;background:0 0;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:16px;font-size:12.5px;display:flex}.Yvqh9W_uploadBox:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed);background:var(--dsw-alias-interactive-bg-hover)}.Yvqh9W_uploadBox:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.Yvqh9W_uploadIcon{color:var(--dsw-alias-label-tertiary);display:inline-flex}.Yvqh9W_uploadHint{color:var(--dsw-alias-label-tertiary);font-size:11px}.Yvqh9W_reference{flex-direction:column;gap:8px;display:flex}.Yvqh9W_referenceImage{object-fit:contain;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;width:100%;max-height:176px}.Yvqh9W_referenceActions{gap:8px;display:flex}.Yvqh9W_hiddenFile{display:none}.Yvqh9W_prompt{width:100%;min-height:120px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);resize:vertical;box-sizing:border-box;border-radius:10px;outline:none;padding:10px 12px;font-family:inherit;font-size:13px;line-height:1.6}.Yvqh9W_prompt:focus-visible{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_prompt::placeholder{color:var(--dsw-alias-label-tertiary)}.Yvqh9W_promptFooter{justify-content:space-between;align-items:center;gap:8px;margin-top:-6px;display:flex}.Yvqh9W_templatesButton{border:1px solid var(--dsw-alias-brand-primary);background:linear-gradient(135deg, color-mix(in srgb, var(--dsw-alias-brand-primary) 14%, transparent), color-mix(in srgb, var(--dsw-alias-brand-primary) 5%, transparent));height:26px;color:var(--dsw-alias-brand-primary);cursor:pointer;box-shadow:0 1px 0 color-mix(in srgb, var(--dsw-alias-brand-primary) 22%, transparent);border-radius:999px;align-items:center;gap:6px;padding:0 12px;font-family:inherit;font-size:12px;font-weight:600;transition:transform .12s,box-shadow .12s,background .12s;display:inline-flex}.Yvqh9W_templatesButton svg{flex:none}.Yvqh9W_templatesButton:hover{background:linear-gradient(135deg, color-mix(in srgb, var(--dsw-alias-brand-primary) 24%, transparent), color-mix(in srgb, var(--dsw-alias-brand-primary) 8%, transparent));color:var(--dsw-alias-brand-primary);box-shadow:0 2px 6px color-mix(in srgb, var(--dsw-alias-brand-primary) 30%, transparent);transform:translateY(-1px)}.Yvqh9W_templatesButton:active{transform:translateY(0)}.Yvqh9W_enhanceButton{border:1px solid var(--dsw-alias-border-l2);height:26px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);font:inherit;cursor:pointer;border-radius:999px;margin-left:auto;padding:0 11px;font-size:12px}.Yvqh9W_enhanceButton:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_enhanceButton:disabled{opacity:.5;cursor:default}.Yvqh9W_promptCount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:11px}.Yvqh9W_paramGroup{flex-direction:column;gap:8px;display:flex}.Yvqh9W_paramLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}.Yvqh9W_optionRow{flex-wrap:wrap;gap:6px;display:flex}.Yvqh9W_optionGrid{grid-template-columns:repeat(3,1fr);gap:6px;display:grid}.Yvqh9W_optionPill{justify-content:center}.Yvqh9W_paramHint{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.45}.Yvqh9W_footer{border-top:1px solid var(--dsw-alias-border-l1);flex-direction:column;flex:none;align-items:stretch;gap:8px;padding:10px 2px 0 0;display:flex}.Yvqh9W_modelWrap{flex-direction:column;gap:5px;min-width:0;display:flex}.Yvqh9W_modelLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}.Yvqh9W_modelSelect{width:100%;height:36px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;text-align:left;border-radius:18px;outline:none;justify-content:space-between;align-items:center;gap:8px;padding:0 12px;font-family:inherit;font-size:13px;display:flex}.Yvqh9W_modelSelect:focus-visible{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_modelSelect:disabled{opacity:.55;cursor:default}.Yvqh9W_modelMenu{min-width:0;display:block;position:relative}.Yvqh9W_modelMenuList{z-index:40;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:12px;flex-direction:column;padding:4px;display:flex;position:absolute;bottom:calc(100% + 6px);left:0;right:0;overflow:hidden;box-shadow:0 -8px 24px #0000002e}.Yvqh9W_modelMenuItem{width:100%;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;text-align:left;white-space:nowrap;text-overflow:ellipsis;background:0 0;border:none;border-radius:8px;padding:7px 10px;font-size:13px;display:block;overflow:hidden}.Yvqh9W_modelMenuItem:hover{background:var(--dsw-alias-bg-hover)}.Yvqh9W_modelMenuItem[data-selected]{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1);font-weight:600}.Yvqh9W_generateButton{width:100%}.Yvqh9W_generateInner{align-items:center;gap:7px;display:inline-flex}.Yvqh9W_canvasState{text-align:center;color:var(--dsw-alias-label-tertiary);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:8px;padding:24px;display:flex}.Yvqh9W_canvasStateTitle{color:var(--dsw-alias-label-secondary);font-size:14px;font-weight:600}.Yvqh9W_canvasStateHint{max-width:380px;font-size:12px;line-height:1.6}.Yvqh9W_canvasEmptyIcon{color:var(--dsw-alias-label-tertiary);margin-bottom:4px;display:inline-flex}.Yvqh9W_canvasError{color:var(--dsw-alias-label-error);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-label-error);overflow-wrap:anywhere;border-radius:10px;flex:none;margin:14px;padding:10px 14px;font-size:12.5px;line-height:1.6}.Yvqh9W_canvasBody{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:10px;min-height:0;padding:14px;display:flex;overflow-y:auto}.Yvqh9W_canvasBody::-webkit-scrollbar{width:8px}.Yvqh9W_canvasBody::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_canvasMeta{color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:8px;font-size:12px;display:flex}.Yvqh9W_canvasHistoryTag{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);white-space:nowrap;border-radius:999px;padding:1px 8px;font-size:11px}.Yvqh9W_grid{flex:1;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;min-height:0;display:grid}.Yvqh9W_grid[data-count=\"1\"] .Yvqh9W_imageCard{grid-area:1/1/3/3}.Yvqh9W_imageCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);cursor:zoom-in;border-radius:12px;flex-direction:column;min-height:0;margin:0;display:flex;position:relative;overflow:hidden}.Yvqh9W_imageCard:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.Yvqh9W_image{object-fit:cover;background:var(--dsw-alias-bg-base);flex:1;width:100%;min-height:0;display:block}.Yvqh9W_imageCaption{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;border-top:1px solid var(--dsw-alias-border-l1);padding:7px 10px;font-size:11px;line-height:1.5;overflow:hidden}.Yvqh9W_download{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);opacity:0;backdrop-filter:blur(4px);border-radius:999px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;text-decoration:none;transition:opacity .12s;position:absolute;top:8px;right:8px}.Yvqh9W_imageCard:hover .Yvqh9W_download{opacity:1}.Yvqh9W_download:hover{background:var(--dsw-alias-bg-base)}.Yvqh9W_galleryAdd{font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;opacity:0;backdrop-filter:blur(4px);border-radius:999px;align-items:center;gap:5px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;transition:opacity .12s;display:inline-flex;position:absolute;top:8px;left:8px}.Yvqh9W_imageCard:hover .Yvqh9W_galleryAdd{opacity:1}.Yvqh9W_galleryAdd:hover{background:var(--dsw-alias-bg-base)}.Yvqh9W_galleryAdd:disabled{opacity:.4;cursor:default}.Yvqh9W_zoomHint{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);opacity:0;backdrop-filter:blur(4px);pointer-events:none;border-radius:999px;align-items:center;gap:5px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;transition:opacity .12s;display:inline-flex;position:absolute;bottom:8px;left:8px}.Yvqh9W_imageCard:hover .Yvqh9W_zoomHint{opacity:1}.Yvqh9W_spinner,.Yvqh9W_bigSpinner{border:2px solid;border-top-color:#0000;border-radius:50%;flex:none;animation:.8s linear infinite Yvqh9W_dshImageGenSpin;display:inline-block}.Yvqh9W_spinner{width:11px;height:11px}.Yvqh9W_bigSpinner{width:30px;height:30px;color:var(--dsw-alias-state-business-primary);border-width:3px;margin-bottom:6px}.Yvqh9W_lightbox{z-index:1000;backdrop-filter:blur(6px);background:#000000b8;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;inset:0}.Yvqh9W_lightboxClose{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:50%;justify-content:center;align-items:center;width:38px;height:38px;display:inline-flex;position:absolute;top:16px;right:16px}.Yvqh9W_lightboxClose:hover{background:#ffffff42}.Yvqh9W_lightboxNav{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:50%;justify-content:center;align-items:center;width:42px;height:42px;display:inline-flex;position:absolute;top:50%;transform:translateY(-50%)}.Yvqh9W_lightboxNav:hover{background:#ffffff42}.Yvqh9W_lightboxNav[data-dir=prev]{left:max(20px,50% - 640px)}.Yvqh9W_lightboxNav[data-dir=next]{right:max(20px,50% - 640px)}.Yvqh9W_lightboxFigure{flex-direction:column;gap:10px;width:min(1100px,100vw - 160px);max-width:min(1100px,100vw - 160px);height:min(820px,100vh - 48px);min-height:0;margin:0;display:flex}.Yvqh9W_lightboxStage{background:#ffffff0a;border-radius:10px;flex:1;min-height:0;position:relative;overflow:auto}.Yvqh9W_lightboxScaleFrame{justify-content:center;align-items:center;min-width:100%;min-height:100%;display:flex}.Yvqh9W_lightboxImage{object-fit:contain;border-radius:10px;max-width:100%;max-height:100%;display:block;box-shadow:0 24px 80px #00000080}.Yvqh9W_lightboxTools{justify-content:center;align-items:center;gap:6px;display:flex}.Yvqh9W_lightboxTool,.Yvqh9W_lightboxZoomLevel,.Yvqh9W_lightboxCopy{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;justify-content:center;align-items:center;display:inline-flex}.Yvqh9W_lightboxTool,.Yvqh9W_lightboxZoomLevel{height:32px}.Yvqh9W_lightboxTool{border-radius:50%;width:32px}.Yvqh9W_lightboxZoomLevel{min-width:58px;font:inherit;font-variant-numeric:tabular-nums;border-radius:999px;padding:0 9px;font-size:12px}.Yvqh9W_lightboxTool:hover,.Yvqh9W_lightboxZoomLevel:hover,.Yvqh9W_lightboxCopy:hover{background:#ffffff42}.Yvqh9W_lightboxCaptionRow{align-items:flex-start;gap:8px;min-width:0;display:flex}.Yvqh9W_lightboxCaption{color:#ffffffe6;-webkit-line-clamp:3;-webkit-box-orient:vertical;flex:1;min-width:0;font-size:12px;line-height:1.6;display:-webkit-box;overflow:hidden}.Yvqh9W_lightboxCopy{min-height:28px;font:inherit;white-space:nowrap;border-radius:999px;flex:none;gap:5px;padding:4px 9px;font-size:12px}.Yvqh9W_lightboxMeta{justify-content:space-between;align-items:center;gap:12px;display:flex}.Yvqh9W_lightboxIndex{color:#fffc;font-variant-numeric:tabular-nums;font-size:12px}.Yvqh9W_lightboxActions{align-items:center;gap:8px;display:inline-flex}.Yvqh9W_lightboxDownload,.Yvqh9W_lightboxEdit{font:inherit;color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:999px;padding:4px 14px;font-size:12.5px;font-weight:500;text-decoration:none}.Yvqh9W_lightboxDownload:hover,.Yvqh9W_lightboxEdit:hover{background:#ffffff42}.Yvqh9W_lightboxEdit{color:#fff;background:#ffffff24;border:1px solid #ffffff47;border-radius:999px}@media (width<=720px){.Yvqh9W_lightbox{padding:16px}.Yvqh9W_lightboxFigure{width:calc(100vw - 32px);max-width:none}.Yvqh9W_lightboxNav[data-dir=prev]{left:20px}.Yvqh9W_lightboxNav[data-dir=next]{right:20px}.Yvqh9W_lightboxCaptionRow,.Yvqh9W_lightboxMeta{flex-direction:column;align-items:stretch}.Yvqh9W_lightboxCopy,.Yvqh9W_lightboxActions{align-self:flex-end}}@keyframes Yvqh9W_dshImageGenSpin{to{transform:rotate(360deg)}}.Yvqh9W_galleryToast{z-index:30;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);backdrop-filter:blur(6px);pointer-events:none;border-radius:999px;align-items:center;gap:7px;padding:6px 16px;font-size:13px;font-weight:500;animation:.16s ease-out Yvqh9W_dshImageGenToastIn;display:inline-flex;position:absolute;bottom:24px;left:50%;transform:translate(-50%);box-shadow:0 8px 24px #00000038}@keyframes Yvqh9W_dshImageGenToastIn{0%{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%)}}@media (prefers-reduced-motion:reduce){.Yvqh9W_download,.Yvqh9W_spinner,.Yvqh9W_bigSpinner{transition:none;animation-duration:1.5s}}.Yvqh9W_config[data-gallery=true] .Yvqh9W_configScroll>:not(:first-child),.Yvqh9W_config[data-gallery=true] .Yvqh9W_footer,.Yvqh9W_canvas[data-gallery=true]>.Yvqh9W_canvasState,.Yvqh9W_canvas[data-gallery=true]>.Yvqh9W_canvasError,.Yvqh9W_canvas[data-gallery=true]>.Yvqh9W_canvasBody,.Yvqh9W_studio:has(.Yvqh9W_config[data-gallery=true])>.Yvqh9W_history{display:none}.Yvqh9W_config[data-gallery=true] .Yvqh9W_configScroll{flex:none;order:1;display:flex;overflow:visible}.Yvqh9W_config[data-gallery=true] .Yvqh9W_galleryFilters{flex:1;order:2;min-height:0}.Yvqh9W_galleryFilters{padding:18px 14px;overflow:hidden auto}.Yvqh9W_galleryFilterHeading{color:var(--dsw-alias-label-tertiary);margin:0 4px 10px;font-size:12px;font-weight:600}.Yvqh9W_galleryFilter{width:100%;min-height:34px;color:var(--dsw-alias-label-secondary);cursor:pointer;text-align:left;background:0 0;border:0;border-radius:9px;justify-content:space-between;align-items:center;padding:0 10px;display:flex}.Yvqh9W_galleryFilter:hover,.Yvqh9W_galleryFilter[data-active]{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 10%, transparent)}.Yvqh9W_galleryFilterCount{min-width:20px;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-2);text-align:center;border-radius:999px;padding:1px 6px;font-size:11px}.Yvqh9W_galleryFilterDivider{background:var(--dsw-alias-border-l1);height:1px;margin:18px 4px}.Yvqh9W_galleryRatioList{flex-wrap:wrap;gap:6px;display:flex}.Yvqh9W_galleryRatio{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);cursor:pointer;border:0;border-radius:999px;padding:6px 10px;font-size:12px}.Yvqh9W_galleryRatio[data-active]{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 13%, transparent)}.Yvqh9W_galleryTagFilterList{flex-wrap:wrap;gap:6px;display:flex}.Yvqh9W_galleryTagFilter{border:1px solid var(--dsw-alias-border-l1);min-width:0;max-width:100%;min-height:27px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);cursor:pointer;font:inherit;border-radius:6px;align-items:center;gap:5px;padding:0 8px;font-size:11px;display:inline-flex}.Yvqh9W_galleryTagFilter span:first-child{text-overflow:ellipsis;white-space:nowrap;max-width:112px;overflow:hidden}.Yvqh9W_galleryTagFilter span:last-child{color:var(--dsw-alias-label-tertiary);font-size:10px}.Yvqh9W_galleryTagFilter:hover,.Yvqh9W_galleryTagFilter[data-active]{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 10%, transparent)}.Yvqh9W_galleryFilterNote{color:var(--dsw-alias-label-quaternary);margin:20px 4px 0;font-size:11px;line-height:1.5}.Yvqh9W_galleryWorkspace{box-sizing:border-box;flex-direction:column;width:100%;min-width:0;height:100%;min-height:0;padding:22px 24px 26px;display:flex;position:absolute;inset:0;overflow:hidden}.Yvqh9W_galleryToolbar{flex:none;justify-content:space-between;align-items:center;gap:16px;min-width:0;margin-bottom:18px;display:flex}.Yvqh9W_galleryHeading{color:var(--dsw-alias-label-primary);margin:0;font-size:20px;font-weight:700;display:inline}.Yvqh9W_galleryCount{color:var(--dsw-alias-label-tertiary);margin-left:8px;font-size:13px}.Yvqh9W_galleryToolbarActions{flex-wrap:wrap;align-items:center;gap:10px;min-width:0;display:flex}.Yvqh9W_gallerySelectMode,.Yvqh9W_galleryBulkButton,.Yvqh9W_gallerySelectionClear{border:1px solid var(--dsw-alias-border-l1);min-height:30px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);cursor:pointer;font:inherit;border-radius:7px;padding:0 10px;font-size:12px}.Yvqh9W_gallerySelectMode:hover,.Yvqh9W_gallerySelectMode[data-active],.Yvqh9W_galleryBulkButton:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:color-mix(in srgb, var(--dsw-alias-brand-primary) 38%, var(--dsw-alias-border-l1));background:color-mix(in srgb, var(--dsw-alias-brand-primary) 11%, transparent)}.Yvqh9W_galleryBulkButton:disabled{cursor:not-allowed;opacity:.45}.Yvqh9W_gallerySelectionBar{border:1px solid color-mix(in srgb, var(--dsw-alias-brand-primary) 35%, var(--dsw-alias-border-l1));background:color-mix(in srgb, var(--dsw-alias-brand-primary) 7%, var(--dsw-alias-bg-layer-1));border-radius:9px;flex:none;align-items:center;gap:10px;min-width:0;margin:-4px 0 16px;padding:10px 12px;display:flex}.Yvqh9W_gallerySelectionBar strong{color:var(--dsw-alias-brand-primary);flex:none;font-size:12px}.Yvqh9W_gallerySelectionClear{margin-left:auto}.Yvqh9W_gallerySelectionClear:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.Yvqh9W_galleryTagInput,.Yvqh9W_gallerySearch{border:1px solid var(--dsw-alias-border-l1);min-width:0;height:30px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);font:inherit;border-radius:7px;outline:none;padding:0 10px;font-size:12px}.Yvqh9W_galleryTagInput{flex:190px}.Yvqh9W_galleryTagInput:focus,.Yvqh9W_gallerySearch:focus{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_galleryViewToggle{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:9px;padding:3px;display:flex}.Yvqh9W_galleryViewToggle button,.Yvqh9W_gallerySort,.Yvqh9W_galleryClear{min-height:30px;color:var(--dsw-alias-label-secondary);cursor:pointer;font:inherit;background:0 0;border:0;border-radius:7px;padding:0 10px;font-size:12px}.Yvqh9W_galleryViewToggle button[data-active],.Yvqh9W_galleryViewToggle button:hover,.Yvqh9W_gallerySort:hover,.Yvqh9W_galleryClear:hover{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 11%, transparent)}.Yvqh9W_gallerySort{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1)}.Yvqh9W_galleryClear{border:1px solid var(--dsw-alias-border-l1)}.Yvqh9W_compareControl{flex-direction:column;gap:6px;margin:0 0 10px;display:flex}.Yvqh9W_compareToggle,.Yvqh9W_compareModelChoices label{color:var(--dsw-alias-label-secondary);cursor:pointer;align-items:center;gap:6px;font-size:12px;display:flex}.Yvqh9W_compareToggle input,.Yvqh9W_compareModelChoices input{accent-color:var(--dsw-alias-brand-primary)}.Yvqh9W_compareModelChoices{flex-wrap:wrap;gap:6px;display:flex}.Yvqh9W_compareModelChoices label{border:1px solid var(--dsw-alias-border-l1);border-radius:5px;padding:4px 6px;font-size:10px}.Yvqh9W_comparisonBoard{z-index:4;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);border-radius:8px;flex-direction:column;display:flex;position:absolute;inset:126px 14px 14px;overflow:hidden;box-shadow:0 8px 24px #0000001f}.Yvqh9W_comparisonBoard>header{border-bottom:1px solid var(--dsw-alias-border-l1);justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.Yvqh9W_comparisonBoard>header div{align-items:baseline;gap:7px;display:flex}.Yvqh9W_comparisonBoard>header strong{color:var(--dsw-alias-label-primary);font-size:13px}.Yvqh9W_comparisonBoard>header span{color:var(--dsw-alias-label-tertiary);font-size:11px}.Yvqh9W_comparisonBoard>header button{border:1px solid var(--dsw-alias-border-l1);min-height:28px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);cursor:pointer;font:inherit;border-radius:5px;padding:0 9px;font-size:11px}.Yvqh9W_comparisonGrid{flex:1;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;padding:12px;display:grid;overflow:auto}.Yvqh9W_comparisonGrid article{flex-direction:column;gap:7px;min-width:0;display:flex}.Yvqh9W_comparisonGrid article>strong{color:var(--dsw-alias-label-primary);font-size:12px}.Yvqh9W_comparisonGrid article>span{min-height:160px;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-2);place-items:center;font-size:12px;display:grid}.Yvqh9W_comparisonGrid img{object-fit:contain;background:var(--dsw-alias-bg-base);width:100%;min-height:160px;max-height:calc(100vh - 260px);display:block}.Yvqh9W_comparisonFullscreen{z-index:1200;background:#000000eb;padding:54px 24px 24px;position:fixed;inset:0;overflow:auto}.Yvqh9W_comparisonFullscreenGrid{grid-template-columns:repeat(auto-fit,minmax(300px,1fr));align-items:start;gap:18px;min-height:100%;display:grid}.Yvqh9W_comparisonFullscreen figure{min-width:0;margin:0}.Yvqh9W_comparisonFullscreen figcaption{color:#fff;margin-bottom:8px;font-size:13px;font-weight:600}.Yvqh9W_comparisonFullscreen img{background:#111;width:100%;margin-bottom:10px;display:block}.Yvqh9W_galleryMasonry{box-sizing:border-box;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex:auto;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:max-content;align-content:start;gap:16px;width:100%;min-width:0;max-width:100%;height:0;min-height:0;padding:2px 8px 16px 2px;display:grid;overflow:hidden scroll}.Yvqh9W_galleryMasonry::-webkit-scrollbar{width:8px}.Yvqh9W_galleryMasonry::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_galleryCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:14px;width:100%;margin:0;display:block;position:relative;overflow:hidden;box-shadow:0 5px 18px #18203612}.Yvqh9W_galleryCard[data-selected]{border-color:var(--dsw-alias-brand-primary);box-shadow:0 0 0 2px color-mix(in srgb, var(--dsw-alias-brand-primary) 26%, transparent), 0 5px 18px #18203612}.Yvqh9W_gallerySelect{z-index:2;cursor:pointer;background:#00000094;border:1px solid #ffffffbf;border-radius:7px;place-items:center;width:26px;height:26px;display:grid;position:absolute;top:9px;right:9px}.Yvqh9W_gallerySelect input{width:16px;height:16px;accent-color:var(--dsw-alias-brand-primary);cursor:pointer;margin:0}.Yvqh9W_galleryImageButton{background:var(--dsw-alias-bg-base);cursor:zoom-in;border:0;width:100%;padding:0;display:block;position:relative}.Yvqh9W_galleryImageButton[data-selecting]{cursor:pointer}.Yvqh9W_galleryImage{aspect-ratio:4/3;object-fit:cover;width:100%;display:block}.Yvqh9W_galleryMasonry[data-view=masonry] .Yvqh9W_galleryCard:nth-child(3n+1) .Yvqh9W_galleryImage{aspect-ratio:4/5}.Yvqh9W_galleryMasonry[data-view=masonry] .Yvqh9W_galleryCard:nth-child(3n+2) .Yvqh9W_galleryImage{aspect-ratio:4/3}.Yvqh9W_galleryMasonry[data-view=masonry] .Yvqh9W_galleryCard:nth-child(3n) .Yvqh9W_galleryImage{aspect-ratio:3/4}.Yvqh9W_galleryBadge{color:#fff;backdrop-filter:blur(4px);background:#121724c2;border-radius:999px;padding:4px 9px;font-size:11px;position:absolute;top:10px;left:10px}.Yvqh9W_galleryCardFooter{align-items:center;gap:9px;min-width:0;padding:10px 12px;display:flex}.Yvqh9W_galleryAvatar{color:#fff;background:var(--dsw-alias-brand-primary);border-radius:50%;flex:none;place-items:center;width:27px;height:27px;font-size:12px;font-weight:700;display:grid}.Yvqh9W_galleryCardInfo{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.Yvqh9W_galleryCardInfo strong,.Yvqh9W_galleryCardInfo small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.Yvqh9W_galleryCardInfo strong{color:var(--dsw-alias-label-primary);font-size:12px}.Yvqh9W_galleryCardInfo small{color:var(--dsw-alias-label-tertiary);font-size:10px}.Yvqh9W_galleryTags{flex-wrap:wrap;gap:4px;margin-top:4px;display:flex}.Yvqh9W_galleryTags button{max-width:96px;min-height:19px;color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 10%, transparent);cursor:pointer;font:inherit;text-overflow:ellipsis;white-space:nowrap;border:0;border-radius:4px;padding:1px 6px;font-size:10px;line-height:1.35;overflow:hidden}.Yvqh9W_galleryTags button:hover{background:color-mix(in srgb, var(--dsw-alias-brand-primary) 17%, transparent)}.Yvqh9W_galleryTags .Yvqh9W_galleryTagEdit{color:var(--dsw-alias-label-tertiary);background:0 0;flex:none}.Yvqh9W_galleryTagEditor{align-items:center;gap:6px;padding:0 12px 10px 48px;display:flex}.Yvqh9W_galleryTagEditor input{border:1px solid var(--dsw-alias-border-l2);min-width:0;height:27px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);font:inherit;border-radius:6px;outline:none;flex:1;padding:0 8px;font-size:11px}.Yvqh9W_galleryTagEditor input:focus{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_galleryTagEditor button{border:1px solid var(--dsw-alias-border-l2);height:27px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);cursor:pointer;font:inherit;border-radius:6px;padding:0 8px;font-size:11px}.Yvqh9W_galleryTagEditor button[type=submit]{color:var(--dsw-alias-brand-primary)}.Yvqh9W_galleryRemove{width:24px;height:24px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:50%;flex:none;padding:0;font-size:18px}.Yvqh9W_galleryRemove:hover{color:var(--dsw-alias-state-error);background:var(--dsw-alias-bg-layer-2)}@media (width<=1100px){.Yvqh9W_galleryMasonry{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width<=760px){.Yvqh9W_studio{flex-direction:column;overflow:auto}.Yvqh9W_config{width:auto;max-width:none;height:auto;min-height:0}.Yvqh9W_config[data-gallery=true]{flex:none}.Yvqh9W_canvas{min-height:560px}.Yvqh9W_galleryToolbar{flex-direction:column;align-items:flex-start}.Yvqh9W_galleryToolbarActions{flex-wrap:wrap;width:100%}.Yvqh9W_galleryMasonry{grid-template-columns:1fr}}";
|
|
1690
|
+
//#region src/model-catalog.ts
|
|
1691
|
+
const ENTRIES = {
|
|
1692
|
+
"gpt-image": {
|
|
1693
|
+
label: "gpt-image",
|
|
1694
|
+
labelZh: "GPT 图像",
|
|
1695
|
+
known: true,
|
|
1696
|
+
supportsEdit: true,
|
|
1697
|
+
supportsAspectRatio: false,
|
|
1698
|
+
qualityTiers: [
|
|
1699
|
+
"1K",
|
|
1700
|
+
"2K",
|
|
1701
|
+
"4K"
|
|
1702
|
+
]
|
|
1703
|
+
},
|
|
1704
|
+
"dall-e": {
|
|
1705
|
+
label: "DALL·E",
|
|
1706
|
+
labelZh: "DALL·E",
|
|
1707
|
+
known: true,
|
|
1708
|
+
supportsEdit: true,
|
|
1709
|
+
supportsAspectRatio: false,
|
|
1710
|
+
qualityTiers: ["auto"]
|
|
1711
|
+
},
|
|
1712
|
+
grok: {
|
|
1713
|
+
label: "grok",
|
|
1714
|
+
labelZh: "Grok",
|
|
1715
|
+
known: true,
|
|
1716
|
+
supportsEdit: true,
|
|
1717
|
+
supportsAspectRatio: true,
|
|
1718
|
+
qualityTiers: ["1K", "2K"]
|
|
1719
|
+
},
|
|
1720
|
+
nanobanana: {
|
|
1721
|
+
label: "nanobanana",
|
|
1722
|
+
labelZh: "Nano Banana",
|
|
1723
|
+
known: true,
|
|
1724
|
+
supportsEdit: true,
|
|
1725
|
+
supportsAspectRatio: true,
|
|
1726
|
+
qualityTiers: [
|
|
1727
|
+
"1K",
|
|
1728
|
+
"2K",
|
|
1729
|
+
"4K"
|
|
1730
|
+
]
|
|
1731
|
+
},
|
|
1732
|
+
seedream: {
|
|
1733
|
+
label: "seedream",
|
|
1734
|
+
labelZh: "Seedream",
|
|
1735
|
+
known: true,
|
|
1736
|
+
supportsEdit: true,
|
|
1737
|
+
supportsAspectRatio: true,
|
|
1738
|
+
qualityTiers: ["1K", "2K"]
|
|
1739
|
+
},
|
|
1740
|
+
zhipu: {
|
|
1741
|
+
label: "GLM-Image",
|
|
1742
|
+
labelZh: "智谱图像",
|
|
1743
|
+
known: true,
|
|
1744
|
+
supportsEdit: false,
|
|
1745
|
+
supportsAspectRatio: false,
|
|
1746
|
+
qualityTiers: ["HD"]
|
|
1747
|
+
}
|
|
1748
|
+
};
|
|
1749
|
+
/** Official Gemini image ids served by Nano Banana gateways. */
|
|
1750
|
+
const NANOBANANA_GEMINI_IDS = /* @__PURE__ */ new Set([
|
|
1751
|
+
"gemini-3-pro-image",
|
|
1752
|
+
"gemini-3-pro-image-preview",
|
|
1753
|
+
"gemini-3.1-flash-image",
|
|
1754
|
+
"gemini-3.1-flash-image-preview",
|
|
1755
|
+
"gemini-3.1-flash-lite-image",
|
|
1756
|
+
"gemini-2.5-flash-image"
|
|
1757
|
+
]);
|
|
1758
|
+
/** Classify one upstream model id into its request-shaping family. */
|
|
1759
|
+
function describeModel(model) {
|
|
1760
|
+
const id = model.trim();
|
|
1761
|
+
if (/^gpt-image/i.test(id)) return {
|
|
1762
|
+
family: "gpt-image",
|
|
1763
|
+
...ENTRIES["gpt-image"]
|
|
1764
|
+
};
|
|
1765
|
+
if (/^dall-e/i.test(id)) return {
|
|
1766
|
+
family: "dall-e",
|
|
1767
|
+
...ENTRIES["dall-e"]
|
|
1768
|
+
};
|
|
1769
|
+
if (/^grok-imagine(?:-|$)/.test(id)) return {
|
|
1770
|
+
family: "grok",
|
|
1771
|
+
...ENTRIES.grok
|
|
1772
|
+
};
|
|
1773
|
+
if (/^nanobanana/i.test(id) || NANOBANANA_GEMINI_IDS.has(id)) return {
|
|
1774
|
+
family: "nanobanana",
|
|
1775
|
+
...ENTRIES.nanobanana
|
|
1776
|
+
};
|
|
1777
|
+
if (/^(?:doubao-)?seedream/i.test(id)) return {
|
|
1778
|
+
family: "seedream",
|
|
1779
|
+
...ENTRIES.seedream
|
|
1780
|
+
};
|
|
1781
|
+
if (/^(?:glm-image|cogview(?:-|$))/i.test(id)) return {
|
|
1782
|
+
family: "zhipu",
|
|
1783
|
+
...ENTRIES.zhipu
|
|
1784
|
+
};
|
|
1785
|
+
return {
|
|
1786
|
+
family: "unknown",
|
|
1787
|
+
label: "unknown",
|
|
1788
|
+
labelZh: "未知协议",
|
|
1789
|
+
known: false,
|
|
1790
|
+
supportsEdit: true,
|
|
1791
|
+
supportsAspectRatio: false,
|
|
1792
|
+
qualityTiers: []
|
|
1793
|
+
};
|
|
1794
|
+
}
|
|
1795
|
+
//#endregion
|
|
1796
|
+
//#region src/client/conversation-sync.ts
|
|
1797
|
+
/** Document event used to bridge chat tool results into the image workspace. */
|
|
1798
|
+
const CHAT_IMAGE_EVENT = "dsh-imagegen:chat-images";
|
|
1799
|
+
//#endregion
|
|
1800
|
+
//#region \0dsh-css:D:\learn\dsh\dsh-imagegen\src\client\panel.module.css.mjs
|
|
1801
|
+
const css$2 = "[data-pane=conversation],[class*=centerCol]{min-width:0;min-height:0;position:relative}[data-dsh-imagegen-view]{z-index:60;background:var(--dsw-alias-bg-base);grid-area:1/1;min-width:0;min-height:0;display:none;position:relative}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-pane=conversation],html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [class*=centerCol]{grid-template-columns:minmax(0, 1fr) 8px minmax(320px, clamp(320px, var(--dsh-imagegen-chat-width,36%), 70%));background:var(--dsw-alias-border-l1);grid-template-rows:minmax(0,1fr);gap:1px;overflow:hidden;display:grid!important}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-dsh-imagegen-view]{display:block}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-slot=conversation]{background:var(--dsw-alias-bg-base);grid-area:1/3;align-items:stretch;width:auto;min-width:0;min-height:0;overflow:hidden;display:flex!important}html[data-dsh-imagegen-active] [data-slot=conversation]>[data-phase]{flex:auto;align-self:stretch;width:100%;min-width:0;max-width:none}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-dsh-imagegen-chat-resizer]{grid-area:1/2}.kUIMeq_chatResizer{z-index:70;width:8px;min-width:8px;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-border-l1);cursor:col-resize;touch-action:none;justify-content:center;align-items:center;display:none;position:relative}.kUIMeq_chatResizer:before{content:\"\";opacity:.55;background:currentColor;border-radius:3px;width:3px;height:36px}.kUIMeq_chatResizer:hover,.kUIMeq_chatResizer:focus-visible{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-2);outline:none}html[data-dsh-imagegen-active] [data-dsh-imagegen-chat-resizer]{display:flex!important}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-pane=conversation]>:not([data-dsh-imagegen-view]):not([data-slot=conversation]):not([data-dsh-imagegen-chat-resizer]),html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [class*=centerCol]>:not([data-dsh-imagegen-view]):not([data-slot=conversation]):not([data-dsh-imagegen-chat-resizer]),html[data-dsh-imagegen-active] [data-dsh-imagegen-sidebar-root]>:not([data-dsh-imagegen-session-tabs]):not([class*=logoRow]):not([class*=regionArea]):not([class*=footArea]){display:none!important}@media (width<=760px){html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-pane=conversation],html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [class*=centerCol]{grid-template-rows:minmax(0,1fr) minmax(340px,.9fr);grid-template-columns:minmax(0,1fr);overflow-y:auto}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-slot=conversation]{grid-area:2/1}html[data-dsh-imagegen-active] [data-dsh-imagegen-chat-resizer]{display:none!important}}.kUIMeq_entry{width:100%;height:32px;color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:8px;align-items:center;gap:8px;padding:0 12px;font-size:13px;display:flex}.kUIMeq_entry:hover{background:var(--dsw-specific-sidebar-nav-item-hover);color:var(--dsw-alias-label-primary)}.kUIMeq_entry[data-active]{background:var(--dsw-specific-sidebar-nav-item-active);color:var(--dsw-alias-label-primary);font-weight:600}.kUIMeq_entryIcon{flex:none;justify-content:center;align-items:center;display:inline-flex}.kUIMeq_entryLabel{text-overflow:ellipsis;overflow:hidden}.kUIMeq_sessionTabs{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:9px;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:2px;width:100%;min-width:0;padding:3px;display:grid}.kUIMeq_sessionTab{min-width:0;height:30px;color:var(--dsw-alias-label-secondary);cursor:pointer;font:inherit;white-space:nowrap;background:0 0;border:0;border-radius:7px;justify-content:center;align-items:center;gap:6px;padding:0 8px;font-size:12px;display:inline-flex}.kUIMeq_sessionTab:hover,.kUIMeq_sessionTab[data-active]{color:var(--dsw-alias-label-primary);background:var(--dsw-specific-sidebar-nav-item-active)}.kUIMeq_sessionTabIcon{flex:none;justify-content:center;align-items:center;display:inline-flex}.kUIMeq_sessionTabLabel{text-overflow:ellipsis;min-width:0;overflow:hidden}[class*=regionArea]{min-height:0;position:relative}.kUIMeq_sidebarHistoryHost{z-index:30;background:var(--dsw-alias-bg-base);min-width:0;min-height:0;padding:6px 4px;display:none;position:absolute;inset:0;overflow:hidden}html[data-dsh-imagegen-active] .kUIMeq_sidebarHistoryHost{display:flex}.kUIMeq_sidebarHistoryHost .kUIMeq_history{background:0 0;border:0;border-radius:8px;width:100%;height:100%}[data-dsh-frame][data-sidebar-collapsed] .kUIMeq_sidebarHistoryHost{display:none}[data-dsh-frame][data-sidebar-collapsed] .kUIMeq_entry{justify-content:center;width:100%;padding:0}[data-dsh-frame][data-sidebar-collapsed] .kUIMeq_entryLabel{display:none}.kUIMeq_view{width:100%;min-width:0;min-height:0;overflow:hidden}.kUIMeq_panel,.kUIMeq_panel *,.kUIMeq_panel :before,.kUIMeq_panel :after{box-sizing:border-box}.kUIMeq_panel{background:var(--dsw-alias-bg-base);min-width:0;height:100%;min-height:0;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);flex-direction:column;gap:10px;padding:14px 16px 16px;display:flex;position:relative;overflow:hidden}.kUIMeq_panelHeader{flex:none;justify-content:space-between;align-items:center;gap:12px;display:flex}.kUIMeq_panelHeading{align-items:baseline;gap:10px;min-width:0;display:flex}.kUIMeq_panelTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;margin:0;font-size:16px;font-weight:700}.kUIMeq_githubLink{width:22px;height:22px;color:var(--dsw-alias-label-secondary);border-radius:6px;flex:none;justify-content:center;align-items:center;text-decoration:none;transition:color .12s,background .12s;display:inline-flex}.kUIMeq_githubLink:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.kUIMeq_connectionStatus{border:1px solid var(--dsw-alias-label-error);height:28px;color:var(--dsw-alias-label-error);font:inherit;white-space:nowrap;background:0 0;border-radius:8px;flex:none;align-items:center;gap:6px;padding:0 10px;font-size:12px;line-height:1;display:inline-flex}.kUIMeq_connectionStatus[data-connected=true]{border-color:var(--dsw-alias-state-success-primary);color:var(--dsw-alias-state-success-primary)}.kUIMeq_connectionDot{background:currentColor;border-radius:50%;width:6px;height:6px}.kUIMeq_updateBanner{border:1px solid var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-state-warn-primary);overflow-wrap:anywhere;border-radius:10px;flex:none;justify-content:space-between;align-items:center;gap:12px;padding:7px 10px 7px 12px;font-size:12px;line-height:1.5;display:flex}.kUIMeq_updateBanner[data-kind=ok]{color:var(--dsw-alias-state-success-primary);border-color:var(--dsw-alias-state-success-primary)}.kUIMeq_updateText{min-width:0}.kUIMeq_updateActions{flex:none;align-items:center;gap:10px;display:inline-flex}.kUIMeq_updateRelease{color:inherit;text-underline-offset:2px;white-space:nowrap;text-decoration:underline}@media (width<=700px){.kUIMeq_panelHeader{align-items:flex-start}.kUIMeq_panelHeading{flex-direction:column;align-items:flex-start;gap:2px}.kUIMeq_updateBanner{flex-direction:column;align-items:flex-start}.kUIMeq_updateActions{justify-content:space-between;width:100%}}.kUIMeq_studio{flex:1;min-width:0;min-height:0;display:flex}.kUIMeq_generation{gap:14px;width:100%;min-width:0;min-height:0;display:flex}.kUIMeq_config{flex-direction:column;flex:none;gap:12px;width:min(300px,42%);min-width:220px;max-width:300px;height:100%;min-height:0;display:flex;overflow:hidden}.kUIMeq_configScroll{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:12px;min-height:0;padding-right:2px;display:flex;overflow-y:auto}.kUIMeq_configScroll::-webkit-scrollbar{width:8px}.kUIMeq_configScroll::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.kUIMeq_canvas{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:12px;flex-direction:column;flex:1;min-width:0;min-height:0;display:flex;position:relative;overflow:hidden}.kUIMeq_taskTray{z-index:6;border:1px solid var(--dsw-alias-border-l2);background:color-mix(in srgb, var(--dsw-alias-bg-layer-1) 92%, transparent);backdrop-filter:blur(10px);border-radius:9px;flex-direction:column;width:min(360px,100% - 24px);max-height:calc(100% - 24px);display:flex;position:absolute;top:12px;right:12px;overflow:hidden;box-shadow:0 8px 24px #0000001f}.kUIMeq_taskTray[data-open=false]{width:auto;max-width:calc(100% - 24px)}.kUIMeq_taskTrayHeader{min-height:34px;color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);align-items:stretch;font-size:12px;font-weight:600;display:flex}.kUIMeq_taskTray[data-open=false] .kUIMeq_taskTrayHeader{border-bottom:0}.kUIMeq_taskTrayToggle{min-width:0;color:inherit;cursor:pointer;font:inherit;font-size:inherit;font-weight:inherit;text-align:left;background:0 0;border:0;flex:1;align-items:center;gap:8px;padding:8px 10px;display:flex}.kUIMeq_taskTrayToggle:hover{background:var(--dsw-alias-bg-layer-2)}.kUIMeq_taskTrayCount{min-width:18px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);text-align:center;border-radius:999px;padding:1px 5px;font-size:11px;font-weight:500}.kUIMeq_taskTrayChevron{color:var(--dsw-alias-label-tertiary);margin-left:auto;font-size:12px;font-weight:400}.kUIMeq_taskTrayClose{border:0;border-left:1px solid var(--dsw-alias-border-l1);width:32px;color:var(--dsw-alias-label-tertiary);cursor:pointer;font:inherit;background:0 0;font-size:17px}.kUIMeq_taskTrayClose:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.kUIMeq_taskTray[data-open=false] .kUIMeq_taskTrayToggle{min-height:34px}.kUIMeq_taskRows{min-height:0;overflow-y:auto}.kUIMeq_taskTray[data-open=false] .kUIMeq_taskRows{display:none}.kUIMeq_taskRow{border-top:1px solid var(--dsw-alias-border-l1);grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;padding:7px 10px;display:grid}.kUIMeq_taskRow:first-of-type{border-top:0}.kUIMeq_taskStatus{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-size:11px}.kUIMeq_taskRow[data-status=running] .kUIMeq_taskStatus{color:var(--dsw-alias-brand-primary)}.kUIMeq_taskRow[data-status=failed] .kUIMeq_taskStatus{color:var(--dsw-alias-label-error)}.kUIMeq_taskPrompt{color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.kUIMeq_taskRow button{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);cursor:pointer;font:inherit;border:0;border-radius:5px;padding:2px 7px;font-size:11px}.kUIMeq_taskRow button:hover{color:var(--dsw-alias-brand-primary)}.kUIMeq_configGuide{z-index:1100;background:#00000059;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.kUIMeq_configGuideBody{border:1px solid var(--dsw-alias-border-l2);width:min(360px,100%);color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border-radius:10px;flex-direction:column;gap:12px;padding:18px;display:flex;box-shadow:0 14px 40px #0003}.kUIMeq_configGuideBody span{color:var(--dsw-alias-label-secondary);font-size:13px;line-height:1.55}.kUIMeq_configGuideBody button{min-height:30px;color:var(--dsw-alias-bg-layer-1);background:var(--dsw-alias-brand-primary);cursor:pointer;font:inherit;border:0;border-radius:7px;align-self:flex-end;padding:0 12px;font-size:12px}.kUIMeq_history{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:12px;flex-direction:column;width:auto;min-width:0;max-width:none;min-height:0;display:flex;overflow:hidden}.kUIMeq_historyHeader{border-bottom:1px solid var(--dsw-alias-border-l1);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;display:flex}.kUIMeq_historyFilters{border-bottom:1px solid var(--dsw-alias-border-l1);grid-template-columns:1fr 1fr;gap:6px;padding:8px 10px;display:grid}.kUIMeq_historySearch,.kUIMeq_historyFilters select,.kUIMeq_gallerySearch{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);min-width:0;min-height:29px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);font:inherit;border-radius:7px;padding:0 8px;font-size:11px}.kUIMeq_historySearch{grid-column:1/-1}.kUIMeq_gallerySearch{width:156px}.kUIMeq_galleryTagInput{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);width:130px;min-height:29px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);font:inherit;border-radius:7px;padding:0 8px;font-size:11px}.kUIMeq_galleryBulkButton{border:1px solid var(--dsw-alias-border-l2);min-height:29px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);cursor:pointer;font:inherit;border-radius:7px;padding:0 8px;font-size:11px}.kUIMeq_galleryBulkButton:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.kUIMeq_galleryBulkButton:disabled{opacity:.45;cursor:default}.kUIMeq_historyTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.kUIMeq_historyClear{font:inherit;color:var(--dsw-alias-label-tertiary);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11.5px}.kUIMeq_historyClear:hover{color:var(--dsw-alias-label-error);border-color:var(--dsw-alias-label-error)}.kUIMeq_historyList{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:8px;min-height:0;padding:10px;display:flex;overflow-y:auto}.kUIMeq_historyList::-webkit-scrollbar{width:8px}.kUIMeq_historyList::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.kUIMeq_historyEmpty{text-align:center;color:var(--dsw-alias-label-tertiary);flex:1;justify-content:center;align-items:center;padding:20px;font-size:12px;line-height:1.6;display:flex}.kUIMeq_historyItem{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);border-radius:10px;flex-direction:column;flex:none;gap:6px;padding:8px;display:flex}.kUIMeq_historyItem:hover{border-color:var(--dsw-alias-border-l2)}.kUIMeq_historyItem[data-active]{border-color:var(--dsw-alias-brand-primary)}.kUIMeq_historyMain{font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:flex-start;gap:8px;min-width:0;padding:0;display:flex}.kUIMeq_historyThumb{object-fit:cover;background:var(--dsw-alias-bg-base);border-radius:8px;flex:none;width:52px;height:52px}.kUIMeq_historyThumbPlaceholder{background:var(--dsw-alias-bg-layer-3);border-radius:8px;flex:none;width:52px;height:52px}.kUIMeq_historyInfo{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.kUIMeq_historyPrompt{color:var(--dsw-alias-label-primary);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:1.4;display:-webkit-box;overflow:hidden}.kUIMeq_historyMeta{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.kUIMeq_historyActions{justify-content:flex-end;gap:6px;display:flex}.kUIMeq_historyAction{font:inherit;color:var(--dsw-alias-label-secondary);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11.5px}.kUIMeq_historyAction:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.kUIMeq_historyAction[data-danger]:hover{color:var(--dsw-alias-label-error);border-color:var(--dsw-alias-label-error)}.kUIMeq_card{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;flex:none;gap:10px;padding:12px;display:flex}.kUIMeq_modeRow{align-items:center;gap:8px;display:flex}.kUIMeq_modePill{flex:1;justify-content:center;height:28px;font-size:13px}.kUIMeq_uploadBox{min-height:128px;color:var(--dsw-alias-label-secondary);border:1.5px dashed var(--dsw-alias-border-l2);cursor:pointer;font:inherit;text-align:center;background:0 0;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:16px;font-size:12.5px;display:flex}.kUIMeq_uploadBox:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed);background:var(--dsw-alias-interactive-bg-hover)}.kUIMeq_uploadBox:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.kUIMeq_uploadIcon{color:var(--dsw-alias-label-tertiary);display:inline-flex}.kUIMeq_uploadHint{color:var(--dsw-alias-label-tertiary);font-size:11px}.kUIMeq_reference{flex-direction:column;gap:8px;display:flex}.kUIMeq_referenceImage{object-fit:contain;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;width:100%;max-height:176px}.kUIMeq_referenceActions{gap:8px;display:flex}.kUIMeq_hiddenFile{display:none}.kUIMeq_prompt{width:100%;min-height:120px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);resize:vertical;box-sizing:border-box;border-radius:10px;outline:none;padding:10px 12px;font-family:inherit;font-size:13px;line-height:1.6}.kUIMeq_prompt:focus-visible{border-color:var(--dsw-alias-brand-primary)}.kUIMeq_prompt::placeholder{color:var(--dsw-alias-label-tertiary)}.kUIMeq_promptFooter{justify-content:space-between;align-items:center;gap:8px;margin-top:-6px;display:flex}.kUIMeq_templatesButton{border:1px solid var(--dsw-alias-brand-primary);background:linear-gradient(135deg, color-mix(in srgb, var(--dsw-alias-brand-primary) 14%, transparent), color-mix(in srgb, var(--dsw-alias-brand-primary) 5%, transparent));height:26px;color:var(--dsw-alias-brand-primary);cursor:pointer;box-shadow:0 1px 0 color-mix(in srgb, var(--dsw-alias-brand-primary) 22%, transparent);border-radius:999px;align-items:center;gap:6px;padding:0 12px;font-family:inherit;font-size:12px;font-weight:600;transition:transform .12s,box-shadow .12s,background .12s;display:inline-flex}.kUIMeq_templatesButton svg{flex:none}.kUIMeq_templatesButton:hover{background:linear-gradient(135deg, color-mix(in srgb, var(--dsw-alias-brand-primary) 24%, transparent), color-mix(in srgb, var(--dsw-alias-brand-primary) 8%, transparent));color:var(--dsw-alias-brand-primary);box-shadow:0 2px 6px color-mix(in srgb, var(--dsw-alias-brand-primary) 30%, transparent);transform:translateY(-1px)}.kUIMeq_templatesButton:active{transform:translateY(0)}.kUIMeq_enhanceButton{border:1px solid var(--dsw-alias-border-l2);height:26px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);font:inherit;cursor:pointer;border-radius:999px;margin-left:auto;padding:0 11px;font-size:12px}.kUIMeq_enhanceButton:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.kUIMeq_enhanceButton:disabled{opacity:.5;cursor:default}.kUIMeq_promptCount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:11px}.kUIMeq_paramGroup{flex-direction:column;gap:8px;display:flex}.kUIMeq_paramLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}.kUIMeq_optionRow{flex-wrap:wrap;gap:6px;display:flex}.kUIMeq_optionGrid{grid-template-columns:repeat(3,1fr);gap:6px;display:grid}.kUIMeq_optionPill{justify-content:center}.kUIMeq_paramHint{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.45}.kUIMeq_footer{border-top:1px solid var(--dsw-alias-border-l1);flex-direction:column;flex:none;align-items:stretch;gap:8px;padding:10px 2px 0 0;display:flex}.kUIMeq_modelWrap{flex-direction:column;gap:5px;min-width:0;display:flex}.kUIMeq_modelLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}.kUIMeq_modelSelect{width:100%;height:36px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;text-align:left;border-radius:18px;outline:none;justify-content:space-between;align-items:center;gap:8px;padding:0 12px;font-family:inherit;font-size:13px;display:flex}.kUIMeq_modelSelect:focus-visible{border-color:var(--dsw-alias-brand-primary)}.kUIMeq_modelSelect:disabled{opacity:.55;cursor:default}.kUIMeq_modelMenu{min-width:0;display:block;position:relative}.kUIMeq_modelMenuList{z-index:40;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:12px;flex-direction:column;padding:4px;display:flex;position:absolute;bottom:calc(100% + 6px);left:0;right:0;overflow:hidden;box-shadow:0 -8px 24px #0000002e}.kUIMeq_modelMenuItem{width:100%;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;text-align:left;white-space:nowrap;text-overflow:ellipsis;background:0 0;border:none;border-radius:8px;padding:7px 10px;font-size:13px;display:block;overflow:hidden}.kUIMeq_modelMenuItem:hover{background:var(--dsw-alias-bg-hover)}.kUIMeq_modelMenuItem[data-selected]{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1);font-weight:600}.kUIMeq_generateButton{width:100%}.kUIMeq_generateInner{align-items:center;gap:7px;display:inline-flex}.kUIMeq_canvasState{text-align:center;color:var(--dsw-alias-label-tertiary);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:8px;padding:24px;display:flex}.kUIMeq_canvasStateTitle{color:var(--dsw-alias-label-secondary);font-size:14px;font-weight:600}.kUIMeq_canvasStateHint{max-width:380px;font-size:12px;line-height:1.6}.kUIMeq_canvasEmptyIcon{color:var(--dsw-alias-label-tertiary);margin-bottom:4px;display:inline-flex}.kUIMeq_canvasError{color:var(--dsw-alias-label-error);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-label-error);overflow-wrap:anywhere;border-radius:10px;flex:none;margin:14px;padding:10px 14px;font-size:12.5px;line-height:1.6}.kUIMeq_canvasBody{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:10px;min-height:0;padding:14px;display:flex;overflow-y:auto}.kUIMeq_canvasBody::-webkit-scrollbar{width:8px}.kUIMeq_canvasBody::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.kUIMeq_canvasMeta{color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:8px;font-size:12px;display:flex}.kUIMeq_canvasHistoryTag{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);white-space:nowrap;border-radius:999px;padding:1px 8px;font-size:11px}.kUIMeq_grid{flex:1;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;min-height:0;display:grid}.kUIMeq_grid[data-count=\"1\"] .kUIMeq_imageCard{grid-area:1/1/3/3}.kUIMeq_imageCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);cursor:zoom-in;border-radius:12px;flex-direction:column;min-height:0;margin:0;display:flex;position:relative;overflow:hidden}.kUIMeq_imageCard:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.kUIMeq_image{object-fit:cover;background:var(--dsw-alias-bg-base);flex:1;width:100%;min-height:0;display:block}.kUIMeq_imageCaption{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;border-top:1px solid var(--dsw-alias-border-l1);padding:7px 10px;font-size:11px;line-height:1.5;overflow:hidden}.kUIMeq_download{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);opacity:0;backdrop-filter:blur(4px);border-radius:999px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;text-decoration:none;transition:opacity .12s;position:absolute;top:8px;right:8px}.kUIMeq_imageCard:hover .kUIMeq_download{opacity:1}.kUIMeq_download:hover{background:var(--dsw-alias-bg-base)}.kUIMeq_galleryAdd{font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;opacity:0;backdrop-filter:blur(4px);border-radius:999px;align-items:center;gap:5px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;transition:opacity .12s;display:inline-flex;position:absolute;top:8px;left:8px}.kUIMeq_imageCard:hover .kUIMeq_galleryAdd{opacity:1}.kUIMeq_galleryAdd:hover{background:var(--dsw-alias-bg-base)}.kUIMeq_galleryAdd:disabled{opacity:.4;cursor:default}.kUIMeq_conversationAdd{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);cursor:pointer;font:inherit;opacity:0;backdrop-filter:blur(4px);border-radius:999px;align-items:center;gap:5px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;transition:opacity .12s;display:inline-flex;position:absolute;top:38px;left:8px}.kUIMeq_imageCard:hover .kUIMeq_conversationAdd,.kUIMeq_conversationAdd:focus-visible{opacity:1}.kUIMeq_conversationAdd:hover{background:var(--dsw-alias-bg-base)}.kUIMeq_conversationAdd:disabled{opacity:.4;cursor:default}.kUIMeq_zoomHint{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);opacity:0;backdrop-filter:blur(4px);pointer-events:none;border-radius:999px;align-items:center;gap:5px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;transition:opacity .12s;display:inline-flex;position:absolute;bottom:8px;left:8px}.kUIMeq_imageCard:hover .kUIMeq_zoomHint{opacity:1}.kUIMeq_spinner,.kUIMeq_bigSpinner{border:2px solid;border-top-color:#0000;border-radius:50%;flex:none;animation:.8s linear infinite kUIMeq_dshImageGenSpin;display:inline-block}.kUIMeq_spinner{width:11px;height:11px}.kUIMeq_bigSpinner{width:30px;height:30px;color:var(--dsw-alias-state-business-primary);border-width:3px;margin-bottom:6px}.kUIMeq_lightbox{z-index:1000;backdrop-filter:blur(6px);background:#000000b8;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;inset:0}.kUIMeq_lightboxClose{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:50%;justify-content:center;align-items:center;width:38px;height:38px;display:inline-flex;position:absolute;top:16px;right:16px}.kUIMeq_lightboxClose:hover{background:#ffffff42}.kUIMeq_lightboxNav{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:50%;justify-content:center;align-items:center;width:42px;height:42px;display:inline-flex;position:absolute;top:50%;transform:translateY(-50%)}.kUIMeq_lightboxNav:hover{background:#ffffff42}.kUIMeq_lightboxNav[data-dir=prev]{left:max(20px,50% - 640px)}.kUIMeq_lightboxNav[data-dir=next]{right:max(20px,50% - 640px)}.kUIMeq_lightboxFigure{flex-direction:column;gap:10px;width:min(1100px,100vw - 160px);max-width:min(1100px,100vw - 160px);height:min(820px,100vh - 48px);min-height:0;margin:0;display:flex}.kUIMeq_lightboxStage{background:#ffffff0a;border-radius:10px;flex:1;min-height:0;position:relative;overflow:auto}.kUIMeq_lightboxScaleFrame{justify-content:center;align-items:center;min-width:100%;min-height:100%;display:flex}.kUIMeq_lightboxImage{object-fit:contain;border-radius:10px;max-width:100%;max-height:100%;display:block;box-shadow:0 24px 80px #00000080}.kUIMeq_lightboxTools{justify-content:center;align-items:center;gap:6px;display:flex}.kUIMeq_lightboxTool,.kUIMeq_lightboxZoomLevel,.kUIMeq_lightboxCopy{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;justify-content:center;align-items:center;display:inline-flex}.kUIMeq_lightboxTool,.kUIMeq_lightboxZoomLevel{height:32px}.kUIMeq_lightboxTool{border-radius:50%;width:32px}.kUIMeq_lightboxZoomLevel{min-width:58px;font:inherit;font-variant-numeric:tabular-nums;border-radius:999px;padding:0 9px;font-size:12px}.kUIMeq_lightboxTool:hover,.kUIMeq_lightboxZoomLevel:hover,.kUIMeq_lightboxCopy:hover{background:#ffffff42}.kUIMeq_lightboxCaptionRow{align-items:flex-start;gap:8px;min-width:0;display:flex}.kUIMeq_lightboxCaption{color:#ffffffe6;-webkit-line-clamp:3;-webkit-box-orient:vertical;flex:1;min-width:0;font-size:12px;line-height:1.6;display:-webkit-box;overflow:hidden}.kUIMeq_lightboxCopy{min-height:28px;font:inherit;white-space:nowrap;border-radius:999px;flex:none;gap:5px;padding:4px 9px;font-size:12px}.kUIMeq_lightboxMeta{justify-content:space-between;align-items:center;gap:12px;display:flex}.kUIMeq_lightboxIndex{color:#fffc;font-variant-numeric:tabular-nums;font-size:12px}.kUIMeq_lightboxActions{align-items:center;gap:8px;display:inline-flex}.kUIMeq_lightboxDownload,.kUIMeq_lightboxEdit{font:inherit;color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:999px;padding:4px 14px;font-size:12.5px;font-weight:500;text-decoration:none}.kUIMeq_lightboxDownload:hover,.kUIMeq_lightboxEdit:hover{background:#ffffff42}.kUIMeq_lightboxEdit{color:#fff;background:#ffffff24;border:1px solid #ffffff47;border-radius:999px}@media (width<=720px){.kUIMeq_lightbox{padding:16px}.kUIMeq_lightboxFigure{width:calc(100vw - 32px);max-width:none}.kUIMeq_lightboxNav[data-dir=prev]{left:20px}.kUIMeq_lightboxNav[data-dir=next]{right:20px}.kUIMeq_lightboxCaptionRow,.kUIMeq_lightboxMeta{flex-direction:column;align-items:stretch}.kUIMeq_lightboxCopy,.kUIMeq_lightboxActions{align-self:flex-end}}@keyframes kUIMeq_dshImageGenSpin{to{transform:rotate(360deg)}}.kUIMeq_galleryToast{z-index:30;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);backdrop-filter:blur(6px);pointer-events:none;border-radius:999px;align-items:center;gap:7px;padding:6px 16px;font-size:13px;font-weight:500;animation:.16s ease-out kUIMeq_dshImageGenToastIn;display:inline-flex;position:absolute;bottom:24px;left:50%;transform:translate(-50%);box-shadow:0 8px 24px #00000038}@keyframes kUIMeq_dshImageGenToastIn{0%{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%)}}.kUIMeq_conversationToast{z-index:30;border:1px solid var(--dsw-alias-border-l2);max-width:calc(100% - 32px);color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);pointer-events:none;backdrop-filter:blur(6px);border-radius:999px;align-items:center;gap:7px;padding:6px 16px;font-size:13px;font-weight:500;animation:.16s ease-out kUIMeq_dshImageGenToastIn;display:inline-flex;position:absolute;bottom:24px;left:50%;transform:translate(-50%);box-shadow:0 8px 24px #00000038}@media (prefers-reduced-motion:reduce){.kUIMeq_download,.kUIMeq_spinner,.kUIMeq_bigSpinner{transition:none;animation-duration:1.5s}}.kUIMeq_config[data-gallery=true] .kUIMeq_configScroll>:not(:first-child),.kUIMeq_config[data-gallery=true] .kUIMeq_footer,.kUIMeq_canvas[data-gallery=true]>.kUIMeq_canvasState,.kUIMeq_canvas[data-gallery=true]>.kUIMeq_canvasError,.kUIMeq_canvas[data-gallery=true]>.kUIMeq_canvasBody,.kUIMeq_studio:has(.kUIMeq_config[data-gallery=true])>.kUIMeq_history{display:none}.kUIMeq_config[data-gallery=true] .kUIMeq_configScroll{flex:none;order:1;display:flex;overflow:visible}.kUIMeq_config[data-gallery=true] .kUIMeq_galleryFilters{flex:1;order:2;min-height:0}.kUIMeq_galleryFilters{padding:18px 14px;overflow:hidden auto}.kUIMeq_galleryFilterHeading{color:var(--dsw-alias-label-tertiary);margin:0 4px 10px;font-size:12px;font-weight:600}.kUIMeq_galleryFilter{width:100%;min-height:34px;color:var(--dsw-alias-label-secondary);cursor:pointer;text-align:left;background:0 0;border:0;border-radius:9px;justify-content:space-between;align-items:center;padding:0 10px;display:flex}.kUIMeq_galleryFilter:hover,.kUIMeq_galleryFilter[data-active]{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 10%, transparent)}.kUIMeq_galleryFilterCount{min-width:20px;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-2);text-align:center;border-radius:999px;padding:1px 6px;font-size:11px}.kUIMeq_galleryFilterDivider{background:var(--dsw-alias-border-l1);height:1px;margin:18px 4px}.kUIMeq_galleryRatioList{flex-wrap:wrap;gap:6px;display:flex}.kUIMeq_galleryRatio{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);cursor:pointer;border:0;border-radius:999px;padding:6px 10px;font-size:12px}.kUIMeq_galleryRatio[data-active]{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 13%, transparent)}.kUIMeq_galleryTagFilterList{flex-wrap:wrap;gap:6px;display:flex}.kUIMeq_galleryTagFilter{border:1px solid var(--dsw-alias-border-l1);min-width:0;max-width:100%;min-height:27px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);cursor:pointer;font:inherit;border-radius:6px;align-items:center;gap:5px;padding:0 8px;font-size:11px;display:inline-flex}.kUIMeq_galleryTagFilter span:first-child{text-overflow:ellipsis;white-space:nowrap;max-width:112px;overflow:hidden}.kUIMeq_galleryTagFilter span:last-child{color:var(--dsw-alias-label-tertiary);font-size:10px}.kUIMeq_galleryTagFilter:hover,.kUIMeq_galleryTagFilter[data-active]{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 10%, transparent)}.kUIMeq_galleryFilterNote{color:var(--dsw-alias-label-quaternary);margin:20px 4px 0;font-size:11px;line-height:1.5}.kUIMeq_galleryWorkspace{box-sizing:border-box;flex-direction:column;width:100%;min-width:0;height:100%;min-height:0;padding:22px 24px 26px;display:flex;position:absolute;inset:0;overflow:hidden}.kUIMeq_galleryToolbar{flex:none;justify-content:space-between;align-items:center;gap:16px;min-width:0;margin-bottom:18px;display:flex}.kUIMeq_galleryHeading{color:var(--dsw-alias-label-primary);margin:0;font-size:20px;font-weight:700;display:inline}.kUIMeq_galleryCount{color:var(--dsw-alias-label-tertiary);margin-left:8px;font-size:13px}.kUIMeq_galleryToolbarActions{flex-wrap:wrap;align-items:center;gap:10px;min-width:0;display:flex}.kUIMeq_gallerySelectMode,.kUIMeq_galleryBulkButton,.kUIMeq_gallerySelectionClear{border:1px solid var(--dsw-alias-border-l1);min-height:30px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);cursor:pointer;font:inherit;border-radius:7px;padding:0 10px;font-size:12px}.kUIMeq_gallerySelectMode:hover,.kUIMeq_gallerySelectMode[data-active],.kUIMeq_galleryBulkButton:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:color-mix(in srgb, var(--dsw-alias-brand-primary) 38%, var(--dsw-alias-border-l1));background:color-mix(in srgb, var(--dsw-alias-brand-primary) 11%, transparent)}.kUIMeq_galleryBulkButton:disabled{cursor:not-allowed;opacity:.45}.kUIMeq_gallerySelectionBar{border:1px solid color-mix(in srgb, var(--dsw-alias-brand-primary) 35%, var(--dsw-alias-border-l1));background:color-mix(in srgb, var(--dsw-alias-brand-primary) 7%, var(--dsw-alias-bg-layer-1));border-radius:9px;flex:none;align-items:center;gap:10px;min-width:0;margin:-4px 0 16px;padding:10px 12px;display:flex}.kUIMeq_gallerySelectionBar strong{color:var(--dsw-alias-brand-primary);flex:none;font-size:12px}.kUIMeq_gallerySelectionClear{margin-left:auto}.kUIMeq_gallerySelectionClear:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.kUIMeq_galleryTagInput,.kUIMeq_gallerySearch{border:1px solid var(--dsw-alias-border-l1);min-width:0;height:30px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);font:inherit;border-radius:7px;outline:none;padding:0 10px;font-size:12px}.kUIMeq_galleryTagInput{flex:190px}.kUIMeq_galleryTagInput:focus,.kUIMeq_gallerySearch:focus{border-color:var(--dsw-alias-brand-primary)}.kUIMeq_galleryViewToggle{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:9px;padding:3px;display:flex}.kUIMeq_galleryViewToggle button,.kUIMeq_gallerySort,.kUIMeq_galleryClear{min-height:30px;color:var(--dsw-alias-label-secondary);cursor:pointer;font:inherit;background:0 0;border:0;border-radius:7px;padding:0 10px;font-size:12px}.kUIMeq_galleryViewToggle button[data-active],.kUIMeq_galleryViewToggle button:hover,.kUIMeq_gallerySort:hover,.kUIMeq_galleryClear:hover{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 11%, transparent)}.kUIMeq_gallerySort{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1)}.kUIMeq_galleryClear{border:1px solid var(--dsw-alias-border-l1)}.kUIMeq_compareControl{flex-direction:column;gap:6px;margin:0 0 10px;display:flex}.kUIMeq_compareToggle,.kUIMeq_compareModelChoices label{color:var(--dsw-alias-label-secondary);cursor:pointer;align-items:center;gap:6px;font-size:12px;display:flex}.kUIMeq_compareToggle input,.kUIMeq_compareModelChoices input{accent-color:var(--dsw-alias-brand-primary)}.kUIMeq_compareModelChoices{flex-wrap:wrap;gap:6px;display:flex}.kUIMeq_compareModelChoices label{border:1px solid var(--dsw-alias-border-l1);border-radius:5px;padding:4px 6px;font-size:10px}.kUIMeq_comparisonBoard{z-index:4;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);border-radius:8px;flex-direction:column;display:flex;position:absolute;inset:14px;overflow:hidden;box-shadow:0 8px 24px #0000001f}.kUIMeq_comparisonBoard>header{border-bottom:1px solid var(--dsw-alias-border-l1);justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.kUIMeq_comparisonBoard>header div{align-items:baseline;gap:7px;display:flex}.kUIMeq_comparisonBoard>header strong{color:var(--dsw-alias-label-primary);font-size:13px}.kUIMeq_comparisonBoard>header span{color:var(--dsw-alias-label-tertiary);font-size:11px}.kUIMeq_comparisonBoard>header button{border:1px solid var(--dsw-alias-border-l1);min-height:28px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);cursor:pointer;font:inherit;border-radius:5px;padding:0 9px;font-size:11px}.kUIMeq_comparisonGrid{flex:1;grid-template-rows:minmax(0,1fr);grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;min-height:0;padding:12px;display:grid;overflow:auto}.kUIMeq_comparisonGrid article{flex-direction:column;gap:7px;min-width:0;height:100%;min-height:0;display:flex}.kUIMeq_comparisonGrid article>strong{color:var(--dsw-alias-label-primary);font-size:12px}.kUIMeq_comparisonImageButton{cursor:zoom-in;background:var(--dsw-alias-bg-base);border:0;flex:1;width:100%;min-height:0;padding:0;display:flex;overflow:hidden}.kUIMeq_comparisonImageButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.kUIMeq_comparisonGrid article>span{min-height:0;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-2);flex:1;place-items:center;font-size:12px;display:grid}.kUIMeq_comparisonGrid img{object-fit:contain;background:var(--dsw-alias-bg-base);flex:1;width:100%;height:100%;min-height:0;max-height:none;display:block}.kUIMeq_comparisonFullscreen{z-index:1200;background:#000000eb;padding:54px 24px 24px;position:fixed;inset:0;overflow:auto}.kUIMeq_comparisonFullscreenGrid{grid-template-columns:repeat(auto-fit,minmax(300px,1fr));align-items:start;gap:18px;min-height:100%;display:grid}.kUIMeq_comparisonFullscreen figure{min-width:0;margin:0}.kUIMeq_comparisonFullscreen figcaption{color:#fff;margin-bottom:8px;font-size:13px;font-weight:600}.kUIMeq_comparisonFullscreen img{background:#111;width:100%;margin-bottom:10px;display:block}.kUIMeq_historyItem[data-comparison]{border-color:color-mix(in srgb, var(--dsw-alias-brand-primary) 55%, var(--dsw-alias-border-l1))}.kUIMeq_galleryMasonry{box-sizing:border-box;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex:auto;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:max-content;align-content:start;gap:16px;width:100%;min-width:0;max-width:100%;height:0;min-height:0;padding:2px 8px 16px 2px;display:grid;overflow:hidden scroll}.kUIMeq_galleryMasonry::-webkit-scrollbar{width:8px}.kUIMeq_galleryMasonry::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.kUIMeq_galleryCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:14px;width:100%;margin:0;display:block;position:relative;overflow:hidden;box-shadow:0 5px 18px #18203612}.kUIMeq_galleryCard[data-selected]{border-color:var(--dsw-alias-brand-primary);box-shadow:0 0 0 2px color-mix(in srgb, var(--dsw-alias-brand-primary) 26%, transparent), 0 5px 18px #18203612}.kUIMeq_gallerySelect{z-index:2;cursor:pointer;background:#00000094;border:1px solid #ffffffbf;border-radius:7px;place-items:center;width:26px;height:26px;display:grid;position:absolute;top:9px;right:9px}.kUIMeq_gallerySelect input{width:16px;height:16px;accent-color:var(--dsw-alias-brand-primary);cursor:pointer;margin:0}.kUIMeq_galleryImageButton{background:var(--dsw-alias-bg-base);cursor:zoom-in;border:0;width:100%;padding:0;display:block;position:relative}.kUIMeq_galleryImageButton[data-selecting]{cursor:pointer}.kUIMeq_galleryImage{aspect-ratio:4/3;object-fit:cover;width:100%;display:block}.kUIMeq_galleryMasonry[data-view=masonry] .kUIMeq_galleryCard:nth-child(3n+1) .kUIMeq_galleryImage{aspect-ratio:4/5}.kUIMeq_galleryMasonry[data-view=masonry] .kUIMeq_galleryCard:nth-child(3n+2) .kUIMeq_galleryImage{aspect-ratio:4/3}.kUIMeq_galleryMasonry[data-view=masonry] .kUIMeq_galleryCard:nth-child(3n) .kUIMeq_galleryImage{aspect-ratio:3/4}.kUIMeq_galleryBadge{color:#fff;backdrop-filter:blur(4px);background:#121724c2;border-radius:999px;padding:4px 9px;font-size:11px;position:absolute;top:10px;left:10px}.kUIMeq_galleryCardFooter{align-items:center;gap:9px;min-width:0;padding:10px 12px;display:flex}.kUIMeq_galleryAvatar{color:#fff;background:var(--dsw-alias-brand-primary);border-radius:50%;flex:none;place-items:center;width:27px;height:27px;font-size:12px;font-weight:700;display:grid}.kUIMeq_galleryCardInfo{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.kUIMeq_galleryCardInfo strong,.kUIMeq_galleryCardInfo small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.kUIMeq_galleryCardInfo strong{color:var(--dsw-alias-label-primary);font-size:12px}.kUIMeq_galleryCardInfo small{color:var(--dsw-alias-label-tertiary);font-size:10px}.kUIMeq_galleryTags{flex-wrap:wrap;gap:4px;margin-top:4px;display:flex}.kUIMeq_galleryTags button{max-width:96px;min-height:19px;color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 10%, transparent);cursor:pointer;font:inherit;text-overflow:ellipsis;white-space:nowrap;border:0;border-radius:4px;padding:1px 6px;font-size:10px;line-height:1.35;overflow:hidden}.kUIMeq_galleryTags button:hover{background:color-mix(in srgb, var(--dsw-alias-brand-primary) 17%, transparent)}.kUIMeq_galleryTags .kUIMeq_galleryTagEdit{color:var(--dsw-alias-label-tertiary);background:0 0;flex:none}.kUIMeq_galleryTagEditor{align-items:center;gap:6px;padding:0 12px 10px 48px;display:flex}.kUIMeq_galleryTagEditor input{border:1px solid var(--dsw-alias-border-l2);min-width:0;height:27px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);font:inherit;border-radius:6px;outline:none;flex:1;padding:0 8px;font-size:11px}.kUIMeq_galleryTagEditor input:focus{border-color:var(--dsw-alias-brand-primary)}.kUIMeq_galleryTagEditor button{border:1px solid var(--dsw-alias-border-l2);height:27px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);cursor:pointer;font:inherit;border-radius:6px;padding:0 8px;font-size:11px}.kUIMeq_galleryTagEditor button[type=submit]{color:var(--dsw-alias-brand-primary)}.kUIMeq_galleryRemove{width:24px;height:24px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:50%;flex:none;padding:0;font-size:18px}.kUIMeq_galleryRemove:hover{color:var(--dsw-alias-state-error);background:var(--dsw-alias-bg-layer-2)}@media (width<=1100px){.kUIMeq_galleryMasonry{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width<=760px){.kUIMeq_studio{grid-template-rows:minmax(220px,36%) minmax(0,1fr);grid-template-columns:minmax(0,1fr);overflow-y:auto}.kUIMeq_history{grid-area:1/1;min-height:220px}.kUIMeq_generation{flex-direction:column;grid-area:2/1;min-height:0}.kUIMeq_config{width:auto;max-width:none;height:auto;min-height:0}.kUIMeq_config[data-gallery=true]{flex:none}.kUIMeq_canvas{min-height:560px}.kUIMeq_galleryToolbar{flex-direction:column;align-items:flex-start}.kUIMeq_galleryToolbarActions{flex-wrap:wrap;width:100%}.kUIMeq_galleryMasonry{grid-template-columns:1fr}}";
|
|
1675
1802
|
const tagId$2 = "@dickpy/dsh-imagegen/panel.module.css";
|
|
1676
1803
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
1677
1804
|
const tag = document.createElement("style");
|
|
@@ -1681,166 +1808,176 @@ window.__ModuleLoader__.load({
|
|
|
1681
1808
|
document.head.appendChild(tag);
|
|
1682
1809
|
}
|
|
1683
1810
|
var panel_module_css_default = {
|
|
1684
|
-
"image": "
|
|
1685
|
-
"
|
|
1686
|
-
"
|
|
1687
|
-
"
|
|
1688
|
-
"
|
|
1689
|
-
"
|
|
1690
|
-
"
|
|
1691
|
-
"
|
|
1692
|
-
"
|
|
1693
|
-
"
|
|
1694
|
-
"
|
|
1695
|
-
"
|
|
1696
|
-
"
|
|
1697
|
-
"
|
|
1698
|
-
"
|
|
1699
|
-
"
|
|
1700
|
-
"
|
|
1701
|
-
"
|
|
1702
|
-
"
|
|
1703
|
-
"
|
|
1704
|
-
"
|
|
1705
|
-
"
|
|
1706
|
-
"
|
|
1707
|
-
"
|
|
1708
|
-
"
|
|
1709
|
-
"
|
|
1710
|
-
"
|
|
1711
|
-
"
|
|
1712
|
-
"
|
|
1713
|
-
"
|
|
1714
|
-
"
|
|
1715
|
-
"
|
|
1716
|
-
"
|
|
1717
|
-
"
|
|
1718
|
-
"
|
|
1719
|
-
"
|
|
1720
|
-
"
|
|
1721
|
-
"
|
|
1722
|
-
"
|
|
1723
|
-
"
|
|
1724
|
-
"
|
|
1725
|
-
"
|
|
1726
|
-
"
|
|
1727
|
-
"
|
|
1728
|
-
"
|
|
1729
|
-
"
|
|
1730
|
-
"
|
|
1731
|
-
"
|
|
1732
|
-
"
|
|
1733
|
-
"
|
|
1734
|
-
"
|
|
1735
|
-
"
|
|
1736
|
-
"
|
|
1737
|
-
"
|
|
1738
|
-
"
|
|
1739
|
-
"
|
|
1740
|
-
"
|
|
1741
|
-
"
|
|
1742
|
-
"
|
|
1743
|
-
"
|
|
1744
|
-
"
|
|
1745
|
-
"
|
|
1746
|
-
"
|
|
1747
|
-
"
|
|
1748
|
-
"
|
|
1749
|
-
"
|
|
1750
|
-
"comparisonFullscreen": "
|
|
1751
|
-
"
|
|
1752
|
-
"
|
|
1753
|
-
"
|
|
1754
|
-
"
|
|
1755
|
-
"
|
|
1756
|
-
"
|
|
1757
|
-
"
|
|
1758
|
-
"
|
|
1759
|
-
"
|
|
1760
|
-
"
|
|
1761
|
-
"
|
|
1762
|
-
"
|
|
1763
|
-
"
|
|
1764
|
-
"
|
|
1765
|
-
"
|
|
1766
|
-
"
|
|
1767
|
-
"
|
|
1768
|
-
"
|
|
1769
|
-
"
|
|
1770
|
-
"
|
|
1771
|
-
"
|
|
1772
|
-
"
|
|
1773
|
-
"
|
|
1774
|
-
"
|
|
1775
|
-
"
|
|
1776
|
-
"
|
|
1777
|
-
"
|
|
1778
|
-
"
|
|
1779
|
-
"
|
|
1780
|
-
"
|
|
1781
|
-
"
|
|
1782
|
-
"
|
|
1783
|
-
"
|
|
1784
|
-
"
|
|
1785
|
-
"
|
|
1786
|
-
"
|
|
1787
|
-
"
|
|
1788
|
-
"
|
|
1789
|
-
"
|
|
1790
|
-
"
|
|
1791
|
-
"
|
|
1792
|
-
"
|
|
1793
|
-
"
|
|
1794
|
-
"
|
|
1795
|
-
"
|
|
1796
|
-
"
|
|
1797
|
-
"
|
|
1798
|
-
"
|
|
1799
|
-
"
|
|
1800
|
-
"
|
|
1801
|
-
"
|
|
1802
|
-
"
|
|
1803
|
-
"
|
|
1804
|
-
"
|
|
1805
|
-
"
|
|
1806
|
-
"
|
|
1807
|
-
"
|
|
1808
|
-
"
|
|
1809
|
-
"
|
|
1810
|
-
"
|
|
1811
|
-
"
|
|
1812
|
-
"
|
|
1813
|
-
"
|
|
1814
|
-
"
|
|
1815
|
-
"
|
|
1816
|
-
"
|
|
1817
|
-
"
|
|
1818
|
-
"
|
|
1819
|
-
"
|
|
1820
|
-
"
|
|
1821
|
-
"
|
|
1822
|
-
"
|
|
1823
|
-
"
|
|
1824
|
-
"
|
|
1825
|
-
"
|
|
1826
|
-
"
|
|
1827
|
-
"
|
|
1828
|
-
"
|
|
1829
|
-
"
|
|
1830
|
-
"
|
|
1831
|
-
"
|
|
1832
|
-
"
|
|
1833
|
-
"
|
|
1834
|
-
"
|
|
1835
|
-
"
|
|
1836
|
-
"
|
|
1837
|
-
"
|
|
1838
|
-
"
|
|
1839
|
-
"
|
|
1840
|
-
"
|
|
1841
|
-
"
|
|
1842
|
-
"
|
|
1843
|
-
"
|
|
1811
|
+
"image": "kUIMeq_image",
|
|
1812
|
+
"historyMeta": "kUIMeq_historyMeta",
|
|
1813
|
+
"connectionStatus": "kUIMeq_connectionStatus",
|
|
1814
|
+
"historyActions": "kUIMeq_historyActions",
|
|
1815
|
+
"uploadBox": "kUIMeq_uploadBox",
|
|
1816
|
+
"lightboxTool": "kUIMeq_lightboxTool",
|
|
1817
|
+
"galleryFilterNote": "kUIMeq_galleryFilterNote",
|
|
1818
|
+
"lightboxTools": "kUIMeq_lightboxTools",
|
|
1819
|
+
"canvasError": "kUIMeq_canvasError",
|
|
1820
|
+
"galleryFilter": "kUIMeq_galleryFilter",
|
|
1821
|
+
"galleryRatioList": "kUIMeq_galleryRatioList",
|
|
1822
|
+
"card": "kUIMeq_card",
|
|
1823
|
+
"historyPrompt": "kUIMeq_historyPrompt",
|
|
1824
|
+
"galleryRatio": "kUIMeq_galleryRatio",
|
|
1825
|
+
"comparisonBoard": "kUIMeq_comparisonBoard",
|
|
1826
|
+
"paramHint": "kUIMeq_paramHint",
|
|
1827
|
+
"entryIcon": "kUIMeq_entryIcon",
|
|
1828
|
+
"panelTitle": "kUIMeq_panelTitle",
|
|
1829
|
+
"referenceImage": "kUIMeq_referenceImage",
|
|
1830
|
+
"canvasStateTitle": "kUIMeq_canvasStateTitle",
|
|
1831
|
+
"historyFilters": "kUIMeq_historyFilters",
|
|
1832
|
+
"canvas": "kUIMeq_canvas",
|
|
1833
|
+
"uploadIcon": "kUIMeq_uploadIcon",
|
|
1834
|
+
"grid": "kUIMeq_grid",
|
|
1835
|
+
"lightboxScaleFrame": "kUIMeq_lightboxScaleFrame",
|
|
1836
|
+
"panel": "kUIMeq_panel",
|
|
1837
|
+
"sessionTabLabel": "kUIMeq_sessionTabLabel",
|
|
1838
|
+
"entry": "kUIMeq_entry",
|
|
1839
|
+
"dshImageGenToastIn": "kUIMeq_dshImageGenToastIn",
|
|
1840
|
+
"galleryFilterCount": "kUIMeq_galleryFilterCount",
|
|
1841
|
+
"taskTrayCount": "kUIMeq_taskTrayCount",
|
|
1842
|
+
"comparisonImageButton": "kUIMeq_comparisonImageButton",
|
|
1843
|
+
"configGuideBody": "kUIMeq_configGuideBody",
|
|
1844
|
+
"optionPill": "kUIMeq_optionPill",
|
|
1845
|
+
"conversationAdd": "kUIMeq_conversationAdd",
|
|
1846
|
+
"galleryFilters": "kUIMeq_galleryFilters",
|
|
1847
|
+
"galleryTagFilter": "kUIMeq_galleryTagFilter",
|
|
1848
|
+
"footer": "kUIMeq_footer",
|
|
1849
|
+
"gallerySelectionBar": "kUIMeq_gallerySelectionBar",
|
|
1850
|
+
"gallerySelect": "kUIMeq_gallerySelect",
|
|
1851
|
+
"galleryTags": "kUIMeq_galleryTags",
|
|
1852
|
+
"lightboxClose": "kUIMeq_lightboxClose",
|
|
1853
|
+
"canvasEmptyIcon": "kUIMeq_canvasEmptyIcon",
|
|
1854
|
+
"githubLink": "kUIMeq_githubLink",
|
|
1855
|
+
"historyClear": "kUIMeq_historyClear",
|
|
1856
|
+
"optionGrid": "kUIMeq_optionGrid",
|
|
1857
|
+
"lightboxActions": "kUIMeq_lightboxActions",
|
|
1858
|
+
"sessionTabs": "kUIMeq_sessionTabs",
|
|
1859
|
+
"lightboxCopy": "kUIMeq_lightboxCopy",
|
|
1860
|
+
"referenceActions": "kUIMeq_referenceActions",
|
|
1861
|
+
"compareModelChoices": "kUIMeq_compareModelChoices",
|
|
1862
|
+
"reference": "kUIMeq_reference",
|
|
1863
|
+
"promptCount": "kUIMeq_promptCount",
|
|
1864
|
+
"imageCard": "kUIMeq_imageCard",
|
|
1865
|
+
"taskTrayClose": "kUIMeq_taskTrayClose",
|
|
1866
|
+
"canvasState": "kUIMeq_canvasState",
|
|
1867
|
+
"historyAction": "kUIMeq_historyAction",
|
|
1868
|
+
"modelMenu": "kUIMeq_modelMenu",
|
|
1869
|
+
"lightboxFigure": "kUIMeq_lightboxFigure",
|
|
1870
|
+
"lightboxEdit": "kUIMeq_lightboxEdit",
|
|
1871
|
+
"historyHeader": "kUIMeq_historyHeader",
|
|
1872
|
+
"chatResizer": "kUIMeq_chatResizer",
|
|
1873
|
+
"galleryMasonry": "kUIMeq_galleryMasonry",
|
|
1874
|
+
"modeRow": "kUIMeq_modeRow",
|
|
1875
|
+
"download": "kUIMeq_download",
|
|
1876
|
+
"generation": "kUIMeq_generation",
|
|
1877
|
+
"comparisonFullscreen": "kUIMeq_comparisonFullscreen",
|
|
1878
|
+
"galleryHeading": "kUIMeq_galleryHeading",
|
|
1879
|
+
"prompt": "kUIMeq_prompt",
|
|
1880
|
+
"spinner": "kUIMeq_spinner",
|
|
1881
|
+
"gallerySort": "kUIMeq_gallerySort",
|
|
1882
|
+
"historyThumbPlaceholder": "kUIMeq_historyThumbPlaceholder",
|
|
1883
|
+
"templatesButton": "kUIMeq_templatesButton",
|
|
1884
|
+
"optionRow": "kUIMeq_optionRow",
|
|
1885
|
+
"galleryAdd": "kUIMeq_galleryAdd",
|
|
1886
|
+
"lightboxMeta": "kUIMeq_lightboxMeta",
|
|
1887
|
+
"compareToggle": "kUIMeq_compareToggle",
|
|
1888
|
+
"taskPrompt": "kUIMeq_taskPrompt",
|
|
1889
|
+
"enhanceButton": "kUIMeq_enhanceButton",
|
|
1890
|
+
"galleryBadge": "kUIMeq_galleryBadge",
|
|
1891
|
+
"gallerySelectionClear": "kUIMeq_gallerySelectionClear",
|
|
1892
|
+
"gallerySearch": "kUIMeq_gallerySearch",
|
|
1893
|
+
"paramGroup": "kUIMeq_paramGroup",
|
|
1894
|
+
"canvasMeta": "kUIMeq_canvasMeta",
|
|
1895
|
+
"lightboxImage": "kUIMeq_lightboxImage",
|
|
1896
|
+
"generateInner": "kUIMeq_generateInner",
|
|
1897
|
+
"galleryWorkspace": "kUIMeq_galleryWorkspace",
|
|
1898
|
+
"galleryBulkButton": "kUIMeq_galleryBulkButton",
|
|
1899
|
+
"updateBanner": "kUIMeq_updateBanner",
|
|
1900
|
+
"updateText": "kUIMeq_updateText",
|
|
1901
|
+
"taskTrayToggle": "kUIMeq_taskTrayToggle",
|
|
1902
|
+
"galleryCard": "kUIMeq_galleryCard",
|
|
1903
|
+
"taskRows": "kUIMeq_taskRows",
|
|
1904
|
+
"bigSpinner": "kUIMeq_bigSpinner",
|
|
1905
|
+
"view": "kUIMeq_view",
|
|
1906
|
+
"zoomHint": "kUIMeq_zoomHint",
|
|
1907
|
+
"sidebarHistoryHost": "kUIMeq_sidebarHistoryHost",
|
|
1908
|
+
"panelHeader": "kUIMeq_panelHeader",
|
|
1909
|
+
"studio": "kUIMeq_studio",
|
|
1910
|
+
"historyEmpty": "kUIMeq_historyEmpty",
|
|
1911
|
+
"historyItem": "kUIMeq_historyItem",
|
|
1912
|
+
"history": "kUIMeq_history",
|
|
1913
|
+
"dshImageGenSpin": "kUIMeq_dshImageGenSpin",
|
|
1914
|
+
"galleryCount": "kUIMeq_galleryCount",
|
|
1915
|
+
"taskTrayHeader": "kUIMeq_taskTrayHeader",
|
|
1916
|
+
"galleryRemove": "kUIMeq_galleryRemove",
|
|
1917
|
+
"sessionTabIcon": "kUIMeq_sessionTabIcon",
|
|
1918
|
+
"galleryToolbarActions": "kUIMeq_galleryToolbarActions",
|
|
1919
|
+
"canvasHistoryTag": "kUIMeq_canvasHistoryTag",
|
|
1920
|
+
"galleryImageButton": "kUIMeq_galleryImageButton",
|
|
1921
|
+
"lightboxDownload": "kUIMeq_lightboxDownload",
|
|
1922
|
+
"galleryClear": "kUIMeq_galleryClear",
|
|
1923
|
+
"sessionTab": "kUIMeq_sessionTab",
|
|
1924
|
+
"galleryImage": "kUIMeq_galleryImage",
|
|
1925
|
+
"config": "kUIMeq_config",
|
|
1926
|
+
"historySearch": "kUIMeq_historySearch",
|
|
1927
|
+
"historyMain": "kUIMeq_historyMain",
|
|
1928
|
+
"updateActions": "kUIMeq_updateActions",
|
|
1929
|
+
"galleryTagInput": "kUIMeq_galleryTagInput",
|
|
1930
|
+
"galleryToast": "kUIMeq_galleryToast",
|
|
1931
|
+
"entryLabel": "kUIMeq_entryLabel",
|
|
1932
|
+
"gallerySelectMode": "kUIMeq_gallerySelectMode",
|
|
1933
|
+
"modelWrap": "kUIMeq_modelWrap",
|
|
1934
|
+
"canvasStateHint": "kUIMeq_canvasStateHint",
|
|
1935
|
+
"taskTray": "kUIMeq_taskTray",
|
|
1936
|
+
"galleryTagEdit": "kUIMeq_galleryTagEdit",
|
|
1937
|
+
"taskTrayChevron": "kUIMeq_taskTrayChevron",
|
|
1938
|
+
"galleryFilterHeading": "kUIMeq_galleryFilterHeading",
|
|
1939
|
+
"galleryFilterDivider": "kUIMeq_galleryFilterDivider",
|
|
1940
|
+
"galleryToolbar": "kUIMeq_galleryToolbar",
|
|
1941
|
+
"hiddenFile": "kUIMeq_hiddenFile",
|
|
1942
|
+
"paramLabel": "kUIMeq_paramLabel",
|
|
1943
|
+
"galleryViewToggle": "kUIMeq_galleryViewToggle",
|
|
1944
|
+
"lightboxNav": "kUIMeq_lightboxNav",
|
|
1945
|
+
"canvasBody": "kUIMeq_canvasBody",
|
|
1946
|
+
"galleryTagEditor": "kUIMeq_galleryTagEditor",
|
|
1947
|
+
"taskRow": "kUIMeq_taskRow",
|
|
1948
|
+
"lightboxStage": "kUIMeq_lightboxStage",
|
|
1949
|
+
"historyThumb": "kUIMeq_historyThumb",
|
|
1950
|
+
"modePill": "kUIMeq_modePill",
|
|
1951
|
+
"promptFooter": "kUIMeq_promptFooter",
|
|
1952
|
+
"comparisonFullscreenGrid": "kUIMeq_comparisonFullscreenGrid",
|
|
1953
|
+
"generateButton": "kUIMeq_generateButton",
|
|
1954
|
+
"imageCaption": "kUIMeq_imageCaption",
|
|
1955
|
+
"historyList": "kUIMeq_historyList",
|
|
1956
|
+
"modelSelect": "kUIMeq_modelSelect",
|
|
1957
|
+
"updateRelease": "kUIMeq_updateRelease",
|
|
1958
|
+
"modelLabel": "kUIMeq_modelLabel",
|
|
1959
|
+
"configGuide": "kUIMeq_configGuide",
|
|
1960
|
+
"uploadHint": "kUIMeq_uploadHint",
|
|
1961
|
+
"modelMenuList": "kUIMeq_modelMenuList",
|
|
1962
|
+
"connectionDot": "kUIMeq_connectionDot",
|
|
1963
|
+
"modelMenuItem": "kUIMeq_modelMenuItem",
|
|
1964
|
+
"comparisonGrid": "kUIMeq_comparisonGrid",
|
|
1965
|
+
"lightboxCaptionRow": "kUIMeq_lightboxCaptionRow",
|
|
1966
|
+
"galleryCardFooter": "kUIMeq_galleryCardFooter",
|
|
1967
|
+
"lightboxCaption": "kUIMeq_lightboxCaption",
|
|
1968
|
+
"galleryCardInfo": "kUIMeq_galleryCardInfo",
|
|
1969
|
+
"historyInfo": "kUIMeq_historyInfo",
|
|
1970
|
+
"lightboxZoomLevel": "kUIMeq_lightboxZoomLevel",
|
|
1971
|
+
"lightboxIndex": "kUIMeq_lightboxIndex",
|
|
1972
|
+
"taskStatus": "kUIMeq_taskStatus",
|
|
1973
|
+
"compareControl": "kUIMeq_compareControl",
|
|
1974
|
+
"configScroll": "kUIMeq_configScroll",
|
|
1975
|
+
"historyTitle": "kUIMeq_historyTitle",
|
|
1976
|
+
"lightbox": "kUIMeq_lightbox",
|
|
1977
|
+
"galleryAvatar": "kUIMeq_galleryAvatar",
|
|
1978
|
+
"panelHeading": "kUIMeq_panelHeading",
|
|
1979
|
+
"conversationToast": "kUIMeq_conversationToast",
|
|
1980
|
+
"galleryTagFilterList": "kUIMeq_galleryTagFilterList"
|
|
1844
1981
|
};
|
|
1845
1982
|
//#endregion
|
|
1846
1983
|
//#region src/client/ImageGenPanel.tsx
|
|
@@ -1964,6 +2101,71 @@ window.__ModuleLoader__.load({
|
|
|
1964
2101
|
function srcOf(image) {
|
|
1965
2102
|
return `data:${image.mime};base64,${image.b64}`;
|
|
1966
2103
|
}
|
|
2104
|
+
/** Decode one durable conversation attachment into the panel's image shape. */
|
|
2105
|
+
async function attachmentToGenerated(ref) {
|
|
2106
|
+
const query = new URLSearchParams({
|
|
2107
|
+
attachment_id: String(ref.attachmentId),
|
|
2108
|
+
media_type: ref.mediaType,
|
|
2109
|
+
bytes: String(ref.bytes),
|
|
2110
|
+
width: String(ref.width),
|
|
2111
|
+
height: String(ref.height)
|
|
2112
|
+
});
|
|
2113
|
+
const response = await fetch(`${AGENT_IMAGE_API}?${query.toString()}`);
|
|
2114
|
+
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
|
2115
|
+
const blob = await response.blob();
|
|
2116
|
+
const dataUrl = await new Promise((resolve, reject) => {
|
|
2117
|
+
const reader = new FileReader();
|
|
2118
|
+
reader.onload = () => resolve(typeof reader.result === "string" ? reader.result : "");
|
|
2119
|
+
reader.onerror = () => reject(/* @__PURE__ */ new Error("image read failed"));
|
|
2120
|
+
reader.readAsDataURL(blob);
|
|
2121
|
+
});
|
|
2122
|
+
const comma = dataUrl.indexOf(",");
|
|
2123
|
+
if (comma < 0) throw new Error("image decode failed");
|
|
2124
|
+
return {
|
|
2125
|
+
b64: dataUrl.slice(comma + 1),
|
|
2126
|
+
mime: ref.mediaType
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2129
|
+
/** Convert a generated image into the browser-owned draft format. */
|
|
2130
|
+
function generatedImageToFile(image, index) {
|
|
2131
|
+
const binary = atob(image.b64);
|
|
2132
|
+
const bytes = new Uint8Array(binary.length);
|
|
2133
|
+
for (let offset = 0; offset < binary.length; offset += 1) bytes[offset] = binary.charCodeAt(offset);
|
|
2134
|
+
return new File([bytes], `dsh-image-${index + 1}.${extensionOf(image.mime)}`, { type: image.mime });
|
|
2135
|
+
}
|
|
2136
|
+
/** Follow the native session selection while the image panel stays mounted. */
|
|
2137
|
+
function useCurrentSessionId(sessions) {
|
|
2138
|
+
const [sessionId, setSessionId] = (0, react.useState)(() => sessions?.list.getSnapshot().current);
|
|
2139
|
+
(0, react.useEffect)(() => {
|
|
2140
|
+
if (sessions === void 0) {
|
|
2141
|
+
setSessionId(void 0);
|
|
2142
|
+
return;
|
|
2143
|
+
}
|
|
2144
|
+
const sync = () => {
|
|
2145
|
+
setSessionId(sessions.list.getSnapshot().current);
|
|
2146
|
+
};
|
|
2147
|
+
sync();
|
|
2148
|
+
return sessions.list.subscribe(sync);
|
|
2149
|
+
}, [sessions]);
|
|
2150
|
+
return sessionId;
|
|
2151
|
+
}
|
|
2152
|
+
/** Find the host mounted in the shell's left navigation region. */
|
|
2153
|
+
function useSidebarHistoryHost() {
|
|
2154
|
+
const [host, setHost] = (0, react.useState)(() => document.querySelector("[data-dsh-imagegen-history-host]"));
|
|
2155
|
+
(0, react.useEffect)(() => {
|
|
2156
|
+
const sync = () => {
|
|
2157
|
+
setHost(document.querySelector("[data-dsh-imagegen-history-host]"));
|
|
2158
|
+
};
|
|
2159
|
+
sync();
|
|
2160
|
+
const observer = new MutationObserver(sync);
|
|
2161
|
+
observer.observe(document.body, {
|
|
2162
|
+
childList: true,
|
|
2163
|
+
subtree: true
|
|
2164
|
+
});
|
|
2165
|
+
return () => observer.disconnect();
|
|
2166
|
+
}, []);
|
|
2167
|
+
return host;
|
|
2168
|
+
}
|
|
1967
2169
|
/** Fetch persisted history image refs and decode them back to in-memory
|
|
1968
2170
|
* GeneratedImage[] (base64), so the canvas/preview can reuse the same
|
|
1969
2171
|
* rendering path as a fresh generation. */
|
|
@@ -1992,9 +2194,35 @@ window.__ModuleLoader__.load({
|
|
|
1992
2194
|
const pad = (n) => String(n).padStart(2, "0");
|
|
1993
2195
|
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}`;
|
|
1994
2196
|
}
|
|
2197
|
+
function modelsOfHistoryEntry(entry) {
|
|
2198
|
+
return entry.comparisonModels?.length !== void 0 && entry.comparisonModels.length > 1 ? entry.comparisonModels : [entry.model];
|
|
2199
|
+
}
|
|
2200
|
+
/** Collapse the per-model history rows that belong to one comparison run. */
|
|
2201
|
+
function groupHistoryEntries(entries) {
|
|
2202
|
+
const groups = /* @__PURE__ */ new Map();
|
|
2203
|
+
for (const entry of entries) {
|
|
2204
|
+
const key = entry.comparisonId ?? entry.id;
|
|
2205
|
+
const existing = groups.get(key);
|
|
2206
|
+
if (existing === void 0) groups.set(key, {
|
|
2207
|
+
key,
|
|
2208
|
+
entries: [entry],
|
|
2209
|
+
models: modelsOfHistoryEntry(entry)
|
|
2210
|
+
});
|
|
2211
|
+
else {
|
|
2212
|
+
existing.entries.push(entry);
|
|
2213
|
+
existing.models = [.../* @__PURE__ */ new Set([...existing.models, ...modelsOfHistoryEntry(entry)])];
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
return [...groups.values()];
|
|
2217
|
+
}
|
|
2218
|
+
function newComparisonId() {
|
|
2219
|
+
const cryptoApi = globalThis.crypto;
|
|
2220
|
+
if (typeof cryptoApi?.randomUUID === "function") return cryptoApi.randomUUID();
|
|
2221
|
+
return `comparison-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
2222
|
+
}
|
|
1995
2223
|
/** Render the studio. */
|
|
1996
2224
|
function ImageGenPanel(props) {
|
|
1997
|
-
const { api, scope } = props;
|
|
2225
|
+
const { api, scope, sessions, conversation } = props;
|
|
1998
2226
|
const config = useConfig(scope);
|
|
1999
2227
|
const enabled = config?.enabled ?? true;
|
|
2000
2228
|
const modelOptions = imageModelOptions(config);
|
|
@@ -2018,6 +2246,8 @@ window.__ModuleLoader__.load({
|
|
|
2018
2246
|
const [modelOpen, setModelOpen] = (0, react.useState)(false);
|
|
2019
2247
|
const [refImage, setRefImage] = (0, react.useState)(null);
|
|
2020
2248
|
const [images, setImages] = (0, react.useState)([]);
|
|
2249
|
+
const [addingToConversation, setAddingToConversation] = (0, react.useState)(null);
|
|
2250
|
+
const [conversationMessage, setConversationMessage] = (0, react.useState)(null);
|
|
2021
2251
|
const [error, setError] = (0, react.useState)(null);
|
|
2022
2252
|
const [submitting, setSubmitting] = (0, react.useState)(false);
|
|
2023
2253
|
const [enhancing, setEnhancing] = (0, react.useState)(false);
|
|
@@ -2051,9 +2281,13 @@ window.__ModuleLoader__.load({
|
|
|
2051
2281
|
const [updateResult, setUpdateResult] = (0, react.useState)(null);
|
|
2052
2282
|
const [libraryOpen, setLibraryOpen] = (0, react.useState)(false);
|
|
2053
2283
|
const [tasks, setTasks] = (0, react.useState)([]);
|
|
2284
|
+
const tasksRef = (0, react.useRef)([]);
|
|
2054
2285
|
const [taskTrayOpen, setTaskTrayOpen] = (0, react.useState)(false);
|
|
2055
2286
|
const [comparison, setComparison] = (0, react.useState)(null);
|
|
2056
2287
|
const [comparisonFullscreen, setComparisonFullscreen] = (0, react.useState)(false);
|
|
2288
|
+
const currentSessionId = useCurrentSessionId(sessions);
|
|
2289
|
+
const sidebarHistoryHost = useSidebarHistoryHost();
|
|
2290
|
+
const modeModels = tab === "edit" ? imageModels.filter((candidate) => describeModel(candidate).supportsEdit) : imageModels;
|
|
2057
2291
|
const fileInput = (0, react.useRef)(null);
|
|
2058
2292
|
const previewStage = (0, react.useRef)(null);
|
|
2059
2293
|
const activeTasks = tasks.filter((task) => task.status === "queued" || task.status === "running");
|
|
@@ -2061,12 +2295,12 @@ window.__ModuleLoader__.load({
|
|
|
2061
2295
|
const generating = submitting || activeTasks.length > 0;
|
|
2062
2296
|
const elapsed = useElapsed(generating, activeTask?.startedAt ?? activeTask?.createdAt ?? null);
|
|
2063
2297
|
(0, react.useEffect)(() => {
|
|
2064
|
-
setModel((previous) =>
|
|
2298
|
+
setModel((previous) => modeModels.includes(previous) ? previous : modeModels[0] ?? "");
|
|
2065
2299
|
setCompareModels((previous) => {
|
|
2066
|
-
const retained = previous.filter((candidate) =>
|
|
2067
|
-
return retained.length > 0 ? retained : [
|
|
2300
|
+
const retained = previous.filter((candidate) => modeModels.includes(candidate));
|
|
2301
|
+
return retained.length > 0 ? retained : modeModels[0] === void 0 ? [] : [modeModels[0]];
|
|
2068
2302
|
});
|
|
2069
|
-
}, [
|
|
2303
|
+
}, [modeModels.join("\0")]);
|
|
2070
2304
|
const filteredGallery = gallery.filter((entry) => {
|
|
2071
2305
|
if (galleryFilter === "all") return true;
|
|
2072
2306
|
if (galleryFilter === "text" || galleryFilter === "edit") return entry.mode === galleryFilter;
|
|
@@ -2074,10 +2308,11 @@ window.__ModuleLoader__.load({
|
|
|
2074
2308
|
}).filter((entry) => galleryRatio === "all" || normalizeSize(entry.size) === galleryRatio).filter((entry) => galleryTagFilter === null || (entry.tags ?? []).includes(galleryTagFilter)).filter((entry) => galleryQuery.trim() === "" || `${entry.prompt} ${entry.model} ${(entry.tags ?? []).join(" ")}`.toLocaleLowerCase().includes(galleryQuery.trim().toLocaleLowerCase())).slice().sort((a, b) => gallerySort === "newest" ? b.createdAt - a.createdAt : a.createdAt - b.createdAt);
|
|
2075
2309
|
const galleryTagOptions = [...new Set(gallery.flatMap((entry) => entry.tags ?? []))].sort((a, b) => a.localeCompare(b));
|
|
2076
2310
|
const galleryModels = [.../* @__PURE__ */ new Set([...imageModels, ...gallery.map((entry) => entry.model)])];
|
|
2077
|
-
const filteredHistory = history.filter((entry) => {
|
|
2311
|
+
const filteredHistory = groupHistoryEntries(history).filter((group) => group.entries.some((entry) => {
|
|
2078
2312
|
const query = historyQuery.trim().toLocaleLowerCase();
|
|
2079
|
-
|
|
2080
|
-
|
|
2313
|
+
const models = modelsOfHistoryEntry(entry);
|
|
2314
|
+
return (query === "" || `${entry.prompt} ${models.join(" ")}`.toLocaleLowerCase().includes(query)) && (historyModelFilter === "all" || models.includes(historyModelFilter)) && (historyRatioFilter === "all" || normalizeSize(entry.size) === historyRatioFilter);
|
|
2315
|
+
}));
|
|
2081
2316
|
(0, react.useEffect)(() => {
|
|
2082
2317
|
let disposed = false;
|
|
2083
2318
|
api.historyList().then((entries) => {
|
|
@@ -2090,11 +2325,31 @@ window.__ModuleLoader__.load({
|
|
|
2090
2325
|
disposed = true;
|
|
2091
2326
|
};
|
|
2092
2327
|
}, [api]);
|
|
2328
|
+
(0, react.useEffect)(() => {
|
|
2329
|
+
const onChatImages = (event) => {
|
|
2330
|
+
const detail = event.detail;
|
|
2331
|
+
if (detail === void 0 || currentSessionId === void 0 || detail.sessionId !== currentSessionId) return;
|
|
2332
|
+
Promise.all(detail.refs.map(attachmentToGenerated)).then((next) => {
|
|
2333
|
+
setTab("text");
|
|
2334
|
+
setImages(next);
|
|
2335
|
+
setComparison(null);
|
|
2336
|
+
setViewingHistoryId(null);
|
|
2337
|
+
setGalleryViewingId(null);
|
|
2338
|
+
setError(null);
|
|
2339
|
+
}).catch((caught) => {
|
|
2340
|
+
setError(errorMessage(caught));
|
|
2341
|
+
});
|
|
2342
|
+
};
|
|
2343
|
+
document.addEventListener(CHAT_IMAGE_EVENT, onChatImages);
|
|
2344
|
+
return () => document.removeEventListener(CHAT_IMAGE_EVENT, onChatImages);
|
|
2345
|
+
}, [currentSessionId]);
|
|
2093
2346
|
(0, react.useEffect)(() => {
|
|
2094
2347
|
let disposed = false;
|
|
2095
2348
|
const refresh = () => {
|
|
2096
2349
|
api.taskList().then((next) => {
|
|
2097
2350
|
if (disposed) return;
|
|
2351
|
+
const newlyCompleted = next.filter((task) => task.status === "completed" && task.result !== void 0 && !tasksRef.current.some((old) => old.id === task.id && old.status === "completed"));
|
|
2352
|
+
tasksRef.current = next;
|
|
2098
2353
|
setTasks((previous) => {
|
|
2099
2354
|
const completed = next.find((task) => task.status === "completed" && !previous.some((old) => old.id === task.id && old.status === "completed") && !comparison?.taskIds.includes(task.id));
|
|
2100
2355
|
if (completed?.result !== void 0) {
|
|
@@ -2104,6 +2359,9 @@ window.__ModuleLoader__.load({
|
|
|
2104
2359
|
}
|
|
2105
2360
|
return next;
|
|
2106
2361
|
});
|
|
2362
|
+
if (newlyCompleted.length > 0) api.historyList().then((entries) => {
|
|
2363
|
+
if (!disposed) setHistory(entries);
|
|
2364
|
+
}).catch(() => {});
|
|
2107
2365
|
}).catch(() => {});
|
|
2108
2366
|
};
|
|
2109
2367
|
refresh();
|
|
@@ -2228,7 +2486,7 @@ window.__ModuleLoader__.load({
|
|
|
2228
2486
|
}
|
|
2229
2487
|
const request = {
|
|
2230
2488
|
mode: tab === "gallery" ? "text" : tab,
|
|
2231
|
-
model:
|
|
2489
|
+
model: modeModels.includes(model) ? model : modeModels[0] ?? "",
|
|
2232
2490
|
prompt: promptText,
|
|
2233
2491
|
size,
|
|
2234
2492
|
quality,
|
|
@@ -2241,20 +2499,27 @@ window.__ModuleLoader__.load({
|
|
|
2241
2499
|
setError(null);
|
|
2242
2500
|
setSubmitting(true);
|
|
2243
2501
|
try {
|
|
2244
|
-
const targetModels = (compareEnabled ? compareModels : [request.model]).filter((candidate) =>
|
|
2502
|
+
const targetModels = (compareEnabled ? compareModels : [request.model]).filter((candidate) => modeModels.includes(candidate));
|
|
2245
2503
|
if (targetModels.length === 0) {
|
|
2246
2504
|
setError(tt("compare.selectRequired"));
|
|
2247
2505
|
return;
|
|
2248
2506
|
}
|
|
2507
|
+
const comparisonId = targetModels.length > 1 ? newComparisonId() : void 0;
|
|
2508
|
+
const comparisonFields = comparisonId === void 0 ? {} : {
|
|
2509
|
+
comparisonId,
|
|
2510
|
+
comparisonModels: targetModels
|
|
2511
|
+
};
|
|
2249
2512
|
const submitted = await Promise.all(targetModels.map((targetModel) => api.taskSubmit({
|
|
2250
2513
|
...request,
|
|
2251
|
-
model: targetModel
|
|
2514
|
+
model: targetModel,
|
|
2515
|
+
...comparisonFields
|
|
2252
2516
|
})));
|
|
2253
2517
|
setTasks((previous) => [...submitted, ...previous.filter((item) => !submitted.some((task) => task.id === item.id))]);
|
|
2254
|
-
setComparison(
|
|
2518
|
+
setComparison(comparisonId === void 0 ? null : {
|
|
2255
2519
|
taskIds: submitted.map((task) => task.id),
|
|
2256
|
-
prompt: promptText
|
|
2257
|
-
|
|
2520
|
+
prompt: promptText,
|
|
2521
|
+
comparisonId
|
|
2522
|
+
});
|
|
2258
2523
|
} catch (caught) {
|
|
2259
2524
|
setError(errorMessage(caught));
|
|
2260
2525
|
} finally {
|
|
@@ -2311,10 +2576,17 @@ window.__ModuleLoader__.load({
|
|
|
2311
2576
|
});
|
|
2312
2577
|
return () => window.cancelAnimationFrame(frame);
|
|
2313
2578
|
}, [preview, previewScale]);
|
|
2314
|
-
|
|
2315
|
-
|
|
2579
|
+
const loadHistoryGroup = async (group) => {
|
|
2580
|
+
return (await Promise.all(group.entries.map((entry) => historyImagesToGenerated(entry.images)))).flat();
|
|
2581
|
+
};
|
|
2582
|
+
/** View every model result from one comparison as one canvas result set. */
|
|
2583
|
+
const viewHistoryGroup = async (group) => {
|
|
2584
|
+
const entry = group.entries[0];
|
|
2585
|
+
if (entry === void 0) return;
|
|
2586
|
+
setTab("text");
|
|
2316
2587
|
try {
|
|
2317
|
-
setImages(await
|
|
2588
|
+
setImages(await loadHistoryGroup(group));
|
|
2589
|
+
setComparison(null);
|
|
2318
2590
|
setError(null);
|
|
2319
2591
|
setViewingHistoryId(entry.id);
|
|
2320
2592
|
setGalleryViewingId(null);
|
|
@@ -2322,10 +2594,12 @@ window.__ModuleLoader__.load({
|
|
|
2322
2594
|
setError(errorMessage(caught));
|
|
2323
2595
|
}
|
|
2324
2596
|
};
|
|
2325
|
-
/** Restore
|
|
2326
|
-
const
|
|
2597
|
+
/** Restore one comparison group, including its selected model set. */
|
|
2598
|
+
const restoreHistoryGroup = async (group) => {
|
|
2599
|
+
const entry = group.entries[0];
|
|
2600
|
+
if (entry === void 0) return;
|
|
2327
2601
|
try {
|
|
2328
|
-
const restored = await
|
|
2602
|
+
const restored = await loadHistoryGroup(group);
|
|
2329
2603
|
setTab(entry.mode);
|
|
2330
2604
|
setPrompt(entry.prompt);
|
|
2331
2605
|
setSize(normalizeSize(entry.size));
|
|
@@ -2333,8 +2607,11 @@ window.__ModuleLoader__.load({
|
|
|
2333
2607
|
setDetail(DETAILS.includes(entry.detail) ? entry.detail : "");
|
|
2334
2608
|
setCount(entry.n >= 1 && entry.n <= 4 ? entry.n : 1);
|
|
2335
2609
|
setModel(imageModels.includes(entry.model) ? entry.model : imageModels[0]);
|
|
2610
|
+
setCompareModels(group.models.filter((candidate) => imageModels.includes(candidate)));
|
|
2611
|
+
setCompareEnabled(group.models.filter((candidate) => imageModels.includes(candidate)).length > 1);
|
|
2336
2612
|
setRefImage(null);
|
|
2337
2613
|
setImages(restored);
|
|
2614
|
+
setComparison(null);
|
|
2338
2615
|
setError(null);
|
|
2339
2616
|
setViewingHistoryId(entry.id);
|
|
2340
2617
|
setGalleryViewingId(null);
|
|
@@ -2342,12 +2619,15 @@ window.__ModuleLoader__.load({
|
|
|
2342
2619
|
setError(errorMessage(caught));
|
|
2343
2620
|
}
|
|
2344
2621
|
};
|
|
2345
|
-
/** Remove one
|
|
2346
|
-
const
|
|
2347
|
-
|
|
2348
|
-
|
|
2622
|
+
/** Remove every persisted row belonging to one comparison group. */
|
|
2623
|
+
const deleteHistoryGroup = async (group) => {
|
|
2624
|
+
const ids = new Set(group.entries.map((entry) => entry.id));
|
|
2625
|
+
setHistory((previous) => previous.filter((entry) => !ids.has(entry.id)));
|
|
2626
|
+
if (viewingHistoryId !== null && ids.has(viewingHistoryId)) setViewingHistoryId(null);
|
|
2349
2627
|
try {
|
|
2350
|
-
|
|
2628
|
+
let next = history;
|
|
2629
|
+
for (const id of ids) next = await api.historyRemove(id);
|
|
2630
|
+
setHistory(next);
|
|
2351
2631
|
} catch {}
|
|
2352
2632
|
};
|
|
2353
2633
|
/** Remove all history entries. */
|
|
@@ -2399,6 +2679,39 @@ window.__ModuleLoader__.load({
|
|
|
2399
2679
|
setGalleryAdding(false);
|
|
2400
2680
|
}
|
|
2401
2681
|
};
|
|
2682
|
+
/** Put a generated image into the native conversation composer. */
|
|
2683
|
+
const addImageToConversation = async (image, index) => {
|
|
2684
|
+
if (addingToConversation !== null) return;
|
|
2685
|
+
if (conversation === void 0 || sessions === void 0 || currentSessionId === void 0) {
|
|
2686
|
+
setError(tt("conversation.noSession"));
|
|
2687
|
+
return;
|
|
2688
|
+
}
|
|
2689
|
+
const sessionScope = sessions.scope(currentSessionId);
|
|
2690
|
+
if (sessionScope === void 0) {
|
|
2691
|
+
setError(tt("conversation.unavailable"));
|
|
2692
|
+
return;
|
|
2693
|
+
}
|
|
2694
|
+
setAddingToConversation(index);
|
|
2695
|
+
let attachments = [];
|
|
2696
|
+
let added = false;
|
|
2697
|
+
try {
|
|
2698
|
+
const file = generatedImageToFile(image, index);
|
|
2699
|
+
attachments = conversation.createDraftImages([file]);
|
|
2700
|
+
const input = conversation.input.for(sessionScope);
|
|
2701
|
+
if (!input.addImages(attachments.map((attachment) => attachment.id))) throw new Error(tt("conversation.busy"));
|
|
2702
|
+
added = true;
|
|
2703
|
+
if (input.state.getSnapshot().draft.trim() === "" && prompt.trim() !== "") input.setDraft(prompt.trim());
|
|
2704
|
+
setConversationMessage(tt("conversation.added"));
|
|
2705
|
+
window.setTimeout(() => {
|
|
2706
|
+
setConversationMessage(null);
|
|
2707
|
+
}, 2200);
|
|
2708
|
+
} catch (caught) {
|
|
2709
|
+
if (!added) conversation.releaseDraftImages(attachments);
|
|
2710
|
+
setError(errorMessage(caught));
|
|
2711
|
+
} finally {
|
|
2712
|
+
setAddingToConversation(null);
|
|
2713
|
+
}
|
|
2714
|
+
};
|
|
2402
2715
|
/** Add one history entry's first image to the gallery (fetches it from the
|
|
2403
2716
|
* history image route, then delegates to addToGallery). */
|
|
2404
2717
|
const addHistoryEntryToGallery = async (entry) => {
|
|
@@ -2424,26 +2737,6 @@ window.__ModuleLoader__.load({
|
|
|
2424
2737
|
setError(errorMessage(caught));
|
|
2425
2738
|
}
|
|
2426
2739
|
};
|
|
2427
|
-
/** Restore a gallery entry's parameters (and its images) into the form. */
|
|
2428
|
-
const restoreGalleryEntry = async (entry) => {
|
|
2429
|
-
try {
|
|
2430
|
-
const restored = await historyImagesToGenerated(entry.images);
|
|
2431
|
-
setTab(entry.mode);
|
|
2432
|
-
setPrompt(entry.prompt);
|
|
2433
|
-
setSize(normalizeSize(entry.size));
|
|
2434
|
-
setQuality(normalizeQuality(entry.quality));
|
|
2435
|
-
setDetail(DETAILS.includes(entry.detail) ? entry.detail : "");
|
|
2436
|
-
setCount(entry.n >= 1 && entry.n <= 4 ? entry.n : 1);
|
|
2437
|
-
setModel(imageModels.includes(entry.model) ? entry.model : imageModels[0]);
|
|
2438
|
-
setRefImage(null);
|
|
2439
|
-
setImages(restored);
|
|
2440
|
-
setError(null);
|
|
2441
|
-
setViewingHistoryId(null);
|
|
2442
|
-
setGalleryViewingId(null);
|
|
2443
|
-
} catch (caught) {
|
|
2444
|
-
setError(errorMessage(caught));
|
|
2445
|
-
}
|
|
2446
|
-
};
|
|
2447
2740
|
/** Remove one gallery entry. */
|
|
2448
2741
|
const deleteGalleryEntry = async (id) => {
|
|
2449
2742
|
setGallery(gallery.filter((entry) => entry.id !== id));
|
|
@@ -2521,7 +2814,7 @@ window.__ModuleLoader__.load({
|
|
|
2521
2814
|
anchor.click();
|
|
2522
2815
|
});
|
|
2523
2816
|
};
|
|
2524
|
-
const generateDisabled = submitting;
|
|
2817
|
+
const generateDisabled = submitting || modeModels.length === 0;
|
|
2525
2818
|
const viewingEntry = viewingHistoryId === null ? null : history.find((entry) => entry.id === viewingHistoryId) ?? null;
|
|
2526
2819
|
const viewingGalleryEntry = galleryViewingId === null ? null : gallery.find((entry) => entry.id === galleryViewingId) ?? null;
|
|
2527
2820
|
const previewImage = preview === null ? null : preview.images[preview.index] ?? null;
|
|
@@ -2562,6 +2855,147 @@ window.__ModuleLoader__.load({
|
|
|
2562
2855
|
setError(null);
|
|
2563
2856
|
closePreview();
|
|
2564
2857
|
};
|
|
2858
|
+
const historyPanel = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", {
|
|
2859
|
+
className: panel_module_css_default.history,
|
|
2860
|
+
"data-dsh-imagegen-history": true,
|
|
2861
|
+
children: [
|
|
2862
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", {
|
|
2863
|
+
className: panel_module_css_default.historyHeader,
|
|
2864
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2865
|
+
className: panel_module_css_default.historyTitle,
|
|
2866
|
+
children: tt("history.title")
|
|
2867
|
+
}), history.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2868
|
+
type: "button",
|
|
2869
|
+
className: panel_module_css_default.historyClear,
|
|
2870
|
+
onClick: () => {
|
|
2871
|
+
clearHistory();
|
|
2872
|
+
},
|
|
2873
|
+
children: tt("history.clear")
|
|
2874
|
+
}) : null]
|
|
2875
|
+
}),
|
|
2876
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2877
|
+
className: panel_module_css_default.historyFilters,
|
|
2878
|
+
children: [
|
|
2879
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2880
|
+
className: panel_module_css_default.historySearch,
|
|
2881
|
+
value: historyQuery,
|
|
2882
|
+
onChange: (event) => {
|
|
2883
|
+
setHistoryQuery(event.target.value);
|
|
2884
|
+
},
|
|
2885
|
+
placeholder: tt("history.search"),
|
|
2886
|
+
"aria-label": tt("history.search")
|
|
2887
|
+
}),
|
|
2888
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
2889
|
+
value: historyModelFilter,
|
|
2890
|
+
onChange: (event) => {
|
|
2891
|
+
setHistoryModelFilter(event.target.value);
|
|
2892
|
+
},
|
|
2893
|
+
"aria-label": tt("history.model"),
|
|
2894
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2895
|
+
value: "all",
|
|
2896
|
+
children: tt("history.allModels")
|
|
2897
|
+
}), [...new Set(history.flatMap((entry) => modelsOfHistoryEntry(entry)))].map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2898
|
+
value: option,
|
|
2899
|
+
children: option
|
|
2900
|
+
}, option))]
|
|
2901
|
+
}),
|
|
2902
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
2903
|
+
value: historyRatioFilter,
|
|
2904
|
+
onChange: (event) => {
|
|
2905
|
+
setHistoryRatioFilter(event.target.value);
|
|
2906
|
+
},
|
|
2907
|
+
"aria-label": tt("history.ratio"),
|
|
2908
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2909
|
+
value: "all",
|
|
2910
|
+
children: tt("history.allRatios")
|
|
2911
|
+
}), [...new Set(history.map((entry) => normalizeSize(entry.size)))].map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2912
|
+
value: option,
|
|
2913
|
+
children: option
|
|
2914
|
+
}, option))]
|
|
2915
|
+
})
|
|
2916
|
+
]
|
|
2917
|
+
}),
|
|
2918
|
+
filteredHistory.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2919
|
+
className: panel_module_css_default.historyEmpty,
|
|
2920
|
+
children: tt("history.empty")
|
|
2921
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2922
|
+
className: panel_module_css_default.historyList,
|
|
2923
|
+
children: filteredHistory.map((group) => {
|
|
2924
|
+
const entry = group.entries[0];
|
|
2925
|
+
const isComparison = group.models.length > 1;
|
|
2926
|
+
const imageCount = group.entries.reduce((total, item) => total + item.images.length, 0);
|
|
2927
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2928
|
+
className: panel_module_css_default.historyItem,
|
|
2929
|
+
"data-active": group.entries.some((item) => item.id === viewingHistoryId) ? "" : void 0,
|
|
2930
|
+
"data-comparison": isComparison ? "" : void 0,
|
|
2931
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2932
|
+
type: "button",
|
|
2933
|
+
className: panel_module_css_default.historyMain,
|
|
2934
|
+
"data-dsh-imagegen-history-main": "",
|
|
2935
|
+
onClick: () => {
|
|
2936
|
+
viewHistoryGroup(group);
|
|
2937
|
+
},
|
|
2938
|
+
children: [entry.images.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
2939
|
+
className: panel_module_css_default.historyThumb,
|
|
2940
|
+
src: entry.images[0].url,
|
|
2941
|
+
alt: ""
|
|
2942
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: panel_module_css_default.historyThumbPlaceholder }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2943
|
+
className: panel_module_css_default.historyInfo,
|
|
2944
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2945
|
+
className: panel_module_css_default.historyPrompt,
|
|
2946
|
+
children: entry.prompt
|
|
2947
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2948
|
+
className: panel_module_css_default.historyMeta,
|
|
2949
|
+
children: [
|
|
2950
|
+
isComparison ? tt("compare.title") : tt(`mode.${entry.mode === "edit" ? "edit" : "text"}`),
|
|
2951
|
+
" · ",
|
|
2952
|
+
isComparison ? group.models.join(" · ") : entry.model,
|
|
2953
|
+
" · ",
|
|
2954
|
+
formatTime(entry.createdAt),
|
|
2955
|
+
" · ",
|
|
2956
|
+
imageCount,
|
|
2957
|
+
" ",
|
|
2958
|
+
tt("history.images")
|
|
2959
|
+
]
|
|
2960
|
+
})]
|
|
2961
|
+
})]
|
|
2962
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2963
|
+
className: panel_module_css_default.historyActions,
|
|
2964
|
+
children: [
|
|
2965
|
+
entry.images.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2966
|
+
type: "button",
|
|
2967
|
+
className: panel_module_css_default.historyAction,
|
|
2968
|
+
disabled: galleryAdding,
|
|
2969
|
+
title: tt("gallery.add"),
|
|
2970
|
+
onClick: () => {
|
|
2971
|
+
addHistoryEntryToGallery(entry);
|
|
2972
|
+
},
|
|
2973
|
+
children: tt("gallery.add")
|
|
2974
|
+
}) : null,
|
|
2975
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2976
|
+
type: "button",
|
|
2977
|
+
className: panel_module_css_default.historyAction,
|
|
2978
|
+
onClick: () => {
|
|
2979
|
+
restoreHistoryGroup(group);
|
|
2980
|
+
},
|
|
2981
|
+
children: tt("history.restore")
|
|
2982
|
+
}),
|
|
2983
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2984
|
+
type: "button",
|
|
2985
|
+
className: panel_module_css_default.historyAction,
|
|
2986
|
+
"data-danger": true,
|
|
2987
|
+
onClick: () => {
|
|
2988
|
+
deleteHistoryGroup(group);
|
|
2989
|
+
},
|
|
2990
|
+
children: tt("history.delete")
|
|
2991
|
+
})
|
|
2992
|
+
]
|
|
2993
|
+
})]
|
|
2994
|
+
}, group.key);
|
|
2995
|
+
})
|
|
2996
|
+
})
|
|
2997
|
+
]
|
|
2998
|
+
});
|
|
2565
2999
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2566
3000
|
className: panel_module_css_default.panel,
|
|
2567
3001
|
children: [
|
|
@@ -2624,10 +3058,11 @@ window.__ModuleLoader__.load({
|
|
|
2624
3058
|
})]
|
|
2625
3059
|
})]
|
|
2626
3060
|
}) : null,
|
|
2627
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
3061
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2628
3062
|
className: panel_module_css_default.studio,
|
|
2629
|
-
children:
|
|
2630
|
-
|
|
3063
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3064
|
+
className: panel_module_css_default.generation,
|
|
3065
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", {
|
|
2631
3066
|
className: panel_module_css_default.config,
|
|
2632
3067
|
"data-gallery": tab === "gallery" ? "true" : void 0,
|
|
2633
3068
|
children: [
|
|
@@ -2973,7 +3408,7 @@ window.__ModuleLoader__.load({
|
|
|
2973
3408
|
onClick: () => {
|
|
2974
3409
|
setModelOpen((open) => !open);
|
|
2975
3410
|
},
|
|
2976
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: model }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
3411
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: model || tt("model.noEditModels") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
2977
3412
|
viewBox: "0 0 16 16",
|
|
2978
3413
|
width: "12",
|
|
2979
3414
|
height: "12",
|
|
@@ -2989,7 +3424,7 @@ window.__ModuleLoader__.load({
|
|
|
2989
3424
|
className: panel_module_css_default.modelMenuList,
|
|
2990
3425
|
role: "listbox",
|
|
2991
3426
|
"aria-label": tt("model.label"),
|
|
2992
|
-
children:
|
|
3427
|
+
children: modeModels.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2993
3428
|
type: "button",
|
|
2994
3429
|
role: "option",
|
|
2995
3430
|
"aria-selected": model === option,
|
|
@@ -3019,7 +3454,7 @@ window.__ModuleLoader__.load({
|
|
|
3019
3454
|
className: panel_module_css_default.compareModelChoices,
|
|
3020
3455
|
role: "group",
|
|
3021
3456
|
"aria-label": tt("compare.models"),
|
|
3022
|
-
children:
|
|
3457
|
+
children: modeModels.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3023
3458
|
type: "checkbox",
|
|
3024
3459
|
checked: compareModels.includes(option),
|
|
3025
3460
|
onChange: () => {
|
|
@@ -3044,8 +3479,7 @@ window.__ModuleLoader__.load({
|
|
|
3044
3479
|
]
|
|
3045
3480
|
})
|
|
3046
3481
|
]
|
|
3047
|
-
}),
|
|
3048
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
3482
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
3049
3483
|
className: panel_module_css_default.canvas,
|
|
3050
3484
|
"data-gallery": tab === "gallery" ? "true" : void 0,
|
|
3051
3485
|
children: [
|
|
@@ -3387,7 +3821,8 @@ window.__ModuleLoader__.load({
|
|
|
3387
3821
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: tt("compare.title") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
3388
3822
|
comparisonResults.length,
|
|
3389
3823
|
" / ",
|
|
3390
|
-
comparisonTasks.length
|
|
3824
|
+
comparisonTasks.length,
|
|
3825
|
+
generating ? ` · ${tt("canvas.elapsed", { seconds: elapsed })}` : ""
|
|
3391
3826
|
] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3392
3827
|
type: "button",
|
|
3393
3828
|
disabled: comparisonResults.length === 0,
|
|
@@ -3397,13 +3832,25 @@ window.__ModuleLoader__.load({
|
|
|
3397
3832
|
children: tt("compare.fullscreen")
|
|
3398
3833
|
})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3399
3834
|
className: panel_module_css_default.comparisonGrid,
|
|
3400
|
-
children: comparisonTasks.map((task) =>
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3835
|
+
children: comparisonTasks.map((task) => {
|
|
3836
|
+
const taskImages = task.result?.images ?? [];
|
|
3837
|
+
const image = taskImages[0];
|
|
3838
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: task.request.model }), image !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3839
|
+
type: "button",
|
|
3840
|
+
className: panel_module_css_default.comparisonImageButton,
|
|
3841
|
+
title: tt("preview.open"),
|
|
3842
|
+
onClick: () => {
|
|
3843
|
+
openPreview(taskImages, 0);
|
|
3844
|
+
},
|
|
3845
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
3846
|
+
src: srcOf(image),
|
|
3847
|
+
alt: task.request.model
|
|
3848
|
+
})
|
|
3849
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tt(`tasks.${task.status}`) })] }, task.id);
|
|
3850
|
+
})
|
|
3404
3851
|
})]
|
|
3405
3852
|
}) : null,
|
|
3406
|
-
generating ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3853
|
+
generating && comparison === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3407
3854
|
className: panel_module_css_default.canvasState,
|
|
3408
3855
|
"data-generation-state": activeTask?.status ?? "submitting",
|
|
3409
3856
|
role: "status",
|
|
@@ -3553,6 +4000,28 @@ window.__ModuleLoader__.load({
|
|
|
3553
4000
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M8 5.8v4.4M5.8 8h4.4" })]
|
|
3554
4001
|
}), tt("gallery.add")]
|
|
3555
4002
|
}),
|
|
4003
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
4004
|
+
type: "button",
|
|
4005
|
+
className: panel_module_css_default.conversationAdd,
|
|
4006
|
+
title: tt("conversation.add"),
|
|
4007
|
+
disabled: addingToConversation !== null,
|
|
4008
|
+
onClick: (event) => {
|
|
4009
|
+
event.stopPropagation();
|
|
4010
|
+
addImageToConversation(image, index);
|
|
4011
|
+
},
|
|
4012
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
4013
|
+
viewBox: "0 0 16 16",
|
|
4014
|
+
width: "12",
|
|
4015
|
+
height: "12",
|
|
4016
|
+
fill: "none",
|
|
4017
|
+
stroke: "currentColor",
|
|
4018
|
+
strokeWidth: "1.5",
|
|
4019
|
+
strokeLinecap: "round",
|
|
4020
|
+
strokeLinejoin: "round",
|
|
4021
|
+
"aria-hidden": "true",
|
|
4022
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M3 4.5h10v7H3z" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M5.5 2.5h5M8 6v4M6 8h4" })]
|
|
4023
|
+
}), addingToConversation === index ? tt("conversation.adding") : tt("conversation.add")]
|
|
4024
|
+
}),
|
|
3556
4025
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
3557
4026
|
className: panel_module_css_default.download,
|
|
3558
4027
|
href: srcOf(image),
|
|
@@ -3567,208 +4036,10 @@ window.__ModuleLoader__.load({
|
|
|
3567
4036
|
})]
|
|
3568
4037
|
}) : null
|
|
3569
4038
|
]
|
|
3570
|
-
})
|
|
3571
|
-
|
|
3572
|
-
className: panel_module_css_default.history,
|
|
3573
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", {
|
|
3574
|
-
className: panel_module_css_default.historyHeader,
|
|
3575
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3576
|
-
className: panel_module_css_default.historyTitle,
|
|
3577
|
-
children: tt("gallery.title")
|
|
3578
|
-
}), gallery.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3579
|
-
type: "button",
|
|
3580
|
-
className: panel_module_css_default.historyClear,
|
|
3581
|
-
onClick: () => {
|
|
3582
|
-
clearGalleryAll();
|
|
3583
|
-
},
|
|
3584
|
-
children: tt("gallery.clear")
|
|
3585
|
-
}) : null]
|
|
3586
|
-
}), gallery.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3587
|
-
className: panel_module_css_default.historyEmpty,
|
|
3588
|
-
children: tt("gallery.empty")
|
|
3589
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3590
|
-
className: panel_module_css_default.historyList,
|
|
3591
|
-
children: gallery.map((entry) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3592
|
-
className: panel_module_css_default.historyItem,
|
|
3593
|
-
"data-active": entry.id === galleryViewingId ? "" : void 0,
|
|
3594
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3595
|
-
type: "button",
|
|
3596
|
-
className: panel_module_css_default.historyMain,
|
|
3597
|
-
onClick: () => {
|
|
3598
|
-
viewGalleryEntry(entry);
|
|
3599
|
-
},
|
|
3600
|
-
children: [entry.images.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
3601
|
-
className: panel_module_css_default.historyThumb,
|
|
3602
|
-
src: entry.images[0].url,
|
|
3603
|
-
alt: ""
|
|
3604
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: panel_module_css_default.historyThumbPlaceholder }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3605
|
-
className: panel_module_css_default.historyInfo,
|
|
3606
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3607
|
-
className: panel_module_css_default.historyPrompt,
|
|
3608
|
-
children: entry.prompt
|
|
3609
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3610
|
-
className: panel_module_css_default.historyMeta,
|
|
3611
|
-
children: [
|
|
3612
|
-
tt(`mode.${entry.mode === "edit" ? "edit" : "text"}`),
|
|
3613
|
-
" · ",
|
|
3614
|
-
formatTime(entry.createdAt)
|
|
3615
|
-
]
|
|
3616
|
-
})]
|
|
3617
|
-
})]
|
|
3618
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3619
|
-
className: panel_module_css_default.historyActions,
|
|
3620
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3621
|
-
type: "button",
|
|
3622
|
-
className: panel_module_css_default.historyAction,
|
|
3623
|
-
onClick: () => {
|
|
3624
|
-
restoreGalleryEntry(entry);
|
|
3625
|
-
},
|
|
3626
|
-
children: tt("history.restore")
|
|
3627
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3628
|
-
type: "button",
|
|
3629
|
-
className: panel_module_css_default.historyAction,
|
|
3630
|
-
"data-danger": true,
|
|
3631
|
-
onClick: () => {
|
|
3632
|
-
deleteGalleryEntry(entry.id);
|
|
3633
|
-
},
|
|
3634
|
-
children: tt("gallery.delete")
|
|
3635
|
-
})]
|
|
3636
|
-
})]
|
|
3637
|
-
}, entry.id))
|
|
3638
|
-
})]
|
|
3639
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", {
|
|
3640
|
-
className: panel_module_css_default.history,
|
|
3641
|
-
children: [
|
|
3642
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", {
|
|
3643
|
-
className: panel_module_css_default.historyHeader,
|
|
3644
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3645
|
-
className: panel_module_css_default.historyTitle,
|
|
3646
|
-
children: tt("history.title")
|
|
3647
|
-
}), history.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3648
|
-
type: "button",
|
|
3649
|
-
className: panel_module_css_default.historyClear,
|
|
3650
|
-
onClick: () => {
|
|
3651
|
-
clearHistory();
|
|
3652
|
-
},
|
|
3653
|
-
children: tt("history.clear")
|
|
3654
|
-
}) : null]
|
|
3655
|
-
}),
|
|
3656
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3657
|
-
className: panel_module_css_default.historyFilters,
|
|
3658
|
-
children: [
|
|
3659
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3660
|
-
className: panel_module_css_default.historySearch,
|
|
3661
|
-
value: historyQuery,
|
|
3662
|
-
onChange: (event) => {
|
|
3663
|
-
setHistoryQuery(event.target.value);
|
|
3664
|
-
},
|
|
3665
|
-
placeholder: tt("history.search"),
|
|
3666
|
-
"aria-label": tt("history.search")
|
|
3667
|
-
}),
|
|
3668
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
3669
|
-
value: historyModelFilter,
|
|
3670
|
-
onChange: (event) => {
|
|
3671
|
-
setHistoryModelFilter(event.target.value);
|
|
3672
|
-
},
|
|
3673
|
-
"aria-label": tt("history.model"),
|
|
3674
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3675
|
-
value: "all",
|
|
3676
|
-
children: tt("history.allModels")
|
|
3677
|
-
}), [...new Set(history.map((entry) => entry.model))].map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3678
|
-
value: option,
|
|
3679
|
-
children: option
|
|
3680
|
-
}, option))]
|
|
3681
|
-
}),
|
|
3682
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
3683
|
-
value: historyRatioFilter,
|
|
3684
|
-
onChange: (event) => {
|
|
3685
|
-
setHistoryRatioFilter(event.target.value);
|
|
3686
|
-
},
|
|
3687
|
-
"aria-label": tt("history.ratio"),
|
|
3688
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3689
|
-
value: "all",
|
|
3690
|
-
children: tt("history.allRatios")
|
|
3691
|
-
}), [...new Set(history.map((entry) => normalizeSize(entry.size)))].map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3692
|
-
value: option,
|
|
3693
|
-
children: option
|
|
3694
|
-
}, option))]
|
|
3695
|
-
})
|
|
3696
|
-
]
|
|
3697
|
-
}),
|
|
3698
|
-
filteredHistory.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3699
|
-
className: panel_module_css_default.historyEmpty,
|
|
3700
|
-
children: tt("history.empty")
|
|
3701
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3702
|
-
className: panel_module_css_default.historyList,
|
|
3703
|
-
children: filteredHistory.map((entry) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3704
|
-
className: panel_module_css_default.historyItem,
|
|
3705
|
-
"data-active": entry.id === viewingHistoryId ? "" : void 0,
|
|
3706
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3707
|
-
type: "button",
|
|
3708
|
-
className: panel_module_css_default.historyMain,
|
|
3709
|
-
onClick: () => {
|
|
3710
|
-
viewHistoryEntry(entry);
|
|
3711
|
-
},
|
|
3712
|
-
children: [entry.images.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
3713
|
-
className: panel_module_css_default.historyThumb,
|
|
3714
|
-
src: entry.images[0].url,
|
|
3715
|
-
alt: ""
|
|
3716
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: panel_module_css_default.historyThumbPlaceholder }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3717
|
-
className: panel_module_css_default.historyInfo,
|
|
3718
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3719
|
-
className: panel_module_css_default.historyPrompt,
|
|
3720
|
-
children: entry.prompt
|
|
3721
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3722
|
-
className: panel_module_css_default.historyMeta,
|
|
3723
|
-
children: [
|
|
3724
|
-
tt(`mode.${entry.mode === "edit" ? "edit" : "text"}`),
|
|
3725
|
-
" · ",
|
|
3726
|
-
formatTime(entry.createdAt),
|
|
3727
|
-
" · ",
|
|
3728
|
-
entry.images.length,
|
|
3729
|
-
" ",
|
|
3730
|
-
tt("history.images")
|
|
3731
|
-
]
|
|
3732
|
-
})]
|
|
3733
|
-
})]
|
|
3734
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3735
|
-
className: panel_module_css_default.historyActions,
|
|
3736
|
-
children: [
|
|
3737
|
-
entry.images.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3738
|
-
type: "button",
|
|
3739
|
-
className: panel_module_css_default.historyAction,
|
|
3740
|
-
disabled: galleryAdding,
|
|
3741
|
-
title: tt("gallery.add"),
|
|
3742
|
-
onClick: () => {
|
|
3743
|
-
addHistoryEntryToGallery(entry);
|
|
3744
|
-
},
|
|
3745
|
-
children: tt("gallery.add")
|
|
3746
|
-
}) : null,
|
|
3747
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3748
|
-
type: "button",
|
|
3749
|
-
className: panel_module_css_default.historyAction,
|
|
3750
|
-
onClick: () => {
|
|
3751
|
-
restoreHistoryEntry(entry);
|
|
3752
|
-
},
|
|
3753
|
-
children: tt("history.restore")
|
|
3754
|
-
}),
|
|
3755
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3756
|
-
type: "button",
|
|
3757
|
-
className: panel_module_css_default.historyAction,
|
|
3758
|
-
"data-danger": true,
|
|
3759
|
-
onClick: () => {
|
|
3760
|
-
deleteHistoryEntry(entry.id);
|
|
3761
|
-
},
|
|
3762
|
-
children: tt("history.delete")
|
|
3763
|
-
})
|
|
3764
|
-
]
|
|
3765
|
-
})]
|
|
3766
|
-
}, entry.id))
|
|
3767
|
-
})
|
|
3768
|
-
]
|
|
3769
|
-
})
|
|
3770
|
-
]
|
|
4039
|
+
})]
|
|
4040
|
+
})
|
|
3771
4041
|
}),
|
|
4042
|
+
sidebarHistoryHost !== null && historyPanel !== null ? (0, react_dom.createPortal)(historyPanel, sidebarHistoryHost) : null,
|
|
3772
4043
|
libraryOpen ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TemplateLibrary, {
|
|
3773
4044
|
api,
|
|
3774
4045
|
onClose: () => {
|
|
@@ -4047,6 +4318,15 @@ window.__ModuleLoader__.load({
|
|
|
4047
4318
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
4048
4319
|
className: panel_module_css_default.lightboxActions,
|
|
4049
4320
|
children: [
|
|
4321
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4322
|
+
type: "button",
|
|
4323
|
+
className: panel_module_css_default.lightboxEdit,
|
|
4324
|
+
disabled: addingToConversation !== null,
|
|
4325
|
+
onClick: () => {
|
|
4326
|
+
addImageToConversation(previewImage, preview.index);
|
|
4327
|
+
},
|
|
4328
|
+
children: addingToConversation === preview.index ? tt("conversation.adding") : tt("conversation.add")
|
|
4329
|
+
}),
|
|
4050
4330
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4051
4331
|
type: "button",
|
|
4052
4332
|
className: panel_module_css_default.lightboxEdit,
|
|
@@ -4096,6 +4376,22 @@ window.__ModuleLoader__.load({
|
|
|
4096
4376
|
rx: "1.5"
|
|
4097
4377
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M8 5.8v4.4M5.8 8h4.4" })]
|
|
4098
4378
|
}), galleryMessage]
|
|
4379
|
+
}) : null,
|
|
4380
|
+
conversationMessage !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4381
|
+
className: panel_module_css_default.conversationToast,
|
|
4382
|
+
role: "status",
|
|
4383
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
4384
|
+
viewBox: "0 0 16 16",
|
|
4385
|
+
width: "14",
|
|
4386
|
+
height: "14",
|
|
4387
|
+
fill: "none",
|
|
4388
|
+
stroke: "currentColor",
|
|
4389
|
+
strokeWidth: "1.5",
|
|
4390
|
+
strokeLinecap: "round",
|
|
4391
|
+
strokeLinejoin: "round",
|
|
4392
|
+
"aria-hidden": "true",
|
|
4393
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M3 4.5h10v7H3z" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M5.5 2.5h5M8 6v4M6 8h4" })]
|
|
4394
|
+
}), conversationMessage]
|
|
4099
4395
|
}) : null
|
|
4100
4396
|
]
|
|
4101
4397
|
});
|
|
@@ -4111,24 +4407,11 @@ window.__ModuleLoader__.load({
|
|
|
4111
4407
|
}
|
|
4112
4408
|
//#endregion
|
|
4113
4409
|
//#region src/client/mount.tsx
|
|
4114
|
-
/**
|
|
4115
|
-
* Panel view mounting.
|
|
4116
|
-
*
|
|
4117
|
-
* The `conversation` slot is single-occupant (ui-conversation) and external
|
|
4118
|
-
* plugins cannot declare slots, so the panel takes over the center column at
|
|
4119
|
-
* the DOM level: a container is appended inside the conversation grid item
|
|
4120
|
-
* (an extra trailing child React never manages), and a stylesheet rule hides
|
|
4121
|
-
* the conversation content while the panel is active. Toggling is a data
|
|
4122
|
-
* attribute on <html> — no React involvement, so the conversation subtree
|
|
4123
|
-
* underneath stays mounted and stateful.
|
|
4124
|
-
*
|
|
4125
|
-
* Shell compatibility: the center column is `[data-pane="conversation"]` on
|
|
4126
|
-
* legacy shells and `[class*="centerCol"]` on the rc.6+ AppFrame layout (the
|
|
4127
|
-
* same dual selector the dsh-ssh / task-board panels use); both are queried
|
|
4128
|
-
* and both get the `position: relative` base in panel.module.css.
|
|
4129
|
-
*/
|
|
4130
4410
|
const CONVERSATION_COLUMN_SELECTOR = "[data-pane=\"conversation\"], [class*=\"centerCol\"]";
|
|
4131
4411
|
const ACTIVE_ATTR = "data-dsh-imagegen-active";
|
|
4412
|
+
const RESIZER_SELECTOR = "[data-dsh-imagegen-chat-resizer]";
|
|
4413
|
+
const CHAT_WIDTH_STORAGE_KEY = "dsh-imagegen:chat-width";
|
|
4414
|
+
const CHAT_MIN_WIDTH = 320;
|
|
4132
4415
|
/** Sibling panels' activation attributes, removed when this panel opens. */
|
|
4133
4416
|
const OTHER_ACTIVE_ATTRS = ["data-dsh-taskboard-active", "data-dsh-ssh-active"];
|
|
4134
4417
|
/** Cross-plugin activation event; detail is the activating panel name. */
|
|
@@ -4138,6 +4421,73 @@ window.__ModuleLoader__.load({
|
|
|
4138
4421
|
function conversationColumn() {
|
|
4139
4422
|
return document.querySelector(CONVERSATION_COLUMN_SELECTOR) ?? void 0;
|
|
4140
4423
|
}
|
|
4424
|
+
function readChatWidth() {
|
|
4425
|
+
try {
|
|
4426
|
+
const raw = window.localStorage.getItem(CHAT_WIDTH_STORAGE_KEY);
|
|
4427
|
+
if (raw === null) return void 0;
|
|
4428
|
+
const value = Number(raw);
|
|
4429
|
+
return Number.isFinite(value) && value >= CHAT_MIN_WIDTH ? value : void 0;
|
|
4430
|
+
} catch {
|
|
4431
|
+
return;
|
|
4432
|
+
}
|
|
4433
|
+
}
|
|
4434
|
+
function writeChatWidth(value) {
|
|
4435
|
+
try {
|
|
4436
|
+
window.localStorage.setItem(CHAT_WIDTH_STORAGE_KEY, String(Math.round(value)));
|
|
4437
|
+
} catch {}
|
|
4438
|
+
}
|
|
4439
|
+
function applyChatWidth(column, clientX) {
|
|
4440
|
+
const bounds = column.getBoundingClientRect();
|
|
4441
|
+
const max = Math.max(CHAT_MIN_WIDTH, bounds.width * .7);
|
|
4442
|
+
const width = Math.min(max, Math.max(CHAT_MIN_WIDTH, bounds.right - clientX));
|
|
4443
|
+
column.style.setProperty("--dsh-imagegen-chat-width", `${Math.round(width)}px`);
|
|
4444
|
+
writeChatWidth(width);
|
|
4445
|
+
}
|
|
4446
|
+
/** Create the visible handle that separates the image workspace and chat. */
|
|
4447
|
+
function createChatResizer(column) {
|
|
4448
|
+
const resizer = document.createElement("div");
|
|
4449
|
+
resizer.dataset.dshImagegenChatResizer = "";
|
|
4450
|
+
resizer.className = panel_module_css_default.chatResizer;
|
|
4451
|
+
resizer.setAttribute("role", "separator");
|
|
4452
|
+
resizer.setAttribute("aria-orientation", "vertical");
|
|
4453
|
+
resizer.setAttribute("aria-label", "调整对话区域宽度");
|
|
4454
|
+
resizer.tabIndex = 0;
|
|
4455
|
+
const saved = readChatWidth();
|
|
4456
|
+
if (saved !== void 0) column.style.setProperty("--dsh-imagegen-chat-width", `${saved}px`);
|
|
4457
|
+
const onPointerDown = (event) => {
|
|
4458
|
+
if (event.button !== 0) return;
|
|
4459
|
+
event.preventDefault();
|
|
4460
|
+
resizer.setPointerCapture?.(event.pointerId);
|
|
4461
|
+
const onMove = (move) => {
|
|
4462
|
+
applyChatWidth(column, move.clientX);
|
|
4463
|
+
};
|
|
4464
|
+
const onUp = () => {
|
|
4465
|
+
window.removeEventListener("pointermove", onMove);
|
|
4466
|
+
window.removeEventListener("pointerup", onUp);
|
|
4467
|
+
window.removeEventListener("pointercancel", onUp);
|
|
4468
|
+
resizer.releasePointerCapture?.(event.pointerId);
|
|
4469
|
+
document.documentElement.style.removeProperty("cursor");
|
|
4470
|
+
document.documentElement.style.removeProperty("user-select");
|
|
4471
|
+
};
|
|
4472
|
+
window.addEventListener("pointermove", onMove);
|
|
4473
|
+
window.addEventListener("pointerup", onUp);
|
|
4474
|
+
window.addEventListener("pointercancel", onUp);
|
|
4475
|
+
document.documentElement.style.setProperty("cursor", "col-resize");
|
|
4476
|
+
document.documentElement.style.setProperty("user-select", "none");
|
|
4477
|
+
};
|
|
4478
|
+
const onKeyDown = (event) => {
|
|
4479
|
+
if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") return;
|
|
4480
|
+
event.preventDefault();
|
|
4481
|
+
const bounds = column.getBoundingClientRect();
|
|
4482
|
+
const current = column.style.getPropertyValue("--dsh-imagegen-chat-width");
|
|
4483
|
+
const currentWidth = Number.parseFloat(current) || bounds.width * .36;
|
|
4484
|
+
const delta = event.key === "ArrowLeft" ? -24 : 24;
|
|
4485
|
+
applyChatWidth(column, bounds.right - currentWidth - delta);
|
|
4486
|
+
};
|
|
4487
|
+
resizer.addEventListener("pointerdown", onPointerDown);
|
|
4488
|
+
resizer.addEventListener("keydown", onKeyDown);
|
|
4489
|
+
return resizer;
|
|
4490
|
+
}
|
|
4141
4491
|
/**
|
|
4142
4492
|
* Mount the panel React tree into the center column and bind its visibility
|
|
4143
4493
|
* to the controller's panelOpen state.
|
|
@@ -4146,9 +4496,10 @@ window.__ModuleLoader__.load({
|
|
|
4146
4496
|
* @param scope - the settings scope (config status banner).
|
|
4147
4497
|
* @returns disposer unmounting the tree and restoring the column.
|
|
4148
4498
|
*/
|
|
4149
|
-
function mountPanel(controller, api, scope) {
|
|
4499
|
+
function mountPanel(controller, api, scope, services = {}) {
|
|
4150
4500
|
let root;
|
|
4151
4501
|
let container;
|
|
4502
|
+
let resizer;
|
|
4152
4503
|
const ensure = () => {
|
|
4153
4504
|
if (container !== void 0) {
|
|
4154
4505
|
if (container.isConnected) return;
|
|
@@ -4156,6 +4507,8 @@ window.__ModuleLoader__.load({
|
|
|
4156
4507
|
root = void 0;
|
|
4157
4508
|
container.remove();
|
|
4158
4509
|
container = void 0;
|
|
4510
|
+
resizer?.remove();
|
|
4511
|
+
resizer = void 0;
|
|
4159
4512
|
}
|
|
4160
4513
|
const column = conversationColumn();
|
|
4161
4514
|
if (column === void 0) return;
|
|
@@ -4166,8 +4519,11 @@ window.__ModuleLoader__.load({
|
|
|
4166
4519
|
root = (0, react_dom_client.createRoot)(container);
|
|
4167
4520
|
root.render(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ImageGenPanel, {
|
|
4168
4521
|
api,
|
|
4169
|
-
scope
|
|
4522
|
+
scope,
|
|
4523
|
+
...services
|
|
4170
4524
|
}));
|
|
4525
|
+
resizer = column.querySelector(RESIZER_SELECTOR) ?? createChatResizer(column);
|
|
4526
|
+
if (resizer.parentElement !== column) column.appendChild(resizer);
|
|
4171
4527
|
};
|
|
4172
4528
|
const waitObserver = new MutationObserver(() => {
|
|
4173
4529
|
ensure();
|
|
@@ -4209,110 +4565,150 @@ window.__ModuleLoader__.load({
|
|
|
4209
4565
|
root = void 0;
|
|
4210
4566
|
container?.remove();
|
|
4211
4567
|
container = void 0;
|
|
4568
|
+
resizer?.remove();
|
|
4569
|
+
resizer = void 0;
|
|
4212
4570
|
};
|
|
4213
4571
|
}
|
|
4214
4572
|
//#endregion
|
|
4215
4573
|
//#region src/client/sidebar-entry.ts
|
|
4216
|
-
/**
|
|
4217
|
-
const
|
|
4218
|
-
/**
|
|
4574
|
+
/** Stable selector for the injected two-tab host. */
|
|
4575
|
+
const ENTRY_SELECTOR = "[data-dsh-imagegen-session-tabs]";
|
|
4576
|
+
/** Stable selector for the history surface in the shell region area. */
|
|
4577
|
+
const HISTORY_HOST_SELECTOR = "[data-dsh-imagegen-history-host]";
|
|
4578
|
+
/** Inline picture glyph kept deliberately small for the sidebar rail. */
|
|
4579
|
+
const IMAGE_ICON = "<svg viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"2\" y=\"2.5\" width=\"12\" height=\"11\" rx=\"1.5\"/><circle cx=\"5.6\" cy=\"5.8\" r=\"1\"/><path d=\"M2.5 12.5l3.6-3.4 2.4 2.2 3-3 2 2.4\"/></svg>";
|
|
4580
|
+
/** Inline plus glyph for the new-session tab. */
|
|
4581
|
+
const NEW_SESSION_ICON = "<svg viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M8 3v10M3 8h10\"/></svg>";
|
|
4582
|
+
/** Find the sidebar shell root, or undefined while it is not mounted. */
|
|
4219
4583
|
function sidebarRoot() {
|
|
4220
4584
|
const column = document.querySelector("[data-pane=\"sidebar\"], [class*=\"sidebarCol\"]");
|
|
4221
4585
|
if (column === null) return void 0;
|
|
4222
4586
|
return column.querySelector("[class*=\"logoRow\"]")?.parentElement ?? column.firstElementChild;
|
|
4223
4587
|
}
|
|
4224
|
-
/** The New Session button
|
|
4588
|
+
/** The shell-owned New Session button across current and legacy shells. */
|
|
4225
4589
|
function newSessionButton(root) {
|
|
4226
|
-
|
|
4227
|
-
if (nested !== null) return nested;
|
|
4228
|
-
for (const child of root.children) if (child.tagName === "BUTTON") return child;
|
|
4590
|
+
return root.querySelector("button[data-dsh-part=\"new-session\"], button[class*=\"newSession\"]") ?? Array.from(root.children).find((child) => child instanceof HTMLElement && child.tagName === "BUTTON");
|
|
4229
4591
|
}
|
|
4230
|
-
/**
|
|
4231
|
-
function
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
return
|
|
4592
|
+
/** Locate the shell region that normally contains workspaces and sessions. */
|
|
4593
|
+
function regionArea(root) {
|
|
4594
|
+
return root.querySelector("[class*=\"regionArea\"]") ?? void 0;
|
|
4595
|
+
}
|
|
4596
|
+
function makeTab(label, tooltip, icon, onClick) {
|
|
4597
|
+
const tab = document.createElement("button");
|
|
4598
|
+
tab.type = "button";
|
|
4599
|
+
tab.className = panel_module_css_default.sessionTab;
|
|
4600
|
+
tab.setAttribute("aria-label", label);
|
|
4601
|
+
tab.setAttribute("title", tooltip);
|
|
4602
|
+
tab.innerHTML = `<span class="${panel_module_css_default.sessionTabIcon}">${icon}</span><span class="${panel_module_css_default.sessionTabLabel}">${label}</span>`;
|
|
4603
|
+
tab.addEventListener("click", onClick);
|
|
4604
|
+
return tab;
|
|
4243
4605
|
}
|
|
4244
|
-
|
|
4245
|
-
|
|
4606
|
+
function hideShellButton(button) {
|
|
4607
|
+
button.dataset.dshImagegenOriginal = "";
|
|
4608
|
+
button.setAttribute("aria-hidden", "true");
|
|
4609
|
+
button.tabIndex = -1;
|
|
4610
|
+
button.style.display = "none";
|
|
4611
|
+
}
|
|
4612
|
+
function restoreShellButton(button) {
|
|
4613
|
+
button.style.removeProperty("display");
|
|
4614
|
+
button.removeAttribute("aria-hidden");
|
|
4615
|
+
button.removeAttribute("tabindex");
|
|
4616
|
+
delete button.dataset.dshImagegenOriginal;
|
|
4617
|
+
}
|
|
4618
|
+
/** Mount or repair the two-tab host at the shell's New Session position. */
|
|
4619
|
+
function placeTabs(root, controller, newSessionLabel, newSessionTooltip, imageLabel, imageTooltip) {
|
|
4246
4620
|
const button = newSessionButton(root);
|
|
4247
|
-
if (button === void 0) return
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
const anchor = family.length > 0 ? family[family.length - 1].nextElementSibling : base.nextElementSibling;
|
|
4253
|
-
root.insertBefore(entry, anchor);
|
|
4621
|
+
if (button === void 0) return void 0;
|
|
4622
|
+
const existing = root.querySelector(ENTRY_SELECTOR);
|
|
4623
|
+
if (existing !== null && existing.parentElement === button.parentElement) {
|
|
4624
|
+
hideShellButton(button);
|
|
4625
|
+
return existing;
|
|
4254
4626
|
}
|
|
4255
|
-
|
|
4627
|
+
existing?.remove();
|
|
4628
|
+
const tabs = document.createElement("div");
|
|
4629
|
+
tabs.dataset.dshImagegenSessionTabs = "";
|
|
4630
|
+
tabs.className = panel_module_css_default.sessionTabs;
|
|
4631
|
+
tabs.setAttribute("role", "tablist");
|
|
4632
|
+
tabs.setAttribute("aria-label", imageTooltip);
|
|
4633
|
+
const newSessionTab = makeTab(newSessionLabel, newSessionTooltip, NEW_SESSION_ICON, () => {
|
|
4634
|
+
controller.close();
|
|
4635
|
+
button.click();
|
|
4636
|
+
});
|
|
4637
|
+
const imageTab = makeTab(imageLabel, imageTooltip, IMAGE_ICON, () => {
|
|
4638
|
+
controller.open();
|
|
4639
|
+
});
|
|
4640
|
+
newSessionTab.dataset.dshImagegenTab = "new-session";
|
|
4641
|
+
imageTab.dataset.dshImagegenTab = "image";
|
|
4642
|
+
tabs.append(newSessionTab, imageTab);
|
|
4643
|
+
button.parentElement?.insertBefore(tabs, button);
|
|
4644
|
+
hideShellButton(button);
|
|
4645
|
+
return tabs;
|
|
4646
|
+
}
|
|
4647
|
+
/** Mount an overlay host over the workspace/session tree for image history. */
|
|
4648
|
+
function placeHistoryHost(root) {
|
|
4649
|
+
const region = regionArea(root);
|
|
4650
|
+
if (region === void 0) return void 0;
|
|
4651
|
+
const existing = region.querySelector(HISTORY_HOST_SELECTOR);
|
|
4652
|
+
if (existing !== null) return existing;
|
|
4653
|
+
const host = document.createElement("div");
|
|
4654
|
+
host.dataset.dshImagegenHistoryHost = "";
|
|
4655
|
+
host.className = panel_module_css_default.sidebarHistoryHost;
|
|
4656
|
+
region.append(host);
|
|
4657
|
+
return host;
|
|
4256
4658
|
}
|
|
4257
4659
|
/**
|
|
4258
|
-
* Mount the
|
|
4259
|
-
*
|
|
4260
|
-
*
|
|
4261
|
-
* @param label - the entry label (localized).
|
|
4262
|
-
* @param tooltip - the entry tooltip (localized).
|
|
4263
|
-
* @returns disposer removing the entry and its observers.
|
|
4660
|
+
* Mount the two tabs and self-heal after React rebuilds the sidebar. The
|
|
4661
|
+
* shell-owned button is restored by the disposer so unloading the plugin
|
|
4662
|
+
* leaves the host unchanged.
|
|
4264
4663
|
*/
|
|
4265
|
-
function mountSidebarEntry(controller,
|
|
4266
|
-
const entry = createEntry(controller, label, tooltip);
|
|
4664
|
+
function mountSidebarEntry(controller, newSessionLabel, newSessionTooltip, imageLabel, imageTooltip) {
|
|
4267
4665
|
let root;
|
|
4268
|
-
let
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4666
|
+
let tabs;
|
|
4667
|
+
let historyHost;
|
|
4668
|
+
let originalButton;
|
|
4669
|
+
const syncActive = () => {
|
|
4670
|
+
if (tabs === void 0) return;
|
|
4671
|
+
const newTab = tabs.querySelector("[data-dsh-imagegen-tab=\"new-session\"]");
|
|
4672
|
+
const imageTab = tabs.querySelector("[data-dsh-imagegen-tab=\"image\"]");
|
|
4673
|
+
if (controller.getSnapshot().panelOpen) {
|
|
4674
|
+
if (newTab !== null) delete newTab.dataset.active;
|
|
4675
|
+
if (imageTab !== null) imageTab.dataset.active = "";
|
|
4676
|
+
} else {
|
|
4677
|
+
if (newTab !== null) newTab.dataset.active = "";
|
|
4678
|
+
if (imageTab !== null) delete imageTab.dataset.active;
|
|
4274
4679
|
}
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4680
|
+
};
|
|
4681
|
+
const ensure = () => {
|
|
4682
|
+
if (root !== void 0 && !root.isConnected) {
|
|
4278
4683
|
root = void 0;
|
|
4279
|
-
|
|
4684
|
+
tabs = void 0;
|
|
4685
|
+
historyHost = void 0;
|
|
4686
|
+
originalButton = void 0;
|
|
4280
4687
|
}
|
|
4281
4688
|
root ??= sidebarRoot();
|
|
4282
4689
|
if (root === void 0) return;
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4690
|
+
root.dataset.dshImagegenSidebarRoot = "";
|
|
4691
|
+
const button = newSessionButton(root);
|
|
4692
|
+
if (button === void 0) return;
|
|
4693
|
+
originalButton ??= button;
|
|
4694
|
+
tabs = placeTabs(root, controller, newSessionLabel, newSessionTooltip, imageLabel, imageTooltip);
|
|
4695
|
+
historyHost = placeHistoryHost(root);
|
|
4696
|
+
syncActive();
|
|
4288
4697
|
};
|
|
4289
|
-
const
|
|
4290
|
-
|
|
4291
|
-
});
|
|
4292
|
-
waitObserver.observe(document.body, {
|
|
4698
|
+
const bodyObserver = new MutationObserver(ensure);
|
|
4699
|
+
bodyObserver.observe(document.body, {
|
|
4293
4700
|
childList: true,
|
|
4294
4701
|
subtree: true
|
|
4295
4702
|
});
|
|
4296
|
-
const rootObserver = new MutationObserver(() => {
|
|
4297
|
-
if (root === void 0 || !root.isConnected) {
|
|
4298
|
-
placed = false;
|
|
4299
|
-
tryPlace();
|
|
4300
|
-
return;
|
|
4301
|
-
}
|
|
4302
|
-
if (!root.contains(entry)) placed = placeEntry(root, entry);
|
|
4303
|
-
});
|
|
4304
|
-
const syncActive = () => {
|
|
4305
|
-
if (controller.getSnapshot().panelOpen) entry.dataset.active = "true";
|
|
4306
|
-
else delete entry.dataset.active;
|
|
4307
|
-
};
|
|
4308
4703
|
const unsubscribe = controller.subscribe(syncActive);
|
|
4309
|
-
|
|
4310
|
-
tryPlace();
|
|
4704
|
+
ensure();
|
|
4311
4705
|
return () => {
|
|
4312
|
-
|
|
4313
|
-
rootObserver.disconnect();
|
|
4706
|
+
bodyObserver.disconnect();
|
|
4314
4707
|
unsubscribe();
|
|
4315
|
-
|
|
4708
|
+
tabs?.remove();
|
|
4709
|
+
historyHost?.remove();
|
|
4710
|
+
if (originalButton !== void 0 && originalButton.isConnected) restoreShellButton(originalButton);
|
|
4711
|
+
if (root !== void 0) delete root.dataset.dshImagegenSidebarRoot;
|
|
4316
4712
|
};
|
|
4317
4713
|
}
|
|
4318
4714
|
//#endregion
|
|
@@ -4804,102 +5200,8 @@ window.__ModuleLoader__.load({
|
|
|
4804
5200
|
return Array.isArray(view?.channels) ? view.channels : [];
|
|
4805
5201
|
}
|
|
4806
5202
|
//#endregion
|
|
4807
|
-
//#region src
|
|
4808
|
-
const ENTRIES = {
|
|
4809
|
-
"gpt-image": {
|
|
4810
|
-
label: "gpt-image",
|
|
4811
|
-
labelZh: "GPT 图像",
|
|
4812
|
-
known: true,
|
|
4813
|
-
supportsEdit: true,
|
|
4814
|
-
supportsAspectRatio: false,
|
|
4815
|
-
qualityTiers: [
|
|
4816
|
-
"1K",
|
|
4817
|
-
"2K",
|
|
4818
|
-
"4K"
|
|
4819
|
-
]
|
|
4820
|
-
},
|
|
4821
|
-
"dall-e": {
|
|
4822
|
-
label: "DALL·E",
|
|
4823
|
-
labelZh: "DALL·E",
|
|
4824
|
-
known: true,
|
|
4825
|
-
supportsEdit: true,
|
|
4826
|
-
supportsAspectRatio: false,
|
|
4827
|
-
qualityTiers: ["auto"]
|
|
4828
|
-
},
|
|
4829
|
-
grok: {
|
|
4830
|
-
label: "grok",
|
|
4831
|
-
labelZh: "Grok",
|
|
4832
|
-
known: true,
|
|
4833
|
-
supportsEdit: true,
|
|
4834
|
-
supportsAspectRatio: true,
|
|
4835
|
-
qualityTiers: ["1K", "2K"]
|
|
4836
|
-
},
|
|
4837
|
-
nanobanana: {
|
|
4838
|
-
label: "nanobanana",
|
|
4839
|
-
labelZh: "Nano Banana",
|
|
4840
|
-
known: true,
|
|
4841
|
-
supportsEdit: true,
|
|
4842
|
-
supportsAspectRatio: true,
|
|
4843
|
-
qualityTiers: [
|
|
4844
|
-
"1K",
|
|
4845
|
-
"2K",
|
|
4846
|
-
"4K"
|
|
4847
|
-
]
|
|
4848
|
-
},
|
|
4849
|
-
seedream: {
|
|
4850
|
-
label: "seedream",
|
|
4851
|
-
labelZh: "Seedream",
|
|
4852
|
-
known: true,
|
|
4853
|
-
supportsEdit: true,
|
|
4854
|
-
supportsAspectRatio: true,
|
|
4855
|
-
qualityTiers: ["1K", "2K"]
|
|
4856
|
-
}
|
|
4857
|
-
};
|
|
4858
|
-
/** Official Gemini image ids served by Nano Banana gateways. */
|
|
4859
|
-
const NANOBANANA_GEMINI_IDS = /* @__PURE__ */ new Set([
|
|
4860
|
-
"gemini-3-pro-image",
|
|
4861
|
-
"gemini-3-pro-image-preview",
|
|
4862
|
-
"gemini-3.1-flash-image",
|
|
4863
|
-
"gemini-3.1-flash-image-preview",
|
|
4864
|
-
"gemini-3.1-flash-lite-image",
|
|
4865
|
-
"gemini-2.5-flash-image"
|
|
4866
|
-
]);
|
|
4867
|
-
/** Classify one upstream model id into its request-shaping family. */
|
|
4868
|
-
function describeModel(model) {
|
|
4869
|
-
const id = model.trim();
|
|
4870
|
-
if (/^gpt-image/i.test(id)) return {
|
|
4871
|
-
family: "gpt-image",
|
|
4872
|
-
...ENTRIES["gpt-image"]
|
|
4873
|
-
};
|
|
4874
|
-
if (/^dall-e/i.test(id)) return {
|
|
4875
|
-
family: "dall-e",
|
|
4876
|
-
...ENTRIES["dall-e"]
|
|
4877
|
-
};
|
|
4878
|
-
if (/^grok-imagine(?:-|$)/.test(id)) return {
|
|
4879
|
-
family: "grok",
|
|
4880
|
-
...ENTRIES.grok
|
|
4881
|
-
};
|
|
4882
|
-
if (/^nanobanana/i.test(id) || NANOBANANA_GEMINI_IDS.has(id)) return {
|
|
4883
|
-
family: "nanobanana",
|
|
4884
|
-
...ENTRIES.nanobanana
|
|
4885
|
-
};
|
|
4886
|
-
if (/^(?:doubao-)?seedream/i.test(id)) return {
|
|
4887
|
-
family: "seedream",
|
|
4888
|
-
...ENTRIES.seedream
|
|
4889
|
-
};
|
|
4890
|
-
return {
|
|
4891
|
-
family: "unknown",
|
|
4892
|
-
label: "unknown",
|
|
4893
|
-
labelZh: "未知协议",
|
|
4894
|
-
known: false,
|
|
4895
|
-
supportsEdit: true,
|
|
4896
|
-
supportsAspectRatio: false,
|
|
4897
|
-
qualityTiers: []
|
|
4898
|
-
};
|
|
4899
|
-
}
|
|
4900
|
-
//#endregion
|
|
4901
|
-
//#region \0dsh-css:E:\dsh-plugin\src\client\settings-card.module.css.mjs
|
|
4902
|
-
const css$1 = ".i1cc5G_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}.i1cc5G_card:hover{border-color:var(--dsw-alias-label-dimmed)}.i1cc5G_card:has(.i1cc5G_body){background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}.i1cc5G_header{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.i1cc5G_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.i1cc5G_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.i1cc5G_name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.i1cc5G_description{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}.i1cc5G_chevron,.i1cc5G_chevronOpen{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}.i1cc5G_chevronOpen{transform:rotate(180deg)}.i1cc5G_pending{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.i1cc5G_body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}.i1cc5G_versionRow{border-bottom:1px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:12px;padding:12px 0;display:flex}.i1cc5G_versionLabel{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:1.5}.i1cc5G_versionValue{background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);font-family:var(--dsw-font-family-mono,monospace);border-radius:999px;padding:1px 8px;font-size:12px;line-height:1.5}.i1cc5G_field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.i1cc5G_field+.i1cc5G_field{border-top:1px solid var(--dsw-alias-border-l2)}.i1cc5G_head{align-items:center;gap:8px;display:flex}.i1cc5G_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.i1cc5G_badges{align-items:center;gap:8px;display:inline-flex}.i1cc5G_badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.i1cc5G_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.i1cc5G_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.i1cc5G_reset:disabled{cursor:default;opacity:.5}.i1cc5G_input,.i1cc5G_select{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;outline:none;padding:0 12px;font-size:13px;line-height:1.5}.i1cc5G_input:focus-visible,.i1cc5G_select:focus-visible{border-color:var(--dsw-alias-brand-primary)}.i1cc5G_input:disabled,.i1cc5G_select:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.i1cc5G_inputInvalid{border:1px solid var(--dsw-alias-label-error);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;outline:none;padding:0 12px;font-size:13px;line-height:1.5}.i1cc5G_textarea,.i1cc5G_textareaInvalid{resize:vertical;background:var(--dsw-alias-bg-layer-3);min-height:70px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;outline:none;padding:8px 12px;font-size:13px;line-height:1.5}.i1cc5G_textarea{border:1px solid var(--dsw-alias-border-l2)}.i1cc5G_textareaInvalid{border:1px solid var(--dsw-alias-label-error)}.i1cc5G_textarea:focus-visible{border-color:var(--dsw-alias-brand-primary)}.i1cc5G_textarea:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.i1cc5G_hint,.i1cc5G_invalid{margin:0;font-size:12px;line-height:1.5}.i1cc5G_hint{color:var(--dsw-alias-label-tertiary)}.i1cc5G_invalid{color:var(--dsw-alias-label-error)}.i1cc5G_readOnly,.i1cc5G_notExposed{color:var(--dsw-alias-label-tertiary);margin:12px 0 0;font-size:12px;line-height:1.5}.i1cc5G_sectionDivider{background:var(--dsw-alias-border-l2);height:1px;margin:18px 0 14px}.i1cc5G_sectionTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:14px;line-height:1.4}.i1cc5G_sectionHint{color:var(--dsw-alias-label-tertiary);margin:-4px 0 2px;font-size:12px;line-height:1.5}.i1cc5G_modelSection{padding:2px 0 14px}.i1cc5G_sectionHeader{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.i1cc5G_sectionHeader .i1cc5G_sectionHint{max-width:430px}.i1cc5G_modelSummary{flex-wrap:wrap;align-items:center;gap:6px;margin-top:12px;display:flex}.i1cc5G_modelChip{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);max-width:100%;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family-mono,monospace);border-radius:6px;align-items:center;gap:5px;padding:3px 5px 3px 8px;font-size:12px;line-height:1.5;display:inline-flex}.i1cc5G_modelChip>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.i1cc5G_modelChip button{appearance:none;width:18px;height:18px;color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:0;border-radius:4px;padding:0;line-height:18px}.i1cc5G_modelChip button:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform)}.i1cc5G_modelChip button:disabled{cursor:default;opacity:.45}.i1cc5G_addModel{appearance:none;border:1px dashed var(--dsw-alias-border-l2);min-height:28px;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border-radius:6px;padding:0 9px;font-size:12px}.i1cc5G_addModel:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.i1cc5G_addModel:disabled{opacity:.45;cursor:default}.i1cc5G_manualModelRow{gap:8px;margin-top:10px;display:flex}.i1cc5G_manualModelRow .i1cc5G_input{flex:1;min-width:0}.i1cc5G_disclosure{appearance:none;border:0;border-top:1px solid var(--dsw-alias-border-l2);width:100%;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;align-items:center;gap:8px;padding:13px 0;font-size:13px;font-weight:500;display:flex}.i1cc5G_disclosure>span:nth-child(2){color:var(--dsw-alias-label-tertiary);margin-left:auto;font-size:12px;font-weight:400}.i1cc5G_disclosure>span:last-child{color:var(--dsw-alias-label-tertiary)}.i1cc5G_disclosure:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.i1cc5G_optionalContent{padding:0 0 8px}.i1cc5G_inlineDisclosure{appearance:none;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border:0;align-items:center;gap:6px;margin-top:12px;padding:0;font-size:12px;display:inline-flex}.i1cc5G_inlineDisclosure:hover{color:var(--dsw-alias-label-primary)}.i1cc5G_modelFetchRow{align-items:center;gap:8px;display:flex}.i1cc5G_modelFetch,.i1cc5G_modelChoices{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);min-height:32px;color:var(--dsw-alias-label-secondary);font:inherit;border-radius:7px;font-size:12px}.i1cc5G_modelFetch{cursor:pointer;padding:0 10px}.i1cc5G_modelFetch:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.i1cc5G_modelFetch:disabled{opacity:.5;cursor:default}.i1cc5G_modelChoices{flex:1;min-width:0;padding:0 8px}.i1cc5G_modelCandidateList{flex-wrap:wrap;gap:6px 10px;margin-top:10px;display:flex}.i1cc5G_modelCandidateLabel{width:100%;color:var(--dsw-alias-label-tertiary);font-size:12px}.i1cc5G_modelCandidate{appearance:none;min-width:0;color:var(--dsw-alias-label-secondary);cursor:pointer;background:var(--dsw-alias-bg-layer-3);font-size:12px;line-height:1.5;font:inherit;border:1px solid #0000;border-radius:5px;align-items:center;gap:5px;padding:3px 6px;display:inline-flex}.i1cc5G_modelCandidate input{margin:0}.i1cc5G_modelCandidate[data-selected]{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary)}.i1cc5G_footer{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;display:flex}.i1cc5G_failed{min-width:0;color:var(--dsw-alias-label-error);flex:1;margin:0;font-size:12px;line-height:1.5}.i1cc5G_discard,.i1cc5G_save{appearance:none;font:inherit;cursor:pointer;border:1px solid #0000;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5}.i1cc5G_discard{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}.i1cc5G_discard:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.i1cc5G_save{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}.i1cc5G_discard:disabled,.i1cc5G_save:disabled{opacity:.4;cursor:default}.i1cc5G_discard:focus-visible,.i1cc5G_save:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}@media (prefers-reduced-motion:reduce){.i1cc5G_card,.i1cc5G_chevron,.i1cc5G_chevronOpen{transition:none}}.i1cc5G_channelSection{padding:6px 0 2px}.i1cc5G_channelEmpty{color:var(--dsw-alias-label-tertiary);margin:10px 0 0;font-size:12px;line-height:1.5}.i1cc5G_channelList{flex-direction:column;gap:6px;margin:10px 0 0;padding:0;list-style:none;display:flex}.i1cc5G_channelRow{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:10px;align-items:center;gap:10px;padding:8px 10px;display:flex}.i1cc5G_channelRow[data-action]{flex-wrap:wrap}.i1cc5G_channelDotReady,.i1cc5G_channelDotWarn{border-radius:50%;flex:none;width:9px;height:9px}.i1cc5G_channelDotReady{background:var(--dsw-color-success,#2fbf71)}.i1cc5G_channelDotWarn{background:var(--dsw-color-danger,#e5484d)}.i1cc5G_channelMain{appearance:none;min-width:0;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;flex-direction:column;flex:1;gap:3px;padding:0;display:flex}.i1cc5G_channelName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600;line-height:1.4;overflow:hidden}.i1cc5G_channelMeta{flex-wrap:wrap;align-items:center;gap:4px 8px;display:flex}.i1cc5G_channelHost{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.5;font-family:var(--dsw-font-family-mono,monospace);text-overflow:ellipsis;white-space:nowrap;max-width:180px;overflow:hidden}.i1cc5G_channelBadge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;padding:0 7px;font-size:11px;font-weight:500;line-height:17px}.i1cc5G_channelBadge[data-warn]{color:var(--dsw-alias-label-error)}.i1cc5G_channelBadge[data-default]{background:var(--dsw-alias-bg-module-poped,var(--dsw-alias-bg-module-platform));color:var(--dsw-alias-brand-primary)}.i1cc5G_channelAction{appearance:none;font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;padding:4px 8px;font-size:12px;line-height:1.5}.i1cc5G_channelAction:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform)}.i1cc5G_channelAction[data-danger]{color:var(--dsw-alias-label-error)}.i1cc5G_channelAction:disabled{opacity:.45;cursor:default}.i1cc5G_channelDanger{appearance:none;border:1px solid var(--dsw-alias-label-error);color:var(--dsw-alias-label-error);font:inherit;cursor:pointer;background:0 0;border-radius:6px;flex:none;padding:3px 10px;font-size:12px}.i1cc5G_channelDanger:hover:not(:disabled){background:color-mix(in srgb, var(--dsw-alias-label-error) 12%, transparent)}.i1cc5G_channelDanger:disabled{opacity:.45;cursor:default}.i1cc5G_deleteConfirmText{min-width:0;color:var(--dsw-alias-label-error);flex:1;font-size:12px;line-height:1.5}.i1cc5G_channelAddRow{gap:8px;margin-top:10px;display:flex}.i1cc5G_channelAdd{appearance:none;border:1px dashed var(--dsw-alias-border-l2);min-height:30px;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border-radius:8px;padding:0 12px;font-size:12px}.i1cc5G_channelAdd:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.i1cc5G_channelAdd:disabled{opacity:.45;cursor:default}.i1cc5G_spacer{flex:1}.i1cc5G_editorBackdrop{z-index:120;background:color-mix(in srgb, var(--dsw-alias-bg-layer-1,#000) 45%, transparent);justify-content:center;align-items:flex-start;padding:9vh 16px 16px;display:flex;position:fixed;inset:0}.i1cc5G_editorPanel{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:14px;width:min(560px,100%);max-height:82vh;padding:16px;overflow-y:auto;box-shadow:0 18px 50px #00000059}.i1cc5G_editorHeader{border-bottom:1px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:flex-start;gap:12px;padding-bottom:10px;display:flex}.i1cc5G_editorClose{appearance:none;width:26px;height:26px;color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;font-size:16px;line-height:26px}.i1cc5G_editorClose:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform)}.i1cc5G_editorField{flex-direction:column;gap:6px;padding:12px 0 0;display:flex}.i1cc5G_editorDivider{background:var(--dsw-alias-border-l2);height:1px;margin:14px 0 4px}.i1cc5G_editorSectionHeader{justify-content:space-between;align-items:center;gap:12px;padding:10px 0 4px;display:flex}.i1cc5G_editorSectionHeader .i1cc5G_label{flex:1}.i1cc5G_editorTools{flex-direction:column;gap:8px;margin-top:10px;display:flex}.i1cc5G_editorFooter{border-top:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding-top:12px;display:flex}.i1cc5G_detectOk{color:var(--dsw-color-success,var(--dsw-alias-label-secondary));margin:0;font-size:12px;line-height:1.5}.i1cc5G_modelRows{flex-direction:column;gap:8px;margin:8px 0 0;padding:0;list-style:none;display:flex}.i1cc5G_modelRow{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:10px;justify-content:space-between;align-items:center;gap:10px;padding:8px 10px;display:flex}.i1cc5G_modelRowInputs{flex:1;align-items:center;gap:6px;min-width:0;display:flex}.i1cc5G_modelRowInputs .i1cc5G_input{flex:1;min-width:0}.i1cc5G_modelArrow{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px}.i1cc5G_modelRowBadges{flex:none;align-items:center;gap:6px;display:flex}.i1cc5G_modelBadge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-tertiary);border-radius:999px;padding:0 7px;font-size:11px;line-height:17px}.i1cc5G_modelBadge[data-verified]{color:var(--dsw-color-success,var(--dsw-alias-label-secondary))}.i1cc5G_modelBadge[data-warn]{color:var(--dsw-alias-label-error)}.i1cc5G_modelRowRemove{appearance:none;width:20px;height:20px;color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:0;border-radius:4px;flex:none;padding:0;line-height:20px}.i1cc5G_modelRowRemove:hover:not(:disabled){color:var(--dsw-alias-label-error);background:var(--dsw-alias-bg-module-platform)}.i1cc5G_modelRowRemove:disabled{opacity:.45;cursor:default}.i1cc5G_modelCandidate>.i1cc5G_modelBadge{flex:none}.i1cc5G_channelControls{position:relative}.i1cc5G_presetInline{z-index:10;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:10px;width:min(420px,100vw - 48px);max-height:min(440px,60vh);margin:0;padding:12px;position:absolute;bottom:calc(100% + 8px);left:0;overflow-y:auto;box-shadow:0 12px 30px #0000004d}.i1cc5G_presetInlineHeader{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.i1cc5G_presetList{flex-direction:column;gap:8px;margin-top:12px;display:flex}.i1cc5G_presetRow{appearance:none;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;border-radius:10px;flex-direction:column;align-items:flex-start;gap:3px;padding:10px 12px;display:flex}.i1cc5G_presetRow:hover:not(:disabled){border-color:var(--dsw-alias-brand-primary)}.i1cc5G_presetRow[data-custom]{border-style:dashed}.i1cc5G_presetRow:disabled{opacity:.5;cursor:default}.i1cc5G_presetName{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:1.4}.i1cc5G_presetMeta{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.5;font-family:var(--dsw-font-family-mono,monospace)}.i1cc5G_presetHint{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.5}";
|
|
5203
|
+
//#region \0dsh-css:D:\learn\dsh\dsh-imagegen\src\client\settings-card.module.css.mjs
|
|
5204
|
+
const css$1 = ".lDRIuW_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}.lDRIuW_card:hover{border-color:var(--dsw-alias-label-dimmed)}.lDRIuW_card:has(.lDRIuW_body){background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}.lDRIuW_header{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.lDRIuW_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.lDRIuW_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.lDRIuW_name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.lDRIuW_description{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}.lDRIuW_chevron,.lDRIuW_chevronOpen{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}.lDRIuW_chevronOpen{transform:rotate(180deg)}.lDRIuW_pending{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.lDRIuW_body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}.lDRIuW_versionRow{border-bottom:1px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:12px;padding:12px 0;display:flex}.lDRIuW_versionLabel{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:1.5}.lDRIuW_versionValue{background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);font-family:var(--dsw-font-family-mono,monospace);border-radius:999px;padding:1px 8px;font-size:12px;line-height:1.5}.lDRIuW_field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.lDRIuW_field+.lDRIuW_field{border-top:1px solid var(--dsw-alias-border-l2)}.lDRIuW_head{align-items:center;gap:8px;display:flex}.lDRIuW_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.lDRIuW_badges{align-items:center;gap:8px;display:inline-flex}.lDRIuW_badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.lDRIuW_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.lDRIuW_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.lDRIuW_reset:disabled{cursor:default;opacity:.5}.lDRIuW_input,.lDRIuW_select{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;outline:none;padding:0 12px;font-size:13px;line-height:1.5}.lDRIuW_input:focus-visible,.lDRIuW_select:focus-visible{border-color:var(--dsw-alias-brand-primary)}.lDRIuW_input:disabled,.lDRIuW_select:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.lDRIuW_inputInvalid{border:1px solid var(--dsw-alias-label-error);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;outline:none;padding:0 12px;font-size:13px;line-height:1.5}.lDRIuW_textarea,.lDRIuW_textareaInvalid{resize:vertical;background:var(--dsw-alias-bg-layer-3);min-height:70px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;outline:none;padding:8px 12px;font-size:13px;line-height:1.5}.lDRIuW_textarea{border:1px solid var(--dsw-alias-border-l2)}.lDRIuW_textareaInvalid{border:1px solid var(--dsw-alias-label-error)}.lDRIuW_textarea:focus-visible{border-color:var(--dsw-alias-brand-primary)}.lDRIuW_textarea:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.lDRIuW_hint,.lDRIuW_invalid{margin:0;font-size:12px;line-height:1.5}.lDRIuW_hint{color:var(--dsw-alias-label-tertiary)}.lDRIuW_invalid{color:var(--dsw-alias-label-error)}.lDRIuW_readOnly,.lDRIuW_notExposed{color:var(--dsw-alias-label-tertiary);margin:12px 0 0;font-size:12px;line-height:1.5}.lDRIuW_sectionDivider{background:var(--dsw-alias-border-l2);height:1px;margin:18px 0 14px}.lDRIuW_sectionTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:14px;line-height:1.4}.lDRIuW_sectionHint{color:var(--dsw-alias-label-tertiary);margin:-4px 0 2px;font-size:12px;line-height:1.5}.lDRIuW_modelSection{padding:2px 0 14px}.lDRIuW_sectionHeader{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.lDRIuW_sectionHeader .lDRIuW_sectionHint{max-width:430px}.lDRIuW_modelSummary{flex-wrap:wrap;align-items:center;gap:6px;margin-top:12px;display:flex}.lDRIuW_modelChip{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);max-width:100%;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family-mono,monospace);border-radius:6px;align-items:center;gap:5px;padding:3px 5px 3px 8px;font-size:12px;line-height:1.5;display:inline-flex}.lDRIuW_modelChip>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.lDRIuW_modelChip button{appearance:none;width:18px;height:18px;color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:0;border-radius:4px;padding:0;line-height:18px}.lDRIuW_modelChip button:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform)}.lDRIuW_modelChip button:disabled{cursor:default;opacity:.45}.lDRIuW_addModel{appearance:none;border:1px dashed var(--dsw-alias-border-l2);min-height:28px;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border-radius:6px;padding:0 9px;font-size:12px}.lDRIuW_addModel:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.lDRIuW_addModel:disabled{opacity:.45;cursor:default}.lDRIuW_manualModelRow{gap:8px;margin-top:10px;display:flex}.lDRIuW_manualModelRow .lDRIuW_input{flex:1;min-width:0}.lDRIuW_disclosure{appearance:none;border:0;border-top:1px solid var(--dsw-alias-border-l2);width:100%;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;align-items:center;gap:8px;padding:13px 0;font-size:13px;font-weight:500;display:flex}.lDRIuW_disclosure>span:nth-child(2){color:var(--dsw-alias-label-tertiary);margin-left:auto;font-size:12px;font-weight:400}.lDRIuW_disclosure>span:last-child{color:var(--dsw-alias-label-tertiary)}.lDRIuW_disclosure:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.lDRIuW_optionalContent{padding:0 0 8px}.lDRIuW_inlineDisclosure{appearance:none;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border:0;align-items:center;gap:6px;margin-top:12px;padding:0;font-size:12px;display:inline-flex}.lDRIuW_inlineDisclosure:hover{color:var(--dsw-alias-label-primary)}.lDRIuW_modelFetchRow{align-items:center;gap:8px;display:flex}.lDRIuW_modelFetch,.lDRIuW_modelChoices{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);min-height:32px;color:var(--dsw-alias-label-secondary);font:inherit;border-radius:7px;font-size:12px}.lDRIuW_modelFetch{cursor:pointer;padding:0 10px}.lDRIuW_modelFetch:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.lDRIuW_modelFetch:disabled{opacity:.5;cursor:default}.lDRIuW_modelChoices{flex:1;min-width:0;padding:0 8px}.lDRIuW_modelCandidateList{flex-wrap:wrap;gap:6px 10px;margin-top:10px;display:flex}.lDRIuW_modelCandidateLabel{width:100%;color:var(--dsw-alias-label-tertiary);font-size:12px}.lDRIuW_modelCandidate{appearance:none;min-width:0;color:var(--dsw-alias-label-secondary);cursor:pointer;background:var(--dsw-alias-bg-layer-3);font-size:12px;line-height:1.5;font:inherit;border:1px solid #0000;border-radius:5px;align-items:center;gap:5px;padding:3px 6px;display:inline-flex}.lDRIuW_modelCandidate input{margin:0}.lDRIuW_modelCandidate[data-selected]{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary)}.lDRIuW_footer{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;display:flex}.lDRIuW_failed{min-width:0;color:var(--dsw-alias-label-error);flex:1;margin:0;font-size:12px;line-height:1.5}.lDRIuW_discard,.lDRIuW_save{appearance:none;font:inherit;cursor:pointer;border:1px solid #0000;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5}.lDRIuW_discard{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}.lDRIuW_discard:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.lDRIuW_save{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}.lDRIuW_discard:disabled,.lDRIuW_save:disabled{opacity:.4;cursor:default}.lDRIuW_discard:focus-visible,.lDRIuW_save:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}@media (prefers-reduced-motion:reduce){.lDRIuW_card,.lDRIuW_chevron,.lDRIuW_chevronOpen{transition:none}}.lDRIuW_channelSection{padding:6px 0 2px}.lDRIuW_channelEmpty{color:var(--dsw-alias-label-tertiary);margin:10px 0 0;font-size:12px;line-height:1.5}.lDRIuW_channelList{flex-direction:column;gap:6px;margin:10px 0 0;padding:0;list-style:none;display:flex}.lDRIuW_channelRow{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:10px;align-items:center;gap:10px;padding:8px 10px;display:flex}.lDRIuW_channelRow[data-action]{flex-wrap:wrap}.lDRIuW_channelDotReady,.lDRIuW_channelDotWarn{border-radius:50%;flex:none;width:9px;height:9px}.lDRIuW_channelDotReady{background:var(--dsw-color-success,#2fbf71)}.lDRIuW_channelDotWarn{background:var(--dsw-color-danger,#e5484d)}.lDRIuW_channelMain{appearance:none;min-width:0;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;flex-direction:column;flex:1;gap:3px;padding:0;display:flex}.lDRIuW_channelName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600;line-height:1.4;overflow:hidden}.lDRIuW_channelMeta{flex-wrap:wrap;align-items:center;gap:4px 8px;display:flex}.lDRIuW_channelHost{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.5;font-family:var(--dsw-font-family-mono,monospace);text-overflow:ellipsis;white-space:nowrap;max-width:180px;overflow:hidden}.lDRIuW_channelBadge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;padding:0 7px;font-size:11px;font-weight:500;line-height:17px}.lDRIuW_channelBadge[data-warn]{color:var(--dsw-alias-label-error)}.lDRIuW_channelBadge[data-default]{background:var(--dsw-alias-bg-module-poped,var(--dsw-alias-bg-module-platform));color:var(--dsw-alias-brand-primary)}.lDRIuW_channelAction{appearance:none;font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;padding:4px 8px;font-size:12px;line-height:1.5}.lDRIuW_channelAction:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform)}.lDRIuW_channelAction[data-danger]{color:var(--dsw-alias-label-error)}.lDRIuW_channelAction:disabled{opacity:.45;cursor:default}.lDRIuW_channelDanger{appearance:none;border:1px solid var(--dsw-alias-label-error);color:var(--dsw-alias-label-error);font:inherit;cursor:pointer;background:0 0;border-radius:6px;flex:none;padding:3px 10px;font-size:12px}.lDRIuW_channelDanger:hover:not(:disabled){background:color-mix(in srgb, var(--dsw-alias-label-error) 12%, transparent)}.lDRIuW_channelDanger:disabled{opacity:.45;cursor:default}.lDRIuW_deleteConfirmText{min-width:0;color:var(--dsw-alias-label-error);flex:1;font-size:12px;line-height:1.5}.lDRIuW_channelAddRow{gap:8px;margin-top:10px;display:flex}.lDRIuW_channelAdd{appearance:none;border:1px dashed var(--dsw-alias-border-l2);min-height:30px;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border-radius:8px;padding:0 12px;font-size:12px}.lDRIuW_channelAdd:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.lDRIuW_channelAdd:disabled{opacity:.45;cursor:default}.lDRIuW_spacer{flex:1}.lDRIuW_editorBackdrop{z-index:120;background:color-mix(in srgb, var(--dsw-alias-bg-layer-1,#000) 45%, transparent);justify-content:center;align-items:flex-start;padding:9vh 16px 16px;display:flex;position:fixed;inset:0}.lDRIuW_editorPanel{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:14px;width:min(560px,100%);max-height:82vh;padding:16px;overflow-y:auto;box-shadow:0 18px 50px #00000059}.lDRIuW_editorHeader{border-bottom:1px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:flex-start;gap:12px;padding-bottom:10px;display:flex}.lDRIuW_editorClose{appearance:none;width:26px;height:26px;color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;font-size:16px;line-height:26px}.lDRIuW_editorClose:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform)}.lDRIuW_editorField{flex-direction:column;gap:6px;padding:12px 0 0;display:flex}.lDRIuW_editorDivider{background:var(--dsw-alias-border-l2);height:1px;margin:14px 0 4px}.lDRIuW_editorSectionHeader{justify-content:space-between;align-items:center;gap:12px;padding:10px 0 4px;display:flex}.lDRIuW_editorSectionHeader .lDRIuW_label{flex:1}.lDRIuW_editorTools{flex-direction:column;gap:8px;margin-top:10px;display:flex}.lDRIuW_editorFooter{border-top:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding-top:12px;display:flex}.lDRIuW_detectOk{color:var(--dsw-color-success,var(--dsw-alias-label-secondary));margin:0;font-size:12px;line-height:1.5}.lDRIuW_modelRows{flex-direction:column;gap:8px;margin:8px 0 0;padding:0;list-style:none;display:flex}.lDRIuW_modelRow{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:10px;justify-content:space-between;align-items:center;gap:10px;padding:8px 10px;display:flex}.lDRIuW_modelRowInputs{flex:1;align-items:center;gap:6px;min-width:0;display:flex}.lDRIuW_modelRowInputs .lDRIuW_input{flex:1;min-width:0}.lDRIuW_modelArrow{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px}.lDRIuW_modelRowBadges{flex:none;align-items:center;gap:6px;display:flex}.lDRIuW_modelBadge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-tertiary);border-radius:999px;padding:0 7px;font-size:11px;line-height:17px}.lDRIuW_modelBadge[data-verified]{color:var(--dsw-color-success,var(--dsw-alias-label-secondary))}.lDRIuW_modelBadge[data-warn]{color:var(--dsw-alias-label-error)}.lDRIuW_modelRowRemove{appearance:none;width:20px;height:20px;color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:0;border-radius:4px;flex:none;padding:0;line-height:20px}.lDRIuW_modelRowRemove:hover:not(:disabled){color:var(--dsw-alias-label-error);background:var(--dsw-alias-bg-module-platform)}.lDRIuW_modelRowRemove:disabled{opacity:.45;cursor:default}.lDRIuW_modelCandidate>.lDRIuW_modelBadge{flex:none}.lDRIuW_channelControls{position:relative}.lDRIuW_presetInline{z-index:10;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:10px;width:min(420px,100vw - 48px);max-height:min(440px,60vh);margin:0;padding:12px;position:absolute;bottom:calc(100% + 8px);left:0;overflow-y:auto;box-shadow:0 12px 30px #0000004d}.lDRIuW_presetInlineHeader{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.lDRIuW_presetList{flex-direction:column;gap:8px;margin-top:12px;display:flex}.lDRIuW_presetRow{appearance:none;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;border-radius:10px;flex-direction:column;align-items:flex-start;gap:3px;padding:10px 12px;display:flex}.lDRIuW_presetRow:hover:not(:disabled){border-color:var(--dsw-alias-brand-primary)}.lDRIuW_presetRow[data-custom]{border-style:dashed}.lDRIuW_presetRow:disabled{opacity:.5;cursor:default}.lDRIuW_presetName{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:1.4}.lDRIuW_presetMeta{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.5;font-family:var(--dsw-font-family-mono,monospace)}.lDRIuW_presetHint{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.5}";
|
|
4903
5205
|
const tagId$1 = "@dickpy/dsh-imagegen/settings-card.module.css";
|
|
4904
5206
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
4905
5207
|
const tag = document.createElement("style");
|
|
@@ -4909,97 +5211,97 @@ window.__ModuleLoader__.load({
|
|
|
4909
5211
|
document.head.appendChild(tag);
|
|
4910
5212
|
}
|
|
4911
5213
|
var settings_card_module_css_default = {
|
|
4912
|
-
"
|
|
4913
|
-
"
|
|
4914
|
-
"
|
|
4915
|
-
"
|
|
4916
|
-
"
|
|
4917
|
-
"
|
|
4918
|
-
"
|
|
4919
|
-
"
|
|
4920
|
-
"
|
|
4921
|
-
"
|
|
4922
|
-
"
|
|
4923
|
-
"
|
|
4924
|
-
"
|
|
4925
|
-
"
|
|
4926
|
-
"
|
|
4927
|
-
"
|
|
4928
|
-
"
|
|
4929
|
-
"
|
|
4930
|
-
"
|
|
4931
|
-
"
|
|
4932
|
-
"
|
|
4933
|
-
"
|
|
4934
|
-
"
|
|
4935
|
-
"
|
|
4936
|
-
"
|
|
4937
|
-
"
|
|
4938
|
-
"
|
|
4939
|
-
"
|
|
4940
|
-
"
|
|
4941
|
-
"
|
|
4942
|
-
"
|
|
4943
|
-
"
|
|
4944
|
-
"
|
|
4945
|
-
"
|
|
4946
|
-
"
|
|
4947
|
-
"
|
|
4948
|
-
"
|
|
4949
|
-
"
|
|
4950
|
-
"
|
|
4951
|
-
"
|
|
4952
|
-
"
|
|
4953
|
-
"
|
|
4954
|
-
"
|
|
4955
|
-
"
|
|
4956
|
-
"
|
|
4957
|
-
"
|
|
4958
|
-
"
|
|
4959
|
-
"
|
|
4960
|
-
"
|
|
4961
|
-
"
|
|
4962
|
-
"
|
|
4963
|
-
"
|
|
4964
|
-
"
|
|
4965
|
-
"
|
|
4966
|
-
"
|
|
4967
|
-
"
|
|
4968
|
-
"
|
|
4969
|
-
"
|
|
4970
|
-
"
|
|
4971
|
-
"
|
|
4972
|
-
"
|
|
4973
|
-
"
|
|
4974
|
-
"
|
|
4975
|
-
"
|
|
4976
|
-
"
|
|
4977
|
-
"
|
|
4978
|
-
"readOnly": "
|
|
4979
|
-
"
|
|
4980
|
-
"
|
|
4981
|
-
"
|
|
4982
|
-
"
|
|
4983
|
-
"
|
|
4984
|
-
"
|
|
4985
|
-
"
|
|
4986
|
-
"
|
|
4987
|
-
"
|
|
4988
|
-
"
|
|
4989
|
-
"
|
|
4990
|
-
"
|
|
4991
|
-
"
|
|
4992
|
-
"
|
|
4993
|
-
"
|
|
4994
|
-
"
|
|
4995
|
-
"
|
|
4996
|
-
"
|
|
4997
|
-
"
|
|
4998
|
-
"
|
|
4999
|
-
"
|
|
5000
|
-
"
|
|
5001
|
-
"
|
|
5002
|
-
"
|
|
5214
|
+
"save": "lDRIuW_save",
|
|
5215
|
+
"pending": "lDRIuW_pending",
|
|
5216
|
+
"presetInline": "lDRIuW_presetInline",
|
|
5217
|
+
"editorFooter": "lDRIuW_editorFooter",
|
|
5218
|
+
"chevron": "lDRIuW_chevron",
|
|
5219
|
+
"input": "lDRIuW_input",
|
|
5220
|
+
"detectOk": "lDRIuW_detectOk",
|
|
5221
|
+
"channelRow": "lDRIuW_channelRow",
|
|
5222
|
+
"hint": "lDRIuW_hint",
|
|
5223
|
+
"presetHint": "lDRIuW_presetHint",
|
|
5224
|
+
"modelChoices": "lDRIuW_modelChoices",
|
|
5225
|
+
"disclosure": "lDRIuW_disclosure",
|
|
5226
|
+
"modelRow": "lDRIuW_modelRow",
|
|
5227
|
+
"presetRow": "lDRIuW_presetRow",
|
|
5228
|
+
"addModel": "lDRIuW_addModel",
|
|
5229
|
+
"card": "lDRIuW_card",
|
|
5230
|
+
"channelSection": "lDRIuW_channelSection",
|
|
5231
|
+
"head": "lDRIuW_head",
|
|
5232
|
+
"versionLabel": "lDRIuW_versionLabel",
|
|
5233
|
+
"channelDotReady": "lDRIuW_channelDotReady",
|
|
5234
|
+
"channelEmpty": "lDRIuW_channelEmpty",
|
|
5235
|
+
"field": "lDRIuW_field",
|
|
5236
|
+
"modelFetch": "lDRIuW_modelFetch",
|
|
5237
|
+
"header": "lDRIuW_header",
|
|
5238
|
+
"deleteConfirmText": "lDRIuW_deleteConfirmText",
|
|
5239
|
+
"spacer": "lDRIuW_spacer",
|
|
5240
|
+
"select": "lDRIuW_select",
|
|
5241
|
+
"editorBackdrop": "lDRIuW_editorBackdrop",
|
|
5242
|
+
"editorDivider": "lDRIuW_editorDivider",
|
|
5243
|
+
"editorTools": "lDRIuW_editorTools",
|
|
5244
|
+
"modelRows": "lDRIuW_modelRows",
|
|
5245
|
+
"sectionHint": "lDRIuW_sectionHint",
|
|
5246
|
+
"invalid": "lDRIuW_invalid",
|
|
5247
|
+
"editorClose": "lDRIuW_editorClose",
|
|
5248
|
+
"footer": "lDRIuW_footer",
|
|
5249
|
+
"chevronOpen": "lDRIuW_chevronOpen",
|
|
5250
|
+
"inlineDisclosure": "lDRIuW_inlineDisclosure",
|
|
5251
|
+
"versionRow": "lDRIuW_versionRow",
|
|
5252
|
+
"channelHost": "lDRIuW_channelHost",
|
|
5253
|
+
"badge": "lDRIuW_badge",
|
|
5254
|
+
"name": "lDRIuW_name",
|
|
5255
|
+
"description": "lDRIuW_description",
|
|
5256
|
+
"sectionTitle": "lDRIuW_sectionTitle",
|
|
5257
|
+
"modelSummary": "lDRIuW_modelSummary",
|
|
5258
|
+
"modelFetchRow": "lDRIuW_modelFetchRow",
|
|
5259
|
+
"textarea": "lDRIuW_textarea",
|
|
5260
|
+
"inputInvalid": "lDRIuW_inputInvalid",
|
|
5261
|
+
"manualModelRow": "lDRIuW_manualModelRow",
|
|
5262
|
+
"channelDanger": "lDRIuW_channelDanger",
|
|
5263
|
+
"sectionDivider": "lDRIuW_sectionDivider",
|
|
5264
|
+
"channelAdd": "lDRIuW_channelAdd",
|
|
5265
|
+
"modelCandidateList": "lDRIuW_modelCandidateList",
|
|
5266
|
+
"channelName": "lDRIuW_channelName",
|
|
5267
|
+
"modelSection": "lDRIuW_modelSection",
|
|
5268
|
+
"badges": "lDRIuW_badges",
|
|
5269
|
+
"discard": "lDRIuW_discard",
|
|
5270
|
+
"body": "lDRIuW_body",
|
|
5271
|
+
"presetMeta": "lDRIuW_presetMeta",
|
|
5272
|
+
"versionValue": "lDRIuW_versionValue",
|
|
5273
|
+
"modelRowInputs": "lDRIuW_modelRowInputs",
|
|
5274
|
+
"channelBadge": "lDRIuW_channelBadge",
|
|
5275
|
+
"modelArrow": "lDRIuW_modelArrow",
|
|
5276
|
+
"modelCandidate": "lDRIuW_modelCandidate",
|
|
5277
|
+
"failed": "lDRIuW_failed",
|
|
5278
|
+
"modelCandidateLabel": "lDRIuW_modelCandidateLabel",
|
|
5279
|
+
"channelControls": "lDRIuW_channelControls",
|
|
5280
|
+
"readOnly": "lDRIuW_readOnly",
|
|
5281
|
+
"notExposed": "lDRIuW_notExposed",
|
|
5282
|
+
"channelList": "lDRIuW_channelList",
|
|
5283
|
+
"editorSectionHeader": "lDRIuW_editorSectionHeader",
|
|
5284
|
+
"presetInlineHeader": "lDRIuW_presetInlineHeader",
|
|
5285
|
+
"channelAction": "lDRIuW_channelAction",
|
|
5286
|
+
"headText": "lDRIuW_headText",
|
|
5287
|
+
"channelAddRow": "lDRIuW_channelAddRow",
|
|
5288
|
+
"textareaInvalid": "lDRIuW_textareaInvalid",
|
|
5289
|
+
"reset": "lDRIuW_reset",
|
|
5290
|
+
"editorField": "lDRIuW_editorField",
|
|
5291
|
+
"editorPanel": "lDRIuW_editorPanel",
|
|
5292
|
+
"sectionHeader": "lDRIuW_sectionHeader",
|
|
5293
|
+
"modelRowBadges": "lDRIuW_modelRowBadges",
|
|
5294
|
+
"modelRowRemove": "lDRIuW_modelRowRemove",
|
|
5295
|
+
"modelChip": "lDRIuW_modelChip",
|
|
5296
|
+
"channelDotWarn": "lDRIuW_channelDotWarn",
|
|
5297
|
+
"modelBadge": "lDRIuW_modelBadge",
|
|
5298
|
+
"channelMeta": "lDRIuW_channelMeta",
|
|
5299
|
+
"editorHeader": "lDRIuW_editorHeader",
|
|
5300
|
+
"channelMain": "lDRIuW_channelMain",
|
|
5301
|
+
"label": "lDRIuW_label",
|
|
5302
|
+
"presetName": "lDRIuW_presetName",
|
|
5303
|
+
"optionalContent": "lDRIuW_optionalContent",
|
|
5304
|
+
"presetList": "lDRIuW_presetList"
|
|
5003
5305
|
};
|
|
5004
5306
|
//#endregion
|
|
5005
5307
|
//#region src/client/SettingsCard.tsx
|
|
@@ -5257,29 +5559,17 @@ window.__ModuleLoader__.load({
|
|
|
5257
5559
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5258
5560
|
className: settings_card_module_css_default.channelName,
|
|
5259
5561
|
children: isDefault ? `★ ${channel.name || t("channels.untitled")}` : channel.name || t("channels.untitled")
|
|
5260
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.
|
|
5562
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5261
5563
|
className: settings_card_module_css_default.channelMeta,
|
|
5262
|
-
children:
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
}),
|
|
5272
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5273
|
-
className: settings_card_module_css_default.channelBadge,
|
|
5274
|
-
"data-warn": channel.models.length > 0 ? void 0 : "",
|
|
5275
|
-
children: channel.models.length > 0 ? t("channels.modelCount", { n: channel.models.length }) : t("channels.noModels")
|
|
5276
|
-
}),
|
|
5277
|
-
isDefault ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5278
|
-
className: settings_card_module_css_default.channelBadge,
|
|
5279
|
-
"data-default": true,
|
|
5280
|
-
children: t("channels.defaultLabel")
|
|
5281
|
-
}) : null
|
|
5282
|
-
]
|
|
5564
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
5565
|
+
className: settings_card_module_css_default.channelBadge,
|
|
5566
|
+
"data-warn": !keyHeld || channel.models.length === 0 ? "" : void 0,
|
|
5567
|
+
children: [
|
|
5568
|
+
keyHeld ? t("channels.keySet") : t("channels.keyMissing"),
|
|
5569
|
+
" · ",
|
|
5570
|
+
channel.models.length > 0 ? t("channels.modelCount", { n: channel.models.length }) : t("channels.noModels")
|
|
5571
|
+
]
|
|
5572
|
+
})
|
|
5283
5573
|
})]
|
|
5284
5574
|
}),
|
|
5285
5575
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -5684,13 +5974,6 @@ window.__ModuleLoader__.load({
|
|
|
5684
5974
|
...patch
|
|
5685
5975
|
} : channel));
|
|
5686
5976
|
}
|
|
5687
|
-
function hostOf(apiUrl) {
|
|
5688
|
-
try {
|
|
5689
|
-
return new URL(apiUrl).hostname;
|
|
5690
|
-
} catch {
|
|
5691
|
-
return apiUrl;
|
|
5692
|
-
}
|
|
5693
|
-
}
|
|
5694
5977
|
function clientId() {
|
|
5695
5978
|
return (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function" ? crypto.randomUUID() : void 0) ?? `ch-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
5696
5979
|
}
|
|
@@ -5731,24 +6014,13 @@ window.__ModuleLoader__.load({
|
|
|
5731
6014
|
onClick: () => {
|
|
5732
6015
|
props.onPick(preset);
|
|
5733
6016
|
},
|
|
5734
|
-
children: [
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
children: [
|
|
5742
|
-
preset.apiUrl,
|
|
5743
|
-
" · ",
|
|
5744
|
-
t("channels.presetModelsHint", { n: preset.models.length })
|
|
5745
|
-
]
|
|
5746
|
-
}),
|
|
5747
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5748
|
-
className: settings_card_module_css_default.presetHint,
|
|
5749
|
-
children: preset.hint
|
|
5750
|
-
})
|
|
5751
|
-
]
|
|
6017
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6018
|
+
className: settings_card_module_css_default.presetName,
|
|
6019
|
+
children: preset.name
|
|
6020
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6021
|
+
className: settings_card_module_css_default.presetMeta,
|
|
6022
|
+
children: preset.models.map((model) => model.alias).join(" · ")
|
|
6023
|
+
})]
|
|
5752
6024
|
}, preset.id)),
|
|
5753
6025
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
5754
6026
|
type: "button",
|
|
@@ -5842,19 +6114,6 @@ window.__ModuleLoader__.load({
|
|
|
5842
6114
|
props.onSetModels(merged);
|
|
5843
6115
|
setCopyFrom("");
|
|
5844
6116
|
};
|
|
5845
|
-
const onlyKnown = () => {
|
|
5846
|
-
const known = (candidates ?? []).filter((id) => describeModel(id).known);
|
|
5847
|
-
const merged = [...channel.models];
|
|
5848
|
-
for (const id of known) {
|
|
5849
|
-
const alias = id;
|
|
5850
|
-
if (!merged.some((model) => model.alias === alias)) merged.push({
|
|
5851
|
-
alias,
|
|
5852
|
-
id
|
|
5853
|
-
});
|
|
5854
|
-
}
|
|
5855
|
-
props.onSetModels(merged);
|
|
5856
|
-
};
|
|
5857
|
-
const knownCount = (candidates ?? []).filter((id) => describeModel(id).known).length;
|
|
5858
6117
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5859
6118
|
className: settings_card_module_css_default.editorBackdrop,
|
|
5860
6119
|
role: "dialog",
|
|
@@ -6104,15 +6363,9 @@ window.__ModuleLoader__.load({
|
|
|
6104
6363
|
}),
|
|
6105
6364
|
candidates !== null && candidates.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6106
6365
|
className: settings_card_module_css_default.modelCandidateList,
|
|
6107
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.
|
|
6366
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6108
6367
|
className: settings_card_module_css_default.modelCandidateLabel,
|
|
6109
|
-
children:
|
|
6110
|
-
type: "button",
|
|
6111
|
-
className: settings_card_module_css_default.inlineDisclosure,
|
|
6112
|
-
disabled: !props.writable || knownCount === 0,
|
|
6113
|
-
onClick: onlyKnown,
|
|
6114
|
-
children: t("channels.candidatesQuick")
|
|
6115
|
-
})]
|
|
6368
|
+
children: t("channels.candidatesTitle")
|
|
6116
6369
|
}), candidates.map((candidate) => {
|
|
6117
6370
|
const selected = channel.models.some((model) => model.alias === candidate);
|
|
6118
6371
|
const entry = describeModel(candidate);
|
|
@@ -6300,8 +6553,8 @@ window.__ModuleLoader__.load({
|
|
|
6300
6553
|
});
|
|
6301
6554
|
}
|
|
6302
6555
|
//#endregion
|
|
6303
|
-
//#region \0dsh-css:
|
|
6304
|
-
const css = ".
|
|
6556
|
+
//#region \0dsh-css:D:\learn\dsh\dsh-imagegen\src\client\image-toolview.module.css.mjs
|
|
6557
|
+
const css = ".NPSazW_root{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:8px;flex-direction:column;gap:7px;margin:4px 0;padding:8px 10px 10px;display:flex}.NPSazW_header{min-height:20px;color:var(--dsw-alias-label-secondary);align-items:center;gap:7px;font-size:12px;display:flex}.NPSazW_icon{color:var(--dsw-alias-brand-primary);font-size:15px;line-height:1}.NPSazW_status{color:var(--dsw-alias-label-tertiary);margin-left:auto;font-size:11px}.NPSazW_message,.NPSazW_loading,.NPSazW_error{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;margin:0;font-size:12px;line-height:1.5}.NPSazW_images{flex-wrap:wrap;gap:8px;display:flex}.NPSazW_imageLink{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-base);border-radius:6px;max-width:min(280px,100%);display:block;overflow:hidden}.NPSazW_imageLink:hover{border-color:var(--dsw-alias-brand-primary)}.NPSazW_image{object-fit:contain;width:auto;max-width:280px;height:auto;max-height:220px;display:block}.NPSazW_error{color:var(--dsw-alias-state-error-primary)}";
|
|
6305
6558
|
const tagId = "@dickpy/dsh-imagegen/image-toolview.module.css";
|
|
6306
6559
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
6307
6560
|
const tag = document.createElement("style");
|
|
@@ -6311,16 +6564,16 @@ window.__ModuleLoader__.load({
|
|
|
6311
6564
|
document.head.appendChild(tag);
|
|
6312
6565
|
}
|
|
6313
6566
|
var image_toolview_module_css_default = {
|
|
6314
|
-
"
|
|
6315
|
-
"
|
|
6316
|
-
"
|
|
6317
|
-
"
|
|
6318
|
-
"
|
|
6319
|
-
"
|
|
6320
|
-
"
|
|
6321
|
-
"
|
|
6322
|
-
"
|
|
6323
|
-
"
|
|
6567
|
+
"error": "NPSazW_error",
|
|
6568
|
+
"icon": "NPSazW_icon",
|
|
6569
|
+
"imageLink": "NPSazW_imageLink",
|
|
6570
|
+
"header": "NPSazW_header",
|
|
6571
|
+
"images": "NPSazW_images",
|
|
6572
|
+
"status": "NPSazW_status",
|
|
6573
|
+
"image": "NPSazW_image",
|
|
6574
|
+
"root": "NPSazW_root",
|
|
6575
|
+
"message": "NPSazW_message",
|
|
6576
|
+
"loading": "NPSazW_loading"
|
|
6324
6577
|
};
|
|
6325
6578
|
//#endregion
|
|
6326
6579
|
//#region src/client/image-toolview.tsx
|
|
@@ -6422,6 +6675,13 @@ window.__ModuleLoader__.load({
|
|
|
6422
6675
|
const refs = (0, react.useMemo)(() => imageRefsOf(props.block), [props.block]);
|
|
6423
6676
|
const { status, message } = resultInfo(props.block);
|
|
6424
6677
|
const { images, error } = useAttachmentImages(props.sessionId, refs, load);
|
|
6678
|
+
(0, react.useEffect)(() => {
|
|
6679
|
+
if (images.length === 0) return;
|
|
6680
|
+
document.dispatchEvent(new CustomEvent(CHAT_IMAGE_EVENT, { detail: {
|
|
6681
|
+
sessionId: props.sessionId,
|
|
6682
|
+
refs: images.map((image) => image.ref)
|
|
6683
|
+
} }));
|
|
6684
|
+
}, [images, props.sessionId]);
|
|
6425
6685
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
6426
6686
|
className: image_toolview_module_css_default.root,
|
|
6427
6687
|
"data-state": status,
|
|
@@ -6492,7 +6752,8 @@ window.__ModuleLoader__.load({
|
|
|
6492
6752
|
"slots",
|
|
6493
6753
|
"locale",
|
|
6494
6754
|
"connection",
|
|
6495
|
-
"sessions"
|
|
6755
|
+
"sessions",
|
|
6756
|
+
"conversation"
|
|
6496
6757
|
];
|
|
6497
6758
|
/**
|
|
6498
6759
|
* Mount the studio, its sidebar entry, and the settings card.
|
|
@@ -6527,10 +6788,15 @@ window.__ModuleLoader__.load({
|
|
|
6527
6788
|
if (uiDisposer !== void 0) return;
|
|
6528
6789
|
const controller = new ImageGenController();
|
|
6529
6790
|
const api = new ImageGenApi();
|
|
6791
|
+
const sessions = ctx.get("sessions");
|
|
6792
|
+
const conversation = ctx.get("conversation");
|
|
6530
6793
|
const disposers = [];
|
|
6531
6794
|
try {
|
|
6532
|
-
disposers.push(mountSidebarEntry(controller, tt("entry.
|
|
6533
|
-
disposers.push(mountPanel(controller, api, scope
|
|
6795
|
+
disposers.push(mountSidebarEntry(controller, tt("entry.newSession"), tt("entry.newSessionTooltip"), tt("entry.image"), tt("entry.tooltip")));
|
|
6796
|
+
disposers.push(mountPanel(controller, api, scope, {
|
|
6797
|
+
sessions,
|
|
6798
|
+
conversation
|
|
6799
|
+
}));
|
|
6534
6800
|
} catch (error) {
|
|
6535
6801
|
console.warn("[dsh-imagegen] mount failed:", error);
|
|
6536
6802
|
}
|