@kaitranntt/ccs 7.77.1-dev.6 → 7.77.1-dev.7

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.
Files changed (43) hide show
  1. package/dist/cliproxy/provider-capabilities.d.ts +3 -0
  2. package/dist/cliproxy/provider-capabilities.d.ts.map +1 -1
  3. package/dist/cliproxy/provider-capabilities.js +13 -1
  4. package/dist/cliproxy/provider-capabilities.js.map +1 -1
  5. package/dist/ui/assets/{accounts-PYdWScEG.js → accounts-BWciW_nb.js} +1 -1
  6. package/dist/ui/assets/{alert-dialog-C5km8Mr2.js → alert-dialog-C-oyVuIB.js} +1 -1
  7. package/dist/ui/assets/{api-DyqNEbc3.js → api-CE6KShct.js} +1 -1
  8. package/dist/ui/assets/{auth-section-bEevgiYG.js → auth-section-Batq2rqI.js} +1 -1
  9. package/dist/ui/assets/{backups-section-D2xYCD_5.js → backups-section-C0dn7Ket.js} +1 -1
  10. package/dist/ui/assets/{channels-BC2C8bYa.js → channels-CVJfKJyT.js} +1 -1
  11. package/dist/ui/assets/{checkbox-DgzstwxZ.js → checkbox-BWXzxH0e.js} +1 -1
  12. package/dist/ui/assets/{claude-extension-BcKfLTXZ.js → claude-extension-DH0ltdyv.js} +1 -1
  13. package/dist/ui/assets/{cliproxy-fm0VYc-7.js → cliproxy-5ZQ4DdWj.js} +1 -1
  14. package/dist/ui/assets/{cliproxy-ai-providers-BjoutZZO.js → cliproxy-ai-providers-QZCa2DN7.js} +1 -1
  15. package/dist/ui/assets/{cliproxy-control-panel-lYLoiV9f.js → cliproxy-control-panel-BT1a2KtK.js} +1 -1
  16. package/dist/ui/assets/{codex-Bdvmcwzt.js → codex-DVC-dMzi.js} +1 -1
  17. package/dist/ui/assets/{confirm-dialog-BvtBhg50.js → confirm-dialog-7py4oJEQ.js} +1 -1
  18. package/dist/ui/assets/{copilot-D4noBxJX.js → copilot-DOe7yu8W.js} +1 -1
  19. package/dist/ui/assets/{cursor-CSVuplSL.js → cursor-TaT3xM-m.js} +1 -1
  20. package/dist/ui/assets/{droid-BU4DgcGo.js → droid-ClF_i2qJ.js} +1 -1
  21. package/dist/ui/assets/{globalenv-section-DpY3-sT2.js → globalenv-section-CLjnaW56.js} +1 -1
  22. package/dist/ui/assets/{health-DNtnCuU2.js → health-BUHx35_z.js} +1 -1
  23. package/dist/ui/assets/{index-PqtYNGNs.js → index-BIF0Wvld.js} +32 -32
  24. package/dist/ui/assets/{index-eLlSQvI4.js → index-BIgntzT5.js} +1 -1
  25. package/dist/ui/assets/{index-DCzk2IIO.js → index-Cv_ifcCd.js} +1 -1
  26. package/dist/ui/assets/{index-CMGQKWf9.js → index-Czt4jG_U.js} +1 -1
  27. package/dist/ui/assets/{index-CCOT49QL.js → index-D8l3dEVy.js} +1 -1
  28. package/dist/ui/assets/{index-BtXFodks.js → index-DCdHT0L4.js} +1 -1
  29. package/dist/ui/assets/{index-DVwLJ_IR.js → index-DZ9DNmxz.js} +1 -1
  30. package/dist/ui/assets/{logs-zi0sqSKN.js → logs-4FBxeZlN.js} +1 -1
  31. package/dist/ui/assets/{masked-input-BZNVruOb.js → masked-input-BUPGfXYs.js} +1 -1
  32. package/dist/ui/assets/{proxy-status-widget-is1EjfwJ.js → proxy-status-widget-CEVsYzZc.js} +1 -1
  33. package/dist/ui/assets/{raw-json-settings-editor-panel-B1-yuQmO.js → raw-json-settings-editor-panel-Bx9NZXKo.js} +1 -1
  34. package/dist/ui/assets/{searchable-select-RdyLh0wy.js → searchable-select-CRBVpRX9.js} +1 -1
  35. package/dist/ui/assets/{separator-DPjqb8vr.js → separator-oLpQ8QTJ.js} +1 -1
  36. package/dist/ui/assets/{shared-RoP2uryw.js → shared-CDOZvFvu.js} +1 -1
  37. package/dist/ui/assets/{table-M-kDRvQt.js → table-CvB4g1aV.js} +1 -1
  38. package/dist/ui/assets/{updates-BWU5VmTL.js → updates-FB-3z9nq.js} +1 -1
  39. package/dist/ui/index.html +1 -1
  40. package/dist/web-server/routes/cliproxy-auth-routes.d.ts.map +1 -1
  41. package/dist/web-server/routes/cliproxy-auth-routes.js +3 -0
  42. package/dist/web-server/routes/cliproxy-auth-routes.js.map +1 -1
  43. package/package.json +1 -1
@@ -24,6 +24,7 @@ export interface ProviderCapabilities {
24
24
  }
25
25
  export declare const PROVIDER_CAPABILITIES: Record<CLIProxyProvider, ProviderCapabilities>;
26
26
  export declare const CLIPROXY_PROVIDER_IDS: readonly CLIProxyProvider[];
27
+ export declare const BROWSER_URL_AUTH_PROVIDER_IDS: readonly ["cursor"];
27
28
  /** Providers currently supported by quota status fetchers. */
28
29
  export declare const QUOTA_SUPPORTED_PROVIDER_IDS: readonly ["agy", "codex", "claude", "gemini", "ghcp"];
29
30
  export type QuotaSupportedProvider = (typeof QUOTA_SUPPORTED_PROVIDER_IDS)[number];
@@ -36,6 +37,8 @@ export declare function getProviderCapabilities(provider: CLIProxyProvider): Pro
36
37
  export declare function getProviderDisplayName(provider: CLIProxyProvider): string;
37
38
  export declare function getProviderDescription(provider: CLIProxyProvider): string;
38
39
  export declare function getProvidersByOAuthFlow(flowType: OAuthFlowType): CLIProxyProvider[];
40
+ export declare function isBrowserUrlAuthProvider(provider: CLIProxyProvider): boolean;
41
+ export declare function getDeviceCodeVerificationProviders(): CLIProxyProvider[];
39
42
  export declare function getOAuthFlowType(provider: CLIProxyProvider): OAuthFlowType;
40
43
  export declare function getOAuthCallbackPort(provider: CLIProxyProvider): number | null;
41
44
  export declare function getCLIProxyCallbackProviderName(provider: CLIProxyProvider): string;
@@ -1 +1 @@
1
- {"version":3,"file":"provider-capabilities.d.ts","sourceRoot":"","sources":["../../src/cliproxy/provider-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,MAAM,aAAa,GAAG,oBAAoB,GAAG,aAAa,CAAC;AACjE,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,UAAU,GAAG,aAAa,CAAC;A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ports, "__esModule", { value: true });
3
- exports.isQuotaSupportedProvider = exports.mapExternalProviderName = exports.getProviderTokenTypeValues = exports.getProviderAuthFilePrefixes = exports.isRefreshDelegatedToCLIProxy = exports.getTokenRefreshOwnership = exports.getCLIProxyAuthUrlProviderName = exports.getCLIProxyCallbackProviderName = exports.getOAuthCallbackPort = exports.getOAuthFlowType = exports.getProvidersByOAuthFlow = exports.getProviderDescription = exports.getProviderDisplayName = exports.getProviderCapabilities = exports.isCLIProxyProvider = exports.buildProviderAliasMap = exports.buildProviderMap = exports.QUOTA_PROVIDER_HELP_TEXT = exports.QUOTA_PROVIDER_OPTION_VALUES = exports.QUOTA_SUPPORTED_PROVIDER_IDS = exports.CLIPROXY_PROVIDER_IDS = exports.PROVIDER_CAPABILITIES = void 0;
3
+ exports.isQuotaSupportedProvider = exports.mapExternalProviderName = exports.getProviderTokenTypeValues = exports.getProviderAuthFilePrefixes = exports.isRefreshDelegatedToCLIProxy = exports.getTokenRefreshOwnership = exports.getCLIProxyAuthUrlProviderName = exports.getCLIProxyCallbackProviderName = exports.getOAuthCallbackPort = exports.getOAuthFlowType = exports.getDeviceCodeVerificationProviders = exports.isBrowserUrlAuthProvider = exports.getProvidersByOAuthFlow = exports.getProviderDescription = exports.getProviderDisplayName = exports.getProviderCapabilities = exports.isCLIProxyProvider = exports.buildProviderAliasMap = exports.buildProviderMap = exports.QUOTA_PROVIDER_HELP_TEXT = exports.QUOTA_PROVIDER_OPTION_VALUES = exports.QUOTA_SUPPORTED_PROVIDER_IDS = exports.BROWSER_URL_AUTH_PROVIDER_IDS = exports.CLIPROXY_PROVIDER_IDS = exports.PROVIDER_CAPABILITIES = void 0;
4
4
  exports.PROVIDER_CAPABILITIES = {
5
5
  gemini: {
6
6
  displayName: 'Google Gemini',
@@ -160,6 +160,10 @@ exports.PROVIDER_CAPABILITIES = {
160
160
  },
161
161
  };
162
162
  exports.CLIPROXY_PROVIDER_IDS = Object.freeze(Object.keys(exports.PROVIDER_CAPABILITIES));
163
+ exports.BROWSER_URL_AUTH_PROVIDER_IDS = Object.freeze([
164
+ 'cursor',
165
+ ]);
166
+ const BROWSER_URL_AUTH_PROVIDER_SET = new Set(exports.BROWSER_URL_AUTH_PROVIDER_IDS);
163
167
  /** Providers currently supported by quota status fetchers. */
164
168
  exports.QUOTA_SUPPORTED_PROVIDER_IDS = Object.freeze([
165
169
  'agy',
@@ -227,6 +231,14 @@ function getProvidersByOAuthFlow(flowType) {
227
231
  return exports.CLIPROXY_PROVIDER_IDS.filter((provider) => exports.PROVIDER_CAPABILITIES[provider].oauthFlow === flowType);
228
232
  }
229
233
  exports.getProvidersByOAuthFlow = getProvidersByOAuthFlow;
234
+ function isBrowserUrlAuthProvider(provider) {
235
+ return BROWSER_URL_AUTH_PROVIDER_SET.has(provider);
236
+ }
237
+ exports.isBrowserUrlAuthProvider = isBrowserUrlAuthProvider;
238
+ function getDeviceCodeVerificationProviders() {
239
+ return getProvidersByOAuthFlow('device_code').filter((provider) => !isBrowserUrlAuthProvider(provider));
240
+ }
241
+ exports.getDeviceCodeVerificationProviders = getDeviceCodeVerificationProviders;
230
242
  function getOAuthFlowType(provider) {
231
243
  return exports.PROVIDER_CAPABILITIES[provider].oauthFlow;
232
244
  }
@@ -1 +1 @@
1
- {"version":3,"file":"provider-capabilities.js","sourceRoot":"","sources":["../../src/cliproxy/provider-capabilities.ts"],"names":[],"mappings":";;;AA2Ba,QAAA,qBAAqB,GAAmD;IACnF,MAAM,EAAE;QACN,WAAW,EAAE,eAAe;QAC5B,WAAW,EAAE,yBAAyB;QACtC,SAAS,EAAE,oBAAoB;QAC/B,YAAY,EAAE,IAAI;QAClB,oBAAoB,EAAE,QAAQ;QAC9B,mBAAmB,EAAE,YAAY;QACjC,gBAAgB,EAAE,UAAU;QAC5B,gBAAgB,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;QACxC,eAAe,EAAE,CAAC,QAAQ,CAAC;QAC3B,OAAO,EAAE,CAAC,YAAY,CAAC;KACxB;IACD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B,CAAC;AAC7D,CAAC;AAFD,wEAEC;AAED,SAAgB,wBAAwB,CAAC,QAA0B;IACjE,OAAO,6BAAqB,CAAC,QAAQ,CAAC,CAAC,gBAAgB,CAAC;AAC1D,CAAC;AAFD,4DAEC;AAED,SAAgB,4BAA4B,CAAC,QAA0B;IACrE,OAAO,6BAAqB,CAAC,QAAQ,CAAC,CAAC,gBAAgB,KAAK,UAAU,CAAC;AACzE,CAAC;AAFD,oEAEC;AAED,SAAgB,2BAA2B,CAAC,QAA0B;IACpE,OAAO,6BAAqB,CAAC,QAAQ,CAAC,CAAC,gBAAgB,CAAC;AAC1D,CAAC;AAFD,kEAEC;AAED,SAAgB,0BAA0B,CAAC,QAA0B;IACnE,OAAO,6BAAqB,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC;AACzD,CAAC;AAFD,gEAEC;AAED,SAAgB,uBAAuB,CAAC,YAAoB;IAC1D,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACrD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC;AACpD,CAAC;AAND,0DAMC;AAED,SAAgB,wBAAwB,CACtC,QAA0B;IAE1B,OAAO,4BAA4B,CAAC,GAAG,CAAC,QAAkC,CAAC,CAAC;AAC9E,CAAC;AAJD,4DAIC"}
@@ -1 +1 @@
1
- import{j as e}from"./radix-ui-nu4wz29m.js";import{r as C,e as ke}from"./react-vendor-Bjx91N7w.js";import{u as we,a as K,b as H,e as Pe,f as te,g as Ae}from"./tanstack-bhJxV1h8.js";import{T as De,a as _e,b as se,c as Se,d as Te,e as Ge}from"./table-M-kDRvQt.js";import{a as P,Y as O,ah as xe,ai as me,aj as he,ak as ge,al as pe,L as T,I as V,x as D,aD as Re,d as j,B as A,C as M,j as $,k as F,_ as E,b as z,e as Me,f as ze,g as Oe,n as $e}from"./index-PqtYNGNs.js";import{A as Fe,a as Le,b as Ke,c as He,d as Ie,e as qe,f as Ue,g as Ee}from"./alert-dialog-C5km8Mr2.js";import{t as k}from"./notifications-B4_o8bcr.js";import{b1 as W,b2 as L,b3 as ee,aH as fe,_ as be,b4 as Be,b5 as Qe,m as Y,at as Ze,Q as Xe,ai as Ve,b6 as We,a7 as Ye,$ as je,a6 as B,T as J,x as Je,o as ae,U as et,a9 as ne,Z as re}from"./icons-Ce9So20E.js";import{C as oe}from"./checkbox-DgzstwxZ.js";import"./utils-CzKF5WmX.js";import"./form-utils-CuHzLhJZ.js";import"./code-highlight-D4E79GKQ.js";function Z(a){return Array.from(a).sort((c,t)=>c.localeCompare(t))}function tt(a){const c=new Map;for(const n of a){if(n.context_mode!=="shared")continue;const g=n.context_group||"default",h=c.get(g)??{group:g,sharedCount:0,deeperCount:0,accountNames:[]};h.sharedCount+=1,h.accountNames.push(n.name),n.continuity_mode==="deeper"&&(h.deeperCount+=1),c.set(g,h)}const t=Array.from(c.values()).sort((n,g)=>n.group.localeCompare(g.group)),o=a.map(n=>{if(n.context_mode!=="shared")return{...n,sameGroupPeerCount:0,sameGroupDeeperPeerCount:0};const g=n.context_group||"default",h=c.get(g),N=Math.max((h?.sharedCount??1)-1,0),m=Math.max((h?.deeperCount??0)-(n.continuity_mode==="deeper"?1:0),0);return{...n,sameGroupPeerCount:N,sameGroupDeeperPeerCount:m}}),s=o.filter(n=>n.context_mode==="shared").length,l=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode==="deeper").length,d=o.filter(n=>n.context_inferred).length,x=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode!=="deeper"&&n.continuity_inferred).length;return{accounts:o,sharedCount:s,sharedStandardCount:Math.max(s-l,0),deeperSharedCount:l,isolatedCount:o.length-s,legacyContextCount:d,legacyContinuityCount:x,sharedAloneCount:o.filter(n=>n.context_mode==="shared"&&n.sameGroupPeerCount===0).length,sharedPeerAccountCount:o.filter(n=>n.sameGroupPeerCount>0).length,deeperReadyAccountCount:o.filter(n=>n.continuity_mode==="deeper"&&n.sameGroupDeeperPeerCount>0).length,sharedPeerGroups:Z(t.filter(n=>n.sharedCount>=2).map(n=>n.group)),deeperReadyGroups:Z(t.filter(n=>n.deeperCount>=2).map(n=>n.group)),sharedGroups:Z(t.map(n=>n.group)),groupSummaries:t}}function st(){return we({queryKey:["accounts"],queryFn:()=>O.accounts.list(),select:a=>{const c=a.accounts.filter(l=>l.type!=="cliproxy"),t=tt(c),o=a.accounts.length-c.length,s=t.accounts.some(l=>l.name===a.default)?a.default:null;return{accounts:t.accounts,default:s,cliproxyCount:o,legacyContextCount:t.legacyContextCount,legacyContinuityCount:t.legacyContinuityCount,sharedCount:t.sharedCount,sharedStandardCount:t.sharedStandardCount,deeperSharedCount:t.deeperSharedCount,isolatedCount:t.isolatedCount,sharedAloneCount:t.sharedAloneCount,sharedPeerAccountCount:t.sharedPeerAccountCount,deeperReadyAccountCount:t.deeperReadyAccountCount,sharedPeerGroups:t.sharedPeerGroups,deeperReadyGroups:t.deeperReadyGroups,sharedGroups:t.sharedGroups,groupSummaries:t.groupSummaries,plainCcsLane:a.plain_ccs_lane??null}}})}function at(){const a=K(),{t:c}=P();return H({mutationFn:t=>O.accounts.setDefault(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.defaultAccountSet",{name:o}))},onError:t=>{k.error(t.message)}})}function nt(){const a=K(),{t:c}=P();return H({mutationFn:()=>O.accounts.resetDefault(),onSuccess:()=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.defaultAccountReset"))},onError:t=>{k.error(t.message)}})}function rt(){const a=K(),{t:c}=P();return H({mutationFn:t=>O.accounts.delete(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.accountDeleted",{name:o}))},onError:t=>{k.error(t.message)}})}function ye(){const a=K(),{t:c}=P();return H({mutationFn:({name:t,context_mode:o,context_group:s,continuity_mode:l})=>O.accounts.updateContext(t,{context_mode:o,context_group:s,continuity_mode:l}),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]});const s=(o.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-"),l=o.context_mode==="shared"?o.continuity_mode==="deeper"?`${c("accountsPage.sharedDeeper")} (${s})`:`${c("accountsPage.sharedStandard")} (${s})`:c("accountsPage.isolated");k.success(c("toasts.contextUpdated",{name:o.name,summary:l}))},onError:t=>{k.error(t.message)}})}function ot(){const a=K(),{t:c}=P();return H({mutationFn:async t=>{const o=t.filter(d=>d.context_inferred||d.continuity_inferred),l=(await Promise.allSettled(o.map(d=>{const x=d.context_mode==="shared";return O.accounts.updateContext(d.name,{context_mode:x?"shared":"isolated",context_group:x?d.context_group||"default":void 0,continuity_mode:x?d.continuity_mode==="deeper"?"deeper":"standard":void 0})}))).filter(d=>d.status==="rejected").length;return{updatedCount:o.length-l,failedCount:l}},onSuccess:({updatedCount:t,failedCount:o})=>{if(a.invalidateQueries({queryKey:["accounts"]}),o>0&&t>0){k.error(c("toasts.legacyConfirmPartial",{updated:t,failed:o}));return}if(o>0){k.error(c("toasts.legacyConfirmAllFailed",{failed:o}));return}if(t>0){k.success(c("toasts.legacyConfirmSuccess",{count:t}));return}k.info(c("toasts.noLegacyAccounts"))},onError:t=>{a.invalidateQueries({queryKey:["accounts"]}),k.error(t.message)}})}const ce=64,ct=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function dt({account:a,groupSummaries:c,plainCcsLane:t,onClose:o}){const{t:s}=P(),l=ye(),[d,x]=C.useState(a.context_mode==="shared"?"shared":"isolated"),[n,g]=C.useState(a.context_group||"default"),[h,N]=C.useState(a.continuity_mode==="deeper"?"deeper":"standard"),m=C.useMemo(()=>n.trim().toLowerCase().replace(/\s+/g,"-"),[n]),i=C.useMemo(()=>c.find(p=>p.group===m),[c,m]),y=m.length>0&&m.length<=ce&&ct.test(m),r=d==="isolated"||y,u=d==="shared"?Math.max((i?.sharedCount??0)-(a.context_mode==="shared"&&a.context_group===m?1:0),0):0,b=d==="shared"?Math.max((i?.deeperCount??0)-(a.continuity_mode==="deeper"&&a.context_group===m?1:0),0):0,v=t?.account_name===a.name,f=!!t&&!v,G=`ccs auth default ${a.name}`,S=`ccs auth backup ${a.name}`,w=(p,q,R,U)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(p.key))return;p.preventDefault();const Ne=R.indexOf(q),ve=p.key==="ArrowLeft"||p.key==="ArrowUp"?-1:1,Ce=(Ne+ve+R.length)%R.length;U(R[Ce])},I=t?t.kind==="native"?s("continuityOverview.lane.native"):t.kind==="account-default"?s("continuityOverview.lane.accountDefault",{name:t.account_name||""}):t.kind==="account-inherited"?s("continuityOverview.lane.accountInherited",{name:t.account_name||""}):t.kind==="profile-default"?s("continuityOverview.lane.profileDefault",{name:t.profile_name||"default"}):t.label:"",_=()=>{r&&l.mutate({name:a.name,context_mode:d,context_group:d==="shared"?m:void 0,continuity_mode:d==="shared"?h:void 0},{onSuccess:()=>{o()}})},Q=p=>{p||o()};return e.jsx(xe,{open:!0,onOpenChange:Q,children:e.jsxs(me,{className:"sm:max-w-md",children:[e.jsxs(he,{children:[e.jsx(ge,{children:s("editAccountContext.title")}),e.jsx(pe,{children:s("editAccountContext.description",{name:a.name})})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(T,{className:"text-sm font-semibold",children:s("editAccountContext.syncMode")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.syncMode"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":d==="isolated",tabIndex:d==="isolated"?0:-1,onClick:()=>x("isolated"),onKeyDown:p=>w(p,d,["isolated","shared"],x),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${d==="isolated"?"bg-background text-blue-600 dark:text-blue-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(W,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.isolatedOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":d==="shared",tabIndex:d==="shared"?0:-1,onClick:()=>x("shared"),onKeyDown:p=>w(p,d,["isolated","shared"],x),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${d==="shared"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(L,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.sharedOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(d==="isolated"?"editAccountContext.isolatedModeHint":"editAccountContext.sharedModeHint")})]}),d==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"context-group",children:s("editAccountContext.historySyncGroup")}),e.jsx(V,{id:"context-group",value:n,onChange:p=>g(p.target.value),placeholder:s("editAccountContext.groupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.groupHint",{max:ce})}),!y&&e.jsx("p",{className:"text-xs text-destructive",children:s("editAccountContext.invalidGroup")})]}),d==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(T,{className:"text-sm font-semibold",children:s("editAccountContext.continuityDepth")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.continuityDepth"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":h==="standard",tabIndex:h==="standard"?0:-1,onClick:()=>N("standard"),onKeyDown:p=>w(p,h,["standard","deeper"],N),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${h==="standard"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(L,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.standardOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":h==="deeper",tabIndex:h==="deeper"?0:-1,onClick:()=>N("deeper"),onKeyDown:p=>w(p,h,["standard","deeper"],N),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${h==="deeper"?"bg-background text-indigo-600 dark:text-indigo-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(ee,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.deeperOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(h==="standard"?"editAccountContext.standardHint":"editAccountContext.deeperHint")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.credentialsIsolated")}),f&&e.jsx("div",{className:"rounded-[14px] border border-amber-200 bg-amber-50/50 p-4 text-xs shadow-sm dark:border-amber-900/40 dark:bg-amber-900/10",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium text-foreground",children:s("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:s("continuityOverview.plainLaneDescription",{lane:I||"plain ccs",name:a.name})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(D,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(D,{value:"ccs auth backup default",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:S}),e.jsx(D,{value:S,size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:G}),e.jsx(D,{value:G,size:"icon"})]})]})]})}),e.jsx("div",{className:`rounded-[14px] border p-4 text-xs shadow-sm transition-colors ${d==="isolated"?"bg-blue-50/50 border-blue-200 dark:bg-blue-900/10 dark:border-blue-800/40":"bg-muted/40 border-border/60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[d==="isolated"?e.jsx(fe,{className:"h-4 w-4 text-blue-500 mt-0.5 shrink-0"}):e.jsx(be,{className:"h-4 w-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1.5 flex-1 text-muted-foreground leading-relaxed",children:[d==="isolated"?e.jsx("p",{className:"text-foreground font-medium selection:bg-blue-200",children:s("editAccountContext.isolatedImplication")}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:s("editAccountContext.sameGroupRule",{group:m})})," ",u>0?s("editAccountContext.sameGroupPeerCount",{count:u}):s("editAccountContext.noSameGroupPeer")]}),h==="deeper"&&e.jsx("p",{children:b>0?s("editAccountContext.deeperReady",{count:b}):e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:s("editAccountContext.deeperNeedsPeers")})})]}),e.jsx("p",{className:`pt-1.5 text-[11px] ${d==="isolated"?"text-blue-700/70 dark:text-blue-300/60":"text-muted-foreground/70"}`,children:s("editAccountContext.resumeOriginalWarning")})]})]})})]}),e.jsxs(Re,{children:[e.jsx(j,{variant:"outline",onClick:o,disabled:l.isPending,children:s("editAccountContext.cancel")}),e.jsx(j,{onClick:_,disabled:!r||l.isPending,children:l.isPending?s("editAccountContext.saving"):s("editAccountContext.save")})]})]})})}function de({data:a,defaultAccount:c,groupSummaries:t,plainCcsLane:o}){const{t:s}=P(),l=at(),d=rt(),x=nt(),n=ye(),[g,h]=C.useState(null),[N,m]=C.useState(null),i=[{accessorKey:"name",header:s("accountsTable.name"),size:200,cell:({row:r})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:r.original.name}),r.original.name===c&&e.jsx("span",{className:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded border border-primary/20",children:s("accountsTable.defaultBadge")})]})},{accessorKey:"type",header:s("accountsTable.type"),size:100,cell:({row:r})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:r.original.type||"oauth"})},{accessorKey:"created",header:s("accountsTable.created"),size:150,cell:({row:r})=>{const u=new Date(r.original.created);return e.jsx("span",{className:"text-muted-foreground",children:u.toLocaleDateString()})}},{accessorKey:"last_used",header:s("accountsTable.lastUsed"),size:150,cell:({row:r})=>{if(!r.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const u=new Date(r.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:u.toLocaleDateString()})}},{id:"context",header:s("accountsTable.historySync"),size:170,cell:({row:r})=>{if(r.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((r.original.context_mode||"isolated")==="shared"){const b=r.original.context_group||"default",v=r.original.continuity_mode==="deeper";return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx(A,{variant:"outline",className:`font-mono text-[10px] uppercase px-1.5 py-0 border ${v?"text-indigo-700 border-indigo-300/60 bg-indigo-50/50 dark:text-indigo-300 dark:border-indigo-900/40 dark:bg-indigo-900/20":"text-emerald-700 border-emerald-300/60 bg-emerald-50/50 dark:text-emerald-300 dark:border-emerald-900/40 dark:bg-emerald-900/20"}`,children:s(v?"accountsTable.badges.deeper":"accountsTable.badges.shared")}),e.jsx("span",{className:"text-xs font-semibold text-foreground/80",children:b})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground whitespace-nowrap",children:r.original.sameGroupPeerCount>0?s("accountsTable.sameGroupPeerCount",{count:r.original.sameGroupPeerCount}):s("accountsTable.noSameGroupPeer")})]})}return r.original.context_inferred?e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(A,{variant:"outline",className:"text-amber-700 border-amber-300/60 bg-amber-50/50 dark:text-amber-400 dark:border-amber-900/40 dark:bg-amber-900/20 font-mono text-[10px] uppercase px-1.5 py-0",children:s("accountsTable.badges.legacy")}),e.jsx("p",{className:"text-[10px] text-amber-700/80 dark:text-amber-400/80 whitespace-nowrap",children:s("accountsTable.legacyReview")})]}):e.jsx("div",{className:"flex flex-col items-start gap-1.5",children:e.jsx(A,{variant:"secondary",className:"font-mono text-[10px] uppercase px-1.5 py-0 text-muted-foreground bg-muted/60 border-transparent shadow-none",children:s("accountsTable.badges.isolated")})})}},{id:"actions",header:s("accountsTable.actions"),size:220,cell:({row:r})=>{const u=r.original.name===c,b=l.isPending||d.isPending||n.isPending,v=r.original.type==="cliproxy",f=r.original.context_inferred||r.original.continuity_inferred;return e.jsxs("div",{className:"flex items-center gap-1",children:[!v&&e.jsxs(j,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:b,onClick:()=>m(r.original),title:s("accountsTable.syncTitle"),children:[e.jsx(Be,{className:"w-3.5 h-3.5 mr-1"}),s("accountsTable.sync")]}),!v&&f&&e.jsxs(j,{variant:"ghost",size:"sm",className:"h-8 px-2 text-amber-700 hover:text-amber-700 hover:bg-amber-500/10 dark:text-amber-400 dark:hover:text-amber-400",disabled:b,onClick:()=>n.mutate({name:r.original.name,context_mode:r.original.context_mode==="shared"?"shared":"isolated",context_group:r.original.context_mode==="shared"?r.original.context_group||"default":void 0,continuity_mode:r.original.context_mode==="shared"?r.original.continuity_mode==="deeper"?"deeper":"standard":void 0}),title:s("accountsTable.confirmLegacyTitle"),children:[e.jsx(Qe,{className:"w-3 h-3 mr-1"}),s("accountsTable.confirm")]}),e.jsxs(j,{variant:u?"secondary":"default",size:"sm",className:"h-8 px-2",disabled:u||b,onClick:()=>l.mutate(r.original.name),children:[e.jsx(Y,{className:`w-3 h-3 mr-1 ${u?"opacity-50":""}`}),s(u?"accountsTable.active":"accountsTable.setDefault")]}),e.jsx(j,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",disabled:u||b,onClick:()=>h(r.original.name),title:s(u?"accountsTable.cannotDeleteDefault":"accountsTable.deleteAccount"),children:e.jsx(Ze,{className:"w-4 h-4"})})]})}}],y=Pe({data:a,columns:i,getCoreRowModel:Ae()});return a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:s("accountsTable.noAccounts")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"border rounded-md",children:e.jsxs(De,{children:[e.jsx(_e,{children:y.getHeaderGroups().map(r=>e.jsx(se,{children:r.headers.map(u=>{const b={name:"w-[200px]",type:"w-[100px]",created:"w-[150px]",last_used:"w-[150px]",context:"w-[170px]",actions:"w-[290px]"}[u.id]||"w-auto";return e.jsx(Se,{className:b,children:u.isPlaceholder?null:te(u.column.columnDef.header,u.getContext())},u.id)})},r.id))}),e.jsx(Te,{children:y.getRowModel().rows.map(r=>e.jsx(se,{children:r.getVisibleCells().map(u=>e.jsx(Ge,{children:te(u.column.columnDef.cell,u.getContext())},u.id))},r.id))})]})}),c&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(j,{variant:"outline",size:"sm",onClick:()=>x.mutate(),disabled:x.isPending,children:[e.jsx(Xe,{className:"w-4 h-4 mr-2"}),s("accountsTable.resetToDefault")]})})]}),N&&e.jsx(dt,{account:N,groupSummaries:t,plainCcsLane:o,onClose:()=>m(null)}),e.jsx(Fe,{open:!!g,onOpenChange:r=>!r&&h(null),children:e.jsxs(Le,{children:[e.jsxs(Ke,{children:[e.jsx(He,{children:s("accountsTable.deleteDialogTitle")}),e.jsx(Ie,{children:s("accountsTable.deleteDialogDesc",{name:g??""})})]}),e.jsxs(qe,{children:[e.jsx(Ue,{children:s("accountsTable.cancel")}),e.jsx(Ee,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{g&&(d.mutate(g),h(null))},children:s("accountsTable.delete")})]})]})})]})}function le({totalAccounts:a,isolatedCount:c,sharedPeerGroups:t,deeperReadyGroups:o}){const{t:s}=P(),l=o[0]||t[0]||"daily",d=a<2?"empty":o.length>0?"deeper":t.length>0?"shared":a>=2&&c===a?"isolated":a===0?"empty":"mixed",x=`ccs auth create work2 --share-context --context-group ${l} --deeper-continuity`;return e.jsxs(M,{className:"overflow-hidden",children:[e.jsx($,{className:"pb-3",children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(F,{className:"text-lg",children:s("accountRouteGuide.title")}),e.jsx(E,{children:s("accountRouteGuide.description")})]}),e.jsx(A,{variant:d==="deeper"?"default":"secondary",children:s(`accountRouteGuide.status.${d}`)})]})}),e.jsxs(z,{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[e.jsxs("section",{className:"rounded-md border bg-blue-50/50 p-3 text-sm dark:bg-blue-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(Ve,{className:"h-4 w-4 text-blue-600 dark:text-blue-400"}),s("accountRouteGuide.cards.isolated.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.isolated.desc")})]}),e.jsxs("section",{className:"rounded-md border bg-emerald-50/50 p-3 text-sm dark:bg-emerald-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(We,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-400"}),s("accountRouteGuide.cards.select.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.select.desc")})]}),e.jsxs("section",{className:"rounded-md border bg-sky-50/50 p-3 text-sm dark:bg-sky-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(Ye,{className:"h-4 w-4 text-sky-600 dark:text-sky-400"}),s("accountRouteGuide.cards.settings.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.settings.desc")})]}),e.jsxs("section",{className:"rounded-md border bg-indigo-50/50 p-3 text-sm dark:bg-indigo-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(L,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-400"}),s("accountRouteGuide.cards.sync.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.sync.desc")})]})]}),e.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-md border bg-background p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:[e.jsx(je,{className:"h-3.5 w-3.5"}),s("accountRouteGuide.commands.isolated")]}),["ccs auth create work","ccs auth create personal","ccs work","ccs personal"].map(n=>e.jsxs("div",{className:"mt-2 flex items-start gap-2 rounded-md bg-muted px-2 py-2 font-mono text-[11px]",children:[e.jsx("span",{className:"flex-1 break-all",children:n}),e.jsx(D,{value:n,size:"icon"})]},n))]}),e.jsxs("div",{className:"rounded-md border bg-background p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:[e.jsx(ee,{className:"h-3.5 w-3.5"}),s("accountRouteGuide.commands.sync")]}),e.jsxs("div",{className:"flex items-start gap-2 rounded-md bg-muted px-2 py-2 font-mono text-[11px]",children:[e.jsx("span",{className:"flex-1 break-all",children:x}),e.jsx(D,{value:x,size:"icon"})]}),e.jsx("p",{className:"mt-2 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.commands.syncDesc",{group:l})})]})]})]})]})}const X=({titleKey:a,descKey:c})=>{const{t}=P();return e.jsxs(Me,{children:[e.jsx(ze,{asChild:!0,children:e.jsx(j,{variant:"ghost",size:"icon","aria-label":t(a),className:"h-5 w-5 rounded-full hover:bg-muted text-muted-foreground/70 transition-colors",children:e.jsx(be,{className:"h-3 w-3"})})}),e.jsxs(Oe,{className:"w-72 p-4 rounded-xl shadow-lg border-border/50 text-sm",side:"top",align:"center",children:[e.jsx("p",{className:"font-semibold tracking-tight",children:t(a)}),e.jsx("p",{className:"mt-1.5 text-muted-foreground leading-relaxed",children:t(c)})]})]})};function ie({totalAccounts:a,primaryAccountName:c,isolatedCount:t,sharedStandardCount:o,deeperSharedCount:s,sharedAloneCount:l,sharedPeerAccountCount:d,deeperReadyAccountCount:x,sharedPeerGroups:n,deeperReadyGroups:g,legacyTargetCount:h,cliproxyCount:N,plainCcsLane:m}){const{t:i}=P(),y=m?m.kind==="native"?i("continuityOverview.lane.native"):m.kind==="account-default"?i("continuityOverview.lane.accountDefault",{name:m.account_name||""}):m.kind==="account-inherited"?i("continuityOverview.lane.accountInherited",{name:m.account_name||""}):m.kind==="profile-default"?i("continuityOverview.lane.profileDefault",{name:m.profile_name||"default"}):m.label:"",r=a<2?"single":n.length===0?t===a?"isolated":"shared-alone":g.length===0?"shared-standard":t>0||l>0||x<d||g.length<n.length?"partial":"ready",u=g[0]||n[0]||"default",b=g.length>0&&(t>0||o>0||n.length>g.length),f={ready:e.jsx(Je,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"}),"shared-standard":e.jsx(L,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"}),single:e.jsx(fe,{className:"h-6 w-6 text-stone-400"}),isolated:e.jsx(W,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),"shared-alone":e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),partial:e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"})}[r],G=!!c&&m?.account_name===c,S=a>0&&!!m&&(!c||!G),w=a>1&&r!=="ready";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(M,{className:"flex flex-col justify-between overflow-hidden relative group p-0 border-border bg-card shadow-sm hover:shadow-md transition-shadow duration-300",children:e.jsxs(z,{className:"p-6 flex flex-col h-full bg-gradient-to-br from-card to-muted/20 space-y-4",children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-4",children:[e.jsx("div",{className:"rounded-2xl bg-background p-3 shadow-sm ring-1 ring-border/50 self-start shrink-0",children:f}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"text-lg font-semibold tracking-tight",children:i(`continuityReadiness.messages.${r}.title`,{group:u})}),e.jsx(A,{variant:r==="ready"?"default":"secondary",className:"rounded-full px-2.5 py-0.5 font-medium shadow-sm",children:i(`continuityReadiness.state.${r}`)})]}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-lg leading-relaxed",children:i(`continuityReadiness.messages.${r}.description`,{group:u,count:l})})]})]})}),e.jsxs("div",{className:"mt-auto pt-4 flex flex-wrap items-center gap-2",children:[N>0&&e.jsx(A,{variant:"outline",className:"text-blue-700 bg-blue-50/50 border-blue-200/60 dark:border-blue-900/40 dark:bg-blue-900/20 dark:text-blue-300",children:i("historySyncLearningMap.cliproxyManaged",{count:N})}),h>0&&e.jsx(A,{variant:"outline",className:"text-amber-700 bg-amber-50/50 border-amber-200/60 dark:border-amber-900/40 dark:bg-amber-900/20 dark:text-amber-300",children:i("historySyncLearningMap.legacyConfirmation",{count:h})}),n.length>0&&g.length===0&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:i("continuityOverview.recommendBadge",{group:u})}),b&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:i("continuityOverview.partialBadge",{group:u})})]})]})}),(S||w)&&e.jsx(M,{className:"border-dashed",children:e.jsxs(z,{className:"p-5 space-y-4",children:[S&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:i("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:i("continuityOverview.plainLaneDescription",{lane:y||"plain ccs"})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(D,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(D,{value:"ccs auth backup default",size:"icon"})]}),c?e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:`ccs auth default ${c}`}),e.jsx(D,{value:`ccs auth default ${c}`,size:"icon"})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:i("continuityOverview.setDefaultHint")})]})]}),w&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:i("continuityReadiness.stepsTitle")}),e.jsxs("ol",{className:"space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:i("continuityReadiness.steps.syncBoth")}),e.jsx("li",{children:i("continuityReadiness.steps.sameGroup",{group:u})}),e.jsx("li",{children:i("continuityReadiness.steps.enableDeeper")}),e.jsx("li",{children:i("continuityReadiness.steps.resumeOriginal")})]})]})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-3",children:[e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-blue-300/40 bg-blue-50/50 dark:border-blue-900/30 dark:bg-blue-900/10 shadow-sm transition-colors hover:bg-blue-100/40 dark:hover:bg-blue-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-blue-700/80 dark:text-blue-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-900 dark:text-blue-200",children:i("historySyncLearningMap.isolated")}),e.jsx(X,{titleKey:"accountsPage.isolated",descKey:"accountsPage.isolatedDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-blue-900 dark:text-blue-200",children:t})]}),e.jsx(B,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-emerald-300/40 bg-emerald-50/50 dark:border-emerald-900/30 dark:bg-emerald-900/10 shadow-sm transition-colors hover:bg-emerald-100/40 dark:hover:bg-emerald-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(L,{className:"h-4 w-4 text-emerald-700/80 dark:text-emerald-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-900 dark:text-emerald-200",children:i("historySyncLearningMap.shared")}),e.jsx(X,{titleKey:"accountsPage.sharedStandard",descKey:"accountsPage.sharedStandardDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-emerald-900 dark:text-emerald-200",children:o})]}),e.jsx(B,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-indigo-300/40 bg-indigo-50/50 dark:border-indigo-900/30 dark:bg-indigo-900/10 shadow-sm transition-colors hover:bg-indigo-100/40 dark:hover:bg-indigo-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ee,{className:"h-4 w-4 text-indigo-700/80 dark:text-indigo-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-indigo-900 dark:text-indigo-200",children:i("historySyncLearningMap.deeper")}),e.jsx(X,{titleKey:"accountsPage.sharedDeeper",descKey:"accountsPage.sharedDeeperDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-indigo-900 dark:text-indigo-200",children:s})]})]})]})}const ue=64;function lt({open:a,onClose:c}){const{t}=P(),[o,s]=C.useState(""),[l,d]=C.useState(!1),[x,n]=C.useState(""),[g,h]=C.useState(!1),[N,m]=C.useState(!1),i=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(o),y=x.trim().toLowerCase().replace(/\s+/g,"-"),r=y.length===0||y.length<=ue&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(y),u=o&&i?[`ccs auth create ${o}`,l?y.length>0?`--context-group ${y}`:"--share-context":"",l&&g?"--deeper-continuity":""].filter(Boolean).join(" "):t("createAuthProfileDialog.commandFallback"),b=async()=>{!i||l&&!r||(await navigator.clipboard.writeText(u),m(!0),setTimeout(()=>m(!1),2e3))},v=()=>{s(""),d(!1),n(""),h(!1),m(!1),c()};return e.jsx(xe,{open:a,onOpenChange:f=>!f&&v(),children:e.jsxs(me,{className:"sm:max-w-md",children:[e.jsxs(he,{children:[e.jsx(ge,{children:t("createAuthProfileDialog.title")}),e.jsx(pe,{children:t("createAuthProfileDialog.description")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"profile-name",children:t("createAuthProfileDialog.profileName")}),e.jsx(V,{id:"profile-name",value:o,onChange:f=>s(f.target.value),placeholder:t("createAuthProfileDialog.profileNamePlaceholder"),autoComplete:"off"}),o&&!i&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidProfileName")})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(oe,{id:"share-context",checked:l,onCheckedChange:f=>d(f===!0)}),e.jsx(T,{htmlFor:"share-context",className:"cursor-pointer",children:t("createAuthProfileDialog.enableSharedHistory")})]}),l&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(T,{htmlFor:"context-group",children:t("createAuthProfileDialog.historySyncGroupOptional")}),e.jsx(V,{id:"context-group",value:x,onChange:f=>n(f.target.value),placeholder:t("createAuthProfileDialog.historySyncGroupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.historySyncGroupHint")}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx(oe,{id:"deeper-continuity",checked:g,onCheckedChange:f=>h(f===!0)}),e.jsx(T,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:t("createAuthProfileDialog.deeperContinuity")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.deeperContinuityHint")}),x.trim().length>0&&!r&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidContextGroup",{max:ue})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:t("createAuthProfileDialog.command")}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(je,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:u}),e.jsx(j,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:b,disabled:!i||l&&!r,children:N?e.jsx(Y,{className:"w-4 h-4 text-green-500"}):e.jsx(ae,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:t("createAuthProfileDialog.afterRunPrefix")}),e.jsxs("ol",{className:"list-decimal list-inside pl-2 space-y-0.5",children:[e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep1")}),e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep2")})]}),e.jsx("p",{className:"pt-1",children:t("createAuthProfileDialog.poolingHint")})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(j,{variant:"ghost",onClick:v,children:t("createAuthProfileDialog.close")}),e.jsx(j,{onClick:b,disabled:!i||l&&!r,children:N?e.jsxs(e.Fragment,{children:[e.jsx(Y,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copyCommand")]})})]})]})]})})}function vt(){const{t:a}=P(),c=ke(),{data:t,isLoading:o}=st(),s=ot(),[l,d]=C.useState(!1),x=t?.accounts||[],n=t?.cliproxyCount||0,g=t?.legacyContextCount||0,h=t?.legacyContinuityCount||0,N=t?.sharedCount||0,m=t?.sharedStandardCount||0,i=t?.deeperSharedCount||0,y=t?.isolatedCount||0,r=t?.sharedAloneCount||0,u=t?.sharedPeerAccountCount||0,b=t?.deeperReadyAccountCount||0,v=t?.sharedPeerGroups||[],f=t?.deeperReadyGroups||[],G=t?.sharedGroups||[],S=t?.groupSummaries||[],w=t?.plainCcsLane||null,I=x.filter(U=>U.context_inferred||U.continuity_inferred),_=I.length,Q=_>0,p=()=>c("/cliproxy?provider=claude"),q=()=>c("/cliproxy?provider=claude&action=auth"),R=()=>s.mutate(I);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden h-full min-h-0 lg:flex",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/20 shrink-0",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(et,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:a("accountsPage.title")})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.manageSuffix")]})]}),e.jsx($e,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.primaryActions")}),e.jsxs(j,{size:"sm",className:"w-full justify-start",onClick:()=>d(!0),children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(j,{size:"sm",className:"w-full justify-start",onClick:q,children:[e.jsx(re,{className:"w-4 h-4 mr-2"}),a("accountsPage.authClaudeInPool")]}),e.jsxs(j,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:p,children:[a("accountsPage.openClaudePoolSettings"),e.jsx(B,{className:"w-4 h-4 ml-auto"})]})]}),Q?e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.migrationFollowup")}),e.jsxs("div",{className:"rounded-md border border-amber-500/50 bg-amber-500/10 p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(J,{className:"h-4 w-4 mt-0.5 text-amber-700 dark:text-amber-400 shrink-0"}),e.jsxs("div",{className:"space-y-1 text-xs",children:[g>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContextPending",{count:g})}),h>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContinuityPending",{count:h})})]})]}),e.jsx(j,{variant:"secondary",size:"sm",className:"w-full justify-start",onClick:R,disabled:s.isPending||_===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:_})})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:a("accountsPage.noLegacyFollowup")}),e.jsxs(M,{children:[e.jsxs($,{className:"pb-2",children:[e.jsx(F,{className:"text-sm",children:a("accountsPage.quickCommands")}),e.jsx(E,{children:a("accountsPage.quickCommandsDesc")})]}),e.jsxs(z,{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth create work --share-context --context-group sprint-a --deeper-continuity"}),e.jsx(D,{value:"ccs auth create work --share-context --context-group sprint-a --deeper-continuity",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs cliproxy auth claude"}),e.jsx(D,{value:"ccs cliproxy auth claude",size:"icon"})]})]})]})]})})]}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col bg-background",children:[e.jsxs("div",{className:"px-5 py-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(A,{variant:"outline",children:a("accountsPage.workspaceBadge")}),e.jsx(A,{variant:"secondary",children:a("accountsPage.historySyncBadge")})]}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:a("accountsPage.authAccounts")}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[a("accountsPage.tableScopePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.tableScopeMiddle"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:a("accountsTable.sync")}),a("accountsPage.tableScopeSuffix")]})]}),e.jsxs("div",{className:"flex-1 min-h-0 p-5 space-y-4 overflow-y-auto",children:[e.jsx(ie,{totalAccounts:x.length,primaryAccountName:x.length===1?x[0]?.name:null,isolatedCount:y,sharedStandardCount:m,deeperSharedCount:i,sharedAloneCount:r,sharedPeerAccountCount:u,deeperReadyAccountCount:b,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:f,legacyTargetCount:_,cliproxyCount:n,plainCcsLane:w}),e.jsx(le,{totalAccounts:x.length,isolatedCount:y,sharedPeerGroups:v,deeperReadyGroups:f}),e.jsxs(M,{className:"flex flex-col",children:[e.jsxs($,{className:"pb-3",children:[e.jsx(F,{className:"text-lg",children:a("accountsPage.accountMatrix")}),e.jsx(E,{children:a("accountsPage.sharedTotalDesc",{count:N})})]}),e.jsx(z,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(de,{data:x,defaultAccount:t?.default??null,groupSummaries:S,plainCcsLane:w})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(M,{children:[e.jsxs($,{children:[e.jsx(F,{className:"text-lg",children:a("accountsPage.title")}),e.jsxs(E,{children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.mobileManageSuffix")]})]}),e.jsxs(z,{className:"space-y-2",children:[e.jsxs(j,{className:"w-full",onClick:()=>d(!0),children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(j,{variant:"outline",className:"w-full",onClick:p,children:[a("accountsPage.openCliProxyClaudePool"),e.jsx(B,{className:"w-4 h-4 ml-2"})]}),e.jsxs(j,{variant:"outline",className:"w-full",onClick:q,children:[a("accountsPage.authClaudeInPool"),e.jsx(re,{className:"w-4 h-4 ml-2"})]}),e.jsx(j,{variant:"outline",className:"w-full",onClick:R,disabled:s.isPending||_===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:_})})]})]}),e.jsx(ie,{totalAccounts:x.length,primaryAccountName:x.length===1?x[0]?.name:null,isolatedCount:y,sharedStandardCount:m,deeperSharedCount:i,sharedAloneCount:r,sharedPeerAccountCount:u,deeperReadyAccountCount:b,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:f,legacyTargetCount:_,cliproxyCount:n,plainCcsLane:w}),e.jsx(le,{totalAccounts:x.length,isolatedCount:y,sharedPeerGroups:v,deeperReadyGroups:f}),e.jsxs(M,{children:[e.jsx($,{className:"pb-3",children:e.jsx(F,{className:"text-base",children:a("accountsPage.accountMatrix")})}),e.jsx(z,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(de,{data:x,defaultAccount:t?.default??null,groupSummaries:S,plainCcsLane:w})})]})]}),e.jsx(lt,{open:l,onClose:()=>d(!1)})]})}export{vt as AccountsPage};
1
+ import{j as e}from"./radix-ui-nu4wz29m.js";import{r as C,e as ke}from"./react-vendor-Bjx91N7w.js";import{u as we,a as K,b as H,e as Pe,f as te,g as Ae}from"./tanstack-bhJxV1h8.js";import{T as De,a as _e,b as se,c as Se,d as Te,e as Ge}from"./table-CvB4g1aV.js";import{a as P,Y as O,ah as xe,ai as me,aj as he,ak as ge,al as pe,L as T,I as V,x as D,aD as Re,d as j,B as A,C as M,j as $,k as F,_ as E,b as z,e as Me,f as ze,g as Oe,n as $e}from"./index-BIF0Wvld.js";import{A as Fe,a as Le,b as Ke,c as He,d as Ie,e as qe,f as Ue,g as Ee}from"./alert-dialog-C-oyVuIB.js";import{t as k}from"./notifications-B4_o8bcr.js";import{b1 as W,b2 as L,b3 as ee,aH as fe,_ as be,b4 as Be,b5 as Qe,m as Y,at as Ze,Q as Xe,ai as Ve,b6 as We,a7 as Ye,$ as je,a6 as B,T as J,x as Je,o as ae,U as et,a9 as ne,Z as re}from"./icons-Ce9So20E.js";import{C as oe}from"./checkbox-BWXzxH0e.js";import"./utils-CzKF5WmX.js";import"./form-utils-CuHzLhJZ.js";import"./code-highlight-D4E79GKQ.js";function Z(a){return Array.from(a).sort((c,t)=>c.localeCompare(t))}function tt(a){const c=new Map;for(const n of a){if(n.context_mode!=="shared")continue;const g=n.context_group||"default",h=c.get(g)??{group:g,sharedCount:0,deeperCount:0,accountNames:[]};h.sharedCount+=1,h.accountNames.push(n.name),n.continuity_mode==="deeper"&&(h.deeperCount+=1),c.set(g,h)}const t=Array.from(c.values()).sort((n,g)=>n.group.localeCompare(g.group)),o=a.map(n=>{if(n.context_mode!=="shared")return{...n,sameGroupPeerCount:0,sameGroupDeeperPeerCount:0};const g=n.context_group||"default",h=c.get(g),N=Math.max((h?.sharedCount??1)-1,0),m=Math.max((h?.deeperCount??0)-(n.continuity_mode==="deeper"?1:0),0);return{...n,sameGroupPeerCount:N,sameGroupDeeperPeerCount:m}}),s=o.filter(n=>n.context_mode==="shared").length,l=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode==="deeper").length,d=o.filter(n=>n.context_inferred).length,x=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode!=="deeper"&&n.continuity_inferred).length;return{accounts:o,sharedCount:s,sharedStandardCount:Math.max(s-l,0),deeperSharedCount:l,isolatedCount:o.length-s,legacyContextCount:d,legacyContinuityCount:x,sharedAloneCount:o.filter(n=>n.context_mode==="shared"&&n.sameGroupPeerCount===0).length,sharedPeerAccountCount:o.filter(n=>n.sameGroupPeerCount>0).length,deeperReadyAccountCount:o.filter(n=>n.continuity_mode==="deeper"&&n.sameGroupDeeperPeerCount>0).length,sharedPeerGroups:Z(t.filter(n=>n.sharedCount>=2).map(n=>n.group)),deeperReadyGroups:Z(t.filter(n=>n.deeperCount>=2).map(n=>n.group)),sharedGroups:Z(t.map(n=>n.group)),groupSummaries:t}}function st(){return we({queryKey:["accounts"],queryFn:()=>O.accounts.list(),select:a=>{const c=a.accounts.filter(l=>l.type!=="cliproxy"),t=tt(c),o=a.accounts.length-c.length,s=t.accounts.some(l=>l.name===a.default)?a.default:null;return{accounts:t.accounts,default:s,cliproxyCount:o,legacyContextCount:t.legacyContextCount,legacyContinuityCount:t.legacyContinuityCount,sharedCount:t.sharedCount,sharedStandardCount:t.sharedStandardCount,deeperSharedCount:t.deeperSharedCount,isolatedCount:t.isolatedCount,sharedAloneCount:t.sharedAloneCount,sharedPeerAccountCount:t.sharedPeerAccountCount,deeperReadyAccountCount:t.deeperReadyAccountCount,sharedPeerGroups:t.sharedPeerGroups,deeperReadyGroups:t.deeperReadyGroups,sharedGroups:t.sharedGroups,groupSummaries:t.groupSummaries,plainCcsLane:a.plain_ccs_lane??null}}})}function at(){const a=K(),{t:c}=P();return H({mutationFn:t=>O.accounts.setDefault(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.defaultAccountSet",{name:o}))},onError:t=>{k.error(t.message)}})}function nt(){const a=K(),{t:c}=P();return H({mutationFn:()=>O.accounts.resetDefault(),onSuccess:()=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.defaultAccountReset"))},onError:t=>{k.error(t.message)}})}function rt(){const a=K(),{t:c}=P();return H({mutationFn:t=>O.accounts.delete(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.accountDeleted",{name:o}))},onError:t=>{k.error(t.message)}})}function ye(){const a=K(),{t:c}=P();return H({mutationFn:({name:t,context_mode:o,context_group:s,continuity_mode:l})=>O.accounts.updateContext(t,{context_mode:o,context_group:s,continuity_mode:l}),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]});const s=(o.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-"),l=o.context_mode==="shared"?o.continuity_mode==="deeper"?`${c("accountsPage.sharedDeeper")} (${s})`:`${c("accountsPage.sharedStandard")} (${s})`:c("accountsPage.isolated");k.success(c("toasts.contextUpdated",{name:o.name,summary:l}))},onError:t=>{k.error(t.message)}})}function ot(){const a=K(),{t:c}=P();return H({mutationFn:async t=>{const o=t.filter(d=>d.context_inferred||d.continuity_inferred),l=(await Promise.allSettled(o.map(d=>{const x=d.context_mode==="shared";return O.accounts.updateContext(d.name,{context_mode:x?"shared":"isolated",context_group:x?d.context_group||"default":void 0,continuity_mode:x?d.continuity_mode==="deeper"?"deeper":"standard":void 0})}))).filter(d=>d.status==="rejected").length;return{updatedCount:o.length-l,failedCount:l}},onSuccess:({updatedCount:t,failedCount:o})=>{if(a.invalidateQueries({queryKey:["accounts"]}),o>0&&t>0){k.error(c("toasts.legacyConfirmPartial",{updated:t,failed:o}));return}if(o>0){k.error(c("toasts.legacyConfirmAllFailed",{failed:o}));return}if(t>0){k.success(c("toasts.legacyConfirmSuccess",{count:t}));return}k.info(c("toasts.noLegacyAccounts"))},onError:t=>{a.invalidateQueries({queryKey:["accounts"]}),k.error(t.message)}})}const ce=64,ct=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function dt({account:a,groupSummaries:c,plainCcsLane:t,onClose:o}){const{t:s}=P(),l=ye(),[d,x]=C.useState(a.context_mode==="shared"?"shared":"isolated"),[n,g]=C.useState(a.context_group||"default"),[h,N]=C.useState(a.continuity_mode==="deeper"?"deeper":"standard"),m=C.useMemo(()=>n.trim().toLowerCase().replace(/\s+/g,"-"),[n]),i=C.useMemo(()=>c.find(p=>p.group===m),[c,m]),y=m.length>0&&m.length<=ce&&ct.test(m),r=d==="isolated"||y,u=d==="shared"?Math.max((i?.sharedCount??0)-(a.context_mode==="shared"&&a.context_group===m?1:0),0):0,b=d==="shared"?Math.max((i?.deeperCount??0)-(a.continuity_mode==="deeper"&&a.context_group===m?1:0),0):0,v=t?.account_name===a.name,f=!!t&&!v,G=`ccs auth default ${a.name}`,S=`ccs auth backup ${a.name}`,w=(p,q,R,U)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(p.key))return;p.preventDefault();const Ne=R.indexOf(q),ve=p.key==="ArrowLeft"||p.key==="ArrowUp"?-1:1,Ce=(Ne+ve+R.length)%R.length;U(R[Ce])},I=t?t.kind==="native"?s("continuityOverview.lane.native"):t.kind==="account-default"?s("continuityOverview.lane.accountDefault",{name:t.account_name||""}):t.kind==="account-inherited"?s("continuityOverview.lane.accountInherited",{name:t.account_name||""}):t.kind==="profile-default"?s("continuityOverview.lane.profileDefault",{name:t.profile_name||"default"}):t.label:"",_=()=>{r&&l.mutate({name:a.name,context_mode:d,context_group:d==="shared"?m:void 0,continuity_mode:d==="shared"?h:void 0},{onSuccess:()=>{o()}})},Q=p=>{p||o()};return e.jsx(xe,{open:!0,onOpenChange:Q,children:e.jsxs(me,{className:"sm:max-w-md",children:[e.jsxs(he,{children:[e.jsx(ge,{children:s("editAccountContext.title")}),e.jsx(pe,{children:s("editAccountContext.description",{name:a.name})})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(T,{className:"text-sm font-semibold",children:s("editAccountContext.syncMode")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.syncMode"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":d==="isolated",tabIndex:d==="isolated"?0:-1,onClick:()=>x("isolated"),onKeyDown:p=>w(p,d,["isolated","shared"],x),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${d==="isolated"?"bg-background text-blue-600 dark:text-blue-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(W,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.isolatedOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":d==="shared",tabIndex:d==="shared"?0:-1,onClick:()=>x("shared"),onKeyDown:p=>w(p,d,["isolated","shared"],x),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${d==="shared"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(L,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.sharedOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(d==="isolated"?"editAccountContext.isolatedModeHint":"editAccountContext.sharedModeHint")})]}),d==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"context-group",children:s("editAccountContext.historySyncGroup")}),e.jsx(V,{id:"context-group",value:n,onChange:p=>g(p.target.value),placeholder:s("editAccountContext.groupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.groupHint",{max:ce})}),!y&&e.jsx("p",{className:"text-xs text-destructive",children:s("editAccountContext.invalidGroup")})]}),d==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(T,{className:"text-sm font-semibold",children:s("editAccountContext.continuityDepth")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.continuityDepth"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":h==="standard",tabIndex:h==="standard"?0:-1,onClick:()=>N("standard"),onKeyDown:p=>w(p,h,["standard","deeper"],N),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${h==="standard"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(L,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.standardOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":h==="deeper",tabIndex:h==="deeper"?0:-1,onClick:()=>N("deeper"),onKeyDown:p=>w(p,h,["standard","deeper"],N),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${h==="deeper"?"bg-background text-indigo-600 dark:text-indigo-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(ee,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.deeperOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(h==="standard"?"editAccountContext.standardHint":"editAccountContext.deeperHint")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.credentialsIsolated")}),f&&e.jsx("div",{className:"rounded-[14px] border border-amber-200 bg-amber-50/50 p-4 text-xs shadow-sm dark:border-amber-900/40 dark:bg-amber-900/10",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium text-foreground",children:s("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:s("continuityOverview.plainLaneDescription",{lane:I||"plain ccs",name:a.name})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(D,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(D,{value:"ccs auth backup default",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:S}),e.jsx(D,{value:S,size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:G}),e.jsx(D,{value:G,size:"icon"})]})]})]})}),e.jsx("div",{className:`rounded-[14px] border p-4 text-xs shadow-sm transition-colors ${d==="isolated"?"bg-blue-50/50 border-blue-200 dark:bg-blue-900/10 dark:border-blue-800/40":"bg-muted/40 border-border/60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[d==="isolated"?e.jsx(fe,{className:"h-4 w-4 text-blue-500 mt-0.5 shrink-0"}):e.jsx(be,{className:"h-4 w-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1.5 flex-1 text-muted-foreground leading-relaxed",children:[d==="isolated"?e.jsx("p",{className:"text-foreground font-medium selection:bg-blue-200",children:s("editAccountContext.isolatedImplication")}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:s("editAccountContext.sameGroupRule",{group:m})})," ",u>0?s("editAccountContext.sameGroupPeerCount",{count:u}):s("editAccountContext.noSameGroupPeer")]}),h==="deeper"&&e.jsx("p",{children:b>0?s("editAccountContext.deeperReady",{count:b}):e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:s("editAccountContext.deeperNeedsPeers")})})]}),e.jsx("p",{className:`pt-1.5 text-[11px] ${d==="isolated"?"text-blue-700/70 dark:text-blue-300/60":"text-muted-foreground/70"}`,children:s("editAccountContext.resumeOriginalWarning")})]})]})})]}),e.jsxs(Re,{children:[e.jsx(j,{variant:"outline",onClick:o,disabled:l.isPending,children:s("editAccountContext.cancel")}),e.jsx(j,{onClick:_,disabled:!r||l.isPending,children:l.isPending?s("editAccountContext.saving"):s("editAccountContext.save")})]})]})})}function de({data:a,defaultAccount:c,groupSummaries:t,plainCcsLane:o}){const{t:s}=P(),l=at(),d=rt(),x=nt(),n=ye(),[g,h]=C.useState(null),[N,m]=C.useState(null),i=[{accessorKey:"name",header:s("accountsTable.name"),size:200,cell:({row:r})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:r.original.name}),r.original.name===c&&e.jsx("span",{className:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded border border-primary/20",children:s("accountsTable.defaultBadge")})]})},{accessorKey:"type",header:s("accountsTable.type"),size:100,cell:({row:r})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:r.original.type||"oauth"})},{accessorKey:"created",header:s("accountsTable.created"),size:150,cell:({row:r})=>{const u=new Date(r.original.created);return e.jsx("span",{className:"text-muted-foreground",children:u.toLocaleDateString()})}},{accessorKey:"last_used",header:s("accountsTable.lastUsed"),size:150,cell:({row:r})=>{if(!r.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const u=new Date(r.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:u.toLocaleDateString()})}},{id:"context",header:s("accountsTable.historySync"),size:170,cell:({row:r})=>{if(r.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((r.original.context_mode||"isolated")==="shared"){const b=r.original.context_group||"default",v=r.original.continuity_mode==="deeper";return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx(A,{variant:"outline",className:`font-mono text-[10px] uppercase px-1.5 py-0 border ${v?"text-indigo-700 border-indigo-300/60 bg-indigo-50/50 dark:text-indigo-300 dark:border-indigo-900/40 dark:bg-indigo-900/20":"text-emerald-700 border-emerald-300/60 bg-emerald-50/50 dark:text-emerald-300 dark:border-emerald-900/40 dark:bg-emerald-900/20"}`,children:s(v?"accountsTable.badges.deeper":"accountsTable.badges.shared")}),e.jsx("span",{className:"text-xs font-semibold text-foreground/80",children:b})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground whitespace-nowrap",children:r.original.sameGroupPeerCount>0?s("accountsTable.sameGroupPeerCount",{count:r.original.sameGroupPeerCount}):s("accountsTable.noSameGroupPeer")})]})}return r.original.context_inferred?e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(A,{variant:"outline",className:"text-amber-700 border-amber-300/60 bg-amber-50/50 dark:text-amber-400 dark:border-amber-900/40 dark:bg-amber-900/20 font-mono text-[10px] uppercase px-1.5 py-0",children:s("accountsTable.badges.legacy")}),e.jsx("p",{className:"text-[10px] text-amber-700/80 dark:text-amber-400/80 whitespace-nowrap",children:s("accountsTable.legacyReview")})]}):e.jsx("div",{className:"flex flex-col items-start gap-1.5",children:e.jsx(A,{variant:"secondary",className:"font-mono text-[10px] uppercase px-1.5 py-0 text-muted-foreground bg-muted/60 border-transparent shadow-none",children:s("accountsTable.badges.isolated")})})}},{id:"actions",header:s("accountsTable.actions"),size:220,cell:({row:r})=>{const u=r.original.name===c,b=l.isPending||d.isPending||n.isPending,v=r.original.type==="cliproxy",f=r.original.context_inferred||r.original.continuity_inferred;return e.jsxs("div",{className:"flex items-center gap-1",children:[!v&&e.jsxs(j,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:b,onClick:()=>m(r.original),title:s("accountsTable.syncTitle"),children:[e.jsx(Be,{className:"w-3.5 h-3.5 mr-1"}),s("accountsTable.sync")]}),!v&&f&&e.jsxs(j,{variant:"ghost",size:"sm",className:"h-8 px-2 text-amber-700 hover:text-amber-700 hover:bg-amber-500/10 dark:text-amber-400 dark:hover:text-amber-400",disabled:b,onClick:()=>n.mutate({name:r.original.name,context_mode:r.original.context_mode==="shared"?"shared":"isolated",context_group:r.original.context_mode==="shared"?r.original.context_group||"default":void 0,continuity_mode:r.original.context_mode==="shared"?r.original.continuity_mode==="deeper"?"deeper":"standard":void 0}),title:s("accountsTable.confirmLegacyTitle"),children:[e.jsx(Qe,{className:"w-3 h-3 mr-1"}),s("accountsTable.confirm")]}),e.jsxs(j,{variant:u?"secondary":"default",size:"sm",className:"h-8 px-2",disabled:u||b,onClick:()=>l.mutate(r.original.name),children:[e.jsx(Y,{className:`w-3 h-3 mr-1 ${u?"opacity-50":""}`}),s(u?"accountsTable.active":"accountsTable.setDefault")]}),e.jsx(j,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",disabled:u||b,onClick:()=>h(r.original.name),title:s(u?"accountsTable.cannotDeleteDefault":"accountsTable.deleteAccount"),children:e.jsx(Ze,{className:"w-4 h-4"})})]})}}],y=Pe({data:a,columns:i,getCoreRowModel:Ae()});return a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:s("accountsTable.noAccounts")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"border rounded-md",children:e.jsxs(De,{children:[e.jsx(_e,{children:y.getHeaderGroups().map(r=>e.jsx(se,{children:r.headers.map(u=>{const b={name:"w-[200px]",type:"w-[100px]",created:"w-[150px]",last_used:"w-[150px]",context:"w-[170px]",actions:"w-[290px]"}[u.id]||"w-auto";return e.jsx(Se,{className:b,children:u.isPlaceholder?null:te(u.column.columnDef.header,u.getContext())},u.id)})},r.id))}),e.jsx(Te,{children:y.getRowModel().rows.map(r=>e.jsx(se,{children:r.getVisibleCells().map(u=>e.jsx(Ge,{children:te(u.column.columnDef.cell,u.getContext())},u.id))},r.id))})]})}),c&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(j,{variant:"outline",size:"sm",onClick:()=>x.mutate(),disabled:x.isPending,children:[e.jsx(Xe,{className:"w-4 h-4 mr-2"}),s("accountsTable.resetToDefault")]})})]}),N&&e.jsx(dt,{account:N,groupSummaries:t,plainCcsLane:o,onClose:()=>m(null)}),e.jsx(Fe,{open:!!g,onOpenChange:r=>!r&&h(null),children:e.jsxs(Le,{children:[e.jsxs(Ke,{children:[e.jsx(He,{children:s("accountsTable.deleteDialogTitle")}),e.jsx(Ie,{children:s("accountsTable.deleteDialogDesc",{name:g??""})})]}),e.jsxs(qe,{children:[e.jsx(Ue,{children:s("accountsTable.cancel")}),e.jsx(Ee,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{g&&(d.mutate(g),h(null))},children:s("accountsTable.delete")})]})]})})]})}function le({totalAccounts:a,isolatedCount:c,sharedPeerGroups:t,deeperReadyGroups:o}){const{t:s}=P(),l=o[0]||t[0]||"daily",d=a<2?"empty":o.length>0?"deeper":t.length>0?"shared":a>=2&&c===a?"isolated":a===0?"empty":"mixed",x=`ccs auth create work2 --share-context --context-group ${l} --deeper-continuity`;return e.jsxs(M,{className:"overflow-hidden",children:[e.jsx($,{className:"pb-3",children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(F,{className:"text-lg",children:s("accountRouteGuide.title")}),e.jsx(E,{children:s("accountRouteGuide.description")})]}),e.jsx(A,{variant:d==="deeper"?"default":"secondary",children:s(`accountRouteGuide.status.${d}`)})]})}),e.jsxs(z,{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[e.jsxs("section",{className:"rounded-md border bg-blue-50/50 p-3 text-sm dark:bg-blue-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(Ve,{className:"h-4 w-4 text-blue-600 dark:text-blue-400"}),s("accountRouteGuide.cards.isolated.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.isolated.desc")})]}),e.jsxs("section",{className:"rounded-md border bg-emerald-50/50 p-3 text-sm dark:bg-emerald-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(We,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-400"}),s("accountRouteGuide.cards.select.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.select.desc")})]}),e.jsxs("section",{className:"rounded-md border bg-sky-50/50 p-3 text-sm dark:bg-sky-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(Ye,{className:"h-4 w-4 text-sky-600 dark:text-sky-400"}),s("accountRouteGuide.cards.settings.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.settings.desc")})]}),e.jsxs("section",{className:"rounded-md border bg-indigo-50/50 p-3 text-sm dark:bg-indigo-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(L,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-400"}),s("accountRouteGuide.cards.sync.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.sync.desc")})]})]}),e.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-md border bg-background p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:[e.jsx(je,{className:"h-3.5 w-3.5"}),s("accountRouteGuide.commands.isolated")]}),["ccs auth create work","ccs auth create personal","ccs work","ccs personal"].map(n=>e.jsxs("div",{className:"mt-2 flex items-start gap-2 rounded-md bg-muted px-2 py-2 font-mono text-[11px]",children:[e.jsx("span",{className:"flex-1 break-all",children:n}),e.jsx(D,{value:n,size:"icon"})]},n))]}),e.jsxs("div",{className:"rounded-md border bg-background p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:[e.jsx(ee,{className:"h-3.5 w-3.5"}),s("accountRouteGuide.commands.sync")]}),e.jsxs("div",{className:"flex items-start gap-2 rounded-md bg-muted px-2 py-2 font-mono text-[11px]",children:[e.jsx("span",{className:"flex-1 break-all",children:x}),e.jsx(D,{value:x,size:"icon"})]}),e.jsx("p",{className:"mt-2 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.commands.syncDesc",{group:l})})]})]})]})]})}const X=({titleKey:a,descKey:c})=>{const{t}=P();return e.jsxs(Me,{children:[e.jsx(ze,{asChild:!0,children:e.jsx(j,{variant:"ghost",size:"icon","aria-label":t(a),className:"h-5 w-5 rounded-full hover:bg-muted text-muted-foreground/70 transition-colors",children:e.jsx(be,{className:"h-3 w-3"})})}),e.jsxs(Oe,{className:"w-72 p-4 rounded-xl shadow-lg border-border/50 text-sm",side:"top",align:"center",children:[e.jsx("p",{className:"font-semibold tracking-tight",children:t(a)}),e.jsx("p",{className:"mt-1.5 text-muted-foreground leading-relaxed",children:t(c)})]})]})};function ie({totalAccounts:a,primaryAccountName:c,isolatedCount:t,sharedStandardCount:o,deeperSharedCount:s,sharedAloneCount:l,sharedPeerAccountCount:d,deeperReadyAccountCount:x,sharedPeerGroups:n,deeperReadyGroups:g,legacyTargetCount:h,cliproxyCount:N,plainCcsLane:m}){const{t:i}=P(),y=m?m.kind==="native"?i("continuityOverview.lane.native"):m.kind==="account-default"?i("continuityOverview.lane.accountDefault",{name:m.account_name||""}):m.kind==="account-inherited"?i("continuityOverview.lane.accountInherited",{name:m.account_name||""}):m.kind==="profile-default"?i("continuityOverview.lane.profileDefault",{name:m.profile_name||"default"}):m.label:"",r=a<2?"single":n.length===0?t===a?"isolated":"shared-alone":g.length===0?"shared-standard":t>0||l>0||x<d||g.length<n.length?"partial":"ready",u=g[0]||n[0]||"default",b=g.length>0&&(t>0||o>0||n.length>g.length),f={ready:e.jsx(Je,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"}),"shared-standard":e.jsx(L,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"}),single:e.jsx(fe,{className:"h-6 w-6 text-stone-400"}),isolated:e.jsx(W,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),"shared-alone":e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),partial:e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"})}[r],G=!!c&&m?.account_name===c,S=a>0&&!!m&&(!c||!G),w=a>1&&r!=="ready";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(M,{className:"flex flex-col justify-between overflow-hidden relative group p-0 border-border bg-card shadow-sm hover:shadow-md transition-shadow duration-300",children:e.jsxs(z,{className:"p-6 flex flex-col h-full bg-gradient-to-br from-card to-muted/20 space-y-4",children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-4",children:[e.jsx("div",{className:"rounded-2xl bg-background p-3 shadow-sm ring-1 ring-border/50 self-start shrink-0",children:f}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"text-lg font-semibold tracking-tight",children:i(`continuityReadiness.messages.${r}.title`,{group:u})}),e.jsx(A,{variant:r==="ready"?"default":"secondary",className:"rounded-full px-2.5 py-0.5 font-medium shadow-sm",children:i(`continuityReadiness.state.${r}`)})]}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-lg leading-relaxed",children:i(`continuityReadiness.messages.${r}.description`,{group:u,count:l})})]})]})}),e.jsxs("div",{className:"mt-auto pt-4 flex flex-wrap items-center gap-2",children:[N>0&&e.jsx(A,{variant:"outline",className:"text-blue-700 bg-blue-50/50 border-blue-200/60 dark:border-blue-900/40 dark:bg-blue-900/20 dark:text-blue-300",children:i("historySyncLearningMap.cliproxyManaged",{count:N})}),h>0&&e.jsx(A,{variant:"outline",className:"text-amber-700 bg-amber-50/50 border-amber-200/60 dark:border-amber-900/40 dark:bg-amber-900/20 dark:text-amber-300",children:i("historySyncLearningMap.legacyConfirmation",{count:h})}),n.length>0&&g.length===0&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:i("continuityOverview.recommendBadge",{group:u})}),b&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:i("continuityOverview.partialBadge",{group:u})})]})]})}),(S||w)&&e.jsx(M,{className:"border-dashed",children:e.jsxs(z,{className:"p-5 space-y-4",children:[S&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:i("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:i("continuityOverview.plainLaneDescription",{lane:y||"plain ccs"})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(D,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(D,{value:"ccs auth backup default",size:"icon"})]}),c?e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:`ccs auth default ${c}`}),e.jsx(D,{value:`ccs auth default ${c}`,size:"icon"})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:i("continuityOverview.setDefaultHint")})]})]}),w&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:i("continuityReadiness.stepsTitle")}),e.jsxs("ol",{className:"space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:i("continuityReadiness.steps.syncBoth")}),e.jsx("li",{children:i("continuityReadiness.steps.sameGroup",{group:u})}),e.jsx("li",{children:i("continuityReadiness.steps.enableDeeper")}),e.jsx("li",{children:i("continuityReadiness.steps.resumeOriginal")})]})]})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-3",children:[e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-blue-300/40 bg-blue-50/50 dark:border-blue-900/30 dark:bg-blue-900/10 shadow-sm transition-colors hover:bg-blue-100/40 dark:hover:bg-blue-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-blue-700/80 dark:text-blue-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-900 dark:text-blue-200",children:i("historySyncLearningMap.isolated")}),e.jsx(X,{titleKey:"accountsPage.isolated",descKey:"accountsPage.isolatedDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-blue-900 dark:text-blue-200",children:t})]}),e.jsx(B,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-emerald-300/40 bg-emerald-50/50 dark:border-emerald-900/30 dark:bg-emerald-900/10 shadow-sm transition-colors hover:bg-emerald-100/40 dark:hover:bg-emerald-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(L,{className:"h-4 w-4 text-emerald-700/80 dark:text-emerald-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-900 dark:text-emerald-200",children:i("historySyncLearningMap.shared")}),e.jsx(X,{titleKey:"accountsPage.sharedStandard",descKey:"accountsPage.sharedStandardDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-emerald-900 dark:text-emerald-200",children:o})]}),e.jsx(B,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-indigo-300/40 bg-indigo-50/50 dark:border-indigo-900/30 dark:bg-indigo-900/10 shadow-sm transition-colors hover:bg-indigo-100/40 dark:hover:bg-indigo-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ee,{className:"h-4 w-4 text-indigo-700/80 dark:text-indigo-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-indigo-900 dark:text-indigo-200",children:i("historySyncLearningMap.deeper")}),e.jsx(X,{titleKey:"accountsPage.sharedDeeper",descKey:"accountsPage.sharedDeeperDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-indigo-900 dark:text-indigo-200",children:s})]})]})]})}const ue=64;function lt({open:a,onClose:c}){const{t}=P(),[o,s]=C.useState(""),[l,d]=C.useState(!1),[x,n]=C.useState(""),[g,h]=C.useState(!1),[N,m]=C.useState(!1),i=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(o),y=x.trim().toLowerCase().replace(/\s+/g,"-"),r=y.length===0||y.length<=ue&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(y),u=o&&i?[`ccs auth create ${o}`,l?y.length>0?`--context-group ${y}`:"--share-context":"",l&&g?"--deeper-continuity":""].filter(Boolean).join(" "):t("createAuthProfileDialog.commandFallback"),b=async()=>{!i||l&&!r||(await navigator.clipboard.writeText(u),m(!0),setTimeout(()=>m(!1),2e3))},v=()=>{s(""),d(!1),n(""),h(!1),m(!1),c()};return e.jsx(xe,{open:a,onOpenChange:f=>!f&&v(),children:e.jsxs(me,{className:"sm:max-w-md",children:[e.jsxs(he,{children:[e.jsx(ge,{children:t("createAuthProfileDialog.title")}),e.jsx(pe,{children:t("createAuthProfileDialog.description")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"profile-name",children:t("createAuthProfileDialog.profileName")}),e.jsx(V,{id:"profile-name",value:o,onChange:f=>s(f.target.value),placeholder:t("createAuthProfileDialog.profileNamePlaceholder"),autoComplete:"off"}),o&&!i&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidProfileName")})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(oe,{id:"share-context",checked:l,onCheckedChange:f=>d(f===!0)}),e.jsx(T,{htmlFor:"share-context",className:"cursor-pointer",children:t("createAuthProfileDialog.enableSharedHistory")})]}),l&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(T,{htmlFor:"context-group",children:t("createAuthProfileDialog.historySyncGroupOptional")}),e.jsx(V,{id:"context-group",value:x,onChange:f=>n(f.target.value),placeholder:t("createAuthProfileDialog.historySyncGroupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.historySyncGroupHint")}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx(oe,{id:"deeper-continuity",checked:g,onCheckedChange:f=>h(f===!0)}),e.jsx(T,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:t("createAuthProfileDialog.deeperContinuity")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.deeperContinuityHint")}),x.trim().length>0&&!r&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidContextGroup",{max:ue})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:t("createAuthProfileDialog.command")}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(je,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:u}),e.jsx(j,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:b,disabled:!i||l&&!r,children:N?e.jsx(Y,{className:"w-4 h-4 text-green-500"}):e.jsx(ae,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:t("createAuthProfileDialog.afterRunPrefix")}),e.jsxs("ol",{className:"list-decimal list-inside pl-2 space-y-0.5",children:[e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep1")}),e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep2")})]}),e.jsx("p",{className:"pt-1",children:t("createAuthProfileDialog.poolingHint")})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(j,{variant:"ghost",onClick:v,children:t("createAuthProfileDialog.close")}),e.jsx(j,{onClick:b,disabled:!i||l&&!r,children:N?e.jsxs(e.Fragment,{children:[e.jsx(Y,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copyCommand")]})})]})]})]})})}function vt(){const{t:a}=P(),c=ke(),{data:t,isLoading:o}=st(),s=ot(),[l,d]=C.useState(!1),x=t?.accounts||[],n=t?.cliproxyCount||0,g=t?.legacyContextCount||0,h=t?.legacyContinuityCount||0,N=t?.sharedCount||0,m=t?.sharedStandardCount||0,i=t?.deeperSharedCount||0,y=t?.isolatedCount||0,r=t?.sharedAloneCount||0,u=t?.sharedPeerAccountCount||0,b=t?.deeperReadyAccountCount||0,v=t?.sharedPeerGroups||[],f=t?.deeperReadyGroups||[],G=t?.sharedGroups||[],S=t?.groupSummaries||[],w=t?.plainCcsLane||null,I=x.filter(U=>U.context_inferred||U.continuity_inferred),_=I.length,Q=_>0,p=()=>c("/cliproxy?provider=claude"),q=()=>c("/cliproxy?provider=claude&action=auth"),R=()=>s.mutate(I);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden h-full min-h-0 lg:flex",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/20 shrink-0",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(et,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:a("accountsPage.title")})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.manageSuffix")]})]}),e.jsx($e,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.primaryActions")}),e.jsxs(j,{size:"sm",className:"w-full justify-start",onClick:()=>d(!0),children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(j,{size:"sm",className:"w-full justify-start",onClick:q,children:[e.jsx(re,{className:"w-4 h-4 mr-2"}),a("accountsPage.authClaudeInPool")]}),e.jsxs(j,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:p,children:[a("accountsPage.openClaudePoolSettings"),e.jsx(B,{className:"w-4 h-4 ml-auto"})]})]}),Q?e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.migrationFollowup")}),e.jsxs("div",{className:"rounded-md border border-amber-500/50 bg-amber-500/10 p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(J,{className:"h-4 w-4 mt-0.5 text-amber-700 dark:text-amber-400 shrink-0"}),e.jsxs("div",{className:"space-y-1 text-xs",children:[g>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContextPending",{count:g})}),h>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContinuityPending",{count:h})})]})]}),e.jsx(j,{variant:"secondary",size:"sm",className:"w-full justify-start",onClick:R,disabled:s.isPending||_===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:_})})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:a("accountsPage.noLegacyFollowup")}),e.jsxs(M,{children:[e.jsxs($,{className:"pb-2",children:[e.jsx(F,{className:"text-sm",children:a("accountsPage.quickCommands")}),e.jsx(E,{children:a("accountsPage.quickCommandsDesc")})]}),e.jsxs(z,{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth create work --share-context --context-group sprint-a --deeper-continuity"}),e.jsx(D,{value:"ccs auth create work --share-context --context-group sprint-a --deeper-continuity",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs cliproxy auth claude"}),e.jsx(D,{value:"ccs cliproxy auth claude",size:"icon"})]})]})]})]})})]}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col bg-background",children:[e.jsxs("div",{className:"px-5 py-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(A,{variant:"outline",children:a("accountsPage.workspaceBadge")}),e.jsx(A,{variant:"secondary",children:a("accountsPage.historySyncBadge")})]}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:a("accountsPage.authAccounts")}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[a("accountsPage.tableScopePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.tableScopeMiddle"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:a("accountsTable.sync")}),a("accountsPage.tableScopeSuffix")]})]}),e.jsxs("div",{className:"flex-1 min-h-0 p-5 space-y-4 overflow-y-auto",children:[e.jsx(ie,{totalAccounts:x.length,primaryAccountName:x.length===1?x[0]?.name:null,isolatedCount:y,sharedStandardCount:m,deeperSharedCount:i,sharedAloneCount:r,sharedPeerAccountCount:u,deeperReadyAccountCount:b,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:f,legacyTargetCount:_,cliproxyCount:n,plainCcsLane:w}),e.jsx(le,{totalAccounts:x.length,isolatedCount:y,sharedPeerGroups:v,deeperReadyGroups:f}),e.jsxs(M,{className:"flex flex-col",children:[e.jsxs($,{className:"pb-3",children:[e.jsx(F,{className:"text-lg",children:a("accountsPage.accountMatrix")}),e.jsx(E,{children:a("accountsPage.sharedTotalDesc",{count:N})})]}),e.jsx(z,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(de,{data:x,defaultAccount:t?.default??null,groupSummaries:S,plainCcsLane:w})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(M,{children:[e.jsxs($,{children:[e.jsx(F,{className:"text-lg",children:a("accountsPage.title")}),e.jsxs(E,{children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.mobileManageSuffix")]})]}),e.jsxs(z,{className:"space-y-2",children:[e.jsxs(j,{className:"w-full",onClick:()=>d(!0),children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(j,{variant:"outline",className:"w-full",onClick:p,children:[a("accountsPage.openCliProxyClaudePool"),e.jsx(B,{className:"w-4 h-4 ml-2"})]}),e.jsxs(j,{variant:"outline",className:"w-full",onClick:q,children:[a("accountsPage.authClaudeInPool"),e.jsx(re,{className:"w-4 h-4 ml-2"})]}),e.jsx(j,{variant:"outline",className:"w-full",onClick:R,disabled:s.isPending||_===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:_})})]})]}),e.jsx(ie,{totalAccounts:x.length,primaryAccountName:x.length===1?x[0]?.name:null,isolatedCount:y,sharedStandardCount:m,deeperSharedCount:i,sharedAloneCount:r,sharedPeerAccountCount:u,deeperReadyAccountCount:b,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:f,legacyTargetCount:_,cliproxyCount:n,plainCcsLane:w}),e.jsx(le,{totalAccounts:x.length,isolatedCount:y,sharedPeerGroups:v,deeperReadyGroups:f}),e.jsxs(M,{children:[e.jsx($,{className:"pb-3",children:e.jsx(F,{className:"text-base",children:a("accountsPage.accountMatrix")})}),e.jsx(z,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(de,{data:x,defaultAccount:t?.default??null,groupSummaries:S,plainCcsLane:w})})]})]}),e.jsx(lt,{open:l,onClose:()=>d(!1)})]})}export{vt as AccountsPage};
@@ -1 +1 @@
1
- import{j as e,a3 as s,a4 as r,a5 as n,a6 as i,a7 as d,a8 as c,a9 as u,aa as f}from"./radix-ui-nu4wz29m.js";import"./react-vendor-Bjx91N7w.js";import{c as o,bY as l}from"./index-PqtYNGNs.js";function A({...a}){return e.jsx(s,{"data-slot":"alert-dialog",...a})}function g({...a}){return e.jsx(u,{"data-slot":"alert-dialog-portal",...a})}function m({className:a,...t}){return e.jsx(f,{"data-slot":"alert-dialog-overlay",className:o("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",a),...t})}function D({className:a,...t}){return e.jsxs(g,{children:[e.jsx(m,{}),e.jsx(r,{"data-slot":"alert-dialog-content",className:o("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",a),...t})]})}function b({className:a,...t}){return e.jsx("div",{"data-slot":"alert-dialog-header",className:o("flex flex-col gap-2 text-center sm:text-left",a),...t})}function N({className:a,...t}){return e.jsx("div",{"data-slot":"alert-dialog-footer",className:o("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",a),...t})}function v({className:a,...t}){return e.jsx(n,{"data-slot":"alert-dialog-title",className:o("text-lg font-semibold",a),...t})}function w({className:a,...t}){return e.jsx(i,{"data-slot":"alert-dialog-description",className:o("text-muted-foreground text-sm",a),...t})}function y({className:a,...t}){return e.jsx(c,{className:o(l(),a),...t})}function z({className:a,...t}){return e.jsx(d,{className:o(l({variant:"outline"}),a),...t})}export{A,D as a,b,v as c,w as d,N as e,z as f,y as g};
1
+ import{j as e,a3 as s,a4 as r,a5 as n,a6 as i,a7 as d,a8 as c,a9 as u,aa as f}from"./radix-ui-nu4wz29m.js";import"./react-vendor-Bjx91N7w.js";import{c as o,bY as l}from"./index-BIF0Wvld.js";function A({...a}){return e.jsx(s,{"data-slot":"alert-dialog",...a})}function g({...a}){return e.jsx(u,{"data-slot":"alert-dialog-portal",...a})}function m({className:a,...t}){return e.jsx(f,{"data-slot":"alert-dialog-overlay",className:o("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",a),...t})}function D({className:a,...t}){return e.jsxs(g,{children:[e.jsx(m,{}),e.jsx(r,{"data-slot":"alert-dialog-content",className:o("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",a),...t})]})}function b({className:a,...t}){return e.jsx("div",{"data-slot":"alert-dialog-header",className:o("flex flex-col gap-2 text-center sm:text-left",a),...t})}function N({className:a,...t}){return e.jsx("div",{"data-slot":"alert-dialog-footer",className:o("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",a),...t})}function v({className:a,...t}){return e.jsx(n,{"data-slot":"alert-dialog-title",className:o("text-lg font-semibold",a),...t})}function w({className:a,...t}){return e.jsx(i,{"data-slot":"alert-dialog-description",className:o("text-muted-foreground text-sm",a),...t})}function y({className:a,...t}){return e.jsx(c,{className:o(l(),a),...t})}function z({className:a,...t}){return e.jsx(d,{className:o(l({variant:"outline"}),a),...t})}export{A,D as a,b,v as c,w as d,N as e,z as f,y as g};