@jxgame2020/dsh-token-quota 0.1.39 → 0.1.41

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/lib/client.js CHANGED
@@ -8,12 +8,12 @@ window.__ModuleLoader__.load({
8
8
  let react_jsx_runtime = require("react/jsx-runtime");
9
9
  let react = require("react");
10
10
  //#region lib/types/types.js
11
- /**
12
- * Provider route keys the host knows how to query for account balance. A
13
- * directory provider outside this list renders as "not integrated for query"
14
- * in the balance window.
15
- */
16
- const TOKEN_QUOTA_BALANCE_PROVIDERS = ["deepseek"];
11
+ const TOKEN_QUOTA_DEFAULT_TRANSCRIBE = {
12
+ enabled: false,
13
+ baseURL: "https://api.siliconflow.cn/v1",
14
+ apiKeyEnv: "SILICONFLOW_API_KEY",
15
+ model: "XingChenAGI/XingChenASR-V3.2-Ultra"
16
+ };
17
17
  //#endregion
18
18
  //#region lib/types/client/store.js
19
19
  /**
@@ -55,6 +55,12 @@ window.__ModuleLoader__.load({
55
55
  musicVolume: .5,
56
56
  musicStyle: "pentatonic",
57
57
  musicOnlyCurrentSession: true,
58
+ transcribe: {
59
+ enabled: false,
60
+ baseURL: "https://api.siliconflow.cn/v1",
61
+ apiKeyEnv: "SILICONFLOW_API_KEY",
62
+ model: "XingChenAGI/XingChenASR-V3.2-Ultra"
63
+ },
58
64
  upgrade: null,
59
65
  upgradeDismissed: false,
60
66
  checkingUpdates: false,
@@ -122,8 +128,11 @@ window.__ModuleLoader__.load({
122
128
  setMusicOnlyCurrentSession: (d, only) => {
123
129
  d.musicOnlyCurrentSession = only;
124
130
  },
131
+ setTranscribeSettings: (d, settings) => {
132
+ d.transcribe = settings;
133
+ },
125
134
  setUpgrade: (d, upgrade) => {
126
- const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.39" ? upgrade : null;
135
+ const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.41" ? upgrade : null;
127
136
  if (d.upgrade === null || d.upgrade.latestVersion !== normalized?.latestVersion) d.upgradeDismissed = false;
128
137
  d.upgrade = normalized;
129
138
  },
@@ -243,152 +252,152 @@ window.__ModuleLoader__.load({
243
252
  }
244
253
  //#endregion
245
254
  //#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/TokenQuotaPanel.module.css.mjs
246
- const css = ".NPLLIq_panel{box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;z-index:40;opacity:1;border-radius:12px;flex-direction:column;width:320px;max-height:min(72vh,560px);transition:opacity .18s;display:flex;position:fixed;top:56px;right:12px;overflow:hidden;box-shadow:0 8px 28px #0000002e}.NPLLIq_panelDim{opacity:.55}.NPLLIq_panelDimStrong{opacity:.3}.NPLLIq_header{border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;touch-action:none;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:8px;padding:10px 12px;display:flex}.NPLLIq_header:active{cursor:grabbing}.NPLLIq_headerText{flex-direction:column;gap:2px;min-width:0;display:flex}.NPLLIq_title{color:var(--dsw-alias-label-primary);align-items:baseline;gap:6px;font-size:13px;font-weight:600;display:flex}.NPLLIq_version{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:10px;font-weight:500}.NPLLIq_versionNew{color:var(--dsw-alias-status-warning-foreground,#b56900);background:var(--dsw-alias-status-warning-background,#fff6d7);cursor:default;border-radius:4px;padding:1px 6px}.NPLLIq_subtitle{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_notesBar{flex-wrap:wrap;flex:100%;align-items:center;gap:4px;padding:2px 0 0;display:flex}.NPLLIq_noteChip{width:20px;height:20px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;font-size:11px;line-height:1;transition:color .12s,border-color .12s;display:inline-flex}.NPLLIq_noteChip:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l2)}.NPLLIq_noteChipOpen{color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew{width:22px;height:20px;color:var(--dsw-alias-label-secondary);border:1px dashed var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;transition:color .12s,border-color .12s;display:inline-flex;position:relative}.NPLLIq_noteNew:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_noteNewPlus{color:inherit;font-size:10px;font-weight:700;line-height:1;position:absolute;bottom:-2px;right:-1px}.NPLLIq_noteWin{z-index:60;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000038}.NPLLIq_noteWinCollapsed{height:auto!important}.NPLLIq_noteWinBar{background:var(--dsw-alias-bg-layer-1);border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;flex:none;align-items:center;gap:4px;padding:4px 6px;display:flex}.NPLLIq_noteWinBar:active{cursor:grabbing}.NPLLIq_noteWinGripBar{color:var(--dsw-alias-label-secondary);opacity:.7;flex:none;font-size:10px}.NPLLIq_noteWinTitleText{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;padding:1px 2px;font-size:11px;font-weight:600;overflow:hidden}.NPLLIq_noteWinTitle{min-width:0;color:var(--dsw-alias-label-primary);background:0 0;border:1px solid #0000;border-radius:4px;outline:none;flex:1;padding:1px 2px;font-size:11px;font-weight:600}.NPLLIq_noteWinTitle:hover{border-color:var(--dsw-alias-border-l1)}.NPLLIq_noteWinTitle:focus{background:var(--dsw-alias-bg-overlay);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteWinBtn{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_noteWinBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.NPLLIq_noteWinText{box-sizing:border-box;width:100%;min-height:0;color:var(--dsw-alias-label-primary);resize:none;background:0 0;border:none;outline:none;flex:1;padding:6px 8px;font-family:inherit;font-size:11px;line-height:1.5}.NPLLIq_noteWinResize{cursor:nwse-resize;background:linear-gradient(135deg, transparent 0 45%, var(--dsw-alias-border-l2) 45% 55%, transparent 55% 70%, var(--dsw-alias-border-l2) 70% 80%, transparent 80%);width:14px;height:14px;position:absolute;bottom:0;right:0}.NPLLIq_noteMenuBackdrop{z-index:100;pointer-events:auto;position:fixed;inset:0}.NPLLIq_noteMenu{z-index:101;pointer-events:auto;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;min-width:96px;padding:4px;display:flex;position:fixed;box-shadow:0 8px 24px #0000003d}.NPLLIq_noteMenuItem{text-align:left;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;border-radius:5px;padding:5px 8px;font-size:11px}.NPLLIq_noteMenuItem:hover{background:var(--dsw-alias-bg-layer-2)}.NPLLIq_collapse{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_collapse:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_body{padding:4px 0;overflow-y:auto}.NPLLIq_row{border-bottom:1px solid var(--dsw-alias-border-l1);flex-direction:column;gap:6px;padding:8px 12px;display:flex}.NPLLIq_rowHeader{justify-content:space-between;align-items:center;gap:8px;display:flex}.NPLLIq_rowDrag{cursor:grab;color:var(--dsw-alias-label-secondary);user-select:none;border-radius:4px;flex:none;margin-right:2px;padding:2px 3px;font-size:11px;line-height:1}.NPLLIq_rowDrag:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_rowDrag:active{cursor:grabbing}.NPLLIq_rowDragging{opacity:.45}.NPLLIq_rowDropTarget{box-shadow:inset 0 2px 0 var(--dsw-alias-brand-primary)}.NPLLIq_rowName{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;align-items:center;gap:6px;font-size:12px;font-weight:500;display:inline-flex;overflow:hidden}.NPLLIq_currentBadge{color:var(--dsw-alias-state-success-primary);border:1px solid var(--dsw-alias-state-success-primary);border-radius:8px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_rowMeta{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.NPLLIq_bar{background:var(--dsw-alias-bg-layer-1);border-radius:3px;height:6px;overflow:hidden}.NPLLIq_fillIdle{background:var(--dsw-alias-brand-primary);height:100%;transition:width .2s}.NPLLIq_fillWarn{background:var(--dsw-alias-state-warn-primary);height:100%;transition:width .2s}.NPLLIq_fillOver{background:var(--dsw-alias-state-error-primary);height:100%;transition:width .2s}.NPLLIq_controls{align-items:center;gap:6px;display:flex}.NPLLIq_input{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);min-width:0;color:var(--dsw-alias-label-primary);border-radius:6px;flex:1;padding:4px 8px;font-size:11px}.NPLLIq_input::placeholder{color:var(--dsw-alias-label-secondary)}.NPLLIq_save,.NPLLIq_switch{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;flex:none;padding:4px 10px;font-size:11px}.NPLLIq_save:hover,.NPLLIq_switch:hover:not(:disabled){background:var(--dsw-alias-bg-layer-2)}.NPLLIq_switch:disabled{opacity:.5;cursor:default}.NPLLIq_balanceToggle{margin-left:auto}.NPLLIq_balanceToggleOpen{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceWin{z-index:1199;background:var(--dsw-alias-bg-layer-2);width:280px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;border-radius:12px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000029}.NPLLIq_balanceWinHeader{border-bottom:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-3);user-select:none;align-items:center;gap:6px;padding:6px 8px 6px 12px;display:flex}.NPLLIq_balanceWinTitle{flex:1;font-size:12px;font-weight:600;line-height:1}.NPLLIq_balanceWinBody{font-variant-numeric:tabular-nums;padding:6px 10px 10px;font-size:11px}.NPLLIq_balanceRowHeader{border-bottom:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);grid-template-columns:1fr auto 20px;align-items:center;gap:6px;padding:3px 2px;font-weight:600;display:grid}.NPLLIq_balanceSortBtn{all:unset;cursor:pointer;color:inherit;border-radius:4px;padding:1px 2px;font-size:10px;font-weight:600}.NPLLIq_balanceSortBtn:hover{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRefreshAll{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceRefreshAll:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRefreshAll:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_balanceRow{grid-template-columns:1fr auto 20px;align-items:center;gap:6px;padding:3px 2px;display:grid}.NPLLIq_balanceRow+.NPLLIq_balanceRow{border-top:1px dashed var(--dsw-alias-border-l1)}.NPLLIq_balanceRowName{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:500;overflow:hidden}.NPLLIq_balanceRowValue{text-align:right;font-weight:600}.NPLLIq_balanceRowRefresh{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceRowRefresh:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRowRefresh:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_balanceValueOk{color:var(--dsw-alias-label-primary)}.NPLLIq_balanceValueLow{color:var(--dsw-alias-state-warn-primary)}.NPLLIq_balanceValueError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_balanceStateHint{color:var(--dsw-alias-label-secondary);font-style:italic;font-weight:500}.NPLLIq_balanceStateError{color:var(--dsw-alias-state-error-primary);font-weight:500}.NPLLIq_balanceLastLine{border-top:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-tertiary);margin-top:6px;padding-top:5px;font-size:10px}.NPLLIq_balanceBar{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;justify-content:space-between;align-items:center;gap:6px;padding:5px 12px;font-size:11px;display:flex}.NPLLIq_balanceBarText{text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:6px;min-width:0;font-weight:600;display:inline-flex;overflow:hidden}.NPLLIq_balanceBarBadge{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border-radius:4px;flex:none;padding:0 4px;font-size:10px;font-weight:600}.NPLLIq_balanceBarDim{color:var(--dsw-alias-label-secondary);font-weight:500}.NPLLIq_balanceBarLow{color:var(--dsw-alias-state-warn-primary)}.NPLLIq_balanceBarError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_balanceBarRefresh{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceBarRefresh:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceBarRefresh:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_notice,.NPLLIq_noticeError{color:var(--dsw-alias-label-secondary);padding:10px 12px;font-size:12px}.NPLLIq_noticeError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_tab{background:var(--dsw-alias-brand-primary);border:1px solid var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay);pointer-events:auto;cursor:pointer;z-index:90;border-radius:10px;align-items:center;gap:6px;padding:9px 14px;font-size:12px;font-weight:600;display:inline-flex;position:fixed;top:56px;right:12px;box-shadow:0 6px 20px #00000040}.NPLLIq_tab:hover{filter:brightness(1.08)}.NPLLIq_tabIcon{font-size:12px;line-height:1}.NPLLIq_tabLabel{white-space:nowrap}.NPLLIq_headerActions{flex:none;align-items:center;gap:4px;display:flex}.NPLLIq_settingsBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_settingsBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_settingsBtnActive{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-2,#0000000f);box-shadow:inset 0 0 0 1px var(--dsw-alias-brand-primary);font-weight:700}.NPLLIq_selectBtn{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-brand-primary);cursor:pointer;background:0 0;border-radius:6px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_selectBtn:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_gearBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;flex:none;margin-left:6px;padding:0 2px;font-size:12px;line-height:1}.NPLLIq_gearBtn:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_fullNotice{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-state-error-primary);border-radius:8px;margin:6px 12px;padding:8px 10px;font-size:12px}.NPLLIq_upgradeBanner{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-divider-1,#0000001a);border-radius:8px;margin:6px 12px;padding:10px 30px 10px 10px;font-size:12px;position:relative}@keyframes NPLLIq_upgradeBannerFlash{0%,to{border-color:var(--dsw-alias-divider-1,#0000001a);box-shadow:0 0 #f0a02000}50%{border-color:var(--dsw-alias-status-warning-foreground,#b56900);box-shadow:0 0 0 5px #f0a02073}}.NPLLIq_upgradeBannerFlash{border-color:var(--dsw-alias-status-warning-foreground,#b56900);animation:.6s ease-in-out 4 NPLLIq_upgradeBannerFlash}.NPLLIq_upgradeBannerText{margin-bottom:6px;font-weight:600}.NPLLIq_upgradeCommands{flex-direction:column;gap:4px;display:flex}.NPLLIq_upgradeCommandRow{align-items:center;gap:6px;display:flex}.NPLLIq_upgradeCommand{background:var(--dsw-alias-bg-layer-2,#0000000a);white-space:nowrap;border-radius:4px;flex:1;min-width:0;padding:4px 6px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;overflow-x:auto}.NPLLIq_copyBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;flex:none;padding:3px 8px;font-size:11px;transition:transform 80ms,background .12s,color .12s}.NPLLIq_copyBtn:hover{background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_copyBtn:active{transform:scale(.92)}.NPLLIq_copyBtnDone{background:var(--dsw-alias-status-success-background,#14963c1f);border-color:var(--dsw-alias-status-success-foreground,#0a7d32);color:var(--dsw-alias-status-success-foreground,#0a7d32);font-weight:600}.NPLLIq_upgradeHint{color:var(--dsw-alias-label-secondary);margin-top:6px;font-size:11px}.NPLLIq_upgradeClose{width:20px;height:20px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;font-size:16px;line-height:1;position:absolute;top:4px;right:6px}.NPLLIq_upgradeClose:hover{background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary)}.NPLLIq_checkUpdatesRow{justify-content:space-between;align-items:center;gap:12px;display:flex}.NPLLIq_checkUpdatesLabel{color:var(--dsw-alias-label-primary);cursor:pointer;align-items:center;gap:6px;font-size:12px;display:flex}.NPLLIq_checkUpdatesLabel input{margin:0}.NPLLIq_checkUpdatesLabel input[type=range]{min-width:90px;accent-color:var(--dsw-alias-brand-primary);flex:1}.NPLLIq_checkUpdatesLabel select{background:var(--dsw-alias-bg-layer-2,#0000000a);min-width:90px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-divider-1,#00000026);border-radius:4px;flex:1;padding:2px 4px;font-size:12px}.NPLLIq_checkBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;text-align:center;border-radius:4px;flex:none;min-width:72px;padding:4px 10px;font-size:12px}.NPLLIq_checkBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_checkBtn:disabled{opacity:.6;cursor:default}.NPLLIq_checkErrorHint{color:var(--dsw-alias-state-error-primary,#c00);background:var(--dsw-alias-state-error-background,#ff00000f);border:1px solid var(--dsw-alias-state-error-border,#b4000040);word-break:break-all;border-radius:6px;margin-top:8px;padding:6px 8px;font-size:11px;line-height:1.4}.NPLLIq_dialog{z-index:100;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;gap:12px;width:430px;max-width:94vw;max-height:80vh;padding:14px;display:flex;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%);box-shadow:0 8px 28px #00000040}.NPLLIq_dialogTabs{border-bottom:1px solid var(--dsw-alias-divider-1,#00000014);gap:2px;margin:-6px -14px 0;padding:0 14px;display:flex}.NPLLIq_dialogTab{appearance:none;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;padding:6px 12px 8px;font-size:12px}.NPLLIq_dialogTab:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_dialogTabActive{color:var(--dsw-alias-brand-primary);border-bottom-color:var(--dsw-alias-brand-primary);font-weight:600}.NPLLIq_settingsDialog{height:min(560px,80vh)}.NPLLIq_dialogTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.NPLLIq_dialogSection{flex-direction:column;gap:6px;display:flex}.NPLLIq_dialogLabel{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:500}.NPLLIq_monitorHint{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_dialogHint{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:11px;line-height:1.4}.NPLLIq_monitorList{flex-direction:column;gap:2px;max-height:180px;display:flex;overflow-y:auto}.NPLLIq_monitorRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:2px 4px;font-size:12px;display:flex}.NPLLIq_monitorRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_monitorName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.NPLLIq_radioRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:3px 4px;font-size:12px;display:flex}.NPLLIq_radioRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_dialogActions{justify-content:flex-end;gap:6px;display:flex}.NPLLIq_dialogBtn,.NPLLIq_dialogBtnPrimary{border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:6px;padding:4px 12px;font-size:11px}.NPLLIq_dialogBtn{background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.NPLLIq_dialogBtnPrimary{background:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay)}.NPLLIq_dialogHeader{z-index:2;background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;justify-content:space-between;align-items:center;gap:8px;margin:-14px -14px 0;padding:14px 14px 8px;display:flex;position:sticky;top:-14px}.NPLLIq_dialogHeader:active{cursor:grabbing}.NPLLIq_dialogClose{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;flex:none;justify-content:center;align-items:center;font-size:18px;line-height:1;display:flex}.NPLLIq_dialogClose:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_resetRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.NPLLIq_resetSelect{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:6px;padding:3px 6px;font-size:12px}.NPLLIq_logTable{border-collapse:collapse;width:100%;font-size:11px}.NPLLIq_logTable th{text-align:left;color:var(--dsw-alias-label-secondary);border-bottom:1px solid var(--dsw-alias-border-l1);padding:4px 6px;font-weight:500}.NPLLIq_logTable td{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;padding:4px 6px}.NPLLIq_logDayCol{white-space:nowrap;color:var(--dsw-alias-label-secondary)}.NPLLIq_logModelCol{text-overflow:ellipsis;white-space:nowrap;max-width:160px;overflow:hidden}.NPLLIq_logUsedCol{text-align:right}.NPLLIq_logDialog{gap:0;width:380px;max-height:min(72vh,480px);padding:0}.NPLLIq_logHeader{background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;flex:none;justify-content:space-between;align-items:center;gap:8px;padding:14px 14px 8px;display:flex}.NPLLIq_logHeader:active{cursor:grabbing}.NPLLIq_logScroll{flex:1;min-height:0;padding:0 14px 14px;overflow:auto}.NPLLIq_logToolbar{flex:1;align-items:center;gap:6px;display:flex}.NPLLIq_logSearch{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);min-width:0;color:var(--dsw-alias-label-primary);border-radius:4px;flex:1;padding:3px 6px;font-size:11px}.NPLLIq_logSearch:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}.NPLLIq_logClearBtn{border:1px solid var(--dsw-alias-state-error-border,#b400004d);color:var(--dsw-alias-state-error-primary,#c00);cursor:pointer;white-space:nowrap;background:0 0;border-radius:4px;flex:none;padding:3px 8px;font-size:11px}.NPLLIq_logClearBtn:hover{background:var(--dsw-alias-state-error-background,#ff00000f)}.NPLLIq_logPager{border-top:1px solid var(--dsw-alias-divider-1,#00000014);background:var(--dsw-alias-bg-overlay);color:var(--dsw-alias-label-secondary);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:6px 14px;font-size:11px;display:flex}.NPLLIq_logPagerInfo{white-space:nowrap}.NPLLIq_logPagerControls{align-items:center;gap:4px;display:flex}.NPLLIq_logPagerBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:24px;height:24px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;font-size:13px;line-height:1}.NPLLIq_logPagerBtn:disabled{opacity:.4;cursor:default}.NPLLIq_logPagerPages{text-align:center;min-width:50px;color:var(--dsw-alias-label-secondary)}.NPLLIq_logPageSizeSelect{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;padding:2px 4px;font-size:11px}.NPLLIq_dialogOverlay{z-index:100001;pointer-events:auto;background:#0000004d;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.NPLLIq_logClearDialog{gap:0;width:320px;padding:16px}.NPLLIq_dialogBody{color:var(--dsw-alias-label-secondary);margin:6px 0 10px;font-size:12px;line-height:1.5}.NPLLIq_logClearDate{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:100%;color:var(--dsw-alias-label-primary);border-radius:6px;margin-bottom:12px;padding:6px 8px;font-size:13px}.NPLLIq_logClearDate:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}";
247
- const tagId = "@jxgame2020/dsh-token-quota/TokenQuotaPanel.module.css";
248
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
255
+ const css$1 = ".NPLLIq_panel{box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;z-index:40;opacity:1;border-radius:12px;flex-direction:column;width:320px;max-height:min(72vh,560px);transition:opacity .18s;display:flex;position:fixed;top:56px;right:12px;overflow:hidden;box-shadow:0 8px 28px #0000002e}.NPLLIq_panelDim{opacity:.55}.NPLLIq_panelDimStrong{opacity:.3}.NPLLIq_header{border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;touch-action:none;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:8px;padding:10px 12px;display:flex}.NPLLIq_header:active{cursor:grabbing}.NPLLIq_headerText{flex-direction:column;gap:2px;min-width:0;display:flex}.NPLLIq_title{color:var(--dsw-alias-label-primary);align-items:baseline;gap:6px;font-size:13px;font-weight:600;display:flex}.NPLLIq_version{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:10px;font-weight:500}.NPLLIq_versionNew{color:var(--dsw-alias-status-warning-foreground,#b56900);background:var(--dsw-alias-status-warning-background,#fff6d7);cursor:default;border-radius:4px;padding:1px 6px}.NPLLIq_subtitle{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_notesBar{flex-wrap:wrap;flex:100%;align-items:center;gap:4px;padding:2px 0 0;display:flex}.NPLLIq_noteChip{width:20px;height:20px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;font-size:11px;line-height:1;transition:color .12s,border-color .12s;display:inline-flex}.NPLLIq_noteChip:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l2)}.NPLLIq_noteChipOpen{color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew{width:22px;height:20px;color:var(--dsw-alias-label-secondary);border:1px dashed var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;transition:color .12s,border-color .12s;display:inline-flex;position:relative}.NPLLIq_noteNew:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_noteNewPlus{color:inherit;font-size:10px;font-weight:700;line-height:1;position:absolute;bottom:-2px;right:-1px}.NPLLIq_noteWin{z-index:60;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000038}.NPLLIq_noteWinCollapsed{height:auto!important}.NPLLIq_noteWinBar{background:var(--dsw-alias-bg-layer-1);border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;flex:none;align-items:center;gap:4px;padding:4px 6px;display:flex}.NPLLIq_noteWinBar:active{cursor:grabbing}.NPLLIq_noteWinGripBar{color:var(--dsw-alias-label-secondary);opacity:.7;flex:none;font-size:10px}.NPLLIq_noteWinTitleText{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;padding:1px 2px;font-size:11px;font-weight:600;overflow:hidden}.NPLLIq_noteWinTitle{min-width:0;color:var(--dsw-alias-label-primary);background:0 0;border:1px solid #0000;border-radius:4px;outline:none;flex:1;padding:1px 2px;font-size:11px;font-weight:600}.NPLLIq_noteWinTitle:hover{border-color:var(--dsw-alias-border-l1)}.NPLLIq_noteWinTitle:focus{background:var(--dsw-alias-bg-overlay);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteWinBtn{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_noteWinBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.NPLLIq_noteWinText{box-sizing:border-box;width:100%;min-height:0;color:var(--dsw-alias-label-primary);resize:none;background:0 0;border:none;outline:none;flex:1;padding:6px 8px;font-family:inherit;font-size:11px;line-height:1.5}.NPLLIq_noteWinResize{cursor:nwse-resize;background:linear-gradient(135deg, transparent 0 45%, var(--dsw-alias-border-l2) 45% 55%, transparent 55% 70%, var(--dsw-alias-border-l2) 70% 80%, transparent 80%);width:14px;height:14px;position:absolute;bottom:0;right:0}.NPLLIq_noteMenuBackdrop{z-index:100;pointer-events:auto;position:fixed;inset:0}.NPLLIq_noteMenu{z-index:101;pointer-events:auto;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;min-width:96px;padding:4px;display:flex;position:fixed;box-shadow:0 8px 24px #0000003d}.NPLLIq_noteMenuItem{text-align:left;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;border-radius:5px;padding:5px 8px;font-size:11px}.NPLLIq_noteMenuItem:hover{background:var(--dsw-alias-bg-layer-2)}.NPLLIq_collapse{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_collapse:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_body{padding:4px 0;overflow-y:auto}.NPLLIq_row{border-bottom:1px solid var(--dsw-alias-border-l1);flex-direction:column;gap:6px;padding:8px 12px;display:flex}.NPLLIq_rowHeader{justify-content:space-between;align-items:center;gap:8px;display:flex}.NPLLIq_rowDrag{cursor:grab;color:var(--dsw-alias-label-secondary);user-select:none;border-radius:4px;flex:none;margin-right:2px;padding:2px 3px;font-size:11px;line-height:1}.NPLLIq_rowDrag:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_rowDrag:active{cursor:grabbing}.NPLLIq_rowDragging{opacity:.45}.NPLLIq_rowDropTarget{box-shadow:inset 0 2px 0 var(--dsw-alias-brand-primary)}.NPLLIq_rowName{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;align-items:center;gap:6px;font-size:12px;font-weight:500;display:inline-flex;overflow:hidden}.NPLLIq_currentBadge{color:var(--dsw-alias-state-success-primary);border:1px solid var(--dsw-alias-state-success-primary);border-radius:8px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_rowMeta{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.NPLLIq_bar{background:var(--dsw-alias-bg-layer-1);border-radius:3px;height:6px;overflow:hidden}.NPLLIq_fillIdle{background:var(--dsw-alias-brand-primary);height:100%;transition:width .2s}.NPLLIq_fillWarn{background:var(--dsw-alias-state-warn-primary);height:100%;transition:width .2s}.NPLLIq_fillOver{background:var(--dsw-alias-state-error-primary);height:100%;transition:width .2s}.NPLLIq_controls{align-items:center;gap:6px;display:flex}.NPLLIq_input{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);min-width:0;color:var(--dsw-alias-label-primary);border-radius:6px;flex:1;padding:4px 8px;font-size:11px}.NPLLIq_input::placeholder{color:var(--dsw-alias-label-secondary)}.NPLLIq_save,.NPLLIq_switch{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;flex:none;padding:4px 10px;font-size:11px}.NPLLIq_save:hover,.NPLLIq_switch:hover:not(:disabled){background:var(--dsw-alias-bg-layer-2)}.NPLLIq_switch:disabled{opacity:.5;cursor:default}.NPLLIq_balanceToggle{margin-left:auto}.NPLLIq_balanceToggleOpen{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceWin{z-index:1199;background:var(--dsw-alias-bg-layer-2);width:280px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;border-radius:12px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000029}.NPLLIq_balanceWinHeader{border-bottom:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-3);user-select:none;align-items:center;gap:6px;padding:6px 8px 6px 12px;display:flex}.NPLLIq_balanceWinTitle{flex:1;font-size:12px;font-weight:600;line-height:1}.NPLLIq_balanceWinBody{font-variant-numeric:tabular-nums;padding:6px 10px 10px;font-size:11px}.NPLLIq_balanceRowHeader{border-bottom:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);grid-template-columns:1fr auto 20px;align-items:center;gap:6px;padding:3px 2px;font-weight:600;display:grid}.NPLLIq_balanceSortBtn{all:unset;cursor:pointer;color:inherit;border-radius:4px;padding:1px 2px;font-size:10px;font-weight:600}.NPLLIq_balanceSortBtn:hover{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRefreshAll{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceRefreshAll:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRefreshAll:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_balanceRow{grid-template-columns:1fr auto 20px;align-items:center;gap:6px;padding:3px 2px;display:grid}.NPLLIq_balanceRow+.NPLLIq_balanceRow{border-top:1px dashed var(--dsw-alias-border-l1)}.NPLLIq_balanceRowName{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:500;overflow:hidden}.NPLLIq_balanceRowValue{text-align:right;font-weight:600}.NPLLIq_balanceRowRefresh{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceRowRefresh:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRowRefresh:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_balanceValueOk{color:var(--dsw-alias-label-primary)}.NPLLIq_balanceValueLow{color:var(--dsw-alias-state-warn-primary)}.NPLLIq_balanceValueError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_balanceStateHint{color:var(--dsw-alias-label-secondary);font-style:italic;font-weight:500}.NPLLIq_balanceStateError{color:var(--dsw-alias-state-error-primary);font-weight:500}.NPLLIq_balanceLastLine{border-top:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-tertiary);margin-top:6px;padding-top:5px;font-size:10px}.NPLLIq_balanceBar{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;justify-content:space-between;align-items:center;gap:6px;padding:5px 12px;font-size:11px;display:flex}.NPLLIq_balanceBarText{text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:6px;min-width:0;font-weight:600;display:inline-flex;overflow:hidden}.NPLLIq_balanceBarBadge{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border-radius:4px;flex:none;padding:0 4px;font-size:10px;font-weight:600}.NPLLIq_balanceBarDim{color:var(--dsw-alias-label-secondary);font-weight:500}.NPLLIq_balanceBarLow{color:var(--dsw-alias-state-warn-primary)}.NPLLIq_balanceBarError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_balanceBarRefresh{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceBarRefresh:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceBarRefresh:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_notice,.NPLLIq_noticeError{color:var(--dsw-alias-label-secondary);padding:10px 12px;font-size:12px}.NPLLIq_noticeError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_tab{background:var(--dsw-alias-brand-primary);border:1px solid var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay);pointer-events:auto;cursor:pointer;z-index:90;border-radius:10px;align-items:center;gap:6px;padding:9px 14px;font-size:12px;font-weight:600;display:inline-flex;position:fixed;top:56px;right:12px;box-shadow:0 6px 20px #00000040}.NPLLIq_tab:hover{filter:brightness(1.08)}.NPLLIq_tabIcon{font-size:12px;line-height:1}.NPLLIq_tabLabel{white-space:nowrap}.NPLLIq_headerActions{flex:none;align-items:center;gap:4px;display:flex}.NPLLIq_settingsBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_settingsBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_settingsBtnActive{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-2,#0000000f);box-shadow:inset 0 0 0 1px var(--dsw-alias-brand-primary);font-weight:700}.NPLLIq_selectBtn{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-brand-primary);cursor:pointer;background:0 0;border-radius:6px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_selectBtn:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_gearBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;flex:none;margin-left:6px;padding:0 2px;font-size:12px;line-height:1}.NPLLIq_gearBtn:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_fullNotice{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-state-error-primary);border-radius:8px;margin:6px 12px;padding:8px 10px;font-size:12px}.NPLLIq_upgradeBanner{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-divider-1,#0000001a);border-radius:8px;margin:6px 12px;padding:10px 30px 10px 10px;font-size:12px;position:relative}@keyframes NPLLIq_upgradeBannerFlash{0%,to{border-color:var(--dsw-alias-divider-1,#0000001a);box-shadow:0 0 #f0a02000}50%{border-color:var(--dsw-alias-status-warning-foreground,#b56900);box-shadow:0 0 0 5px #f0a02073}}.NPLLIq_upgradeBannerFlash{border-color:var(--dsw-alias-status-warning-foreground,#b56900);animation:.6s ease-in-out 4 NPLLIq_upgradeBannerFlash}.NPLLIq_upgradeBannerText{margin-bottom:6px;font-weight:600}.NPLLIq_upgradeCommands{flex-direction:column;gap:4px;display:flex}.NPLLIq_upgradeCommandRow{align-items:center;gap:6px;display:flex}.NPLLIq_upgradeCommand{background:var(--dsw-alias-bg-layer-2,#0000000a);white-space:nowrap;border-radius:4px;flex:1;min-width:0;padding:4px 6px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;overflow-x:auto}.NPLLIq_copyBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;flex:none;padding:3px 8px;font-size:11px;transition:transform 80ms,background .12s,color .12s}.NPLLIq_copyBtn:hover{background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_copyBtn:active{transform:scale(.92)}.NPLLIq_copyBtnDone{background:var(--dsw-alias-status-success-background,#14963c1f);border-color:var(--dsw-alias-status-success-foreground,#0a7d32);color:var(--dsw-alias-status-success-foreground,#0a7d32);font-weight:600}.NPLLIq_upgradeHint{color:var(--dsw-alias-label-secondary);margin-top:6px;font-size:11px}.NPLLIq_upgradeClose{width:20px;height:20px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;font-size:16px;line-height:1;position:absolute;top:4px;right:6px}.NPLLIq_upgradeClose:hover{background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary)}.NPLLIq_checkUpdatesRow{justify-content:space-between;align-items:center;gap:12px;display:flex}.NPLLIq_checkUpdatesLabel{color:var(--dsw-alias-label-primary);cursor:pointer;align-items:center;gap:6px;font-size:12px;display:flex}.NPLLIq_checkUpdatesLabel input{margin:0}.NPLLIq_checkUpdatesLabel input[type=range]{min-width:90px;accent-color:var(--dsw-alias-brand-primary);flex:1}.NPLLIq_checkUpdatesLabel select{background:var(--dsw-alias-bg-layer-2,#0000000a);min-width:90px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-divider-1,#00000026);border-radius:4px;flex:1;padding:2px 4px;font-size:12px}.NPLLIq_checkBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;text-align:center;border-radius:4px;flex:none;min-width:72px;padding:4px 10px;font-size:12px}.NPLLIq_checkBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_checkBtn:disabled{opacity:.6;cursor:default}.NPLLIq_checkErrorHint{color:var(--dsw-alias-state-error-primary,#c00);background:var(--dsw-alias-state-error-background,#ff00000f);border:1px solid var(--dsw-alias-state-error-border,#b4000040);word-break:break-all;border-radius:6px;margin-top:8px;padding:6px 8px;font-size:11px;line-height:1.4}.NPLLIq_dialog{z-index:100;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;gap:12px;width:430px;max-width:94vw;max-height:80vh;padding:14px;display:flex;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%);box-shadow:0 8px 28px #00000040}.NPLLIq_dialogTabs{border-bottom:1px solid var(--dsw-alias-divider-1,#00000014);gap:2px;margin:-6px -14px 0;padding:0 14px;display:flex}.NPLLIq_dialogTab{appearance:none;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;padding:6px 12px 8px;font-size:12px}.NPLLIq_dialogTab:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_dialogTabActive{color:var(--dsw-alias-brand-primary);border-bottom-color:var(--dsw-alias-brand-primary);font-weight:600}.NPLLIq_settingsDialog{height:min(560px,80vh)}.NPLLIq_dialogTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.NPLLIq_dialogSection{flex-direction:column;gap:6px;display:flex}.NPLLIq_dialogLabel{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:500}.NPLLIq_monitorHint{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_dialogHint{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:11px;line-height:1.4}.NPLLIq_monitorList{flex-direction:column;gap:2px;max-height:180px;display:flex;overflow-y:auto}.NPLLIq_monitorRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:2px 4px;font-size:12px;display:flex}.NPLLIq_monitorRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_monitorName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.NPLLIq_radioRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:3px 4px;font-size:12px;display:flex}.NPLLIq_radioRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_dialogActions{justify-content:flex-end;gap:6px;display:flex}.NPLLIq_dialogBtn,.NPLLIq_dialogBtnPrimary{border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:6px;padding:4px 12px;font-size:11px}.NPLLIq_dialogBtn{background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.NPLLIq_dialogBtnPrimary{background:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay)}.NPLLIq_dialogHeader{z-index:2;background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;justify-content:space-between;align-items:center;gap:8px;margin:-14px -14px 0;padding:14px 14px 8px;display:flex;position:sticky;top:-14px}.NPLLIq_dialogHeader:active{cursor:grabbing}.NPLLIq_dialogClose{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;flex:none;justify-content:center;align-items:center;font-size:18px;line-height:1;display:flex}.NPLLIq_dialogClose:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_resetRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.NPLLIq_resetSelect{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:6px;padding:3px 6px;font-size:12px}.NPLLIq_logTable{border-collapse:collapse;width:100%;font-size:11px}.NPLLIq_logTable th{text-align:left;color:var(--dsw-alias-label-secondary);border-bottom:1px solid var(--dsw-alias-border-l1);padding:4px 6px;font-weight:500}.NPLLIq_logTable td{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;padding:4px 6px}.NPLLIq_logDayCol{white-space:nowrap;color:var(--dsw-alias-label-secondary)}.NPLLIq_logModelCol{text-overflow:ellipsis;white-space:nowrap;max-width:160px;overflow:hidden}.NPLLIq_logUsedCol{text-align:right}.NPLLIq_logDialog{gap:0;width:380px;max-height:min(72vh,480px);padding:0}.NPLLIq_logHeader{background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;flex:none;justify-content:space-between;align-items:center;gap:8px;padding:14px 14px 8px;display:flex}.NPLLIq_logHeader:active{cursor:grabbing}.NPLLIq_logScroll{flex:1;min-height:0;padding:0 14px 14px;overflow:auto}.NPLLIq_logToolbar{flex:1;align-items:center;gap:6px;display:flex}.NPLLIq_logSearch{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);min-width:0;color:var(--dsw-alias-label-primary);border-radius:4px;flex:1;padding:3px 6px;font-size:11px}.NPLLIq_logSearch:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}.NPLLIq_logClearBtn{border:1px solid var(--dsw-alias-state-error-border,#b400004d);color:var(--dsw-alias-state-error-primary,#c00);cursor:pointer;white-space:nowrap;background:0 0;border-radius:4px;flex:none;padding:3px 8px;font-size:11px}.NPLLIq_logClearBtn:hover{background:var(--dsw-alias-state-error-background,#ff00000f)}.NPLLIq_logPager{border-top:1px solid var(--dsw-alias-divider-1,#00000014);background:var(--dsw-alias-bg-overlay);color:var(--dsw-alias-label-secondary);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:6px 14px;font-size:11px;display:flex}.NPLLIq_logPagerInfo{white-space:nowrap}.NPLLIq_logPagerControls{align-items:center;gap:4px;display:flex}.NPLLIq_logPagerBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:24px;height:24px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;font-size:13px;line-height:1}.NPLLIq_logPagerBtn:disabled{opacity:.4;cursor:default}.NPLLIq_logPagerPages{text-align:center;min-width:50px;color:var(--dsw-alias-label-secondary)}.NPLLIq_logPageSizeSelect{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;padding:2px 4px;font-size:11px}.NPLLIq_dialogOverlay{z-index:100001;pointer-events:auto;background:#0000004d;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.NPLLIq_logClearDialog{gap:0;width:320px;padding:16px}.NPLLIq_dialogBody{color:var(--dsw-alias-label-secondary);margin:6px 0 10px;font-size:12px;line-height:1.5}.NPLLIq_logClearDate{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:100%;color:var(--dsw-alias-label-primary);border-radius:6px;margin-bottom:12px;padding:6px 8px;font-size:13px}.NPLLIq_logClearDate:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}";
256
+ const tagId$1 = "@jxgame2020/dsh-token-quota/TokenQuotaPanel.module.css";
257
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
249
258
  const tag = document.createElement("style");
250
259
  tag.dataset.plugin = "@jxgame2020/dsh-token-quota";
251
- tag.dataset.pluginCss = tagId;
252
- tag.textContent = css;
260
+ tag.dataset.pluginCss = tagId$1;
261
+ tag.textContent = css$1;
253
262
  document.head.appendChild(tag);
254
263
  }
255
264
  var TokenQuotaPanel_module_css_default = {
256
- "logPagerBtn": "NPLLIq_logPagerBtn",
257
- "selectBtn": "NPLLIq_selectBtn",
265
+ "balanceToggleOpen": "NPLLIq_balanceToggleOpen",
266
+ "settingsBtn": "NPLLIq_settingsBtn",
267
+ "fillOver": "NPLLIq_fillOver",
268
+ "checkErrorHint": "NPLLIq_checkErrorHint",
269
+ "dialogBtn": "NPLLIq_dialogBtn",
270
+ "logScroll": "NPLLIq_logScroll",
271
+ "logPager": "NPLLIq_logPager",
272
+ "logPagerControls": "NPLLIq_logPagerControls",
273
+ "logPageSizeSelect": "NPLLIq_logPageSizeSelect",
274
+ "balanceWinHeader": "NPLLIq_balanceWinHeader",
275
+ "balanceBarRefresh": "NPLLIq_balanceBarRefresh",
276
+ "gearBtn": "NPLLIq_gearBtn",
277
+ "logDayCol": "NPLLIq_logDayCol",
278
+ "noteChip": "NPLLIq_noteChip",
279
+ "dialogClose": "NPLLIq_dialogClose",
280
+ "radioRow": "NPLLIq_radioRow",
281
+ "noteMenuBackdrop": "NPLLIq_noteMenuBackdrop",
282
+ "rowMeta": "NPLLIq_rowMeta",
283
+ "balanceRowValue": "NPLLIq_balanceRowValue",
284
+ "collapse": "NPLLIq_collapse",
285
+ "tab": "NPLLIq_tab",
286
+ "balanceRowRefresh": "NPLLIq_balanceRowRefresh",
287
+ "dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
288
+ "tabIcon": "NPLLIq_tabIcon",
289
+ "header": "NPLLIq_header",
290
+ "balanceRefreshAll": "NPLLIq_balanceRefreshAll",
258
291
  "dialogOverlay": "NPLLIq_dialogOverlay",
259
- "fillIdle": "NPLLIq_fillIdle",
260
- "balanceBarText": "NPLLIq_balanceBarText",
261
- "balanceWinBody": "NPLLIq_balanceWinBody",
262
- "monitorRow": "NPLLIq_monitorRow",
263
- "resetSelect": "NPLLIq_resetSelect",
264
- "upgradeCommandRow": "NPLLIq_upgradeCommandRow",
265
- "rowDrag": "NPLLIq_rowDrag",
292
+ "noteWinBtn": "NPLLIq_noteWinBtn",
293
+ "subtitle": "NPLLIq_subtitle",
294
+ "rowHeader": "NPLLIq_rowHeader",
295
+ "monitorName": "NPLLIq_monitorName",
266
296
  "logClearDate": "NPLLIq_logClearDate",
297
+ "balanceStateError": "NPLLIq_balanceStateError",
298
+ "row": "NPLLIq_row",
299
+ "balanceStateHint": "NPLLIq_balanceStateHint",
300
+ "balanceBarDim": "NPLLIq_balanceBarDim",
267
301
  "headerText": "NPLLIq_headerText",
268
- "noteWinBtn": "NPLLIq_noteWinBtn",
269
- "fillOver": "NPLLIq_fillOver",
270
- "copyBtn": "NPLLIq_copyBtn",
271
- "balanceBarLow": "NPLLIq_balanceBarLow",
272
- "switch": "NPLLIq_switch",
273
- "dialogHeader": "NPLLIq_dialogHeader",
274
- "logSearch": "NPLLIq_logSearch",
275
- "dialogClose": "NPLLIq_dialogClose",
302
+ "settingsDialog": "NPLLIq_settingsDialog",
303
+ "panelDimStrong": "NPLLIq_panelDimStrong",
304
+ "balanceValueOk": "NPLLIq_balanceValueOk",
305
+ "noteChipOpen": "NPLLIq_noteChipOpen",
306
+ "upgradeBanner": "NPLLIq_upgradeBanner",
307
+ "title": "NPLLIq_title",
308
+ "dialogLabel": "NPLLIq_dialogLabel",
276
309
  "logPagerInfo": "NPLLIq_logPagerInfo",
277
- "balanceToggleOpen": "NPLLIq_balanceToggleOpen",
278
- "logPagerControls": "NPLLIq_logPagerControls",
279
- "versionNew": "NPLLIq_versionNew",
280
- "headerActions": "NPLLIq_headerActions",
281
- "logPager": "NPLLIq_logPager",
282
- "upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
283
- "logScroll": "NPLLIq_logScroll",
284
- "balanceRefreshAll": "NPLLIq_balanceRefreshAll",
285
- "noteWinTitle": "NPLLIq_noteWinTitle",
286
- "logDialog": "NPLLIq_logDialog",
310
+ "balanceWinBody": "NPLLIq_balanceWinBody",
311
+ "noteWinResize": "NPLLIq_noteWinResize",
312
+ "noteNewPlus": "NPLLIq_noteNewPlus",
313
+ "selectBtn": "NPLLIq_selectBtn",
287
314
  "upgradeCommands": "NPLLIq_upgradeCommands",
288
- "resetRow": "NPLLIq_resetRow",
289
- "noteWinText": "NPLLIq_noteWinText",
290
- "save": "NPLLIq_save",
291
315
  "balanceBarError": "NPLLIq_balanceBarError",
292
- "row": "NPLLIq_row",
293
- "checkBtn": "NPLLIq_checkBtn",
294
- "balanceValueLow": "NPLLIq_balanceValueLow",
295
- "notesBar": "NPLLIq_notesBar",
316
+ "upgradeClose": "NPLLIq_upgradeClose",
317
+ "logToolbar": "NPLLIq_logToolbar",
318
+ "balanceValueError": "NPLLIq_balanceValueError",
319
+ "upgradeCommand": "NPLLIq_upgradeCommand",
320
+ "input": "NPLLIq_input",
321
+ "monitorList": "NPLLIq_monitorList",
296
322
  "dialogActions": "NPLLIq_dialogActions",
297
- "logDayCol": "NPLLIq_logDayCol",
298
- "bar": "NPLLIq_bar",
299
- "upgradeBannerText": "NPLLIq_upgradeBannerText",
300
- "noteNew": "NPLLIq_noteNew",
301
- "logModelCol": "NPLLIq_logModelCol",
302
- "logTable": "NPLLIq_logTable",
303
- "noteMenuBackdrop": "NPLLIq_noteMenuBackdrop",
304
- "noteChip": "NPLLIq_noteChip",
323
+ "noteWinTitleText": "NPLLIq_noteWinTitleText",
324
+ "rowDragging": "NPLLIq_rowDragging",
325
+ "balanceRow": "NPLLIq_balanceRow",
305
326
  "noteWinCollapsed": "NPLLIq_noteWinCollapsed",
306
- "currentBadge": "NPLLIq_currentBadge",
307
- "input": "NPLLIq_input",
308
- "balanceSortBtn": "NPLLIq_balanceSortBtn",
327
+ "fillIdle": "NPLLIq_fillIdle",
328
+ "balanceRowName": "NPLLIq_balanceRowName",
329
+ "noteMenu": "NPLLIq_noteMenu",
309
330
  "fillWarn": "NPLLIq_fillWarn",
310
- "gearBtn": "NPLLIq_gearBtn",
311
- "monitorList": "NPLLIq_monitorList",
331
+ "noteWinGripBar": "NPLLIq_noteWinGripBar",
332
+ "rowDrag": "NPLLIq_rowDrag",
333
+ "noteMenuItem": "NPLLIq_noteMenuItem",
334
+ "rowName": "NPLLIq_rowName",
335
+ "version": "NPLLIq_version",
336
+ "dialogTabs": "NPLLIq_dialogTabs",
337
+ "controls": "NPLLIq_controls",
338
+ "balanceSortBtn": "NPLLIq_balanceSortBtn",
339
+ "currentBadge": "NPLLIq_currentBadge",
312
340
  "checkUpdatesRow": "NPLLIq_checkUpdatesRow",
341
+ "dialogHeader": "NPLLIq_dialogHeader",
342
+ "upgradeCommandRow": "NPLLIq_upgradeCommandRow",
343
+ "upgradeHint": "NPLLIq_upgradeHint",
344
+ "noteWin": "NPLLIq_noteWin",
313
345
  "dialogTab": "NPLLIq_dialogTab",
314
- "subtitle": "NPLLIq_subtitle",
346
+ "dialogTitle": "NPLLIq_dialogTitle",
347
+ "noteWinBar": "NPLLIq_noteWinBar",
348
+ "headerActions": "NPLLIq_headerActions",
349
+ "versionNew": "NPLLIq_versionNew",
315
350
  "dialog": "NPLLIq_dialog",
316
- "controls": "NPLLIq_controls",
351
+ "dialogTabActive": "NPLLIq_dialogTabActive",
352
+ "logSearch": "NPLLIq_logSearch",
317
353
  "noticeError": "NPLLIq_noticeError",
318
- "tabLabel": "NPLLIq_tabLabel",
319
- "checkErrorHint": "NPLLIq_checkErrorHint",
320
- "balanceStateError": "NPLLIq_balanceStateError",
321
- "logHeader": "NPLLIq_logHeader",
322
- "logClearDialog": "NPLLIq_logClearDialog",
354
+ "monitorRow": "NPLLIq_monitorRow",
355
+ "resetSelect": "NPLLIq_resetSelect",
356
+ "logModelCol": "NPLLIq_logModelCol",
357
+ "bar": "NPLLIq_bar",
323
358
  "logClearBtn": "NPLLIq_logClearBtn",
324
- "noteWinGripBar": "NPLLIq_noteWinGripBar",
325
- "noteWinResize": "NPLLIq_noteWinResize",
326
- "collapse": "NPLLIq_collapse",
327
- "monitorHint": "NPLLIq_monitorHint",
328
- "title": "NPLLIq_title",
329
- "noteChipOpen": "NPLLIq_noteChipOpen",
330
- "copyBtnDone": "NPLLIq_copyBtnDone",
331
- "noteWinTitleText": "NPLLIq_noteWinTitleText",
332
- "balanceLastLine": "NPLLIq_balanceLastLine",
333
- "noteNewPlus": "NPLLIq_noteNewPlus",
334
- "rowDropTarget": "NPLLIq_rowDropTarget",
335
- "balanceValueError": "NPLLIq_balanceValueError",
336
- "upgradeBanner": "NPLLIq_upgradeBanner",
337
- "logToolbar": "NPLLIq_logToolbar",
338
- "version": "NPLLIq_version",
339
- "balanceRowRefresh": "NPLLIq_balanceRowRefresh",
340
- "balanceStateHint": "NPLLIq_balanceStateHint",
341
- "noteWinBar": "NPLLIq_noteWinBar",
342
- "rowHeader": "NPLLIq_rowHeader",
343
- "balanceWin": "NPLLIq_balanceWin",
344
- "balanceWinTitle": "NPLLIq_balanceWinTitle",
345
- "balanceBar": "NPLLIq_balanceBar",
346
- "balanceRowName": "NPLLIq_balanceRowName",
347
- "dialogTabs": "NPLLIq_dialogTabs",
348
- "noteMenu": "NPLLIq_noteMenu",
349
- "rowDragging": "NPLLIq_rowDragging",
350
- "panelDimStrong": "NPLLIq_panelDimStrong",
351
- "dialogSection": "NPLLIq_dialogSection",
352
- "dialogLabel": "NPLLIq_dialogLabel",
353
- "monitorName": "NPLLIq_monitorName",
354
- "logPagerPages": "NPLLIq_logPagerPages",
355
- "balanceValueOk": "NPLLIq_balanceValueOk",
356
- "body": "NPLLIq_body",
357
359
  "settingsBtnActive": "NPLLIq_settingsBtnActive",
358
- "logPageSizeSelect": "NPLLIq_logPageSizeSelect",
359
- "panel": "NPLLIq_panel",
360
- "balanceRowHeader": "NPLLIq_balanceRowHeader",
361
- "balanceBarDim": "NPLLIq_balanceBarDim",
362
- "dialogBtn": "NPLLIq_dialogBtn",
360
+ "balanceToggle": "NPLLIq_balanceToggle",
361
+ "balanceBarLow": "NPLLIq_balanceBarLow",
362
+ "save": "NPLLIq_save",
363
+ "noteWinText": "NPLLIq_noteWinText",
364
+ "logClearDialog": "NPLLIq_logClearDialog",
365
+ "balanceBarBadge": "NPLLIq_balanceBarBadge",
366
+ "logPagerBtn": "NPLLIq_logPagerBtn",
363
367
  "panelDim": "NPLLIq_panelDim",
364
- "balanceWinHeader": "NPLLIq_balanceWinHeader",
365
- "radioRow": "NPLLIq_radioRow",
366
- "dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
367
- "header": "NPLLIq_header",
368
+ "balanceWin": "NPLLIq_balanceWin",
369
+ "balanceBarText": "NPLLIq_balanceBarText",
370
+ "upgradeBannerText": "NPLLIq_upgradeBannerText",
368
371
  "fullNotice": "NPLLIq_fullNotice",
369
- "upgradeCommand": "NPLLIq_upgradeCommand",
370
- "dialogTabActive": "NPLLIq_dialogTabActive",
371
- "balanceRowValue": "NPLLIq_balanceRowValue",
372
- "balanceToggle": "NPLLIq_balanceToggle",
373
- "rowMeta": "NPLLIq_rowMeta",
374
- "balanceBarRefresh": "NPLLIq_balanceBarRefresh",
375
372
  "checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
376
- "rowName": "NPLLIq_rowName",
373
+ "resetRow": "NPLLIq_resetRow",
374
+ "rowDropTarget": "NPLLIq_rowDropTarget",
375
+ "logHeader": "NPLLIq_logHeader",
376
+ "logTable": "NPLLIq_logTable",
377
+ "tabLabel": "NPLLIq_tabLabel",
378
+ "balanceValueLow": "NPLLIq_balanceValueLow",
379
+ "switch": "NPLLIq_switch",
380
+ "noteNew": "NPLLIq_noteNew",
381
+ "copyBtnDone": "NPLLIq_copyBtnDone",
382
+ "panel": "NPLLIq_panel",
383
+ "dialogBody": "NPLLIq_dialogBody",
384
+ "balanceRowHeader": "NPLLIq_balanceRowHeader",
377
385
  "logUsedCol": "NPLLIq_logUsedCol",
378
- "noteWin": "NPLLIq_noteWin",
379
- "notice": "NPLLIq_notice",
380
- "settingsDialog": "NPLLIq_settingsDialog",
386
+ "body": "NPLLIq_body",
387
+ "logDialog": "NPLLIq_logDialog",
381
388
  "dialogHint": "NPLLIq_dialogHint",
382
- "balanceBarBadge": "NPLLIq_balanceBarBadge",
383
- "noteMenuItem": "NPLLIq_noteMenuItem",
384
- "upgradeClose": "NPLLIq_upgradeClose",
385
- "tab": "NPLLIq_tab",
386
- "dialogTitle": "NPLLIq_dialogTitle",
387
- "balanceRow": "NPLLIq_balanceRow",
388
- "dialogBody": "NPLLIq_dialogBody",
389
- "settingsBtn": "NPLLIq_settingsBtn",
390
- "upgradeHint": "NPLLIq_upgradeHint",
391
- "tabIcon": "NPLLIq_tabIcon"
389
+ "logPagerPages": "NPLLIq_logPagerPages",
390
+ "notice": "NPLLIq_notice",
391
+ "dialogSection": "NPLLIq_dialogSection",
392
+ "copyBtn": "NPLLIq_copyBtn",
393
+ "checkBtn": "NPLLIq_checkBtn",
394
+ "noteWinTitle": "NPLLIq_noteWinTitle",
395
+ "notesBar": "NPLLIq_notesBar",
396
+ "balanceLastLine": "NPLLIq_balanceLastLine",
397
+ "balanceWinTitle": "NPLLIq_balanceWinTitle",
398
+ "balanceBar": "NPLLIq_balanceBar",
399
+ "monitorHint": "NPLLIq_monitorHint",
400
+ "upgradeBannerFlash": "NPLLIq_upgradeBannerFlash"
392
401
  };
393
402
  //#endregion
394
403
  //#region lib/types/client/TokenQuotaPanel.js
@@ -526,7 +535,7 @@ window.__ModuleLoader__.load({
526
535
  * @param props - composed slot props.
527
536
  * @returns the panel element tree.
528
537
  */
529
- function TokenQuotaPanel({ t, load, setLimit, selectModel, setMonitored, setOnFull, setReset, setCheckUpdates, checkUpdatesNow, clearLogBefore, setDimWhenIdle, setModelOrder, saveNotes, setBalanceSettings, refreshBalance, setMusicEnabled, setMusicVolume, setMusicStyle, setMusicOnlyCurrentSession, useStore, actions, useSessions }) {
538
+ function TokenQuotaPanel({ t, load, setLimit, selectModel, setMonitored, setOnFull, setReset, setCheckUpdates, checkUpdatesNow, clearLogBefore, setDimWhenIdle, setModelOrder, saveNotes, setBalanceSettings, refreshBalance, setMusicEnabled, setMusicVolume, setMusicStyle, setMusicOnlyCurrentSession, setTranscribeSettings, useStore, actions, useSessions }) {
530
539
  const [collapsed, setCollapsed] = (0, react.useState)(false);
531
540
  const [drafts, setDrafts] = (0, react.useState)({});
532
541
  const [editingKey, setEditingKey] = (0, react.useState)(null);
@@ -698,6 +707,7 @@ window.__ModuleLoader__.load({
698
707
  const musicVolume = useStore((s) => s.musicVolume);
699
708
  const musicStyle = useStore((s) => s.musicStyle);
700
709
  const musicOnlyCurrentSession = useStore((s) => s.musicOnlyCurrentSession);
710
+ const transcribe = useStore((s) => s.transcribe);
701
711
  const upgrade = useStore((s) => s.upgrade);
702
712
  const upgradeDismissed = useStore((s) => s.upgradeDismissed);
703
713
  const checkingUpdates = useStore((s) => s.checkingUpdates);
@@ -879,7 +889,7 @@ window.__ModuleLoader__.load({
879
889
  for (const provider of providers) {
880
890
  const bal = balances.find((b) => b.provider === provider);
881
891
  if (bal !== void 0) map.set(provider, bal);
882
- else if (TOKEN_QUOTA_BALANCE_PROVIDERS.includes(provider)) map.set(provider, "loading");
892
+ else if (balances.length === 0) map.set(provider, "loading");
883
893
  else map.set(provider, "unsupported");
884
894
  }
885
895
  return map;
@@ -1058,13 +1068,13 @@ window.__ModuleLoader__.load({
1058
1068
  title: t("upgradeAvailableHint"),
1059
1069
  children: [
1060
1070
  "v",
1061
- "0.1.39",
1071
+ "0.1.41",
1062
1072
  " → v",
1063
1073
  upgrade.latestVersion
1064
1074
  ]
1065
1075
  }) : (0, react_jsx_runtime.jsxs)("span", {
1066
1076
  className: TokenQuotaPanel_module_css_default.version,
1067
- children: ["v", "0.1.39"]
1077
+ children: ["v", "0.1.41"]
1068
1078
  })]
1069
1079
  })
1070
1080
  }),
@@ -1451,6 +1461,16 @@ window.__ModuleLoader__.load({
1451
1461
  },
1452
1462
  children: t("settingsTabMusic")
1453
1463
  }),
1464
+ (0, react_jsx_runtime.jsx)("button", {
1465
+ type: "button",
1466
+ role: "tab",
1467
+ "aria-selected": settingsTab === "transcribe",
1468
+ className: `${TokenQuotaPanel_module_css_default.dialogTab}${settingsTab === "transcribe" ? ` ${TokenQuotaPanel_module_css_default.dialogTabActive}` : ""}`,
1469
+ onClick: () => {
1470
+ setSettingsTab("transcribe");
1471
+ },
1472
+ children: t("settingsTabTranscribe")
1473
+ }),
1454
1474
  (0, react_jsx_runtime.jsx)("button", {
1455
1475
  type: "button",
1456
1476
  role: "tab",
@@ -1661,6 +1681,83 @@ window.__ModuleLoader__.load({
1661
1681
  })
1662
1682
  ]
1663
1683
  })] }),
1684
+ settingsTab === "transcribe" && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
1685
+ className: TokenQuotaPanel_module_css_default.dialogSection,
1686
+ children: [(0, react_jsx_runtime.jsxs)("label", {
1687
+ className: TokenQuotaPanel_module_css_default.checkUpdatesLabel,
1688
+ children: [(0, react_jsx_runtime.jsx)("input", {
1689
+ type: "checkbox",
1690
+ checked: transcribe.enabled,
1691
+ onChange: (event) => {
1692
+ setTranscribeSettings({
1693
+ ...transcribe,
1694
+ enabled: event.target.checked
1695
+ });
1696
+ }
1697
+ }), (0, react_jsx_runtime.jsx)("span", { children: t("transcribeEnabledLabel") })]
1698
+ }), (0, react_jsx_runtime.jsx)("div", {
1699
+ className: TokenQuotaPanel_module_css_default.dialogHint,
1700
+ children: t("transcribeEnabledHint")
1701
+ })]
1702
+ }), transcribe.enabled && (0, react_jsx_runtime.jsxs)("div", {
1703
+ className: TokenQuotaPanel_module_css_default.dialogSection,
1704
+ children: [
1705
+ (0, react_jsx_runtime.jsxs)("label", {
1706
+ className: TokenQuotaPanel_module_css_default.checkUpdatesLabel,
1707
+ children: [(0, react_jsx_runtime.jsx)("span", { children: t("transcribeBaseURLLabel") }), (0, react_jsx_runtime.jsx)("input", {
1708
+ className: TokenQuotaPanel_module_css_default.resetSelect,
1709
+ type: "text",
1710
+ value: transcribe.baseURL,
1711
+ onChange: (event) => {
1712
+ setTranscribeSettings({
1713
+ ...transcribe,
1714
+ baseURL: event.target.value
1715
+ });
1716
+ }
1717
+ })]
1718
+ }),
1719
+ (0, react_jsx_runtime.jsx)("div", {
1720
+ className: TokenQuotaPanel_module_css_default.dialogHint,
1721
+ children: t("transcribeBaseURLHint")
1722
+ }),
1723
+ (0, react_jsx_runtime.jsxs)("label", {
1724
+ className: TokenQuotaPanel_module_css_default.checkUpdatesLabel,
1725
+ children: [(0, react_jsx_runtime.jsx)("span", { children: t("transcribeApiKeyEnvLabel") }), (0, react_jsx_runtime.jsx)("input", {
1726
+ className: TokenQuotaPanel_module_css_default.resetSelect,
1727
+ type: "text",
1728
+ value: transcribe.apiKeyEnv,
1729
+ onChange: (event) => {
1730
+ setTranscribeSettings({
1731
+ ...transcribe,
1732
+ apiKeyEnv: event.target.value
1733
+ });
1734
+ }
1735
+ })]
1736
+ }),
1737
+ (0, react_jsx_runtime.jsx)("div", {
1738
+ className: TokenQuotaPanel_module_css_default.dialogHint,
1739
+ children: t("transcribeApiKeyEnvHint")
1740
+ }),
1741
+ (0, react_jsx_runtime.jsxs)("label", {
1742
+ className: TokenQuotaPanel_module_css_default.checkUpdatesLabel,
1743
+ children: [(0, react_jsx_runtime.jsx)("span", { children: t("transcribeModelLabel") }), (0, react_jsx_runtime.jsx)("input", {
1744
+ className: TokenQuotaPanel_module_css_default.resetSelect,
1745
+ type: "text",
1746
+ value: transcribe.model,
1747
+ onChange: (event) => {
1748
+ setTranscribeSettings({
1749
+ ...transcribe,
1750
+ model: event.target.value
1751
+ });
1752
+ }
1753
+ })]
1754
+ }),
1755
+ (0, react_jsx_runtime.jsx)("div", {
1756
+ className: TokenQuotaPanel_module_css_default.dialogHint,
1757
+ children: t("transcribeModelHint")
1758
+ })
1759
+ ]
1760
+ })] }),
1664
1761
  settingsTab === "other" && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
1665
1762
  className: TokenQuotaPanel_module_css_default.dialogSection,
1666
1763
  children: [(0, react_jsx_runtime.jsxs)("div", {
@@ -2782,6 +2879,169 @@ window.__ModuleLoader__.load({
2782
2879
  }
2783
2880
  };
2784
2881
  //#endregion
2882
+ //#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/mic.module.css.mjs
2883
+ const css = ".KCoVpa_micWrap{z-index:10;pointer-events:auto;align-items:center;gap:4px;display:flex;position:absolute;top:4px;right:6px}.KCoVpa_micBtn{width:26px;height:26px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:8px;justify-content:center;align-items:center;padding:0;font-size:14px;line-height:1;transition:color .15s,background .15s,border-color .15s;display:inline-flex}.KCoVpa_micBtn:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-3)}.KCoVpa_micRec{color:#fff;background:var(--dsw-alias-state-error-primary);border-color:var(--dsw-alias-state-error-primary);animation:1.2s ease-in-out infinite KCoVpa_micPulse}.KCoVpa_micBusy{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-3);cursor:progress}.KCoVpa_micErr{border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}.KCoVpa_micErrTip{background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-state-error-primary);max-width:180px;color:var(--dsw-alias-state-error-primary);white-space:normal;word-break:break-word;border-radius:6px;padding:3px 6px;font-size:10px;line-height:1.3}@keyframes KCoVpa_micPulse{0%,to{opacity:1}50%{opacity:.5}}";
2884
+ const tagId = "@jxgame2020/dsh-token-quota/mic.module.css";
2885
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
2886
+ const tag = document.createElement("style");
2887
+ tag.dataset.plugin = "@jxgame2020/dsh-token-quota";
2888
+ tag.dataset.pluginCss = tagId;
2889
+ tag.textContent = css;
2890
+ document.head.appendChild(tag);
2891
+ }
2892
+ var mic_module_css_default = {
2893
+ "micRec": "KCoVpa_micRec",
2894
+ "micErr": "KCoVpa_micErr",
2895
+ "micErrTip": "KCoVpa_micErrTip",
2896
+ "micBusy": "KCoVpa_micBusy",
2897
+ "micWrap": "KCoVpa_micWrap",
2898
+ "micBtn": "KCoVpa_micBtn",
2899
+ "micPulse": "KCoVpa_micPulse"
2900
+ };
2901
+ //#endregion
2902
+ //#region lib/types/client/mic.js
2903
+ /**
2904
+ * Composer mic button: registered into `conversation.input.overlay` so it sits
2905
+ * inside the chat composer card (top-right corner). A press starts recording
2906
+ * from the microphone; a second press stops it and sends the audio blob to the
2907
+ * Host, which forwards it to the configured OpenAI-compatible transcription
2908
+ * endpoint. The returned text is appended to the composer. The button only
2909
+ * renders while transcription is enabled in the token-quota settings.
2910
+ */
2911
+ /**
2912
+ * Append recognised text to the contentEditable composer. Focuses the editor,
2913
+ * moves the caret to the end, and uses `insertText` so the host editor's own
2914
+ * input handling (undo, model binding) sees it as a typed insertion.
2915
+ */
2916
+ function appendToComposer(text) {
2917
+ const editor = document.querySelector("[data-composer-input]");
2918
+ if (editor === null) {
2919
+ navigator.clipboard?.writeText(text).catch(() => {});
2920
+ return;
2921
+ }
2922
+ editor.focus();
2923
+ const selection = window.getSelection();
2924
+ if (selection !== null) {
2925
+ const range = document.createRange();
2926
+ range.selectNodeContents(editor);
2927
+ range.collapse(false);
2928
+ selection.removeAllRanges();
2929
+ selection.addRange(range);
2930
+ }
2931
+ let inserted = false;
2932
+ try {
2933
+ inserted = document.execCommand("insertText", false, text);
2934
+ } catch {}
2935
+ if (!inserted) editor.appendChild(document.createTextNode(text));
2936
+ }
2937
+ /**
2938
+ * Mic button rendered inside the composer card. Manages its own MediaRecorder
2939
+ * lifecycle; only the button is shown — no floating panel UI.
2940
+ */
2941
+ function TokenQuotaMic({ t, useStore, transcribe }) {
2942
+ const enabled = useStore((s) => s.transcribe.enabled);
2943
+ const [recording, setRecording] = (0, react.useState)(false);
2944
+ const [transcribing, setTranscribing] = (0, react.useState)(false);
2945
+ const [error, setError] = (0, react.useState)(null);
2946
+ const mediaRecorderRef = (0, react.useRef)(null);
2947
+ const chunksRef = (0, react.useRef)([]);
2948
+ const streamRef = (0, react.useRef)(null);
2949
+ const errorTimerRef = (0, react.useRef)(void 0);
2950
+ (0, react.useEffect)(() => {
2951
+ return () => {
2952
+ if (errorTimerRef.current !== void 0) clearTimeout(errorTimerRef.current);
2953
+ cleanupRecording();
2954
+ };
2955
+ }, []);
2956
+ const cleanupRecording = () => {
2957
+ if (streamRef.current !== null) {
2958
+ for (const track of streamRef.current.getTracks()) track.stop();
2959
+ streamRef.current = null;
2960
+ }
2961
+ mediaRecorderRef.current = null;
2962
+ chunksRef.current = [];
2963
+ };
2964
+ const showError = (message) => {
2965
+ setError(message);
2966
+ if (errorTimerRef.current !== void 0) clearTimeout(errorTimerRef.current);
2967
+ errorTimerRef.current = setTimeout(() => {
2968
+ setError(null);
2969
+ errorTimerRef.current = void 0;
2970
+ }, 4e3);
2971
+ };
2972
+ const startRecording = async () => {
2973
+ let stream;
2974
+ try {
2975
+ stream = await navigator.mediaDevices.getUserMedia({ audio: true });
2976
+ } catch {
2977
+ showError(t("transcribeMicDenied"));
2978
+ return;
2979
+ }
2980
+ streamRef.current = stream;
2981
+ chunksRef.current = [];
2982
+ const mimeType = MediaRecorder.isTypeSupported("audio/webm;codecs=opus") ? "audio/webm;codecs=opus" : MediaRecorder.isTypeSupported("audio/webm") ? "audio/webm" : "";
2983
+ const recorder = mimeType !== "" ? new MediaRecorder(stream, { mimeType }) : new MediaRecorder(stream);
2984
+ mediaRecorderRef.current = recorder;
2985
+ recorder.ondataavailable = (event) => {
2986
+ if (event.data.size > 0) chunksRef.current.push(event.data);
2987
+ };
2988
+ recorder.onstop = () => {
2989
+ const type = mimeType !== "" ? mimeType : "audio/webm";
2990
+ const blob = new Blob(chunksRef.current, { type });
2991
+ cleanupRecording();
2992
+ if (blob.size === 0) {
2993
+ showError(t("transcribeEmpty"));
2994
+ return;
2995
+ }
2996
+ setTranscribing(true);
2997
+ transcribe(blob).then((text) => {
2998
+ setTranscribing(false);
2999
+ if (text.trim() !== "") appendToComposer(text);
3000
+ }, (err) => {
3001
+ setTranscribing(false);
3002
+ showError(err instanceof Error ? err.message : String(err));
3003
+ });
3004
+ };
3005
+ recorder.start();
3006
+ setRecording(true);
3007
+ };
3008
+ const stopAndTranscribe = () => {
3009
+ const recorder = mediaRecorderRef.current;
3010
+ if (recorder !== null && recorder.state !== "inactive") recorder.stop();
3011
+ else cleanupRecording();
3012
+ setRecording(false);
3013
+ };
3014
+ const onToggle = () => {
3015
+ if (transcribing) return;
3016
+ if (recording) stopAndTranscribe();
3017
+ else startRecording();
3018
+ };
3019
+ if (!enabled) return null;
3020
+ const state = transcribing ? "busy" : recording ? "rec" : "idle";
3021
+ return (0, react_jsx_runtime.jsxs)("div", {
3022
+ className: mic_module_css_default.micWrap,
3023
+ title: error ?? t("transcribeHint"),
3024
+ children: [(0, react_jsx_runtime.jsx)("button", {
3025
+ type: "button",
3026
+ className: `${mic_module_css_default.micBtn}${state === "rec" ? ` ${mic_module_css_default.micRec}` : ""}${state === "busy" ? ` ${mic_module_css_default.micBusy}` : ""}${error !== null ? ` ${mic_module_css_default.micErr}` : ""}`,
3027
+ disabled: transcribing,
3028
+ onClick: (event) => {
3029
+ event.stopPropagation();
3030
+ onToggle();
3031
+ },
3032
+ onPointerDown: (event) => {
3033
+ event.stopPropagation();
3034
+ },
3035
+ "aria-pressed": recording,
3036
+ "aria-label": error ?? t("transcribeTitle"),
3037
+ children: transcribing ? "…" : "🎤"
3038
+ }), error !== null && (0, react_jsx_runtime.jsx)("span", {
3039
+ className: mic_module_css_default.micErrTip,
3040
+ children: error
3041
+ })]
3042
+ });
3043
+ }
3044
+ //#endregion
2785
3045
  //#region lib/types/client/locales.js
2786
3046
  /**
2787
3047
  * Token-quota panel copy (zh + en). The panel is a product surface, so the
@@ -2812,7 +3072,20 @@ window.__ModuleLoader__.load({
2812
3072
  settingsTitle: "设置",
2813
3073
  settingsTabQuota: "限额设置",
2814
3074
  settingsTabMusic: "音乐设置",
3075
+ settingsTabTranscribe: "转录",
2815
3076
  settingsTabOther: "其它",
3077
+ transcribeTitle: "语音转录",
3078
+ transcribeHint: "按下麦克风录音,再按一次停止并转录为文字",
3079
+ transcribeMicDenied: "未获得麦克风权限",
3080
+ transcribeEmpty: "录音为空",
3081
+ transcribeEnabledLabel: "启用语音转录",
3082
+ transcribeEnabledHint: "在对话框右上角显示麦克风按钮",
3083
+ transcribeBaseURLLabel: "接口地址",
3084
+ transcribeBaseURLHint: "OpenAI 兼容的转录接口 base URL",
3085
+ transcribeApiKeyEnvLabel: "API Key 环境变量",
3086
+ transcribeApiKeyEnvHint: "存有 API Key 的凭证变量名(在 Models 页或 credentials 配置)",
3087
+ transcribeModelLabel: "模型",
3088
+ transcribeModelHint: "语音转文本模型名",
2816
3089
  reorderHint: "拖动排序",
2817
3090
  balanceLabel: "余额",
2818
3091
  balanceUnconfigured: "未配置 DeepSeek API Key",
@@ -2928,7 +3201,20 @@ window.__ModuleLoader__.load({
2928
3201
  settingsTitle: "Settings",
2929
3202
  settingsTabQuota: "Quota",
2930
3203
  settingsTabMusic: "Music",
3204
+ settingsTabTranscribe: "Transcribe",
2931
3205
  settingsTabOther: "Other",
3206
+ transcribeTitle: "Voice transcription",
3207
+ transcribeHint: "Press the mic to record; press again to stop and transcribe to text",
3208
+ transcribeMicDenied: "Microphone access denied",
3209
+ transcribeEmpty: "Recording was empty",
3210
+ transcribeEnabledLabel: "Enable voice transcription",
3211
+ transcribeEnabledHint: "Show a mic button in the top-right of the composer",
3212
+ transcribeBaseURLLabel: "Base URL",
3213
+ transcribeBaseURLHint: "OpenAI-compatible transcription endpoint base URL",
3214
+ transcribeApiKeyEnvLabel: "API key env var",
3215
+ transcribeApiKeyEnvHint: "Credential variable name holding the API key (Models page or credentials)",
3216
+ transcribeModelLabel: "Model",
3217
+ transcribeModelHint: "Speech-to-text model name",
2932
3218
  reorderHint: "Drag to reorder",
2933
3219
  balanceLabel: "Balance",
2934
3220
  balanceUnconfigured: "No DeepSeek API key",
@@ -3129,6 +3415,13 @@ window.__ModuleLoader__.load({
3129
3415
  style: raw?.style ?? "pentatonic",
3130
3416
  onlyCurrentSession: raw?.onlyCurrentSession ?? true
3131
3417
  });
3418
+ /** Build a writable transcription-settings clone with defaults applied. */
3419
+ const transcribeDefaults = (raw) => ({
3420
+ enabled: raw?.enabled ?? TOKEN_QUOTA_DEFAULT_TRANSCRIBE.enabled,
3421
+ baseURL: typeof raw?.baseURL === "string" && raw.baseURL !== "" ? raw.baseURL : TOKEN_QUOTA_DEFAULT_TRANSCRIBE.baseURL,
3422
+ apiKeyEnv: typeof raw?.apiKeyEnv === "string" && raw.apiKeyEnv !== "" ? raw.apiKeyEnv : TOKEN_QUOTA_DEFAULT_TRANSCRIBE.apiKeyEnv,
3423
+ model: typeof raw?.model === "string" && raw.model !== "" ? raw.model : TOKEN_QUOTA_DEFAULT_TRANSCRIBE.model
3424
+ });
3132
3425
  const keyOf = (selection) => {
3133
3426
  if (selection === null) return void 0;
3134
3427
  return `${selection.provider}/${selection.model}`;
@@ -3251,6 +3544,7 @@ window.__ModuleLoader__.load({
3251
3544
  bound?.setMusicVolume(musicSettings.volume);
3252
3545
  bound?.setMusicStyle(musicSettings.style);
3253
3546
  bound?.setMusicOnlyCurrentSession(musicSettings.onlyCurrentSession);
3547
+ bound?.setTranscribeSettings(transcribeDefaults(doc?.transcribe));
3254
3548
  fetch("/token-quota", { headers: { accept: "application/json" } }).then((response) => {
3255
3549
  if (!response.ok) {
3256
3550
  bound?.setError(`quota route: ${String(response.status)}`);
@@ -3339,6 +3633,29 @@ window.__ModuleLoader__.load({
3339
3633
  pollMinutes
3340
3634
  });
3341
3635
  };
3636
+ /** Persist the voice transcription settings and mirror them into the store. */
3637
+ const setTranscribeSettings = (settings) => {
3638
+ bound?.setTranscribeSettings(settings);
3639
+ scope.set("transcribe", settings);
3640
+ };
3641
+ /**
3642
+ * Send a recorded audio blob to the Host, which forwards it to the
3643
+ * configured OpenAI-compatible transcription endpoint. Resolves with the
3644
+ * recognised text.
3645
+ */
3646
+ const transcribe = async (blob) => {
3647
+ const res = await fetch("/token-quota/transcribe", {
3648
+ method: "POST",
3649
+ headers: { "content-type": blob.type !== "" ? blob.type : "application/octet-stream" },
3650
+ body: blob
3651
+ });
3652
+ if (!res.ok) {
3653
+ const detail = await res.text().catch(() => "");
3654
+ throw new Error(detail !== "" ? detail : `transcription HTTP ${res.status}`);
3655
+ }
3656
+ const data = await res.json();
3657
+ return typeof data.text === "string" ? data.text : "";
3658
+ };
3342
3659
  /**
3343
3660
  * Ask the Host to refresh account balances now and adopt the result.
3344
3661
  * With a provider key only that provider is refreshed; otherwise all of
@@ -3474,7 +3791,8 @@ window.__ModuleLoader__.load({
3474
3791
  setModelOrder,
3475
3792
  saveNotes,
3476
3793
  setBalanceSettings,
3477
- refreshBalance
3794
+ refreshBalance,
3795
+ setTranscribeSettings
3478
3796
  };
3479
3797
  };
3480
3798
  ctx.slots.inject("shell.overlay", () => ctx.slots.register({
@@ -3486,6 +3804,21 @@ window.__ModuleLoader__.load({
3486
3804
  locale: NS,
3487
3805
  inject: injected
3488
3806
  }, TokenQuotaPanel));
3807
+ ctx.slots.inject("conversation.input.overlay", () => ctx.slots.register({
3808
+ name: "conversation.input.overlay",
3809
+ id: "token-quota-mic",
3810
+ order: 100,
3811
+ label: () => t("transcribeTitle"),
3812
+ store,
3813
+ locale: NS,
3814
+ inject: (_sessionId, micActions) => {
3815
+ bound = micActions;
3816
+ return {
3817
+ transcribe,
3818
+ setTranscribeSettings
3819
+ };
3820
+ }
3821
+ }, TokenQuotaMic));
3489
3822
  }
3490
3823
  //#endregion
3491
3824
  exports.apply = apply;