diff --git a/packages/cli/assets/insight/src/App.tsx b/packages/cli/assets/insight/src/App.tsx index c729b9a4a..034b9420d 100644 --- a/packages/cli/assets/insight/src/App.tsx +++ b/packages/cli/assets/insight/src/App.tsx @@ -1,6 +1,6 @@ -import { useState } from 'react'; +import { useState, useEffect, useRef } from 'react'; import ReactDOM from 'react-dom/client'; -import { Header, StatsRow } from './Header'; +import { StatsRow } from './Header'; import { AtAGlance, NavToc, @@ -12,7 +12,7 @@ import { FutureOpportunities, MemorableMoment, } from './Qualitative'; -import { ShareCard } from './ShareCard'; +import { ShareCard, type Theme } from './ShareCard'; import './styles.css'; import { InsightData } from './types'; // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -20,6 +20,62 @@ import React from 'react'; // Main App Component function InsightApp({ data }: { data: InsightData }) { + const [cardTheme, setCardTheme] = useState('dark'); + const pendingExport = useRef(false); + + const performExport = async () => { + const card = document.getElementById('share-card'); + if (!card || !window.html2canvas) { + alert('Export functionality is not available.'); + return; + } + + try { + const clone = card.cloneNode(true) as HTMLElement; + clone.style.position = 'fixed'; + clone.style.left = '-9999px'; + clone.style.top = '0'; + clone.style.pointerEvents = 'none'; + document.body.appendChild(clone); + + const canvas = await window.html2canvas(clone, { + scale: 2, + useCORS: true, + logging: false, + width: 1200, + height: clone.scrollHeight, + }); + + document.body.removeChild(clone); + + const imgData = canvas.toDataURL('image/png'); + const link = document.createElement('a'); + link.href = imgData; + link.download = `qwen-insights-card-${new Date().toISOString().slice(0, 10)}.png`; + link.click(); + } catch (error) { + console.error('Export card error:', error); + alert('Failed to export card. Please try again.'); + } + }; + + // Export after React re-renders the card with the new theme + useEffect(() => { + if (pendingExport.current) { + pendingExport.current = false; + performExport(); + } + }, [cardTheme]); + + const handleExportWithTheme = (theme: Theme) => { + if (theme === cardTheme) { + performExport(); + } else { + pendingExport.current = true; + setCardTheme(theme); + } + }; + if (!data) { return (
@@ -42,10 +98,22 @@ function InsightApp({ data }: { data: InsightData }) { return (
-
-
- -
+ {/* Elegant Header */} +
+
+
+

Qwen Code Insights

+

+ {data.totalMessages + ? `${data.totalMessages.toLocaleString()} messages across ${data.totalSessions?.toLocaleString()} sessions` + : 'Your personalized coding journey and patterns'} + {dateRangeStr && ` · ${dateRangeStr}`} +

+
+ + +
+
{data.qualitative && ( <> @@ -90,73 +158,118 @@ function InsightApp({ data }: { data: InsightData }) { )} - +
); } -// Share Button Component -function ShareButton() { - const [isExporting, setIsExporting] = useState(false); +// Export Card Button with theme dropdown +function ExportCardButton({ onExport }: { onExport: (theme: Theme) => void }) { + const [isOpen, setIsOpen] = useState(false); + const wrapperRef = useRef(null); - const handleExport = async () => { - const card = document.getElementById('share-card'); - if (!card || !window.html2canvas) { - alert('Export functionality is not available.'); - return; - } + // Close dropdown on outside click + useEffect(() => { + if (!isOpen) return; + const handleClick = (e: MouseEvent) => { + if ( + wrapperRef.current && + !wrapperRef.current.contains(e.target as Node) + ) { + setIsOpen(false); + } + }; + document.addEventListener('mousedown', handleClick); + return () => document.removeEventListener('mousedown', handleClick); + }, [isOpen]); - setIsExporting(true); - try { - // Clone the card off-screen so it renders but isn't visible - const clone = card.cloneNode(true) as HTMLElement; - clone.style.position = 'fixed'; - clone.style.left = '-9999px'; - clone.style.top = '0'; - clone.style.pointerEvents = 'none'; - document.body.appendChild(clone); - - const canvas = await window.html2canvas(clone, { - scale: 2, - useCORS: true, - logging: false, - width: 1200, - height: clone.scrollHeight, - }); - - document.body.removeChild(clone); - - const imgData = canvas.toDataURL('image/png'); - const link = document.createElement('a'); - link.href = imgData; - link.download = `qwen-insights-card-${new Date().toISOString().slice(0, 10)}.png`; - link.click(); - } catch (error) { - console.error('Export card error:', error); - alert('Failed to export card. Please try again.'); - } finally { - setIsExporting(false); - } + const handleSelect = (theme: Theme) => { + setIsOpen(false); + onExport(theme); }; return ( - +
+ + + {isOpen && ( +
+ + +
+ )} +
); } diff --git a/packages/cli/assets/insight/src/Charts.tsx b/packages/cli/assets/insight/src/Charts.tsx index fd9888688..fa8ce2fdc 100644 --- a/packages/cli/assets/insight/src/Charts.tsx +++ b/packages/cli/assets/insight/src/Charts.tsx @@ -49,14 +49,14 @@ export function ActiveHoursChart({ }, { label: 'Evening', - time: '18:00 - 00:00', - hours: [18, 19, 20, 21, 22, 23], + time: '18:00 - 22:00', + hours: [18, 19, 20, 21], color: '#6366f1', // indigo-500 }, { label: 'Night', - time: '00:00 - 06:00', - hours: [0, 1, 2, 3, 4, 5], + time: '22:00 - 06:00', + hours: [22, 23, 0, 1, 2, 3, 4, 5], color: '#475569', // slate-600 }, ]; @@ -127,15 +127,16 @@ export function HeatmapSection({ return (
-
+

Activity Heatmap

- Past year +

Showing past year of activity

+
); } @@ -147,7 +148,7 @@ function ActivityHeatmap({ heatmapData: Record; }) { const width = 1000; - const height = 150; + const height = 130; const cellSize = 14; const cellPadding = 2; @@ -164,7 +165,8 @@ function ActivityHeatmap({ } const colorLevels = [0, 2, 4, 10, 20]; - const colors = ['#e2e8f0', '#a5d8ff', '#74c0fc', '#339af0', '#1c7ed6']; + // GitHub contribution graph color palette (green) + const colors = ['#ebedf0', '#9be9a8', '#40c463', '#30a14e', '#216e39']; function getColor(value: number) { if (value === 0) return colors[0]; @@ -270,34 +272,29 @@ function ActivityHeatmap({ {label.text} ))} - - {/* Render legend */} - - Less - - {colors.map((color, index) => { - const legendX = startX + 40 + index * (cellSize + 2); - return ( - - ); - })} - - More - ); } + +// Heatmap Legend Component (outside SVG) +function HeatmapLegend() { + const colors = ['#ebedf0', '#9be9a8', '#40c463', '#30a14e', '#216e39']; + + return ( +
+ Less + {colors.map((color, index) => ( + + ))} + More +
+ ); +} diff --git a/packages/cli/assets/insight/src/Qualitative.tsx b/packages/cli/assets/insight/src/Qualitative.tsx index f9b3500e0..014f00470 100644 --- a/packages/cli/assets/insight/src/Qualitative.tsx +++ b/packages/cli/assets/insight/src/Qualitative.tsx @@ -55,7 +55,7 @@ export function NavToc() { return (
{/* Key Pattern + Memorable Moment */}
-
+
Generated by Qwen Code · {new Date().toISOString().split('T')[0]}
-
+
github.com/QwenLM/qwen-code
@@ -296,10 +353,12 @@ function StatBox({ value, label, small, + theme, }: { value: string; label: string; small?: boolean; + theme: ThemeConfig; }) { return (
@@ -307,7 +366,7 @@ function StatBox({ style={{ fontSize: small ? '18px' : '28px', fontWeight: 700, - color: '#f8fafc', + color: theme.textPrimary, lineHeight: 1.2, }} > @@ -316,7 +375,7 @@ function StatBox({
- + {item.label} - + {item.time}
- + {item.total}
, + theme: ThemeConfig, ): { color: string }[] { const today = new Date(); const weeksToShow = 26; @@ -451,20 +513,20 @@ function buildMiniHeatmap( while (d <= endDate) { const key = d.toISOString().split('T')[0]; const val = heatmap[key] || 0; - cells.push({ color: heatColor(val) }); + cells.push({ color: heatColor(val, theme) }); d.setDate(d.getDate() + 1); } return cells; } -function heatColor(val: number): string { - if (val === 0) return 'rgba(255,255,255,0.06)'; - if (val < 2) return '#1e3a5f'; - if (val < 4) return '#2563eb'; - if (val < 10) return '#3b82f6'; - if (val < 20) return '#60a5fa'; - return '#93c5fd'; +// GitHub contribution graph color palette - theme aware +function heatColor(val: number, theme: ThemeConfig): string { + if (val === 0) return theme.heatmapEmpty; + if (val < 2) return theme.heatmapColors[0]; + if (val < 4) return theme.heatmapColors[1]; + if (val < 10) return theme.heatmapColors[2]; + return theme.heatmapColors[3]; } function MiniHeatmapGrid({ cells }: { cells: { color: string }[] }) { @@ -499,3 +561,38 @@ function MiniHeatmapGrid({ cells }: { cells: { color: string }[] }) { ); } + +// Mini Heatmap Legend Component for ShareCard (theme aware) +function MiniHeatmapLegend({ theme }: { theme: ThemeConfig }) { + return ( +
+ Less + {[ + theme.heatmapEmpty, + theme.heatmapColors[0], + theme.heatmapColors[1], + theme.heatmapColors[2], + theme.heatmapColors[3], + ].map((color, index) => ( + + ))} + More +
+ ); +} diff --git a/packages/cli/assets/insight/src/styles.css b/packages/cli/assets/insight/src/styles.css index 5f7c54b8a..8ef9af761 100644 --- a/packages/cli/assets/insight/src/styles.css +++ b/packages/cli/assets/insight/src/styles.css @@ -1136,42 +1136,127 @@ body { position: relative; } -/* Share Button */ -.share-btn { - position: absolute; - top: 0; - right: 0; +/* Header Styles */ +.insights-header { + margin-bottom: 2rem; + padding: 1.5rem 0; + border-bottom: 1px solid #e2e8f0; +} + +.header-content { + display: flex; + justify-content: space-between; + align-items: center; + gap: 1.5rem; + flex-wrap: wrap; +} + +.header-title-section { + flex: 1; + min-width: 0; +} + +.header-title { + font-size: 1.75rem; + font-weight: 700; + color: #0f172a; + letter-spacing: -0.02em; + margin: 0 0 0.375rem 0; + line-height: 1.2; +} + +.header-subtitle { + font-size: 0.875rem; + color: #64748b; + margin: 0; + font-weight: 400; +} + +/* Export Card Dropdown */ +.export-dropdown-wrapper { + position: relative; +} + +.export-card-btn { display: inline-flex; align-items: center; - gap: 8px; - border: none; + gap: 0.5rem; + height: 36px; + padding: 0 0.875rem; + border: 1px solid #e2e8f0; border-radius: 8px; - padding: 10px 20px; - font-size: 14px; - font-weight: 600; + background: white; + color: #334155; + font-size: 0.8125rem; + font-weight: 500; cursor: pointer; - color: #fff; - background: linear-gradient(135deg, #1e293b 0%, #334155 100%); - transition: all 0.2s; - box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2); + transition: all 0.15s ease; } -.share-btn:hover:not(:disabled) { - background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); - box-shadow: 0 4px 16px rgba(15, 23, 42, 0.3); - transform: translateY(-1px); +.export-card-btn:hover { + background: #f8fafc; + border-color: #cbd5e1; } -.share-btn:active:not(:disabled) { - transform: translateY(0); - box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2); +.export-card-btn:active { + background: #f1f5f9; } -.share-btn:disabled { +.export-chevron { + transition: transform 0.15s ease; opacity: 0.5; - cursor: not-allowed; } -.share-btn svg { - opacity: 0.8; +.export-chevron.open { + transform: rotate(180deg); +} + +.export-dropdown { + position: absolute; + top: calc(100% + 4px); + right: 0; + min-width: 160px; + background: white; + border: 1px solid #e2e8f0; + border-radius: 8px; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); + padding: 4px; + z-index: 50; +} + +.export-dropdown-item { + display: flex; + align-items: center; + gap: 0.5rem; + width: 100%; + padding: 0.5rem 0.75rem; + border: none; + border-radius: 6px; + background: none; + color: #334155; + font-size: 0.8125rem; + font-weight: 400; + cursor: pointer; + transition: background 0.1s ease; +} + +.export-dropdown-item:hover { + background: #f1f5f9; +} + +.export-dropdown-item:active { + background: #e2e8f0; +} + +/* Responsive adjustments */ +@media (max-width: 640px) { + .header-content { + flex-direction: column; + align-items: flex-start; + gap: 1rem; + } + + .header-title { + font-size: 1.5rem; + } } \ No newline at end of file diff --git a/packages/cli/src/services/insight/templates/insightTemplate.ts b/packages/cli/src/services/insight/templates/insightTemplate.ts index ca3b75ee8..cc90a8488 100644 --- a/packages/cli/src/services/insight/templates/insightTemplate.ts +++ b/packages/cli/src/services/insight/templates/insightTemplate.ts @@ -6,5 +6,5 @@ * This file is code-generated; do not edit manually. */ -export const INSIGHT_JS = "(function(e,z){\"use strict\";function j({data:t,dateRangeStr:n}){const{totalMessages:l,totalSessions:r}=t;return e.createElement(\"header\",{className:\"mb-8 space-y-3 text-center\"},e.createElement(\"h1\",{className:\"text-3xl font-semibold text-slate-900 md:text-4xl\"},\"Qwen Code Insights\"),e.createElement(\"p\",{className:\"text-sm text-slate-600\"},l?`${l} messages across ${r} sessions`:\"Your personalized coding journey and patterns\",n&&` | ${n}`))}function H({data:t}){const{totalMessages:n=0,totalLinesAdded:l=0,totalLinesRemoved:r=0,totalFiles:a=0}=t,i=Object.keys(t.heatmap||{});let s=0;if(i.length>0){const c=i.map(h=>new Date(h)).map(h=>h.getTime()),p=new Date(Math.min(...c)),E=new Date(Math.max(...c)),f=Math.abs(E.getTime()-p.getTime());s=Math.ceil(f/(1e3*60*60*24))+1}const o=s>0?Math.round(n/s):0;return e.createElement(\"div\",{className:\"stats-row\"},e.createElement(\"div\",{className:\"stat\"},e.createElement(\"div\",{className:\"stat-value\"},n),e.createElement(\"div\",{className:\"stat-label\"},\"Messages\")),e.createElement(\"div\",{className:\"stat\"},e.createElement(\"div\",{className:\"stat-value\"},\"+\",l,\"/-\",r),e.createElement(\"div\",{className:\"stat-label\"},\"Lines\")),e.createElement(\"div\",{className:\"stat\"},e.createElement(\"div\",{className:\"stat-value\"},a),e.createElement(\"div\",{className:\"stat-label\"},\"Files\")),e.createElement(\"div\",{className:\"stat\"},e.createElement(\"div\",{className:\"stat-value\"},s),e.createElement(\"div\",{className:\"stat-label\"},\"Days\")),e.createElement(\"div\",{className:\"stat\"},e.createElement(\"div\",{className:\"stat-value\"},o),e.createElement(\"div\",{className:\"stat-label\"},\"Msgs/Day\")))}function O({insights:t}){return e.createElement(\"div\",{className:\"grid gap-4 md:grid-cols-2 md:gap-6\"},e.createElement(q,{activeHours:t.activeHours,cardClass:\"glass-card p-6\",sectionTitleClass:\"text-lg font-semibold tracking-tight text-slate-900\"}))}function q({activeHours:t,cardClass:n,sectionTitleClass:l}){const a=[{label:\"Morning\",time:\"06:00 - 12:00\",hours:[6,7,8,9,10,11],color:\"#fbbf24\"},{label:\"Afternoon\",time:\"12:00 - 18:00\",hours:[12,13,14,15,16,17],color:\"#0ea5e9\"},{label:\"Evening\",time:\"18:00 - 00:00\",hours:[18,19,20,21,22,23],color:\"#6366f1\"},{label:\"Night\",time:\"00:00 - 06:00\",hours:[0,1,2,3,4,5],color:\"#475569\"}].map(s=>{const o=s.hours.reduce((m,c)=>m+(t[c]||0),0);return{...s,total:o}}),i=Math.max(...a.map(s=>s.total));return e.createElement(\"div\",{className:`${n} h-full flex flex-col min-h-[320px]`},e.createElement(\"div\",{className:\"flex items-center justify-between mb-4\"},e.createElement(\"h3\",{className:l},\"Active Hours\")),e.createElement(\"div\",{className:\"flex-1 flex flex-col justify-center gap-4\"},a.map(s=>e.createElement(\"div\",{key:s.label,className:\"space-y-2\"},e.createElement(\"div\",{className:\"flex justify-between items-center text-sm\"},e.createElement(\"div\",{className:\"flex items-center gap-2\"},e.createElement(\"span\",{className:\"rounded-full\",style:{width:\"12px\",height:\"12px\",backgroundColor:s.color}}),e.createElement(\"span\",{className:\"font-medium text-slate-700\"},s.label),e.createElement(\"span\",{className:\"text-xs text-slate-400 hidden xl:inline\"},s.time)),e.createElement(\"span\",{className:\"font-semibold text-slate-900\"},s.total)),e.createElement(\"div\",{className:\"w-full rounded-full overflow-hidden\",style:{height:\"12px\",backgroundColor:\"#e2e8f0\"}},e.createElement(\"div\",{className:\"h-full rounded-full\",style:{width:`${i>0?s.total/i*100:0}%`,backgroundColor:s.color}}))))))}function F({heatmap:t}){return e.createElement(\"div\",{className:\"glass-card p-6 mt-4 md:mt-6\"},e.createElement(\"div\",{className:\"flex items-center justify-between\"},e.createElement(\"h3\",{className:\"text-lg font-semibold tracking-tight text-slate-900\"},\"Activity Heatmap\"),e.createElement(\"span\",{className:\"text-xs font-semibold text-slate-500\"},\"Past year\")),e.createElement(\"div\",{className:\"heatmap-container\"},e.createElement(\"div\",{className:\"min-w-[720px] rounded-xl bg-white/70\"},e.createElement($,{heatmapData:t}))))}function $({heatmapData:t}){const i=new Date,s=new Date(i);s.setFullYear(i.getFullYear()-1);const o=[],m=new Date(s);for(;m<=i;)o.push(new Date(m)),m.setDate(m.getDate()+1);const c=[0,2,4,10,20],p=[\"#e2e8f0\",\"#a5d8ff\",\"#74c0fc\",\"#339af0\",\"#1c7ed6\"];function E(g){if(g===0)return p[0];for(let u=c.length-1;u>=1;u--)if(g>=c[u])return p[u];return p[1]}const f=50,h=20,W=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],N=s.getDay(),k=[];let S=-1,C=-100;return o.forEach((g,u)=>{const x=u+N,D=Math.floor(x/7),v=f+D*16,y=g.getMonth();y!==S&&(v-C>30&&(k.push({x:v,text:W[y]}),C=v),S=y)}),e.createElement(\"svg\",{className:\"heatmap-svg\",width:1e3,height:150,viewBox:\"0 0 1000 150\"},o.map((g,u)=>{const x=u+N,D=Math.floor(x/7),v=g.getDay(),y=f+D*16,T=h+v*16,A=g.toISOString().split(\"T\")[0],I=t[A]||0,re=E(I);return e.createElement(\"rect\",{key:A,className:\"heatmap-day\",x:y,y:T,width:14,height:14,rx:\"2\",fill:re,\"data-date\":A,\"data-count\":I},e.createElement(\"title\",null,A,\": \",I,\" activities\"))}),k.map((g,u)=>e.createElement(\"text\",{key:u,x:g.x,y:\"15\",fontSize:\"12\",fill:\"#64748b\"},g.text)),e.createElement(\"text\",{x:f,y:110,fontSize:\"12\",fill:\"#64748b\"},\"Less\"),p.map((g,u)=>{const x=f+40+u*16;return e.createElement(\"rect\",{key:u,x,y:120,width:\"10\",height:\"10\",rx:\"2\",fill:g})}),e.createElement(\"text\",{x:f+40+p.length*16+5,y:129,fontSize:\"12\",fill:\"#64748b\",width:14},\"More\"))}function d({children:t}){if(!t||typeof t!=\"string\")return t;const n=t.split(/(\\*\\*.*?\\*\\*)/g);return e.createElement(e.Fragment,null,n.map((l,r)=>l.startsWith(\"**\")&&l.endsWith(\"**\")&&l.length>=4?e.createElement(\"strong\",{key:r},l.slice(2,-2)):l))}function _({text:t,label:n=\"Copy\"}){const[l,r]=e.useState(!1),a=()=>{navigator.clipboard.writeText(t).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)})};return e.createElement(\"button\",{className:\"copy-btn\",onClick:a},l?\"Copied!\":n)}function B({qualitative:t}){const{atAGlance:n}=t;return n?e.createElement(\"div\",{className:\"at-a-glance\"},e.createElement(\"div\",{className:\"glance-title\"},\"At a Glance\"),e.createElement(\"div\",{className:\"glance-sections\"},e.createElement(\"div\",{className:\"glance-section\"},e.createElement(\"strong\",null,\"What's working:\"),\" \",e.createElement(d,null,n.whats_working),e.createElement(\"a\",{href:\"#section-wins\",className:\"see-more\"},\"Impressive Things You Did →\")),e.createElement(\"div\",{className:\"glance-section\"},e.createElement(\"strong\",null,\"What's hindering you:\"),\" \",e.createElement(d,null,n.whats_hindering),e.createElement(\"a\",{href:\"#section-friction\",className:\"see-more\"},\"Where Things Go Wrong →\")),e.createElement(\"div\",{className:\"glance-section\"},e.createElement(\"strong\",null,\"Quick wins to try:\"),\" \",e.createElement(d,null,n.quick_wins),e.createElement(\"a\",{href:\"#section-features\",className:\"see-more\"},\"Features to Try →\")),e.createElement(\"div\",{className:\"glance-section\"},e.createElement(\"strong\",null,\"Ambitious workflows:\"),\" \",e.createElement(d,null,n.ambitious_workflows),e.createElement(\"a\",{href:\"#section-horizon\",className:\"see-more\"},\"On the Horizon →\")))):null}function Q(){return e.createElement(\"nav\",{className:\"nav-toc\"},e.createElement(\"a\",{href:\"#section-work\"},\"What You Work On\"),e.createElement(\"a\",{href:\"#section-usage\"},\"How You Use QC\"),e.createElement(\"a\",{href:\"#section-wins\"},\"Impressive Things\"),e.createElement(\"a\",{href:\"#section-friction\"},\"Where Things Go Wrong\"),e.createElement(\"a\",{href:\"#section-features\"},\"Features to Try\"),e.createElement(\"a\",{href:\"#section-patterns\"},\"New Usage Patterns\"),e.createElement(\"a\",{href:\"#section-horizon\"},\"On the Horizon\"))}function L({qualitative:t,topGoals:n,topTools:l}){const{projectAreas:r}=t,a=Array.isArray(l)?Object.fromEntries(l):l;return e.createElement(e.Fragment,null,e.createElement(\"h2\",{id:\"section-work\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"What You Work On\"),Array.isArray(r==null?void 0:r.areas)&&r.areas.length>0&&e.createElement(\"div\",{className:\"project-areas mb-6\"},r.areas.map((i,s)=>e.createElement(\"div\",{key:s,className:\"project-area\"},e.createElement(\"div\",{className:\"area-header\"},e.createElement(\"span\",{className:\"area-name\"},i.name),e.createElement(\"span\",{className:\"area-count\"},\"~\",i.session_count,\" sessions\")),e.createElement(\"div\",{className:\"area-desc\"},e.createElement(d,null,i.description))))),e.createElement(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"repeat(2, 1fr)\",gap:\"24px\",marginBottom:\"24px\"}},n&&Object.keys(n).length>0&&e.createElement(b,{data:n,title:\"What You Wanted\",color:\"#0ea5e9\"}),a&&Object.keys(a).length>0&&e.createElement(b,{data:a,title:\"Top Tools Used\",color:\"#6366f1\"})))}function P({qualitative:t,insights:n}){const{interactionStyle:l}=t;return l?e.createElement(e.Fragment,null,e.createElement(\"h2\",{id:\"section-usage\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"How You Use Qwen Code\"),e.createElement(\"div\",{className:\"narrative\"},e.createElement(\"p\",null,e.createElement(d,null,l.narrative)),l.key_pattern&&e.createElement(\"div\",{className:\"key-insight\"},e.createElement(\"strong\",null,\"Key pattern:\"),\" \",e.createElement(d,null,l.key_pattern))),e.createElement(O,{insights:n}),e.createElement(F,{heatmap:n.heatmap})):null}function G({qualitative:t,primarySuccess:n,outcomes:l}){const{impressiveWorkflows:r}=t;return r?e.createElement(e.Fragment,null,e.createElement(\"h2\",{id:\"section-wins\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"Impressive Things You Did\"),r.intro&&e.createElement(\"p\",{className:\"section-intro\"},e.createElement(d,null,r.intro)),e.createElement(\"div\",{className:\"big-wins\"},Array.isArray(r.impressive_workflows)&&r.impressive_workflows.map((a,i)=>e.createElement(\"div\",{key:i,className:\"big-win\"},e.createElement(\"div\",{className:\"big-win-title\"},a.title),e.createElement(\"div\",{className:\"big-win-desc\"},e.createElement(d,null,a.description))))),e.createElement(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"repeat(2, 1fr)\",gap:\"24px\",marginTop:\"24px\",marginBottom:\"24px\"}},n&&Object.keys(n).length>0&&e.createElement(b,{data:n,title:\"What Helped Most (Qwen's Capabilities)\",color:\"#3b82f6\",allowedKeys:[\"fast_accurate_search\",\"correct_code_edits\",\"good_explanations\",\"proactive_help\",\"multi_file_changes\",\"good_debugging\"]}),l&&Object.keys(l).length>0&&e.createElement(b,{data:l,title:\"Outcomes\",color:\"#8b5cf6\",allowedKeys:[\"fully_achieved\",\"mostly_achieved\",\"partially_achieved\",\"not_achieved\",\"unclear_from_transcript\"]}))):null}function Y(t){return t===\"unclear_from_transcript\"?\"Unclear\":t.split(\"_\").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(\" \")}function b({data:t,title:n,color:l=\"#3b82f6\",allowedKeys:r=null}){if(!t||Object.keys(t).length===0)return null;let a=Object.entries(t);if(r&&(a=a.filter(([s])=>r.includes(s))),a.sort((s,o)=>o[1]-s[1]),a.length===0)return null;const i=Math.max(...a.map(([,s])=>s));return e.createElement(\"div\",{className:\"bar-chart-card\",style:{flex:1,minWidth:0,backgroundColor:\"#ffffff\",borderRadius:\"12px\",padding:\"20px\",boxShadow:\"0 1px 3px rgba(0, 0, 0, 0.08)\",border:\"1px solid #e2e8f0\"}},e.createElement(\"h3\",{style:{fontSize:\"13px\",fontWeight:700,color:\"#64748b\",marginTop:0,marginBottom:\"16px\",textTransform:\"uppercase\",letterSpacing:\"0.5px\"}},n),e.createElement(\"div\",{className:\"bar-chart\",style:{display:\"flex\",flexDirection:\"column\",gap:\"10px\"}},a.map(([s,o])=>{const m=i>0?o/i*100:0;return e.createElement(\"div\",{key:s,className:\"bar-row\",style:{display:\"flex\",alignItems:\"center\",gap:\"12px\"}},e.createElement(\"div\",{className:\"bar-label\",style:{width:\"130px\",fontSize:\"13px\",color:\"#475569\",textAlign:\"left\",flexShrink:0,whiteSpace:\"nowrap\",overflow:\"hidden\",textOverflow:\"ellipsis\"}},Y(s)),e.createElement(\"div\",{className:\"bar-wrapper\",style:{flex:1,display:\"flex\",alignItems:\"center\",gap:\"10px\",minWidth:0}},e.createElement(\"div\",{className:\"bar-bg\",style:{flex:1,height:\"8px\",backgroundColor:\"#f1f5f9\",borderRadius:\"4px\",overflow:\"hidden\"}},e.createElement(\"div\",{className:\"bar-fill\",style:{width:`${m}%`,height:\"100%\",backgroundColor:l,borderRadius:\"4px\",transition:\"width 0.3s ease\"}})),e.createElement(\"span\",{className:\"bar-value\",style:{fontSize:\"13px\",fontWeight:600,color:\"#475569\",minWidth:\"24px\",textAlign:\"right\"}},o)))})))}function U({qualitative:t,satisfaction:n,friction:l}){const{frictionPoints:r}=t;return r?e.createElement(e.Fragment,null,e.createElement(\"h2\",{id:\"section-friction\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"Where Things Go Wrong\"),r.intro&&e.createElement(\"p\",{className:\"section-intro\"},e.createElement(d,null,r.intro)),e.createElement(\"div\",{className:\"friction-categories\"},Array.isArray(r.categories)&&r.categories.map((a,i)=>e.createElement(\"div\",{key:i,className:\"friction-category\"},e.createElement(\"div\",{className:\"friction-title\"},a.category),e.createElement(\"div\",{className:\"friction-desc\"},e.createElement(d,null,a.description)),Array.isArray(a.examples)&&a.examples.length>0&&e.createElement(\"ul\",{className:\"friction-examples\"},a.examples.map((s,o)=>e.createElement(\"li\",{key:o},e.createElement(d,null,s))))))),e.createElement(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"repeat(2, 1fr)\",gap:\"24px\",marginTop:\"24px\",marginBottom:\"24px\"}},l&&Object.keys(l).length>0&&e.createElement(b,{data:l,title:\"Primary Friction Types\",color:\"#ef4444\",allowedKeys:[\"misunderstood_request\",\"wrong_approach\",\"buggy_code\",\"user_rejected_action\",\"excessive_changes\"]}),n&&Object.keys(n).length>0&&e.createElement(b,{data:n,title:\"Inferred Satisfaction (model-estimated)\",color:\"#10b981\",allowedKeys:[\"happy\",\"satisfied\",\"likely_satisfied\",\"dissatisfied\",\"frustrated\"]}))):null}function K({additions:t}){const[n,l]=e.useState(new Array(t.length).fill(!0)),[r,a]=e.useState(!1),i=m=>{const c=n.map((p,E)=>E===m?!p:p);l(c)},s=()=>{const m=t.filter((c,p)=>n[p]).map(c=>c.addition).join(`\n\n`);m&&navigator.clipboard.writeText(m).then(()=>{a(!0),setTimeout(()=>a(!1),2e3)})},o=n.filter(Boolean).length;return e.createElement(\"div\",{className:\"qwen-md-section\"},e.createElement(\"h3\",null,\"Suggested QWEN.md Additions\"),e.createElement(\"p\",{className:\"text-xs text-slate-500 mb-3\"},\"Just copy this into Qwen Code to add it to your QWEN.md.\"),e.createElement(\"div\",{className:\"qwen-md-actions\",style:{marginBottom:\"12px\"}},e.createElement(\"button\",{className:`copy-all-btn ${r?\"copied\":\"\"}`,onClick:s,disabled:o===0},r?\"Copied All!\":`Copy All Checked (${o})`)),t.map((m,c)=>e.createElement(\"div\",{key:c,className:\"qwen-md-item\"},e.createElement(\"input\",{type:\"checkbox\",checked:n[c],onChange:()=>i(c),className:\"cmd-checkbox\"}),e.createElement(\"div\",{style:{flex:1}},e.createElement(\"code\",{className:\"cmd-code\"},m.addition),e.createElement(\"div\",{className:\"cmd-why\"},e.createElement(d,null,m.why))),e.createElement(_,{text:m.addition}))))}function J({qualitative:t}){const{improvements:n}=t;return n?e.createElement(e.Fragment,null,e.createElement(\"h2\",{id:\"section-features\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"Existing QC Features to Try\"),Array.isArray(n.Qwen_md_additions)&&n.Qwen_md_additions.length>0&&e.createElement(K,{additions:n.Qwen_md_additions}),e.createElement(\"p\",{className:\"text-xs text-slate-500 mb-3\"},\"Just copy this into Qwen Code and it'll set it up for you.\"),e.createElement(\"div\",{className:\"features-section\"},Array.isArray(n.features_to_try)&&n.features_to_try.map((l,r)=>e.createElement(\"div\",{key:r,className:\"feature-card\"},e.createElement(\"div\",{className:\"feature-title\"},l.feature),e.createElement(\"div\",{className:\"feature-oneliner\"},e.createElement(d,null,l.one_liner)),e.createElement(\"div\",{className:\"feature-why\"},e.createElement(\"strong\",null,\"Why for you:\"),\" \",e.createElement(d,null,l.why_for_you)),e.createElement(\"div\",{className:\"feature-examples\"},e.createElement(\"div\",{className:\"feature-example\"},e.createElement(\"div\",{className:\"example-code-row\"},e.createElement(\"code\",{className:\"example-code\"},l.example_code),e.createElement(_,{text:l.example_code}))))))),e.createElement(\"h2\",{id:\"section-patterns\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"New Ways to Use Qwen Code\"),e.createElement(\"p\",{className:\"text-xs text-slate-500 mb-3\"},\"Just copy this into Qwen Code and it'll walk you through it.\"),e.createElement(\"div\",{className:\"patterns-section\"},Array.isArray(n.usage_patterns)&&n.usage_patterns.map((l,r)=>e.createElement(\"div\",{key:r,className:\"pattern-card\"},e.createElement(\"div\",{className:\"pattern-title\"},l.title),e.createElement(\"div\",{className:\"pattern-summary\"},e.createElement(d,null,l.suggestion)),e.createElement(\"div\",{className:\"pattern-detail\"},e.createElement(d,null,l.detail)),e.createElement(\"div\",{className:\"copyable-prompt-section\"},e.createElement(\"div\",{className:\"prompt-label\"},\"Paste into Qwen Code:\"),e.createElement(\"div\",{className:\"copyable-prompt-row\"},e.createElement(\"code\",{className:\"copyable-prompt\"},l.copyable_prompt),e.createElement(_,{text:l.copyable_prompt}))))))):null}function X({qualitative:t}){const{futureOpportunities:n}=t;return n?e.createElement(e.Fragment,null,e.createElement(\"h2\",{id:\"section-horizon\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"On the Horizon\"),n.intro&&e.createElement(\"p\",{className:\"section-intro\"},e.createElement(d,null,n.intro)),e.createElement(\"div\",{className:\"horizon-section\"},Array.isArray(n.opportunities)&&n.opportunities.map((l,r)=>e.createElement(\"div\",{key:r,className:\"horizon-card\"},e.createElement(\"div\",{className:\"horizon-title\"},l.title),e.createElement(\"div\",{className:\"horizon-possible\"},e.createElement(d,null,l.whats_possible)),e.createElement(\"div\",{className:\"horizon-tip\"},e.createElement(\"strong\",null,\"Getting started:\"),\" \",e.createElement(d,null,l.how_to_try)),e.createElement(\"div\",{className:\"pattern-prompt\"},e.createElement(\"div\",{className:\"prompt-label\"},\"Paste into Qwen Code:\"),e.createElement(\"div\",{style:{display:\"flex\",alignItems:\"flex-start\",gap:\"8px\"}},e.createElement(\"code\",{style:{flex:1}},l.copyable_prompt),e.createElement(_,{text:l.copyable_prompt}))))))):null}function V({qualitative:t}){const{memorableMoment:n}=t;return n?e.createElement(\"div\",{className:\"fun-ending\"},e.createElement(\"div\",{className:\"fun-headline\"},'\"',n.headline,'\"'),e.createElement(\"div\",{className:\"fun-detail\"},e.createElement(d,null,n.detail))):null}function Z({data:t}){var N,k,S,C,g,u;const{totalMessages:n=0,totalSessions:l=0,totalLinesAdded:r=0,totalLinesRemoved:a=0,totalFiles:i=0,currentStreak:s=0,longestStreak:o=0,activeHours:m={}}=t,c=Object.keys(t.heatmap||{});let p=0,E=\"\";if(c.length>0){p=c.length;const x=c.map(T=>new Date(T).getTime()),D=new Date(Math.min(...x)),v=new Date(Math.max(...x)),y=T=>T.toISOString().split(\"T\")[0];E=`${y(D)} — ${y(v)}`}const f=(S=(k=(N=t.qualitative)==null?void 0:N.interactionStyle)==null?void 0:k.key_pattern)!=null?S:null,h=(u=(g=(C=t.qualitative)==null?void 0:C.memorableMoment)==null?void 0:g.headline)!=null?u:null,W=ee(t.heatmap||{});return e.createElement(\"div\",{id:\"share-card\",style:{width:\"1200px\",background:\"linear-gradient(135deg, #0f172a 0%, #1e293b 100%)\",color:\"#f8fafc\",fontFamily:'ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\"',display:\"flex\",flexDirection:\"column\",padding:\"48px 56px\",position:\"absolute\",left:\"-9999px\",top:\"-9999px\",overflow:\"hidden\",boxSizing:\"border-box\"}},e.createElement(\"div\",{style:{display:\"flex\",justifyContent:\"space-between\",alignItems:\"flex-start\",marginBottom:\"32px\"}},e.createElement(\"div\",null,e.createElement(\"div\",{style:{fontSize:\"32px\",fontWeight:700,letterSpacing:\"-0.02em\",lineHeight:1.2}},\"Qwen Code Insights\"),e.createElement(\"div\",{style:{fontSize:\"14px\",color:\"#94a3b8\",marginTop:\"6px\"}},E)),e.createElement(\"div\",{style:{fontSize:\"11px\",color:\"#64748b\",textTransform:\"uppercase\",letterSpacing:\"0.15em\",paddingTop:\"8px\"}},\"qwen.ai\")),e.createElement(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"repeat(6, 1fr)\",gap:\"16px\",marginBottom:\"32px\"}},e.createElement(w,{value:String(n),label:\"Messages\"}),e.createElement(w,{value:String(l),label:\"Sessions\"}),e.createElement(w,{value:`+${r}/-${a}`,label:\"Lines Changed\",small:!0}),e.createElement(w,{value:String(i),label:\"Files\"}),e.createElement(w,{value:`${s}d`,label:\"Streak\"}),e.createElement(w,{value:`${o}d`,label:\"Best Streak\"})),e.createElement(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"1fr 1fr\",gap:\"24px\",marginBottom:\"16px\"}},e.createElement(\"div\",{style:{background:\"rgba(255,255,255,0.05)\",borderRadius:\"12px\",padding:\"20px\",display:\"flex\",flexDirection:\"column\"}},e.createElement(\"div\",{style:{fontSize:\"12px\",fontWeight:600,color:\"#94a3b8\",textTransform:\"uppercase\",letterSpacing:\"0.08em\",marginBottom:\"12px\"}},\"Activity · \",p,\" active days\"),e.createElement(\"div\",{style:{flex:1,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"}},e.createElement(ne,{cells:W}))),e.createElement(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:\"16px\"}},e.createElement(\"div\",{style:{background:\"rgba(255,255,255,0.05)\",borderRadius:\"12px\",padding:\"20px\",display:\"flex\",flexDirection:\"column\"}},e.createElement(\"div\",{style:{fontSize:\"12px\",fontWeight:600,color:\"#94a3b8\",textTransform:\"uppercase\",letterSpacing:\"0.08em\",marginBottom:\"12px\"}},\"Active Hours\"),e.createElement(\"div\",{style:{flex:1,display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",gap:\"10px\"}},e.createElement(R,{activeHours:m}))),e.createElement(\"div\",{style:{background:\"rgba(255,255,255,0.04)\",borderRadius:\"12px\",padding:\"16px 16px\",position:\"relative\"}},e.createElement(\"div\",{style:{position:\"absolute\",left:\"12px\",fontSize:\"64px\",fontWeight:700,color:\"rgba(99,102,241,0.2)\",lineHeight:1,fontFamily:'Georgia, \"Times New Roman\", serif',userSelect:\"none\",pointerEvents:\"none\"}},\"“\"),e.createElement(\"div\",{style:{paddingLeft:\"40px\",position:\"relative\"}},f&&e.createElement(\"div\",{style:{fontSize:\"13px\",color:\"#e2e8f0\",lineHeight:1.6,marginBottom:h?\"8px\":0}},f),h&&e.createElement(\"div\",{style:{fontSize:\"12px\",color:\"#94a3b8\",lineHeight:1.5,fontStyle:\"italic\"}},h))))),e.createElement(\"div\",{style:{display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",marginTop:\"auto\",paddingTop:\"24px\",borderTop:\"1px solid rgba(255,255,255,0.08)\",flexShrink:0}},e.createElement(\"div\",{style:{fontSize:\"12px\",color:\"#64748b\"}},\"Generated by Qwen Code · \",new Date().toISOString().split(\"T\")[0]),e.createElement(\"div\",{style:{fontSize:\"12px\",color:\"#64748b\"}},\"github.com/QwenLM/qwen-code\")))}function w({value:t,label:n,small:l}){return e.createElement(\"div\",{style:{textAlign:\"center\"}},e.createElement(\"div\",{style:{fontSize:l?\"18px\":\"28px\",fontWeight:700,color:\"#f8fafc\",lineHeight:1.2}},t),e.createElement(\"div\",{style:{fontSize:\"11px\",color:\"#64748b\",textTransform:\"uppercase\",letterSpacing:\"0.05em\",marginTop:\"4px\"}},n))}function R({activeHours:t}){const l=[{label:\"Morning\",time:\"06–12\",hours:[6,7,8,9,10,11],color:\"#fbbf24\"},{label:\"Afternoon\",time:\"12–18\",hours:[12,13,14,15,16,17],color:\"#0ea5e9\"},{label:\"Evening\",time:\"18–00\",hours:[18,19,20,21,22,23],color:\"#6366f1\"},{label:\"Night\",time:\"00–06\",hours:[0,1,2,3,4,5],color:\"#475569\"}].map(a=>({...a,total:a.hours.reduce((i,s)=>i+(t[s]||0),0)})),r=Math.max(...l.map(a=>a.total),1);return e.createElement(e.Fragment,null,l.map(a=>{const i=r>0?a.total/r*100:0;return e.createElement(\"div\",{key:a.label},e.createElement(\"div\",{style:{display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",fontSize:\"12px\",marginBottom:\"4px\"}},e.createElement(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"6px\"}},e.createElement(\"span\",{style:{width:\"8px\",height:\"8px\",borderRadius:\"50%\",backgroundColor:a.color,display:\"inline-block\",flexShrink:0}}),e.createElement(\"span\",{style:{color:\"#e2e8f0\",fontWeight:500}},a.label),e.createElement(\"span\",{style:{color:\"#64748b\",fontSize:\"11px\"}},a.time)),e.createElement(\"span\",{style:{color:\"#94a3b8\",fontWeight:600}},a.total)),e.createElement(\"div\",{style:{height:\"6px\",background:\"rgba(255,255,255,0.08)\",borderRadius:\"3px\",overflow:\"hidden\"}},e.createElement(\"div\",{style:{width:`${i}%`,height:\"100%\",backgroundColor:a.color,borderRadius:\"3px\"}})))}))}function ee(t){const n=new Date,r=26*7,a=new Date(n);a.setDate(a.getDate()-r+1),a.setDate(a.getDate()-a.getDay());const i=[],s=new Date(n);s.setDate(s.getDate()+(6-s.getDay()));const o=new Date(a);for(;o<=s;){const m=o.toISOString().split(\"T\")[0],c=t[m]||0;i.push({color:te(c)}),o.setDate(o.getDate()+1)}return i}function te(t){return t===0?\"rgba(255,255,255,0.06)\":t<2?\"#1e3a5f\":t<4?\"#2563eb\":t<10?\"#3b82f6\":t<20?\"#60a5fa\":\"#93c5fd\"}function ne({cells:t}){const l=Math.ceil(t.length/7),r=14,a=3,i=l*(r+a),s=7*(r+a);return e.createElement(\"svg\",{width:i,height:s,viewBox:`0 0 ${i} ${s}`},t.map((o,m)=>{const c=Math.floor(m/7),p=m%7;return e.createElement(\"rect\",{key:m,x:c*(r+a),y:p*(r+a),width:r,height:r,rx:2,fill:o.color})}))}function le({data:t}){if(!t)return e.createElement(\"div\",{className:\"text-center text-slate-600\"},\"No insight data available\");const n=Object.keys(t.heatmap||{});let l=\"\";if(n.length>0){const a=n.map(m=>new Date(m)).map(m=>m.getTime()),i=new Date(Math.min(...a)),s=new Date(Math.max(...a)),o=m=>m.toISOString().split(\"T\")[0];l=`${o(i)} to ${o(s)}`}return e.createElement(\"div\",null,e.createElement(\"div\",{className:\"header-with-action\"},e.createElement(j,{data:t,dateRangeStr:l}),e.createElement(ae,null)),t.qualitative&&e.createElement(e.Fragment,null,e.createElement(B,{qualitative:t.qualitative}),e.createElement(Q,null)),e.createElement(H,{data:t}),t.qualitative&&e.createElement(e.Fragment,null,e.createElement(L,{qualitative:t.qualitative,topGoals:t.topGoals,topTools:t.topTools})),t.qualitative&&e.createElement(e.Fragment,null,e.createElement(P,{qualitative:t.qualitative,insights:t})),t.qualitative&&e.createElement(e.Fragment,null,e.createElement(G,{qualitative:t.qualitative,primarySuccess:t.primarySuccess,outcomes:t.outcomes}),e.createElement(U,{qualitative:t.qualitative,satisfaction:t.satisfaction,friction:t.friction}),e.createElement(J,{qualitative:t.qualitative}),e.createElement(X,{qualitative:t.qualitative}),e.createElement(V,{qualitative:t.qualitative})),e.createElement(Z,{data:t}))}function ae(){const[t,n]=e.useState(!1),l=async()=>{const r=document.getElementById(\"share-card\");if(!r||!window.html2canvas){alert(\"Export functionality is not available.\");return}n(!0);try{const a=r.cloneNode(!0);a.style.position=\"fixed\",a.style.left=\"-9999px\",a.style.top=\"0\",a.style.pointerEvents=\"none\",document.body.appendChild(a);const i=await window.html2canvas(a,{scale:2,useCORS:!0,logging:!1,width:1200,height:a.scrollHeight});document.body.removeChild(a);const s=i.toDataURL(\"image/png\"),o=document.createElement(\"a\");o.href=s,o.download=`qwen-insights-card-${new Date().toISOString().slice(0,10)}.png`,o.click()}catch(a){console.error(\"Export card error:\",a),alert(\"Failed to export card. Please try again.\")}finally{n(!1)}};return e.createElement(\"button\",{onClick:l,disabled:t,className:\"share-btn\"},e.createElement(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},e.createElement(\"path\",{d:\"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8\"}),e.createElement(\"polyline\",{points:\"16 6 12 2 8 6\"}),e.createElement(\"line\",{x1:\"12\",y1:\"2\",x2:\"12\",y2:\"15\"})),t?\"Exporting...\":\"Share as Card\")}const M=document.getElementById(\"react-root\");M&&window.INSIGHT_DATA&&z?z.createRoot(M).render(e.createElement(le,{data:window.INSIGHT_DATA})):console.error(\"Failed to mount React app:\",{container:!!M,data:!!window.INSIGHT_DATA,ReactDOM:!!z})})(React,ReactDOM);"; -export const INSIGHT_CSS = "*,:before,:after,::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #3b82f680;--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border:0 solid #e5e7eb}:before,:after{--tw-content: \"\"}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";line-height:1.5}body{line-height:inherit;margin:0;background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #f8fafc var(--tw-gradient-from-position);--tw-gradient-to: #f1f5f9 var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #fff var(--tw-gradient-via-position), var(--tw-gradient-to);--tw-text-opacity: 1;min-height:100vh;color:rgb(15 23 42 / var(--tw-text-opacity, 1));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glass-card{--tw-border-opacity: 1;border-width:1px;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1));--tw-shadow: 0 10px 40px #0f172a14;--tw-shadow-colored: 0 10px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background-color:#fff9;border-radius:1rem}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-56{height:14rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-full{width:100%}.min-w-\\[720px\\]{min-width:720px}.max-w-6xl{max-width:72rem}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-slate-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(226 232 240 / var(--tw-divide-opacity, 1))}.overflow-x-auto{overflow-x:auto}.rounded-full{border-radius:9999px}.rounded-xl{border-radius:1.25rem}.border{border-width:1px}.border-slate-100{--tw-border-opacity: 1;border-color:rgb(241 245 249 / var(--tw-border-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-white\\/70{background-color:#ffffff73}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-slate-50{--tw-gradient-from: #f8fafc var(--tw-gradient-from-position);--tw-gradient-to: #f8fafc00 var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-white{--tw-gradient-to: #ffffff00 var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #ffffff var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-slate-100{--tw-gradient-to: #f1f5f9 var(--tw-gradient-to-position)}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tracking-\\[0\\.2em\\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-rose-700{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 #0000000d;--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-soft{--tw-shadow: 0 10px 40px #0f172a14;--tw-shadow-colored: 0 10px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-slate-100{--tw-shadow-color: #f1f5f9;--tw-shadow: var(--tw-shadow-colored)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:-translate-y-\\[1px\\]:hover{--tw-translate-y: -1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-slate-400:focus-visible{outline-color:#94a3b8}.active\\:translate-y-\\[1px\\]:active{--tw-translate-y: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\\:translate-x-0\\.5{--tw-translate-x: .125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width: 768px){.md\\:mt-6{margin-top:1.5rem}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\\:gap-6{gap:1.5rem}.md\\:py-12{padding-top:3rem;padding-bottom:3rem}.md\\:text-4xl{font-size:2.25rem;line-height:2.5rem}}.heatmap-container{width:100%;overflow-x:auto}.heatmap-svg{min-width:720px}.heatmap-day{cursor:pointer}.heatmap-day:hover{stroke:#00000024;stroke-width:1px}.heatmap-legend{display:flex;align-items:center;gap:4px;font-size:12px;color:#64748b;margin-top:8px}.heatmap-legend-item{width:10px;height:10px;border-radius:2px}.nav-toc{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0 32px;padding:16px;background:#fff;border-radius:8px;border:1px solid #e2e8f0}.nav-toc a{font-size:12px;color:#64748b;text-decoration:none;padding:6px 12px;border-radius:6px;background:#f1f5f9;transition:all .15s}.nav-toc a:hover{background:#e2e8f0;color:#334155}.at-a-glance{background:linear-gradient(135deg,#fef3c7,#fde68a);border:1px solid #f59e0b;border-radius:12px;padding:20px 24px;margin-bottom:32px}.glance-title{font-size:16px;font-weight:700;color:#92400e;margin-bottom:16px}.glance-sections{display:flex;flex-direction:column;gap:12px}.glance-section{font-size:14px;color:#78350f;line-height:1.6}.glance-section strong{color:#92400e;font-weight:700}.see-more{color:#b45309;text-decoration:none;font-size:13px;white-space:nowrap;margin-left:4px}.see-more:hover{text-decoration:underline}.project-areas{display:flex;flex-direction:column;gap:12px;margin-bottom:32px}.project-area{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:16px}.area-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.area-name{font-weight:600;font-size:15px;color:#0f172a}.area-count{font-size:12px;color:#64748b;background:#f1f5f9;padding:2px 8px;border-radius:4px}.area-desc{font-size:14px;color:#475569;line-height:1.5}.narrative{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:20px;margin-bottom:24px}.narrative p{margin-top:0;margin-bottom:12px;font-size:14px;color:#475569;line-height:1.7}.key-insight{background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;padding:12px 16px;margin-top:12px;font-size:14px;color:#166534}.section-intro{font-size:14px;color:#64748b;margin-bottom:16px}.big-wins{display:flex;flex-direction:column;gap:12px;margin-bottom:24px}.big-win{background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;padding:16px}.big-win-title{font-weight:600;font-size:15px;color:#166534;margin-bottom:8px}.big-win-desc{font-size:14px;color:#15803d;line-height:1.5}.friction-categories{display:flex;flex-direction:column;gap:16px;margin-bottom:24px}.friction-category{background:#fef2f2;border:1px solid #fca5a5;border-radius:8px;padding:16px}.friction-title{font-weight:600;font-size:15px;color:#991b1b;margin-bottom:6px}.friction-desc{font-size:13px;color:#7f1d1d;margin-bottom:10px}.friction-examples{margin:0 0 0 10px;padding:0;font-size:13px;color:#334155;list-style-type:disc}.friction-examples li{margin-bottom:4px}.qwen-md-section{background:#eff6ff;border:1px solid #bfdbfe;border-radius:8px;padding:12px;margin-bottom:20px}.qwen-md-section h3{font-size:13px;font-weight:600;color:#1e40af;margin:0 0 8px}.qwen-md-actions{margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid #dbeafe}.copy-all-btn{background:#2563eb;color:#fff;border:none;border-radius:4px;padding:4px 10px;font-size:11px;cursor:pointer;font-weight:500;transition:all .2s}.copy-all-btn:hover{background:#1d4ed8}.copy-all-btn.copied{background:#16a34a}.qwen-md-item{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;padding:8px 0;border-bottom:1px solid #dbeafe}.qwen-md-item:last-child{border-bottom:none}.cmd-checkbox{margin-top:2px}.cmd-code{background:#fff;padding:6px 10px;border-radius:4px;font-size:11px;color:#1e40af;border:1px solid #bfdbfe;font-family:monospace;display:block;white-space:pre-wrap;word-break:break-word;flex:1}.cmd-why{font-size:11px;color:#64748b;width:100%;padding-left:20px;margin-top:4px}.features-section,.patterns-section{display:flex;flex-direction:column;gap:12px;margin:16px 0}.feature-card{background:#f0fdf4;border:1px solid #86efac;border-radius:8px;padding:16px}.pattern-card{background:#f0f9ff;border:1px solid #7dd3fc;border-radius:8px;padding:16px}.feature-title,.pattern-title{font-weight:600;font-size:15px;color:#0f172a;margin-bottom:6px}.feature-oneliner,.pattern-summary{font-size:14px;color:#475569;margin-bottom:8px}.feature-why,.pattern-detail{font-size:13px;color:#334155;line-height:1.5}.feature-examples{margin-top:12px}.feature-example{padding:8px 0;border-top:1px solid #d1fae5}.feature-example:first-child{border-top:none}.example-code-row,.copyable-prompt-row{display:flex;align-items:flex-start;gap:8px}.example-code{flex:1;background:#f1f5f9;padding:8px 12px;border-radius:4px;font-family:monospace;font-size:12px;color:#334155;overflow-x:auto;white-space:pre-wrap}.copyable-prompt-section{margin-top:12px;padding-top:12px;border-top:1px solid #e2e8f0}.copyable-prompt{flex:1;background:#f8fafc;padding:10px 12px;border-radius:4px;font-family:monospace;font-size:12px;color:#334155;border:1px solid #e2e8f0;white-space:pre-wrap;line-height:1.5}.prompt-label{font-size:11px;font-weight:600;text-transform:uppercase;color:#64748b;margin-bottom:6px}.copy-btn{background:#e2e8f0;border:none;border-radius:4px;padding:4px 8px;font-size:11px;cursor:pointer;color:#475569;flex-shrink:0;transition:all .2s}.copy-btn:hover{background:#cbd5e1}.horizon-section{display:flex;flex-direction:column;gap:16px}.horizon-card{background:linear-gradient(135deg,#faf5ff,#f5f3ff);border:1px solid #c4b5fd;border-radius:8px;padding:16px}.horizon-title{font-weight:600;font-size:15px;color:#5b21b6;margin-bottom:8px}.horizon-possible{font-size:14px;color:#334155;margin-bottom:10px;line-height:1.5}.horizon-tip{font-size:13px;color:#6b21a8;background:#fff9;padding:8px 12px;border-radius:4px}.pattern-prompt{background:#f8fafc;padding:12px;border-radius:6px;margin-top:12px;border:1px solid #e2e8f0;display:flex;flex-direction:column;gap:8px}.pattern-prompt code{font-family:monospace;font-size:12px;color:#334155;display:block;white-space:pre-wrap}.fun-ending{background:linear-gradient(135deg,#fef3c7,#fde68a);border:1px solid #fbbf24;border-radius:12px;padding:24px;margin-top:40px;text-align:center}.fun-headline{font-size:18px;font-weight:600;color:#78350f;margin-bottom:8px}.fun-detail{font-size:14px;color:#92400e}.stats-row{display:flex;gap:24px;margin-bottom:40px;padding:20px 0;border-top:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}.stat{text-align:center}.stat-value{font-size:24px;font-weight:700;color:#0f172a}.stat-label{font-size:11px;color:#64748b;text-transform:uppercase}@media (max-width: 640px){.stats-row{justify-content:center}}.header-with-action{position:relative}.share-btn{position:absolute;top:0;right:0;display:inline-flex;align-items:center;gap:8px;border:none;border-radius:8px;padding:10px 20px;font-size:14px;font-weight:600;cursor:pointer;color:#fff;background:linear-gradient(135deg,#1e293b,#334155);transition:all .2s;box-shadow:0 2px 8px #0f172a33}.share-btn:hover:not(:disabled){background:linear-gradient(135deg,#0f172a,#1e293b);box-shadow:0 4px 16px #0f172a4d;transform:translateY(-1px)}.share-btn:active:not(:disabled){transform:translateY(0);box-shadow:0 1px 4px #0f172a33}.share-btn:disabled{opacity:.5;cursor:not-allowed}.share-btn svg{opacity:.8}"; +export const INSIGHT_JS = "(function(e,z){\"use strict\";function j({data:t}){const{totalMessages:l=0,totalLinesAdded:n=0,totalLinesRemoved:r=0,totalFiles:o=0}=t,a=Object.keys(t.heatmap||{});let s=0;if(a.length>0){const d=a.map(u=>new Date(u)).map(u=>u.getTime()),c=new Date(Math.min(...d)),g=new Date(Math.max(...d)),f=Math.abs(g.getTime()-c.getTime());s=Math.ceil(f/(1e3*60*60*24))+1}const i=s>0?Math.round(l/s):0;return e.createElement(\"div\",{className:\"stats-row\"},e.createElement(\"div\",{className:\"stat\"},e.createElement(\"div\",{className:\"stat-value\"},l),e.createElement(\"div\",{className:\"stat-label\"},\"Messages\")),e.createElement(\"div\",{className:\"stat\"},e.createElement(\"div\",{className:\"stat-value\"},\"+\",n,\"/-\",r),e.createElement(\"div\",{className:\"stat-label\"},\"Lines\")),e.createElement(\"div\",{className:\"stat\"},e.createElement(\"div\",{className:\"stat-value\"},o),e.createElement(\"div\",{className:\"stat-label\"},\"Files\")),e.createElement(\"div\",{className:\"stat\"},e.createElement(\"div\",{className:\"stat-value\"},s),e.createElement(\"div\",{className:\"stat-label\"},\"Days\")),e.createElement(\"div\",{className:\"stat\"},e.createElement(\"div\",{className:\"stat-value\"},i),e.createElement(\"div\",{className:\"stat-label\"},\"Msgs/Day\")))}function B({insights:t}){return e.createElement(\"div\",{className:\"grid gap-4 md:grid-cols-2 md:gap-6\"},e.createElement(H,{activeHours:t.activeHours,cardClass:\"glass-card p-6\",sectionTitleClass:\"text-lg font-semibold tracking-tight text-slate-900\"}))}function H({activeHours:t,cardClass:l,sectionTitleClass:n}){const o=[{label:\"Morning\",time:\"06:00 - 12:00\",hours:[6,7,8,9,10,11],color:\"#fbbf24\"},{label:\"Afternoon\",time:\"12:00 - 18:00\",hours:[12,13,14,15,16,17],color:\"#0ea5e9\"},{label:\"Evening\",time:\"18:00 - 22:00\",hours:[18,19,20,21],color:\"#6366f1\"},{label:\"Night\",time:\"22:00 - 06:00\",hours:[22,23,0,1,2,3,4,5],color:\"#475569\"}].map(s=>{const i=s.hours.reduce((m,d)=>m+(t[d]||0),0);return{...s,total:i}}),a=Math.max(...o.map(s=>s.total));return e.createElement(\"div\",{className:`${l} h-full flex flex-col min-h-[320px]`},e.createElement(\"div\",{className:\"flex items-center justify-between mb-4\"},e.createElement(\"h3\",{className:n},\"Active Hours\")),e.createElement(\"div\",{className:\"flex-1 flex flex-col justify-center gap-4\"},o.map(s=>e.createElement(\"div\",{key:s.label,className:\"space-y-2\"},e.createElement(\"div\",{className:\"flex justify-between items-center text-sm\"},e.createElement(\"div\",{className:\"flex items-center gap-2\"},e.createElement(\"span\",{className:\"rounded-full\",style:{width:\"12px\",height:\"12px\",backgroundColor:s.color}}),e.createElement(\"span\",{className:\"font-medium text-slate-700\"},s.label),e.createElement(\"span\",{className:\"text-xs text-slate-400 hidden xl:inline\"},s.time)),e.createElement(\"span\",{className:\"font-semibold text-slate-900\"},s.total)),e.createElement(\"div\",{className:\"w-full rounded-full overflow-hidden\",style:{height:\"12px\",backgroundColor:\"#e2e8f0\"}},e.createElement(\"div\",{className:\"h-full rounded-full\",style:{width:`${a>0?s.total/a*100:0}%`,backgroundColor:s.color}}))))))}function O({heatmap:t}){return e.createElement(\"div\",{className:\"glass-card p-6 mt-4 md:mt-6\"},e.createElement(\"div\",{className:\"mb-3\"},e.createElement(\"h3\",{className:\"text-lg font-semibold tracking-tight text-slate-900\"},\"Activity Heatmap\"),e.createElement(\"p\",{className:\"text-xs text-slate-500\"},\"Showing past year of activity\")),e.createElement(\"div\",{className:\"heatmap-container\"},e.createElement(\"div\",{className:\"min-w-[720px] rounded-xl bg-white/70\"},e.createElement(q,{heatmapData:t}))),e.createElement(F,null))}function q({heatmapData:t}){const a=new Date,s=new Date(a);s.setFullYear(a.getFullYear()-1);const i=[],m=new Date(s);for(;m<=a;)i.push(new Date(m)),m.setDate(m.getDate()+1);const d=[0,2,4,10,20],c=[\"#ebedf0\",\"#9be9a8\",\"#40c463\",\"#30a14e\",\"#216e39\"];function g(h){if(h===0)return c[0];for(let E=d.length-1;E>=1;E--)if(h>=d[E])return c[E];return c[1]}const f=50,u=20,x=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],S=s.getDay(),A=[];let D=-1,_=-100;return i.forEach((h,E)=>{const C=E+S,T=Math.floor(C/7),y=f+T*16,v=h.getMonth();v!==D&&(y-_>30&&(A.push({x:y,text:x[v]}),_=y),D=v)}),e.createElement(\"svg\",{className:\"heatmap-svg\",width:1e3,height:130,viewBox:\"0 0 1000 130\"},i.map((h,E)=>{const C=E+S,T=Math.floor(C/7),y=h.getDay(),v=f+T*16,I=u+y*16,b=h.toISOString().split(\"T\")[0],w=t[b]||0,oe=g(w);return e.createElement(\"rect\",{key:b,className:\"heatmap-day\",x:v,y:I,width:14,height:14,rx:\"2\",fill:oe,\"data-date\":b,\"data-count\":w},e.createElement(\"title\",null,b,\": \",w,\" activities\"))}),A.map((h,E)=>e.createElement(\"text\",{key:E,x:h.x,y:\"15\",fontSize:\"12\",fill:\"#64748b\"},h.text)))}function F(){const t=[\"#ebedf0\",\"#9be9a8\",\"#40c463\",\"#30a14e\",\"#216e39\"];return e.createElement(\"div\",{className:\"flex items-center gap-2 mt-4\"},e.createElement(\"span\",{className:\"text-xs text-slate-500\"},\"Less\"),t.map((l,n)=>e.createElement(\"span\",{key:n,className:\"inline-block rounded\",style:{width:\"10px\",height:\"10px\",backgroundColor:l}})),e.createElement(\"span\",{className:\"text-xs text-slate-500\"},\"More\"))}function p({children:t}){if(!t||typeof t!=\"string\")return t;const l=t.split(/(\\*\\*.*?\\*\\*)/g);return e.createElement(e.Fragment,null,l.map((n,r)=>n.startsWith(\"**\")&&n.endsWith(\"**\")&&n.length>=4?e.createElement(\"strong\",{key:r},n.slice(2,-2)):n))}function M({text:t,label:l=\"Copy\"}){const[n,r]=e.useState(!1),o=()=>{navigator.clipboard.writeText(t).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)})};return e.createElement(\"button\",{className:\"copy-btn\",onClick:o},n?\"Copied!\":l)}function L({qualitative:t}){const{atAGlance:l}=t;return l?e.createElement(\"div\",{className:\"at-a-glance\"},e.createElement(\"div\",{className:\"glance-title\"},\"At a Glance\"),e.createElement(\"div\",{className:\"glance-sections\"},e.createElement(\"div\",{className:\"glance-section\"},e.createElement(\"strong\",null,\"What's working:\"),\" \",e.createElement(p,null,l.whats_working),e.createElement(\"a\",{href:\"#section-wins\",className:\"see-more\"},\"Impressive Things You Did →\")),e.createElement(\"div\",{className:\"glance-section\"},e.createElement(\"strong\",null,\"What's hindering you:\"),\" \",e.createElement(p,null,l.whats_hindering),e.createElement(\"a\",{href:\"#section-friction\",className:\"see-more\"},\"Where Things Go Wrong →\")),e.createElement(\"div\",{className:\"glance-section\"},e.createElement(\"strong\",null,\"Quick wins to try:\"),\" \",e.createElement(p,null,l.quick_wins),e.createElement(\"a\",{href:\"#section-features\",className:\"see-more\"},\"Features to Try →\")),e.createElement(\"div\",{className:\"glance-section\"},e.createElement(\"strong\",null,\"Ambitious workflows:\"),\" \",e.createElement(p,null,l.ambitious_workflows),e.createElement(\"a\",{href:\"#section-horizon\",className:\"see-more\"},\"On the Horizon →\")))):null}function $(){return e.createElement(\"nav\",{className:\"nav-toc\"},e.createElement(\"a\",{href:\"#section-work\"},\"What You Work On\"),e.createElement(\"a\",{href:\"#section-usage\"},\"How You Use Qwen Code\"),e.createElement(\"a\",{href:\"#section-wins\"},\"Impressive Things\"),e.createElement(\"a\",{href:\"#section-friction\"},\"Where Things Go Wrong\"),e.createElement(\"a\",{href:\"#section-features\"},\"Features to Try\"),e.createElement(\"a\",{href:\"#section-patterns\"},\"New Usage Patterns\"),e.createElement(\"a\",{href:\"#section-horizon\"},\"On the Horizon\"))}function Q({qualitative:t,topGoals:l,topTools:n}){const{projectAreas:r}=t,o=Array.isArray(n)?Object.fromEntries(n):n;return e.createElement(e.Fragment,null,e.createElement(\"h2\",{id:\"section-work\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"What You Work On\"),Array.isArray(r==null?void 0:r.areas)&&r.areas.length>0&&e.createElement(\"div\",{className:\"project-areas mb-6\"},r.areas.map((a,s)=>e.createElement(\"div\",{key:s,className:\"project-area\"},e.createElement(\"div\",{className:\"area-header\"},e.createElement(\"span\",{className:\"area-name\"},a.name),e.createElement(\"span\",{className:\"area-count\"},\"~\",a.session_count,\" sessions\")),e.createElement(\"div\",{className:\"area-desc\"},e.createElement(p,null,a.description))))),e.createElement(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"repeat(2, 1fr)\",gap:\"24px\",marginBottom:\"24px\"}},l&&Object.keys(l).length>0&&e.createElement(N,{data:l,title:\"What You Wanted\",color:\"#0ea5e9\"}),o&&Object.keys(o).length>0&&e.createElement(N,{data:o,title:\"Top Tools Used\",color:\"#6366f1\"})))}function P({qualitative:t,insights:l}){const{interactionStyle:n}=t;return n?e.createElement(e.Fragment,null,e.createElement(\"h2\",{id:\"section-usage\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"How You Use Qwen Code\"),e.createElement(\"div\",{className:\"narrative\"},e.createElement(\"p\",null,e.createElement(p,null,n.narrative)),n.key_pattern&&e.createElement(\"div\",{className:\"key-insight\"},e.createElement(\"strong\",null,\"Key pattern:\"),\" \",e.createElement(p,null,n.key_pattern))),e.createElement(B,{insights:l}),e.createElement(O,{heatmap:l.heatmap})):null}function G({qualitative:t,primarySuccess:l,outcomes:n}){const{impressiveWorkflows:r}=t;return r?e.createElement(e.Fragment,null,e.createElement(\"h2\",{id:\"section-wins\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"Impressive Things You Did\"),r.intro&&e.createElement(\"p\",{className:\"section-intro\"},e.createElement(p,null,r.intro)),e.createElement(\"div\",{className:\"big-wins\"},Array.isArray(r.impressive_workflows)&&r.impressive_workflows.map((o,a)=>e.createElement(\"div\",{key:a,className:\"big-win\"},e.createElement(\"div\",{className:\"big-win-title\"},o.title),e.createElement(\"div\",{className:\"big-win-desc\"},e.createElement(p,null,o.description))))),e.createElement(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"repeat(2, 1fr)\",gap:\"24px\",marginTop:\"24px\",marginBottom:\"24px\"}},l&&Object.keys(l).length>0&&e.createElement(N,{data:l,title:\"What Helped Most (Qwen's Capabilities)\",color:\"#3b82f6\",allowedKeys:[\"fast_accurate_search\",\"correct_code_edits\",\"good_explanations\",\"proactive_help\",\"multi_file_changes\",\"good_debugging\"]}),n&&Object.keys(n).length>0&&e.createElement(N,{data:n,title:\"Outcomes\",color:\"#8b5cf6\",allowedKeys:[\"fully_achieved\",\"mostly_achieved\",\"partially_achieved\",\"not_achieved\",\"unclear_from_transcript\"]}))):null}function Y(t){return t===\"unclear_from_transcript\"?\"Unclear\":t.split(\"_\").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(\" \")}function N({data:t,title:l,color:n=\"#3b82f6\",allowedKeys:r=null}){if(!t||Object.keys(t).length===0)return null;let o=Object.entries(t);if(r&&(o=o.filter(([s])=>r.includes(s))),o.sort((s,i)=>i[1]-s[1]),o=o.slice(0,10),o.length===0)return null;const a=Math.max(...o.map(([,s])=>s));return e.createElement(\"div\",{className:\"bar-chart-card\",style:{flex:1,minWidth:0,backgroundColor:\"#ffffff\",borderRadius:\"12px\",padding:\"20px\",boxShadow:\"0 1px 3px rgba(0, 0, 0, 0.08)\",border:\"1px solid #e2e8f0\"}},e.createElement(\"h3\",{style:{fontSize:\"13px\",fontWeight:700,color:\"#64748b\",marginTop:0,marginBottom:\"16px\",textTransform:\"uppercase\",letterSpacing:\"0.5px\"}},l),e.createElement(\"div\",{className:\"bar-chart\",style:{display:\"flex\",flexDirection:\"column\",gap:\"10px\"}},o.map(([s,i])=>{const m=a>0?i/a*100:0;return e.createElement(\"div\",{key:s,className:\"bar-row\",style:{display:\"flex\",alignItems:\"center\",gap:\"12px\"}},e.createElement(\"div\",{className:\"bar-label\",style:{width:\"130px\",fontSize:\"13px\",color:\"#475569\",textAlign:\"left\",flexShrink:0,whiteSpace:\"nowrap\",overflow:\"hidden\",textOverflow:\"ellipsis\"}},Y(s)),e.createElement(\"div\",{className:\"bar-wrapper\",style:{flex:1,display:\"flex\",alignItems:\"center\",gap:\"10px\",minWidth:0}},e.createElement(\"div\",{className:\"bar-bg\",style:{flex:1,height:\"8px\",backgroundColor:\"#f1f5f9\",borderRadius:\"4px\",overflow:\"hidden\"}},e.createElement(\"div\",{className:\"bar-fill\",style:{width:`${m}%`,height:\"100%\",backgroundColor:n,borderRadius:\"4px\",transition:\"width 0.3s ease\"}})),e.createElement(\"span\",{className:\"bar-value\",style:{fontSize:\"13px\",fontWeight:600,color:\"#475569\",minWidth:\"24px\",textAlign:\"right\"}},i)))})))}function U({qualitative:t,satisfaction:l,friction:n}){const{frictionPoints:r}=t;return r?e.createElement(e.Fragment,null,e.createElement(\"h2\",{id:\"section-friction\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"Where Things Go Wrong\"),r.intro&&e.createElement(\"p\",{className:\"section-intro\"},e.createElement(p,null,r.intro)),e.createElement(\"div\",{className:\"friction-categories\"},Array.isArray(r.categories)&&r.categories.map((o,a)=>e.createElement(\"div\",{key:a,className:\"friction-category\"},e.createElement(\"div\",{className:\"friction-title\"},o.category),e.createElement(\"div\",{className:\"friction-desc\"},e.createElement(p,null,o.description)),Array.isArray(o.examples)&&o.examples.length>0&&e.createElement(\"ul\",{className:\"friction-examples\"},o.examples.map((s,i)=>e.createElement(\"li\",{key:i},e.createElement(p,null,s))))))),e.createElement(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"repeat(2, 1fr)\",gap:\"24px\",marginTop:\"24px\",marginBottom:\"24px\"}},n&&Object.keys(n).length>0&&e.createElement(N,{data:n,title:\"Primary Friction Types\",color:\"#ef4444\",allowedKeys:[\"misunderstood_request\",\"wrong_approach\",\"buggy_code\",\"user_rejected_action\",\"excessive_changes\"]}),l&&Object.keys(l).length>0&&e.createElement(N,{data:l,title:\"Inferred Satisfaction (model-estimated)\",color:\"#10b981\",allowedKeys:[\"happy\",\"satisfied\",\"likely_satisfied\",\"dissatisfied\",\"frustrated\"]}))):null}function K({additions:t}){const[l,n]=e.useState(new Array(t.length).fill(!0)),[r,o]=e.useState(!1),a=m=>{const d=l.map((c,g)=>g===m?!c:c);n(d)},s=()=>{const m=t.filter((d,c)=>l[c]).map(d=>d.addition).join(`\n\n`);m&&navigator.clipboard.writeText(m).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},i=l.filter(Boolean).length;return e.createElement(\"div\",{className:\"qwen-md-section\"},e.createElement(\"h3\",null,\"Suggested QWEN.md Additions\"),e.createElement(\"p\",{className:\"text-xs text-slate-500 mb-3\"},\"Just copy this into Qwen Code to add it to your QWEN.md.\"),e.createElement(\"div\",{className:\"qwen-md-actions\",style:{marginBottom:\"12px\"}},e.createElement(\"button\",{className:`copy-all-btn ${r?\"copied\":\"\"}`,onClick:s,disabled:i===0},r?\"Copied All!\":`Copy All Checked (${i})`)),t.map((m,d)=>e.createElement(\"div\",{key:d,className:\"qwen-md-item\"},e.createElement(\"input\",{type:\"checkbox\",checked:l[d],onChange:()=>a(d),className:\"cmd-checkbox\"}),e.createElement(\"div\",{style:{flex:1}},e.createElement(\"code\",{className:\"cmd-code\"},m.addition),e.createElement(\"div\",{className:\"cmd-why\"},e.createElement(p,null,m.why))),e.createElement(M,{text:m.addition}))))}function J({qualitative:t}){const{improvements:l}=t;return l?e.createElement(e.Fragment,null,e.createElement(\"h2\",{id:\"section-features\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"Existing Qwen Code Features to Try\"),Array.isArray(l.Qwen_md_additions)&&l.Qwen_md_additions.length>0&&e.createElement(K,{additions:l.Qwen_md_additions}),e.createElement(\"p\",{className:\"text-xs text-slate-500 mb-3\"},\"Just copy this into Qwen Code and it'll set it up for you.\"),e.createElement(\"div\",{className:\"features-section\"},Array.isArray(l.features_to_try)&&l.features_to_try.map((n,r)=>e.createElement(\"div\",{key:r,className:\"feature-card\"},e.createElement(\"div\",{className:\"feature-title\"},n.feature),e.createElement(\"div\",{className:\"feature-oneliner\"},e.createElement(p,null,n.one_liner)),e.createElement(\"div\",{className:\"feature-why\"},e.createElement(\"strong\",null,\"Why for you:\"),\" \",e.createElement(p,null,n.why_for_you)),e.createElement(\"div\",{className:\"feature-examples\"},e.createElement(\"div\",{className:\"feature-example\"},e.createElement(\"div\",{className:\"example-code-row\"},e.createElement(\"code\",{className:\"example-code\"},n.example_code),e.createElement(M,{text:n.example_code}))))))),e.createElement(\"h2\",{id:\"section-patterns\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"New Ways to Use Qwen Code\"),e.createElement(\"p\",{className:\"text-xs text-slate-500 mb-3\"},\"Just copy this into Qwen Code and it'll walk you through it.\"),e.createElement(\"div\",{className:\"patterns-section\"},Array.isArray(l.usage_patterns)&&l.usage_patterns.map((n,r)=>e.createElement(\"div\",{key:r,className:\"pattern-card\"},e.createElement(\"div\",{className:\"pattern-title\"},n.title),e.createElement(\"div\",{className:\"pattern-summary\"},e.createElement(p,null,n.suggestion)),e.createElement(\"div\",{className:\"pattern-detail\"},e.createElement(p,null,n.detail)),e.createElement(\"div\",{className:\"copyable-prompt-section\"},e.createElement(\"div\",{className:\"prompt-label\"},\"Paste into Qwen Code:\"),e.createElement(\"div\",{className:\"copyable-prompt-row\"},e.createElement(\"code\",{className:\"copyable-prompt\"},n.copyable_prompt),e.createElement(M,{text:n.copyable_prompt}))))))):null}function X({qualitative:t}){const{futureOpportunities:l}=t;return l?e.createElement(e.Fragment,null,e.createElement(\"h2\",{id:\"section-horizon\",className:\"text-xl font-semibold text-slate-900 mt-8 mb-4\"},\"On the Horizon\"),l.intro&&e.createElement(\"p\",{className:\"section-intro\"},e.createElement(p,null,l.intro)),e.createElement(\"div\",{className:\"horizon-section\"},Array.isArray(l.opportunities)&&l.opportunities.map((n,r)=>e.createElement(\"div\",{key:r,className:\"horizon-card\"},e.createElement(\"div\",{className:\"horizon-title\"},n.title),e.createElement(\"div\",{className:\"horizon-possible\"},e.createElement(p,null,n.whats_possible)),e.createElement(\"div\",{className:\"horizon-tip\"},e.createElement(\"strong\",null,\"Getting started:\"),\" \",e.createElement(p,null,n.how_to_try)),e.createElement(\"div\",{className:\"pattern-prompt\"},e.createElement(\"div\",{className:\"prompt-label\"},\"Paste into Qwen Code:\"),e.createElement(\"div\",{style:{display:\"flex\",alignItems:\"flex-start\",gap:\"8px\"}},e.createElement(\"code\",{style:{flex:1}},n.copyable_prompt),e.createElement(M,{text:n.copyable_prompt}))))))):null}function V({qualitative:t}){const{memorableMoment:l}=t;return l?e.createElement(\"div\",{className:\"fun-ending\"},e.createElement(\"div\",{className:\"fun-headline\"},'\"',l.headline,'\"'),e.createElement(\"div\",{className:\"fun-detail\"},e.createElement(p,null,l.detail))):null}const Z={light:{background:\"linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%)\",textPrimary:\"#0f172a\",textSecondary:\"#475569\",textMuted:\"#64748b\",cardBackground:\"rgba(255,255,255,0.7)\",cardBackgroundSecondary:\"rgba(255,255,255,0.5)\",borderColor:\"#e2e8f0\",heatmapColors:[\"#9be9a8\",\"#40c463\",\"#30a14e\",\"#216e39\"],heatmapEmpty:\"#ebedf0\"},dark:{background:\"linear-gradient(135deg, #0f172a 0%, #1e293b 100%)\",textPrimary:\"#f8fafc\",textSecondary:\"#e2e8f0\",textMuted:\"#94a3b8\",cardBackground:\"rgba(255,255,255,0.05)\",cardBackgroundSecondary:\"rgba(255,255,255,0.04)\",borderColor:\"rgba(255,255,255,0.08)\",heatmapColors:[\"#0e4429\",\"#006d32\",\"#26a641\",\"#39d353\"],heatmapEmpty:\"#2d333b\"}};function R({data:t,theme:l=\"light\"}){var D,_,h,E,C,T;const n=Z[l],{totalMessages:r=0,totalSessions:o=0,totalLinesAdded:a=0,totalLinesRemoved:s=0,totalFiles:i=0,currentStreak:m=0,longestStreak:d=0,activeHours:c={}}=t,g=Object.keys(t.heatmap||{});let f=0,u=\"\";if(g.length>0){f=g.length;const y=g.map(w=>new Date(w).getTime()),v=new Date(Math.min(...y)),I=new Date(Math.max(...y)),b=w=>w.toISOString().split(\"T\")[0];u=`${b(v)} — ${b(I)}`}const x=(h=(_=(D=t.qualitative)==null?void 0:D.interactionStyle)==null?void 0:_.key_pattern)!=null?h:null,S=(T=(C=(E=t.qualitative)==null?void 0:E.memorableMoment)==null?void 0:C.headline)!=null?T:null,A=te(t.heatmap||{},n);return e.createElement(\"div\",{id:\"share-card\",style:{width:\"1200px\",background:n.background,color:n.textPrimary,fontFamily:'ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\"',display:\"flex\",flexDirection:\"column\",padding:\"48px 56px\",position:\"absolute\",left:\"-9999px\",top:\"-9999px\",overflow:\"hidden\",boxSizing:\"border-box\"}},e.createElement(\"div\",{style:{display:\"flex\",justifyContent:\"space-between\",alignItems:\"flex-start\",marginBottom:\"32px\"}},e.createElement(\"div\",null,e.createElement(\"div\",{style:{fontSize:\"32px\",fontWeight:700,letterSpacing:\"-0.02em\",lineHeight:1.2}},\"Qwen Code Insights\"),e.createElement(\"div\",{style:{fontSize:\"14px\",color:n.textMuted,marginTop:\"6px\"}},u)),e.createElement(\"div\",{style:{fontSize:\"11px\",color:n.textMuted,textTransform:\"uppercase\",letterSpacing:\"0.15em\",paddingTop:\"8px\"}},\"qwen.ai\")),e.createElement(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"repeat(6, 1fr)\",gap:\"16px\",marginBottom:\"32px\"}},e.createElement(k,{value:String(r),label:\"Messages\",theme:n}),e.createElement(k,{value:String(o),label:\"Sessions\",theme:n}),e.createElement(k,{value:`+${a}/-${s}`,label:\"Lines Changed\",small:!0,theme:n}),e.createElement(k,{value:String(i),label:\"Files\",theme:n}),e.createElement(k,{value:`${m}d`,label:\"Streak\",theme:n}),e.createElement(k,{value:`${d}d`,label:\"Best Streak\",theme:n})),e.createElement(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"1fr 1fr\",gap:\"24px\",marginBottom:\"16px\"}},e.createElement(\"div\",{style:{background:n.cardBackground,borderRadius:\"12px\",padding:\"20px\",display:\"flex\",flexDirection:\"column\"}},e.createElement(\"div\",{style:{fontSize:\"12px\",fontWeight:600,color:n.textMuted,textTransform:\"uppercase\",letterSpacing:\"0.08em\",marginBottom:\"12px\"}},\"Activity · \",f,\" active days\"),e.createElement(\"div\",{style:{flex:1,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"}},e.createElement(le,{cells:A})),e.createElement(re,{theme:n})),e.createElement(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:\"16px\"}},e.createElement(\"div\",{style:{background:n.cardBackground,borderRadius:\"12px\",padding:\"20px\",display:\"flex\",flexDirection:\"column\"}},e.createElement(\"div\",{style:{fontSize:\"12px\",fontWeight:600,color:n.textMuted,textTransform:\"uppercase\",letterSpacing:\"0.08em\",marginBottom:\"12px\"}},\"Active Hours\"),e.createElement(\"div\",{style:{flex:1,display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",gap:\"10px\"}},e.createElement(ee,{activeHours:c,theme:n}))),e.createElement(\"div\",{style:{background:n.cardBackgroundSecondary,borderRadius:\"12px\",padding:\"16px 16px\",position:\"relative\"}},e.createElement(\"div\",{style:{position:\"absolute\",left:\"12px\",fontSize:\"64px\",fontWeight:700,color:l===\"light\"?\"rgba(99,102,241,0.15)\":\"rgba(99,102,241,0.2)\",lineHeight:1,fontFamily:'Georgia, \"Times New Roman\", serif',userSelect:\"none\",pointerEvents:\"none\"}},\"“\"),e.createElement(\"div\",{style:{paddingLeft:\"40px\",position:\"relative\"}},x&&e.createElement(\"div\",{style:{fontSize:\"13px\",color:n.textSecondary,lineHeight:1.6,marginBottom:S?\"8px\":0}},x),S&&e.createElement(\"div\",{style:{fontSize:\"12px\",color:n.textMuted,lineHeight:1.5,fontStyle:\"italic\"}},S))))),e.createElement(\"div\",{style:{display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",marginTop:\"auto\",paddingTop:\"24px\",borderTop:`1px solid ${n.borderColor}`,flexShrink:0}},e.createElement(\"div\",{style:{fontSize:\"12px\",color:n.textMuted}},\"Generated by Qwen Code · \",new Date().toISOString().split(\"T\")[0]),e.createElement(\"div\",{style:{fontSize:\"12px\",color:n.textMuted}},\"github.com/QwenLM/qwen-code\")))}function k({value:t,label:l,small:n,theme:r}){return e.createElement(\"div\",{style:{textAlign:\"center\"}},e.createElement(\"div\",{style:{fontSize:n?\"18px\":\"28px\",fontWeight:700,color:r.textPrimary,lineHeight:1.2}},t),e.createElement(\"div\",{style:{fontSize:\"11px\",color:r.textMuted,textTransform:\"uppercase\",letterSpacing:\"0.05em\",marginTop:\"4px\"}},l))}function ee({activeHours:t,theme:l}){const r=[{label:\"Morning\",time:\"06–12\",hours:[6,7,8,9,10,11],color:\"#fbbf24\"},{label:\"Afternoon\",time:\"12–18\",hours:[12,13,14,15,16,17],color:\"#0ea5e9\"},{label:\"Evening\",time:\"18–22\",hours:[18,19,20,21],color:\"#6366f1\"},{label:\"Night\",time:\"22–06\",hours:[22,23,0,1,2,3,4,5],color:\"#475569\"}].map(a=>({...a,total:a.hours.reduce((s,i)=>s+(t[i]||0),0)})),o=Math.max(...r.map(a=>a.total),1);return e.createElement(e.Fragment,null,r.map(a=>{const s=o>0?a.total/o*100:0;return e.createElement(\"div\",{key:a.label},e.createElement(\"div\",{style:{display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",fontSize:\"12px\",marginBottom:\"4px\"}},e.createElement(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"6px\"}},e.createElement(\"span\",{style:{width:\"8px\",height:\"8px\",borderRadius:\"50%\",backgroundColor:a.color,display:\"inline-block\",flexShrink:0}}),e.createElement(\"span\",{style:{color:l.textSecondary,fontWeight:500}},a.label),e.createElement(\"span\",{style:{color:l.textMuted,fontSize:\"11px\"}},a.time)),e.createElement(\"span\",{style:{color:l.textMuted,fontWeight:600}},a.total)),e.createElement(\"div\",{style:{height:\"6px\",background:l.borderColor,borderRadius:\"3px\",overflow:\"hidden\"}},e.createElement(\"div\",{style:{width:`${s}%`,height:\"100%\",backgroundColor:a.color,borderRadius:\"3px\"}})))}))}function te(t,l){const n=new Date,o=26*7,a=new Date(n);a.setDate(a.getDate()-o+1),a.setDate(a.getDate()-a.getDay());const s=[],i=new Date(n);i.setDate(i.getDate()+(6-i.getDay()));const m=new Date(a);for(;m<=i;){const d=m.toISOString().split(\"T\")[0],c=t[d]||0;s.push({color:ne(c,l)}),m.setDate(m.getDate()+1)}return s}function ne(t,l){return t===0?l.heatmapEmpty:t<2?l.heatmapColors[0]:t<4?l.heatmapColors[1]:t<10?l.heatmapColors[2]:l.heatmapColors[3]}function le({cells:t}){const n=Math.ceil(t.length/7),r=14,o=3,a=n*(r+o),s=7*(r+o);return e.createElement(\"svg\",{width:a,height:s,viewBox:`0 0 ${a} ${s}`},t.map((i,m)=>{const d=Math.floor(m/7),c=m%7;return e.createElement(\"rect\",{key:m,x:d*(r+o),y:c*(r+o),width:r,height:r,rx:2,fill:i.color})}))}function re({theme:t}){return e.createElement(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"8px\",marginTop:\"12px\"}},e.createElement(\"span\",{style:{fontSize:\"11px\",color:t.textMuted}},\"Less\"),[t.heatmapEmpty,t.heatmapColors[0],t.heatmapColors[1],t.heatmapColors[2],t.heatmapColors[3]].map((l,n)=>e.createElement(\"span\",{key:n,style:{width:\"10px\",height:\"10px\",borderRadius:\"2px\",backgroundColor:l,display:\"inline-block\"}})),e.createElement(\"span\",{style:{fontSize:\"11px\",color:t.textMuted}},\"More\"))}function ae({data:t}){var m;const[l,n]=e.useState(\"dark\"),r=e.useRef(!1),o=async()=>{const d=document.getElementById(\"share-card\");if(!d||!window.html2canvas){alert(\"Export functionality is not available.\");return}try{const c=d.cloneNode(!0);c.style.position=\"fixed\",c.style.left=\"-9999px\",c.style.top=\"0\",c.style.pointerEvents=\"none\",document.body.appendChild(c);const g=await window.html2canvas(c,{scale:2,useCORS:!0,logging:!1,width:1200,height:c.scrollHeight});document.body.removeChild(c);const f=g.toDataURL(\"image/png\"),u=document.createElement(\"a\");u.href=f,u.download=`qwen-insights-card-${new Date().toISOString().slice(0,10)}.png`,u.click()}catch(c){console.error(\"Export card error:\",c),alert(\"Failed to export card. Please try again.\")}};e.useEffect(()=>{r.current&&(r.current=!1,o())},[l]);const a=d=>{d===l?o():(r.current=!0,n(d))};if(!t)return e.createElement(\"div\",{className:\"text-center text-slate-600\"},\"No insight data available\");const s=Object.keys(t.heatmap||{});let i=\"\";if(s.length>0){const c=s.map(x=>new Date(x)).map(x=>x.getTime()),g=new Date(Math.min(...c)),f=new Date(Math.max(...c)),u=x=>x.toISOString().split(\"T\")[0];i=`${u(g)} to ${u(f)}`}return e.createElement(\"div\",null,e.createElement(\"header\",{className:\"insights-header\"},e.createElement(\"div\",{className:\"header-content\"},e.createElement(\"div\",{className:\"header-title-section\"},e.createElement(\"h1\",{className:\"header-title\"},\"Qwen Code Insights\"),e.createElement(\"p\",{className:\"header-subtitle\"},t.totalMessages?`${t.totalMessages.toLocaleString()} messages across ${(m=t.totalSessions)==null?void 0:m.toLocaleString()} sessions`:\"Your personalized coding journey and patterns\",i&&` · ${i}`)),e.createElement(se,{onExport:a}))),t.qualitative&&e.createElement(e.Fragment,null,e.createElement(L,{qualitative:t.qualitative}),e.createElement($,null)),e.createElement(j,{data:t}),t.qualitative&&e.createElement(e.Fragment,null,e.createElement(Q,{qualitative:t.qualitative,topGoals:t.topGoals,topTools:t.topTools})),t.qualitative&&e.createElement(e.Fragment,null,e.createElement(P,{qualitative:t.qualitative,insights:t})),t.qualitative&&e.createElement(e.Fragment,null,e.createElement(G,{qualitative:t.qualitative,primarySuccess:t.primarySuccess,outcomes:t.outcomes}),e.createElement(U,{qualitative:t.qualitative,satisfaction:t.satisfaction,friction:t.friction}),e.createElement(J,{qualitative:t.qualitative}),e.createElement(X,{qualitative:t.qualitative}),e.createElement(V,{qualitative:t.qualitative})),e.createElement(R,{data:t,theme:l}))}function se({onExport:t}){const[l,n]=e.useState(!1),r=e.useRef(null);e.useEffect(()=>{if(!l)return;const a=s=>{r.current&&!r.current.contains(s.target)&&n(!1)};return document.addEventListener(\"mousedown\",a),()=>document.removeEventListener(\"mousedown\",a)},[l]);const o=a=>{n(!1),t(a)};return e.createElement(\"div\",{className:\"export-dropdown-wrapper\",ref:r},e.createElement(\"button\",{className:\"export-card-btn\",onClick:()=>n(!l)},e.createElement(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},e.createElement(\"path\",{d:\"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8\"}),e.createElement(\"polyline\",{points:\"16 6 12 2 8 6\"}),e.createElement(\"line\",{x1:\"12\",y1:\"2\",x2:\"12\",y2:\"15\"})),e.createElement(\"span\",null,\"Export Card\"),e.createElement(\"svg\",{width:\"12\",height:\"12\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",className:`export-chevron ${l?\"open\":\"\"}`},e.createElement(\"polyline\",{points:\"6 9 12 15 18 9\"}))),l&&e.createElement(\"div\",{className:\"export-dropdown\"},e.createElement(\"button\",{className:\"export-dropdown-item\",onClick:()=>o(\"light\")},e.createElement(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},e.createElement(\"circle\",{cx:\"12\",cy:\"12\",r:\"5\"}),e.createElement(\"line\",{x1:\"12\",y1:\"1\",x2:\"12\",y2:\"3\"}),e.createElement(\"line\",{x1:\"12\",y1:\"21\",x2:\"12\",y2:\"23\"}),e.createElement(\"line\",{x1:\"4.22\",y1:\"4.22\",x2:\"5.64\",y2:\"5.64\"}),e.createElement(\"line\",{x1:\"18.36\",y1:\"18.36\",x2:\"19.78\",y2:\"19.78\"}),e.createElement(\"line\",{x1:\"1\",y1:\"12\",x2:\"3\",y2:\"12\"}),e.createElement(\"line\",{x1:\"21\",y1:\"12\",x2:\"23\",y2:\"12\"}),e.createElement(\"line\",{x1:\"4.22\",y1:\"19.78\",x2:\"5.64\",y2:\"18.36\"}),e.createElement(\"line\",{x1:\"18.36\",y1:\"5.64\",x2:\"19.78\",y2:\"4.22\"})),e.createElement(\"span\",null,\"Light Theme\")),e.createElement(\"button\",{className:\"export-dropdown-item\",onClick:()=>o(\"dark\")},e.createElement(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},e.createElement(\"path\",{d:\"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z\"})),e.createElement(\"span\",null,\"Dark Theme\"))))}const W=document.getElementById(\"react-root\");W&&window.INSIGHT_DATA&&z?z.createRoot(W).render(e.createElement(ae,{data:window.INSIGHT_DATA})):console.error(\"Failed to mount React app:\",{container:!!W,data:!!window.INSIGHT_DATA,ReactDOM:!!z})})(React,ReactDOM);"; +export const INSIGHT_CSS = "*,:before,:after,::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #3b82f680;--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border:0 solid #e5e7eb}:before,:after{--tw-content: \"\"}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";line-height:1.5}body{line-height:inherit;margin:0;background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #f8fafc var(--tw-gradient-from-position);--tw-gradient-to: #f1f5f9 var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #fff var(--tw-gradient-via-position), var(--tw-gradient-to);--tw-text-opacity: 1;min-height:100vh;color:rgb(15 23 42 / var(--tw-text-opacity, 1));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glass-card{--tw-border-opacity: 1;border-width:1px;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1));--tw-shadow: 0 10px 40px #0f172a14;--tw-shadow-colored: 0 10px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background-color:#fff9;border-radius:1rem}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-56{height:14rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-full{width:100%}.min-w-\\[720px\\]{min-width:720px}.max-w-6xl{max-width:72rem}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-slate-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(226 232 240 / var(--tw-divide-opacity, 1))}.overflow-x-auto{overflow-x:auto}.rounded-full{border-radius:9999px}.rounded-xl{border-radius:1.25rem}.border{border-width:1px}.border-slate-100{--tw-border-opacity: 1;border-color:rgb(241 245 249 / var(--tw-border-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-white\\/70{background-color:#ffffff73}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-slate-50{--tw-gradient-from: #f8fafc var(--tw-gradient-from-position);--tw-gradient-to: #f8fafc00 var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-white{--tw-gradient-to: #ffffff00 var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #ffffff var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-slate-100{--tw-gradient-to: #f1f5f9 var(--tw-gradient-to-position)}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tracking-\\[0\\.2em\\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-rose-700{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 #0000000d;--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-soft{--tw-shadow: 0 10px 40px #0f172a14;--tw-shadow-colored: 0 10px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-slate-100{--tw-shadow-color: #f1f5f9;--tw-shadow: var(--tw-shadow-colored)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:-translate-y-\\[1px\\]:hover{--tw-translate-y: -1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-slate-400:focus-visible{outline-color:#94a3b8}.active\\:translate-y-\\[1px\\]:active{--tw-translate-y: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\\:translate-x-0\\.5{--tw-translate-x: .125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width: 768px){.md\\:mt-6{margin-top:1.5rem}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\\:gap-6{gap:1.5rem}.md\\:py-12{padding-top:3rem;padding-bottom:3rem}.md\\:text-4xl{font-size:2.25rem;line-height:2.5rem}}.heatmap-container{width:100%;overflow-x:auto}.heatmap-svg{min-width:720px}.heatmap-day{cursor:pointer}.heatmap-day:hover{stroke:#00000024;stroke-width:1px}.heatmap-legend{display:flex;align-items:center;gap:4px;font-size:12px;color:#64748b;margin-top:8px}.heatmap-legend-item{width:10px;height:10px;border-radius:2px}.nav-toc{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0 32px;padding:16px;background:#fff;border-radius:8px;border:1px solid #e2e8f0}.nav-toc a{font-size:12px;color:#64748b;text-decoration:none;padding:6px 12px;border-radius:6px;background:#f1f5f9;transition:all .15s}.nav-toc a:hover{background:#e2e8f0;color:#334155}.at-a-glance{background:linear-gradient(135deg,#fef3c7,#fde68a);border:1px solid #f59e0b;border-radius:12px;padding:20px 24px;margin-bottom:32px}.glance-title{font-size:16px;font-weight:700;color:#92400e;margin-bottom:16px}.glance-sections{display:flex;flex-direction:column;gap:12px}.glance-section{font-size:14px;color:#78350f;line-height:1.6}.glance-section strong{color:#92400e;font-weight:700}.see-more{color:#b45309;text-decoration:none;font-size:13px;white-space:nowrap;margin-left:4px}.see-more:hover{text-decoration:underline}.project-areas{display:flex;flex-direction:column;gap:12px;margin-bottom:32px}.project-area{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:16px}.area-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.area-name{font-weight:600;font-size:15px;color:#0f172a}.area-count{font-size:12px;color:#64748b;background:#f1f5f9;padding:2px 8px;border-radius:4px}.area-desc{font-size:14px;color:#475569;line-height:1.5}.narrative{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:20px;margin-bottom:24px}.narrative p{margin-top:0;margin-bottom:12px;font-size:14px;color:#475569;line-height:1.7}.key-insight{background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;padding:12px 16px;margin-top:12px;font-size:14px;color:#166534}.section-intro{font-size:14px;color:#64748b;margin-bottom:16px}.big-wins{display:flex;flex-direction:column;gap:12px;margin-bottom:24px}.big-win{background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;padding:16px}.big-win-title{font-weight:600;font-size:15px;color:#166534;margin-bottom:8px}.big-win-desc{font-size:14px;color:#15803d;line-height:1.5}.friction-categories{display:flex;flex-direction:column;gap:16px;margin-bottom:24px}.friction-category{background:#fef2f2;border:1px solid #fca5a5;border-radius:8px;padding:16px}.friction-title{font-weight:600;font-size:15px;color:#991b1b;margin-bottom:6px}.friction-desc{font-size:13px;color:#7f1d1d;margin-bottom:10px}.friction-examples{margin:0 0 0 10px;padding:0;font-size:13px;color:#334155;list-style-type:disc}.friction-examples li{margin-bottom:4px}.qwen-md-section{background:#eff6ff;border:1px solid #bfdbfe;border-radius:8px;padding:12px;margin-bottom:20px}.qwen-md-section h3{font-size:13px;font-weight:600;color:#1e40af;margin:0 0 8px}.qwen-md-actions{margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid #dbeafe}.copy-all-btn{background:#2563eb;color:#fff;border:none;border-radius:4px;padding:4px 10px;font-size:11px;cursor:pointer;font-weight:500;transition:all .2s}.copy-all-btn:hover{background:#1d4ed8}.copy-all-btn.copied{background:#16a34a}.qwen-md-item{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;padding:8px 0;border-bottom:1px solid #dbeafe}.qwen-md-item:last-child{border-bottom:none}.cmd-checkbox{margin-top:2px}.cmd-code{background:#fff;padding:6px 10px;border-radius:4px;font-size:11px;color:#1e40af;border:1px solid #bfdbfe;font-family:monospace;display:block;white-space:pre-wrap;word-break:break-word;flex:1}.cmd-why{font-size:11px;color:#64748b;width:100%;padding-left:20px;margin-top:4px}.features-section,.patterns-section{display:flex;flex-direction:column;gap:12px;margin:16px 0}.feature-card{background:#f0fdf4;border:1px solid #86efac;border-radius:8px;padding:16px}.pattern-card{background:#f0f9ff;border:1px solid #7dd3fc;border-radius:8px;padding:16px}.feature-title,.pattern-title{font-weight:600;font-size:15px;color:#0f172a;margin-bottom:6px}.feature-oneliner,.pattern-summary{font-size:14px;color:#475569;margin-bottom:8px}.feature-why,.pattern-detail{font-size:13px;color:#334155;line-height:1.5}.feature-examples{margin-top:12px}.feature-example{padding:8px 0;border-top:1px solid #d1fae5}.feature-example:first-child{border-top:none}.example-code-row,.copyable-prompt-row{display:flex;align-items:flex-start;gap:8px}.example-code{flex:1;background:#f1f5f9;padding:8px 12px;border-radius:4px;font-family:monospace;font-size:12px;color:#334155;overflow-x:auto;white-space:pre-wrap}.copyable-prompt-section{margin-top:12px;padding-top:12px;border-top:1px solid #e2e8f0}.copyable-prompt{flex:1;background:#f8fafc;padding:10px 12px;border-radius:4px;font-family:monospace;font-size:12px;color:#334155;border:1px solid #e2e8f0;white-space:pre-wrap;line-height:1.5}.prompt-label{font-size:11px;font-weight:600;text-transform:uppercase;color:#64748b;margin-bottom:6px}.copy-btn{background:#e2e8f0;border:none;border-radius:4px;padding:4px 8px;font-size:11px;cursor:pointer;color:#475569;flex-shrink:0;transition:all .2s}.copy-btn:hover{background:#cbd5e1}.horizon-section{display:flex;flex-direction:column;gap:16px}.horizon-card{background:linear-gradient(135deg,#faf5ff,#f5f3ff);border:1px solid #c4b5fd;border-radius:8px;padding:16px}.horizon-title{font-weight:600;font-size:15px;color:#5b21b6;margin-bottom:8px}.horizon-possible{font-size:14px;color:#334155;margin-bottom:10px;line-height:1.5}.horizon-tip{font-size:13px;color:#6b21a8;background:#fff9;padding:8px 12px;border-radius:4px}.pattern-prompt{background:#f8fafc;padding:12px;border-radius:6px;margin-top:12px;border:1px solid #e2e8f0;display:flex;flex-direction:column;gap:8px}.pattern-prompt code{font-family:monospace;font-size:12px;color:#334155;display:block;white-space:pre-wrap}.fun-ending{background:linear-gradient(135deg,#fef3c7,#fde68a);border:1px solid #fbbf24;border-radius:12px;padding:24px;margin-top:40px;text-align:center}.fun-headline{font-size:18px;font-weight:600;color:#78350f;margin-bottom:8px}.fun-detail{font-size:14px;color:#92400e}.stats-row{display:flex;gap:24px;margin-bottom:40px;padding:20px 0;border-top:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}.stat{text-align:center}.stat-value{font-size:24px;font-weight:700;color:#0f172a}.stat-label{font-size:11px;color:#64748b;text-transform:uppercase}@media (max-width: 640px){.stats-row{justify-content:center}}.header-with-action{position:relative}.insights-header{margin-bottom:2rem;padding:1.5rem 0;border-bottom:1px solid #e2e8f0}.header-content{display:flex;justify-content:space-between;align-items:center;gap:1.5rem;flex-wrap:wrap}.header-title-section{flex:1;min-width:0}.header-title{font-size:1.75rem;font-weight:700;color:#0f172a;letter-spacing:-.02em;margin:0 0 .375rem;line-height:1.2}.header-subtitle{font-size:.875rem;color:#64748b;margin:0;font-weight:400}.export-dropdown-wrapper{position:relative}.export-card-btn{display:inline-flex;align-items:center;gap:.5rem;height:36px;padding:0 .875rem;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#334155;font-size:.8125rem;font-weight:500;cursor:pointer;transition:all .15s ease}.export-card-btn:hover{background:#f8fafc;border-color:#cbd5e1}.export-card-btn:active{background:#f1f5f9}.export-chevron{transition:transform .15s ease;opacity:.5}.export-chevron.open{transform:rotate(180deg)}.export-dropdown{position:absolute;top:calc(100% + 4px);right:0;min-width:160px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 4px 16px #00000014;padding:4px;z-index:50}.export-dropdown-item{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .75rem;border:none;border-radius:6px;background:none;color:#334155;font-size:.8125rem;font-weight:400;cursor:pointer;transition:background .1s ease}.export-dropdown-item:hover{background:#f1f5f9}.export-dropdown-item:active{background:#e2e8f0}@media (max-width: 640px){.header-content{flex-direction:column;align-items:flex-start;gap:1rem}.header-title{font-size:1.5rem}}";