super-time-tracker-ui 0.1.30 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/standalone/next-output/BUILD_ID +1 -1
  2. package/dist/standalone/next-output/app-path-routes-manifest.json +1 -0
  3. package/dist/standalone/next-output/build-manifest.json +3 -3
  4. package/dist/standalone/next-output/routes-manifest.json +6 -0
  5. package/dist/standalone/next-output/server/app/_global-error.html +1 -1
  6. package/dist/standalone/next-output/server/app/_global-error.rsc +1 -1
  7. package/dist/standalone/next-output/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/dist/standalone/next-output/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/dist/standalone/next-output/server/app/_global-error.segments/_head.segment.rsc +1 -1
  10. package/dist/standalone/next-output/server/app/_global-error.segments/_index.segment.rsc +1 -1
  11. package/dist/standalone/next-output/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/dist/standalone/next-output/server/app/_not-found/page.js.nft.json +1 -1
  13. package/dist/standalone/next-output/server/app/_not-found/page_client-reference-manifest.js +1 -1
  14. package/dist/standalone/next-output/server/app/login/page.js.nft.json +1 -1
  15. package/dist/standalone/next-output/server/app/login/page_client-reference-manifest.js +1 -1
  16. package/dist/standalone/next-output/server/app/offline/page.js.nft.json +1 -1
  17. package/dist/standalone/next-output/server/app/offline/page_client-reference-manifest.js +1 -1
  18. package/dist/standalone/next-output/server/app/page.js.nft.json +1 -1
  19. package/dist/standalone/next-output/server/app/page_client-reference-manifest.js +1 -1
  20. package/dist/standalone/next-output/server/app/pomodoro/page.js.nft.json +1 -1
  21. package/dist/standalone/next-output/server/app/pomodoro/page_client-reference-manifest.js +1 -1
  22. package/dist/standalone/next-output/server/app/register/page.js.nft.json +1 -1
  23. package/dist/standalone/next-output/server/app/register/page_client-reference-manifest.js +1 -1
  24. package/dist/standalone/next-output/server/app/reporting/page.js.nft.json +1 -1
  25. package/dist/standalone/next-output/server/app/reporting/page_client-reference-manifest.js +1 -1
  26. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js.nft.json +1 -1
  27. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page_client-reference-manifest.js +1 -1
  28. package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js.nft.json +1 -1
  29. package/dist/standalone/next-output/server/app/settings/cloud-sync/page_client-reference-manifest.js +1 -1
  30. package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
  31. package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
  32. package/dist/standalone/next-output/server/app/settings/display/page.js.nft.json +1 -1
  33. package/dist/standalone/next-output/server/app/settings/display/page_client-reference-manifest.js +1 -1
  34. package/dist/standalone/next-output/server/app/settings/goals/page.js.nft.json +1 -1
  35. package/dist/standalone/next-output/server/app/settings/goals/page_client-reference-manifest.js +1 -1
  36. package/dist/standalone/next-output/server/app/settings/notifications/page.js.nft.json +1 -1
  37. package/dist/standalone/next-output/server/app/settings/notifications/page_client-reference-manifest.js +1 -1
  38. package/dist/standalone/next-output/server/app/settings/page.js.nft.json +1 -1
  39. package/dist/standalone/next-output/server/app/settings/page_client-reference-manifest.js +1 -1
  40. package/dist/standalone/next-output/server/app/settings/pomodoro/page.js.nft.json +1 -1
  41. package/dist/standalone/next-output/server/app/settings/pomodoro/page_client-reference-manifest.js +1 -1
  42. package/dist/standalone/next-output/server/app/settings/quick-actions/page/app-paths-manifest.json +3 -0
  43. package/dist/standalone/next-output/server/app/settings/quick-actions/page/build-manifest.json +17 -0
  44. package/dist/standalone/next-output/server/app/settings/quick-actions/page/next-font-manifest.json +11 -0
  45. package/dist/standalone/next-output/server/app/settings/quick-actions/page/react-loadable-manifest.json +1 -0
  46. package/dist/standalone/next-output/server/app/settings/quick-actions/page/server-reference-manifest.json +4 -0
  47. package/dist/standalone/next-output/server/app/settings/quick-actions/page.js +16 -0
  48. package/dist/standalone/next-output/server/app/settings/quick-actions/page.js.nft.json +1 -0
  49. package/dist/standalone/next-output/server/app/settings/quick-actions/page_client-reference-manifest.js +3 -0
  50. package/dist/standalone/next-output/server/app/settings/tags/page.js.nft.json +1 -1
  51. package/dist/standalone/next-output/server/app/settings/tags/page_client-reference-manifest.js +1 -1
  52. package/dist/standalone/next-output/server/app/sheets/page.js.nft.json +1 -1
  53. package/dist/standalone/next-output/server/app/sheets/page_client-reference-manifest.js +1 -1
  54. package/dist/standalone/next-output/server/app/today/page.js.nft.json +1 -1
  55. package/dist/standalone/next-output/server/app/today/page_client-reference-manifest.js +1 -1
  56. package/dist/standalone/next-output/server/app-paths-manifest.json +1 -0
  57. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0.ztg_g._.js +1 -1
  58. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0a7wn1j._.js +1 -1
  59. package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0r4hd.l.js +4 -0
  60. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0bowsf1._.js +1 -1
  61. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0k~hq1g._.js +1 -1
  62. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0oqgod_._.js +3 -0
  63. package/dist/standalone/next-output/server/chunks/ssr/_002dssm._.js +1 -1
  64. package/dist/standalone/next-output/server/chunks/ssr/_00ic3j9._.js +3 -0
  65. package/dist/standalone/next-output/server/chunks/ssr/_00x~ete._.js +1 -1
  66. package/dist/standalone/next-output/server/chunks/ssr/_07p~0bg._.js +3 -0
  67. package/dist/standalone/next-output/server/chunks/ssr/{_10n~~xo._.js → _088~qfj._.js} +3 -3
  68. package/dist/standalone/next-output/server/chunks/ssr/_08qe8j9._.js +3 -0
  69. package/dist/standalone/next-output/server/chunks/ssr/_0agxxbf._.js +1 -1
  70. package/dist/standalone/next-output/server/chunks/ssr/_0c0txs~._.js +1 -1
  71. package/dist/standalone/next-output/server/chunks/ssr/_0cxg26n._.js +3 -0
  72. package/dist/standalone/next-output/server/chunks/ssr/_0l6-7m4._.js +1 -1
  73. package/dist/standalone/next-output/server/chunks/ssr/_0m.iebm._.js +3 -0
  74. package/dist/standalone/next-output/server/chunks/ssr/_0nnp~ae._.js +3 -0
  75. package/dist/standalone/next-output/server/chunks/ssr/_0q~8_bm._.js +3 -0
  76. package/dist/standalone/next-output/server/chunks/ssr/_0v9kigy._.js +3 -0
  77. package/dist/standalone/next-output/server/chunks/ssr/_0y3ypyx._.js +1 -1
  78. package/dist/standalone/next-output/server/chunks/ssr/_13crob-._.js +1 -1
  79. package/dist/standalone/next-output/server/chunks/ssr/_13y76jr._.js +1 -1
  80. package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_settings_quick-actions_page_actions_031bu28.js +3 -0
  81. package/dist/standalone/next-output/server/chunks/ssr/components_tracker-app_tsx_0qs9.7y._.js +1 -1
  82. package/dist/standalone/next-output/server/middleware-build-manifest.js +3 -3
  83. package/dist/standalone/next-output/server/middleware-manifest.json +1 -1
  84. package/dist/standalone/next-output/server/next-font-manifest.js +1 -1
  85. package/dist/standalone/next-output/server/next-font-manifest.json +4 -0
  86. package/dist/standalone/next-output/server/pages/500.html +1 -1
  87. package/dist/standalone/next-output/static/chunks/0.4obx1-sv46-.js +1 -0
  88. package/dist/standalone/next-output/static/chunks/029pvmqxn_t4z.js +1 -0
  89. package/dist/standalone/next-output/static/chunks/04~.lbegcwd41.js +1 -0
  90. package/dist/standalone/next-output/static/chunks/05tg.ske01w0a.js +1 -0
  91. package/dist/standalone/next-output/static/chunks/06xf_oh5oqbs2.js +1 -0
  92. package/dist/standalone/next-output/static/chunks/09acxdggb87~w.js +1 -0
  93. package/dist/standalone/next-output/static/chunks/09tjbwcc~3p_e.js +1 -0
  94. package/dist/standalone/next-output/static/chunks/0crn_fc6.6569.js +1 -0
  95. package/dist/standalone/next-output/static/chunks/0fkr5kz7p1r5l.js +1 -0
  96. package/dist/standalone/next-output/static/chunks/0lhj2p9.4g20~.js +1 -0
  97. package/dist/standalone/next-output/static/chunks/0o4zvrm3q.9k3.js +1 -0
  98. package/dist/standalone/next-output/static/chunks/0pqilbd~jphqs.css +3 -0
  99. package/dist/standalone/next-output/static/chunks/0q05k1wfzh4_a.js +1 -0
  100. package/dist/standalone/next-output/static/chunks/0vov8ngx9~8m2.js +1 -0
  101. package/dist/standalone/next-output/static/chunks/0watkjb-fw0vn.js +1 -0
  102. package/dist/standalone/next-output/static/chunks/{0znvz4n7decra.js → 0x9s1xcq69ppx.js} +5 -5
  103. package/dist/standalone/next-output/static/chunks/0xj4dodycy1oc.js +1 -0
  104. package/dist/standalone/next-output/static/chunks/12eaief5vtso9.js +1 -0
  105. package/dist/standalone/next-output/static/chunks/13-nw2q_c_9mk.js +1 -0
  106. package/dist/standalone/next-output/static/chunks/14jtaz5s.4ih1.js +1 -0
  107. package/dist/standalone/package.json +1 -1
  108. package/package.json +1 -1
  109. package/dist/standalone/next-output/server/chunks/ssr/_0-hc~ba._.js +0 -3
  110. package/dist/standalone/next-output/server/chunks/ssr/_00_8gfw._.js +0 -3
  111. package/dist/standalone/next-output/server/chunks/ssr/_059wg4v._.js +0 -3
  112. package/dist/standalone/next-output/server/chunks/ssr/_08dnxqq._.js +0 -3
  113. package/dist/standalone/next-output/server/chunks/ssr/_0hs4c5u._.js +0 -3
  114. package/dist/standalone/next-output/server/chunks/ssr/_0nz4ym1._.js +0 -3
  115. package/dist/standalone/next-output/server/chunks/ssr/_0wg9~zr._.js +0 -3
  116. package/dist/standalone/next-output/static/chunks/00rjs5ywh4_np.css +0 -3
  117. package/dist/standalone/next-output/static/chunks/03d24rbiv.lx7.js +0 -1
  118. package/dist/standalone/next-output/static/chunks/03flgrd7bw9r5.js +0 -1
  119. package/dist/standalone/next-output/static/chunks/041fttxys-zjw.js +0 -1
  120. package/dist/standalone/next-output/static/chunks/055~9w5b9lao5.js +0 -1
  121. package/dist/standalone/next-output/static/chunks/09mbpw08eiqwx.js +0 -1
  122. package/dist/standalone/next-output/static/chunks/0bw3uow4-~3fr.js +0 -1
  123. package/dist/standalone/next-output/static/chunks/0d2d-s..s8cfz.js +0 -1
  124. package/dist/standalone/next-output/static/chunks/0h72~3~6gq3fn.js +0 -1
  125. package/dist/standalone/next-output/static/chunks/0hhu330gm_fnl.js +0 -1
  126. package/dist/standalone/next-output/static/chunks/0ls_5qyf15z5_.js +0 -1
  127. package/dist/standalone/next-output/static/chunks/0n0.21h11yrv2.js +0 -1
  128. package/dist/standalone/next-output/static/chunks/0n2~cs.u7bygu.js +0 -1
  129. package/dist/standalone/next-output/static/chunks/0sywv5h95uodq.js +0 -1
  130. package/dist/standalone/next-output/static/chunks/0xccil3r~k_7n.js +0 -1
  131. package/dist/standalone/next-output/static/chunks/0~z41.7~3tpw3.js +0 -1
  132. package/dist/standalone/next-output/static/chunks/14oa3e0hktvxi.js +0 -1
  133. package/dist/standalone/next-output/static/chunks/15ixzo9s2kj_o.js +0 -1
  134. /package/dist/standalone/next-output/static/{Ohbr2ePvonj7GxdJPkXBY → gS32e4Tv_70ot1IWBJddE}/_buildManifest.js +0 -0
  135. /package/dist/standalone/next-output/static/{Ohbr2ePvonj7GxdJPkXBY → gS32e4Tv_70ot1IWBJddE}/_clientMiddlewareManifest.js +0 -0
  136. /package/dist/standalone/next-output/static/{Ohbr2ePvonj7GxdJPkXBY → gS32e4Tv_70ot1IWBJddE}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let a=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:e=>e.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:e=>e.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:e=>e.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:e=>e.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,n.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:a.map(n=>{let a=n.match(e);return(0,t.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,t.jsx)(r.default,{href:n.href,"aria-current":a?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},39474,20993,e=>{"use strict";var t=e.i(13349),r=e.i(32417),n=e.i(44171),a=e.i(28274);let s=null,l=Promise.resolve();function i(){(0,r.is_supabase_configured)()&&(0,n.is_cloud_sync_enabled)()&&(null!==s&&clearTimeout(s),s=setTimeout(()=>{s=null,l=l.then(()=>(0,a.run_tracker_db_cloud_sync)()).catch(()=>{})},400))}function o(){(0,t.is_greedy_cloud_sync_enabled)()&&i()}e.s(["schedule_tracker_db_cloud_sync",0,o],20993),e.s(["push_tracker_db_cloud_after_change",0,function(){(0,t.is_greedy_cloud_sync_enabled)()?o():i()}],39474)},77352,e=>{"use strict";var t=e.i(54710),r=e.i(42800),n=e.i(75404);e.s(["SettingsPageLayout",0,function({breadcrumb:e,title:a,description:s,children:l}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.TrackerTopbar,{breadcrumb:e}),(0,t.jsxs)("main",{className:"mx-auto grid w-full max-w-[1120px] grid-cols-[minmax(12rem,16rem)_minmax(0,1fr)] gap-4 px-4 pb-10 pt-5 sm:gap-6 sm:px-5 sm:pt-6 max-[860px]:grid-cols-1",children:[(0,t.jsxs)("aside",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Settings"}),(0,t.jsx)(r.SettingsNav,{})]}),(0,t.jsxs)("section",{className:"flex min-w-0 flex-col gap-4",children:[(0,t.jsxs)("header",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h1",{className:"m-0 text-[1.35rem] font-[650] tracking-tight",children:a}),void 0!==s?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:s}):null]}),l]})]})]})}])},42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return u},urlObjectKeys:function(){return o}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let s=e.r(44066)._(e.r(78677)),l=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",i=e.hash||"",o=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),o&&"object"==typeof o&&(o=String(s.urlQueryToSearchParams(o)));let c=e.search||o&&`?${o}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${i}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(29158);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=s(e,n)),t&&(a.current=s(t,n))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return s}});let n=e.r(31047),a=e.r(63334);function s(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return b},useLinkStatus:function(){return _}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let s=e.r(44066),l=e.r(54710),i=s._(e.r(29158)),o=e.r(42552),u=e.r(61717),c=e.r(37879),d=e.r(31047),m=e.r(20321);e.r(90503);let f=e.r(38520),h=e.r(19947),p=e.r(59246),g=e.r(99046);function b(t){var r,n;let a,s,b,[_,y]=(0,i.useOptimistic)(h.IDLE_LINK_STATUS),v=(0,i.useRef)(null),{href:j,as:w,children:k,prefetch:N=null,passHref:S,replace:T,shallow:C,scroll:E,onClick:L,onMouseEnter:P,onTouchStart:O,legacyBehavior:$=!1,onNavigate:R,transitionTypes:A,ref:M,unstable_dynamicOnHover:D,...U}=t;a=k,$&&("string"==typeof a||"number"==typeof a)&&(a=(0,l.jsx)("a",{children:a}));let I=i.default.useContext(u.AppRouterContext),W=!1!==N,q=!1!==N?null===(n=N)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(r=w||j)?r:(0,o.formatUrl)(r);if($){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=i.default.Children.only(a)}let K=$?s&&"object"==typeof s&&s.ref:M,z=i.default.useCallback(e=>(null!==I&&(v.current=(0,h.mountLinkInstance)(e,B,I,q,W,y)),()=>{v.current&&((0,h.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,h.unmountPrefetchableInstance)(e)}),[W,B,I,q,y]),F={ref:(0,c.useMergedRef)(z,K),onClick(t){$||"function"!=typeof L||L(t),$&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!I||t.defaultPrevented||function(t,r,n,a,s,l,o){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);i.default.startTransition(()=>{d(r,a?"replace":"push",!1===s?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,o)})}}(t,B,v,T,E,R,A)},onMouseEnter(e){$||"function"!=typeof P||P(e),$&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),I&&W&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){$||"function"!=typeof O||O(e),$&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),I&&W&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(B)?F.href=B:$&&!S&&("a"!==s.type||"href"in s.props)||(F.href=(0,m.addBasePath)(B)),b=$?i.default.cloneElement(s,F):(0,l.jsx)("a",{...U,...F,children:a}),(0,l.jsx)(x.Provider,{value:_,children:b})}e.r(10364);let x=(0,i.createContext)(h.IDLE_LINK_STATUS),_=()=>(0,i.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),a=e.i(32417),s=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[l,i]=(0,r.useState)(null),[o,u]=(0,r.useState)(!1),c=(0,a.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!c)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{i(e?.user.email??null)}).catch(()=>{i(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{i(t?.user.email??null)});return()=>{t.unsubscribe()}},[c]),{is_configured:c,email:l,is_pending:o,sign_out:(0,r.useCallback)(async()=>{u(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,s.notify_settings_saved)("Signed out"),e.refresh()}finally{u(!1)}},[e])}}])},45200,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let a=[{href:"/",label:"Tracker",match:e=>"/"===e}];function s(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,n.usePathname)()??"/";return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:a.map(n=>{let a=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":a?"page":void 0,children:n.label},n.href)})})}],45200);var l=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,l.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(s,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},73205,2268,76003,38240,e=>{"use strict";let t=new Set(e.i(22373).topbar_quick_action_ids),r=["today","reporting","pomodoro"];e.s(["parse_topbar_quick_actions",0,function(e){try{let n=JSON.parse(e);if(!Array.isArray(n))return r;let a=n.filter(e=>"string"==typeof e&&t.has(e));return Array.from(new Set(a))}catch{return r}}],73205);var n=e.i(34869),a=e.i(92629);let s=(0,n.create_ui_preference_store)({storage_key:a.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:a.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function l(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,s],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return l()}],76003);var i=e.i(17798),o=e.i(46549),u=e.i(10464),c=e.i(35434),d=e.i(61834),m=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===l()?"light":"dark";(0,i.apply_theme)(e),(0,m.write_stored_theme)(e),u.theme_mode_preference.write(e),(0,d.write_document_preference_cookies)({theme_mode:e,theme:e}),u.theme_mode_preference.notify(),(0,c.notify_theme_subscribers)(),(0,o.notify_settings_saved)()}],38240)},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,n=!0){let a=(0,t.useRef)(e);a.current=e,(0,t.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),a.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n])}])},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),a=e.i(29158),s=e.i(37399),l=e.i(90463),i=e.i(46549),o=e.i(73205),u=e.i(66295),c=e.i(2268),d=e.i(32792),m=e.i(90299),f=e.i(28274),h=e.i(76003),p=e.i(35434),g=e.i(38240),b=e.i(22373),x=e.i(25204),_=e.i(77882);let y="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",v={today:{href:"/today",label:"Today"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},j=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,n.useRouter)(),w=(0,n.usePathname)()??"/",k=(0,a.useSyncExternalStore)(p.subscribe_theme,h.get_theme_snapshot,h.get_theme_server_snapshot),N=(0,a.useSyncExternalStore)(c.cloud_sync_enabled_preference.subscribe,c.cloud_sync_enabled_preference.get_snapshot,c.cloud_sync_enabled_preference.get_server_snapshot),S=(0,a.useSyncExternalStore)(m.tracker_shortcut_map_preference.subscribe,m.tracker_shortcut_map_preference.get_snapshot,m.tracker_shortcut_map_preference.get_server_snapshot),T=(0,a.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),C=(0,u.parse_tracker_shortcut_map)(S),E=new Set((0,o.parse_topbar_quick_actions)(T)),L=b.topbar_quick_action_ids.filter(e=>!E.has(e)),P=Array.from(new Set([...Array.from(j),...L])),{email:O,is_configured:$,is_pending:R,sign_out:A}=(0,_.use_supabase_auth_session)(),[M,D]=(0,a.useState)(!1),U=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!M)return;let e=e=>{null===U.current||U.current.contains(e.target)||D(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[M]);let I=()=>{D(!1)};return(0,x.use_escape_to_cancel)(I,M),(0,t.jsxs)("div",{className:"relative shrink-0",ref:U,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":M,"aria-haspopup":"menu",onClick:()=>D(e=>!e),children:(0,t.jsx)(s.HamburgerIcon,{})}),M?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[$&&null!==O?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:O,children:O})}):null,P.map(e=>{let n=v[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:y,role:"menuitem",onClick:I,children:n.label})},e)}),$?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitemcheckbox","aria-checked":"true"===N,onClick:()=>{let e="true"===N?"false":"true";c.cloud_sync_enabled_preference.write(e),c.cloud_sync_enabled_preference.notify(),(0,i.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==O&&(0,f.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===N?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===N?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{I(),(0,g.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===k?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===k?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{let e;I(),e=C.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),$?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===O?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{I(),e.push((0,l.build_auth_page_href)("sign_in",w))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${y} text-danger`,role:"menuitem",disabled:R,onClick:()=>{I(),A()},children:R?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let w=[{id:"today",href:"/today",label:"Today"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,n.usePathname)()??"/",s=(0,a.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),l=(0,a.useMemo)(()=>(0,o.parse_topbar_quick_actions)(s),[s]);if(0===l.length)return null;let i=w.filter(e=>l.includes(e.id));return 0===i.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:i.map(n=>{let a=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":a?"page":void 0,children:n.label},n.id)})})}],76080)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),n=e.i(648),a=e.i(1976),s=e.i(76080),l=e.i(45958),i=e.i(71060),o=e.i(29539);function u(){let e=((0,i.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(l.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(o.SettingsIcon,{})})}function c({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(l.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(l.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(c,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(s.TopbarQuickActions,{}),(0,t.jsx)(n.TopbarCloudStatus,{}),(0,t.jsx)(u,{}),(0,t.jsx)(a.TopbarOverflowMenu,{})]})]})]})})}],75404)},52405,e=>{"use strict";e.s(["get_input_class_name",0,function(e="default"){let t="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===e?`${t} px-2.5 py-2`:t}])},31113,e=>{"use strict";e.s(["normalize_stored_tag",0,function(e){let t=e.trim().replace(/^@+/,"");if(0===t.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(t))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${t}`}])},18774,e=>{"use strict";e.s(["format_display_tag",0,function(e){return e.startsWith("@")?e:`@${e}`}])},14260,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(18774),a=e.i(52405),s=e.i(31113);e.s(["TagAutocompleteInput",0,function({id:e,value:l,known_tags:i,placeholder:o,disabled:u=!1,autoFocus:c=!1,on_change:d}){let m=(0,r.useRef)(null),f=(0,r.useRef)(null),h=(0,r.useRef)(null),[p,g]=(0,r.useState)(0),[b,x]=(0,r.useState)(0),_=function(e,t){let r=e.slice(0,t),n=r.lastIndexOf("@");if(-1===n)return null;let a=r.slice(n+1);return/\s/.test(a)?null:{query:a,start_index:n,end_index:t}}(l,p),y=null===_?[]:function(e,t,r=10){let n=t.toLowerCase();return e.filter(e=>{let t=e.replace(/^@/,"").toLowerCase();return 0===n.length||t.startsWith(n)}).slice(0,r)}(i,_.query),v=null!==_&&function(e,t){if(!/^\w+$/.test(e))return!1;let r=e.toLowerCase();return t.some(e=>{try{return(0,s.normalize_stored_tag)(e).slice(1).toLowerCase()===r}catch{return!1}})}(_.query,i),j=null!==_&&y.length>0&&!v&&!u;(0,r.useLayoutEffect)(()=>{null!==h.current&&null!==m.current&&(m.current.setSelectionRange(h.current,h.current),g(h.current),h.current=null)},[l]),(0,r.useEffect)(()=>{x(0)},[l,p,y.length]);let w=()=>{g(m.current?.selectionStart??l.length)},k=()=>{x(0)},N=e=>{let t,r,a;if(null===_)return;let{next_text:s,next_cursor:i}=(t=(0,n.format_display_tag)(e),r=l.slice(0,_.start_index),a=l.slice(_.end_index),{next_text:`${r}${t}${a}`,next_cursor:r.length+t.length});h.current=i,d(s),k()};return(0,t.jsxs)("div",{className:"relative min-w-0",children:[(0,t.jsx)("input",{ref:m,id:e,type:"text",className:(0,a.get_input_class_name)(),value:l,placeholder:o,disabled:u,autoFocus:c,autoComplete:"off","aria-autocomplete":"list","aria-expanded":j,"aria-controls":j?`${e}-tag-suggestions`:void 0,onChange:e=>{d(e.target.value),g(e.target.selectionStart??e.target.value.length)},onClick:w,onKeyUp:w,onKeyDown:e=>{if(j){if("ArrowDown"===e.key){e.preventDefault(),x(e=>(e+1)%y.length);return}if("ArrowUp"===e.key){e.preventDefault(),x(e=>(e-1+y.length)%y.length);return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault();let t=y[b];void 0!==t&&N(t);return}"Escape"===e.key&&(e.preventDefault(),k())}},onBlur:()=>{window.setTimeout(k,120)}}),j?(0,t.jsx)("ul",{ref:f,id:`${e}-tag-suggestions`,role:"listbox",className:"absolute left-0 right-0 top-full z-20 mt-1 max-h-48 list-none overflow-y-auto rounded-md border border-panel-border bg-panel p-1.5 shadow-md",children:y.map((e,r)=>(0,t.jsx)("li",{role:"option","aria-selected":r===b,children:(0,t.jsx)("button",{type:"button",className:`block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover ${r===b?"bg-surface-hover":""}`,onMouseDown:t=>{t.preventDefault(),N(e)},children:(0,n.format_display_tag)(e)})},e))}):null]})}],14260)},2286,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(14974),a=e.i(77352),s=e.i(14260),l=e.i(18774),i=e.i(52663),o=e.i(52405);function u(e,t,r){let n=e.map(e=>(0,l.format_display_tag)(e)).join(", "),a=(0,l.format_display_tag)(t),s=1===r?"1 entry will be updated.":`${r} entries will be updated.`;return{title:"Merge tags?",message:`Merge ${n} into ${a}? ${s}`,confirmLabel:"Merge tags",variant:"danger"}}var c=e.i(39474);e.s(["TagManagementView",0,function({initial_tags:e}){let{confirm:d}=(0,n.use_confirm_dialog)(),[m,f]=(0,r.useState)(e),[h,p]=(0,r.useState)(()=>new Set),[g,b]=(0,r.useState)({}),[x,_]=(0,r.useState)(""),[y,v]=(0,r.useState)(null),[j,w]=(0,r.useState)(null),[k,N]=(0,r.useState)(!1),S=(0,r.useMemo)(()=>m.map(e=>e.name),[m]),T=m.filter(e=>h.has(e.name)).reduce((e,t)=>e+t.entryCount,0),C=async e=>{let t=await fetch("/api/tags",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json()).error??"Tag update failed");let r=await t.json();f(r.tags),p(new Set),w(1===r.entries_updated?"Updated 1 entry.":`Updated ${r.entries_updated} entries.`),(0,c.push_tracker_db_cloud_after_change)()},E=async e=>{let t=g[e]?.trim()??"";if(0===t.length)return void v("Enter a new tag name.");let r=m.find(t=>t.name===e);if(void 0===r)return;let n=m.find(e=>(0,l.format_display_tag)(e.name)===(0,l.format_display_tag)(t)),a=void 0!==n&&n.name!==e?r.entryCount+n.entryCount:r.entryCount;if(await d(u([e],t,a))){N(!0),v(null),w(null);try{await C({action:"rename",fromTag:e,toTag:t}),b(t=>{let r={...t};return delete r[e],r})}catch(e){v(e instanceof Error?e.message:String(e))}finally{N(!1)}}},L=async()=>{let e=[...h];if(e.length<2)return void v("Select at least two tags to merge.");if(0===x.trim().length)return void v("Enter a target tag for the merge.");if(await d(u(e,x,T))){N(!0),v(null),w(null);try{await C({action:"merge",sourceTags:e,targetTag:x}),_("")}catch(e){v(e instanceof Error?e.message:String(e))}finally{N(!1)}}};return(0,t.jsxs)(a.SettingsPageLayout,{breadcrumb:{current:"Tag management",parent:{label:"Settings",href:"/settings"}},title:"Tag management",description:"Rename or merge tags across every entry in your database.",children:[(0,t.jsxs)("section",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Merge tags"}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[0.8rem] leading-snug text-muted",children:"Select two or more tags below, then choose the tag they should become."}),(0,t.jsxs)("label",{className:"mt-3 flex flex-col gap-1 text-[0.82rem] text-muted",children:["Target tag",(0,t.jsx)(s.TagAutocompleteInput,{id:"merge-target-tag",value:x,known_tags:S,placeholder:"e.g. @project",disabled:k,on_change:_})]}),(0,t.jsxs)("button",{type:"button",className:`${(0,i.get_button_class_name)("primary","small")} mt-3`,disabled:k||h.size<2,onClick:()=>void L(),children:["Merge ",h.size," tags"]})]}),0===m.length?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"No tags yet. Add @tags when you check in to an entry."}):(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0","aria-label":"Tags",children:m.map(e=>(0,t.jsx)("li",{className:"rounded-md border border-panel-border bg-panel px-3.5 py-2.5 shadow-sm",children:(0,t.jsxs)("form",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",onSubmit:t=>{t.preventDefault(),E(e.name)},children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:h.has(e.name),disabled:k,"aria-label":`Select ${(0,l.format_display_tag)(e.name)}`,onChange:()=>{var t;return t=e.name,void p(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r})}}),(0,t.jsxs)("div",{className:"flex min-w-0 shrink-0 flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[(0,t.jsx)("span",{className:"font-semibold leading-tight",children:(0,l.format_display_tag)(e.name)}),(0,t.jsxs)("span",{className:"text-[0.82rem] text-muted",children:[e.entryCount," ",1===e.entryCount?"entry":"entries"]})]}),(0,t.jsxs)("div",{className:"ml-auto flex min-w-[min(100%,14rem)] flex-1 basis-56 items-center justify-end gap-2 sm:max-w-xs",children:[(0,t.jsx)("input",{className:(0,o.get_input_class_name)("compact"),value:g[e.name]??"",placeholder:"Rename to…","aria-label":`Rename ${(0,l.format_display_tag)(e.name)}`,disabled:k,onChange:t=>b(r=>({...r,[e.name]:t.target.value}))}),(0,t.jsx)("button",{type:"submit",className:`${(0,i.get_button_class_name)("ghost","small")} shrink-0`,disabled:k||(g[e.name]?.trim().length??0)===0,children:"Rename"})]})]})},e.name))}),null!==j?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-accent",children:j}):null,null!==y?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-danger",children:y}):null]})}],2286)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let a=e.r(44066)._(e.r(78677)),l=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,s=e.protocol||"",n=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(a.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return s&&!s.endsWith(":")&&(s+=":"),e.slashes||(!s||l.test(s))&&!1!==c?(c="//"+(c||""),n&&"/"!==n[0]&&(n="/"+n)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),n=n.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${s}${c}${n}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let s=e.r(29158);function n(e,t){let r=(0,s.useRef)(null),n=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=a(e,s)),t&&(n.current=a(t,s))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let s=e.r(31047),n=e.r(63334);function a(e){if(!(0,s.isAbsoluteUrl)(e))return!0;try{let t=(0,s.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return g},useLinkStatus:function(){return b}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let a=e.r(44066),l=e.r(54710),o=a._(e.r(29158)),i=e.r(42552),c=e.r(61717),u=e.r(37879),d=e.r(31047),p=e.r(20321);e.r(90503);let _=e.r(38520),f=e.r(19947),h=e.r(59246),m=e.r(99046);function g(t){var r,s;let n,a,g,[b,y]=(0,o.useOptimistic)(f.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:j,as:k,children:w,prefetch:N=null,passHref:S,replace:E,shallow:T,scroll:O,onClick:A,onMouseEnter:C,onTouchStart:L,legacyBehavior:P=!1,onNavigate:R,transitionTypes:U,ref:F,unstable_dynamicOnHover:G,...M}=t;n=w,P&&("string"==typeof n||"number"==typeof n)&&(n=(0,l.jsx)("a",{children:n}));let D=o.default.useContext(c.AppRouterContext),I=!1!==N,W=!1!==N?null===(s=N)||"auto"===s?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,$="string"==typeof(r=k||j)?r:(0,i.formatUrl)(r);if(P){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=o.default.Children.only(n)}let K=P?a&&"object"==typeof a&&a.ref:F,q=o.default.useCallback(e=>(null!==D&&(v.current=(0,f.mountLinkInstance)(e,$,D,W,I,y)),()=>{v.current&&((0,f.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,f.unmountPrefetchableInstance)(e)}),[I,$,D,W,y]),B={ref:(0,u.useMergedRef)(q,K),onClick(t){P||"function"!=typeof A||A(t),P&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!D||t.defaultPrevented||function(t,r,s,n,a,l,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);o.default.startTransition(()=>{d(r,n?"replace":"push",!1===a?_.ScrollBehavior.NoScroll:_.ScrollBehavior.Default,s.current,i)})}}(t,$,v,E,O,R,U)},onMouseEnter(e){P||"function"!=typeof C||C(e),P&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),D&&I&&(0,f.onNavigationIntent)(e.currentTarget,!0===G)},onTouchStart:function(e){P||"function"!=typeof L||L(e),P&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),D&&I&&(0,f.onNavigationIntent)(e.currentTarget,!0===G)}};return(0,d.isAbsoluteUrl)($)?B.href=$:P&&!S&&("a"!==a.type||"href"in a.props)||(B.href=(0,p.addBasePath)($)),g=P?o.default.cloneElement(a,B):(0,l.jsx)("a",{...M,...B,children:n}),(0,l.jsx)(x.Provider,{value:b,children:g})}e.r(10364);let x=(0,o.createContext)(f.IDLE_LINK_STATUS),b=()=>(0,o.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),s=e.i(83105),n=e.i(32417),a=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[l,o]=(0,r.useState)(null),[i,c]=(0,r.useState)(!1),u=(0,n.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!u)return;let e=(0,s.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{o(e?.user.email??null)}).catch(()=>{o(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{o(t?.user.email??null)});return()=>{t.unsubscribe()}},[u]),{is_configured:u,email:l,is_pending:i,sign_out:(0,r.useCallback)(async()=>{c(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,s.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,a.notify_settings_saved)("Signed out"),e.refresh()}finally{c(!1)}},[e])}}])},45200,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),s=e.i(71060);let n=[{href:"/",label:"Tracker",match:e=>"/"===e}];function a(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,s.usePathname)()??"/";return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:n.map(s=>{let n=s.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${n?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:s.href,"aria-current":n?"page":void 0,children:s.label},s.href)})})}],45200);var l=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,l.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(a,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",s=t.trim();return 0===s.length||"/"===s?r:`${r}?next=${encodeURIComponent(s)}`}])},73205,2268,76003,38240,e=>{"use strict";let t=new Set(e.i(22373).topbar_quick_action_ids),r=["today","reporting","pomodoro"];e.s(["parse_topbar_quick_actions",0,function(e){try{let s=JSON.parse(e);if(!Array.isArray(s))return r;let n=s.filter(e=>"string"==typeof e&&t.has(e));return Array.from(new Set(n))}catch{return r}}],73205);var s=e.i(34869),n=e.i(92629);let a=(0,s.create_ui_preference_store)({storage_key:n.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:n.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function l(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,a],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return l()}],76003);var o=e.i(17798),i=e.i(46549),c=e.i(10464),u=e.i(35434),d=e.i(61834),p=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===l()?"light":"dark";(0,o.apply_theme)(e),(0,p.write_stored_theme)(e),c.theme_mode_preference.write(e),(0,d.write_document_preference_cookies)({theme_mode:e,theme:e}),c.theme_mode_preference.notify(),(0,u.notify_theme_subscribers)(),(0,i.notify_settings_saved)()}],38240)},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,s=!0){let n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{if(!s)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),n.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[s])}])},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),s=e.i(71060),n=e.i(29158),a=e.i(37399),l=e.i(90463),o=e.i(46549),i=e.i(73205),c=e.i(66295),u=e.i(2268),d=e.i(32792),p=e.i(90299),_=e.i(28274),f=e.i(76003),h=e.i(35434),m=e.i(38240),g=e.i(22373),x=e.i(25204),b=e.i(77882);let y="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",v={today:{href:"/today",label:"Today"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},j=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,s.useRouter)(),k=(0,s.usePathname)()??"/",w=(0,n.useSyncExternalStore)(h.subscribe_theme,f.get_theme_snapshot,f.get_theme_server_snapshot),N=(0,n.useSyncExternalStore)(u.cloud_sync_enabled_preference.subscribe,u.cloud_sync_enabled_preference.get_snapshot,u.cloud_sync_enabled_preference.get_server_snapshot),S=(0,n.useSyncExternalStore)(p.tracker_shortcut_map_preference.subscribe,p.tracker_shortcut_map_preference.get_snapshot,p.tracker_shortcut_map_preference.get_server_snapshot),E=(0,n.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),T=(0,c.parse_tracker_shortcut_map)(S),O=new Set((0,i.parse_topbar_quick_actions)(E)),A=g.topbar_quick_action_ids.filter(e=>!O.has(e)),C=Array.from(new Set([...Array.from(j),...A])),{email:L,is_configured:P,is_pending:R,sign_out:U}=(0,b.use_supabase_auth_session)(),[F,G]=(0,n.useState)(!1),M=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!F)return;let e=e=>{null===M.current||M.current.contains(e.target)||G(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[F]);let D=()=>{G(!1)};return(0,x.use_escape_to_cancel)(D,F),(0,t.jsxs)("div",{className:"relative shrink-0",ref:M,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":F,"aria-haspopup":"menu",onClick:()=>G(e=>!e),children:(0,t.jsx)(a.HamburgerIcon,{})}),F?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[P&&null!==L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:L,children:L})}):null,C.map(e=>{let s=v[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:s.href,className:y,role:"menuitem",onClick:D,children:s.label})},e)}),P?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitemcheckbox","aria-checked":"true"===N,onClick:()=>{let e="true"===N?"false":"true";u.cloud_sync_enabled_preference.write(e),u.cloud_sync_enabled_preference.notify(),(0,o.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==L&&(0,_.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===N?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===N?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{D(),(0,m.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===w?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===w?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{let e;D(),e=T.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),P?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{D(),e.push((0,l.build_auth_page_href)("sign_in",k))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${y} text-danger`,role:"menuitem",disabled:R,onClick:()=>{D(),U()},children:R?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let k=[{id:"today",href:"/today",label:"Today"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,s.usePathname)()??"/",a=(0,n.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),l=(0,n.useMemo)(()=>(0,i.parse_topbar_quick_actions)(a),[a]);if(0===l.length)return null;let o=k.filter(e=>l.includes(e.id));return 0===o.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:o.map(s=>{let n=e.startsWith(s.href);return(0,t.jsx)(r.default,{href:s.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${n?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":n?"page":void 0,children:s.label},s.id)})})}],76080)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),s=e.i(648),n=e.i(1976),a=e.i(76080),l=e.i(45958),o=e.i(71060),i=e.i(29539);function c(){let e=((0,o.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(l.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(i.SettingsIcon,{})})}function u({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(l.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(l.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(u,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(a.TopbarQuickActions,{}),(0,t.jsx)(s.TopbarCloudStatus,{}),(0,t.jsx)(c,{}),(0,t.jsx)(n.TopbarOverflowMenu,{})]})]})]})})}],75404)},42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),s=e.i(71060);let n=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:e=>e.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:e=>e.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:e=>e.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:e=>e.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,s.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:n.map(s=>{let n=s.match(e);return(0,t.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,t.jsx)(r.default,{href:s.href,"aria-current":n?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${n?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:s.label})},s.href)})})})}])},7902,e=>{"use strict";var t=e.i(46549);e.s(["persist_ui_preference",0,function(e,r){e.read()!==r&&(e.write(r),e.notify(),(0,t.notify_settings_saved)())}])},83821,60145,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let s=(0,t.create_ui_preference_store)({storage_key:r.DAILY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.DAILY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=30&&t<=720}});e.s(["daily_focus_target_minutes_preference",0,s],83821);let n=(0,t.create_ui_preference_store)({storage_key:r.WEEKLY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.WEEKLY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=60&&t<=4200}});e.s(["weekly_focus_target_minutes_preference",0,n],60145)},1238,51703,74597,77130,56442,73228,e=>{"use strict";e.s(["parse_focus_goals_by_name",0,function(e){if(0===e.length)return{};try{let t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))return{};let r={};for(let[e,s]of Object.entries(t)){if(null===s||"object"!=typeof s)continue;let t={};"string"==typeof s.daily&&s.daily.length>0&&(t.daily=s.daily),"string"==typeof s.weekly&&s.weekly.length>0&&(t.weekly=s.weekly),(void 0!==t.daily||void 0!==t.weekly)&&(r[e]=t)}return r}catch{return{}}}],1238);var t=e.i(34869),r=e.i(92629);let s=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_SCOPE_STORAGE_KEY,default_value:r.FOCUS_GOAL_SCOPE_DEFAULT,is_valid:e=>"global"===e||"sheet"===e||"tag"===e});e.s(["focus_goal_scope_preference",0,s],51703);let n=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_SHEET_NAME_STORAGE_KEY,default_value:r.FOCUS_GOAL_SHEET_NAME_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["focus_goal_sheet_name_preference",0,n],74597);let a=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_TAG_NAME_STORAGE_KEY,default_value:r.FOCUS_GOAL_TAG_NAME_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["focus_goal_tag_name_preference",0,a],77130);let l=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOALS_PER_SHEET_STORAGE_KEY,default_value:r.FOCUS_GOALS_PER_SHEET_DEFAULT,is_valid:e=>{if(0===e.length)return!1;try{let t=JSON.parse(e);return null!==t&&"object"==typeof t&&!Array.isArray(t)}catch{return!1}}});e.s(["focus_goals_per_sheet_preference",0,l],56442);let o=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOALS_PER_TAG_STORAGE_KEY,default_value:r.FOCUS_GOALS_PER_TAG_DEFAULT,is_valid:e=>{if(0===e.length)return!1;try{let t=JSON.parse(e);return null!==t&&"object"==typeof t&&!Array.isArray(t)}catch{return!1}}});e.s(["focus_goals_per_tag_preference",0,o],73228)},34032,e=>{"use strict";var t=e.i(54710),r=e.i(29158),s=e.i(1238);function n(e,t,r,n){if(0===t.length)return e;let a=(0,s.parse_focus_goals_by_name)(e),l=a[t]??{};if(0===n.length){let e={...l};delete e[r],void 0===e.daily&&void 0===e.weekly?delete a[t]:a[t]=e}else a[t]={...l,[r]:n};return JSON.stringify(a)}var a=e.i(83821),l=e.i(51703),o=e.i(74597),i=e.i(77130),c=e.i(56442),u=e.i(73228),d=e.i(56996),p=e.i(8654),_=e.i(76900),f=e.i(80808),h=e.i(71122),m=e.i(60145),g=e.i(7902);let x=[120,180,240,300,360,420,480],b=[600,900,1200,1500,1800,2100,2400],y=[15,30,45,60,90,120],v=[6,8,10,12,14],j=[{value:"global",label:"Global"},{value:"sheet",label:"Per-sheet"},{value:"tag",label:"Per-tag"}];function k({disabled:e,daily_target_minutes:r,weekly_target_minutes:s}){return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Global targets"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Daily target"}),(0,t.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:r,disabled:e,onChange:e=>(0,g.persist_ui_preference)(a.daily_focus_target_minutes_preference,e.target.value),children:x.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Weekly target"}),(0,t.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:s,disabled:e,onChange:e=>(0,g.persist_ui_preference)(m.weekly_focus_target_minutes_preference,e.target.value),children:b.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))})]})]})]})}function w({kind:e,names:r,disabled:s,active_name:a,map:l,json:d}){let p="sheet"===e?"Per-sheet targets":"Per-tag targets";if(0===r.length)return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:p}),(0,t.jsx)("p",{className:"m-0 text-[0.85rem] text-muted",children:"sheet"===e?"Create a sheet to configure per-sheet goals.":"Add a tag to a time entry to configure per-tag goals."})]});let _=`focus-goal-active-${e}`;return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:p}),(0,t.jsxs)("span",{className:"text-[0.75rem] text-muted",children:["Pick the ",e," shown in the focus banner."]})]}),(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col gap-1.5 p-0",children:r.map(r=>{let p=l[r]??{},f=p.daily??"",h=p.weekly??"",m=a===r;return(0,t.jsxs)("li",{className:`grid items-center gap-2 rounded-md border bg-panel px-3 py-2.5 transition-colors md:grid-cols-[auto_minmax(0,1fr)_minmax(0,11rem)_minmax(0,11rem)] grid-cols-[auto_minmax(0,1fr)] ${m?"border-accent-border bg-accent-soft":"border-panel-border"}`,children:[(0,t.jsx)("label",{className:"flex shrink-0 cursor-pointer items-center justify-center",children:(0,t.jsx)("input",{type:"radio",name:_,className:"cursor-pointer",checked:m,disabled:s,"aria-label":`Show ${r} in focus banner`,onChange:()=>(0,g.persist_ui_preference)("sheet"===e?o.focus_goal_sheet_name_preference:i.focus_goal_tag_name_preference,r)})}),(0,t.jsx)("span",{className:"truncate text-[0.9rem] font-medium",title:r,children:"tag"!==e||r.startsWith("@")?r:`@${r}`}),(0,t.jsxs)("label",{className:"flex items-center gap-2 md:col-start-3",children:[(0,t.jsx)("span",{className:"text-[0.75rem] text-muted",children:"Daily"}),(0,t.jsxs)("select",{className:"flex-1 rounded-md border border-panel-border bg-panel px-2 py-1.5 text-[0.85rem]",value:f,disabled:s,onChange:t=>(0,g.persist_ui_preference)("sheet"===e?c.focus_goals_per_sheet_preference:u.focus_goals_per_tag_preference,n(d,r,"daily",t.target.value)),children:[(0,t.jsx)("option",{value:"",children:"Not set"}),x.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))]})]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 md:col-start-4",children:[(0,t.jsx)("span",{className:"text-[0.75rem] text-muted",children:"Weekly"}),(0,t.jsxs)("select",{className:"flex-1 rounded-md border border-panel-border bg-panel px-2 py-1.5 text-[0.85rem]",value:h,disabled:s,onChange:t=>(0,g.persist_ui_preference)("sheet"===e?c.focus_goals_per_sheet_preference:u.focus_goals_per_tag_preference,n(d,r,"weekly",t.target.value)),children:[(0,t.jsx)("option",{value:"",children:"Not set"}),b.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))]})]})]},r)})})]})}e.s(["FocusGoalsNudgesSetting",0,function({sheet_names:e,tag_names:n}){let x=(0,r.useSyncExternalStore)(d.focus_nudges_enabled_preference.subscribe,d.focus_nudges_enabled_preference.get_snapshot,d.focus_nudges_enabled_preference.get_server_snapshot),b=(0,r.useSyncExternalStore)(a.daily_focus_target_minutes_preference.subscribe,a.daily_focus_target_minutes_preference.get_snapshot,a.daily_focus_target_minutes_preference.get_server_snapshot),N=(0,r.useSyncExternalStore)(m.weekly_focus_target_minutes_preference.subscribe,m.weekly_focus_target_minutes_preference.get_snapshot,m.weekly_focus_target_minutes_preference.get_server_snapshot),S=(0,r.useSyncExternalStore)(p.no_log_reminder_minutes_preference.subscribe,p.no_log_reminder_minutes_preference.get_snapshot,p.no_log_reminder_minutes_preference.get_server_snapshot),E=(0,r.useSyncExternalStore)(_.overwork_alert_hours_preference.subscribe,_.overwork_alert_hours_preference.get_snapshot,_.overwork_alert_hours_preference.get_server_snapshot),T=(0,r.useSyncExternalStore)(h.work_hours_start_preference.subscribe,h.work_hours_start_preference.get_snapshot,h.work_hours_start_preference.get_server_snapshot),O=(0,r.useSyncExternalStore)(f.work_hours_end_preference.subscribe,f.work_hours_end_preference.get_snapshot,f.work_hours_end_preference.get_server_snapshot),A=(0,r.useSyncExternalStore)(l.focus_goal_scope_preference.subscribe,l.focus_goal_scope_preference.get_snapshot,l.focus_goal_scope_preference.get_server_snapshot),C=(0,r.useSyncExternalStore)(o.focus_goal_sheet_name_preference.subscribe,o.focus_goal_sheet_name_preference.get_snapshot,o.focus_goal_sheet_name_preference.get_server_snapshot),L=(0,r.useSyncExternalStore)(i.focus_goal_tag_name_preference.subscribe,i.focus_goal_tag_name_preference.get_snapshot,i.focus_goal_tag_name_preference.get_server_snapshot),P=(0,r.useSyncExternalStore)(c.focus_goals_per_sheet_preference.subscribe,c.focus_goals_per_sheet_preference.get_snapshot,c.focus_goals_per_sheet_preference.get_server_snapshot),R=(0,r.useSyncExternalStore)(u.focus_goals_per_tag_preference.subscribe,u.focus_goals_per_tag_preference.get_snapshot,u.focus_goals_per_tag_preference.get_server_snapshot),U=(0,s.parse_focus_goals_by_name)(P),F=(0,s.parse_focus_goals_by_name)(R);(0,r.useEffect)(()=>{"sheet"===A&&0===C.length&&e.length>0&&(0,g.persist_ui_preference)(o.focus_goal_sheet_name_preference,e[0])},[A,C,e]),(0,r.useEffect)(()=>{"tag"===A&&0===L.length&&n.length>0&&(0,g.persist_ui_preference)(i.focus_goal_tag_name_preference,n[0])},[A,L,n]);let G="true"!==x;return(0,t.jsxs)("div",{id:"focus-goals-nudges",className:"flex w-full flex-col gap-4",children:[(0,t.jsxs)("label",{className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===x,onChange:e=>(0,g.persist_ui_preference)(d.focus_nudges_enabled_preference,e.target.checked?"true":"false")}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Goals + nudges"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Track daily/weekly focus goals, overwork alerts, and no-log reminders."})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Focus goal scope"}),(0,t.jsx)("div",{role:"radiogroup","aria-label":"Focus goal scope",className:"inline-flex w-full flex-wrap gap-1 rounded-md border border-panel-border bg-panel p-0.5",children:j.map(e=>{let r=A===e.value;return(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":r,disabled:G,className:`flex-1 min-w-24 cursor-pointer rounded px-3 py-1.5 text-[0.85rem] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-55 ${r?"bg-accent-soft text-foreground":"bg-transparent text-muted hover:bg-surface-hover hover:text-foreground"}`,onClick:()=>(0,g.persist_ui_preference)(l.focus_goal_scope_preference,e.value),children:e.label},e.value)})})]}),"global"===A?(0,t.jsx)(k,{disabled:G,daily_target_minutes:b,weekly_target_minutes:N}):null,"sheet"===A?(0,t.jsx)(w,{kind:"sheet",names:e,disabled:G,active_name:C,map:U,json:P}):null,"tag"===A?(0,t.jsx)(w,{kind:"tag",names:n,disabled:G,active_name:L,map:F,json:R}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Behavior nudges"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Work hours start"}),(0,t.jsx)("input",{type:"time",className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:T,disabled:G,onChange:e=>(0,g.persist_ui_preference)(h.work_hours_start_preference,e.target.value)})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Work hours end"}),(0,t.jsx)("input",{type:"time",className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:O,disabled:G,onChange:e=>(0,g.persist_ui_preference)(f.work_hours_end_preference,e.target.value)})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"No-log reminder"}),(0,t.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:S,disabled:G,onChange:e=>(0,g.persist_ui_preference)(p.no_log_reminder_minutes_preference,e.target.value),children:y.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Overwork alert"}),(0,t.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:E,disabled:G,onChange:e=>(0,g.persist_ui_preference)(_.overwork_alert_hours_preference,e.target.value),children:v.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," hours"]},e))})]})]}),(0,t.jsx)("p",{className:"m-0 text-[0.78rem] leading-snug text-muted",children:"Rule reminders: notify when no active timer during work hours, and alert when an active timer runs longer than the overwork threshold."})]})]})}],34032)}]);