super-time-tracker-ui 0.1.39 → 0.1.41

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 (216) hide show
  1. package/README.md +88 -88
  2. package/bin/stt-ui.js +220 -220
  3. package/dist/standalone/next-output/BUILD_ID +1 -1
  4. package/dist/standalone/next-output/build-manifest.json +5 -5
  5. package/dist/standalone/next-output/server/app/_global-error/page/build-manifest.json +2 -2
  6. package/dist/standalone/next-output/server/app/_global-error/page.js +1 -1
  7. package/dist/standalone/next-output/server/app/_global-error/page.js.nft.json +1 -1
  8. package/dist/standalone/next-output/server/app/_global-error.html +1 -1
  9. package/dist/standalone/next-output/server/app/_global-error.rsc +1 -1
  10. package/dist/standalone/next-output/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/dist/standalone/next-output/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/dist/standalone/next-output/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/dist/standalone/next-output/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/dist/standalone/next-output/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/dist/standalone/next-output/server/app/_not-found/page/build-manifest.json +2 -2
  16. package/dist/standalone/next-output/server/app/_not-found/page.js +1 -1
  17. package/dist/standalone/next-output/server/app/_not-found/page.js.nft.json +1 -1
  18. package/dist/standalone/next-output/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/dist/standalone/next-output/server/app/api/auth/signout/route.js +1 -1
  20. package/dist/standalone/next-output/server/app/api/auth/signout/route.js.nft.json +1 -1
  21. package/dist/standalone/next-output/server/app/api/sync/import/route.js +1 -1
  22. package/dist/standalone/next-output/server/app/api/sync/import/route.js.nft.json +1 -1
  23. package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js +1 -1
  24. package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js.nft.json +1 -1
  25. package/dist/standalone/next-output/server/app/api/sync/pull/route.js +1 -1
  26. package/dist/standalone/next-output/server/app/api/sync/pull/route.js.nft.json +1 -1
  27. package/dist/standalone/next-output/server/app/api/sync/push/route.js +1 -1
  28. package/dist/standalone/next-output/server/app/api/sync/push/route.js.nft.json +1 -1
  29. package/dist/standalone/next-output/server/app/auth/callback/route.js +1 -1
  30. package/dist/standalone/next-output/server/app/auth/callback/route.js.nft.json +1 -1
  31. package/dist/standalone/next-output/server/app/favicon.ico/route.js +1 -1
  32. package/dist/standalone/next-output/server/app/favicon.ico/route.js.nft.json +1 -1
  33. package/dist/standalone/next-output/server/app/login/page/build-manifest.json +2 -2
  34. package/dist/standalone/next-output/server/app/login/page.js +1 -1
  35. package/dist/standalone/next-output/server/app/login/page.js.nft.json +1 -1
  36. package/dist/standalone/next-output/server/app/login/page_client-reference-manifest.js +1 -1
  37. package/dist/standalone/next-output/server/app/offline/page/build-manifest.json +2 -2
  38. package/dist/standalone/next-output/server/app/offline/page.js +1 -1
  39. package/dist/standalone/next-output/server/app/offline/page.js.nft.json +1 -1
  40. package/dist/standalone/next-output/server/app/offline/page_client-reference-manifest.js +1 -1
  41. package/dist/standalone/next-output/server/app/page/build-manifest.json +2 -2
  42. package/dist/standalone/next-output/server/app/page/react-loadable-manifest.json +1 -1
  43. package/dist/standalone/next-output/server/app/page.js +1 -1
  44. package/dist/standalone/next-output/server/app/page.js.nft.json +1 -1
  45. package/dist/standalone/next-output/server/app/page_client-reference-manifest.js +1 -1
  46. package/dist/standalone/next-output/server/app/pomodoro/page/build-manifest.json +2 -2
  47. package/dist/standalone/next-output/server/app/pomodoro/page.js +1 -1
  48. package/dist/standalone/next-output/server/app/pomodoro/page.js.nft.json +1 -1
  49. package/dist/standalone/next-output/server/app/pomodoro/page_client-reference-manifest.js +1 -1
  50. package/dist/standalone/next-output/server/app/register/page/build-manifest.json +2 -2
  51. package/dist/standalone/next-output/server/app/register/page.js +1 -1
  52. package/dist/standalone/next-output/server/app/register/page.js.nft.json +1 -1
  53. package/dist/standalone/next-output/server/app/register/page_client-reference-manifest.js +1 -1
  54. package/dist/standalone/next-output/server/app/reporting/page/build-manifest.json +2 -2
  55. package/dist/standalone/next-output/server/app/reporting/page.js +1 -1
  56. package/dist/standalone/next-output/server/app/reporting/page.js.nft.json +1 -1
  57. package/dist/standalone/next-output/server/app/reporting/page_client-reference-manifest.js +1 -1
  58. package/dist/standalone/next-output/server/app/search/page/build-manifest.json +2 -2
  59. package/dist/standalone/next-output/server/app/search/page.js +1 -1
  60. package/dist/standalone/next-output/server/app/search/page.js.nft.json +1 -1
  61. package/dist/standalone/next-output/server/app/search/page_client-reference-manifest.js +1 -1
  62. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page/build-manifest.json +2 -2
  63. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js +1 -1
  64. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js.nft.json +1 -1
  65. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page_client-reference-manifest.js +1 -1
  66. package/dist/standalone/next-output/server/app/settings/cloud-sync/page/build-manifest.json +2 -2
  67. package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js +1 -1
  68. package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js.nft.json +1 -1
  69. package/dist/standalone/next-output/server/app/settings/cloud-sync/page_client-reference-manifest.js +1 -1
  70. package/dist/standalone/next-output/server/app/settings/data/page/build-manifest.json +2 -2
  71. package/dist/standalone/next-output/server/app/settings/data/page.js +1 -1
  72. package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
  73. package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
  74. package/dist/standalone/next-output/server/app/settings/display/page/build-manifest.json +2 -2
  75. package/dist/standalone/next-output/server/app/settings/display/page.js +1 -1
  76. package/dist/standalone/next-output/server/app/settings/display/page.js.nft.json +1 -1
  77. package/dist/standalone/next-output/server/app/settings/display/page_client-reference-manifest.js +1 -1
  78. package/dist/standalone/next-output/server/app/settings/goals/page/build-manifest.json +2 -2
  79. package/dist/standalone/next-output/server/app/settings/goals/page.js +1 -1
  80. package/dist/standalone/next-output/server/app/settings/goals/page.js.nft.json +1 -1
  81. package/dist/standalone/next-output/server/app/settings/goals/page_client-reference-manifest.js +1 -1
  82. package/dist/standalone/next-output/server/app/settings/notifications/page/build-manifest.json +2 -2
  83. package/dist/standalone/next-output/server/app/settings/notifications/page.js +1 -1
  84. package/dist/standalone/next-output/server/app/settings/notifications/page.js.nft.json +1 -1
  85. package/dist/standalone/next-output/server/app/settings/notifications/page_client-reference-manifest.js +1 -1
  86. package/dist/standalone/next-output/server/app/settings/page/build-manifest.json +2 -2
  87. package/dist/standalone/next-output/server/app/settings/page.js +1 -1
  88. package/dist/standalone/next-output/server/app/settings/page.js.nft.json +1 -1
  89. package/dist/standalone/next-output/server/app/settings/page_client-reference-manifest.js +1 -1
  90. package/dist/standalone/next-output/server/app/settings/pomodoro/page/build-manifest.json +2 -2
  91. package/dist/standalone/next-output/server/app/settings/pomodoro/page.js +1 -1
  92. package/dist/standalone/next-output/server/app/settings/pomodoro/page.js.nft.json +1 -1
  93. package/dist/standalone/next-output/server/app/settings/pomodoro/page_client-reference-manifest.js +1 -1
  94. package/dist/standalone/next-output/server/app/settings/quick-actions/page/build-manifest.json +2 -2
  95. package/dist/standalone/next-output/server/app/settings/quick-actions/page.js +1 -1
  96. package/dist/standalone/next-output/server/app/settings/quick-actions/page.js.nft.json +1 -1
  97. package/dist/standalone/next-output/server/app/settings/quick-actions/page_client-reference-manifest.js +1 -1
  98. package/dist/standalone/next-output/server/app/settings/tags/page/build-manifest.json +2 -2
  99. package/dist/standalone/next-output/server/app/settings/tags/page.js +1 -1
  100. package/dist/standalone/next-output/server/app/settings/tags/page.js.nft.json +1 -1
  101. package/dist/standalone/next-output/server/app/settings/tags/page_client-reference-manifest.js +1 -1
  102. package/dist/standalone/next-output/server/app/sheets/page/build-manifest.json +2 -2
  103. package/dist/standalone/next-output/server/app/sheets/page.js +1 -1
  104. package/dist/standalone/next-output/server/app/sheets/page.js.nft.json +1 -1
  105. package/dist/standalone/next-output/server/app/sheets/page_client-reference-manifest.js +1 -1
  106. package/dist/standalone/next-output/server/app/today/page/build-manifest.json +2 -2
  107. package/dist/standalone/next-output/server/app/today/page.js +1 -1
  108. package/dist/standalone/next-output/server/app/today/page.js.nft.json +1 -1
  109. package/dist/standalone/next-output/server/app/today/page_client-reference-manifest.js +1 -1
  110. package/dist/standalone/next-output/server/chunks/0prs_next_dist_esm_build_templates_app-route_0_l72r2.js +1 -1
  111. package/dist/standalone/next-output/server/chunks/0prs_next_dist_esm_build_templates_app-route_0a439d6.js +1 -1
  112. package/dist/standalone/next-output/server/chunks/0prs_next_dist_esm_build_templates_app-route_0b8a-p3.js +1 -1
  113. package/dist/standalone/next-output/server/chunks/0prs_next_dist_esm_build_templates_app-route_0e-v8-t.js +1 -1
  114. package/dist/standalone/next-output/server/chunks/[externals]__11vad82._.js +3 -0
  115. package/dist/standalone/next-output/server/chunks/[externals]_next_dist_0sqmaqd._.js +3 -0
  116. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0-taz6n._.js +3 -0
  117. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__00~g.6x._.js +3 -0
  118. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__057h~1v._.js +1 -1
  119. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06666_b._.js +1 -1
  120. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06h__d_._.js +1 -1
  121. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06r8z50._.js +1 -1
  122. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06wq380._.js +1 -1
  123. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0_b50~5._.js +1 -1
  124. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0eruj62._.js +1 -1
  125. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0fc0f.7._.js +1 -1
  126. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0g2.yrs._.js +1 -1
  127. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0g4.zxh._.js +1 -1
  128. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0hasizg._.js +1 -1
  129. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0jlfmb8._.js +1 -1
  130. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0m-c-3t._.js +1 -1
  131. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0mft_cy._.js +78 -0
  132. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0m~u8g4._.js +1 -1
  133. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0nx-vwn._.js +1 -1
  134. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0o-u0o6._.js +3 -0
  135. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0pzvh8l._.js +1 -1
  136. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0rl2w7-._.js +1 -1
  137. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0wdwx.8._.js +3 -0
  138. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0wj1pxh._.js +1 -1
  139. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0y.-jfw._.js +3 -0
  140. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0yqw7pu._.js +1 -1
  141. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0~22xdv._.js +3 -0
  142. package/dist/standalone/next-output/server/chunks/_00h8h72._.js +1 -1
  143. package/dist/standalone/next-output/server/chunks/_01k5l~6._.js +1 -1
  144. package/dist/standalone/next-output/server/chunks/_01m8bky._.js +1 -1
  145. package/dist/standalone/next-output/server/chunks/_08yfru9._.js +1 -1
  146. package/dist/standalone/next-output/server/chunks/_0a9455x._.js +1 -1
  147. package/dist/standalone/next-output/server/chunks/_0glc6qw._.js +1 -1
  148. package/dist/standalone/next-output/server/chunks/_0k9xfs_._.js +1 -1
  149. package/dist/standalone/next-output/server/chunks/_0qc0j~f._.js +1 -1
  150. package/dist/standalone/next-output/server/chunks/_0s9bykd._.js +1 -1
  151. package/dist/standalone/next-output/server/chunks/_0ykasjm._.js +1 -1
  152. package/dist/standalone/next-output/server/chunks/ssr/0prs_next_dist_0gm.sou._.js +1 -1
  153. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0xgtqus._.js → [root-of-the-server]__03~l7zo._.js} +2 -2
  154. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__07dg5mm._.js +1 -1
  155. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__08n6l..._.js +1 -1
  156. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0f0-17f._.js +1 -1
  157. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0i8nvpz._.js +1 -1
  158. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0kp4i1o._.js +1 -1
  159. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0kehl40._.js → [root-of-the-server]__0mvoac~._.js} +2 -2
  160. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0q5n4_f._.js +1 -1
  161. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0s2z7s7._.js +1 -1
  162. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0t9jvpg._.js +1 -1
  163. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0ta228.._.js +1 -1
  164. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__11yff~n._.js +1 -1
  165. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__13lfzik._.js +1 -1
  166. package/dist/standalone/next-output/server/chunks/ssr/_09_de1y._.js +3 -0
  167. package/dist/standalone/next-output/server/chunks/ssr/{_0j8zmg6._.js → _0mb-jfk._.js} +1 -1
  168. package/dist/standalone/next-output/server/chunks/ssr/_0n~tafj._.js +1 -1
  169. package/dist/standalone/next-output/server/chunks/ssr/_10n.q--._.js +1 -1
  170. package/dist/standalone/next-output/server/chunks/ssr/_118t3.z._.js +3 -0
  171. package/dist/standalone/next-output/server/chunks/ssr/_119e_ui._.js +3 -0
  172. package/dist/standalone/next-output/server/chunks/ssr/components_0isp.qn._.js +3 -0
  173. package/dist/standalone/next-output/server/chunks/ssr/components_entry-list_tsx_02.v.ur._.js +1 -1
  174. package/dist/standalone/next-output/server/functions-config-manifest.json +11 -1
  175. package/dist/standalone/next-output/server/middleware-build-manifest.js +5 -5
  176. package/dist/standalone/next-output/server/middleware-manifest.json +2 -30
  177. package/dist/standalone/next-output/server/middleware.js +5 -0
  178. package/dist/standalone/next-output/server/pages/500.html +1 -1
  179. package/dist/standalone/next-output/static/chunks/01.p8x7rwa_da.js +1 -0
  180. package/dist/standalone/next-output/static/chunks/0352pgxbvl-fv.css +3 -0
  181. package/dist/standalone/next-output/static/chunks/05q3gfx1e8sea.js +2 -0
  182. package/dist/standalone/next-output/static/chunks/{0tunlsiqaj8k7.js → 0_ofg6_dn.8-1.js} +1 -1
  183. package/dist/standalone/next-output/static/chunks/0fa.o-_asg9n7.js +1 -0
  184. package/dist/standalone/next-output/static/chunks/{0d1bw0ondgg09.js → 0fxgcr1q998_k.js} +1 -1
  185. package/dist/standalone/next-output/static/chunks/0j2e~637-6iat.js +1 -0
  186. package/dist/standalone/next-output/static/chunks/0oqkatex7m1ci.js +1 -0
  187. package/dist/standalone/next-output/static/chunks/11om1fvdw0yt4.js +1 -0
  188. package/dist/standalone/next-output/static/chunks/{turbopack-0f5lhej4rg9kr.js → turbopack-0qr4v3fex9a4_.js} +1 -1
  189. package/dist/standalone/package.json +1 -1
  190. package/dist/standalone/public/icons/site.webmanifest +19 -1
  191. package/dist/standalone/public/manifest.webmanifest +30 -30
  192. package/dist/standalone/public/sw.js +74 -73
  193. package/package.json +1 -1
  194. package/dist/standalone/next-output/server/chunks/[externals]_next_dist_0arv.vj._.js +0 -3
  195. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0.8v_6p._.js +0 -3
  196. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__07wrb8~._.js +0 -3
  197. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0_ar6en._.js +0 -3
  198. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0jvridy._.js +0 -3
  199. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0mp257.._.js +0 -3
  200. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0nhm~x6._.js +0 -3
  201. package/dist/standalone/next-output/server/chunks/ssr/_0y1l.fp._.js +0 -3
  202. package/dist/standalone/next-output/server/chunks/ssr/_11_k_h_._.js +0 -3
  203. package/dist/standalone/next-output/server/chunks/ssr/components_tracker-app_tsx_0qs9.7y._.js +0 -3
  204. package/dist/standalone/next-output/server/edge/chunks/0iv-_next_dist_esm_build_templates_edge-wrapper_0tu5gg3.js +0 -3
  205. package/dist/standalone/next-output/server/edge/chunks/0prs_next_dist_esm_build_templates_edge-wrapper_0qnghjz.js +0 -3
  206. package/dist/standalone/next-output/server/edge/chunks/[root-of-the-server]__0864en3._.js +0 -69
  207. package/dist/standalone/next-output/static/chunks/0bkrh0v8rs7jg.js +0 -1
  208. package/dist/standalone/next-output/static/chunks/0dx.1c1lmm455.css +0 -3
  209. package/dist/standalone/next-output/static/chunks/0lj1_~cxf~l6t.js +0 -1
  210. package/dist/standalone/next-output/static/chunks/0o1-l.q7jp8h9.js +0 -1
  211. package/dist/standalone/next-output/static/chunks/0p4cjapdzyl6k.js +0 -2
  212. package/dist/standalone/next-output/static/chunks/0yhbka048dolq.js +0 -1
  213. package/dist/standalone/next-output/static/chunks/11cm.4cgwu.ci.js +0 -1
  214. /package/dist/standalone/next-output/static/{BrJRktoc4eE78z4-7oyH2 → nWINZxUmLtSJoWt1IRxld}/_buildManifest.js +0 -0
  215. /package/dist/standalone/next-output/static/{BrJRktoc4eE78z4-7oyH2 → nWINZxUmLtSJoWt1IRxld}/_clientMiddlewareManifest.js +0 -0
  216. /package/dist/standalone/next-output/static/{BrJRktoc4eE78z4-7oyH2 → nWINZxUmLtSJoWt1IRxld}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,99997,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=e.r(44066)._(e.r(33434)),o=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",a=e.hash||"",l=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)),l&&"object"==typeof l&&(l=String(s.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==c?(c="//"+(c||""),i&&"/"!==i[0]&&(i="/"+i)):c||(c=""),a&&"#"!==a[0]&&(a="#"+a),u&&"?"!==u[0]&&(u="?"+u),i=i.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${i}${u}${a}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return a(e)}},70782,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=e.r(51268);function i(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=s(e,n)),t&&(i.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)},88334,(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(69600),i=e.r(76636);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,i.hasBasePath)(r.pathname)}catch(e){return!1}}},20612,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},70096,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return x}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=e.r(44066),o=e.r(8063),a=s._(e.r(51268)),l=e.r(99997),c=e.r(4411),u=e.r(70782),d=e.r(69600),m=e.r(31508);e.r(91946);let p=e.r(35302),h=e.r(92024),f=e.r(88334),_=e.r(44017);function g(t){var r,n;let i,s,g,[x,y]=(0,a.useOptimistic)(h.IDLE_LINK_STATUS),v=(0,a.useRef)(null),{href:w,as:j,children:k,prefetch:N=null,passHref:S,replace:E,shallow:C,scroll:O,onClick:T,onMouseEnter:A,onTouchStart:L,legacyBehavior:I=!1,onNavigate:P,transitionTypes:D,ref:R,unstable_dynamicOnHover:$,...M}=t;i=k,I&&("string"==typeof i||"number"==typeof i)&&(i=(0,o.jsx)("a",{children:i}));let U=a.default.useContext(c.AppRouterContext),K=!1!==N,F=!1!==N?null===(n=N)||"auto"===n?_.FetchStrategy.PPR:_.FetchStrategy.Full:_.FetchStrategy.PPR,G="string"==typeof(r=j||w)?r:(0,l.formatUrl)(r);if(I){if(i?.$$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=a.default.Children.only(i)}let q=I?s&&"object"==typeof s&&s.ref:R,B=a.default.useCallback(e=>(null!==U&&(v.current=(0,h.mountLinkInstance)(e,G,U,F,K,y)),()=>{v.current&&((0,h.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,h.unmountPrefetchableInstance)(e)}),[K,G,U,F,y]),Y={ref:(0,u.useMergedRef)(B,q),onClick(t){I||"function"!=typeof T||T(t),I&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!U||t.defaultPrevented||function(t,r,n,i,s,o,l){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,f.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(12178);a.default.startTransition(()=>{d(r,i?"replace":"push",!1===s?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,l)})}}(t,G,v,E,O,P,D)},onMouseEnter(e){I||"function"!=typeof A||A(e),I&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),U&&K&&(0,h.onNavigationIntent)(e.currentTarget,!0===$)},onTouchStart:function(e){I||"function"!=typeof L||L(e),I&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),U&&K&&(0,h.onNavigationIntent)(e.currentTarget,!0===$)}};return(0,d.isAbsoluteUrl)(G)?Y.href=G:I&&!S&&("a"!==s.type||"href"in s.props)||(Y.href=(0,m.addBasePath)(G)),g=I?a.default.cloneElement(s,Y):(0,o.jsx)("a",{...M,...Y,children:i}),(0,o.jsx)(b.Provider,{value:x,children:g})}e.r(20612);let b=(0,a.createContext)(h.IDLE_LINK_STATUS),x=()=>(0,a.useContext)(b);("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)},29539,e=>{"use strict";var t=e.i(8063);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"})]})}])},37399,25204,e=>{"use strict";var t=e.i(8063);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"})]})}],37399);var r=e.i(51268),n=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,t=!0){let i=(0,r.useRef)(e);i.current=e,(0,r.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"!==e.key||(0,n.is_modal_dialog_open)()||(e.preventDefault(),i.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t])}],25204)},77882,e=>{"use strict";var t=e.i(48042),r=e.i(51268),n=e.i(83105),i=e.i(32417),s=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[o,a]=(0,r.useState)(null),[l,c]=(0,r.useState)(!1),u=(0,i.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!u)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{a(e?.user.email??null)}).catch(()=>{a(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{a(t?.user.email??null)});return()=>{t.unsubscribe()}},[u]),{is_configured:u,email:o,is_pending:l,sign_out:(0,r.useCallback)(async()=>{c(!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{c(!1)}},[e])}}])},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)}`}])},75404,73205,e=>{"use strict";var t=e.i(8063),r=e.i(70096),n=e.i(48042);let i=[{href:"/",label:"Tracker",match:e=>"/"===e}];function s(){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:i.map(n=>{let i=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 ${i?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":i?"page":void 0,children:n.label},n.href)})})}function o(){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"})})}var a=e.i(77882);function l(){let{email:e,is_configured:r}=(0,a.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)(o,{})}),(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}var c=e.i(51268),u=e.i(37399),d=e.i(90463),m=e.i(46549),p=e.i(22373);let h=new Set(p.topbar_quick_action_ids),f=["today","search","reporting","pomodoro"];function _(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return f;let r=t.filter(e=>"string"==typeof e&&h.has(e));return Array.from(new Set(r))}catch{return f}}e.s(["parse_topbar_quick_actions",0,_],73205);var g=e.i(66295),b=e.i(34869),x=e.i(92629);let y=(0,b.create_ui_preference_store)({storage_key:x.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:x.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});var v=e.i(32792),w=e.i(90299),j=e.i(28274);function k(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function N(){return k()}function S(){return"dark"}var E=e.i(35434),C=e.i(17798),O=e.i(10464),T=e.i(61834),A=e.i(81553),L=e.i(25204);let I="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",P={today:{href:"/today",label:"Today"},search:{href:"/search",label:"Search"},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"}},D=new Set(["manage-tags","pomodoro","sync-settings"]);function R(){let e=(0,n.useRouter)(),i=(0,n.usePathname)()??"/",s=(0,c.useSyncExternalStore)(E.subscribe_theme,N,S),o=(0,c.useSyncExternalStore)(y.subscribe,y.get_snapshot,y.get_server_snapshot),l=(0,c.useSyncExternalStore)(w.tracker_shortcut_map_preference.subscribe,w.tracker_shortcut_map_preference.get_snapshot,w.tracker_shortcut_map_preference.get_server_snapshot),h=(0,c.useSyncExternalStore)(v.topbar_quick_actions_preference.subscribe,v.topbar_quick_actions_preference.get_snapshot,v.topbar_quick_actions_preference.get_server_snapshot),f=(0,g.parse_tracker_shortcut_map)(l),b=new Set(_(h)),x=p.topbar_quick_action_ids.filter(e=>!b.has(e)),R=Array.from(new Set([...Array.from(D),...x])),{email:$,is_configured:M,is_pending:U,sign_out:K}=(0,a.use_supabase_auth_session)(),[F,G]=(0,c.useState)(!1),q=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!F)return;let e=e=>{null===q.current||q.current.contains(e.target)||G(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[F]);let B=()=>{G(!1)};return(0,L.use_escape_to_cancel)(B,F),(0,t.jsxs)("div",{className:"relative shrink-0",ref:q,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)(u.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:[M&&null!==$?(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:$,children:$})}):null,R.map(e=>{let n=P[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:I,role:"menuitem",onClick:B,children:n.label})},e)}),M?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:I,role:"menuitemcheckbox","aria-checked":"true"===o,onClick:()=>{let e="true"===o?"false":"true";y.write(e),y.notify(),(0,m.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==$&&(0,j.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"===o?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===o?"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:I,role:"menuitem",onClick:()=>{let e;B(),e="dark"===k()?"light":"dark",(0,C.apply_theme)(e),(0,A.write_stored_theme)(e),O.theme_mode_preference.write(e),(0,T.write_document_preference_cookies)({theme_mode:e,theme:e}),O.theme_mode_preference.notify(),(0,E.notify_theme_subscribers)(),(0,m.notify_settings_saved)()},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"===s?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===s?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:I,role:"menuitem",onClick:()=>{let e;B(),e=f.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:"(?)"})]})})}),M?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===$?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:I,role:"menuitem",onClick:()=>{B(),e.push((0,d.build_auth_page_href)("sign_in",i))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${I} text-danger`,role:"menuitem",disabled:U,onClick:()=>{B(),K()},children:U?"Signing out…":"Sign out"})})]}):null]}):null]})}let $=[{id:"today",href:"/today",label:"Today"},{id:"search",href:"/search",label:"Search"},{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"}];function M(){let e=(0,n.usePathname)()??"/",i=(0,c.useSyncExternalStore)(v.topbar_quick_actions_preference.subscribe,v.topbar_quick_actions_preference.get_snapshot,v.topbar_quick_actions_preference.get_server_snapshot),s=(0,c.useMemo)(()=>_(i),[i]);if(0===s.length)return null;let o=$.filter(e=>s.includes(e.id));return 0===o.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:o.map(n=>{let i=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 ${i?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":i?"page":void 0,children:n.label},n.id)})})}var U=e.i(29539);function K(){let e=((0,n.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(r.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)(U.SettingsIcon,{})})}function F({current:e,parent:n}){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)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==n.href?(0,t.jsx)(r.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:n.href,children:n.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:n.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)(F,{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)(s,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(M,{}),(0,t.jsx)(l,{}),(0,t.jsx)(K,{}),(0,t.jsx)(R,{})]})]})]})})}],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}])},67999,e=>{"use strict";e.s(["get_serialized_entries_total_ms",0,function(e){return e.reduce((e,t)=>e+t.durationMs,0)}])},3159,e=>{"use strict";var t=e.i(97176);let r=new Set(["/api/note"]);async function n(e,n){let i={method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},s=await fetch(e,i);if(!s.ok){var o,a;let t,n=(await s.json()).error??"Request failed";if(o=e,a=n,r.has(o)&&((t=a.toLowerCase()).includes("duplicate key")||t.includes("unique constraint"))){if(await new Promise(e=>{setTimeout(e,25)}),!(s=await fetch(e,i)).ok)throw Error((await s.json()).error??n)}else throw Error(n)}let l=await s.json();return(0,t.notify_tracker_db_cloud_sync)(e,n),l}e.s(["patch_tracker_action",0,n])},18774,e=>{"use strict";e.s(["format_display_tag",0,function(e){return e.startsWith("@")?e:`@${e}`}])},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}`}])},14260,e=>{"use strict";var t=e.i(8063),r=e.i(51268),n=e.i(18774),i=e.i(52405),s=e.i(31113);e.s(["TagAutocompleteInput",0,function({id:e,value:o,known_tags:a,placeholder:l,disabled:c=!1,autoFocus:u=!1,on_change:d}){let m=(0,r.useRef)(null),p=(0,r.useRef)(null),h=(0,r.useRef)(null),[f,_]=(0,r.useState)(0),[g,b]=(0,r.useState)(0),x=function(e,t){let r=e.slice(0,t),n=r.lastIndexOf("@");if(-1===n)return null;let i=r.slice(n+1);return/\s/.test(i)?null:{query:i,start_index:n,end_index:t}}(o,f),y=null===x?[]: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)}(a,x.query),v=null!==x&&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}})}(x.query,a),w=null!==x&&y.length>0&&!v&&!c;(0,r.useLayoutEffect)(()=>{null!==h.current&&null!==m.current&&(m.current.setSelectionRange(h.current,h.current),_(h.current),h.current=null)},[o]),(0,r.useEffect)(()=>{b(0)},[o,f,y.length]);let j=()=>{_(m.current?.selectionStart??o.length)},k=()=>{b(0)},N=e=>{let t,r,i;if(null===x)return;let{next_text:s,next_cursor:a}=(t=(0,n.format_display_tag)(e),r=o.slice(0,x.start_index),i=o.slice(x.end_index),{next_text:`${r}${t}${i}`,next_cursor:r.length+t.length});h.current=a,d(s),k()};return(0,t.jsxs)("div",{className:"relative min-w-0",children:[(0,t.jsx)("input",{ref:m,id:e,type:"text",role:"combobox",className:(0,i.get_input_class_name)(),value:o,placeholder:l,disabled:c,autoFocus:u,autoComplete:"off","aria-autocomplete":"list","aria-expanded":w,"aria-controls":w?`${e}-tag-suggestions`:void 0,onChange:e=>{d(e.target.value),_(e.target.selectionStart??e.target.value.length)},onClick:j,onKeyUp:j,onKeyDown:e=>{if(w){if("ArrowDown"===e.key){e.preventDefault(),b(e=>(e+1)%y.length);return}if("ArrowUp"===e.key){e.preventDefault(),b(e=>(e-1+y.length)%y.length);return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault();let t=y[g];void 0!==t&&N(t);return}"Escape"===e.key&&(e.preventDefault(),k())}},onBlur:()=>{window.setTimeout(k,120)}}),w?(0,t.jsx)("ul",{ref:p,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===g,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===g?"bg-surface-hover":""}`,onMouseDown:t=>{t.preventDefault(),N(e)},children:(0,n.format_display_tag)(e)})},e))}):null]})}],14260)},69472,84545,50937,83327,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CLAUDE_API_KEY_STORAGE_KEY,default_value:r.CLAUDE_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["claude_api_key_preference",0,n],69472);let i=(0,t.create_ui_preference_store)({storage_key:r.ENTRY_SUGGESTION_PROVIDER_STORAGE_KEY,default_value:r.ENTRY_SUGGESTION_PROVIDER_DEFAULT,is_valid:e=>"none"===e||"openai"===e||"claude"===e||"google_ai"===e});e.s(["entry_suggestion_provider_preference",0,i],84545);let s=(0,t.create_ui_preference_store)({storage_key:r.GOOGLE_AI_API_KEY_STORAGE_KEY,default_value:r.GOOGLE_AI_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["google_ai_api_key_preference",0,s],50937);let o=(0,t.create_ui_preference_store)({storage_key:r.OPENAI_API_KEY_STORAGE_KEY,default_value:r.OPENAI_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["openai_api_key_preference",0,o],83327)},35877,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DEBUG_LOGGING_STORAGE_KEY,default_value:r.DEBUG_LOGGING_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["debug_logging_preference",0,n])},92977,e=>{"use strict";var t=e.i(8063);e.s(["TrashIcon",0,function(){return(0,t.jsxs)("svg",{className:"h-[0.85rem] w-[0.85rem]",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:"M3 6h18"}),(0,t.jsx)("path",{d:"M8 6V4h8v2"}),(0,t.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),(0,t.jsx)("path",{d:"M10 11v6"}),(0,t.jsx)("path",{d:"M14 11v6"})]})}])},96947,59515,91966,e=>{"use strict";e.s(["get_api_key_for_suggestion_provider",0,function(e,t){return"openai"===e?t.openai:"claude"===e?t.claude:"google_ai"===e?t.google_ai:""}],96947);var t=e.i(35877);async function r(e){if("none"===e.provider)throw Error("AI suggestion provider is disabled");let r="true"===t.debug_logging_preference.read(),n=Date.now(),i={provider:e.provider,context:e.context,notes:e.notes,debug_logging:r};r&&console.info("[ai-suggestion] client request start",{provider:e.provider,context_length:e.context.length,notes_length:e.notes.length});try{let t=await fetch("/api/entry/suggest-description",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...i,api_key:e.api_key})});if(!t.ok){let i=await t.json().catch(()=>({}));throw r&&console.warn("[ai-suggestion] client request failed",{provider:e.provider,status:t.status,elapsed_ms:Date.now()-n,error:i.error??"Failed to suggest description"}),Error(i.error??"Failed to suggest description")}let s=await t.json(),o=s.description?.trim()??"";if(0===o.length)throw Error("Suggestion was empty");return r&&console.info("[ai-suggestion] client request success",{provider:e.provider,elapsed_ms:Date.now()-n,description_length:o.length}),o}catch(t){throw r&&console.error("[ai-suggestion] client request error",{provider:e.provider,elapsed_ms:Date.now()-n,error:t instanceof Error?t.message:String(t)}),t}}e.s(["request_ai_entry_description_suggestion",0,r],59515);var n=e.i(51268),i=e.i(36405);e.s(["use_confirm_destructive_actions",0,function(){return"true"===(0,n.useSyncExternalStore)(i.confirm_destructive_actions_preference.subscribe,i.confirm_destructive_actions_preference.get_snapshot,i.confirm_destructive_actions_preference.get_server_snapshot)}],91966)},98846,e=>{"use strict";var t=e.i(8063);e.s(["AiSparklesIcon",0,function(){return(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",role:"presentation","aria-hidden":"true",focusable:"false",children:(0,t.jsx)("path",{d:"M12 3l1.7 4.3L18 9l-4.3 1.7L12 15l-1.7-4.3L6 9l4.3-1.7L12 3zM19 14l.9 2.1L22 17l-2.1.9L19 20l-.9-2.1L16 17l2.1-.9L19 14zM5 15l.9 2.1L8 18l-2.1.9L5 21l-.9-2.1L2 18l2.1-.9L5 15z",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}])},28098,69837,e=>{"use strict";var t=e.i(8063),r=e.i(51268),n=e.i(37399),i=e.i(25204);let s="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 disabled:cursor-not-allowed disabled:opacity-55";e.s(["EntryActionsMenu",0,function(e){var o,a,l,c,u,d;let{current_sheet_name:m,sheets:p,is_pending:h,on_edit:f,on_add_note:_,on_show_add_note_form:g,on_revise_description_ai:b,can_revise_description_ai:x=!1,on_resume:y,entry_is_active:v=!1,can_split:w=!1,on_split:j,can_merge_previous:k=!1,can_merge_next:N=!1,on_merge:S,on_delete:E,on_archive:C,on_unarchive:O,entry_is_archived:T=!1,on_move:A}=e,L=p.find(e=>e.name===m),I=v||L?.hasActiveEntry===!0&&!v,P=v?"This entry is already active":"Another entry is active on this sheet",D=p.filter(e=>e.name!==m&&!0!==e.archived),[R,$]=(0,r.useState)(!1),M=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!R)return;let e=e=>{null===M.current||M.current.contains(e.target)||$(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[R]);let U=()=>{$(!1)};return(0,i.use_escape_to_cancel)(U,R),(0,t.jsxs)("div",{className:"relative shrink-0",ref:M,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex cursor-pointer appearance-none items-center justify-center rounded-none border-0 bg-transparent p-0.5 text-muted shadow-none hover:opacity-75 focus-visible:outline-2 focus-visible:outline-input-focus-border focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-55","aria-label":"Entry actions","aria-expanded":R,"aria-haspopup":"menu",disabled:h,onClick:()=>$(e=>!e),children:(0,t.jsx)(n.HamburgerIcon,{})}),R?(0,t.jsxs)("div",{className:"absolute right-0 top-full z-10 mt-1.5 min-w-56 rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[(o=h,a=U,l=f,(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:o,onClick:()=>{a(),l()},children:"Edit times"})})),function({is_pending:e,close_menu:r,on_show_add_note_form:n,on_add_note:i}){return void 0===n&&void 0===i?null:(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e,onClick:()=>{if(r(),void 0!==n)return void n();let e=function(){let e=window.prompt("Add note","");if(null===e)return null;let t=e.trim();return 0===t.length?null:t}();null!==e&&void 0!==i&&i(e)},children:"Add note"})})}({is_pending:h,close_menu:U,on_show_add_note_form:g,on_add_note:_}),function({is_pending:e,can_revise_description_ai:r,close_menu:n,on_revise_description_ai:i}){return void 0===i?null:(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e||!r,title:r?"Revise with AI":"Configure provider and key in Settings → AI suggestions",onClick:()=>{n(),i()},children:"Revise description with AI"})})}({is_pending:h,can_revise_description_ai:x,close_menu:U,on_revise_description_ai:b}),function({is_pending:e,resume_blocked:r,resume_blocked_reason:n,close_menu:i,on_resume:o}){return void 0===o?null:(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e||r,title:r?n:void 0,onClick:()=>{i(),o()},children:"Resume"})})}({is_pending:h,resume_blocked:I,resume_blocked_reason:P,close_menu:U,on_resume:y}),function({is_pending:e,can_split:r,close_menu:n,on_split:i}){return void 0===i?null:(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e||!r,title:r?"Split into two entries at a time":"Only completed entries can be split",onClick:()=>{if(n(),!r)return;let e=function(){let e=window.prompt("Split at what time?","1 hour ago");if(null===e)return null;let t=e.trim();return 0===t.length?null:t}();null!==e&&i(e)},children:"Split entry"})})}({is_pending:h,can_split:w,close_menu:U,on_split:j}),function({is_pending:e,can_merge_previous:r,can_merge_next:n,close_menu:i,on_merge:o}){return void 0===o?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e||!r,title:r?"Merge with the previous entry":"No touching previous entry",onClick:()=>{i(),r&&o("previous")},children:"Merge with previous"})}),(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e||!n,title:n?"Merge with the next entry":"No touching next entry",onClick:()=>{i(),n&&o("next")},children:"Merge with next"})})]})}({is_pending:h,can_merge_previous:k,can_merge_next:N,close_menu:U,on_merge:S}),(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("hr",{className:"my-1 border-0 border-t border-panel-border","aria-hidden":"true"})}),(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("p",{className:"m-0 px-2.5 py-0.5 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Move to sheet"})}),function({other_sheets:e,is_pending:r,close_menu:n,on_move:i}){return 0===e.length?(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:!0,children:"No other sheets"})}):e.map(e=>(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${s} pl-4`,role:"menuitem",disabled:r||e.hasActiveEntry,title:e.hasActiveEntry?"That sheet already has an active entry":void 0,onClick:()=>{n(),i(e.name)},children:e.name})},e.name))}({other_sheets:D,is_pending:h,close_menu:U,on_move:A}),function({is_pending:e,entry_is_archived:r,entry_is_active:n,close_menu:i,on_archive:o,on_unarchive:a}){return r?void 0===a?null:(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e,onClick:()=>{i(),a()},children:"Restore entry"})}):void 0===o?null:(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e||n,title:n?"Check out before archiving this entry":void 0,onClick:()=>{i(),o()},children:"Archive entry"})})}({is_pending:h,entry_is_archived:T,entry_is_active:v,close_menu:U,on_archive:C,on_unarchive:O}),(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("hr",{className:"my-1 border-0 border-t border-panel-border","aria-hidden":"true"})}),(c=h,u=U,d=E,(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${s} text-danger`,role:"menuitem",disabled:c,onClick:()=>{u(),d()},children:"Delete"})}))]}):null]})}],28098);var o=e.i(39552);e.s(["format_datetime_hint",0,function(e){return(0,o.format)(new Date(e),"MMM d, h:mm a")}],69837)},7568,491,42441,34937,e=>{"use strict";var t=e.i(8063),r=e.i(51268),n=e.i(69837),i=e.i(14260),s=e.i(98846),o=e.i(44356),a=e.i(52663),l=e.i(52405),c=e.i(25204);e.s(["EntryEditForm",0,function({entry:e,known_tags:u,is_pending:d,initial_description_override:m,in_active_panel:p=!1,times_only:h=!1,start_only:f=!1,on_save:_,on_cancel:g,on_revise_ai:b,is_ai_revise_pending:x=!1}){let y=(0,r.useMemo)(()=>m??(0,o.build_resume_description)(e.description,e.tags),[e.description,e.tags,m]),[v,w]=(0,r.useState)(y),[j,k]=(0,r.useState)(""),[N,S]=(0,r.useState)("");(0,r.useEffect)(()=>{w(m??(0,o.build_resume_description)(e.description,e.tags)),k(""),S("")},[e.description,e.id,e.sheetName,e.tags,m]),(0,c.use_escape_to_cancel)(g);let E=e.isActive?"still running":(0,n.format_datetime_hint)(e.end??e.start),C=h?j.trim().length>0||!f&&N.trim().length>0:v.trim()!==y.trim()||j.trim().length>0||!f&&N.trim().length>0;return(0,t.jsxs)("form",{className:`flex flex-col gap-3 rounded-[0.65rem] border border-panel-border bg-input-bg p-3 ${p?"mt-2":""}`,onSubmit:e=>{e.preventDefault();let t=v.trim(),r=j.trim(),n=N.trim(),i={};h||t===y.trim()||(i.description=t),r.length>0&&(i.start=r),!f&&n.length>0&&(i.end=n),(void 0!==i.description||void 0!==i.start||void 0!==i.end)&&_(i)},children:[(0,t.jsx)("p",{className:"m-0 text-[0.85rem] font-semibold",children:h?"Edit times":"Edit entry"}),h?null:(0,t.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-description-${e.id}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"Description"}),void 0!==b?(0,t.jsxs)("button",{type:"button",className:"inline-flex cursor-pointer appearance-none items-center gap-1 rounded border-0 bg-transparent px-1.5 py-0.5 text-[0.72rem] text-muted shadow-none transition-opacity hover:opacity-75 disabled:cursor-not-allowed disabled:opacity-40",title:"Generate a new AI revision",disabled:d||x,onClick:b,children:[(0,t.jsx)(s.AiSparklesIcon,{}),x?"Generating…":"Regenerate"]}):null]}),(0,t.jsx)(i.TagAutocompleteInput,{id:`entry-description-${e.id}`,value:v,known_tags:u,placeholder:"e.g. crafting something @design",disabled:d,autoFocus:p,on_change:w})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("p",{className:"m-0 text-[0.8rem] font-semibold text-muted",children:"Times (optional)"}),(0,t.jsxs)("div",{className:`grid gap-2.5 max-[860px]:grid-cols-1 ${f?"grid-cols-1":"grid-cols-2"}`,children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-start-${e.id}`,children:[(0,t.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"Start"}),(0,t.jsxs)("span",{className:"text-[0.72rem] text-muted",children:["Current: ",(0,n.format_datetime_hint)(e.start)]}),(0,t.jsx)("input",{id:`entry-start-${e.id}`,className:(0,l.get_input_class_name)("compact"),value:j,onChange:e=>k(e.target.value),placeholder:"e.g. 10am, 30 minutes ago",disabled:d,autoFocus:h&&p})]}),f?null:(0,t.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-end-${e.id}`,children:[(0,t.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"End"}),(0,t.jsxs)("span",{className:"text-[0.72rem] text-muted",children:["Current: ",E]}),(0,t.jsx)("input",{id:`entry-end-${e.id}`,className:(0,l.get_input_class_name)("compact"),value:N,onChange:e=>S(e.target.value),placeholder:e.isActive?"e.g. now, 5 minutes ago":"e.g. 11:30am",disabled:d})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"submit",className:(0,a.get_button_class_name)("primary","small"),disabled:d||!C,children:"Save"}),(0,t.jsx)("button",{type:"button",className:(0,a.get_button_class_name)("ghost","small"),disabled:d,onClick:g,children:"Cancel"})]})]})}],7568),e.s(["ChevronIcon",0,function({rotated:e=!1,className:r=""}){return(0,t.jsx)("svg",{className:`h-3 w-3 shrink-0 transition-transform duration-150 ${e?"rotate-90":""} ${r}`.trim(),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:"m9 18 6-6-6-6"})})}],491),e.s(["NoteEditForm",0,function({initial_text:e,is_pending:n,inline:i=!1,on_save:s,on_cancel:o}){let[u,d]=(0,r.useState)(e);(0,c.use_escape_to_cancel)(o);let m=Math.min(6,Math.max(2,e.split("\n").length)),p=i?`${(0,l.get_input_class_name)()} min-h-10 w-full resize-y text-xs leading-snug`:`${(0,l.get_input_class_name)()} min-h-10 w-full resize-y text-[0.85rem] leading-snug`;return(0,t.jsxs)("form",{className:"flex w-full flex-col gap-1.5",onSubmit:e=>{e.preventDefault();let t=u.trim();0!==t.length&&s(t)},children:[(0,t.jsx)("textarea",{className:p,value:u,rows:m,disabled:n,onChange:e=>d(e.target.value)}),(0,t.jsxs)("div",{className:"flex justify-end gap-1.5",children:[(0,t.jsx)("button",{type:"button",className:(0,a.get_button_class_name)("ghost"),disabled:n,onClick:o,children:"Cancel"}),(0,t.jsx)("button",{type:"submit",className:(0,a.get_button_class_name)("ghost"),disabled:n||0===u.trim().length,children:"Save"})]})]})}],42441),e.s(["PencilIcon",0,function(){return(0,t.jsxs)("svg",{className:"h-[0.85rem] w-[0.85rem]",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 20h9"}),(0,t.jsx)("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"})]})}],34937)},4903,27707,e=>{"use strict";var t=e.i(8063),r=e.i(51268),n=e.i(491),i=e.i(75899),s=e.i(42441),o=e.i(34937),a=e.i(92977),l=e.i(35923);let c="inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-[0.35rem] border-0 bg-transparent p-0 text-muted hover:bg-surface-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-55";function u({note:e,is_inline:r,is_panel_in_bar:n,is_pending:l,is_editing:d,time_format:m,on_cancel_edit:p,on_save:h,on_start_edit:f,on_delete:_,on_edit_note:g,on_delete_note:b}){let x=r?"flex flex-col gap-0.5 rounded-sm border border-panel-border bg-ghost-bg px-2 py-1.5 compact:rounded-none compact:px-1.5 compact:py-1":n?"flex min-h-0 flex-col justify-center gap-0.5 rounded-sm border border-panel-border bg-[color-mix(in_srgb,var(--panel)_55%,var(--background))] px-2.5 py-2":"flex flex-col gap-0.5 rounded-sm border border-panel-border bg-[color-mix(in_srgb,var(--panel)_55%,var(--background))] px-2.5 py-2",y=function({is_pending:e,on_start_edit:r,on_delete:n,on_edit_note:i,on_delete_note:s}){return void 0===i&&void 0===s?null:(0,t.jsxs)("div",{className:"flex shrink-0 gap-0.5",children:[void 0===i?null:(0,t.jsx)("button",{type:"button",className:c,"aria-label":"Edit note",title:"Edit note",disabled:e,onClick:e=>{e.stopPropagation(),r()},children:(0,t.jsx)(o.PencilIcon,{})}),void 0===s?null:(0,t.jsx)("button",{type:"button",className:`${c} hover:text-danger`,"aria-label":"Delete note",title:"Delete note",disabled:e,onClick:e=>{e.stopPropagation(),n()},children:(0,t.jsx)(a.TrashIcon,{})})]})}({note:e,is_pending:l,on_start_edit:f,on_delete:_,on_edit_note:g,on_delete_note:b});return d?(0,t.jsx)("li",{className:x,children:(0,t.jsx)(s.NoteEditForm,{initial_text:e.text,inline:r,is_pending:l,on_cancel:p,on_save:h})}):r?(0,t.jsx)("li",{className:x,children:(0,t.jsxs)("div",{className:"flex w-full items-start justify-between gap-1.5",children:[(0,t.jsxs)("p",{className:"m-0 flex min-w-0 flex-1 items-baseline gap-1.5 text-xs leading-snug text-foreground compact:text-[0.72rem]",children:[(0,t.jsx)("time",{className:"shrink-0 font-mono text-[0.68rem] text-muted",dateTime:e.timestamp,children:(0,i.format_time)(e.timestamp,m)}),(0,t.jsx)("span",{className:"min-w-0 overflow-wrap-anywhere whitespace-pre-wrap",children:e.text})]}),y]})}):(0,t.jsxs)("li",{className:x,children:[(0,t.jsxs)("div",{className:"flex w-full items-start justify-between gap-1.5",children:[(0,t.jsx)("time",{className:"font-mono text-[0.72rem] text-muted",dateTime:e.timestamp,children:(0,i.format_time)(e.timestamp,m)}),y]}),(0,t.jsx)("p",{className:"m-0 overflow-wrap-anywhere text-[0.9rem] leading-snug whitespace-pre-wrap",children:e.text})]})}e.s(["EntryNotesList",0,function({notes:e,variant:i="panel",in_bar:s=!1,is_pending:o=!1,on_edit_note:a,on_delete_note:c}){var d;let m,p,h=(0,l.use_time_format)(),[f,_]=(0,r.useState)(null),[g,b]=(0,r.useState)("panel"===i&&!s);if(0===e.length)return null;let x=[...e].sort((e,t)=>new Date(e.timestamp).getTime()-new Date(t.timestamp).getTime()),y="inline"===i,v="panel"===i&&s,w=g||null!==f,j=(d=e.length,y?`${d} ${1===d?"note":"notes"}`:`Notes (${d})`),k=(m=[y?"m-0 w-full p-0":"border-t border-accent-border pt-3.5"],s&&!y&&m.push("border-[color-mix(in_srgb,var(--accent-border)_65%,var(--panel-border))]"),v&&w?m.push("flex min-h-0 flex-1 flex-col"):v&&m.push("flex shrink-0 flex-col"),m.join(" ")),N=y?"inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent p-0 font-inherit text-xs font-medium normal-case tracking-normal text-muted hover:text-foreground":"inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent px-0 py-0.5 font-inherit text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted hover:text-foreground",S=(p=w?"mt-1.5":"hidden",y?`m-0 flex list-none flex-col gap-1.5 overflow-visible p-0 compact:gap-0.5 ${p}`:v?`m-0 grid min-h-0 flex-1 list-none auto-rows-fr grid-cols-2 gap-2 p-0 max-[860px]:grid-cols-1 ${p}`:`m-0 grid list-none grid-cols-2 gap-2 p-0 max-[860px]:grid-cols-1 ${p}`);return(0,t.jsxs)("section",{className:k,"aria-label":"Entry notes",children:[(0,t.jsxs)("button",{type:"button",className:N,"aria-expanded":w,onClick:e=>{e.stopPropagation(),null===f&&b(e=>!e)},children:[(0,t.jsx)(n.ChevronIcon,{rotated:w}),(0,t.jsx)("span",{children:j})]}),(0,t.jsx)("ul",{className:S,children:x.map((e,r)=>(0,t.jsx)(u,{note:e,is_inline:y,is_panel_in_bar:v,is_pending:o,is_editing:f===e.timestamp,time_format:h,on_cancel_edit:()=>_(null),on_save:t=>{var r,n;return r=e.timestamp,n=e.text,void(a?.(r,n,t),_(null))},on_start_edit:()=>{var t;return t=e.timestamp,void(b(!0),_(t))},on_delete:()=>{var t,r;return t=e.timestamp,r=e.text,void(f===t&&_(null),c?.(t,r))},on_edit_note:a,on_delete_note:c},`${e.timestamp}-${r}`))})]})}],4903),e.s(["get_delete_entry_confirm_dialog",0,function(e){let t=e.description.trim()||"Untitled entry",r=e.isActive?" This will stop the active timer.":"";return{title:"Delete entry?",message:`Delete "${t}" on sheet "${e.sheetName}"?${r}`,confirmLabel:"Delete",variant:"danger"}}],27707)},51408,e=>{"use strict";e.s(["format_unknown_error",0,function(e){if(e instanceof Error)return e.message;if("string"==typeof e)return e;if(null==e)return"Unknown error";if("number"==typeof e||"boolean"==typeof e||"bigint"==typeof e||"symbol"==typeof e)return String(e);try{return JSON.stringify(e)}catch{return"Unknown error"}}])},20397,e=>{"use strict";var t=e.i(51268),r=e.i(4874);e.s(["use_entry_list_sort",0,function(){return(0,t.useSyncExternalStore)(r.entry_list_sort_preference.subscribe,r.entry_list_sort_preference.get_snapshot,r.entry_list_sort_preference.get_server_snapshot)}])},47540,e=>{"use strict";var t=e.i(31113);e.s(["tags_are_equal",0,function(e,r){try{return(0,t.normalize_stored_tag)(e)===(0,t.normalize_stored_tag)(r)}catch{return!1}}])},85323,e=>{"use strict";var t=e.i(49087);e.s(["notify_desktop",0,function(e){if((0,t.notify_in_app)({title:e.title,body:e.body}),"u"<typeof Notification||"u">typeof document&&"visible"===document.visibilityState&&document.hasFocus()||"granted"!==Notification.permission)return;let{body:r,tag:n,title:i}=e,s={body:r,...void 0!==n?{tag:n}:{}};try{new Notification(i,s)}catch{}},"supports_desktop_notifications",0,function(){return"u">typeof Notification}])},48541,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DESKTOP_NOTIFICATIONS_STORAGE_KEY,default_value:r.DESKTOP_NOTIFICATIONS_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["desktop_notifications_preference",0,n])},15526,e=>{"use strict";let t="super-time-tracker-pomodoro-active-entry";e.s(["clear_pomodoro_task_entry_marker",0,function(){try{window.localStorage.removeItem(t)}catch{}},"is_pomodoro_task_entry",0,function(e){let r=(()=>{try{let e=window.localStorage.getItem(t);if(null===e)return null;try{let t=JSON.parse(e);if("string"==typeof t.sheetName&&t.sheetName.length>0&&"number"==typeof t.entryId&&Number.isInteger(t.entryId))return{sheetName:t.sheetName,entryId:t.entryId}}catch{}return null}catch{return null}})();return null!==r&&r.sheetName===e.sheetName&&r.entryId===e.id},"mark_pomodoro_task_entry",0,function(e){try{let r={sheetName:e.sheetName,entryId:e.id};window.localStorage.setItem(t,JSON.stringify(r))}catch{}}])},53754,7554,76379,e=>{"use strict";var t=e.i(51268),r=e.i(19946);function n(e){let t=e?.at?.trim()??"",r=e?.note?.trim()??"",n=t.length>0,i=r.length>0,s="Stop the active timer and save this entry?";return n&&i?s=`Stop the timer at "${t}" and save a checkout note?`:n?s=`Stop the timer and check out at "${t}"?`:i&&(s="Stop the timer and save this entry with your checkout note?"),{title:"Check out?",message:s,confirmLabel:"Check out",variant:"danger"}}e.s(["get_check_out_confirm_dialog",0,n],7554);var i=e.i(97026);function s(){return"true"===(0,t.useSyncExternalStore)(i.confirm_before_checkout_preference.subscribe,i.confirm_before_checkout_preference.get_snapshot,i.confirm_before_checkout_preference.get_server_snapshot)}e.s(["use_confirm_before_checkout",0,s],76379),e.s(["useCheckOutAction",0,function(e){let{confirm:i}=(0,r.use_confirm_dialog)(),o=s();return(0,t.useCallback)(async t=>(!o||!!await i(n(t)))&&(e(t),!0),[i,o,e])}],53754)},50459,e=>{"use strict";e.s(["prompt_check_out_at",0,function(){let e=window.prompt("Check out at what time?","30 minutes ago");if(null===e)return null;let t=e.trim();return 0===t.length?null:t}])},36178,68713,e=>{"use strict";e.s(["build_check_out_request_payload",0,function(e,t){let r={sheetName:e},n=t?.at?.trim(),i=t?.note?.trim();return void 0!==n&&n.length>0&&(r.at=n),void 0!==i&&i.length>0&&(r.note=i),r}],36178);var t=e.i(26740),r=e.i(15526);e.s(["finish_running_pomodoro_timer",0,function(){try{let e=window.localStorage.getItem(t.POMODORO_STORAGE_KEY);if(null===e)return;let n=JSON.parse(e),i=n.state;if(i?.status!=="running")return;let s={settings:n.settings??t.POMODORO_DEFAULT_SETTINGS,state:t.POMODORO_DEFAULT_STATE};window.localStorage.setItem(t.POMODORO_STORAGE_KEY,JSON.stringify(s)),(0,r.clear_pomodoro_task_entry_marker)()}catch{}}],68713)},39474,20993,e=>{"use strict";var t=e.i(13349),r=e.i(32417),n=e.i(44171),i=e.i(28274);let s=null,o=Promise.resolve();function a(){(0,r.is_supabase_configured)()&&(0,n.is_cloud_sync_enabled)()&&(null!==s&&clearTimeout(s),s=setTimeout(()=>{s=null,o=o.then(()=>(0,i.run_tracker_db_cloud_sync)()).catch(()=>{})},400))}function l(){(0,t.is_greedy_cloud_sync_enabled)()&&a()}e.s(["schedule_tracker_db_cloud_sync",0,l],20993),e.s(["push_tracker_db_cloud_after_change",0,function(){(0,t.is_greedy_cloud_sync_enabled)()?l():a()}],39474)},97176,e=>{"use strict";var t=e.i(13349);async function r(e){let t=await fetch("/api/sheet/active",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})});if(!t.ok)throw Error((await t.json()).error??"Failed to update active sheet in cloud")}var n=e.i(39474),i=e.i(20993);e.s(["notify_tracker_db_cloud_sync",0,function(e,s){if("/api/sheet"===e&&"object"==typeof s&&null!==s&&!0!==s.delete&&!(0,t.is_greedy_cloud_sync_enabled)()){let e=s.name?.trim()??"";e.length>0&&r(e).catch(()=>{});return}(0,t.is_greedy_cloud_sync_enabled)()?(0,i.schedule_tracker_db_cloud_sync)():(0,n.push_tracker_db_cloud_after_change)()}],97176)},17003,e=>{"use strict";var t=e.i(27850),r=e.i(72550);e.s(["write_active_sheet_preference",0,function(e){let n=e.trim();if(0!==n.length){try{window.localStorage.setItem(r.ACTIVE_SHEET_STORAGE_KEY,n),(0,t.schedule_ui_preferences_cloud_sync)()}catch{}try{let e=encodeURIComponent(n);document.cookie=`${r.ACTIVE_SHEET_COOKIE_NAME}=${e}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}}}])},51229,e=>{"use strict";var t=e.i(97176);let r=new Set(["/api/note"]);async function n(e,n){let i={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},s=await fetch(e,i);if(!s.ok){var o,a;let t,n=(await s.json()).error??"Request failed";if(o=e,a=n,r.has(o)&&((t=a.toLowerCase()).includes("duplicate key")||t.includes("unique constraint"))){if(await new Promise(e=>{setTimeout(e,25)}),!(s=await fetch(e,i)).ok)throw Error((await s.json()).error??n)}else throw Error(n)}let l=await s.json();return(0,t.notify_tracker_db_cloud_sync)(e,n),l}e.s(["post_tracker_action",0,n])},87231,e=>{"use strict";e.s(["build_entry_search_href",0,function(e){let t=new URLSearchParams;e.query.trim().length>0&&t.set("q",e.query.trim()),e.sheetName.trim().length>0&&t.set("sheet",e.sheetName.trim()),e.tag.trim().length>0&&t.set("tag",e.tag.trim()),e.fromDate.trim().length>0&&t.set("from",e.fromDate.trim()),e.toDate.trim().length>0&&t.set("to",e.toDate.trim());let r=t.toString();return r.length>0?`/search?${r}`:"/search"}])},56586,e=>{"use strict";let t={query:"",sheetName:"",tag:"",fromDate:"",toDate:""};e.s(["get_empty_entry_search_filters",0,function(){return{...t}}])},49532,e=>{"use strict";let t=e=>"object"==typeof e&&null!==e&&"string"==typeof e.id&&"string"==typeof e.name&&"string"==typeof e.description;e.s(["read_entry_templates",0,function(){try{let e=window.localStorage.getItem("super-time-tracker-entry-templates");if(null===e)return[];let r=JSON.parse(e);if(!Array.isArray(r))return[];return r.filter(t)}catch{return[]}}])},6838,e=>{e.v(t=>Promise.all(["static/chunks/0fa.o-_asg9n7.js"].map(t=>e.l(t))).then(()=>t(19550)))},72432,e=>{e.v(t=>Promise.all(["static/chunks/0yc_so6bvu6on.js"].map(t=>e.l(t))).then(()=>t(11791)))}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,{otherChunks:["static/chunks/0~_1hgycum995.js","static/chunks/039umyocrekqe.js","static/chunks/0mp37.c08~r3d.js","static/chunks/0p4cjapdzyl6k.js","static/chunks/0k8-u5fk80qxa.js"],runtimeModuleIds:[28529]}]),(()=>{let e;if(!Array.isArray(globalThis.TURBOPACK))return;let t="/_next/",r=function(){if(null!=self.TURBOPACK_ASSET_SUFFIX)return self.TURBOPACK_ASSET_SUFFIX;let e=document?.currentScript?.getAttribute?.("src")??"",t=e.indexOf("?");return t>=0?e.slice(t):""}(),n=["NEXT_DEPLOYMENT_ID","NEXT_CLIENT_ASSET_SUFFIX"];var o,i=((o=i||{})[o.Runtime=0]="Runtime",o[o.Parent=1]="Parent",o[o.Update=2]="Update",o);let l=new WeakMap;function s(e,t){this.m=e,this.e=t}let u=s.prototype,a=Object.prototype.hasOwnProperty,c="u">typeof Symbol&&Symbol.toStringTag;function f(e,t,r){a.call(e,t)||Object.defineProperty(e,t,r)}function p(e,t){let r=e[t];return r||(r=h(t),e[t]=r),r}function h(e){return{exports:{},error:void 0,id:e,namespaceObject:void 0}}function d(e,t){f(e,"__esModule",{value:!0}),c&&f(e,c,{value:"Module"});let r=0;for(;r<t.length;){let n=t[r++],o=t[r++];if("number"==typeof o)if(0===o)f(e,n,{value:t[r++],enumerable:!0,writable:!1});else throw Error(`unexpected tag: ${o}`);else"function"==typeof t[r]?f(e,n,{get:o,set:t[r++],enumerable:!0}):f(e,n,{get:o,enumerable:!0})}Object.seal(e)}function m(e,t){(null!=t?p(this.c,t):this.m).exports=e}u.s=function(e,t){let r,n;null!=t?n=(r=p(this.c,t)).exports:(r=this.m,n=this.e),r.namespaceObject=n,d(n,e)},u.j=function(e,t){var r,n;let o,i,s;null!=t?i=(o=p(this.c,t)).exports:(o=this.m,i=this.e);let u=(r=o,n=i,(s=l.get(r))||(l.set(r,s=[]),r.exports=r.namespaceObject=new Proxy(n,{get(e,t){if(a.call(e,t)||"default"===t||"__esModule"===t)return Reflect.get(e,t);for(let e of s){let r=Reflect.get(e,t);if(void 0!==r)return r}},ownKeys(e){let t=Reflect.ownKeys(e);for(let e of s)for(let r of Reflect.ownKeys(e))"default"===r||t.includes(r)||t.push(r);return t}})),s);"object"==typeof e&&null!==e&&u.push(e)},u.v=m,u.n=function(e,t){let r;(r=null!=t?p(this.c,t):this.m).exports=r.namespaceObject=e};let b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,y=[null,b({}),b([]),b(b)];function g(e,t,r){let n=[],o=-1;for(let t=e;("object"==typeof t||"function"==typeof t)&&!y.includes(t);t=b(t))for(let r of Object.getOwnPropertyNames(t))n.push(r,function(e,t){return()=>e[t]}(e,r)),-1===o&&"default"===r&&(o=n.length-1);return r&&o>=0||(o>=0?n.splice(o,1,0,e):n.push("default",0,e)),d(t,n),t}function O(e){let t=B(e,this.m);if(t.namespaceObject)return t.namespaceObject;let r=t.exports;return t.namespaceObject=g(r,"function"==typeof r?function(...e){return r.apply(this,e)}:Object.create(null),r&&r.__esModule)}function w(e){let t=e.indexOf("#");-1!==t&&(e=e.substring(0,t));let r=e.indexOf("?");return -1!==r&&(e=e.substring(0,r)),e}function k(){let e,t;return{promise:new Promise((r,n)=>{t=n,e=r}),resolve:e,reject:t}}u.i=O,u.A=function(e){return this.r(e)(O.bind(this))},u.t="function"==typeof require?require:function(){throw Error("Unexpected use of runtime require")},u.r=function(e){return B(e,this.m).exports},u.f=function(e){function t(t){if(t=w(t),a.call(e,t))return e[t].module();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r}return t.keys=()=>Object.keys(e),t.resolve=t=>{if(t=w(t),a.call(e,t))return e[t].id();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r},t.import=async e=>await t(e),t};let j=Symbol("turbopack queues"),U=Symbol("turbopack exports"),C=Symbol("turbopack error");function P(e){e&&1!==e.status&&(e.status=1,e.forEach(e=>e.queueCount--),e.forEach(e=>e.queueCount--?e.queueCount++:e()))}u.a=function(e,t){let r=this.m,n=t?Object.assign([],{status:-1}):void 0,o=new Set,{resolve:i,reject:l,promise:s}=k(),u=Object.assign(s,{[U]:r.exports,[j]:e=>{n&&e(n),o.forEach(e),u.catch(()=>{})}}),a={get:()=>u,set(e){e!==u&&(u[U]=e)}};Object.defineProperty(r,"exports",a),Object.defineProperty(r,"namespaceObject",a),e(function(e){let t=e.map(e=>{if(null!==e&&"object"==typeof e){if(j in e)return e;if(null!=e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then){let t=Object.assign([],{status:0}),r={[U]:{},[j]:e=>e(t)};return e.then(e=>{r[U]=e,P(t)},e=>{r[C]=e,P(t)}),r}}return{[U]:e,[j]:()=>{}}}),r=()=>t.map(e=>{if(e[C])throw e[C];return e[U]}),{promise:i,resolve:l}=k(),s=Object.assign(()=>l(r),{queueCount:0});function u(e){e!==n&&!o.has(e)&&(o.add(e),e&&0===e.status&&(s.queueCount++,e.push(s)))}return t.map(e=>e[j](u)),s.queueCount?i:r()},function(e){e?l(u[C]=e):i(u[U]),P(n)}),n&&-1===n.status&&(n.status=0)};let v=function(e){let t=new URL(e,"x:/"),r={};for(let e in t)r[e]=t[e];for(let t in r.href=e,r.pathname=e.replace(/[?#].*/,""),r.origin=r.protocol="",r.toString=r.toJSON=(...t)=>e,r)Object.defineProperty(this,t,{enumerable:!0,configurable:!0,value:r[t]})};function R(e,t){throw Error(`Invariant: ${t(e)}`)}v.prototype=URL.prototype,u.U=v,u.z=function(e){throw Error("dynamic usage of require is not supported")},u.g=globalThis;let S=s.prototype,$=new Map;u.M=$;let _=new Map,E=new Map;async function T(e,t,r){let n;if("string"==typeof r)return M(e,t,q(r));let o=r.included||[],i=o.map(e=>!!$.has(e)||_.get(e));if(i.length>0&&i.every(e=>e))return void await Promise.all(i);let l=r.moduleChunks||[],s=l.map(e=>E.get(e)).filter(e=>e);if(s.length>0){if(s.length===l.length)return void await Promise.all(s);let r=new Set;for(let e of l)E.has(e)||r.add(e);for(let n of r){let r=M(e,t,q(n));E.set(n,r),s.push(r)}n=Promise.all(s)}else{for(let o of(n=M(e,t,q(r.path)),l))E.has(o)||E.set(o,n)}for(let e of o)_.has(e)||_.set(e,n);await n}S.l=function(e){return T(i.Parent,this.m.id,e)};let A=Promise.resolve(void 0),x=new WeakMap;function M(t,r,n){let o=e.loadChunkCached(t,n),l=x.get(o);if(void 0===l){let e=x.set.bind(x,o,A);l=o.then(e).catch(e=>{let o;switch(t){case i.Runtime:o=`as a runtime dependency of chunk ${r}`;break;case i.Parent:o=`from module ${r}`;break;case i.Update:o="from an HMR update";break;default:R(t,e=>`Unknown source type: ${e}`)}let l=Error(`Failed to load chunk ${n} ${o}${e?`: ${e}`:""}`,e?{cause:e}:void 0);throw l.name="ChunkLoadError",l}),x.set(o,l)}return l}function q(e){return`${t}${e.split("/").map(e=>encodeURIComponent(e)).join("/")}${r}`}S.L=function(e){return M(i.Parent,this.m.id,e)},S.R=function(e){let t=this.r(e);return t?.default??t},S.P=function(e){return`/ROOT/${e??""}`},S.q=function(e,t){m.call(this,`${e}${r}`,t)},S.b=function(e,t,o,i){let l="SharedWorker"===e.name,s=[o.map(e=>q(e)).reverse(),r];for(let e of n)s.push(globalThis[e]);let u=new URL(q(t),location.origin),a=JSON.stringify(s);return l?u.searchParams.set("params",a):u.hash="#params="+encodeURIComponent(a),new e(u,i?{...i,type:void 0}:void 0)};let N=/\.js(?:\?[^#]*)?(?:#.*)?$/,K=/\.css(?:\?[^#]*)?(?:#.*)?$/;function L(e){return K.test(e)}u.w=function(t,r,n){return e.loadWebAssembly(i.Parent,this.m.id,t,r,n)},u.u=function(t,r){return e.loadWebAssemblyModule(i.Parent,this.m.id,t,r)};let I={};u.c=I;let B=(e,t)=>{let r=I[e];if(r){if(r.error)throw r.error;return r}return W(e,i.Parent,t.id)};function W(e,t,r){let n=$.get(e);if("function"!=typeof n)throw Error(function(e,t,r){let n;switch(t){case 0:n=`as a runtime entry of chunk ${r}`;break;case 1:n=`because it was required from module ${r}`;break;case 2:n="because of an HMR update";break;default:R(t,e=>`Unknown source type: ${e}`)}return`Module ${e} was instantiated ${n}, but the module factory is not available.`}(e,t,r));let o=h(e),i=o.exports;I[e]=o;let l=new s(o,i);try{n(l,o,i)}catch(e){throw o.error=e,e}return o.namespaceObject&&o.exports!==o.namespaceObject&&g(o.exports,o.namespaceObject),o}function F(t){let r,n=function(e){if("string"==typeof e)return e;if(e)return{src:e.getAttribute("src")};if("u">typeof TURBOPACK_NEXT_CHUNK_URLS)return{src:TURBOPACK_NEXT_CHUNK_URLS.pop()};throw Error("chunk path empty but not in a worker")}(t[0]);return 2===t.length?r=t[1]:(r=void 0,!function(e,t){let r=1;for(;r<e.length;){let n,o=r+1;for(;o<e.length&&"function"!=typeof e[o];)o++;if(o===e.length)throw Error("malformed chunk format, expected a factory function");let i=e[o];for(let i=r;i<o;i++){let r=e[i],o=t.get(r);if(o){n=o;break}}let l=n??i,s=!1;for(let n=r;n<o;n++){let r=e[n];t.has(r)||(s||(l===i&&Object.defineProperty(i,"name",{value:"module evaluation"}),s=!0),t.set(r,l))}r=o+1}}(t,$)),e.registerChunk(n,r)}let X=new Map;function D(e){let t=X.get(e);if(!t){let r,n;t={resolved:!1,loadingStarted:!1,promise:new Promise((e,t)=>{r=e,n=t}),resolve:()=>{t.resolved=!0,r()},reject:n},X.set(e,t)}return t}e={async registerChunk(e,r){let n=function(e){if("string"==typeof e)return e;let r=decodeURIComponent(e.src.replace(/[?#].*$/,""));return r.startsWith(t)?r.slice(t.length):r}(e);if(D("string"==typeof e?q(e):e.src).resolve(),null!=r){for(let e of r.otherChunks)D(q("string"==typeof e?e:e.path));if(await Promise.all(r.otherChunks.map(e=>T(i.Runtime,n,e))),r.runtimeModuleIds.length>0)for(let e of r.runtimeModuleIds)!function(e,t){let r=I[t];if(r){if(r.error)throw r.error;return}W(t,i.Runtime,e)}(n,e)}},loadChunkCached:(e,t)=>(function(e,t){let r=D(t);if(r.loadingStarted)return r.promise;if(e===i.Runtime)return r.loadingStarted=!0,L(t)&&r.resolve(),r.promise;if("function"==typeof importScripts)if(L(t));else if(N.test(t))self.TURBOPACK_NEXT_CHUNK_URLS.push(t),importScripts(t);else throw Error(`can't infer type of chunk from URL ${t} in worker`);else{let e=decodeURI(t);if(L(t))if(document.querySelectorAll(`link[rel=stylesheet][href="${t}"],link[rel=stylesheet][href^="${t}?"],link[rel=stylesheet][href="${e}"],link[rel=stylesheet][href^="${e}?"]`).length>0)r.resolve();else{let e=document.createElement("link");e.rel="stylesheet",e.href=t,e.onerror=()=>{r.reject()},e.onload=()=>{r.resolve()},document.head.appendChild(e)}else if(N.test(t)){let n=document.querySelectorAll(`script[src="${t}"],script[src^="${t}?"],script[src="${e}"],script[src^="${e}?"]`);if(n.length>0)for(let e of Array.from(n))e.addEventListener("error",()=>{r.reject()});else{let e=document.createElement("script");e.src=t,e.onerror=()=>{r.reject()},document.head.appendChild(e)}}else throw Error(`can't infer type of chunk from URL ${t}`)}return r.loadingStarted=!0,r.promise})(e,t),async loadWebAssembly(e,t,r,n,o){let i=fetch(q(r)),{instance:l}=await WebAssembly.instantiateStreaming(i,o);return l.exports},async loadWebAssemblyModule(e,t,r,n){let o=fetch(q(r));return await WebAssembly.compileStreaming(o)}};let H=globalThis.TURBOPACK;globalThis.TURBOPACK={push:F},H.forEach(F)})();
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,{otherChunks:["static/chunks/0~_1hgycum995.js","static/chunks/039umyocrekqe.js","static/chunks/0mp37.c08~r3d.js","static/chunks/05q3gfx1e8sea.js","static/chunks/0k8-u5fk80qxa.js"],runtimeModuleIds:[28529]}]),(()=>{let e;if(!Array.isArray(globalThis.TURBOPACK))return;let t="/_next/",r=function(){if(null!=self.TURBOPACK_ASSET_SUFFIX)return self.TURBOPACK_ASSET_SUFFIX;let e=document?.currentScript?.getAttribute?.("src")??"",t=e.indexOf("?");return t>=0?e.slice(t):""}(),n=["NEXT_DEPLOYMENT_ID","NEXT_CLIENT_ASSET_SUFFIX"];var o,i=((o=i||{})[o.Runtime=0]="Runtime",o[o.Parent=1]="Parent",o[o.Update=2]="Update",o);let l=new WeakMap;function s(e,t){this.m=e,this.e=t}let u=s.prototype,a=Object.prototype.hasOwnProperty,c="u">typeof Symbol&&Symbol.toStringTag;function f(e,t,r){a.call(e,t)||Object.defineProperty(e,t,r)}function p(e,t){let r=e[t];return r||(r=h(t),e[t]=r),r}function h(e){return{exports:{},error:void 0,id:e,namespaceObject:void 0}}function d(e,t){f(e,"__esModule",{value:!0}),c&&f(e,c,{value:"Module"});let r=0;for(;r<t.length;){let n=t[r++],o=t[r++];if("number"==typeof o)if(0===o)f(e,n,{value:t[r++],enumerable:!0,writable:!1});else throw Error(`unexpected tag: ${o}`);else"function"==typeof t[r]?f(e,n,{get:o,set:t[r++],enumerable:!0}):f(e,n,{get:o,enumerable:!0})}Object.seal(e)}function m(e,t){(null!=t?p(this.c,t):this.m).exports=e}u.s=function(e,t){let r,n;null!=t?n=(r=p(this.c,t)).exports:(r=this.m,n=this.e),r.namespaceObject=n,d(n,e)},u.j=function(e,t){var r,n;let o,i,s;null!=t?i=(o=p(this.c,t)).exports:(o=this.m,i=this.e);let u=(r=o,n=i,(s=l.get(r))||(l.set(r,s=[]),r.exports=r.namespaceObject=new Proxy(n,{get(e,t){if(a.call(e,t)||"default"===t||"__esModule"===t)return Reflect.get(e,t);for(let e of s){let r=Reflect.get(e,t);if(void 0!==r)return r}},ownKeys(e){let t=Reflect.ownKeys(e);for(let e of s)for(let r of Reflect.ownKeys(e))"default"===r||t.includes(r)||t.push(r);return t}})),s);"object"==typeof e&&null!==e&&u.push(e)},u.v=m,u.n=function(e,t){let r;(r=null!=t?p(this.c,t):this.m).exports=r.namespaceObject=e};let b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,y=[null,b({}),b([]),b(b)];function g(e,t,r){let n=[],o=-1;for(let t=e;("object"==typeof t||"function"==typeof t)&&!y.includes(t);t=b(t))for(let r of Object.getOwnPropertyNames(t))n.push(r,function(e,t){return()=>e[t]}(e,r)),-1===o&&"default"===r&&(o=n.length-1);return r&&o>=0||(o>=0?n.splice(o,1,0,e):n.push("default",0,e)),d(t,n),t}function O(e){let t=B(e,this.m);if(t.namespaceObject)return t.namespaceObject;let r=t.exports;return t.namespaceObject=g(r,"function"==typeof r?function(...e){return r.apply(this,e)}:Object.create(null),r&&r.__esModule)}function w(e){let t=e.indexOf("#");-1!==t&&(e=e.substring(0,t));let r=e.indexOf("?");return -1!==r&&(e=e.substring(0,r)),e}function k(){let e,t;return{promise:new Promise((r,n)=>{t=n,e=r}),resolve:e,reject:t}}u.i=O,u.A=function(e){return this.r(e)(O.bind(this))},u.t="function"==typeof require?require:function(){throw Error("Unexpected use of runtime require")},u.r=function(e){return B(e,this.m).exports},u.f=function(e){function t(t){if(t=w(t),a.call(e,t))return e[t].module();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r}return t.keys=()=>Object.keys(e),t.resolve=t=>{if(t=w(t),a.call(e,t))return e[t].id();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r},t.import=async e=>await t(e),t};let j=Symbol("turbopack queues"),U=Symbol("turbopack exports"),C=Symbol("turbopack error");function P(e){e&&1!==e.status&&(e.status=1,e.forEach(e=>e.queueCount--),e.forEach(e=>e.queueCount--?e.queueCount++:e()))}u.a=function(e,t){let r=this.m,n=t?Object.assign([],{status:-1}):void 0,o=new Set,{resolve:i,reject:l,promise:s}=k(),u=Object.assign(s,{[U]:r.exports,[j]:e=>{n&&e(n),o.forEach(e),u.catch(()=>{})}}),a={get:()=>u,set(e){e!==u&&(u[U]=e)}};Object.defineProperty(r,"exports",a),Object.defineProperty(r,"namespaceObject",a),e(function(e){let t=e.map(e=>{if(null!==e&&"object"==typeof e){if(j in e)return e;if(null!=e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then){let t=Object.assign([],{status:0}),r={[U]:{},[j]:e=>e(t)};return e.then(e=>{r[U]=e,P(t)},e=>{r[C]=e,P(t)}),r}}return{[U]:e,[j]:()=>{}}}),r=()=>t.map(e=>{if(e[C])throw e[C];return e[U]}),{promise:i,resolve:l}=k(),s=Object.assign(()=>l(r),{queueCount:0});function u(e){e!==n&&!o.has(e)&&(o.add(e),e&&0===e.status&&(s.queueCount++,e.push(s)))}return t.map(e=>e[j](u)),s.queueCount?i:r()},function(e){e?l(u[C]=e):i(u[U]),P(n)}),n&&-1===n.status&&(n.status=0)};let v=function(e){let t=new URL(e,"x:/"),r={};for(let e in t)r[e]=t[e];for(let t in r.href=e,r.pathname=e.replace(/[?#].*/,""),r.origin=r.protocol="",r.toString=r.toJSON=(...t)=>e,r)Object.defineProperty(this,t,{enumerable:!0,configurable:!0,value:r[t]})};function R(e,t){throw Error(`Invariant: ${t(e)}`)}v.prototype=URL.prototype,u.U=v,u.z=function(e){throw Error("dynamic usage of require is not supported")},u.g=globalThis;let S=s.prototype,$=new Map;u.M=$;let _=new Map,E=new Map;async function T(e,t,r){let n;if("string"==typeof r)return M(e,t,q(r));let o=r.included||[],i=o.map(e=>!!$.has(e)||_.get(e));if(i.length>0&&i.every(e=>e))return void await Promise.all(i);let l=r.moduleChunks||[],s=l.map(e=>E.get(e)).filter(e=>e);if(s.length>0){if(s.length===l.length)return void await Promise.all(s);let r=new Set;for(let e of l)E.has(e)||r.add(e);for(let n of r){let r=M(e,t,q(n));E.set(n,r),s.push(r)}n=Promise.all(s)}else{for(let o of(n=M(e,t,q(r.path)),l))E.has(o)||E.set(o,n)}for(let e of o)_.has(e)||_.set(e,n);await n}S.l=function(e){return T(i.Parent,this.m.id,e)};let A=Promise.resolve(void 0),x=new WeakMap;function M(t,r,n){let o=e.loadChunkCached(t,n),l=x.get(o);if(void 0===l){let e=x.set.bind(x,o,A);l=o.then(e).catch(e=>{let o;switch(t){case i.Runtime:o=`as a runtime dependency of chunk ${r}`;break;case i.Parent:o=`from module ${r}`;break;case i.Update:o="from an HMR update";break;default:R(t,e=>`Unknown source type: ${e}`)}let l=Error(`Failed to load chunk ${n} ${o}${e?`: ${e}`:""}`,e?{cause:e}:void 0);throw l.name="ChunkLoadError",l}),x.set(o,l)}return l}function q(e){return`${t}${e.split("/").map(e=>encodeURIComponent(e)).join("/")}${r}`}S.L=function(e){return M(i.Parent,this.m.id,e)},S.R=function(e){let t=this.r(e);return t?.default??t},S.P=function(e){return`/ROOT/${e??""}`},S.q=function(e,t){m.call(this,`${e}${r}`,t)},S.b=function(e,t,o,i){let l="SharedWorker"===e.name,s=[o.map(e=>q(e)).reverse(),r];for(let e of n)s.push(globalThis[e]);let u=new URL(q(t),location.origin),a=JSON.stringify(s);return l?u.searchParams.set("params",a):u.hash="#params="+encodeURIComponent(a),new e(u,i?{...i,type:void 0}:void 0)};let N=/\.js(?:\?[^#]*)?(?:#.*)?$/,K=/\.css(?:\?[^#]*)?(?:#.*)?$/;function L(e){return K.test(e)}u.w=function(t,r,n){return e.loadWebAssembly(i.Parent,this.m.id,t,r,n)},u.u=function(t,r){return e.loadWebAssemblyModule(i.Parent,this.m.id,t,r)};let I={};u.c=I;let B=(e,t)=>{let r=I[e];if(r){if(r.error)throw r.error;return r}return W(e,i.Parent,t.id)};function W(e,t,r){let n=$.get(e);if("function"!=typeof n)throw Error(function(e,t,r){let n;switch(t){case 0:n=`as a runtime entry of chunk ${r}`;break;case 1:n=`because it was required from module ${r}`;break;case 2:n="because of an HMR update";break;default:R(t,e=>`Unknown source type: ${e}`)}return`Module ${e} was instantiated ${n}, but the module factory is not available.`}(e,t,r));let o=h(e),i=o.exports;I[e]=o;let l=new s(o,i);try{n(l,o,i)}catch(e){throw o.error=e,e}return o.namespaceObject&&o.exports!==o.namespaceObject&&g(o.exports,o.namespaceObject),o}function F(t){let r,n=function(e){if("string"==typeof e)return e;if(e)return{src:e.getAttribute("src")};if("u">typeof TURBOPACK_NEXT_CHUNK_URLS)return{src:TURBOPACK_NEXT_CHUNK_URLS.pop()};throw Error("chunk path empty but not in a worker")}(t[0]);return 2===t.length?r=t[1]:(r=void 0,!function(e,t){let r=1;for(;r<e.length;){let n,o=r+1;for(;o<e.length&&"function"!=typeof e[o];)o++;if(o===e.length)throw Error("malformed chunk format, expected a factory function");let i=e[o];for(let i=r;i<o;i++){let r=e[i],o=t.get(r);if(o){n=o;break}}let l=n??i,s=!1;for(let n=r;n<o;n++){let r=e[n];t.has(r)||(s||(l===i&&Object.defineProperty(i,"name",{value:"module evaluation"}),s=!0),t.set(r,l))}r=o+1}}(t,$)),e.registerChunk(n,r)}let X=new Map;function D(e){let t=X.get(e);if(!t){let r,n;t={resolved:!1,loadingStarted:!1,promise:new Promise((e,t)=>{r=e,n=t}),resolve:()=>{t.resolved=!0,r()},reject:n},X.set(e,t)}return t}e={async registerChunk(e,r){let n=function(e){if("string"==typeof e)return e;let r=decodeURIComponent(e.src.replace(/[?#].*$/,""));return r.startsWith(t)?r.slice(t.length):r}(e);if(D("string"==typeof e?q(e):e.src).resolve(),null!=r){for(let e of r.otherChunks)D(q("string"==typeof e?e:e.path));if(await Promise.all(r.otherChunks.map(e=>T(i.Runtime,n,e))),r.runtimeModuleIds.length>0)for(let e of r.runtimeModuleIds)!function(e,t){let r=I[t];if(r){if(r.error)throw r.error;return}W(t,i.Runtime,e)}(n,e)}},loadChunkCached:(e,t)=>(function(e,t){let r=D(t);if(r.loadingStarted)return r.promise;if(e===i.Runtime)return r.loadingStarted=!0,L(t)&&r.resolve(),r.promise;if("function"==typeof importScripts)if(L(t));else if(N.test(t))self.TURBOPACK_NEXT_CHUNK_URLS.push(t),importScripts(t);else throw Error(`can't infer type of chunk from URL ${t} in worker`);else{let e=decodeURI(t);if(L(t))if(document.querySelectorAll(`link[rel=stylesheet][href="${t}"],link[rel=stylesheet][href^="${t}?"],link[rel=stylesheet][href="${e}"],link[rel=stylesheet][href^="${e}?"]`).length>0)r.resolve();else{let e=document.createElement("link");e.rel="stylesheet",e.href=t,e.onerror=()=>{r.reject()},e.onload=()=>{r.resolve()},document.head.appendChild(e)}else if(N.test(t)){let n=document.querySelectorAll(`script[src="${t}"],script[src^="${t}?"],script[src="${e}"],script[src^="${e}?"]`);if(n.length>0)for(let e of Array.from(n))e.addEventListener("error",()=>{r.reject()});else{let e=document.createElement("script");e.src=t,e.onerror=()=>{r.reject()},document.head.appendChild(e)}}else throw Error(`can't infer type of chunk from URL ${t}`)}return r.loadingStarted=!0,r.promise})(e,t),async loadWebAssembly(e,t,r,n,o){let i=fetch(q(r)),{instance:l}=await WebAssembly.instantiateStreaming(i,o);return l.exports},async loadWebAssemblyModule(e,t,r,n){let o=fetch(q(r));return await WebAssembly.compileStreaming(o)}};let H=globalThis.TURBOPACK;globalThis.TURBOPACK={push:F},H.forEach(F)})();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-time-tracker-ui",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "description": "Web UI for the super-time-tracker CLI time sheets",
5
5
  "keywords": [
6
6
  "nextjs",
@@ -1 +1,19 @@
1
- {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
1
+ {
2
+ "name": "",
3
+ "short_name": "",
4
+ "icons": [
5
+ {
6
+ "src": "/android-chrome-192x192.png",
7
+ "sizes": "192x192",
8
+ "type": "image/png"
9
+ },
10
+ {
11
+ "src": "/android-chrome-512x512.png",
12
+ "sizes": "512x512",
13
+ "type": "image/png"
14
+ }
15
+ ],
16
+ "theme_color": "#ffffff",
17
+ "background_color": "#ffffff",
18
+ "display": "standalone"
19
+ }
@@ -1,30 +1,30 @@
1
- {
2
- "name": "Super Time Tracker",
3
- "short_name": "Time Tracker",
4
- "description": "Track time, focus sessions, and Pomodoro cycles offline.",
5
- "start_url": "/",
6
- "scope": "/",
7
- "display": "standalone",
8
- "background_color": "#0f172a",
9
- "theme_color": "#14b8a6",
10
- "icons": [
11
- {
12
- "src": "/icons/android-chrome-192x192.png",
13
- "sizes": "192x192",
14
- "type": "image/png",
15
- "purpose": "any"
16
- },
17
- {
18
- "src": "/icons/android-chrome-512x512.png",
19
- "sizes": "512x512",
20
- "type": "image/png",
21
- "purpose": "any"
22
- },
23
- {
24
- "src": "/icons/android-chrome-512x512.png",
25
- "sizes": "512x512",
26
- "type": "image/png",
27
- "purpose": "maskable"
28
- }
29
- ]
30
- }
1
+ {
2
+ "name": "Super Time Tracker",
3
+ "short_name": "Time Tracker",
4
+ "description": "Track time, focus sessions, and Pomodoro cycles offline.",
5
+ "start_url": "/",
6
+ "scope": "/",
7
+ "display": "standalone",
8
+ "background_color": "#0f172a",
9
+ "theme_color": "#14b8a6",
10
+ "icons": [
11
+ {
12
+ "src": "/icons/android-chrome-192x192.png",
13
+ "sizes": "192x192",
14
+ "type": "image/png",
15
+ "purpose": "any"
16
+ },
17
+ {
18
+ "src": "/icons/android-chrome-512x512.png",
19
+ "sizes": "512x512",
20
+ "type": "image/png",
21
+ "purpose": "any"
22
+ },
23
+ {
24
+ "src": "/icons/android-chrome-512x512.png",
25
+ "sizes": "512x512",
26
+ "type": "image/png",
27
+ "purpose": "maskable"
28
+ }
29
+ ]
30
+ }
@@ -1,148 +1,149 @@
1
- const CACHE_NAME = 'super-time-tracker-cache-v3'
2
- const OFFLINE_URL = '/offline'
1
+ const CACHE_NAME = "super-time-tracker-cache-v3";
2
+ const OFFLINE_URL = "/offline";
3
3
  const PRECACHE_URLS = [
4
- '/',
4
+ "/",
5
5
  OFFLINE_URL,
6
- '/manifest.webmanifest',
7
- '/icons/favicon.ico',
8
- '/icons/favicon-16x16.png',
9
- '/icons/favicon-32x32.png',
10
- '/icons/apple-touch-icon.png',
11
- '/icons/android-chrome-192x192.png',
12
- '/icons/android-chrome-512x512.png',
13
- ]
6
+ "/manifest.webmanifest",
7
+ "/icons/favicon.ico",
8
+ "/icons/favicon-16x16.png",
9
+ "/icons/favicon-32x32.png",
10
+ "/icons/apple-touch-icon.png",
11
+ "/icons/android-chrome-192x192.png",
12
+ "/icons/android-chrome-512x512.png",
13
+ ];
14
14
  const APP_ROUTES = [
15
- '/',
16
- '/today',
17
- '/sheets',
18
- '/reporting',
19
- '/search',
20
- '/pomodoro',
21
- '/settings',
22
- '/settings/display',
23
- '/settings/goals',
24
- '/settings/pomodoro',
25
- '/settings/ai-suggestions',
26
- '/settings/cloud-sync',
27
- '/settings/data',
28
- '/settings/tags',
29
- '/login',
30
- '/register',
15
+ "/",
16
+ "/today",
17
+ "/sheets",
18
+ "/reporting",
19
+ "/search",
20
+ "/pomodoro",
21
+ "/settings",
22
+ "/settings/display",
23
+ "/settings/goals",
24
+ "/settings/pomodoro",
25
+ "/settings/ai-suggestions",
26
+ "/settings/cloud-sync",
27
+ "/settings/data",
28
+ "/settings/tags",
29
+ "/login",
30
+ "/register",
31
31
  OFFLINE_URL,
32
- ]
32
+ ];
33
33
 
34
- const is_next_static_asset_request = (url) => url.pathname.startsWith('/_next/static/')
34
+ const is_next_static_asset_request = (url) =>
35
+ url.pathname.startsWith("/_next/static/");
35
36
 
36
37
  const get_cache_key = (request) => {
37
- const url = new URL(request.url)
38
+ const url = new URL(request.url);
38
39
 
39
40
  if (is_next_static_asset_request(url)) {
40
- return `${url.origin}${url.pathname}`
41
+ return `${url.origin}${url.pathname}`;
41
42
  }
42
43
 
43
- return request
44
- }
44
+ return request;
45
+ };
45
46
 
46
47
  const warm_app_routes_cache = async () => {
47
- const cache = await caches.open(CACHE_NAME)
48
+ const cache = await caches.open(CACHE_NAME);
48
49
 
49
50
  await Promise.all(
50
51
  APP_ROUTES.map(async (route) => {
51
52
  try {
52
- const response = await fetch(route, { cache: 'no-store' })
53
+ const response = await fetch(route, { cache: "no-store" });
53
54
 
54
55
  if (response.ok) {
55
- await cache.put(route, response.clone())
56
+ await cache.put(route, response.clone());
56
57
  }
57
58
  } catch {
58
59
  // Ignore failures while warming cache (offline or route unavailable).
59
60
  }
60
61
  }),
61
- )
62
- }
62
+ );
63
+ };
63
64
 
64
- self.addEventListener('install', (event) => {
65
+ self.addEventListener("install", (event) => {
65
66
  event.waitUntil(
66
67
  caches
67
68
  .open(CACHE_NAME)
68
69
  .then((cache) => cache.addAll(PRECACHE_URLS))
69
70
  .then(() => warm_app_routes_cache()),
70
- )
71
- self.skipWaiting()
72
- })
71
+ );
72
+ self.skipWaiting();
73
+ });
73
74
 
74
- self.addEventListener('activate', (event) => {
75
+ self.addEventListener("activate", (event) => {
75
76
  event.waitUntil(
76
77
  caches.keys().then((keys) =>
77
78
  Promise.all(
78
79
  keys.map((key) => {
79
80
  if (key !== CACHE_NAME) {
80
- return caches.delete(key)
81
+ return caches.delete(key);
81
82
  }
82
- return Promise.resolve()
83
+ return Promise.resolve();
83
84
  }),
84
85
  ),
85
86
  ),
86
- )
87
- event.waitUntil(warm_app_routes_cache())
88
- self.clients.claim()
89
- })
87
+ );
88
+ event.waitUntil(warm_app_routes_cache());
89
+ self.clients.claim();
90
+ });
90
91
 
91
- self.addEventListener('fetch', (event) => {
92
- const { request } = event
92
+ self.addEventListener("fetch", (event) => {
93
+ const { request } = event;
93
94
 
94
- if (request.method !== 'GET') {
95
- return
95
+ if (request.method !== "GET") {
96
+ return;
96
97
  }
97
98
 
98
- const request_url = new URL(request.url)
99
+ const request_url = new URL(request.url);
99
100
 
100
- if (request.mode === 'navigate') {
101
+ if (request.mode === "navigate") {
101
102
  event.respondWith(
102
103
  fetch(request)
103
104
  .then(async (network_response) => {
104
105
  if (network_response.ok) {
105
- const cache = await caches.open(CACHE_NAME)
106
- await cache.put(get_cache_key(request), network_response.clone())
106
+ const cache = await caches.open(CACHE_NAME);
107
+ await cache.put(get_cache_key(request), network_response.clone());
107
108
  }
108
- return network_response
109
+ return network_response;
109
110
  })
110
111
  .catch(async () => {
111
- const cache = await caches.open(CACHE_NAME)
112
- const cached_route = await cache.match(get_cache_key(request))
112
+ const cache = await caches.open(CACHE_NAME);
113
+ const cached_route = await cache.match(get_cache_key(request));
113
114
 
114
115
  if (cached_route !== undefined) {
115
- return cached_route
116
+ return cached_route;
116
117
  }
117
118
 
118
- const cached_offline = await cache.match(OFFLINE_URL)
119
- return cached_offline ?? Response.error()
119
+ const cached_offline = await cache.match(OFFLINE_URL);
120
+ return cached_offline ?? Response.error();
120
121
  }),
121
- )
122
- return
122
+ );
123
+ return;
123
124
  }
124
125
 
125
126
  if (request_url.origin !== self.location.origin) {
126
- return
127
+ return;
127
128
  }
128
129
 
129
130
  event.respondWith(
130
131
  caches.match(get_cache_key(request)).then((cached_response) => {
131
132
  if (cached_response !== undefined) {
132
- return cached_response
133
+ return cached_response;
133
134
  }
134
135
 
135
136
  return fetch(request)
136
137
  .then((network_response) => {
137
138
  if (network_response.ok) {
138
- const copy = network_response.clone()
139
+ const copy = network_response.clone();
139
140
  void caches
140
141
  .open(CACHE_NAME)
141
- .then((cache) => cache.put(get_cache_key(request), copy))
142
+ .then((cache) => cache.put(get_cache_key(request), copy));
142
143
  }
143
- return network_response
144
+ return network_response;
144
145
  })
145
- .catch(() => Response.error())
146
+ .catch(() => Response.error());
146
147
  }),
147
- )
148
- })
148
+ );
149
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-time-tracker-ui",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "description": "Web UI for the super-time-tracker CLI time sheets",
5
5
  "keywords": [
6
6
  "nextjs",
@@ -1,3 +0,0 @@
1
- module.exports=[93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))}];
2
-
3
- //# sourceMappingURL=%5Bexternals%5D_next_dist_0arv.vj._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},68194,e=>{"use strict";var t=e.i(76386);e.s(["api_error_response",0,function(e,r=400){let n=e instanceof Error?e.message:String(e);return t.NextResponse.json({error:n},{status:r})}])},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},72507,e=>{"use strict";var t=e.i(60526),r=e.i(50227);let n="db.json",i=r.default.join(t.default.homedir(),".super-time-tracker"),a=r.default.join(i,n);e.s(["DB_FILE_NAME",0,n,"DB_PATH",0,a,"DB_VERSION",0,4,"DEFAULT_SHEET_NAME",0,"main"])},93361,e=>{"use strict";var t=e.i(72507);function r(e,t=[],n=null){if(0===e.length)throw Error("New sheet name must not be empty");if(null!==n&&void 0===t.find(({id:e})=>e===n))throw Error("New sheet active entry does not exist");return{name:e,entries:t,activeEntryID:n}}e.s(["gen_db",0,function(){return{version:t.DB_VERSION,sheets:[r(t.DEFAULT_SHEET_NAME)],activeSheetName:t.DEFAULT_SHEET_NAME}},"gen_sheet",0,r])},13690,e=>{"use strict";e.s(["find_running_entry_on_sheet",0,function(e){if(null===e.activeEntryID)return null;let t=e.entries.find(({id:t})=>t===e.activeEntryID);return void 0===t||null!==t.end?null:t}])},20253,e=>{"use strict";function t(e,t){let r=new Set,n=[];for(let i of[...e,...t]){let e=`${i.timestamp.getTime()}:${i.text}`;r.has(e)||(r.add(e),n.push(i))}return n.sort((e,t)=>e.timestamp.getTime()-t.timestamp.getTime()),n}e.s(["dedupe_sheet_entries_by_id",0,function(e){let r=new Map;for(let n of e){let e=r.get(n.id);if(void 0===e){r.set(n.id,n);continue}if(null===n.end&&null!==e.end){r.set(n.id,{...n,notes:t(n.notes,e.notes)});continue}if(null===e.end&&null!==n.end){r.set(n.id,{...e,notes:t(e.notes,n.notes)});continue}r.set(n.id,{...e,notes:t(e.notes,n.notes)})}return[...r.values()].sort((e,t)=>e.id-t.id)}],20253)},62775,e=>{"use strict";var t=e.i(13690);e.s(["reconcile_stale_active_entry_ids",0,function(e){let r=!1;for(let n of e.sheets)null!==n.activeEntryID&&null===(0,t.find_running_entry_on_sheet)(n)&&(n.activeEntryID=null,r=!0);return r}])},72127,30853,e=>{"use strict";e.s(["convert_json_db",0,function(e){let{sheets:t,version:r,activeSheetName:n}=e;return{version:r,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r,archived:n})=>({name:e,activeEntryID:r,...!0===n?{archived:!0}:{},entries:t.map(({id:e,start:t,end:r,description:n,tags:i,notes:a,archived:s})=>({id:e,description:n,tags:i,notes:a.map(({timestamp:e,text:t})=>({text:t,timestamp:new Date(e)})),start:new Date(t),end:null===r?null:new Date(r),...!0===s?{archived:!0}:{}}))}))}}],72127);var t=e.i(2157);async function r(e){try{await t.promises.mkdir(e,{recursive:!0})}catch(e){if("EEXIST"!==(null!==e&&"object"==typeof e&&"code"in e&&"string"==typeof e.code?e.code:null))throw e}}e.s(["ensure_dir_exists",0,r],30853)},24507,e=>{"use strict";var t=e.i(72507);let r={2:function(e){let{sheets:t,version:r,activeSheetName:n}=e;if(1!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 2.`);return{version:2,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n})=>({tags:[],notes:[],id:e,end:r,start:t,description:n}))}))}},3:function(e){let{sheets:t,version:r,activeSheetName:n}=e;if(2!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 3.`);return{version:3,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n,tags:i})=>({notes:[],tags:i,id:e,end:r,start:t,description:n}))}))}},4:function(e){let{version:t,activeSheetName:r,sheets:n}=e;if(3!==t)throw Error(`DB is version ${t}, cannot migrate to version 4.`);return{version:4,activeSheetName:r,sheets:n}}};e.s(["migrate_json_db",0,function(e){let n=e,i=!1,a=void 0===n.version?1:n.version;if(a>t.DB_VERSION||a<1)throw Error(`Unknown DB version ${n.version}, cannot load.`);for(;a<t.DB_VERSION;){let e=a+1,t=r[e];if(void 0===t)throw Error(`Missing migration from version ${a} to ${e}.`);if((n=t(n)).version!==e)throw Error(`Invalid migration output for version ${e}.`);a=e,i=!0}return{json_db:n,did_migrate:i}}],24507)},47143,e=>{"use strict";var t=e.i(20253);e.s(["dedupe_tracker_db_sheet_entries",0,function(e){let r=!1;for(let n of e.sheets){let e=(0,t.dedupe_sheet_entries_by_id)(n.entries);e.length!==n.entries.length&&(r=!0,n.entries=e)}return r}])},16366,e=>{"use strict";e.s(["convert_db_to_json",0,function(e){let t=e.sheets.map(e=>({name:e.name,activeEntryID:e.activeEntryID,...!0===e.archived?{archived:!0}:{},entries:e.entries.map(e=>({id:e.id,description:e.description,tags:e.tags,start:e.start.getTime(),end:null===e.end?null:e.end.getTime(),notes:e.notes.map(e=>({text:e.text,timestamp:e.timestamp.getTime()})),...!0===e.archived?{archived:!0}:{}}))}));return{version:e.version,activeSheetName:e.activeSheetName,sheets:t}}])},71786,32806,e=>{"use strict";var t=e.i(50227),r=e.i(2157),n=e.i(72507),i=e.i(72127),a=e.i(30853),s=e.i(93361),o=e.i(24507),l=e.i(47143),d=e.i(62775),u=e.i(16366);async function c(e,t=n.DB_PATH){let i=JSON.stringify((0,u.convert_db_to_json)(e));try{await r.promises.writeFile(t,i)}catch(e){throw Error(`Failed to save DB: ${String(e)}`,{cause:e})}}async function _(e=n.DB_PATH){let u,m=t.default.dirname(e);await (0,a.ensure_dir_exists)(m);try{await r.promises.access(e)}catch{let t=(0,s.gen_db)();return await c(t,e),t}let p=await r.promises.readFile(e,"utf-8");try{u=JSON.parse(p)}catch(t){throw Error(`DB at ${e} is invalid JSON: ${String(t)}`,{cause:t})}let h=(0,o.migrate_json_db)(u);u=h.json_db;let v=(0,i.convert_json_db)(u),f=h.did_migrate,g=(0,d.reconcile_stale_active_entry_ids)(v),w=(0,l.dedupe_tracker_db_sheet_entries)(v);return(f||g||w)&&await c(v,e),v}e.s(["write_local_db",0,c],32806),e.s(["read_local_db",0,_],71786)},29207,e=>{"use strict";var t=e.i(5313),r=e.i(36117);async function n(){if(!(0,t.is_supabase_configured)())return null;let e=await (0,r.create_server_supabase_client)(),{data:{user:n}}=await e.auth.getUser();return n?.id??null}e.s(["get_authenticated_user_id",0,n])},24957,49867,14424,95822,e=>{"use strict";var t=e.i(72507),r=e.i(93361),n=e.i(13690);function i(e,t,r){return!0===("incoming"===r?t:e)||void 0}var a=e.i(20253),s=e.i(62775);function o(e,t){let r=new Set,n=[];for(let i of[...e,...t]){let e=`${i.timestamp.getTime()}:${i.text}`;r.has(e)||(r.add(e),n.push(i))}return n.sort((e,t)=>e.timestamp.getTime()-t.timestamp.getTime()),n}function l(e,t){if(null===e)return null;let r=t.find(t=>t.id===e);return void 0===r||null!==r.end?null:e}e.s(["merge_time_tracker_dbs",0,function(e,d,u="incoming"){let c=new Set;for(let t of e.sheets)c.add(t.name);for(let e of d.sheets)c.add(e.name);let _=[...c].map(t=>{let n=e.sheets.find(e=>e.name===t),s=d.sheets.find(e=>e.name===t);if(void 0===n&&void 0===s)return(0,r.gen_sheet)(t);if(void 0===n)return s;if(void 0===s)return n;let c=new Set;for(let e of n.entries)c.add(e.id);for(let e of s.entries)c.add(e.id);let _=[...c].sort((e,t)=>e-t).map(e=>{let t=n.entries.find(t=>t.id===e),r=s.entries.find(t=>t.id===e);if(void 0===t)return r;if(void 0===r)return t;let a=function(e,t,r){let n=null===e.end,i=null===t.end;if(n&&!i||i&&!n){let n="base"===r?e:t,i=n===e?t:e;return{...n,notes:o(n.notes,i.notes)}}if(n&&i){let n=t.start.getTime()>e.start.getTime()||t.start.getTime()===e.start.getTime()&&"incoming"===r,i=n?t:e,a=n?e:t;return{...i,notes:o(i.notes,a.notes)}}let a=e.end?.getTime()??0,s=t.end?.getTime()??0;if(a!==s){let r=a>s?e:t,n=r===e?t:e;return{...r,notes:o(r.notes,n.notes)}}let l="incoming"===r?t:e,d=l===e?t:e;return{...l,notes:o(l.notes,d.notes)}}(t,r,u);return!0===i(t.archived,r.archived,u)?{...a,archived:!0}:a}),m=function(e,t,r,n){let i=null===e?null:r.find(t=>t.id===e)??null,a=null===t?null:r.find(e=>e.id===t)??null;if(null===i&&null===a)return null;if(null===i)return l(a.id,r);if(null===a)return l(i.id,r);if(null===i.end&&null!==a.end)return"base"===n?i.id:null;if(null===a.end&&null!==i.end)return"base"===n?null:a.id;if(null===i.end&&null===a.end)return i.start.getTime()===a.start.getTime()?l("incoming"===n?a.id:i.id,r):l(i.start.getTime()>a.start.getTime()?i.id:a.id,r);let s=i.end.getTime(),o=a.end.getTime();return s===o?l("incoming"===n?a.id:i.id,r):l(s>o?i.id:a.id,r)}(n.activeEntryID,s.activeEntryID,_,u),p=i(n?.archived,s?.archived,u);return{name:t,entries:(0,a.dedupe_sheet_entries_by_id)(_),activeEntryID:m,...!0===p?{archived:!0}:{}}});_.sort((e,t)=>e.name.localeCompare(t.name));let m=function(e,t,r,i){let a=new Set(r.map(e=>e.name)),s=null!==e&&a.has(e),o=null!==t&&a.has(t);if(s&&o){let a=r.find(t=>t.name===e),s=r.find(e=>e.name===t),o=void 0!==a&&null!==(0,n.find_running_entry_on_sheet)(a),l=void 0!==s&&null!==(0,n.find_running_entry_on_sheet)(s);return o&&!l?e:l&&!o||"incoming"===i?t:e}if(o)return t;if(s)return e;let l=r.find(e=>null!==(0,n.find_running_entry_on_sheet)(e));return l?.name??r[0]?.name??null}(e.activeSheetName,d.activeSheetName,_,u),p={version:Math.max(e.version,d.version,t.DB_VERSION),sheets:_,activeSheetName:m};return(0,s.reconcile_stale_active_entry_ids)(p),p}],24957);var d=e.i(36117);function u(e){return e.includes("archived")&&e.includes("does not exist")}function c(e){return(e??1)>=4}async function _(e){let n=await (0,d.create_server_supabase_client)(),{data:i,error:o}=await n.from("tracker_accounts").select("active_sheet_name, db_version").eq("user_id",e).maybeSingle();if(null!==o)throw Error(`Failed to load tracker account: ${o.message}`);if(null===i)return(0,r.gen_db)();let l=c(i.db_version),u=await m(n,e,l);l=u.include_archived;let _=u.sheets;if(0===_.length)return{version:i.db_version??t.DB_VERSION,activeSheetName:i.active_sheet_name,sheets:[]};let h=_.map(e=>e.id),v=await p(n,h,l),{data:f,error:g}=await n.from("entry_notes").select("sheet_id, entry_id, note_index, noted_at, text").in("sheet_id",h).order("note_index",{ascending:!0});if(null!==g)throw Error(`Failed to load entry notes: ${g.message}`);let w=new Map;for(let e of f??[]){let t=`${e.sheet_id}:${e.entry_id}`,r=w.get(t)??[];r.push({text:e.text,timestamp:new Date(e.noted_at)}),w.set(t,r)}let E=new Map;for(let e of v){let t=`${e.sheet_id}:${e.id}`,r=E.get(e.sheet_id)??[];r.push({id:e.id,description:e.description,tags:e.tags??[],start:new Date(e.start_at),end:null===e.end_at?null:new Date(e.end_at),notes:w.get(t)??[],...!0===e.archived?{archived:!0}:{}}),E.set(e.sheet_id,r)}let y=_.map(e=>{let t=(0,r.gen_sheet)(e.name,(0,a.dedupe_sheet_entries_by_id)(E.get(e.id)??[]),e.active_entry_id);return!0===e.archived&&(t.archived=!0),t}),x={version:l?i.db_version??t.DB_VERSION:Math.min(i.db_version??t.DB_VERSION,3),activeSheetName:i.active_sheet_name,sheets:y};return(0,s.reconcile_stale_active_entry_ids)(x),x}async function m(e,t,r){if(r){let{data:r,error:n}=await e.from("sheets").select("id, name, active_entry_id, archived").eq("user_id",t).order("name",{ascending:!0});if(null!==n&&u(n.message))return await e.from("tracker_accounts").update({db_version:3}).eq("user_id",t),m(e,t,!1);if(null!==n)throw Error(`Failed to load sheets: ${n.message}`);return{include_archived:!0,sheets:r??[]}}let{data:n,error:i}=await e.from("sheets").select("id, name, active_entry_id").eq("user_id",t).order("name",{ascending:!0});if(null!==i)throw Error(`Failed to load sheets: ${i.message}`);return{include_archived:!1,sheets:n??[]}}async function p(e,t,r){if(r){let{data:r,error:n}=await e.from("entries").select("sheet_id, id, start_at, end_at, description, tags, archived").in("sheet_id",t).order("id",{ascending:!0});if(null!==n)throw Error(`Failed to load entries: ${n.message}`);return r??[]}let{data:n,error:i}=await e.from("entries").select("sheet_id, id, start_at, end_at, description, tags").in("sheet_id",t).order("id",{ascending:!0});if(null!==i)throw Error(`Failed to load entries: ${i.message}`);return n??[]}e.s(["is_missing_archived_column_error",0,u],49867),e.s(["supports_supabase_archive_columns",0,c],14424),e.s(["read_supabase_db",0,_],95822)},99054,e=>{"use strict";var t=e.i(36117),r=e.i(14424);function n(e,t){return(0,r.supports_supabase_archive_columns)(t)?e:Math.min(e,3)}var i=e.i(49867);async function a(e,t,r,n=!0){let i=r.entries.map(e=>e.id),{data:s,error:o}=await e.from("entries").select("id").eq("sheet_id",t);if(null!==o)throw Error(`Failed to list entries for "${r.name}": ${o.message}`);let l=(s??[]).map(e=>e.id).filter(e=>!i.includes(e));if(l.length>0){let{error:n}=await e.from("entries").delete().eq("sheet_id",t).in("id",l);if(null!==n)throw Error(`Failed to remove entries for "${r.name}": ${n.message}`)}let{error:d}=await e.from("entry_notes").delete().eq("sheet_id",t);if(null!==d)throw Error(`Failed to clear notes for "${r.name}": ${d.message}`);if(0===r.entries.length)return;let u=r.entries.map(e=>({sheet_id:t,id:e.id,start_at:e.start.toISOString(),end_at:null===e.end?null:e.end.toISOString(),description:e.description,tags:e.tags,...n&&!0===e.archived?{archived:!0}:{}})),{error:c}=await e.from("entries").upsert(u,{onConflict:"sheet_id,id"});if(null!==c)throw Error(`Failed to save entries for "${r.name}": ${c.message}`);let _=[];for(let e of r.entries)e.notes.forEach((r,n)=>{_.push({sheet_id:t,entry_id:e.id,note_index:n,noted_at:r.timestamp.toISOString(),text:r.text})});if(0===_.length)return;let{error:m}=await e.from("entry_notes").insert(_);if(null!==m)throw Error(`Failed to save notes for "${r.name}": ${m.message}`)}async function s(e,s){let o=await (0,t.create_server_supabase_client)(),{data:l,error:d}=await o.from("tracker_accounts").select("db_version").eq("user_id",s).maybeSingle();if(null!==d)throw Error(`Failed to load tracker account: ${d.message}`);let u=l?.db_version,c=(0,r.supports_supabase_archive_columns)(u),_=n(e.version,u),{error:m}=await o.from("tracker_accounts").upsert({user_id:s,active_sheet_name:e.activeSheetName,db_version:_,updated_at:new Date().toISOString()},{onConflict:"user_id"});if(null!==m)throw Error(`Failed to save tracker account: ${m.message}`);let{data:p,error:h}=await o.from("sheets").select("id, name").eq("user_id",s);if(null!==h)throw Error(`Failed to list sheets: ${h.message}`);let v=new Set(e.sheets.map(e=>e.name)),f=(p??[]).filter(e=>!v.has(e.name)).map(e=>e.id);if(f.length>0){let{error:e}=await o.from("sheets").delete().in("id",f);if(null!==e)throw Error(`Failed to remove deleted sheets: ${e.message}`)}for(let t of e.sheets){let r={user_id:s,name:t.name,active_entry_id:t.activeEntryID,...c&&!0===t.archived?{archived:!0}:{}},{data:l,error:d}=await o.from("sheets").upsert(r,{onConflict:"user_id,name"}).select("id").single();if(null!==d&&c&&(0,i.is_missing_archived_column_error)(d.message)){c=!1,_=n(e.version,3),await o.from("tracker_accounts").update({db_version:3}).eq("user_id",s);let r={user_id:s,name:t.name,active_entry_id:t.activeEntryID},i=await o.from("sheets").upsert(r,{onConflict:"user_id,name"}).select("id").single();if(null!==i.error)throw Error(`Failed to save sheet "${t.name}": ${i.error.message}`);let l=i.data.id;await a(o,l,t,c);continue}if(null!==d)throw Error(`Failed to save sheet "${t.name}": ${d.message}`);let u=l.id;await a(o,u,t,c)}}e.s(["write_supabase_db",0,s],99054)},58328,e=>{"use strict";var t=e.i(4394),r=e.i(45404),n=e.i(60016),i=e.i(33535),a=e.i(46593),s=e.i(10659),o=e.i(19784),l=e.i(31269),d=e.i(13865),u=e.i(65034),c=e.i(81157),_=e.i(82614),m=e.i(24377),p=e.i(57949),h=e.i(9566),v=e.i(93695);e.i(46179);var f=e.i(42108),g=e.i(76386),w=e.i(68194),E=e.i(29207),y=e.i(24957),x=e.i(62775),b=e.i(71786),S=e.i(95822),R=e.i(99054),D=e.i(36117);async function N(e){let t=await (0,S.read_supabase_db)(e),r=await (0,b.read_local_db)(),n=(0,y.merge_time_tracker_dbs)(t,r,"incoming");(0,x.reconcile_stale_active_entry_ids)(n),await (0,R.write_supabase_db)(n,e);let i=await (0,D.create_server_supabase_client)();return await i.from("tracker_accounts").update({local_imported_at:new Date().toISOString()}).eq("user_id",e),n}async function T(e){await N(e)}async function $(e){let t=await (0,b.read_local_db)();await (0,R.write_supabase_db)(t,e)}async function I(e){try{let t=await (0,E.get_authenticated_user_id)();if(null===t)return(0,w.api_error_response)(Error("Sign in required"),401);return"true"===new URL(e.url).searchParams.get("verbatim")?await $(t):await T(t),g.NextResponse.json({ok:!0})}catch(e){return(0,w.api_error_response)(e,500)}}e.s(["POST",0,I],88689);var C=e.i(88689);let A=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/sync/push/route",pathname:"/api/sync/push",filename:"route",bundlePath:""},distDir:"next-output",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/sync/push/route.ts",nextConfigOutput:"standalone",userland:C,...{}}),{workAsyncStorage:q,workUnitAsyncStorage:k,serverHooks:O}=A;async function F(e,t,n){n.requestMeta&&(0,i.setRequestMeta)(e,n.requestMeta),A.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/sync/push/route";g=g.replace(/\/index$/,"")||"/";let w=await A.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:E,deploymentId:y,params:x,nextConfig:b,parsedUrl:S,isDraftMode:R,prerenderManifest:D,routerServerContext:N,isOnDemandRevalidate:T,revalidateOnlyGenerated:$,resolvedPathname:I,clientReferenceManifest:C,serverActionsManifest:q}=w,k=(0,o.normalizeAppPath)(g),O=!!(D.dynamicRoutes[k]||D.routes[I]),F=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,S,!1):t.end("This page could not be found"),null);if(O&&!R){let e=!!D.routes[I],t=D.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await F();throw new v.NoFallbackError}}let j=null;!O||A.isDev||R||(j="/index"===(j=I)?"/":j);let P=!0===A.isDev||!O,M=O&&!P;q&&C&&(0,s.setManifestsSingleton)({page:g,clientReferenceManifest:C,serverActionsManifest:q});let B=e.method||"GET",H=(0,a.getTracer)(),U=H.getActiveScopeSpan(),V=!!(null==N?void 0:N.isWrappedByNextServer),L=!!(0,i.getRequestMeta)(e,"minimalMode"),K=(0,i.getRequestMeta)(e,"incrementalCache")||await A.getIncrementalCache(e,b,D,L);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let X={params:x,previewProps:D.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:P,incrementalCache:K,cacheLifeProfiles:b.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,i)=>A.onRequestError(e,t,n,i,N)},sharedContext:{buildId:E,deploymentId:y}},G=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(G,(0,d.signalFromNodeResponse)(t));try{let i,s=async e=>A.handle(W,X).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${B} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),i&&i!==e&&(i.setAttribute("http.route",n),i.updateName(t))}else e.updateName(`${B} ${g}`)}),o=async i=>{var a,o;let l=async({previousCacheEntry:r})=>{try{if(!L&&T&&$&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await s(i);e.fetchMetrics=X.renderOpts.fetchMetrics;let o=X.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=X.renderOpts.collectedTags;if(!O)return await (0,_.sendResponse)(G,J,a,X.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[h.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,n=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:X.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:T})},!1,N),t}},d=await A.handleResponse({req:e,nextConfig:b,cacheKey:j,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:D,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:$,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:L});if(!O)return null;if((null==d||null==(a=d.value)?void 0:a.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",T?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),R&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,m.fromNodeOutgoingHttpHeaders)(d.value.headers);return L&&O||u.delete(h.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,p.getCacheControlHeader)(d.cacheControl)),await (0,_.sendResponse)(G,J,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};V&&U?await o(U):(i=H.getActiveScopeSpan(),await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${B} ${g}`,kind:a.SpanKind.SERVER,attributes:{"http.method":B,"http.target":e.url}},o),void 0,!V))}catch(t){if(t instanceof v.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:T})},!1,N),O)throw t;return await (0,_.sendResponse)(G,J,new Response(null,{status:500})),null}}e.s(["handler",0,F,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:q,workUnitAsyncStorage:k})},"routeModule",0,A,"serverHooks",0,O,"workAsyncStorage",0,q,"workUnitAsyncStorage",0,k],58328)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0.8v_6p._.js.map