@jxgame2020/dsh-token-quota 0.1.43 → 0.1.50

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
@@ -132,7 +132,7 @@ window.__ModuleLoader__.load({
132
132
  d.transcribe = settings;
133
133
  },
134
134
  setUpgrade: (d, upgrade) => {
135
- const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.43" ? upgrade : null;
135
+ const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.50" ? upgrade : null;
136
136
  if (d.upgrade === null || d.upgrade.latestVersion !== normalized?.latestVersion) d.upgradeDismissed = false;
137
137
  d.upgrade = normalized;
138
138
  },
@@ -252,152 +252,157 @@ window.__ModuleLoader__.load({
252
252
  }
253
253
  //#endregion
254
254
  //#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/TokenQuotaPanel.module.css.mjs
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) {
255
+ const css$2 = ".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:.45}.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}.NPLLIq_keyRow{align-items:center;gap:8px;margin-top:6px;display:flex}.NPLLIq_keySaveBtn{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;border-radius:4px;flex:none;padding:4px 10px;font-size:12px}.NPLLIq_keySaveBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_keySaveBtn:disabled{opacity:.5;cursor:not-allowed}.NPLLIq_keyBadgeOk,.NPLLIq_keyBadgeOff{white-space:nowrap;border-radius:999px;padding:3px 7px;font-size:11px;line-height:1}.NPLLIq_keyBadgeOk{color:var(--dsw-alias-state-success-primary,#2f9e44);background:color-mix(in srgb, var(--dsw-alias-state-success-primary,#2f9e44) 14%, transparent)}.NPLLIq_keyBadgeOff{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2,#0000000f)}.NPLLIq_keyError{word-break:break-word;color:var(--dsw-alias-state-error-primary,#e03131);margin-top:4px;font-size:11px;line-height:1.4}";
256
+ const tagId$2 = "@jxgame2020/dsh-token-quota/TokenQuotaPanel.module.css";
257
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
258
258
  const tag = document.createElement("style");
259
259
  tag.dataset.plugin = "@jxgame2020/dsh-token-quota";
260
- tag.dataset.pluginCss = tagId$1;
261
- tag.textContent = css$1;
260
+ tag.dataset.pluginCss = tagId$2;
261
+ tag.textContent = css$2;
262
262
  document.head.appendChild(tag);
263
263
  }
264
264
  var TokenQuotaPanel_module_css_default = {
265
- "dialogActions": "NPLLIq_dialogActions",
266
- "balanceValueOk": "NPLLIq_balanceValueOk",
267
- "logTable": "NPLLIq_logTable",
268
- "noteWinBar": "NPLLIq_noteWinBar",
269
- "row": "NPLLIq_row",
270
- "noteMenu": "NPLLIq_noteMenu",
271
- "dialogTabActive": "NPLLIq_dialogTabActive",
272
- "header": "NPLLIq_header",
273
- "noteMenuBackdrop": "NPLLIq_noteMenuBackdrop",
274
- "noteWin": "NPLLIq_noteWin",
275
- "currentBadge": "NPLLIq_currentBadge",
276
- "body": "NPLLIq_body",
277
- "balanceWin": "NPLLIq_balanceWin",
265
+ "controls": "NPLLIq_controls",
278
266
  "noteWinResize": "NPLLIq_noteWinResize",
279
- "settingsDialog": "NPLLIq_settingsDialog",
267
+ "balanceRefreshAll": "NPLLIq_balanceRefreshAll",
268
+ "logClearDate": "NPLLIq_logClearDate",
269
+ "balanceBarError": "NPLLIq_balanceBarError",
270
+ "logClearBtn": "NPLLIq_logClearBtn",
271
+ "version": "NPLLIq_version",
272
+ "balanceWinBody": "NPLLIq_balanceWinBody",
273
+ "balanceValueError": "NPLLIq_balanceValueError",
274
+ "gearBtn": "NPLLIq_gearBtn",
280
275
  "settingsBtn": "NPLLIq_settingsBtn",
281
- "logUsedCol": "NPLLIq_logUsedCol",
282
- "balanceToggle": "NPLLIq_balanceToggle",
283
- "balanceRow": "NPLLIq_balanceRow",
284
- "balanceStateError": "NPLLIq_balanceStateError",
285
- "fillIdle": "NPLLIq_fillIdle",
276
+ "rowDrag": "NPLLIq_rowDrag",
277
+ "upgradeBanner": "NPLLIq_upgradeBanner",
286
278
  "balanceSortBtn": "NPLLIq_balanceSortBtn",
287
- "monitorList": "NPLLIq_monitorList",
288
- "dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
289
- "noticeError": "NPLLIq_noticeError",
290
- "panelDimStrong": "NPLLIq_panelDimStrong",
291
- "dialogLabel": "NPLLIq_dialogLabel",
292
- "logDayCol": "NPLLIq_logDayCol",
293
- "noteWinCollapsed": "NPLLIq_noteWinCollapsed",
294
- "noteWinGripBar": "NPLLIq_noteWinGripBar",
295
- "controls": "NPLLIq_controls",
296
- "noteWinText": "NPLLIq_noteWinText",
297
- "dialogTab": "NPLLIq_dialogTab",
298
279
  "logPagerInfo": "NPLLIq_logPagerInfo",
299
- "logModelCol": "NPLLIq_logModelCol",
280
+ "noteNewPlus": "NPLLIq_noteNewPlus",
281
+ "fillIdle": "NPLLIq_fillIdle",
282
+ "balanceBarLow": "NPLLIq_balanceBarLow",
283
+ "upgradeHint": "NPLLIq_upgradeHint",
284
+ "notesBar": "NPLLIq_notesBar",
285
+ "noteWinBtn": "NPLLIq_noteWinBtn",
286
+ "balanceWinHeader": "NPLLIq_balanceWinHeader",
287
+ "header": "NPLLIq_header",
288
+ "balanceRowName": "NPLLIq_balanceRowName",
289
+ "balanceWin": "NPLLIq_balanceWin",
300
290
  "balanceBarBadge": "NPLLIq_balanceBarBadge",
301
- "rowMeta": "NPLLIq_rowMeta",
302
- "rowHeader": "NPLLIq_rowHeader",
303
- "noteMenuItem": "NPLLIq_noteMenuItem",
304
- "dialogTabs": "NPLLIq_dialogTabs",
305
- "logClearDate": "NPLLIq_logClearDate",
306
- "noteNew": "NPLLIq_noteNew",
291
+ "dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
292
+ "body": "NPLLIq_body",
293
+ "noteWinBar": "NPLLIq_noteWinBar",
294
+ "balanceRowValue": "NPLLIq_balanceRowValue",
295
+ "fillWarn": "NPLLIq_fillWarn",
296
+ "fullNotice": "NPLLIq_fullNotice",
297
+ "logDialog": "NPLLIq_logDialog",
298
+ "balanceBarDim": "NPLLIq_balanceBarDim",
299
+ "panelDimStrong": "NPLLIq_panelDimStrong",
300
+ "logPageSizeSelect": "NPLLIq_logPageSizeSelect",
301
+ "dialogHeader": "NPLLIq_dialogHeader",
307
302
  "balanceLastLine": "NPLLIq_balanceLastLine",
308
- "upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
309
- "copyBtnDone": "NPLLIq_copyBtnDone",
310
- "panelDim": "NPLLIq_panelDim",
303
+ "notice": "NPLLIq_notice",
311
304
  "checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
312
- "tab": "NPLLIq_tab",
305
+ "balanceBarRefresh": "NPLLIq_balanceBarRefresh",
306
+ "upgradeBannerText": "NPLLIq_upgradeBannerText",
307
+ "selectBtn": "NPLLIq_selectBtn",
308
+ "balanceRow": "NPLLIq_balanceRow",
309
+ "monitorName": "NPLLIq_monitorName",
310
+ "dialog": "NPLLIq_dialog",
311
+ "logToolbar": "NPLLIq_logToolbar",
312
+ "checkErrorHint": "NPLLIq_checkErrorHint",
313
313
  "logPagerBtn": "NPLLIq_logPagerBtn",
314
- "balanceBarDim": "NPLLIq_balanceBarDim",
315
- "resetSelect": "NPLLIq_resetSelect",
316
- "dialogBody": "NPLLIq_dialogBody",
317
- "headerActions": "NPLLIq_headerActions",
318
- "balanceBarLow": "NPLLIq_balanceBarLow",
319
- "balanceRowValue": "NPLLIq_balanceRowValue",
320
314
  "dialogHint": "NPLLIq_dialogHint",
321
- "tabIcon": "NPLLIq_tabIcon",
322
- "selectBtn": "NPLLIq_selectBtn",
323
- "switch": "NPLLIq_switch",
324
- "panel": "NPLLIq_panel",
325
315
  "fillOver": "NPLLIq_fillOver",
326
- "subtitle": "NPLLIq_subtitle",
327
- "checkUpdatesRow": "NPLLIq_checkUpdatesRow",
328
- "balanceValueLow": "NPLLIq_balanceValueLow",
329
- "notice": "NPLLIq_notice",
330
- "balanceBar": "NPLLIq_balanceBar",
331
- "dialogHeader": "NPLLIq_dialogHeader",
332
- "balanceWinHeader": "NPLLIq_balanceWinHeader",
316
+ "headerText": "NPLLIq_headerText",
317
+ "balanceToggleOpen": "NPLLIq_balanceToggleOpen",
318
+ "balanceStateError": "NPLLIq_balanceStateError",
333
319
  "upgradeCommandRow": "NPLLIq_upgradeCommandRow",
334
- "upgradeClose": "NPLLIq_upgradeClose",
335
- "rowName": "NPLLIq_rowName",
336
- "noteWinTitleText": "NPLLIq_noteWinTitleText",
337
- "copyBtn": "NPLLIq_copyBtn",
338
- "rowDragging": "NPLLIq_rowDragging",
339
- "noteChipOpen": "NPLLIq_noteChipOpen",
320
+ "dialogOverlay": "NPLLIq_dialogOverlay",
321
+ "panel": "NPLLIq_panel",
322
+ "keyBadgeOk": "NPLLIq_keyBadgeOk",
323
+ "noticeError": "NPLLIq_noticeError",
324
+ "collapse": "NPLLIq_collapse",
325
+ "noteChip": "NPLLIq_noteChip",
340
326
  "balanceWinTitle": "NPLLIq_balanceWinTitle",
341
- "upgradeCommand": "NPLLIq_upgradeCommand",
327
+ "dialogTab": "NPLLIq_dialogTab",
328
+ "dialogTabActive": "NPLLIq_dialogTabActive",
329
+ "keyBadgeOff": "NPLLIq_keyBadgeOff",
330
+ "tabLabel": "NPLLIq_tabLabel",
331
+ "rowDragging": "NPLLIq_rowDragging",
332
+ "settingsDialog": "NPLLIq_settingsDialog",
333
+ "balanceValueOk": "NPLLIq_balanceValueOk",
334
+ "dialogTabs": "NPLLIq_dialogTabs",
342
335
  "balanceStateHint": "NPLLIq_balanceStateHint",
343
- "upgradeHint": "NPLLIq_upgradeHint",
344
- "checkErrorHint": "NPLLIq_checkErrorHint",
345
- "logPageSizeSelect": "NPLLIq_logPageSizeSelect",
346
- "balanceToggleOpen": "NPLLIq_balanceToggleOpen",
347
- "fullNotice": "NPLLIq_fullNotice",
348
- "noteChip": "NPLLIq_noteChip",
349
- "balanceValueError": "NPLLIq_balanceValueError",
350
- "monitorName": "NPLLIq_monitorName",
351
- "noteWinBtn": "NPLLIq_noteWinBtn",
352
- "balanceRowRefresh": "NPLLIq_balanceRowRefresh",
353
- "resetRow": "NPLLIq_resetRow",
336
+ "keyRow": "NPLLIq_keyRow",
337
+ "keyError": "NPLLIq_keyError",
338
+ "checkUpdatesRow": "NPLLIq_checkUpdatesRow",
339
+ "radioRow": "NPLLIq_radioRow",
340
+ "logModelCol": "NPLLIq_logModelCol",
341
+ "logUsedCol": "NPLLIq_logUsedCol",
342
+ "tab": "NPLLIq_tab",
343
+ "currentBadge": "NPLLIq_currentBadge",
344
+ "checkBtn": "NPLLIq_checkBtn",
345
+ "noteWinCollapsed": "NPLLIq_noteWinCollapsed",
354
346
  "logSearch": "NPLLIq_logSearch",
355
- "monitorHint": "NPLLIq_monitorHint",
356
- "logPagerControls": "NPLLIq_logPagerControls",
357
- "save": "NPLLIq_save",
358
- "logClearDialog": "NPLLIq_logClearDialog",
359
- "tabLabel": "NPLLIq_tabLabel",
360
- "balanceRefreshAll": "NPLLIq_balanceRefreshAll",
361
- "noteNewPlus": "NPLLIq_noteNewPlus",
362
- "balanceWinBody": "NPLLIq_balanceWinBody",
363
- "collapse": "NPLLIq_collapse",
364
- "dialogSection": "NPLLIq_dialogSection",
347
+ "panelDim": "NPLLIq_panelDim",
348
+ "noteWinTitle": "NPLLIq_noteWinTitle",
349
+ "subtitle": "NPLLIq_subtitle",
350
+ "noteMenu": "NPLLIq_noteMenu",
351
+ "tabIcon": "NPLLIq_tabIcon",
352
+ "upgradeCommand": "NPLLIq_upgradeCommand",
353
+ "resetSelect": "NPLLIq_resetSelect",
354
+ "noteChipOpen": "NPLLIq_noteChipOpen",
355
+ "bar": "NPLLIq_bar",
356
+ "switch": "NPLLIq_switch",
357
+ "balanceRowHeader": "NPLLIq_balanceRowHeader",
358
+ "logPagerPages": "NPLLIq_logPagerPages",
359
+ "logScroll": "NPLLIq_logScroll",
360
+ "title": "NPLLIq_title",
361
+ "rowName": "NPLLIq_rowName",
362
+ "headerActions": "NPLLIq_headerActions",
363
+ "rowMeta": "NPLLIq_rowMeta",
364
+ "dialogBody": "NPLLIq_dialogBody",
365
+ "upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
366
+ "balanceBarText": "NPLLIq_balanceBarText",
365
367
  "dialogClose": "NPLLIq_dialogClose",
366
- "balanceRowName": "NPLLIq_balanceRowName",
367
- "dialog": "NPLLIq_dialog",
368
+ "noteWin": "NPLLIq_noteWin",
369
+ "upgradeClose": "NPLLIq_upgradeClose",
370
+ "copyBtn": "NPLLIq_copyBtn",
371
+ "dialogActions": "NPLLIq_dialogActions",
372
+ "dialogLabel": "NPLLIq_dialogLabel",
373
+ "noteWinTitleText": "NPLLIq_noteWinTitleText",
368
374
  "upgradeCommands": "NPLLIq_upgradeCommands",
369
- "logPager": "NPLLIq_logPager",
370
- "fillWarn": "NPLLIq_fillWarn",
371
- "rowDropTarget": "NPLLIq_rowDropTarget",
372
- "dialogOverlay": "NPLLIq_dialogOverlay",
373
- "checkBtn": "NPLLIq_checkBtn",
374
- "notesBar": "NPLLIq_notesBar",
375
+ "copyBtnDone": "NPLLIq_copyBtnDone",
376
+ "resetRow": "NPLLIq_resetRow",
377
+ "noteWinGripBar": "NPLLIq_noteWinGripBar",
375
378
  "dialogBtn": "NPLLIq_dialogBtn",
376
- "radioRow": "NPLLIq_radioRow",
377
- "balanceBarText": "NPLLIq_balanceBarText",
378
- "monitorRow": "NPLLIq_monitorRow",
379
- "balanceRowHeader": "NPLLIq_balanceRowHeader",
380
- "noteWinTitle": "NPLLIq_noteWinTitle",
381
- "upgradeBannerText": "NPLLIq_upgradeBannerText",
382
- "balanceBarRefresh": "NPLLIq_balanceBarRefresh",
383
- "logToolbar": "NPLLIq_logToolbar",
384
- "balanceBarError": "NPLLIq_balanceBarError",
385
- "version": "NPLLIq_version",
386
- "upgradeBanner": "NPLLIq_upgradeBanner",
387
- "logHeader": "NPLLIq_logHeader",
388
- "logScroll": "NPLLIq_logScroll",
389
- "bar": "NPLLIq_bar",
390
- "gearBtn": "NPLLIq_gearBtn",
391
- "headerText": "NPLLIq_headerText",
379
+ "logPagerControls": "NPLLIq_logPagerControls",
392
380
  "input": "NPLLIq_input",
393
- "logDialog": "NPLLIq_logDialog",
394
- "versionNew": "NPLLIq_versionNew",
395
- "logPagerPages": "NPLLIq_logPagerPages",
396
- "logClearBtn": "NPLLIq_logClearBtn",
381
+ "logDayCol": "NPLLIq_logDayCol",
382
+ "logClearDialog": "NPLLIq_logClearDialog",
383
+ "rowDropTarget": "NPLLIq_rowDropTarget",
384
+ "rowHeader": "NPLLIq_rowHeader",
397
385
  "dialogTitle": "NPLLIq_dialogTitle",
386
+ "dialogSection": "NPLLIq_dialogSection",
387
+ "noteWinText": "NPLLIq_noteWinText",
388
+ "noteMenuBackdrop": "NPLLIq_noteMenuBackdrop",
389
+ "balanceToggle": "NPLLIq_balanceToggle",
390
+ "save": "NPLLIq_save",
391
+ "row": "NPLLIq_row",
392
+ "logTable": "NPLLIq_logTable",
393
+ "monitorList": "NPLLIq_monitorList",
394
+ "noteMenuItem": "NPLLIq_noteMenuItem",
395
+ "monitorHint": "NPLLIq_monitorHint",
396
+ "balanceBar": "NPLLIq_balanceBar",
397
+ "logHeader": "NPLLIq_logHeader",
398
+ "logPager": "NPLLIq_logPager",
399
+ "balanceRowRefresh": "NPLLIq_balanceRowRefresh",
400
+ "keySaveBtn": "NPLLIq_keySaveBtn",
401
+ "balanceValueLow": "NPLLIq_balanceValueLow",
402
+ "versionNew": "NPLLIq_versionNew",
403
+ "noteNew": "NPLLIq_noteNew",
398
404
  "settingsBtnActive": "NPLLIq_settingsBtnActive",
399
- "title": "NPLLIq_title",
400
- "rowDrag": "NPLLIq_rowDrag"
405
+ "monitorRow": "NPLLIq_monitorRow"
401
406
  };
402
407
  //#endregion
403
408
  //#region lib/types/client/TokenQuotaPanel.js
@@ -535,13 +540,18 @@ window.__ModuleLoader__.load({
535
540
  * @param props - composed slot props.
536
541
  * @returns the panel element tree.
537
542
  */
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 }) {
543
+ function TokenQuotaPanel({ t, load, setLimit, selectModel, setMonitored, setOnFull, setReset, setCheckUpdates, checkUpdatesNow, clearLogBefore, setDimWhenIdle, setModelOrder, saveNotes, setBalanceSettings, refreshBalance, setMusicEnabled, setMusicVolume, setMusicStyle, setMusicOnlyCurrentSession, setTranscribeSettings, checkTranscribeKey, saveTranscribeKey, useStore, actions, useSessions }) {
539
544
  const [collapsed, setCollapsed] = (0, react.useState)(false);
540
545
  const [drafts, setDrafts] = (0, react.useState)({});
541
546
  const [editingKey, setEditingKey] = (0, react.useState)(null);
542
547
  const [hovered, setHovered] = (0, react.useState)(false);
543
548
  const [inputActive, setInputActive] = (0, react.useState)(false);
544
549
  const [settingsTab, setSettingsTab] = (0, react.useState)("quota");
550
+ const [keyDraft, setKeyDraft] = (0, react.useState)("");
551
+ const [keyConfigured, setKeyConfigured] = (0, react.useState)(null);
552
+ const [keySaving, setKeySaving] = (0, react.useState)(false);
553
+ const [keySaved, setKeySaved] = (0, react.useState)(false);
554
+ const [keyError, setKeyError] = (0, react.useState)(null);
545
555
  const [dragKey, setDragKey] = (0, react.useState)(null);
546
556
  const [dropKey, setDropKey] = (0, react.useState)(null);
547
557
  const storedNotes = useStore((s) => s.notes);
@@ -730,13 +740,71 @@ window.__ModuleLoader__.load({
730
740
  if (sessionId !== void 0) load(sessionId);
731
741
  }, [sessionId, load]);
732
742
  (0, react.useEffect)(() => {
733
- const onFocusIn = (event) => {
734
- const target = event.target;
735
- setInputActive(target !== null && (target.matches("input, textarea, [contenteditable=\"true\"]") || target.closest("input, textarea, [contenteditable=\"true\"]") !== null));
743
+ if (settingsTab !== "transcribe") return;
744
+ const ref = transcribe.apiKeyEnv;
745
+ if (ref === "") return;
746
+ let cancelled = false;
747
+ checkTranscribeKey(ref).then((configured) => {
748
+ if (!cancelled) {
749
+ setKeyConfigured(configured);
750
+ setKeySaved(false);
751
+ }
752
+ });
753
+ return () => {
754
+ cancelled = true;
736
755
  };
737
- window.addEventListener("focusin", onFocusIn);
756
+ }, [
757
+ settingsTab,
758
+ transcribe.apiKeyEnv,
759
+ checkTranscribeKey
760
+ ]);
761
+ /**
762
+ * Write the staged transcription key through the credential seam, then
763
+ * re-read presence. The secret is never read back, so the badge reflects
764
+ * what the Host reports rather than what was typed.
765
+ */
766
+ const saveKey = () => {
767
+ const ref = transcribe.apiKeyEnv;
768
+ if (ref === "" || keyDraft === "") return;
769
+ setKeySaving(true);
770
+ setKeyError(null);
771
+ saveTranscribeKey(ref, keyDraft).then((result) => {
772
+ setKeySaving(false);
773
+ if (result.ok) {
774
+ setKeyDraft("");
775
+ setKeyConfigured(true);
776
+ setKeySaved(true);
777
+ } else setKeyError(result.error ?? t("transcribeKeyFailed"));
778
+ });
779
+ };
780
+ (0, react.useEffect)(() => {
781
+ const isEditable = (el) => el !== null && (el.matches("input, textarea, [contenteditable=\"true\"]") || el.closest("input, textarea, [contenteditable=\"true\"]") !== null);
782
+ const isOwnSurface = (el) => {
783
+ if (el === null) return false;
784
+ for (const node of [
785
+ panelRef.current,
786
+ settingsRef.current,
787
+ logRef.current
788
+ ]) if (node !== null && node.contains(el)) return true;
789
+ return false;
790
+ };
791
+ const sync = () => {
792
+ const active = document.activeElement;
793
+ setInputActive(!isOwnSurface(active) && isEditable(active));
794
+ };
795
+ const deferredSync = () => {
796
+ window.setTimeout(sync, 0);
797
+ };
798
+ document.addEventListener("focusin", sync);
799
+ document.addEventListener("focusout", deferredSync);
800
+ document.addEventListener("pointerdown", deferredSync, true);
801
+ window.addEventListener("blur", sync);
802
+ sync();
738
803
  return () => {
739
- window.removeEventListener("focusin", onFocusIn);
804
+ document.removeEventListener("focusin", sync);
805
+ document.removeEventListener("focusout", deferredSync);
806
+ document.removeEventListener("pointerdown", deferredSync, true);
807
+ window.removeEventListener("blur", sync);
740
808
  };
741
809
  }, []);
742
810
  (0, react.useEffect)(() => {
@@ -834,30 +902,6 @@ window.__ModuleLoader__.load({
834
902
  cancelled = true;
835
903
  };
836
904
  }, [logOpen, actions]);
837
- if (collapsed) return (0, react_jsx_runtime.jsxs)("div", {
838
- className: TokenQuotaPanel_module_css_default.tab,
839
- role: "button",
840
- tabIndex: 0,
841
- title: t("expandHint"),
842
- "aria-label": t("expandHint"),
843
- onClick: () => {
844
- setCollapsed(false);
845
- },
846
- onKeyDown: (event) => {
847
- if (event.key === "Enter" || event.key === " ") {
848
- event.preventDefault();
849
- setCollapsed(false);
850
- }
851
- },
852
- children: [(0, react_jsx_runtime.jsx)("span", {
853
- className: TokenQuotaPanel_module_css_default.tabIcon,
854
- "aria-hidden": "true",
855
- children: "▸"
856
- }), (0, react_jsx_runtime.jsx)("span", {
857
- className: TokenQuotaPanel_module_css_default.tabLabel,
858
- children: t("expand")
859
- })]
860
- });
861
905
  const openSettings = () => {
862
906
  actions.setDialogOpen(true);
863
907
  };
@@ -1038,9 +1082,34 @@ window.__ModuleLoader__.load({
1038
1082
  return { text: "" };
1039
1083
  };
1040
1084
  const panelDimClass = dimWhenIdle ? hovered || upgradeFlash ? "" : inputActive ? TokenQuotaPanel_module_css_default.panelDimStrong : TokenQuotaPanel_module_css_default.panelDim : "";
1085
+ if (collapsed) return (0, react_jsx_runtime.jsxs)("div", {
1086
+ className: TokenQuotaPanel_module_css_default.tab,
1087
+ role: "button",
1088
+ tabIndex: 0,
1089
+ title: t("expandHint"),
1090
+ "aria-label": t("expandHint"),
1091
+ onClick: () => {
1092
+ setCollapsed(false);
1093
+ },
1094
+ onKeyDown: (event) => {
1095
+ if (event.key === "Enter" || event.key === " ") {
1096
+ event.preventDefault();
1097
+ setCollapsed(false);
1098
+ }
1099
+ },
1100
+ children: [(0, react_jsx_runtime.jsx)("span", {
1101
+ className: TokenQuotaPanel_module_css_default.tabIcon,
1102
+ "aria-hidden": "true",
1103
+ children: "▸"
1104
+ }), (0, react_jsx_runtime.jsx)("span", {
1105
+ className: TokenQuotaPanel_module_css_default.tabLabel,
1106
+ children: t("expand")
1107
+ })]
1108
+ });
1041
1109
  return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
1042
1110
  (0, react_jsx_runtime.jsxs)("div", {
1043
1111
  ref: panelRef,
1112
+ "data-token-quota-panel": "",
1044
1113
  className: `${TokenQuotaPanel_module_css_default.panel}${panelDimClass !== "" ? ` ${panelDimClass}` : ""}`,
1045
1114
  style: panelPos !== null ? {
1046
1115
  left: panelPos.x,
@@ -1068,13 +1137,13 @@ window.__ModuleLoader__.load({
1068
1137
  title: t("upgradeAvailableHint"),
1069
1138
  children: [
1070
1139
  "v",
1071
- "0.1.43",
1140
+ "0.1.50",
1072
1141
  " → v",
1073
1142
  upgrade.latestVersion
1074
1143
  ]
1075
1144
  }) : (0, react_jsx_runtime.jsxs)("span", {
1076
1145
  className: TokenQuotaPanel_module_css_default.version,
1077
- children: ["v", "0.1.43"]
1146
+ children: ["v", "0.1.50"]
1078
1147
  })]
1079
1148
  })
1080
1149
  }),
@@ -1738,6 +1807,50 @@ window.__ModuleLoader__.load({
1738
1807
  className: TokenQuotaPanel_module_css_default.dialogHint,
1739
1808
  children: t("transcribeApiKeyEnvHint")
1740
1809
  }),
1810
+ (0, react_jsx_runtime.jsxs)("label", {
1811
+ className: TokenQuotaPanel_module_css_default.checkUpdatesLabel,
1812
+ children: [(0, react_jsx_runtime.jsx)("span", { children: t("transcribeKeyLabel") }), (0, react_jsx_runtime.jsx)("input", {
1813
+ className: TokenQuotaPanel_module_css_default.resetSelect,
1814
+ type: "password",
1815
+ autoComplete: "off",
1816
+ value: keyDraft,
1817
+ placeholder: keyConfigured === true ? t("transcribeKeyPlaceholderSet") : t("transcribeKeyPlaceholder"),
1818
+ onChange: (event) => {
1819
+ setKeyDraft(event.target.value);
1820
+ setKeySaved(false);
1821
+ setKeyError(null);
1822
+ },
1823
+ onKeyDown: (event) => {
1824
+ if (event.key === "Enter") {
1825
+ event.preventDefault();
1826
+ saveKey();
1827
+ }
1828
+ }
1829
+ })]
1830
+ }),
1831
+ (0, react_jsx_runtime.jsx)("div", {
1832
+ className: TokenQuotaPanel_module_css_default.dialogHint,
1833
+ children: t("transcribeKeyHint")
1834
+ }),
1835
+ (0, react_jsx_runtime.jsxs)("div", {
1836
+ className: TokenQuotaPanel_module_css_default.keyRow,
1837
+ children: [(0, react_jsx_runtime.jsx)("button", {
1838
+ type: "button",
1839
+ className: TokenQuotaPanel_module_css_default.keySaveBtn,
1840
+ disabled: keyDraft === "" || keySaving,
1841
+ onClick: () => {
1842
+ saveKey();
1843
+ },
1844
+ children: keySaving ? t("transcribeKeySaving") : t("transcribeKeySave")
1845
+ }), (0, react_jsx_runtime.jsx)("span", {
1846
+ className: keyConfigured === true ? TokenQuotaPanel_module_css_default.keyBadgeOk : TokenQuotaPanel_module_css_default.keyBadgeOff,
1847
+ children: keySaved ? t("transcribeKeySaved") : keyConfigured === true ? t("transcribeKeyConfigured") : t("transcribeKeyMissing")
1848
+ })]
1849
+ }),
1850
+ keyError !== null && (0, react_jsx_runtime.jsx)("div", {
1851
+ className: TokenQuotaPanel_module_css_default.keyError,
1852
+ children: keyError
1853
+ }),
1741
1854
  (0, react_jsx_runtime.jsxs)("label", {
1742
1855
  className: TokenQuotaPanel_module_css_default.checkUpdatesLabel,
1743
1856
  children: [(0, react_jsx_runtime.jsx)("span", { children: t("transcribeModelLabel") }), (0, react_jsx_runtime.jsx)("input", {
@@ -2880,23 +2993,23 @@ window.__ModuleLoader__.load({
2880
2993
  };
2881
2994
  //#endregion
2882
2995
  //#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) {
2996
+ const css$1 = ".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}}";
2997
+ const tagId$1 = "@jxgame2020/dsh-token-quota/mic.module.css";
2998
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
2886
2999
  const tag = document.createElement("style");
2887
3000
  tag.dataset.plugin = "@jxgame2020/dsh-token-quota";
2888
- tag.dataset.pluginCss = tagId;
2889
- tag.textContent = css;
3001
+ tag.dataset.pluginCss = tagId$1;
3002
+ tag.textContent = css$1;
2890
3003
  document.head.appendChild(tag);
2891
3004
  }
2892
3005
  var mic_module_css_default = {
2893
- "micPulse": "KCoVpa_micPulse",
2894
- "micErr": "KCoVpa_micErr",
2895
- "micErrTip": "KCoVpa_micErrTip",
3006
+ "micWrap": "KCoVpa_micWrap",
2896
3007
  "micRec": "KCoVpa_micRec",
2897
- "micBusy": "KCoVpa_micBusy",
3008
+ "micErrTip": "KCoVpa_micErrTip",
3009
+ "micErr": "KCoVpa_micErr",
3010
+ "micPulse": "KCoVpa_micPulse",
2898
3011
  "micBtn": "KCoVpa_micBtn",
2899
- "micWrap": "KCoVpa_micWrap"
3012
+ "micBusy": "KCoVpa_micBusy"
2900
3013
  };
2901
3014
  //#endregion
2902
3015
  //#region lib/types/client/mic.js
@@ -3026,6 +3139,7 @@ window.__ModuleLoader__.load({
3026
3139
  const state = transcribing ? "busy" : recording ? "rec" : "idle";
3027
3140
  return (0, react_jsx_runtime.jsxs)("div", {
3028
3141
  className: mic_module_css_default.micWrap,
3142
+ "data-token-quota-mic": "",
3029
3143
  title: error ?? t("transcribeHint"),
3030
3144
  children: [(0, react_jsx_runtime.jsx)("button", {
3031
3145
  type: "button",
@@ -3047,6 +3161,360 @@ window.__ModuleLoader__.load({
3047
3161
  })]
3048
3162
  });
3049
3163
  }
3164
+ /** Base persist key; the engine appends `.<sessionId>` for scoped instances. */
3165
+ const STASH_PERSIST_KEY = "dsh-token-quota:stash";
3166
+ let sequence = 0;
3167
+ /**
3168
+ * Declares the per-session stash state and write surface.
3169
+ * @returns the store handle, to be registered on a session-scoped slot entry.
3170
+ */
3171
+ function createTokenQuotaStashStore() {
3172
+ return (0, _deepseek_ai_dsh_client_store.defineStore)({
3173
+ init: () => ({ items: [] }),
3174
+ persist: STASH_PERSIST_KEY,
3175
+ actions: {
3176
+ add: (d, text) => {
3177
+ const trimmed = text.trim();
3178
+ if (trimmed === "") return;
3179
+ if (d.items.some((item) => item.text === trimmed)) return;
3180
+ sequence += 1;
3181
+ const id = `${Date.now().toString(36)}-${sequence.toString(36)}`;
3182
+ const next = [...d.items, {
3183
+ id,
3184
+ text: trimmed
3185
+ }];
3186
+ d.items = next.length > 9 ? next.slice(next.length - 9) : next;
3187
+ },
3188
+ remove: (d, id) => {
3189
+ d.items = d.items.filter((item) => item.id !== id);
3190
+ }
3191
+ }
3192
+ });
3193
+ }
3194
+ //#endregion
3195
+ //#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/TokenQuotaStash.module.css.mjs
3196
+ const css = ".x_tEcG_stashRow{pointer-events:auto;z-index:10;flex-direction:row-reverse;gap:4px;display:flex;position:absolute;top:-42px;right:2px}.x_tEcG_stashChip{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:999px;justify-content:center;align-items:center;padding:0;font-size:13px;line-height:1;transition:background .15s,border-color .15s;display:inline-flex}.x_tEcG_stashChip:hover{border-color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-3)}.x_tEcG_stashTip{z-index:200;white-space:pre-wrap;word-break:break-word;max-width:min(360px,60vw);max-height:240px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:none;border-radius:8px;padding:8px 10px;font-size:12px;line-height:1.5;position:fixed;overflow:auto;box-shadow:0 8px 24px #0000002e}.x_tEcG_selPopup{z-index:200;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;border-radius:8px;align-items:center;gap:2px;padding:3px;display:flex;position:fixed;transform:translate(-50%);box-shadow:0 8px 24px #0003}.x_tEcG_selBtn{color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:5px;align-items:center;gap:4px;padding:3px 8px;font-size:12px;display:inline-flex}.x_tEcG_selBtn:hover{background:var(--dsw-alias-bg-layer-3)}.x_tEcG_selDivider{background:var(--dsw-alias-border-l1);align-self:stretch;width:1px}";
3197
+ const tagId = "@jxgame2020/dsh-token-quota/TokenQuotaStash.module.css";
3198
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
3199
+ const tag = document.createElement("style");
3200
+ tag.dataset.plugin = "@jxgame2020/dsh-token-quota";
3201
+ tag.dataset.pluginCss = tagId;
3202
+ tag.textContent = css;
3203
+ document.head.appendChild(tag);
3204
+ }
3205
+ var TokenQuotaStash_module_css_default = {
3206
+ "stashChip": "x_tEcG_stashChip",
3207
+ "stashRow": "x_tEcG_stashRow",
3208
+ "selDivider": "x_tEcG_selDivider",
3209
+ "selPopup": "x_tEcG_selPopup",
3210
+ "selBtn": "x_tEcG_selBtn",
3211
+ "stashTip": "x_tEcG_stashTip"
3212
+ };
3213
+ //#endregion
3214
+ //#region lib/types/client/TokenQuotaStash.js
3215
+ /**
3216
+ * Session-scoped stash UI, registered into `conversation.input.overlay` so it
3217
+ * sits inside the composer card beside the mic.
3218
+ *
3219
+ * Capture (two ways, as requested):
3220
+ * 1. select text — in a message OR in the composer draft — and use the small
3221
+ * popup that offers 复制 / 临存;
3222
+ * 2. press Cmd/Ctrl+Shift+S on any selection.
3223
+ *
3224
+ * Retrieval: one numbered chip per snippet to the left of the mic. Hovering a
3225
+ * chip shows the whole text; clicking drops it into the composer at the caret
3226
+ * and retires the chip.
3227
+ *
3228
+ * The snippets themselves live in a per-session persisted store (see stash.ts),
3229
+ * so they follow their session across reloads and never reach another session.
3230
+ */
3231
+ /** The harness composer's editable surface. */
3232
+ const COMPOSER_INPUT = "[data-composer-input]";
3233
+ /** Anything matching this is "not capturable text": this plugin's own layers
3234
+ and form fields — selecting text inside an input is editing, not quoting.
3235
+ The composer is deliberately NOT excluded: stashing part of a draft is a
3236
+ supported flow. */
3237
+ const IGNORED_SELECTION = "[data-token-quota-stash], [data-token-quota-panel], input, textarea, select";
3238
+ /** The composer's contentEditable, when the composer is on screen. */
3239
+ function composerEditor() {
3240
+ return document.querySelector(COMPOSER_INPUT);
3241
+ }
3242
+ /** Copy text, falling back to a hidden textarea when the clipboard API is denied. */
3243
+ function copyText(text) {
3244
+ navigator.clipboard?.writeText(text).catch(() => {
3245
+ const scratch = document.createElement("textarea");
3246
+ scratch.value = text;
3247
+ scratch.style.position = "fixed";
3248
+ scratch.style.opacity = "0";
3249
+ document.body.appendChild(scratch);
3250
+ scratch.select();
3251
+ try {
3252
+ document.execCommand("copy");
3253
+ } catch {}
3254
+ document.body.removeChild(scratch);
3255
+ });
3256
+ }
3257
+ /**
3258
+ * Drop text into the composer at the caret the user last had there. Falls back
3259
+ * to the end of the editor when no caret was recorded, and to the clipboard
3260
+ * when the composer is not on screen at all.
3261
+ */
3262
+ function insertIntoComposer(text, caret) {
3263
+ const editor = composerEditor();
3264
+ if (editor === null) {
3265
+ copyText(text);
3266
+ return;
3267
+ }
3268
+ editor.focus();
3269
+ const selection = window.getSelection();
3270
+ if (selection !== null) {
3271
+ if (caret !== null && editor.contains(caret.startContainer)) {
3272
+ selection.removeAllRanges();
3273
+ selection.addRange(caret);
3274
+ } else if (!editor.contains(selection.anchorNode)) {
3275
+ const range = document.createRange();
3276
+ range.selectNodeContents(editor);
3277
+ range.collapse(false);
3278
+ selection.removeAllRanges();
3279
+ selection.addRange(range);
3280
+ }
3281
+ }
3282
+ let inserted = false;
3283
+ try {
3284
+ inserted = document.execCommand("insertText", false, text);
3285
+ } catch {}
3286
+ if (!inserted) editor.appendChild(document.createTextNode(text));
3287
+ }
3288
+ /**
3289
+ * Remove the live selection when it sits inside the composer: stashing part of
3290
+ * a draft means MOVING it out of the way ("cut"), so the user does not have to
3291
+ * delete it by hand and cannot accidentally send it. Selections anywhere else
3292
+ * (a message) are left untouched.
3293
+ */
3294
+ function cutComposerSelection() {
3295
+ const editor = composerEditor();
3296
+ const selection = window.getSelection();
3297
+ if (editor === null || selection === null || selection.rangeCount === 0) return;
3298
+ const anchor = selection.anchorNode;
3299
+ if (anchor === null || !editor.contains(anchor) || selection.isCollapsed) return;
3300
+ const before = editor.textContent ?? "";
3301
+ for (const attempt of [
3302
+ "cut",
3303
+ "delete",
3304
+ "insertText"
3305
+ ]) {
3306
+ try {
3307
+ if (attempt === "insertText") document.execCommand("insertText", false, "");
3308
+ else document.execCommand(attempt);
3309
+ } catch {}
3310
+ if ((editor.textContent ?? "") !== before) return;
3311
+ }
3312
+ }
3313
+ /** Keycap emoji for the chip badges; index 0 renders as 1️⃣. */
3314
+ const STASH_BADGES = [
3315
+ "1️⃣",
3316
+ "2️⃣",
3317
+ "3️⃣",
3318
+ "4️⃣",
3319
+ "5️⃣",
3320
+ "6️⃣",
3321
+ "7️⃣",
3322
+ "8️⃣",
3323
+ "9️⃣"
3324
+ ];
3325
+ /** The badge for the n-th (0-based) chip, falling back to a plain digit. */
3326
+ function stashBadge(index) {
3327
+ return STASH_BADGES[index] ?? String(index + 1);
3328
+ }
3329
+ /**
3330
+ * Numbered stash chips plus the capture popup, rendered inside the composer.
3331
+ */
3332
+ function TokenQuotaStash({ t, useStore, actions }) {
3333
+ const items = useStore((s) => s.items);
3334
+ const [hovered, setHovered] = (0, react.useState)(null);
3335
+ const [pending, setPending] = (0, react.useState)(null);
3336
+ const caretRef = (0, react.useRef)(null);
3337
+ const pendingRef = (0, react.useRef)(null);
3338
+ pendingRef.current = pending;
3339
+ (0, react.useEffect)(() => {
3340
+ const sync = () => {
3341
+ const selection = window.getSelection();
3342
+ if (selection === null || selection.rangeCount === 0) {
3343
+ setPending(null);
3344
+ return;
3345
+ }
3346
+ const editor = composerEditor();
3347
+ const anchor = selection.anchorNode;
3348
+ if (editor !== null && anchor !== null && editor.contains(anchor)) {
3349
+ if (selection.isCollapsed) caretRef.current = selection.getRangeAt(0).cloneRange();
3350
+ }
3351
+ if (selection.isCollapsed) {
3352
+ setPending(null);
3353
+ return;
3354
+ }
3355
+ const text = selection.toString().trim();
3356
+ if (text === "") {
3357
+ setPending(null);
3358
+ return;
3359
+ }
3360
+ const range = selection.getRangeAt(0);
3361
+ const container = range.commonAncestorContainer;
3362
+ const element = container.nodeType === Node.ELEMENT_NODE ? container : container.parentElement;
3363
+ if (element !== null && element.closest(IGNORED_SELECTION) !== null) {
3364
+ setPending(null);
3365
+ return;
3366
+ }
3367
+ const rects = range.getClientRects();
3368
+ const rect = rects.length > 0 ? rects[rects.length - 1] : range.getBoundingClientRect();
3369
+ if (rect === void 0) {
3370
+ setPending(null);
3371
+ return;
3372
+ }
3373
+ const half = 70;
3374
+ const POPUP_HEIGHT = 34;
3375
+ const below = rect.bottom + 6;
3376
+ const y = below + POPUP_HEIGHT > window.innerHeight ? Math.max(8, rect.top - POPUP_HEIGHT - 6) : below;
3377
+ setPending({
3378
+ text,
3379
+ x: Math.min(Math.max(rect.left + rect.width / 2, 78), window.innerWidth - half - 8),
3380
+ y
3381
+ });
3382
+ };
3383
+ document.addEventListener("selectionchange", sync);
3384
+ return () => {
3385
+ document.removeEventListener("selectionchange", sync);
3386
+ };
3387
+ }, []);
3388
+ (0, react.useEffect)(() => {
3389
+ const onKeyDown = (event) => {
3390
+ if (!(event.metaKey || event.ctrlKey) || !event.shiftKey) return;
3391
+ if (event.key.toLowerCase() !== "s") return;
3392
+ const selection = window.getSelection();
3393
+ if (selection === null || selection.isCollapsed) return;
3394
+ const text = selection.toString().trim();
3395
+ if (text === "") return;
3396
+ event.preventDefault();
3397
+ actions.add(text);
3398
+ cutComposerSelection();
3399
+ setPending(null);
3400
+ };
3401
+ window.addEventListener("keydown", onKeyDown);
3402
+ return () => {
3403
+ window.removeEventListener("keydown", onKeyDown);
3404
+ };
3405
+ }, [actions]);
3406
+ const stash = () => {
3407
+ const text = pendingRef.current?.text;
3408
+ if (text === void 0) return;
3409
+ actions.add(text);
3410
+ cutComposerSelection();
3411
+ setPending(null);
3412
+ window.getSelection()?.removeAllRanges();
3413
+ };
3414
+ const hoveredItem = hovered === null ? void 0 : items.find((item) => item.id === hovered.id);
3415
+ return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
3416
+ items.length > 0 && (0, react_jsx_runtime.jsx)("div", {
3417
+ className: TokenQuotaStash_module_css_default.stashRow,
3418
+ "data-token-quota-stash": "",
3419
+ children: items.map((item, index) => (0, react_jsx_runtime.jsx)("button", {
3420
+ type: "button",
3421
+ className: TokenQuotaStash_module_css_default.stashChip,
3422
+ onMouseDown: (event) => {
3423
+ event.preventDefault();
3424
+ },
3425
+ onMouseEnter: (event) => {
3426
+ const rect = event.currentTarget.getBoundingClientRect();
3427
+ setHovered({
3428
+ id: item.id,
3429
+ left: rect.left,
3430
+ top: rect.top
3431
+ });
3432
+ },
3433
+ onMouseLeave: () => {
3434
+ setHovered(null);
3435
+ },
3436
+ onClick: () => {
3437
+ insertIntoComposer(item.text, caretRef.current);
3438
+ actions.remove(item.id);
3439
+ setHovered(null);
3440
+ },
3441
+ "aria-label": t("stashChipHint").replace("{n}", String(index + 1)),
3442
+ children: stashBadge(index)
3443
+ }, item.id))
3444
+ }),
3445
+ hovered !== null && hoveredItem !== void 0 && (0, react_jsx_runtime.jsx)("div", {
3446
+ className: TokenQuotaStash_module_css_default.stashTip,
3447
+ "data-token-quota-stash": "",
3448
+ style: {
3449
+ left: Math.min(hovered.left, Math.max(8, window.innerWidth - 368)),
3450
+ bottom: window.innerHeight - hovered.top + 6
3451
+ },
3452
+ children: hoveredItem.text
3453
+ }),
3454
+ pending !== null && (0, react_jsx_runtime.jsxs)("div", {
3455
+ className: TokenQuotaStash_module_css_default.selPopup,
3456
+ "data-token-quota-stash": "",
3457
+ style: {
3458
+ left: pending.x,
3459
+ top: pending.y
3460
+ },
3461
+ onMouseDown: (event) => {
3462
+ event.preventDefault();
3463
+ },
3464
+ children: [
3465
+ (0, react_jsx_runtime.jsxs)("button", {
3466
+ type: "button",
3467
+ className: TokenQuotaStash_module_css_default.selBtn,
3468
+ onClick: () => {
3469
+ copyText(pending.text);
3470
+ setPending(null);
3471
+ },
3472
+ children: [(0, react_jsx_runtime.jsxs)("svg", {
3473
+ viewBox: "0 0 16 16",
3474
+ width: "12",
3475
+ height: "12",
3476
+ "aria-hidden": "true",
3477
+ children: [(0, react_jsx_runtime.jsx)("rect", {
3478
+ x: "5.6",
3479
+ y: "5.6",
3480
+ width: "7.8",
3481
+ height: "7.8",
3482
+ rx: "1.4",
3483
+ fill: "none",
3484
+ stroke: "currentColor",
3485
+ strokeWidth: "1.3"
3486
+ }), (0, react_jsx_runtime.jsx)("path", {
3487
+ d: "M10.4 5.6V4a1.4 1.4 0 0 0-1.4-1.4H4A1.4 1.4 0 0 0 2.6 4v5A1.4 1.4 0 0 0 4 10.4h1.6",
3488
+ fill: "none",
3489
+ stroke: "currentColor",
3490
+ strokeWidth: "1.3",
3491
+ strokeLinecap: "round"
3492
+ })]
3493
+ }), t("stashCopy")]
3494
+ }),
3495
+ (0, react_jsx_runtime.jsx)("span", {
3496
+ className: TokenQuotaStash_module_css_default.selDivider,
3497
+ "aria-hidden": "true"
3498
+ }),
3499
+ (0, react_jsx_runtime.jsxs)("button", {
3500
+ type: "button",
3501
+ className: TokenQuotaStash_module_css_default.selBtn,
3502
+ onClick: stash,
3503
+ children: [(0, react_jsx_runtime.jsx)("svg", {
3504
+ viewBox: "0 0 16 16",
3505
+ width: "12",
3506
+ height: "12",
3507
+ "aria-hidden": "true",
3508
+ children: (0, react_jsx_runtime.jsx)("path", {
3509
+ d: "M9.3 1.5 3.8 8.7h3.4l-.9 5.8 5.5-7.3H8.4z",
3510
+ fill: "currentColor"
3511
+ })
3512
+ }), t("stashSave")]
3513
+ })
3514
+ ]
3515
+ })
3516
+ ] });
3517
+ }
3050
3518
  //#endregion
3051
3519
  //#region lib/types/client/locales.js
3052
3520
  /**
@@ -3088,8 +3556,22 @@ window.__ModuleLoader__.load({
3088
3556
  transcribeEnabledHint: "在对话框右上角显示麦克风按钮",
3089
3557
  transcribeBaseURLLabel: "接口地址",
3090
3558
  transcribeBaseURLHint: "OpenAI 兼容的转录接口 base URL",
3091
- transcribeApiKeyEnvLabel: "API Key 环境变量",
3092
- transcribeApiKeyEnvHint: "存有 API Key 的凭证变量名(在 Models 页或 credentials 配置)",
3559
+ transcribeApiKeyEnvLabel: "凭证名称",
3560
+ transcribeApiKeyEnvHint: "密钥在凭证库中保存的名称,一般无需修改",
3561
+ transcribeKeyLabel: "API Key",
3562
+ transcribeKeyHint: "在此填入密钥并点「保存」,密钥会写入 DSH 凭证库(保存后不会回显)",
3563
+ transcribeKeyPlaceholder: "粘贴 API Key",
3564
+ transcribeKeyPlaceholderSet: "已配置,填入新值可覆盖",
3565
+ transcribeKeySave: "保存",
3566
+ transcribeKeySaving: "保存中…",
3567
+ transcribeKeySaved: "已保存",
3568
+ transcribeKeyConfigured: "已配置",
3569
+ transcribeKeyMissing: "未配置",
3570
+ transcribeKeyFailed: "保存失败",
3571
+ stashTitle: "临存",
3572
+ stashCopy: "复制",
3573
+ stashSave: "临存",
3574
+ stashChipHint: "点击把第 {n} 条插入输入框",
3093
3575
  transcribeModelLabel: "模型",
3094
3576
  transcribeModelHint: "语音转文本模型名",
3095
3577
  reorderHint: "拖动排序",
@@ -3217,8 +3699,22 @@ window.__ModuleLoader__.load({
3217
3699
  transcribeEnabledHint: "Show a mic button in the top-right of the composer",
3218
3700
  transcribeBaseURLLabel: "Base URL",
3219
3701
  transcribeBaseURLHint: "OpenAI-compatible transcription endpoint base URL",
3220
- transcribeApiKeyEnvLabel: "API key env var",
3221
- transcribeApiKeyEnvHint: "Credential variable name holding the API key (Models page or credentials)",
3702
+ transcribeApiKeyEnvLabel: "Credential name",
3703
+ transcribeApiKeyEnvHint: "Name the key is stored under in the credential store; usually unchanged",
3704
+ transcribeKeyLabel: "API key",
3705
+ transcribeKeyHint: "Paste the key here and press Save — it is written to the DSH credential store and never read back",
3706
+ transcribeKeyPlaceholder: "Paste API key",
3707
+ transcribeKeyPlaceholderSet: "Configured — enter a new value to replace",
3708
+ transcribeKeySave: "Save",
3709
+ transcribeKeySaving: "Saving…",
3710
+ transcribeKeySaved: "Saved",
3711
+ transcribeKeyConfigured: "Configured",
3712
+ transcribeKeyMissing: "Not configured",
3713
+ transcribeKeyFailed: "Save failed",
3714
+ stashTitle: "Stash",
3715
+ stashCopy: "Copy",
3716
+ stashSave: "Stash",
3717
+ stashChipHint: "Insert snippet {n} into the composer",
3222
3718
  transcribeModelLabel: "Model",
3223
3719
  transcribeModelHint: "Speech-to-text model name",
3224
3720
  reorderHint: "Drag to reorder",
@@ -3328,7 +3824,8 @@ window.__ModuleLoader__.load({
3328
3824
  "locale",
3329
3825
  "settingsScope",
3330
3826
  "remote",
3331
- "remote.session"
3827
+ "remote.session",
3828
+ "remote.credentials"
3332
3829
  ];
3333
3830
  /**
3334
3831
  * Client plugin body: poll the Host snapshot route, run the full-quota
@@ -3666,6 +4163,36 @@ window.__ModuleLoader__.load({
3666
4163
  scope.set("transcribe", settings);
3667
4164
  };
3668
4165
  /**
4166
+ * Read whether the transcription credential reference currently holds a key,
4167
+ * so the settings page can show 已配置 / 未配置 without ever reading the
4168
+ * secret back (the wire carries it in one direction only).
4169
+ */
4170
+ const checkTranscribeKey = async (ref) => {
4171
+ try {
4172
+ const result = await ctx.remote.credentials.describe([ref]);
4173
+ if (!result.ok) return false;
4174
+ return result.value[ref]?.configured === true;
4175
+ } catch {
4176
+ return false;
4177
+ }
4178
+ };
4179
+ /**
4180
+ * Store the transcription API key through the credential seam, so it lives
4181
+ * in the same credential store the Host resolves from — the user never has
4182
+ * to edit a file by hand.
4183
+ */
4184
+ const saveTranscribeKey = async (ref, value) => {
4185
+ try {
4186
+ await ctx.remote.credentials.set(ref, value);
4187
+ return { ok: true };
4188
+ } catch (error) {
4189
+ return {
4190
+ ok: false,
4191
+ error: error instanceof Error ? error.message : String(error)
4192
+ };
4193
+ }
4194
+ };
4195
+ /**
3669
4196
  * Send a recorded audio blob to the Host, which forwards it to the
3670
4197
  * configured OpenAI-compatible transcription endpoint. Resolves with the
3671
4198
  * recognised text.
@@ -3819,7 +4346,9 @@ window.__ModuleLoader__.load({
3819
4346
  saveNotes,
3820
4347
  setBalanceSettings,
3821
4348
  refreshBalance,
3822
- setTranscribeSettings
4349
+ setTranscribeSettings,
4350
+ checkTranscribeKey,
4351
+ saveTranscribeKey
3823
4352
  };
3824
4353
  };
3825
4354
  ctx.slots.inject("shell.overlay", () => ctx.slots.register({
@@ -3844,6 +4373,15 @@ window.__ModuleLoader__.load({
3844
4373
  t
3845
4374
  })
3846
4375
  }, TokenQuotaMic));
4376
+ const stashStore = createTokenQuotaStashStore();
4377
+ ctx.slots.inject("conversation.input.overlay", () => ctx.slots.register({
4378
+ name: "conversation.input.overlay",
4379
+ id: "token-quota-stash",
4380
+ order: 90,
4381
+ label: () => t("stashTitle"),
4382
+ store: stashStore,
4383
+ locale: NS
4384
+ }, TokenQuotaStash));
3847
4385
  }
3848
4386
  //#endregion
3849
4387
  exports.apply = apply;