ccdash
Version:
Claude Code Dashboard - A comprehensive monitoring dashboard for Claude Code
1 lines • 32 kB
JavaScript
exports.id=231,exports.ids=[231],exports.modules={329:(e,t,s)=>{"use strict";s.d(t,{s:()=>n});var i=s(3210),r=s(6189),o=s(4354);function n(){let e=(0,r.useRouter)();(0,r.useSearchParams)();let[t,s]=(0,i.useState)("ja"),n=(0,i.useCallback)(e=>(0,o.sC)(t,e),[t]),a=(0,i.useCallback)(t=>{s(t);let i=new URL(window.location.href);"ja"===t?i.searchParams.delete("locale"):i.searchParams.set("locale",t),e.push(i.pathname+i.search)},[e]),c=(0,i.useCallback)(e=>(0,o.r6)(t,e),[t]),d=(0,i.useCallback)(e=>(0,o.YS)(t,e),[t]);return{language:t,t:n,changeLanguage:a,formatDate:c,formatFullDate:d}}},733:(e,t,s)=>{Promise.resolve().then(s.bind(s,6743)),Promise.resolve().then(s.bind(s,7836)),Promise.resolve().then(s.bind(s,3849))},873:(e,t,s)=>{"use strict";s.d(t,{ApiKeyAuth:()=>i});let i=(0,s(2907).registerClientReference)(function(){throw Error("Attempted to call ApiKeyAuth() from the server but ApiKeyAuth is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/ccdash/ccdash/frontend/components/auth/api-key-auth.tsx","ApiKeyAuth")},1420:(e,t,s)=>{Promise.resolve().then(s.t.bind(s,6444,23)),Promise.resolve().then(s.t.bind(s,6042,23)),Promise.resolve().then(s.t.bind(s,8170,23)),Promise.resolve().then(s.t.bind(s,9477,23)),Promise.resolve().then(s.t.bind(s,9345,23)),Promise.resolve().then(s.t.bind(s,2089,23)),Promise.resolve().then(s.t.bind(s,6577,23)),Promise.resolve().then(s.t.bind(s,1307,23))},2704:()=>{},3018:(e,t,s)=>{"use strict";s.d(t,{Fc:()=>c,TN:()=>d});var i=s(687),r=s(3210),o=s(4224),n=s(6241);let a=(0,o.F)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),c=r.forwardRef(({className:e,variant:t,...s},r)=>(0,i.jsx)("div",{ref:r,role:"alert",className:(0,n.cn)(a({variant:t}),e),...s}));c.displayName="Alert",r.forwardRef(({className:e,...t},s)=>(0,i.jsx)("h5",{ref:s,className:(0,n.cn)("mb-1 font-medium leading-none tracking-tight",e),...t})).displayName="AlertTitle";let d=r.forwardRef(({className:e,...t},s)=>(0,i.jsx)("div",{ref:s,className:(0,n.cn)("text-sm [&_p]:leading-relaxed",e),...t}));d.displayName="AlertDescription"},3482:(e,t,s)=>{"use strict";s.d(t,{AuthGuard:()=>i});let i=(0,s(2907).registerClientReference)(function(){throw Error("Attempted to call AuthGuard() from the server but AuthGuard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/ccdash/ccdash/frontend/components/auth/auth-guard.tsx","AuthGuard")},3849:(e,t,s)=>{"use strict";s.d(t,{AuthStatus:()=>h});var i=s(687),r=s(3210),o=s(4934),n=s(9821),a=s(3613),c=s(9959),d=s(83),u=s(9556),l=s(329);function h({className:e="",showFullStatus:t=!0}){let{t:s}=(0,l.s)(),[h,m]=(0,r.useState)(!1),[g,p]=(0,r.useState)(!0);return g?(0,i.jsxs)("div",{className:`flex items-center gap-2 ${e}`,children:[(0,i.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-500"}),t&&(0,i.jsx)("span",{className:"text-sm text-gray-500",children:s("auth.status.checking")})]}):h?(0,i.jsxs)("div",{className:`flex items-center gap-2 ${e}`,children:[(0,i.jsxs)(n.E,{variant:"secondary",className:"bg-green-100 text-green-800",children:[(0,i.jsx)(c.A,{className:"w-3 h-3 mr-1"}),s("auth.status.authenticated")]}),t&&(0,i.jsxs)(o.$,{onClick:()=>{u.u.clearApiKey(),m(!1),window.location.reload()},variant:"ghost",size:"sm",className:"h-8 px-2 text-xs",children:[(0,i.jsx)(d.A,{className:"w-3 h-3 mr-1"}),s("auth.logout")]})]}):(0,i.jsxs)("div",{className:`flex items-center gap-2 ${e}`,children:[(0,i.jsxs)(n.E,{variant:"destructive",className:"bg-red-100 text-red-800",children:[(0,i.jsx)(a.A,{className:"w-3 h-3 mr-1"}),s("auth.status.unauthenticated")]}),t&&(0,i.jsx)("span",{className:"text-sm text-gray-500",children:s("auth.status.apiKeyRequired")})]})}},4354:(e,t,s)=>{"use strict";s.d(t,{YS:()=>n,r6:()=>o,rI:()=>a,sC:()=>function e(t,s){let r=s.split("."),o=i[t];for(let i of r)if(o&&"object"==typeof o&&i in o)o=o[i];else{if("ja"!==t)return e("ja",s);return s}return"string"==typeof o?o:s}});let i={ja:{common:{refresh:"更新",back:"戻る",loading:"読み込み中...",error:"エラー",copy:"コピー",copied:"コピー済み",settings:"設定",overview:"概要",sessions:"セッション"},header:{title:"CCDash",subtitle:"Claude Code ダッシュボード",nav:{dashboard:"ダッシュボード",dashboardDesc:"トークン使用量とプロジェクト概要",sessions:"セッション",sessionsDesc:"Claude Codeセッションの詳細",scheduler:"スケジューラー",schedulerDesc:"タスクの自動スケジューリング",resources:"リソース",claudeCodeDesc:"Claude Codeの公式ドキュメント",github:"GitHub",githubDesc:"ソースコードを確認",issues:"課題",issuesDesc:"バグ報告や機能要求",documentation:"ドキュメント",documentationDesc:"使い方とガイド"}},tokenUsage:{title:"トークン使用量",available:"使用可能",tokens:"トークン",estimate:"(見積もり)",excess:"超過分",usageRate:"使用率",resetIn:"リセットまで",hours:"時間",minutes:"分"},p90Prediction:{title:"消費量(P90予測)",tokenLimit:"トークンリミット",messageLimit:"メッセージリミット",costLimit:"コストリミット",confidence:"信頼度",burnRate:"消費率",timeToLimit:"予測到達時間",resetIn:"リセットまで",tokensPerHour:"トークン/時",ofPredictedLimit:"予測値",alreadyReached:"超過",resetSoon:"リセット予定",lastPredicted:"最終予測",at:"時刻"},session:{status:"ステータス",sessionId:"セッションID",startTime:"開始時刻",duration:"実行時間",tokenUsage:"トークン使用量",messageCount:"メッセージ数",project:"プロジェクト",cost:"コスト",messages:"メッセージ",active:"実行中",completed:"完了",paused:"停止中",failed:"失敗",unknown:"不明",detail:"セッション詳細",info:"セッション情報",lastActivity:"最終活動",messageHistory:"メッセージ履歴",user:"ユーザー",assistant:"アシスタント",codeGenerated:"生成されたコード",codeBlocks:"コードブロック",input:"入力",output:"出力",total:"合計",thinking:"内部思考",toolResult:"Tool Result",page:"ページ",noContent:"No content",rawObjectContent:"Raw object content:",unknownItemType:"Unknown item type:"},errors:{tokenUsageFetch:"トークン使用量の取得に失敗しました",sessionsFetch:"セッション情報の取得に失敗しました",sessionNotFound:"セッションが見つかりません",sessionDetailFetch:"セッション詳細を読み込み中..."},empty:{noSessions:"セッションがありません",noSessionsDesc:"Claude Codeを使用してセッションが作成されると、ここに表示されます",noProjects:"プロジェクトがありません",noProjectsDesc:"Claude Codeを使用してプロジェクトが作成されると、ここに表示されます"},project:{totalTokenUsage:"総トークン使用量",sessionCount:"セッション数",recentSessions:"最近のセッション",running:"実行中",completed:"完了",others:"他",sessionsText:"セッション",messages:"メッセージ",tokensLabel:"tokens"},job:{title:"ジョブ詳細",history:"ジョブ履歴",execution:"タスク実行",command:"コマンド",output:"出力",error:"エラー",logs:"ログ",status:{running:"実行中",completed:"完了",pending:"待機中",failed:"失敗",cancelled:"キャンセル済み"},schedule:{immediate:"即時実行",afterReset:"リセット後",delayed:"遅延実行",scheduled:"時刻指定"},duration:"実行時間",executionTime:"実行時間",completedAt:"完了日時",scheduledAt:"予定実行時刻",timeUntil:"実行まで",hoursAfter:"時間後",minutesAfter:"分後",daysAfter:"日後",create:"ジョブを作成",cancel:"キャンセル",delete:"削除",executing:"実行中...",created:"ジョブが正常に作成されました",notFound:"ジョブが見つかりません",loading:"ジョブ詳細を読み込み中...",confirmDelete:"このジョブを削除しますか?",outputLog:"出力ログ",errorLog:"エラーログ",standardOutput:"標準出力",standardError:"標準エラー出力",noOutputLog:"出力ログがありません",noErrorLog:"エラーログがありません",validation:{futureTime:"スケジュール日時は現在時刻より後に設定してください",withinYear:"スケジュール日時は1年以内に設定してください"},description:"Claude Codeタスクを実行します。プロジェクトを選択してコマンドを入力してください。",resetDescription:"セッションウィンドウがリセットされた後に実行されます。",delayDescription:"時間後に実行されます。",scheduleDescription:"に実行されます。",totalJobs:"件のジョブを表示",scheduleHeader:"スケジュール",createdAt:"作成日時",actions:"アクション",form:{selectProject:"プロジェクトを選択してください",loadingProjects:"読み込み中...",errorProjects:"エラー",noProjects:"プロジェクトがありません",executionDirectory:"実行ディレクトリ",commandPlaceholder:"例: 新しい機能を実装して...",commandHelp:"Claude Codeに実行させたいタスクを自然言語で記述してください。",yoloMode:"YOLOモード",yoloModeDescription:"(確認なしで変更を実行)",executionTiming:"実行タイミング",executionDate:"実行日",executionTime:"実行時刻",executionScheduled:"実行予定",dateTimeRequired:"日付と時刻を両方指定してください"},security:{warningTitle:"セキュリティ警告",yoloWarning:"YOLOモードは全てのコマンドを安全性チェックなしで実行します。悪意のあるコマンドによってシステムが損傷する可能性があります。",safeExecutionTitle:"安全な実行のために:",safeExecutionText:"Claude Codeの設定ファイルでコマンドの許可を適切に行ってください。",settingsGuide:"設定方法を確認する →"}},settings:{title:"設定",description:"タイムゾーン、自動更新間隔、使用量表示モードを設定してください。",timezone:"タイムゾーン",timezonePlaceholder:"タイムゾーンを選択",refreshInterval:"自動更新間隔",refreshPlaceholder:"更新間隔を選択",usageMode:"使用量表示モード",usageModePlaceholder:"表示モードを選択",p90Prediction:"P90予測",fixedLimits:"固定値",fixedLimitsConfig:"固定値設定",preset:"プリセット",tokenLimit:"トークン制限",messageLimit:"メッセージ制限",costLimit:"コスト制限",cancel:"キャンセル",save:"保存"},footer:{description:"Web application for monitoring Claude Code usage and task scheduling",sponsor:"Sponsor",sections:{product:"Product",resources:"Resources",support:"Support"},links:{dashboard:"Dashboard",sessions:"Sessions",scheduler:"Scheduler",documentation:"Documentation",claudeCode:"Claude Code",github:"GitHub",issues:"Issues & Bug Reports",discussions:"Discussions",contribute:"Contribute",privacy:"Privacy",terms:"Terms"},rights:"All rights reserved.",madeWith:"Made with",forCommunity:"for the community",builtWith:"Built with",status:"Status",statusOperational:"Operational"},auth:{title:"API認証",apiKey:"APIキー",apiKeyPlaceholder:"APIキーを入力してください",description:"CCDashにアクセスするためのAPIキーを入力してください",authenticate:"認証",authenticating:"検証中...",logout:"ログアウト",status:{authenticated:"認証済み",unauthenticated:"未認証",checking:"認証確認中...",apiKeyRequired:"APIキーが必要です",apiKeySet:"APIキーが設定されています"},errors:{required:"APIキーを入力してください",invalid:"無効なAPIキーです。正しいAPIキーを入力してください。"},securityNote:"APIキーはブラウザのセッションストレージに安全に保存されます"}},en:{common:{refresh:"Refresh",back:"Back",loading:"Loading...",error:"Error",copy:"Copy",copied:"Copied",settings:"Settings",overview:"Overview",sessions:"Sessions"},header:{title:"CCDash",subtitle:"Claude Code Dashboard",nav:{dashboard:"Dashboard",dashboardDesc:"Token usage and project overview",sessions:"Sessions",sessionsDesc:"Claude Code session details",scheduler:"Scheduler",schedulerDesc:"Automatic task scheduling",resources:"Resources",claudeCodeDesc:"Official Claude Code documentation",github:"GitHub",githubDesc:"View source code",issues:"Issues",issuesDesc:"Bug reports and feature requests",documentation:"Documentation",documentationDesc:"Usage guides and documentation"}},tokenUsage:{title:"Token Usage",available:"Available",tokens:"tokens",estimate:"(estimate)",excess:"Excess",usageRate:"Usage Rate",resetIn:"Reset in",hours:"hours",minutes:"minutes"},p90Prediction:{title:"P90 Usage Predictions",tokenLimit:"Token Prediction Limit",messageLimit:"Message Prediction Limit",costLimit:"Cost Prediction Limit",confidence:"Confidence",burnRate:"Burn Rate",timeToLimit:"Time to Limit",resetIn:"Reset In",tokensPerHour:"tokens/hour",ofPredictedLimit:"of predicted limit",alreadyReached:"Already reached",resetSoon:"Reset soon",lastPredicted:"Last predicted",at:"at"},session:{status:"Status",sessionId:"Session ID",startTime:"Start Time",duration:"Duration",tokenUsage:"Token Usage",messageCount:"Messages",project:"Project",cost:"Cost",messages:"Messages",active:"Active",completed:"Completed",paused:"Paused",failed:"Failed",unknown:"Unknown",detail:"Session Detail",info:"Session Information",lastActivity:"Last Activity",messageHistory:"Message History",user:"User",assistant:"Assistant",codeGenerated:"Generated Code",codeBlocks:"code blocks",input:"Input",output:"Output",total:"Total",thinking:"Internal Thinking",toolResult:"Tool Result",page:"Page",noContent:"No content",rawObjectContent:"Raw object content:",unknownItemType:"Unknown item type:"},errors:{tokenUsageFetch:"Failed to fetch token usage",sessionsFetch:"Failed to fetch session information",sessionNotFound:"Session not found",sessionDetailFetch:"Loading session details..."},empty:{noSessions:"No sessions",noSessionsDesc:"Sessions will appear here when you use Claude Code",noProjects:"No projects",noProjectsDesc:"Projects will appear here when you use Claude Code"},project:{totalTokenUsage:"Total Token Usage",sessionCount:"Sessions",recentSessions:"Recent Sessions",running:"Running",completed:"Completed",others:"others",sessionsText:"sessions",messages:"messages",tokensLabel:"tokens"},job:{title:"Job Details",history:"Job History",execution:"Task Execution",command:"Command",output:"Output",error:"Error",logs:"Logs",status:{running:"Running",completed:"Completed",pending:"Pending",failed:"Failed",cancelled:"Cancelled"},schedule:{immediate:"Immediate",afterReset:"After Reset",delayed:"Delayed",scheduled:"Scheduled"},duration:"Duration",executionTime:"Execution Time",completedAt:"Completed At",scheduledAt:"Scheduled At",timeUntil:"Time Until",hoursAfter:"hours later",minutesAfter:"minutes later",daysAfter:"days later",create:"Create Job",cancel:"Cancel",delete:"Delete",executing:"Executing...",created:"Job created successfully",notFound:"Job not found",loading:"Loading job details...",confirmDelete:"Are you sure you want to delete this job?",outputLog:"Output Log",errorLog:"Error Log",standardOutput:"Standard Output",standardError:"Standard Error",noOutputLog:"No output log available",noErrorLog:"No error log available",validation:{futureTime:"Schedule time must be set in the future",withinYear:"Schedule time must be within one year"},description:"Execute Claude Code tasks. Select a project and enter a command.",resetDescription:"Will be executed after the session window is reset.",delayDescription:"Will be executed after the specified hours.",scheduleDescription:" will be executed.",totalJobs:"jobs displayed",scheduleHeader:"Schedule",createdAt:"Created At",actions:"Actions",form:{selectProject:"Select a project",loadingProjects:"Loading...",errorProjects:"Error",noProjects:"No projects available",executionDirectory:"Execution Directory",commandPlaceholder:"e.g., Implement a new feature...",commandHelp:"Describe the task you want Claude Code to execute in natural language.",yoloMode:"YOLO Mode",yoloModeDescription:"(Execute changes without confirmation)",executionTiming:"Execution Timing",executionDate:"Execution Date",executionTime:"Execution Time",executionScheduled:"Scheduled for",dateTimeRequired:"Please specify both date and time"},security:{warningTitle:"Security Warning",yoloWarning:"YOLO mode executes all commands without safety checks. Malicious commands could damage your system.",safeExecutionTitle:"For safe execution:",safeExecutionText:"Configure command permissions appropriately in the Claude Code settings file.",settingsGuide:"View configuration guide →"}},settings:{title:"Settings",description:"Configure timezone, auto-refresh interval, and usage display mode.",timezone:"Timezone",timezonePlaceholder:"Select timezone",refreshInterval:"Auto Refresh Interval",refreshPlaceholder:"Select refresh interval",usageMode:"Usage Display Mode",usageModePlaceholder:"Select display mode",p90Prediction:"P90 Prediction",fixedLimits:"Fixed Limits",fixedLimitsConfig:"Fixed Limits Configuration",preset:"Preset",tokenLimit:"Token Limit",messageLimit:"Message Limit",costLimit:"Cost Limit",cancel:"Cancel",save:"Save"},footer:{description:"Web application for monitoring Claude Code usage and task scheduling",sponsor:"Sponsor",sections:{product:"Product",resources:"Resources",support:"Support"},links:{dashboard:"Dashboard",sessions:"Sessions",scheduler:"Scheduler",documentation:"Documentation",claudeCode:"Claude Code",github:"GitHub",issues:"Issues & Bug Reports",discussions:"Discussions",contribute:"Contribute",privacy:"Privacy",terms:"Terms"},rights:"All rights reserved.",madeWith:"Made with",forCommunity:"for the community",builtWith:"Built with",status:"Status",statusOperational:"Operational"},auth:{title:"API Authentication",apiKey:"API Key",apiKeyPlaceholder:"Enter your API key",description:"Enter your API key to access CCDash",authenticate:"Authenticate",authenticating:"Validating...",logout:"Logout",status:{authenticated:"Authenticated",unauthenticated:"Unauthenticated",checking:"Checking authentication...",apiKeyRequired:"API key required",apiKeySet:"API key is set"},errors:{required:"Please enter an API key",invalid:"Invalid API key. Please enter a valid API key."},securityNote:"API key is securely stored in browser session storage"}}};function r(e){switch(e){case"ja":default:return"ja-JP";case"en":return"en-US"}}function o(e,t){let s=r(e);return t.toLocaleString(s,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function n(e,t){let s=r(e);return t.toLocaleString(s,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function a(){return"ja"}},4883:(e,t,s)=>{"use strict";s.d(t,{AuthStatus:()=>i});let i=(0,s(2907).registerClientReference)(function(){throw Error("Attempted to call AuthStatus() from the server but AuthStatus is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/ccdash/ccdash/frontend/components/auth/auth-status.tsx","AuthStatus")},4934:(e,t,s)=>{"use strict";s.d(t,{$:()=>d,r:()=>c});var i=s(687),r=s(3210),o=s(8730),n=s(4224),a=s(6241);let c=(0,n.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),d=r.forwardRef(({className:e,variant:t,size:s,asChild:r=!1,...n},d)=>{let u=r?o.DX:"button";return(0,i.jsx)(u,{className:(0,a.cn)(c({variant:t,size:s,className:e})),ref:d,...n})});d.displayName="Button"},5192:(e,t,s)=>{"use strict";s.d(t,{BT:()=>d,Wu:()=>u,ZB:()=>c,Zp:()=>n,aR:()=>a});var i=s(687),r=s(3210),o=s(6241);let n=r.forwardRef(({className:e,...t},s)=>(0,i.jsx)("div",{ref:s,className:(0,o.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));n.displayName="Card";let a=r.forwardRef(({className:e,...t},s)=>(0,i.jsx)("div",{ref:s,className:(0,o.cn)("flex flex-col space-y-1.5 p-6",e),...t}));a.displayName="CardHeader";let c=r.forwardRef(({className:e,...t},s)=>(0,i.jsx)("div",{ref:s,className:(0,o.cn)("text-2xl font-semibold leading-none tracking-tight",e),...t}));c.displayName="CardTitle";let d=r.forwardRef(({className:e,...t},s)=>(0,i.jsx)("div",{ref:s,className:(0,o.cn)("text-sm text-muted-foreground",e),...t}));d.displayName="CardDescription";let u=r.forwardRef(({className:e,...t},s)=>(0,i.jsx)("div",{ref:s,className:(0,o.cn)("p-6 pt-0",e),...t}));u.displayName="CardContent",r.forwardRef(({className:e,...t},s)=>(0,i.jsx)("div",{ref:s,className:(0,o.cn)("flex items-center p-6 pt-0",e),...t})).displayName="CardFooter"},6241:(e,t,s)=>{"use strict";s.d(t,{cn:()=>o});var i=s(9384),r=s(2348);function o(...e){return(0,r.QP)((0,i.$)(e))}},6637:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c,metadata:()=>n,viewport:()=>a});var i=s(7413),r=s(1120);s(873);var o=s(3482);s(4883),s(2704);let n={title:"CCDash - Claude Code Dashboard",description:"Monitor Claude Code usage, manage sessions, and track development activities. Comprehensive dashboard for token consumption, session management, and AI development workflow optimization.",keywords:["Claude Code","AI Development","Dashboard","Monitoring","Development Tools"],generator:"React + Next.js + TailwindCSS + TypeScript + Go",authors:[{name:"CCDash Team"}],icons:{icon:"/favicon.ico",shortcut:"/favicon.ico",apple:"/favicon.ico"}},a={width:"device-width",initialScale:1,themeColor:"#000000"};function c({children:e}){return(0,i.jsx)("html",{lang:"en",children:(0,i.jsx)("body",{className:"min-h-screen bg-background font-sans antialiased",children:(0,i.jsx)(o.AuthGuard,{children:(0,i.jsx)("div",{className:"relative flex min-h-screen flex-col",children:(0,i.jsx)("main",{className:"flex-1",children:(0,i.jsx)(r.Suspense,{fallback:(0,i.jsx)("div",{className:"container mx-auto max-w-7xl p-6",children:(0,i.jsx)("div",{className:"animate-pulse bg-gray-200 rounded-lg h-32"})}),children:e})})})})})})}},6743:(e,t,s)=>{"use strict";s.d(t,{ApiKeyAuth:()=>y});var i=s(687),r=s(3210),o=s(4934),n=s(8988),a=s(5192),c=s(3018),d=s(9821),u=s(3964),l=s(83),h=s(9959),m=s(2597),g=s(3861),p=s(9556),f=s(329);function y({onAuthStateChange:e}){let{t}=(0,f.s)(),[s,y]=(0,r.useState)(""),[b,x]=(0,r.useState)(!1),[v,j]=(0,r.useState)(!1),[C,P]=(0,r.useState)(""),[A,k]=(0,r.useState)(!1),w=async i=>{if(i.preventDefault(),P(""),k(!0),!s.trim()){P(t("auth.errors.required")),k(!1);return}try{p.u.setApiKey(s.trim()),await p.u.getTokenUsage(),j(!0),y(""),e?.(!0)}catch{P(t("auth.errors.invalid")),p.u.clearApiKey(),j(!1),e?.(!1)}finally{k(!1)}};return v?(0,i.jsxs)(a.Zp,{className:"w-full max-w-md",children:[(0,i.jsxs)(a.aR,{className:"text-center",children:[(0,i.jsx)("div",{className:"flex items-center justify-center gap-2",children:(0,i.jsxs)(d.E,{variant:"secondary",className:"bg-green-100 text-green-800",children:[(0,i.jsx)(u.A,{className:"w-3 h-3 mr-1"}),t("auth.status.authenticated")]})}),(0,i.jsx)(a.ZB,{className:"text-lg",children:t("auth.title")}),(0,i.jsx)(a.BT,{children:t("auth.status.apiKeySet")})]}),(0,i.jsx)(a.Wu,{className:"space-y-4",children:(0,i.jsxs)(o.$,{onClick:()=>{p.u.clearApiKey(),j(!1),y(""),P(""),e?.(!1)},variant:"outline",className:"w-full",children:[(0,i.jsx)(l.A,{className:"w-4 h-4 mr-2"}),t("auth.logout")]})})]}):(0,i.jsxs)(a.Zp,{className:"w-full max-w-md",children:[(0,i.jsxs)(a.aR,{className:"text-center",children:[(0,i.jsx)("div",{className:"flex justify-center mb-2",children:(0,i.jsx)(h.A,{className:"w-8 h-8 text-blue-500"})}),(0,i.jsx)(a.ZB,{className:"text-xl",children:t("auth.title")}),(0,i.jsx)(a.BT,{children:t("auth.description")})]}),(0,i.jsxs)(a.Wu,{children:[(0,i.jsxs)("form",{onSubmit:w,className:"space-y-4",children:[(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("label",{htmlFor:"apiKey",className:"text-sm font-medium",children:t("auth.apiKey")}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(n.p,{id:"apiKey",type:b?"text":"password",value:s,onChange:e=>y(e.target.value),placeholder:t("auth.apiKeyPlaceholder"),className:"pr-10",disabled:A}),(0,i.jsx)(o.$,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>x(!b),disabled:A,children:b?(0,i.jsx)(m.A,{className:"w-4 h-4"}):(0,i.jsx)(g.A,{className:"w-4 h-4"})})]})]}),C&&(0,i.jsx)(c.Fc,{variant:"destructive",children:(0,i.jsx)(c.TN,{children:C})}),(0,i.jsx)(o.$,{type:"submit",className:"w-full",disabled:A,children:A?t("auth.authenticating"):t("auth.authenticate")})]}),(0,i.jsx)("div",{className:"mt-6 pt-4 border-t text-center",children:(0,i.jsx)("p",{className:"text-xs text-gray-500",children:t("auth.securityNote")})})]})]})}},7117:(e,t,s)=>{Promise.resolve().then(s.bind(s,873)),Promise.resolve().then(s.bind(s,3482)),Promise.resolve().then(s.bind(s,4883))},7836:(e,t,s)=>{"use strict";s.d(t,{AuthGuard:()=>n});var i=s(687),r=s(3210);s(9556);var o=s(6743);function n({children:e,fallback:t}){let[s,n]=(0,r.useState)(!1),[a,c]=(0,r.useState)(!0);return a?(0,i.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 mx-auto mb-4"}),(0,i.jsx)("p",{className:"text-sm text-gray-500",children:"認証状態を確認中..."})]})}):s?(0,i.jsx)(i.Fragment,{children:e}):(0,i.jsx)("div",{className:"flex items-center justify-center min-h-screen bg-gray-50",children:(0,i.jsx)("div",{className:"w-full max-w-md px-4",children:t||(0,i.jsx)(o.ApiKeyAuth,{onAuthStateChange:e=>{n(e)}})})})}},8268:(e,t,s)=>{Promise.resolve().then(s.t.bind(s,6346,23)),Promise.resolve().then(s.t.bind(s,7924,23)),Promise.resolve().then(s.t.bind(s,5656,23)),Promise.resolve().then(s.t.bind(s,99,23)),Promise.resolve().then(s.t.bind(s,8243,23)),Promise.resolve().then(s.t.bind(s,8827,23)),Promise.resolve().then(s.t.bind(s,2763,23)),Promise.resolve().then(s.t.bind(s,7173,23))},8988:(e,t,s)=>{"use strict";s.d(t,{p:()=>n});var i=s(687),r=s(3210),o=s(6241);let n=r.forwardRef(({className:e,type:t,...s},r)=>(0,i.jsx)("input",{type:t,className:(0,o.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...s}));n.displayName="Input"},9556:(e,t,s)=>{"use strict";s.d(t,{F:()=>o,u:()=>r});class i{constructor(e){this.apiKey=null,this.baseURL=e}setApiKey(e){this.apiKey=e}getApiKey(){return this.apiKey?this.apiKey:(process.env.NEXT_PUBLIC_API_KEY,null)}clearApiKey(){this.apiKey=null}hasApiKey(){return null!==this.getApiKey()}async request(e,t={}){let s=`${this.baseURL}${e}`,i={"Content-Type":"application/json",...t.headers},r=this.getApiKey(),o=r?{...i,"X-API-Key":r}:i,n=await fetch(s,{headers:o,...t});if(!n.ok){if(401===n.status)throw this.clearApiKey(),Error("Authentication required. Please provide a valid API key.");throw Error(`HTTP error! status: ${n.status}`)}return n.json()}async getTokenUsage(){return this.request("/token-usage")}async getSessions(){return this.request("/claude/sessions/recent")}async getSessionDetail(e,t,s){let i=`/sessions/${e}`;if(void 0!==t||void 0!==s){let e=new URLSearchParams;void 0!==t&&e.append("page",t.toString()),void 0!==s&&e.append("page_size",s.toString()),i+=`?${e.toString()}`}return this.request(i)}async getAvailableTokens(e="pro"){return this.request(`/claude/available-tokens?plan=${e}`)}async getCurrentMonthCosts(){return this.request("/costs/current-month")}async getTasks(){return this.request("/tasks")}async syncLogs(){return this.request("/sync-logs",{method:"POST"})}async getP90Predictions(){return this.request("/predictions/p90")}async getP90PredictionsByProject(e){return this.request(`/predictions/p90/project/${encodeURIComponent(e)}`)}async getBurnRateHistory(e=24){return this.request(`/predictions/burn-rate-history?hours=${e}`)}async getInitializationStatus(){return this.request("/initialization-status")}async getProjects(){return this.request("/projects")}async getProject(e){return this.request(`/projects/${e}`)}async createJob(e){return this.request("/jobs",{method:"POST",body:JSON.stringify(e)})}async getJobs(e){let t="/jobs";if(e){let s=new URLSearchParams;e.project_id&&s.append("project_id",e.project_id),e.status&&s.append("status",e.status),e.limit&&s.append("limit",e.limit.toString()),e.offset&&s.append("offset",e.offset.toString()),s.toString()&&(t+=`?${s.toString()}`)}return this.request(t)}async getJob(e){return this.request(`/jobs/${e}`)}async cancelJob(e){return this.request(`/jobs/${e}/cancel`,{method:"POST"})}async deleteJob(e){return this.request(`/jobs/${e}`,{method:"DELETE"})}async getJobQueueStatus(){return this.request("/jobs/queue/status")}}let r=new i("http://localhost:6060/api"),o={tokenUsage:{getCurrent:()=>r.getTokenUsage(),getAvailable:e=>r.getAvailableTokens(e)},sessions:{getAll:()=>r.getSessions(),getById:(e,t,s)=>r.getSessionDetail(e,t,s)},costs:{getCurrentMonth:()=>r.getCurrentMonthCosts()},tasks:{getAll:()=>r.getTasks()},sync:{logs:()=>r.syncLogs()},predictions:{getP90:()=>r.getP90Predictions(),getP90ByProject:e=>r.getP90PredictionsByProject(e),getBurnRateHistory:e=>r.getBurnRateHistory(e)},initialization:{getStatus:()=>r.getInitializationStatus()},projects:{getAll:()=>r.getProjects(),getById:e=>r.getProject(e)},jobs:{create:e=>r.createJob(e),getAll:e=>r.getJobs(e),getById:e=>r.getJob(e),cancel:e=>r.cancelJob(e),delete:e=>r.deleteJob(e),getQueueStatus:()=>r.getJobQueueStatus()}}},9821:(e,t,s)=>{"use strict";s.d(t,{E:()=>a});var i=s(687);s(3210);var r=s(4224),o=s(6241);let n=(0,r.F)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function a({className:e,variant:t,...s}){return(0,i.jsx)("div",{className:(0,o.cn)(n({variant:t}),e),...s})}}};